:root {
  --accent: #3ddc97; --on-accent: #0b0e12;
  --bg0: #0a0c10; --bg1: #11141a; --bg2: #161a22; --bg3: #1e232d; --bg4: #272d39;
  --text: #e7eaf0; --muted: #8a93a5; --line: #232936; --danger: #ff5d6c; --warn: #ffb454;
  --radius: 12px; --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="midnight"] { --bg0: #000; --bg1: #07080b; --bg2: #0c0e13; --bg3: #14171e; --bg4: #1c2029; --line: #181c25; }
:root[data-theme="black"] { --bg0: #000; --bg1: #000; --bg2: #000; --bg3: #0d0d0f; --bg4: #18181b; --line: #1b1b1f; --mine: color-mix(in srgb, var(--accent) 24%, #000); --other: #0d0d0f; }
:root[data-theme="light"] { --bg0: #e4e8ef; --bg1: #eef1f6; --bg2: #ffffff; --bg3: #f1f3f8; --bg4: #e3e7ef; --text: #161a22; --muted: #5d667a; --line: #dde2ec; --shadow: 0 10px 40px rgba(20, 30, 60, .18); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg2); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
a { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
#root { height: 100%; }
.hint { color: var(--muted); font-size: 13px; }

/* ── Кнопки та поля ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; background: var(--bg4); font-weight: 600; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.12); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--danger-fill, #d92d43); color: #fff; } /* заливка темніша за текстовий --danger: білий напис ≥ 4,5 : 1 */
.btn.ghost { background: transparent; color: var(--muted); }
.btn.wide { width: 100%; margin-top: 8px; } .btn.big { padding: 12px 22px; font-size: 16px; }
.btnrow { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.link { color: var(--muted); margin-top: 12px; font-size: 14px; } .link:hover { color: var(--text); }
.input { width: 100%; padding: 10px 12px; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
:root[data-theme="light"] .input { background: #fff; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea.input { resize: none; }
.field { display: block; margin-bottom: 12px; } .field > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--bg4); color: var(--text); }
.icon-btn.on { color: var(--accent); } .icon-btn.off { color: var(--danger); } .icon-btn.danger:hover { background: var(--danger); color: #fff; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.send { color: var(--accent); }
.mini { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 6px; } .mini:hover { color: var(--text); background: var(--bg4); }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; cursor: pointer; } .check input { accent-color: var(--accent); width: 18px; height: 18px; }
.check small { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; } .two h3 { margin-top: 0; }

/* ── Аватар і статус ── */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; overflow: hidden; flex: none; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avw { position: relative; display: inline-flex; flex: none; }
.sdot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--bg1); background: #6b7385; }
.sdot.online { background: #3ddc6f; } .sdot.idle { background: var(--warn); } .sdot.dnd { background: var(--danger); }
.topbar .sdot { border-color: var(--bg2); }

/* ── Вхід ── */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: radial-gradient(1200px 600px at 10% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--bg1); overflow: auto; }
.auth-brand { padding: 12vh 8vw; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.auth-brand h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.03em; line-height: 1; }
.auth-brand p { color: var(--muted); font-size: 18px; max-width: 28ch; margin: 0; }
.logo { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 0 30px color-mix(in srgb, var(--accent) 9%, transparent); margin: 0 0 22px 18px; position: relative; }
.logo::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--text); top: -24px; right: -34px; }
.auth-card { align-self: center; justify-self: center; width: min(420px, calc(100% - 32px)); background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); margin: 24px 0; }
.auth-card h2 { margin-bottom: 6px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg1); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tabs button { padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 600; } .tabs button.active { background: var(--bg4); color: var(--text); }
.err { color: var(--danger); min-height: 20px; font-size: 14px; margin: 4px 0; } .err.ok { color: var(--accent); }
.input.code { font-size: 28px; letter-spacing: .4em; text-align: center; font-family: var(--mono); }
.hint.invite { background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 10px 12px; border-radius: 10px; color: var(--text); }
@media (max-width: 800px) { .auth { grid-template-columns: 1fr; } .auth-brand { padding: 40px 28px 0; } .logo { margin-bottom: 8px; } }

/* ── Каркас ── */
.app { display: grid; grid-template-columns: 72px 316px minmax(0, 1fr) 240px; height: 100%; }
.app.no-members { grid-template-columns: 72px 316px minmax(0, 1fr) 0; } .app.no-members .members { display: none; }
.rail { background: var(--bg0); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 24px; background: var(--bg3); color: var(--text); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; transition: border-radius .18s, background .18s, color .18s; }
.rail-btn:hover { border-radius: 16px; background: var(--accent); color: var(--on-accent); }
.rail-btn.active { border-radius: 16px; background: var(--accent); color: var(--on-accent); }
.rail-btn.active::before { content: ""; position: absolute; left: -12px; width: 5px; height: 28px; border-radius: 0 5px 5px 0; background: var(--text); }
.rail-btn.add { color: var(--accent); background: transparent; border: 2px dashed var(--bg4); } .rail-btn.add:hover { border-style: solid; }
.rail-sep { width: 28px; height: 2px; background: var(--bg4); border-radius: 2px; flex: none; }
.rail-btn .badge { position: absolute; right: -4px; bottom: -4px; }
.pip { position: absolute; left: -10px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.live-dot { position: absolute; right: 1px; top: 1px; width: 11px; height: 11px; border-radius: 50%; background: #3ddc6f; border: 2.5px solid var(--bg0); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg0); box-sizing: content-box; }
.side .badge { border: 0; height: 18px; margin-left: auto; }

.side { background: var(--bg1); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.side-head { height: 52px; padding: 0 14px 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; border-bottom: 1px solid var(--line); text-align: left; flex: none; width: 100%; }
button.side-head:hover { background: var(--bg3); } .sh-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chan-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--muted); cursor: pointer; min-height: 36px; }
.chan-item:hover { background: var(--bg3); color: var(--text); } .chan-item.active { background: var(--bg4); color: var(--text); }
.chan-item.unread { color: var(--text); font-weight: 700; } .chan-item.joined .ico { color: #3ddc6f; }
.chan-item .cname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chan-item .del { opacity: 0; } .chan-item:hover .del { opacity: 1; }
.gav { width: 32px; height: 32px; border-radius: 50%; background: var(--bg4); display: inline-flex; align-items: center; justify-content: center; }
.live-chip { font-size: 10px; font-weight: 800; background: var(--danger); color: #fff; border-radius: 6px; padding: 2px 5px; display: inline-flex; align-items: center; gap: 3px; letter-spacing: .04em; }
.chan-item .live-chip { background: #3ddc6f; color: #07210f; }
.vpart { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 34px; color: var(--muted); font-size: 14px; }
.vpart .vn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vpart.speaking .avatar { box-shadow: 0 0 0 2px #3ddc6f; }
.empty-side { padding: 20px 10px; color: var(--muted); font-size: 14px; text-align: center; }

.userpanel { background: var(--bg0); flex: none; }
:root[data-theme="light"] .userpanel { background: var(--bg3); }
.vstrip { display: flex; align-items: center; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); gap: 6px; }
.vs-info { flex: 1; min-width: 0; cursor: pointer; } .vs-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #3ddc6f; font-size: 14px; }
.vs-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc6f; animation: pulse 1.6s infinite; }
.vs-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pulse { 50% { opacity: .35; } }
.me-row { display: flex; align-items: center; gap: 2px; padding: 8px; }
.me-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 3px 6px; border-radius: 8px; cursor: pointer; } .me-info:hover { background: var(--bg3); }
.me-info .sdot { border-color: var(--bg0); }
.me-text { min-width: 0; } .me-name { font-weight: 700; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me-sub { font-size: 12px; color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg2); }
.topbar { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.topbar .title { font-weight: 700; font-size: 16px; } .topbar .sub { color: var(--muted); font-size: 13px; } .spacer { flex: 1; }
.only-mobile { display: none; }
.chanview { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chanview.with-stage .stage { flex: 1 1 58%; } .chanview.with-stage .chat { flex: 0 0 38%; border-top: 1px solid var(--line); }
.chanview.with-stage.chat-hidden .chat { display: none; }

/* ── Повідомлення ── */
.msgs { flex: 1; overflow-y: auto; padding: 12px 0 6px; min-height: 0; }
.day { display: flex; align-items: center; gap: 12px; margin: 14px 16px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { position: relative; display: flex; gap: 14px; padding: 3px 16px 3px 16px; }
.msg:not(.grouped) { margin-top: 12px; } .msg:hover { background: color-mix(in srgb, var(--bg4) 40%, transparent); }
.msg .av { width: 40px; flex: none; align-self: flex-start; } .msg .gtime { width: 40px; flex: none; font-size: 11px; color: var(--muted); text-align: center; opacity: 0; padding-top: 4px; } .msg:hover .gtime { opacity: 1; }
.msg .body { min-width: 0; flex: 1; }
.meta { display: flex; align-items: baseline; gap: 8px; } .meta .name { font-weight: 700; } .meta .name:hover { text-decoration: underline; } .meta .time { font-size: 12px; color: var(--muted); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.text code { font-family: var(--mono); font-size: .9em; background: var(--bg4); padding: 1px 5px; border-radius: 5px; }
.text pre { background: var(--bg1); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; margin: 6px 0; overflow-x: auto; white-space: pre; } .text pre code { background: none; padding: 0; }
.edited { color: var(--muted); font-size: 11px; }
.actions { position: absolute; right: 12px; top: -14px; display: none; background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: var(--shadow); } .msg:hover .actions { display: flex; }
.edit-ta { margin-top: 4px; }
.loadmore { display: block; margin: 6px auto 10px; color: var(--accent); font-weight: 600; padding: 6px 14px; border-radius: 8px; } .loadmore:hover { background: var(--bg3); }
.start { text-align: center; color: var(--muted); padding: 40px 16px; }
.typing { height: 20px; padding: 0 20px; font-size: 12.5px; color: var(--muted); flex: none; font-style: italic; }
.composer { display: flex; align-items: flex-end; gap: 6px; margin: 0 16px 16px; background: var(--bg3); border-radius: 14px; padding: 4px 6px 4px 4px; flex: none; }
.composer .input { background: transparent; border: 0; box-shadow: none; padding: 10px 12px; max-height: 200px; line-height: 1.4; }
.composer .icon-btn { margin-bottom: 2px; }

/* ── Учасники ── */
.members { background: var(--bg1); border-left: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.mem-group { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 14px 8px 6px; }
.mem { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; cursor: pointer; } .mem:hover { background: var(--bg3); }
.mem.off { opacity: .5; } .mem .mn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tag { font-size: 10px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 0 5px; }

/* ── Голосова сцена ── */
.stage { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--bg0); }
.grid { flex: 1; display: grid; gap: 10px; padding: 12px; min-height: 0; }
.spot { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 0; }
.spot-main { flex: 1; min-height: 0; display: flex; } .spot-main .tile { flex: 1; }
.spot-strip { display: flex; gap: 10px; height: 112px; flex: none; overflow-x: auto; } .spot-strip .tile { flex: 0 0 180px; }
.tile { position: relative; background: var(--bg3); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .12s; }
.tile.speaking { outline-color: #3ddc6f; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.cam video { object-fit: cover; }
.tile-av { display: flex; } .spot-strip .tile-av .avatar { width: 52px !important; height: 52px !important; font-size: 22px !important; }
.tile-label { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .6); color: #fff; padding: 3px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; max-width: calc(100% - 16px);  }
.tile-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tile-label em { font-weight: 400; opacity: .7; }
.tile-label .ico:first-child:not(:last-child) { color: var(--danger); } .tile.screen .tile-label .ico { color: #fff !important; }
.tile-tools { position: absolute; right: 6px; top: 6px; display: none; gap: 4px; align-items: center; } .tile:hover .tile-tools { display: flex; }
.tile-tools .icon-btn, .vol { background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px;  }
.vol { display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 28px; } .vol input { width: 80px; accent-color: var(--accent); }
.controls { flex: none; display: flex; justify-content: center; gap: 12px; padding: 10px 12px 14px; }
.cbtn { width: 52px; height: 52px; border-radius: 50%; background: var(--bg4); color: var(--text); display: flex; align-items: center; justify-content: center; transition: background .15s, transform .08s; }
.cbtn:hover { background: color-mix(in srgb, var(--bg4) 70%, var(--text)); } .cbtn:active { transform: scale(.94); }
.cbtn.on { background: var(--accent); color: var(--on-accent); } .cbtn.off { background: #fff; color: #111; } .cbtn.hang { background: var(--danger); color: #fff; width: 64px; border-radius: 26px; }
.join-splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.js-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.js-people { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; } .js-p { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

/* ── Привітання ── */
.welcome { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wcard { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 14px; } .wcard h1 { font-size: 30px; letter-spacing: -.02em; } .wcard p { color: var(--muted); margin: 0; }
.wbtns { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* ── Модалки, меню, тости ── */
.modal-back { position: fixed; inset: 0; background: rgba(5, 7, 10, .62); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .12s; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .14s; } .modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px 22px; } .modal-body { padding: 8px 22px 22px; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.96); opacity: 0; } }
.copyrow { display: flex; gap: 8px; }
.menu { position: fixed; z-index: 60; min-width: 220px; background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); animation: pop .1s; }
.menu-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; } .menu-item:hover { background: var(--accent); color: var(--on-accent); } .menu-item.danger { color: var(--danger); } .menu-item.danger:hover { background: var(--danger); color: #fff; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: var(--bg4); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .15s; border: 1px solid var(--line); max-width: 90vw; } .toast.err { background: var(--danger); color: #fff; border-color: transparent; } .toast.out { opacity: 0; transition: opacity .4s; }
.connbar { position: fixed; top: 0; left: 0; right: 0; background: var(--warn); color: #231600; text-align: center; font-weight: 600; padding: 6px; z-index: 90; transform: translateY(-100%); transition: transform .2s; } .connbar.show { transform: none; }

/* ── Профіль / налаштування ── */
.profile .p-top { display: flex; gap: 18px; align-items: center; } .p-name { font-size: 22px; font-weight: 800; } .p-user { color: var(--muted); } .p-status { font-size: 13px; margin-top: 4px; }
.p-bio { margin-top: 16px; padding: 12px; background: var(--bg1); border-radius: 10px; white-space: pre-wrap; }
.profile .sdot { width: 18px; height: 18px; border-width: 4px; border-color: var(--bg2); }
.settings { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; min-height: 380px; } .sbody { min-width: 0; }
.stabs { display: flex; flex-direction: column; gap: 2px; } .stab { text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; } .stab:hover { background: var(--bg3); } .stab.active { background: var(--bg4); color: var(--text); }
.av-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chip { padding: 8px 16px; border-radius: 999px; background: var(--bg3); font-weight: 600; border: 2px solid transparent; } .chip.active { border-color: var(--accent); }
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--bg2); box-shadow: 0 0 0 1px var(--line); } .swatches input[type=color] { width: 40px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; }

/* ── Мобільна версія ── */
.scrim { display: none; }
@media (max-width: 899px) {
  .app, .app.no-members { grid-template-columns: minmax(0, 1fr); position: relative; overflow: hidden; }
  .rail, .side, .members { position: fixed; top: 0; bottom: 0; z-index: 40; transition: transform .22s ease; }
  .rail { left: 0; width: 72px; transform: translateX(-100%); } .side { left: 72px; width: min(280px, calc(100vw - 72px)); transform: translateX(-200%); }
  .members { right: 0; width: min(280px, 86vw); transform: translateX(100%); display: block !important; }
  .app.nav-open .rail, .app.nav-open .side { transform: none; } .app.mem-open .members { transform: none; }
  .app.nav-open .scrim, .app.mem-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; }
  .only-mobile { display: inline-flex; }
  .chanview.with-stage .stage { flex-basis: 55%; } .chanview.with-stage .chat { flex-basis: 45%; }
  .grid { gap: 6px; padding: 6px; } .cbtn { width: 46px; height: 46px; } .cbtn.hang { width: 58px; }
  .actions { top: -16px; } .tile-tools { display: flex; }
  .composer { margin: 0 10px calc(10px + env(safe-area-inset-bottom)); }
  .two { grid-template-columns: 1fr; gap: 6px; }
  .settings { grid-template-columns: 1fr; } .stabs { flex-direction: row; overflow-x: auto; }
}
@media (max-width: 899px) and (orientation: landscape) { .chanview.with-stage .chat { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ═════════════ Orbit = Discord + Telegram ═════════════ */
:root { --mine: color-mix(in srgb, var(--accent) 26%, var(--bg2)); --other: var(--bg3); }
:root[data-theme="light"] { --mine: color-mix(in srgb, var(--accent) 30%, #fff); --other: #fff; }

/* Список чатів */
.side-tools { padding: 10px 12px 4px; flex: none; }
.chatsearch { border-radius: 999px; background: var(--bg3); border-color: transparent; padding: 9px 16px; }
.chips2 { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.chip2 { padding: 5px 13px; border-radius: 999px; background: var(--bg3); font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip2:hover { color: var(--text); } .chip2.active { background: var(--accent); color: var(--on-accent); }
#chatlist { padding: 6px; }
.crow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; }
.crow:hover { background: var(--bg3); } .crow.active { background: color-mix(in srgb, var(--accent) 24%, var(--bg1)); }
.crow .sdot { border-color: var(--bg1); } .crow:hover .sdot { border-color: var(--bg3); }
.cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cr-top, .cr-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-time { font-size: 12px; color: var(--muted); flex: none; } .crow.unread .cr-time { color: var(--accent); }
.cr-prev { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow.unread .cr-prev { color: var(--text); } .cr-prev.typ { color: var(--accent); font-style: italic; }
.crow .badge { background: var(--accent); color: var(--on-accent); margin-left: 0; flex: none; }
.crow .tick { display: inline-flex; color: var(--muted); } .crow .tick.seen { color: var(--accent); }
.gav.big { width: 48px; height: 48px; flex: none; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #000), color-mix(in srgb, var(--accent) 45%, #3b6cff)); }
.gav.saved { background: linear-gradient(135deg, #4aa8ff, #2c6bff); }
.topbar .gav { width: 38px; height: 38px; flex: none; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #000), color-mix(in srgb, var(--accent) 45%, #3b6cff)); }

/* Шапка чату */
.topbar { height: 58px; }
.tb-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; } .tb-info.clickable { cursor: pointer; }
.tb-info .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-info .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sub.typing-on { color: var(--accent); }
.tb-ico { color: var(--muted); display: inline-flex; }
.pinbar { display: none; } .pinbar.show { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; }
.pin-line { width: 3px; height: 32px; border-radius: 2px; background: var(--accent); flex: none; }
.pin-body { flex: 1; min-width: 0; cursor: pointer; } .pin-title { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.pin-text { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Повідомлення-бульбашки */
.chat { position: relative; }
.msgs { padding: 10px 0 8px; } /* фон — окремий шар .chat-bg (rev2.css) */
.day { justify-content: center; margin: 12px 0 6px; }
.day::before, .day::after { display: none; }
.day span { background: color-mix(in srgb, var(--bg4) 85%, transparent); padding: 3px 12px; border-radius: 999px;  }
.row { display: flex; align-items: flex-end; gap: 8px; padding: 1px 16px; margin-top: 2px; position: relative; }
.row.first { margin-top: 10px; } .row.mine { justify-content: flex-end; }
.avcol { width: 34px; flex: none; align-self: flex-end; } .avcol .av { display: block; }
.bubble { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 8px; max-width: min(560px, 78%); min-width: 0; padding: 6px 10px 5px; background: var(--other); border-radius: 18px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); overflow-wrap: anywhere; }
.row.mine .bubble { background: var(--mine); }
.row:not(.mine) .bubble.last { border-bottom-left-radius: 5px; } .row.mine .bubble.last { border-bottom-right-radius: 5px; }
.bubble > .bname, .bubble > .fwd, .bubble > .quote, .bubble > .att-media, .bubble > .att-file, .bubble > .vp, .bubble > .reacts { flex: 0 0 100%; min-width: 0; }
.bubble > .text { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.bubble.voice { min-width: 250px; }
.bname { text-align: left; font-weight: 700; font-size: 14px; margin-bottom: 1px; } .bname:hover { text-decoration: underline; }
.fwd { font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 5px; margin-bottom: 2px; } .fwd b { font-weight: 700; }
.quote { border-left: 3px solid var(--qc, var(--accent)); background: color-mix(in srgb, var(--qc, var(--accent)) 14%, transparent); border-radius: 4px 8px 8px 4px; padding: 3px 8px; margin: 2px 0 4px; cursor: pointer; }
.q-name { font-size: 13px; font-weight: 700; color: var(--qc, var(--accent)); } .q-text { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfoot { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; user-select: none; }
.tick { display: inline-flex; color: var(--muted); } .tick.seen { color: var(--accent); }
.bubble.media-only { padding: 3px; } .bfoot.over { position: absolute; right: 10px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 10px; padding: 1px 7px; }
.bfoot.over .tick { color: #fff; }
.att-media { display: block; border-radius: 14px; overflow: hidden; cursor: zoom-in; margin: 0 0 4px; }
.bubble.media-only .att-media { margin: 0; }
.att-img { display: block; max-width: 100%; width: auto; max-height: 340px; min-width: 150px; min-height: 90px; object-fit: cover; background: var(--bg4); margin: 0 auto; }
.att-img.loading { animation: shimmer 1.2s infinite alternate; height: 150px; width: 220px; } .att-img.broken { height: 90px; width: 150px; opacity: .4; }
@keyframes shimmer { from { opacity: .45; } to { opacity: .9; } }
.att-file { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; margin: 2px 0 4px; border-radius: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); text-align: left; min-width: 220px; }
.att-file:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.af-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.af-info { display: flex; flex-direction: column; min-width: 0; flex: 1; } .af-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .af-size { font-size: 12px; color: var(--muted); }
.vp { display: flex; align-items: center; gap: 10px; padding: 2px 0 2px; }
.vp-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.vp-btn:disabled { opacity: .6; }
.vp-bar { flex: 1; min-width: 110px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 22%, transparent); cursor: pointer; position: relative; overflow: hidden; }
.vp-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.vp-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.rx { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); border: 1px solid transparent; font-size: 14px; }
.rx:hover { background: color-mix(in srgb, var(--text) 16%, transparent); } .rx.mine { background: color-mix(in srgb, var(--accent) 28%, transparent); border-color: var(--accent); }
.rn { font-size: 12.5px; font-weight: 700; }
.btools { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; align-self: center; }
.row:hover .btools { opacity: 1; } .row.mine .btools { order: -1; }
.bdots { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); background: var(--bg3); } .bdots:hover { color: var(--text); background: var(--bg4); }
.row.flash .bubble { animation: flash 1.6s ease-out; } @keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 1px 1px rgba(0, 0, 0, .12); } }
.bubble .text { white-space: pre-wrap; } .bubble .edit-ta { min-width: 260px; }
.chanview.dropping { outline: 2px dashed var(--accent); outline-offset: -10px; }

/* Меню, реакції, емодзі */
.menu.ctx { min-width: 210px; padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; } .menu-item .ico { opacity: .75; }
.react-row { display: flex; gap: 0; padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); justify-content: space-between; }
.rq { width: 34px; height: 34px; border-radius: 10px; font-size: 21px; display: inline-flex; align-items: center; justify-content: center; } .rq:hover { background: var(--bg4); transform: scale(1.12); }
.rq.more { color: var(--muted); font-size: 16px; }
.emoji-pop { position: fixed; z-index: 70; width: 332px; max-width: calc(100vw - 16px); background: var(--bg3); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; animation: pop .1s; }
.emoji-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.etab { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; } .etab.active { background: var(--accent); color: var(--on-accent); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.emo { font-size: 22px; height: 36px; border-radius: 8px; } .emo:hover { background: var(--bg4); }

/* Композер */
.composer-wrap { flex: none; margin: 0 14px 12px; }
.composer { margin: 0; display: flex; align-items: flex-end; gap: 2px; background: var(--bg3); border-radius: 24px; padding: 4px 6px; }
.composer-wrap .cbar:not(:empty) + .composer { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.composer .input { background: transparent; border: 0; box-shadow: none; padding: 10px 6px; max-height: 180px; }
.composer .icon-btn { margin: 0 0 2px; width: 40px; height: 40px; border-radius: 50%; }
.composer .act { color: var(--muted); } .composer .act.ready { background: var(--accent); color: var(--on-accent); }
.composer .danger-ico:hover { background: var(--danger); color: #fff; }
.cbar { display: flex; flex-direction: column; gap: 0; }
.rbar, .sbar { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; background: var(--bg3); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); color: var(--accent); }
.rbar + .composer, .cbar:not(:empty) .rbar:last-child { border-radius: 14px 14px 0 0; }
.rb-body, .sb-body { flex: 1; min-width: 0; color: var(--text); } .rb-name { font-size: 13px; font-weight: 700; color: var(--accent); }
.rb-text, .sb-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); } .sb-name { color: var(--text); }
.sb-size { font-size: 12px; color: var(--muted); } .sb-prog { height: 3px; border-radius: 2px; background: var(--bg4); margin-top: 3px; overflow: hidden; } .sb-prog > div { height: 100%; background: var(--accent); transition: width .15s; }
.rec-info { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 6px; min-height: 44px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; } .rec-hint { color: var(--muted); font-size: 14px; }

/* Пошук, результати, фото */
.res-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; max-height: 56vh; overflow-y: auto; }
.res { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; text-align: left; width: 100%; } .res:hover { background: var(--bg3); }
.res-body { min-width: 0; flex: 1; } .res-top { display: flex; align-items: baseline; gap: 8px; } .res-name { font-weight: 700; } .res-where { color: var(--accent); font-size: 12.5px; } .res-time { margin-left: auto; font-size: 12px; color: var(--muted); }
.res-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; animation: fade .12s; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 6px; object-fit: contain; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding: 10px 14px; color: #fff; background: linear-gradient(rgba(0, 0, 0, .6), transparent); cursor: default; }
.lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lb-bar .icon-btn { color: #fff; }

/* Мобільна версія: екран зі списком чатів, як у Telegram */
@media (max-width: 899px) {
  .app.list-page .scrim { display: none !important; }
  .app.list-page .side, .app.nav-open .side { width: min(340px, calc(100vw - 72px)); }
  .app.list-page .side { width: calc(100vw - 72px); }
  .composer-wrap { margin: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .composer { padding: 3px 4px; }
  .bubble { max-width: 86%; } .row { padding: 1px 8px; }
  .row.mine .bubble { max-width: 88%; }
  .bubble.voice { min-width: 220px; } .vp-bar { min-width: 80px; }
  .btools { display: none; }
  .tb-info .title { max-width: 46vw; }
}
@media (hover: none) { .btools { display: none; } }


/* ── Адміністрування ── */
.admin h3:first-child { margin-top: 0; }
.atiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.atile { background: var(--bg3); border-radius: 14px; padding: 12px 14px; }
.at-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; } .at-lab { font-size: 13px; color: var(--muted); } .at-sub { font-size: 12px; color: var(--accent); margin-top: 2px; }
.warnbox { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--text); padding: 10px 12px; border-radius: 10px; margin-top: 12px; }
.keys { margin-top: 12px; }
.kform { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; } .kform .input { flex: 1; min-width: 150px; }
.kuses { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); } .kuses .input { width: 84px; flex: none; min-width: 0; }
.klist { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.krow { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; background: var(--bg3); border-radius: 10px; }
.krow code { font-family: var(--mono); font-weight: 700; letter-spacing: .03em; } .k-note { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k-use { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ulist { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 360px; overflow-y: auto; }
.urow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--bg3); } .urow.banned { opacity: .7; }
.ua { width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ui { flex: 1; min-width: 0; } .un { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .un .hint { font-weight: 400; }
.um { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uact { display: flex; gap: 6px; flex: none; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.tag.on { color: #3ddc6f; border-color: #3ddc6f; } .tag.bad { color: var(--danger); border-color: var(--danger); } .tag.warn { color: var(--warn); border-color: var(--warn); } .tag.adm { margin-left: 8px; }
@media (max-width: 899px) { .urow { flex-wrap: wrap; } .uact { width: 100%; justify-content: flex-end; } }

/* ── Дзвінки з сигналом ── */
#rings { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(5, 7, 10, .62);  animation: pop .16s; }
.ring-card { width: min(340px, calc(100vw - 32px)); padding: 28px 24px 24px; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.ring-av { position: relative; display: inline-flex; margin-bottom: 16px; }
.ring-av::before, .ring-av::after, .calling-av::before, .calling-av::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ringpulse 2s ease-out infinite; }
.ring-av::after, .calling-av::after { animation-delay: 1s; }
@keyframes ringpulse { 0% { transform: scale(.92); opacity: .65; } 100% { transform: scale(1.55); opacity: 0; } }
.ring-name { font-size: 21px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-sub { color: var(--muted); margin: 4px 0 22px; }
.ring-btns { display: flex; justify-content: center; gap: 44px; }
.ring-btn { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .12s, filter .12s; }
.ring-btn:hover { transform: scale(1.07); filter: brightness(1.1); }
.ring-btn.no { background: var(--danger); } .ring-btn.yes { background: #2fbf6c; animation: ringshake 1.1s ease-in-out infinite; }
@keyframes ringshake { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.calling { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; min-height: 0; }
.calling-av { position: relative; display: inline-flex; margin-bottom: 18px; }
.calling-av::before, .calling-av::after { inset: -8px; }
.calling.ended .calling-av::before, .calling.ended .calling-av::after { animation: none; opacity: 0; }
.calling-name { font-size: 26px; font-weight: 700; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calling-sub { color: var(--muted); font-size: 16px; }
.calling:not(.ended) .calling-sub::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ── Вікно демонстрації екрана ── */
.share h3 { margin: 16px 0 8px; } .share h3:first-child { margin-top: 0; }
.share-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; } .share-top h3 { margin: 0; flex: 1; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg3); border: 1px solid var(--line); }
.seg button { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; max-height: 280px; overflow-y: auto; padding: 4px; margin: 8px 0 0; }
.src-card { display: flex; flex-direction: column; gap: 6px; padding: 7px; border-radius: 12px; background: var(--bg3); border: 2px solid transparent; text-align: left; transition: border-color .12s, background .12s; }
.src-card:hover { background: var(--bg4); }
.src-card.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg3)); }
.src-th { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.src-th img { width: 100%; height: 100%; object-fit: contain; display: block; }
.src-name { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; } .src-name img { width: 16px; height: 16px; flex: none; } .src-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-empty { grid-column: 1 / -1; padding: 28px 0; text-align: center; }
.share-audio { margin: 16px 0 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.share .btnrow { margin-top: 14px; }

/* ── Плашка автооновлення ── */
#upd { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: 14px; animation: pop .18s; }

/* Профіль, приватність, меню чату */
.popmenu { position: fixed; z-index: 90; min-width: 220px; background: var(--bg2); border: 1px solid var(--line, #2a313b); border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.pm-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; }
.pm-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.pm-item:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.p-row { margin-top: 8px; } .p-media { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; margin-top: 8px; }
.p-file, .p-link { text-align: left; background: color-mix(in srgb, var(--text, #fff) 6%, transparent); border: 0; color: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; display: block; }

/* Сервери: ролі, категорії, модерація */
.rolecard { background: color-mix(in srgb, var(--text, #fff) 5%, transparent); border-radius: 12px; padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.rolecard .row, .sbody .row { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.sec-title.cat { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; opacity: .75; margin-top: 8px; }
.lockic { font-size: 11px; margin-left: 4px; opacity: .8; }
.modrow { margin-top: 14px; border-top: 1px solid color-mix(in srgb, var(--text, #fff) 12%, transparent); padding-top: 4px; }
.mem-group { font-weight: 700; }

/* Медіа: хвиля голосових, кружечки, одноразове */
.vp-bar.wave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; background: none; min-width: 120px; }
.vp-bar.wave i { flex: 1; min-width: 2px; max-width: 5px; border-radius: 2px; background: color-mix(in srgb, currentColor 35%, transparent); transition: background .1s; }
.vp-bar.wave i.on { background: var(--accent); }
.rec-live { display: inline-flex; align-items: center; gap: 2px; height: 28px; margin-left: 8px; } .rec-live i { display: block; width: 3px; height: 10%; background: var(--accent); border-radius: 2px; }
.circle-wrap { position: relative; width: 220px; height: 220px; } .circle { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; background: #000; cursor: pointer; display: block; }
.circle-dur { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.once-view { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; user-select: none; -webkit-user-select: none; }
.once-view.hidden > *:not(.ov-note) { visibility: hidden; }
.once-view img { max-width: 92vw; max-height: 74vh; border-radius: 8px; } .circle-big, .circle-prev { width: min(70vw, 360px); height: min(70vw, 360px); border-radius: 50%; object-fit: cover; background: #000; }
.circle-prev { transform: scaleX(-1); border: 4px solid transparent; } .circle-prev.rec { border-color: #ff4d4d; }
.ov-note { opacity: .85; font-size: 14px; text-align: center; padding: 0 16px; }

.lang-float { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 5; } .lang-float select { width: auto; padding: 6px 10px; }

/* Мобільний рядок вводу: поле займає весь вільний простір, кнопки не розтягують рядок */
.composer .input { flex: 1 1 auto; min-width: 0; width: auto; }
@media (max-width: 899px) {
  .composer .icon-btn:not(.once-btn) { width: 36px; height: 36px; flex: none; }
  .modal { max-width: 100vw; }
  .stabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .stabs::-webkit-scrollbar { display: none; }
  .popmenu { max-width: calc(100vw - 16px); }
  .circle-wrap, .circle { width: min(62vw, 240px); height: min(62vw, 240px); }
  .rolecard .row { flex-wrap: wrap; }
  .sbody .row { flex-wrap: wrap; }
  button, .btn, .icon-btn { touch-action: manipulation; }
  input, textarea, select { font-size: 16px; } /* iOS не збільшує сторінку при фокусі */
}
@media (max-width: 899px) {
  .settings { grid-template-rows: auto 1fr; min-height: 0; gap: 12px; }
  .stabs { align-self: start; }
  .stab { white-space: nowrap; flex: none; padding: 8px 14px; }
  .modal { max-height: 92dvh; }
}

/* Сторінка запрошення */
body.invite-page { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 24px; background: var(--bg2); color: var(--text); }
.inv-card { width: min(420px, 100%); background: var(--bg2); border-radius: 22px; padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.inv-card h1 { margin: 0; font-size: 26px; word-break: break-word; } .inv-card .btn { text-decoration: none; display: inline-flex; justify-content: center; align-items: center; } .inv-card .wide { width: 100%; }

/* Пошук: результати, історія, запрошення */
.sr-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sr-hist { display: flex; align-items: center; } .sr-q { flex: 1; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; color: inherit; padding: 10px 14px; font: inherit; cursor: pointer; }
.sr-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 8px 14px; font: inherit; cursor: pointer; border-radius: 10px; }
.sr-row:hover, .sr-q:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } .sr-body { flex: 1; min-width: 0; } .sr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sr-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gav.sm { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg4); flex: none; font-weight: 700; font-size: 14px; } .gav.big { width: 72px; height: 72px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-size: 26px; font-weight: 800; }
.side-actions { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 4px; } .side-actions .btn { justify-content: flex-start; }
.inv-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; flex-wrap: wrap; } .inv-main { flex: 1 1 200px; min-width: 0; } .inv-link { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
.inv-card.in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; box-shadow: none; background: none; padding: 4px; }

/* ── Налаштування у стилі Telegram ── */
.snav { display: flex; flex-direction: column; gap: 2px; }
.s-me { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 8px; border-radius: 12px; cursor: pointer; background: var(--bg3); }
.s-me .sm-n { font-weight: 700; }
.srow { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-align: left; color: var(--text); font-weight: 600; }
.srow:hover { background: var(--bg3); } .srow.active { background: var(--bg4); }
.srow .si { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.srow .sl { flex: 1; min-width: 0; } .srow .sc { color: var(--muted); }
.s-back { display: none; margin-bottom: 10px; }
.settings { grid-template-columns: 280px minmax(0, 1fr); }
@media (max-width: 899px) {
  .settings { grid-template-columns: 1fr; }
  .settings.s-page .snav { display: none; }
  .settings:not(.s-page) .sbody { display: none; }
  .s-back { display: inline-flex; }
  .srow { padding: 12px 10px; }
}
/* нижня панель на телефоні */
.tabbar { display: none; }
@media (max-width: 899px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg2); border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .tabbar button.active { color: var(--accent); }
  body.in-chat .tabbar { display: none; }
}
@media (max-width: 899px) { body:not(.in-chat) #app .side, body:not(.in-chat) #app .rail { box-sizing: border-box; padding-bottom: calc(58px + env(safe-area-inset-bottom)); } .tabbar { z-index: 60 !important; } }
.bg-prev { height: 140px; border-radius: 14px; background: var(--bg3) center/cover; display: grid; place-items: center; color: var(--muted); margin-bottom: 10px; }

/* ── Налаштування у стилі Telegram ── */
.settings { grid-template-columns: 300px minmax(0, 1fr); }
.snav { display: flex; flex-direction: column; gap: 2px; }
.s-me { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 8px; border-radius: 12px; cursor: pointer; } .s-me:hover { background: var(--bg3); } .sm-n { font-weight: 700; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; color: var(--text); } .srow:hover { background: var(--bg3); } .srow.active { background: var(--bg4); }
.srow .si { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; } .srow .sl { flex: 1; font-weight: 600; } .srow .sc { color: var(--muted); }
.s-back { display: none; margin-bottom: 8px; }
@media (max-width: 899px) {
  .settings { display: block; min-height: 0; }
  .settings .sbody { display: none; } .settings.s-page .snav { display: none; } .settings.s-page .sbody { display: block; }
  .s-back { display: inline-flex; } .srow { padding: 12px 10px; } .srow .sc { display: block; }
}
@media (min-width: 900px) { .srow .sc { display: none; } }
@media (max-width: 899px) { body:has(.modal-back) #tabbar { display: none; } }

/* ── Редактор фото ── */
.pe { position: fixed; inset: 0; z-index: 300; background: #0b0d12; color: #fff; display: flex; flex-direction: column; }
.pe-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.pe-title { font-weight: 700; }
.pe-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px; }
.pe-canvas { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: none; border-radius: 8px; background: #000; }
.pe-tabs { display: flex; justify-content: space-around; padding: 6px; background: rgba(255,255,255,.06); }
.pe-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 10px; color: #cbd2e0; font-size: 12px; } .pe-tab.on { background: rgba(61,220,151,.2); color: #3ddc97; } .pe-ic { font-size: 20px; line-height: 1; }
.pe-ctl { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.pe-sw { display: flex; gap: 8px; flex-wrap: wrap; } .pe-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); } .pe-c.on { border-color: #fff; box-shadow: 0 0 0 2px #3ddc97; }
.pe-lab { display: flex; align-items: center; gap: 10px; font-size: 13px; } .pe-range { flex: 1; } .pe-row { display: flex; gap: 8px; }
.pe-ask, .pe-send { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #1a1f2b; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.once-cd { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; z-index: 2; }
.pe-stage { overflow: hidden; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.pe-canvas { min-height: 0; min-width: 0; }

/* ── Адмін: простори ── */
.spbar { display: flex; gap: 8px; margin-bottom: 8px; } .spbar .input { flex: 1; }
.splist { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 340px; overflow: auto; } .splist.small { max-height: 200px; }
.sprow { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 10px; background: var(--bg3); color: var(--text); } .sprow:hover { background: var(--bg4); } .sprow.off { opacity: .7; }
.sp-k { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; } .sp-n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sp-m { grid-column: 2 / 4; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

/* ── Повідомлення від ORBIT ── */
.sys-note { padding: 14px; text-align: center; color: var(--muted); background: var(--bg2); border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.ann-back { position: fixed; inset: 0; z-index: 400; background: rgba(5,8,14,.82); display: grid; place-items: center; padding: 16px; animation: annIn .25s ease; }
.ann-card { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--bg2); border-radius: 22px; padding: 30px 26px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.ann-card h2 { margin: 0; font-size: 24px; } .ann-body { white-space: pre-wrap; line-height: 1.5; color: var(--text); }
.ann-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .12em; color: var(--accent); } .ann-brand .logo { width: 26px; height: 26px; }
.ann-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); color: var(--text); }
@keyframes annIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.msgprev .bubble { background: var(--bg3); padding: 10px 14px; border-radius: 14px; margin-top: 6px; white-space: pre-wrap; }

/* ── Premium ── */
.avatar.prem { box-shadow: 0 0 0 2px #e8a317, 0 0 10px rgba(232,163,23,.55); }
.prem-star { color: #e8a317; margin-left: 4px; font-size: .9em; text-shadow: 0 0 6px rgba(232,163,23,.6); }
.prem-hero { text-align: center; padding: 18px 10px; border-radius: 18px; background: linear-gradient(135deg, rgba(232,163,23,.25), rgba(176,108,240,.2)); margin-bottom: 12px; }
.prem-big { font-size: 46px; color: #e8a317; line-height: 1; text-shadow: 0 0 18px rgba(232,163,23,.7); } .prem-hero h2 { margin: 6px 0 2px; } .prem-price { font-weight: 800; font-size: 20px; }
.prem-status { padding: 12px 14px; border-radius: 12px; background: var(--bg3); } .prem-status.on { background: rgba(61,220,151,.14); }
.prem-perks { display: flex; flex-direction: column; gap: 6px; } .prem-perk { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--bg3); } .pp-i { width: 26px; text-align: center; }

/* ═════════ Liquid Glass ═════════ (вмикається в Налаштування → Вигляд; body.fx-glass) */
body.fx-glass { --glass: rgba(20, 25, 36, .36); --glass-2: rgba(34, 41, 56, .5); --glass-edge: rgba(255,255,255,.14); --glass-hi: rgba(255,255,255,.22); --glass-shadow: 0 8px 32px rgba(0,0,0,.35); --blurpx: 0px;
  background: radial-gradient(900px 600px at 8% 0%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 60%), radial-gradient(800px 700px at 100% 100%, rgba(124,140,255,.38), transparent 60%), radial-gradient(700px 500px at 60% 40%, rgba(244,114,182,.18), transparent 60%), #070a10;  }
:root[data-theme="light"] body.fx-glass { --glass: rgba(255,255,255,.58); --glass-2: rgba(255,255,255,.68); --glass-edge: rgba(255,255,255,.9); --glass-hi: rgba(255,255,255,1); --glass-shadow: 0 8px 28px rgba(40,60,110,.18);
  background: radial-gradient(900px 600px at 8% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%), radial-gradient(800px 700px at 100% 100%, rgba(124,140,255,.35), transparent 60%), #e6ecf6;  }
:root[data-theme="midnight"] body.fx-glass { --glass: rgba(10, 12, 18, .55); --glass-2: rgba(20, 24, 34, .6); }
body.fx-blur { --blurpx: 22px; }
body.fx-glass .app { background: transparent; }
body.fx-glass .rail, body.fx-glass .side, body.fx-glass .main, body.fx-glass .members, body.fx-glass .userpanel, body.fx-glass .tabbar { background: var(--glass);  border-color: var(--glass-edge); }
body.fx-glass .userpanel { background: var(--glass-2); }
body.fx-glass .topbar, body.fx-glass .side-head { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0)); border-color: var(--glass-edge); }
body.fx-glass .composer, body.fx-glass .input, body.fx-glass select.input { background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi); }
body.fx-glass .composer .input { background: transparent; border: 0; box-shadow: none; }
body.fx-glass .modal, body.fx-glass .popmenu, body.fx-glass .ann-card, body.fx-glass .toast, body.fx-glass .pe-send, body.fx-glass .pe-ask { background: var(--glass-2); border: 1px solid var(--glass-edge);  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi); }
body.fx-glass .modal-back { background: rgba(5, 8, 14, .5); }
body.fx-glass .btn:not(.primary):not(.danger):not(.ghost), body.fx-glass .chip, body.fx-glass .icon-btn:hover, body.fx-glass .stab, body.fx-glass .srow:hover { background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi); }
body.fx-glass .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, #fff 18%), var(--accent)); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.5); }
body.fx-glass .chip.active { background: color-mix(in srgb, var(--accent) 35%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
body.fx-glass .crow:hover, body.fx-glass .mem:hover { background: rgba(255,255,255,.09); } body.fx-glass .crow.active { background: color-mix(in srgb, var(--accent) 26%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
body.fx-glass .bubble { box-shadow: 0 2px 10px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12); }
body.fx-glass .srow, body.fx-glass .sprow, body.fx-glass .prem-perk, body.fx-glass .prem-status, body.fx-glass .s-me { border-radius: 14px; }
body.fx-glass .srow .si { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 10px rgba(0,0,0,.25); border-radius: 10px; }
body.fx-glass .rail-btn, body.fx-glass .avatar { box-shadow: 0 2px 8px rgba(0,0,0,.28); }
body.fx-glass .modal, body.fx-glass .ann-card { border-radius: 26px; } body.fx-glass .popmenu { border-radius: 16px; }
body.fx-glass .modal, body.fx-glass .ann-card, body.fx-glass .popmenu { animation: glassIn .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes glassIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) { body.fx-blur { --blurpx: 14px; } }
@media (prefers-reduced-motion: reduce) { body.fx-glass .modal, body.fx-glass .ann-card, body.fx-glass .popmenu { animation: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { body.fx-glass { --glass: rgba(24,29,40,.9); --glass-2: rgba(34,41,56,.92); } :root[data-theme="light"] body.fx-glass { --glass: rgba(255,255,255,.92); --glass-2: rgba(255,255,255,.96); } }
/* перемикачі-скло */
body.fx-glass input[type=checkbox] { accent-color: var(--accent); }

/* ═════════ Liquid Glass кнопки (body.fx-bubble) ═════════ */
body.fx-bubble .btn, body.fx-bubble .chip, body.fx-bubble .rail-btn, body.fx-bubble .icon-btn, body.fx-bubble .pe-tab, body.fx-bubble .pe-opt, body.fx-bubble .cam-btn { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(140px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.34), rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.18); border-top-color: rgba(255,255,255,.42); border-bottom-color: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(255,255,255,.08), inset 0 0 14px rgba(255,255,255,.06), 0 8px 24px rgba(0,0,0,.22); transition: transform .45s var(--spring, cubic-bezier(.34,1.56,.64,1)), box-shadow .3s, background-color .3s; }
body.fx-bubble .btn:not(.icon-btn), body.fx-bubble .chip { border-radius: 999px; }
body.fx-bubble .btn.primary { background: radial-gradient(160px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.5), rgba(255,255,255,0) 60%), linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, white 6%), color-mix(in srgb, var(--accent) 55%, transparent)); }
body.fx-bubble .btn:hover, body.fx-bubble .chip:hover, body.fx-bubble .rail-btn:hover, body.fx-bubble .icon-btn:hover { transform: translateY(-1px) scale(1.03); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 18px rgba(255,255,255,.1), 0 12px 30px rgba(0,0,0,.26); }
body.fx-bubble .jelly { animation: jelly .6s cubic-bezier(.36,.07,.19,.97); }
@keyframes jelly { 0% { transform: scale(1,1); } 22% { transform: scale(.93,.9); } 48% { transform: scale(1.06,1.05); } 70% { transform: scale(.98,1.01); } 100% { transform: scale(1,1); } }
body.fx-bubble .tabbar button.active { background: none; }
.tab-ind { display: none; }
body.fx-bubble .tab-ind { display: block; position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; opacity: 0; border-radius: 999px; z-index: 0; pointer-events: none; background: radial-gradient(90px circle at 50% 0%, rgba(255,255,255,.4), rgba(255,255,255,0) 70%), color-mix(in srgb, var(--accent) 26%, rgba(255,255,255,.08)); border: 1px solid rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 16px rgba(0,0,0,.22); transition: transform .55s var(--spring, cubic-bezier(.34,1.56,.64,1)), width .55s var(--spring, cubic-bezier(.34,1.56,.64,1)), opacity .2s; }
body.fx-bubble .tabbar button { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { body.fx-bubble .jelly { animation: none; } body.fx-bubble .btn, body.fx-bubble .chip, body.fx-bubble .tab-ind { transition: none; } }
@media (max-width: 899px) { body.fx-glass { --glass: rgba(16, 21, 31, .86); --glass-2: rgba(30, 37, 52, .82); } :root[data-theme="light"] body.fx-glass { --glass: rgba(255,255,255,.88); --glass-2: rgba(255,255,255,.86); } }

/* ── Кружечки без рамки, значок «1», камера ── */
.bubble.circle-only { background: transparent !important; box-shadow: none !important; padding: 0; border: 0; } .bubble.circle-only::before, .bubble.circle-only::after { display: none !important; }
.bubble.circle-only .circle-wrap { margin: 0; } .bubble.circle-only .circle { box-shadow: 0 4px 18px rgba(0,0,0,.35); animation: circIn .3s cubic-bezier(.2,.9,.3,1.2); }
.bubble.circle-only .bfoot.over { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; border-radius: 10px; padding: 1px 7px; }
@keyframes circIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.circle-prev { object-fit: cover; }
.cam-rec { gap: 12px; } .cam-stage { position: relative; width: min(94vw, 760px); height: min(66vh, 560px); display: grid; place-items: center; background: #000; border-radius: 18px; overflow: hidden; } .cam-live { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.cam-ctl { display: flex; align-items: center; justify-content: center; gap: 26px; } .cam-btn { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; display: grid; place-items: center; } .cam-btn.big { width: 68px; height: 68px; } .cam-btn.send { background: var(--accent); color: var(--on-accent); }
.cam-shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.4); box-shadow: 0 0 0 3px #fff inset; transition: transform .12s; } .cam-shutter:active { transform: scale(.9); } .cam-shutter.vid { background: #ff4d4d; box-shadow: none; } .cam-shutter.on { border-radius: 18px; transform: scale(.8); }
.cam-modes { justify-content: center; }

/* ── RTL (арабська) ── */
[dir="rtl"] .srow, [dir="rtl"] .sprow, [dir="rtl"] .s-me { text-align: start; } [dir="rtl"] .srow .sc svg { transform: scaleX(-1); }
[dir="rtl"] .s-back { direction: rtl; } [dir="rtl"] .composer, [dir="rtl"] .bubble { text-align: start; }
[dir="rtl"] .prem-star { margin-left: 0; margin-right: 4px; } [dir="rtl"] .once-card { padding-left: 16px; padding-right: 46px; } [dir="rtl"] .once-one { left: auto; right: 10px; }
[dir="rtl"] .side, [dir="rtl"] .members { border-left: 1px solid var(--line); border-right: 0; } [dir="rtl"] .circle-prev { direction: ltr; }

/* ═════════ Рух у стилі Apple: spring, плавні переходи ═════════ */
:root { --spring: cubic-bezier(.34, 1.45, .64, 1); --ease-out: cubic-bezier(.22, 1, .36, 1); }
.modal-back { animation: fade .22s var(--ease-out); } .modal-back.closing { animation: fadeOut .15s ease forwards; pointer-events: none; }
.modal { animation: springIn .42s var(--spring); } .modal-back.closing .modal { animation: popOut .15s ease forwards; }
@keyframes springIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: scale(.96) translateY(6px); } } @keyframes fadeOut { to { opacity: 0; } }
.popmenu { transform-origin: top left; animation: menuIn .28s var(--spring); } @keyframes menuIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.toast { animation: toastIn .4s var(--spring); } @keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.bubble.pop-in { animation: bubbleIn .38s var(--spring); transform-origin: bottom; } @keyframes bubbleIn { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
.sbody.slide-in { animation: slideIn .34s var(--ease-out); } @keyframes slideIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .sbody.slide-in { animation-name: slideInRtl; } @keyframes slideInRtl { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.btn, .icon-btn, .chip, .rail-btn, .srow, .crow, .tabbar button, .cam-btn, .pe-tab { transition: transform .22s var(--spring), background-color .18s, filter .15s, box-shadow .2s; }
.btn:active, .icon-btn:active, .chip:active, .rail-btn:active, .srow:active, .tabbar button:active, .cam-btn:active, .pe-tab:active { transform: scale(.94); }
.crow:active { transform: scale(.985); }
.once-view, .ann-back { animation: fade .25s var(--ease-out); } .once-view img, .once-view .circle-big { animation: springIn .45s var(--spring); }
.rail-btn.active, .crow.active { transition: background-color .25s, border-radius .25s var(--spring), transform .22s var(--spring); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ═════════ Етап 1: свайпи, закріплення, архів, папки ═════════ */
.swipe { position: relative; overflow: hidden; border-radius: 14px; }
.swipe .crow { position: relative; z-index: 1; background: var(--bg2, #121722); touch-action: pan-y; }
.sw-acts { position: absolute; top: 0; bottom: 0; display: flex; z-index: 0; }
.sw-acts.l { right: 0; } .sw-acts.r { left: 0; }
.sw-btn { width: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #fff; background: #3a4358; }
.sw-btn.sw-pin { background: #e0a030; } .sw-btn.sw-archive { background: #5a7a9a; } .sw-btn.sw-mute { background: #6b6f86; } .sw-btn.sw-unread { background: #2f8fd0; } .sw-btn.sw-delete { background: #d04a4a; }
.cr-ic { color: var(--muted); display: inline-flex; margin-left: 4px; }
.badge.dot { width: 10px; height: 10px; min-width: 10px; padding: 0; border-radius: 50%; }
.chip2.plus { padding: 4px 8px; }
#chatchips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } #chatchips::-webkit-scrollbar { display: none; } #chatchips .chip2 { flex: none; }
.fold-row { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); } .fold-n { flex: 1; }
.fold-chats { max-height: 280px; overflow: auto; display: grid; gap: 6px; margin: 8px 0 12px; }
.row-btns.col { display: grid; gap: 8px; margin-top: 12px; }
.pm-item.danger { color: #ff6b6b; }
.popmenu .pm-item { display: flex; align-items: center; gap: 8px; }

/* ═════════ Етап 2: форматування, геолокація, контакти ═════════ */
.text blockquote, .bubble blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.05); border-radius: 0 8px 8px 0; }
.text u, .bubble u { text-decoration: underline; text-underline-offset: 2px; }
.geo-card, .contact-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.07); color: inherit; text-decoration: none; text-align: left; min-width: 220px; }
.geo-ic { color: var(--accent); display: inline-flex; }
.fmt-btn { font-weight: 700; font-size: 15px; }
.mt-ttl { display: inline-flex; opacity: .7; margin-right: 3px; }
.chips2 { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* ═════════ Етап 3: друзі та профілі ═════════ */
.fr-add { display: flex; gap: 8px; margin-bottom: 8px; } .fr-add .input { flex: 1; }
.fr-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.fr-who { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; background: none; color: inherit; }
.fr-body { max-height: 50vh; overflow: auto; margin-top: 8px; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.badge-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.badge-chip.b-premium { background: linear-gradient(135deg, #f7c948, #e08a2b); color: #1a1205; border: none; }
.badge-chip.b-founder { color: #7cc4ff; } .badge-chip.b-early { color: #c9a0ff; } .badge-chip.b-veteran { color: #8fe3a6; }

/* ═════════ Етап 4: акаунт ═════════ */
.del-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 76px; z-index: 900; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: #7a2a2a; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 92vw; }
.warn-list { padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.own-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.hint.err { color: #ff7b7b; }

/* ═════════ Опитування ═════════ */
.poll-card { display: grid; gap: 6px; min-width: 240px; max-width: 360px; }
.poll-q { font-weight: 600; }
.poll-opt { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.06); color: inherit; overflow: hidden; text-align: left; border: 1px solid transparent; }
.poll-opt.mine { border-color: var(--accent); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 28%, transparent); transition: width .5s var(--spring, ease); z-index: 0; }
.poll-l, .poll-n { position: relative; z-index: 1; } .poll-n { opacity: .75; font-size: 12px; white-space: nowrap; }
.poll-inputs { display: grid; gap: 6px; margin: 8px 0; }

/* ═════════ Гілки обговорень ═════════ */
.thread-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--accent); font-size: 12px; }
.thread-box { display: grid; gap: 8px; } .thread-list { max-height: 50vh; overflow: auto; display: grid; gap: 10px; padding: 4px; }
.thread-row { display: flex; gap: 10px; } .tr-main { flex: 1; min-width: 0; } .tr-h small { opacity: .6; }
.thread-parent { padding-bottom: 8px; border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); }
.thread-box .btnrow { display: flex; gap: 8px; align-items: flex-end; } .thread-box textarea { flex: 1; resize: none; }

/* ═════════ Події ═════════ */
.ev-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; margin: 4px 0; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--muted); text-align: left; }
.ev-btn:hover { color: inherit; background: rgba(255,255,255,.09); }
.ev-list { display: grid; gap: 10px; } .ev-card { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); display: grid; gap: 6px; } .ev-card.off { opacity: .55; } .ev-h { display: flex; gap: 8px; align-items: center; }

/* Центр сповіщень */
.notif-btn { position: relative; }
.nbadge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger, #ff4d6d); color: #fff; font: 700 10px/16px system-ui; font-style: normal; text-align: center; display: none; }
.notif-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; background: transparent; border: 0; color: inherit; cursor: pointer; }
.notif-row:hover { background: rgba(255,255,255,.06); }
.notif-row.unread { box-shadow: inset 3px 0 0 var(--accent, #7c5cff); background: rgba(124,92,255,.08); }
.notif-t { font-size: 14px; word-break: break-word; }

/* Форум */
.forum { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.forum-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.forum-list { display: flex; flex-direction: column; gap: 8px; }
.fp-card { display: flex; align-items: center; gap: 6px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); padding-right: 8px; }
.fp-card:hover { background: rgba(255,255,255,.07); }
.fp-card.closed { opacity: .65; }
.fp-main { flex: 1; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; padding: 12px 14px; min-width: 0; }
.fp-title { font-weight: 650; font-size: 15px; word-break: break-word; }
.fp-prev { font-size: 13px; opacity: .75; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

/* Прев'ю посилань */
.lp-card { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 10px; border-left: 3px solid var(--accent, #7c5cff); background: rgba(255,255,255,.06); color: inherit; text-decoration: none; max-width: 340px; }
.lp-card:hover { background: rgba(255,255,255,.1); }
.lp-site { font-size: 11px; opacity: .6; text-transform: uppercase; letter-spacing: .04em; }
.lp-title { font-weight: 650; font-size: 14px; margin-top: 2px; word-break: break-word; }
.lp-descr { font-size: 12.5px; opacity: .75; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Історії */
.storybar { display: flex; gap: 10px; padding: 8px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.storybar::-webkit-scrollbar { display: none; }
.st-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: inherit; cursor: pointer; width: 58px; flex: none; }
.st-ring { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; padding: 2px; }
.st-ring.new { background: linear-gradient(135deg, #3ee6a0, #7c5cff, #ff5ca8); }
.st-ring.seen { background: rgba(255,255,255,.22); }
.st-ring.none { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.st-ring > .av, .st-ring > img, .st-ring > div { border: 2px solid #0b0f14; border-radius: 50%; }
.st-plus { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent, #3ee6a0); color: #04110b; font: 700 14px/18px system-ui; font-style: normal; text-align: center; }
.st-add { font-size: 26px; color: rgba(255,255,255,.7); }
.st-name { font-size: 11px; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.sbg0 { background: linear-gradient(135deg, #3ee6a0, #0b7a8f); } .sbg1 { background: linear-gradient(135deg, #7c5cff, #3a1f9e); } .sbg2 { background: linear-gradient(135deg, #ff5ca8, #8f1f5a); } .sbg3 { background: linear-gradient(135deg, #ffb347, #c2410c); }
.sbg4 { background: linear-gradient(135deg, #4facfe, #1d3fa8); } .sbg5 { background: linear-gradient(135deg, #43e97b, #1f7a3a); } .sbg6 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); color: #1a1030; } .sbg7 { background: linear-gradient(135deg, #232526, #414345); }
.st-prev { position: relative; height: 220px; border-radius: 14px; display: grid; place-items: center; margin: 10px 0; overflow: hidden; }
.st-prev.photo { background: rgba(255,255,255,.05); } .st-prev img { max-width: 100%; max-height: 100%; }
.st-change { position: absolute; right: 8px; bottom: 8px; }
.st-sw { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; } .st-sw-i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); cursor: pointer; }
.story-view { position: fixed; inset: 0; z-index: 9000; background: #000; display: flex; flex-direction: column; align-items: center; }
.sv-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; } .sv-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; } .sv-bar i { display: block; height: 100%; background: #fff; }
.sv-head { position: absolute; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; z-index: 4; color: #fff; } .sv-who { display: flex; flex-direction: column; font-size: 14px; line-height: 1.2; } .sv-who span { font-size: 11px; opacity: .7; } .grow { flex: 1; }
.sv-body { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; } .sv-body.photo { background: #000; } .sv-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-text { max-width: 560px; padding: 24px; font-size: clamp(22px, 5vw, 34px); font-weight: 650; text-align: center; word-break: break-word; white-space: pre-wrap; }
.sv-cap { position: absolute; bottom: 70px; left: 0; right: 0; text-align: center; padding: 10px 20px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.sv-foot { position: absolute; bottom: 16px; left: 16px; z-index: 4; }
.sv-prev, .sv-next { position: absolute; top: 70px; bottom: 60px; width: 35%; z-index: 2; } .sv-prev { left: 0; } .sv-next { right: 0; width: 65%; }

/* 2FA */
.totp-key { font: 600 18px/1.4 ui-monospace, monospace; letter-spacing: .08em; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.07); text-align: center; word-break: break-all; margin: 8px 0; user-select: all; }
.totp-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; } .totp-codes code { padding: 8px; border-radius: 8px; background: rgba(255,255,255,.07); text-align: center; font-size: 15px; user-select: all; }

/* Перетягування закріплених, свої свайпи */
.pin-drag { cursor: grab; } .pin-drag.dragging { opacity: .45; } .pin-drag.pin-over { box-shadow: 0 -2px 0 0 var(--accent, #3ee6a0); }
.sw-cfg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; }

/* Камера на весь екран */
.cam-rec.cam-full { padding: 0; gap: 0; justify-content: flex-start; background: #000; }
.cam-full .cam-stage { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; touch-action: none; }
.cam-full .cam-live { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; transform-origin: center; }
.cam-full .cam-live.cam-rev { object-fit: contain; background: #000; }
.cam-full .rec-time { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 3; background: rgba(0,0,0,.45); padding: 4px 12px; border-radius: 99px; }
.cam-full .cam-modes { position: absolute; left: 0; right: 0; bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 3; }
.cam-full .cam-ctl { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 3; }
.cam-zoom { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(168px + env(safe-area-inset-bottom)); min-width: 52px; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.5); color: #fff; font-weight: 700; font-size: 14px; }
.cam-zoom[hidden] { display: none; }

.no-prem .prem-star { display: none; } .no-prem .avatar.prem { box-shadow: none; }

#appupd { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 400; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: min(560px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 14px; background: var(--bg2, #1a1f27); border: 1px solid var(--accent, #3ee6a0); box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 14px; }

/* Розмиття за склом — лише коли користувач сам його ввімкнув (Налаштування → Вигляд → Ефекти) */
body.fx-blur .rail, body.fx-blur .side, body.fx-blur .main, body.fx-blur .members, body.fx-blur .userpanel, body.fx-blur .tabbar { -webkit-backdrop-filter: blur(var(--blurpx)); backdrop-filter: blur(var(--blurpx)); }
body.fx-blur .modal, body.fx-blur .popmenu, body.fx-blur .ann-card, body.fx-blur .toast { -webkit-backdrop-filter: blur(calc(var(--blurpx) * 1.4)); backdrop-filter: blur(calc(var(--blurpx) * 1.4)); }
/* Без розмиття: трохи щільніше скло, щоб текст лишався читабельним */
body.fx-glass:not(.fx-blur) { --glass: rgba(20, 25, 36, .62); --glass-2: rgba(30, 37, 52, .85); }
:root[data-theme="light"] body.fx-glass:not(.fx-blur) { --glass: rgba(255,255,255,.78); --glass-2: rgba(255,255,255,.9); }
:root[data-theme="midnight"] body.fx-glass:not(.fx-blur) { --glass: rgba(10, 12, 18, .75); --glass-2: rgba(20, 24, 34, .85); }

/* Економний режим (body.lite): мінімум роботи для відеокарти й процесора */
body.lite, body.lite.fx-glass, :root[data-theme="light"] body.lite.fx-glass { background: var(--bg0); }
:root[data-theme="light"] body.lite, :root[data-theme="light"] body.lite.fx-glass { background: var(--bg0); }
body.lite *, body.lite *::before, body.lite *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; scroll-behavior: auto !important; }
body.lite.fx-glass:not(.fx-blur) { --glass: rgba(24, 29, 40, .96); --glass-2: rgba(32, 39, 54, .98); }
:root[data-theme="light"] body.lite.fx-glass { --glass: rgba(255,255,255,.96); --glass-2: rgba(255,255,255,.98); }

:root[data-theme="black"] body.fx-glass, :root[data-theme="black"] body.fx-glass:not(.fx-blur) { --glass: #000; --glass-2: #0d0d0f; --glass-edge: #1b1b1f; }
body.lite, :root[data-theme="black"] body { background: var(--bg0); }
/* Власна верхня смужка у Windows-програмі: чорне продовження вікна, як у Discord */
#dtb { position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--bg0); color: var(--text); font-size: 12px; font-weight: 600; -webkit-app-region: drag; user-select: none; }
#dtb img { width: 16px; height: 16px; border-radius: 50%; }
body.desk-tb { padding-top: 32px; background: var(--bg0); }
body.desk-tb .app { height: 100%; }

/* Розміри іконок і свої кольори */
.rail-btn { zoom: var(--rail-zoom, 1); } .rail-sep { zoom: var(--rail-zoom, 1); } .crow { zoom: var(--crow-zoom, 1); }
@media (min-width: 900px) { .app { grid-template-columns: calc(72px * var(--rail-zoom, 1)) 316px minmax(0, 1fr) 240px; } .app.no-members { grid-template-columns: calc(72px * var(--rail-zoom, 1)) 316px minmax(0, 1fr) 0; } }
.paint-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; flex-wrap: wrap; } .paint-l { font-size: 14px; }
.paint-c { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .paint-c input[type=color] { width: 34px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.paint-prev { display: inline-flex; align-items: center; justify-content: center; width: 110px; height: 26px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.oe { width: 1.3em; height: 1.3em; vertical-align: -0.3em; display: inline-block; margin: 0 .05em; user-select: none; -webkit-user-drag: none; }
.emo .oe { width: 26px; height: 26px; vertical-align: middle; margin: 0; }
.emoji-grid.stk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; }
.stk-b { padding: 2px; border-radius: 12px; } .stk-b:hover { background: var(--bg4); } .stk-b img { width: 100%; display: block; }
img.sticker { width: 150px; height: 150px; display: block; } .bubble.sticker-b { padding: 0; }

/* ── Стриманий вигляд: менше заокруглень, без «іграшкових» градієнтів і яскравих плиток ── */
:root { --radius: 8px; }
.rail-btn { border-radius: 14px; } .rail-btn:hover, .rail-btn.active { border-radius: 10px; }
.bubble { border-radius: 12px; } .crow { border-radius: 10px; }
.modal, body.fx-glass .modal, body.fx-glass .ann-card { border-radius: 14px; } .popmenu, body.fx-glass .popmenu { border-radius: 10px; }
.btn, body.fx-bubble .btn:not(.icon-btn) { border-radius: 8px; } .chip, body.fx-bubble .chip { border-radius: 8px; }
.srow .si, body.fx-glass .srow .si { background: var(--bg4) !important; color: var(--text) !important; box-shadow: none; border-radius: 8px; }
body.fx-glass .btn.primary { background: var(--accent); box-shadow: none; } body.fx-glass .btn:not(.primary):not(.danger):not(.ghost) { box-shadow: none; }
body.fx-glass .rail-btn, body.fx-glass .avatar { box-shadow: none; } body.fx-glass .bubble { box-shadow: none; }
body.fx-glass .topbar, body.fx-glass .side-head { background: transparent; }
.gav.big, .gav { border-radius: 14px; }

.mascot { width: 150px; height: 150px; display: block; margin: 0 0 6px 8px; } @media (max-width: 800px) { .mascot { width: 96px; height: 96px; } }
img.sticker { height: auto; max-height: 170px; }

/* Сервер: аватар, банер, огляд */
.rail-btn .srv-ico { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.side-head.has-banner { background-size: cover; background-position: center; height: 84px; align-items: flex-end; padding-bottom: 10px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.ov-hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; background: var(--bg3) center / cover; margin-bottom: 12px; } .ov-hero.has-banner { min-height: 110px; color: #fff; }
.ov-ico { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; } .ov-ico.ph { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 22px; }
.ov-name { font-size: 20px; font-weight: 800; } .ov-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; } .ov-stat { background: var(--bg3); border-radius: 12px; padding: 10px; text-align: center; } .ov-stat b { display: block; font-size: 20px; } .ov-stat span { font-size: 12px; color: var(--muted); }
.bn-prev { height: 96px; border-radius: 12px; background: center / cover; margin-bottom: 8px; }
@media (max-width: 560px) { .ov-stats { grid-template-columns: repeat(2, 1fr); } }
.permgrp{margin:8px 0}.permgrp h4{margin:8px 0 4px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#8b93a1)}
.permrow{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:5px 8px;border-radius:8px;border:1px solid transparent}
.permrow>span{flex:1;min-width:0}.permrow .perm-sel{width:150px;flex:none;padding:5px 8px}
.permrow.on{border-color:rgba(111,240,184,.35)}.permrow.off{border-color:rgba(255,107,139,.45)}
@media(max-width:560px){.permrow{flex-wrap:wrap}.permrow .perm-sel{width:100%}}
.chrow{flex-wrap:wrap;gap:6px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06)}.chrow>span{flex:1 1 100%!important}.chrow select.input{width:auto;max-width:150px;padding:5px 8px}.chrow .btn.sm{padding:4px 8px}
body.desk-fs #dtb{display:none}body.desk-fs.desk-tb{padding-top:0}
#dtb{padding-right:150px}

/* Жовта смужка «немає зв'язку» ховається повністю (раніше її край міг просвічувати вгорі вікна) */
.connbar:not(.show){visibility:hidden;transform:translateY(-130%);transition:transform .2s,visibility 0s .2s}

/* Верхня панель Desktop: назва по центру вікна */
#dtb { justify-content: center; }
#dtb .dtb-t { position: absolute; left: 50%; top: 0; height: 32px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 340px); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
#dtb .dtb-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dtb .dtb-ico { width: 18px; height: 18px; border-radius: 6px; object-fit: cover; flex: none; }
#dtb .dtb-ico.ini { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-size: 9px; font-weight: 800; }
/* Компактні «Архів» і «Збережене» */
.head-acts { display: flex; align-items: center; gap: 2px; }
.arch-row.compact { padding: 5px 10px; gap: 10px; min-height: 0; height: 40px; border-radius: 10px; width: 100%; text-align: left; }
.arch-row.compact .gav { width: 26px; height: 26px; flex: none; }
.arch-row.compact .cr-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.arch-row.compact .tag { margin-left: auto; font-size: 11px; opacity: .75; }
.arch-pull { height: 0; overflow: hidden; opacity: 0; will-change: height; }
.arch-pull .swipe { height: 48px; display: flex; align-items: center; }
.side-list { overscroll-behavior-y: contain; }

/* ───────── ORBIT PULSE ───────── */
.pulse-pill { display: flex; align-items: center; gap: 6px; width: calc(100% - 16px); margin: 6px 8px 0; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: rgba(255,255,255,.04); color: var(--muted, #98a2b3); font-size: 12.5px; cursor: pointer; text-align: left; transition: background .2s, border-color .2s, transform .15s; }
.pulse-pill:hover { background: rgba(255,255,255,.08); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pulse-pill:active { transform: scale(.98); }
.pulse-pill.on { color: var(--text, #e8ecf2); border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 14%, transparent); }
.pulse-pill .pp-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-pill small { opacity: .65; font-size: 11px; white-space: nowrap; }
.pulse-ic { font-size: 15px; line-height: 1; }
.pulsebar { display: flex; align-items: center; gap: 6px; padding: 4px 12px 6px; overflow-x: auto; scrollbar-width: none; }
.pulsebar::-webkit-scrollbar { display: none; }
.pb-l { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--accent); opacity: .85; flex: none; }
.pb-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 9px 3px 3px; border-radius: 999px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: rgba(255,255,255,.05); color: var(--text, #e8ecf2); cursor: pointer; font-size: 12px; animation: pbin .35s ease both; transition: background .2s, transform .15s; }
.pb-chip:hover { background: rgba(255,255,255,.1); }
.pb-chip:active { transform: scale(.96); }
.pb-chip .avw { transform: scale(.9); }
.pb-e { font-size: 14px; line-height: 1; }
@keyframes pbin { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }
.pulse-badge { font-size: 12px; margin-left: 4px; opacity: .95; }
.pulse-prow { display: flex; align-items: center; gap: 8px; }
.pulse-form .fld { display: block; margin: 12px 0 4px; font-size: 12px; color: var(--muted, #98a2b3); }
.pk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.pk { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: rgba(255,255,255,.04); color: var(--text, #e8ecf2); cursor: pointer; font-size: 13px; text-align: left; transition: background .2s, border-color .2s; }
.pk:hover { background: rgba(255,255,255,.08); }
.pk.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pk-e { font-size: 18px; }
.pk-emorow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pk-emoin { width: 64px; text-align: center; }
.pk-emo { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.pk-eb { width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: rgba(255,255,255,.05); cursor: pointer; font-size: 16px; }
.pk-eb:hover { background: rgba(255,255,255,.12); }
.pk-eb.active { border-color: var(--accent); }

/* ───────── ORBIT DROP ───────── */
.dropbar { padding: 2px 12px 6px; }
.db-l { display: flex; align-items: center; gap: 5px; font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--accent); opacity: .9; margin: 2px 0 4px; }
.db-n { opacity: .7; font-weight: 600; }
.db-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.db-row::-webkit-scrollbar { display: none; }
.drop-card { flex: none; width: 214px; padding: 10px 12px 12px; border-radius: 14px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); box-shadow: 0 6px 22px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 7px; animation: pbin .4s ease both; transition: border-color .25s, box-shadow .25s, transform .2s; }
.drop-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 8px 26px rgba(0,0,0,.22), 0 0 18px color-mix(in srgb, var(--accent) 12%, transparent); transform: translateY(-1px); }
.dc-top { display: flex; align-items: center; gap: 7px; }
.dc-ic { color: var(--accent); display: inline-flex; }
.dc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.drop-timer { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted, #98a2b3); letter-spacing: .02em; transition: color .3s; }
.drop-timer.low { color: #ffb454; }
.dc-mid { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted, #98a2b3); }
.dc-av { display: inline-flex; }
.dc-av > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--glass-2, #1a2030); border-radius: 50%; }
.dc-av > *:first-child { margin-left: 0; }
.dc-n { font-weight: 600; color: var(--text, #e8ecf2); }
.dc-tag { margin-left: auto; opacity: .85; white-space: nowrap; }
.dc-d { font-size: 12px; color: var(--muted, #98a2b3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-card .btn { align-self: stretch; }
.gav.drop { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #0b1020), #101826); color: #fff; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 25%, transparent); }
.cr-bot .drop-timer { margin-left: auto; padding-left: 6px; }
.match-card { margin: 2px 0 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(255,255,255,.02)); animation: pbin .4s ease both; }
.mc-t { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text, #e8ecf2); }
.mc-t svg { color: var(--accent); }
.mc-s { font-size: 12px; color: var(--muted, #98a2b3); margin: 3px 0 8px; }
.drop-form .fld { display: block; margin: 12px 0 4px; font-size: 12px; color: var(--muted, #98a2b3); }
.drop-form .input { margin-top: 6px; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-edge, rgba(255,255,255,.08)); }
.seg-b { flex: 1; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--muted, #98a2b3); cursor: pointer; font-size: 13px; transition: background .2s, color .2s; }
.seg-b.active { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text, #e8ecf2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.dc-fr { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-f { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: rgba(255,255,255,.04); color: var(--text, #e8ecf2); cursor: pointer; font-size: 12.5px; transition: background .2s, border-color .2s; }
.dc-f.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* ───────── ORBIT MEMORY ───────── */
.mem-wrap { min-width: 0; }
.mem-tabs { margin-bottom: 10px; }
.mem-body-wrap { display: flex; flex-direction: column; gap: 10px; }
.mem-quote { padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 8px; background: rgba(255,255,255,.04); font-size: 13px; color: var(--muted, #98a2b3); max-height: 110px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.mem-card { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--glass-edge, rgba(255,255,255,.1)); background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); display: flex; flex-direction: column; gap: 6px; animation: pbin .3s ease both; }
.mc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted, #98a2b3); }
.mem-cat { color: var(--text, #e8ecf2); font-weight: 600; }
.mem-ch { opacity: .85; }
.mem-dt { margin-left: auto; }
.mem-title { font-size: 14.5px; }
.mem-body { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.mem-meta { font-size: 11.5px; color: var(--muted, #98a2b3); }
.dg-head { padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(255,255,255,.02)); }
.dg-t { letter-spacing: .16em; font-weight: 800; font-size: 12px; color: var(--accent); margin-bottom: 2px; }
.dg-sec { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dg-sec h4 { margin: 8px 0 2px; font-size: 12.5px; letter-spacing: .04em; }
.dg-row { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-edge, rgba(255,255,255,.08)); background: rgba(255,255,255,.04); color: var(--text, #e8ecf2); cursor: pointer; font-size: 13px; transition: background .2s; }
.dg-row:hover { background: rgba(255,255,255,.08); }
.dg-row.link { cursor: default; }
.dg-row small { color: var(--muted, #98a2b3); font-size: 11.5px; }
.dg-row a { color: var(--accent); word-break: break-all; }
.missedbar { display: none; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 10px 0; padding: 8px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(255,255,255,.02)); animation: pbin .35s ease both; }
.mb-t { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.mb-t svg { color: var(--accent); }
.mb-a { display: inline-flex; align-items: center; gap: 6px; }

/* ===== Програвачі: швидкість, голосові v2, кружечки, відео ===== */
.sp-chip { font: 600 11px/1 inherit; font-family: inherit; padding: 4px 7px; border-radius: 10px; background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--muted); min-width: 30px; cursor: pointer; transition: background .15s, color .15s, transform .12s; }
.sp-chip:active { transform: scale(.92); } .sp-chip.on { background: var(--accent); color: var(--on-accent); }
.sp-menu { position: fixed; z-index: 9999; display: flex; flex-wrap: wrap; gap: 3px; width: 148px; padding: 6px; border-radius: 14px; background: color-mix(in srgb, var(--bg3) 92%, transparent); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.4); backdrop-filter: blur(14px); animation: spIn .16s var(--ease-out, ease-out); }
.sp-it { flex: 0 0 calc(25% - 3px); padding: 7px 0; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--text); text-align: center; cursor: pointer; }
.sp-it:hover { background: color-mix(in srgb, var(--text) 12%, transparent); } .sp-it.active { background: var(--accent); color: var(--on-accent); }
@keyframes spIn { from { opacity: 0; transform: translateY(4px) scale(.94); } to { opacity: 1; transform: none; } }
.bubble > .vp2 { flex: 0 0 100%; min-width: 0; }
.vp2 { display: flex; align-items: center; gap: 10px; padding: 2px 0; min-width: 230px; max-width: 320px; }
.vp2-btn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; transition: transform .12s, box-shadow .25s; }
.vp2-btn:active { transform: scale(.92); } .vp2.playing .vp2-btn { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent); }
.vp2-ring { position: absolute; inset: -3px; pointer-events: none; } .vp2-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vp2-ring circle { fill: none; stroke-width: 2; } .vp2-ring .rb { stroke: transparent; } .vp2-ring .rf { stroke: var(--on-accent); opacity: .55; stroke-linecap: round; }
.vp2-ic { display: inline-flex; }
.vp2-mid { flex: 1; min-width: 0; }
.vp2-wave { position: relative; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; touch-action: none; }
.vp2-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, currentColor 30%, transparent); transition: background .12s, transform .2s; }
.vp2-wave i.on { background: var(--accent); } .vp2.playing .vp2-wave i.head { transform: scaleY(1.25); }
.vp2-thumb { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); pointer-events: none; }
.vp2-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.vp2-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* кружечок */
.cw2 { transition: width .3s var(--spring, cubic-bezier(.2,.9,.3,1.2)), height .3s var(--spring, cubic-bezier(.2,.9,.3,1.2)); }
.cw2 .circle { position: relative; z-index: 1; width: 100%; height: 100%; transition: box-shadow .2s; }
.cw-ring { position: absolute; inset: -3px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; } .cw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cw-ring circle { fill: none; stroke-width: 2.5; } .cw-ring .rb { stroke: rgba(255,255,255,.18); } .cw-ring .rf { stroke: var(--accent); stroke-linecap: round; }
.cw2.big .cw-ring { opacity: 1; } .cw2.big .circle-dur { display: none; }
.cw2.big { width: min(78vw, 320px); height: min(78vw, 320px); margin-bottom: 52px; }
.cw-ctl { position: absolute; left: 50%; bottom: -46px; transform: translate(-50%, 6px); display: none; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 22px; background: color-mix(in srgb, var(--bg3) 90%, transparent); border: 1px solid var(--line); backdrop-filter: blur(12px); width: max-content; max-width: 96vw; z-index: 3; }
.cw2.big .cw-ctl { display: flex; animation: spIn .2s var(--ease-out, ease-out); }
.cw-pp, .cw-x { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); flex: none; }
.cw-bar { position: relative; width: 90px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 22%, transparent); cursor: pointer; touch-action: none; }
.cw-bar::before { content: ""; position: absolute; inset: -10px 0; } .cw-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); }
.cw-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bubble.circle-only .cw2.big .circle { animation: none; }
/* відео */
.vid-wrap { position: relative; max-width: min(100%, 360px); border-radius: 12px; overflow: hidden; background: #000; }
.vid-wrap video.vid { display: block; width: 100%; max-height: 360px; background: #000; }
.vid-big { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .2s, transform .2s; }
.vid-wrap.playing .vid-big { opacity: 0; pointer-events: none; transform: scale(.8); }
.vid-ctl { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); position: absolute; left: 0; right: 0; bottom: 0; color: #fff; }
.vid-ctl .cw-bar { flex: 1; width: auto; } .vid-ctl .cw-t { color: #fff; } .vid-wrap.broken::after { content: "Не вдалося завантажити"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; }
.vid-wrap { min-height: 120px; }
.bubble.circle-only .cw2.big { margin-bottom: 52px; } .vid-ctl .sp-chip { background: rgba(255,255,255,.2); color: #fff; }
.share-q button.locked, #qbtns button.locked { opacity:.55 }
.seg button.locked { opacity:.55 }
.once-video { max-width: 92vw; max-height: 74vh; border-radius: 10px; }
/* Спільні матеріали (профіль) */
.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 8px; border-radius: 12px; overflow: hidden; }
.pm-cell { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; background: color-mix(in srgb, var(--text) 8%, transparent); cursor: pointer; display: block; }
.pm-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s var(--ease-out, ease-out); } .pm-cell:hover img { transform: scale(1.05); }
.pm-play { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; }
.pm-dur { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 9px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.pm-grid.circ { gap: 10px; background: none; border-radius: 0; } .pm-cell.round { border-radius: 50%; }
.pm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pm-voice { padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--text) 7%, transparent); } .pm-voice .vp2 { max-width: none; }
.pm-meta { display: flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: 2px; } .pm-go { margin-left: auto; color: var(--muted); padding: 2px 6px; }
.pm-file { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--text) 7%, transparent); text-align: left; color: var(--text); cursor: pointer; transition: background .15s; } .pm-file:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.pm-ext { flex: none; width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; letter-spacing: .3px; }
.pm-fi { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pm-fn { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pm-fs { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .chips { flex-wrap: wrap; }
.gal-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 56px 56px 20px; box-sizing: border-box; } .gal-stage img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; animation: springIn .3s var(--spring, ease-out); }
.gal-vid { width: min(100%, 720px); } .gal-vid .vid-wrap { max-width: 100%; } .gal-vid video.vid { max-height: 70vh; }
.vid-round .vid-wrap { width: min(70vw, 320px); border-radius: 50%; aspect-ratio: 1; } .vid-round video.vid { height: 100%; object-fit: cover; max-height: none; } .vid-round .vid-ctl { padding: 8px 22px 14px; }
.gal-nav { position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 3; } .gal-nav.l { left: 12px; } .gal-nav.r { right: 12px; transform: scaleX(-1); }
/* ===== Ненав'язливі анімації інтерфейсу ===== */
#rings.enter .ring-card { animation: ringIn .38s var(--spring, cubic-bezier(.2,.9,.3,1.2)); }
#rings.leaving .ring-card { animation: ringOut .24s ease forwards; pointer-events: none; }
@keyframes ringIn { from { opacity: 0; transform: translateY(-18px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ringOut { to { opacity: 0; transform: translateY(-14px) scale(.92); } }
.ring-btn { transition: transform .15s var(--spring, ease), filter .15s; } .ring-btn:hover { transform: scale(1.07); } .ring-btn:active { transform: scale(.9); }
.icon-btn, .chip, .crow, .rail-btn, .pm-file, .vm-it, .sp-chip { transition: background .18s, color .18s, transform .14s var(--spring, ease), box-shadow .2s; }
.icon-btn:active, .chip:active, .btn:active { transform: scale(.94); }
.chip.active { animation: chipOn .28s var(--spring, ease); } @keyframes chipOn { from { transform: scale(.92); } to { transform: none; } }
.tabview-in, .view-in { animation: viewIn .26s var(--ease-out, ease-out); } @keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.profile { animation: viewIn .3s var(--ease-out, ease-out); } .pm-grid, .pm-list { animation: viewIn .26s var(--ease-out, ease-out); }
.call-out, .calling { animation: viewIn .3s var(--ease-out, ease-out); }
@media (prefers-reduced-motion: reduce) { #rings.enter .ring-card, #rings.leaving .ring-card, .chip.active, .view-in, .profile, .pm-grid, .pm-list, .call-out, .calling { animation: none !important; } .icon-btn:active, .chip:active, .btn:active { transform: none; } }


/* ── Стікери: панель, перегляд, керування наборами ── */
.emoji-pop.stk-mode { width: 360px; }
.pk-switch { display: flex; gap: 2px; padding: 3px; margin: 0 0 8px; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; }
.pk-switch button { flex: 1; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .18s var(--ease-out, ease), color .18s; }
.pk-switch button:hover { color: var(--text); }
.pk-switch button.on { background: var(--accent); color: var(--on-accent); }
.stk-pane { display: flex; flex-direction: column; min-height: 0; }
.stk-strip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.stk-strip::-webkit-scrollbar { display: none; }
.stk-tab { flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 17px; color: var(--muted); border: 1px solid transparent; transition: background .16s, border-color .16s, transform .16s var(--spring, ease); }
.stk-tab img { width: 28px; height: 28px; object-fit: contain; display: block; }
.stk-tab:hover { background: var(--bg4); transform: translateY(-1px); }
.stk-tab.active { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.stk-tab.mgr { margin-left: auto; border: 1px dashed var(--line); } .stk-tab.mgr:hover { border-color: var(--accent); color: var(--accent); }
.stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 262px; overflow-y: auto; align-content: start; overscroll-behavior: contain; padding-right: 2px; }
.stk-b { aspect-ratio: 1; padding: 4px; border-radius: 12px; display: flex; align-items: center; justify-content: center; animation: stkIn .22s var(--ease-out, ease) both; -webkit-touch-callout: none; user-select: none; touch-action: manipulation; }
.stk-b img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; transition: transform .18s var(--spring, ease); }
.stk-b:hover { background: var(--bg4); } .stk-b:hover img { transform: scale(1.07); } .stk-b:active img { transform: scale(.94); }
.stk-b:nth-child(2) { animation-delay: .015s; } .stk-b:nth-child(3) { animation-delay: .03s; } .stk-b:nth-child(4) { animation-delay: .045s; } .stk-b:nth-child(5) { animation-delay: .06s; } .stk-b:nth-child(6) { animation-delay: .075s; } .stk-b:nth-child(7) { animation-delay: .09s; } .stk-b:nth-child(8) { animation-delay: .105s; }
@keyframes stkIn { from { opacity: 0; transform: scale(.88); } }
.stk-empty { grid-column: 1 / -1; padding: 40px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
img.sticker.cs { width: 160px; height: 160px; max-height: none; object-fit: contain; cursor: zoom-in; }
.stk-gone { display: inline-block; padding: 10px 12px; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 10px; }
.stk-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.stk-big { width: min(280px, 70vw); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; padding: 14px; animation: stkIn .26s var(--ease-out, ease) both; }
.stk-big img { width: 100%; height: 100%; object-fit: contain; }
.stk-card .btnrow { justify-content: center; margin-top: 2px; }
.stk-mgr { display: flex; flex-direction: column; gap: 12px; max-height: min(70vh, 640px); overflow-y: auto; padding-right: 2px; }
.stk-mgr h3 { margin: 6px 0 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stk-new { display: flex; gap: 8px; } .stk-new .input { flex: 1; min-width: 0; }
.stk-set { background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: stkIn .22s var(--ease-out, ease) both; }
.stk-set-h { display: flex; align-items: center; gap: 12px; }
.stk-cover { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--bg3); flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 20px; }
.stk-set-t { display: flex; flex-direction: column; min-width: 0; } .stk-set-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stk-set-t small { color: var(--muted); font-size: 12px; }
.stk-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.stk-th { position: relative; aspect-ratio: 1; background: var(--bg3); border-radius: 10px; padding: 4px; display: block; }
.stk-th img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stk-del { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s var(--spring, ease); }
.stk-th:hover .stk-del, .stk-th:focus-within .stk-del { opacity: 1; transform: none; }
@media (hover: none) { .stk-del { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .emoji-pop.stk-mode { width: min(360px, calc(100vw - 16px)); }
  .stk-grid { height: 232px; grid-template-columns: repeat(4, 1fr); }
  img.sticker.cs { width: 136px; height: 136px; }
  .stk-new { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .stk-b, .stk-big, .stk-set { animation: none !important; } .stk-b:hover img, .stk-tab:hover { transform: none; } }

.emoji-pop.has-sw .emoji-grid { height: 262px; max-height: none; align-content: start; }
@media (max-width: 640px) { .emoji-pop.has-sw .emoji-grid { height: 232px; } }

/* Світла тема: бурштинові й зелені підписи на білому були майже невидимі */
:root[data-theme="light"] .tag.warn { color: #8a5a00; border-color: #b97a00; }
:root[data-theme="light"] .tag.on { color: #17803f; border-color: #17803f; }
:root[data-theme="light"] .tag { color: color-mix(in srgb, var(--accent) 55%, #000); border-color: color-mix(in srgb, var(--accent) 55%, #000); }

/* ── Голосовий канал сервера: дзвінок у центрі, чат — окрема панель праворуч (лише за кнопкою чату) ── */
.chanview.vlay { flex-direction: row; }
.chanview.vlay .stage { flex: 1 1 auto; min-width: 0; }
.chanview.vlay .chat.vchat { display: none; flex: 0 0 auto; width: clamp(300px, 27vw, 380px); max-width: 46%; min-width: 0; border-top: 0; border-inline-start: 1px solid var(--line); background: var(--bg2); }
.chanview.vlay .chat.vchat > * { min-width: 0; }
/* чат голосового каналу відкрито: на не дуже широких екранах список учасників сервера ховаємо, щоб дзвінку лишалось місце
   (учасники дзвінка й так видно в центрі та під каналом) */
@media (min-width: 900px) and (max-width: 1599px) { .app.vchat-on { grid-template-columns: 72px 316px minmax(0, 1fr) 0; } .app.vchat-on .members { display: none; } }
.chanview.vlay.vchat-open .chat.vchat { display: flex; animation: vchatIn .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes vchatIn { from { opacity: 0; transform: translateX(16px); } }
.vchat-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.vchat-head .vchat-t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 14px; }
.vchat-head .vchat-t small { color: var(--muted); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-item .chan-chat { margin-inline-start: auto; position: relative; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; opacity: .55; transition: opacity .15s, background .15s, color .15s; flex: none; }
.chan-item:hover .chan-chat, .chan-item.joined .chan-chat, .chan-item .chan-chat.has-un, .chan-item .chan-chat.on { opacity: 1; }
.chan-item .chan-chat:hover { background: var(--hover, rgba(255, 255, 255, .08)); color: var(--text); }
.chan-item .chan-chat.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chan-item .chan-chat .cc-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger, #ff5a5a); box-shadow: 0 0 0 2px var(--bg1, #111); }
.chan-item .chan-chat:focus-visible { opacity: 1; outline: 2px solid var(--accent); }
@media (max-width: 899px) {
  .chanview.vlay.vchat-open .stage { display: none; } /* на телефоні чат займає екран, голос і далі працює; закрити — хрестик */
  .chanview.vlay .chat.vchat { flex: 1 1 auto; border-inline-start: 0; }
}

/* ── Вибір людей (спільний для запрошень і приватності) ── */
.pp { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pp-bar { display: flex; align-items: center; gap: 6px; }
.pp-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.pp-list { display: flex; flex-direction: column; gap: 2px; max-height: min(52vh, 440px); overflow-y: auto; padding: 2px; margin: 0 -2px; overscroll-behavior: contain; }
.pp-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; border: 0; background: transparent; color: var(--text); text-align: start; cursor: pointer; font: inherit; width: 100%; transition: background .12s; }
.pp-row:hover { background: var(--hover, rgba(255, 255, 255, .06)); }
.pp-row.on { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.pp-row.dis { opacity: .55; cursor: default; }
.pp-n { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pp-n b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pp-n small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-cb { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line2, rgba(255, 255, 255, .22)); display: grid; place-items: center; flex: none; color: transparent; transition: background .12s, border-color .12s, color .12s; }
.pp-row.on .pp-cb { background: var(--accent); border-color: var(--accent); color: #fff; }
.pp-tag { font-size: 12px; color: var(--muted); flex: none; }
.pp-empty { padding: 18px 8px; text-align: center; }
.inv-panel { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.inv-foot { justify-content: flex-end; }
/* ── Приватність: моя активність ── */
.vis-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.vis-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg3, rgba(255, 255, 255, .03)); }
.vis-row.sw { cursor: pointer; }
.vis-row.off .vis-m { opacity: .6; }
.vis-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .vis-m b { font-size: 14px; } .vis-m small { font-size: 12px; }
.vis-btn { flex: none; white-space: nowrap; }
.vis-pick { display: flex; flex-direction: column; gap: 10px; }
.vis-modes { flex-wrap: wrap; }
/* ── Запрошення на сервер ── */
.sinv-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.sinv-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sinv-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.sinv-m { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sinv-m small { color: var(--muted); font-size: 12px; }
.sinv-ic { border-radius: 14px; object-fit: cover; flex: none; }
.sinv-ic.gen { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000)); color: #fff; font-weight: 800; font-size: 15px; }
.sinv-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 4px 2px; }
.sinv-card h2 { margin: 6px 0 0; font-size: 20px; }
.sinv-card .btnrow { justify-content: center; margin-top: 6px; }
.toast.sinv-toast { display: flex; align-items: center; gap: 10px; pointer-events: auto; max-width: min(520px, 94vw); }
.toast.sinv-toast .st-txt { flex: 1; min-width: 0; font-size: 13px; }
/* ── «Зараз грає» ── */
.gact { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--accent); font-size: 12.5px; font-weight: 600; overflow: hidden; }
.gact .g-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-ic { width: 16px; height: 16px; border-radius: 4px; flex: none; object-fit: cover; }
.g-ic.g-gen { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.mn-w { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; } .mn-w .gact { font-size: 11.5px; }
.gcard { margin: 10px 0 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--bg3, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.gcard .gc-k { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.gcard .gc-r { display: flex; align-items: center; gap: 12px; } .gcard .gc-r b { display: block; font-size: 15px; } .gcard .gc-r small { color: var(--muted); font-size: 12.5px; }
.gcard .g-ic { width: 44px; height: 44px; border-radius: 10px; } .gcard .g-ic.g-gen { width: 44px; height: 44px; }
/* Вузька панель чату голосового каналу: поле вводу — на всю ширину, кнопки — рядком під ним (усі можливості на місці) */
.chat.vchat .composer { flex-wrap: wrap; border-radius: 18px; row-gap: 0; margin: 0 10px 10px; }
.chat.vchat .composer .input { order: -1; flex: 1 1 100%; }
.chat.vchat .composer .icon-btn:not(.once-btn) { width: 34px; height: 34px; }
/* Групи каналів */
.sec-title.cat { cursor: default; }
.sec-title.cat .cat-add { opacity: .45; transition: opacity .15s; } .sec-title.cat:hover .cat-add, .sec-title.cat .cat-add:focus-visible { opacity: 1; }
.cat-empty { display: flex; align-items: center; gap: 6px; width: 100%; margin: 2px 0 6px; padding: 7px 10px; border: 1px dashed var(--line2, rgba(255, 255, 255, .16)); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: start; }
.cat-empty:hover { color: var(--text); border-color: var(--accent); }
.vlim { font-size: 11px; font-weight: 700; color: var(--muted); padding: 1px 6px; border-radius: 999px; background: var(--bg3, rgba(255, 255, 255, .06)); flex: none; margin-inline-start: auto; }
.vlim.full { color: var(--danger, #ff6b6b); }
.vlim + .chan-chat { margin-inline-start: 4px; }
.lim-f { display: flex; flex-direction: column; gap: 8px; }
.lim-seg { flex-wrap: wrap; }
.lim-num { max-width: 160px; }
.cat-empty.grp-new { margin-top: 12px; }
