:root {
  --bg0: #131418;
  --bg1: #1b1d23;
  --bg2: #22252d;
  --bg3: #2b2f39;
  --bg4: #363b47;
  --line: #2f333d;
  --text: #e8e9ee;
  --text2: #a8adbb;
  --text3: #737a8c;
  --accent: #ff7a59;
  --accent2: #ff9c80;
  --ok: #3ddc84;
  --danger: #f05454;
  --warn: #ffc94d;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg1); color: var(--text); font: 15px/1.45 var(--font); overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent2); }
.hidden { display: none !important; }
.muted { color: var(--text2); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- кнопки ---------- */
.btn { border: 0; border-radius: 8px; padding: 8px 16px; background: var(--bg4); }
.btn:hover { filter: brightness(1.12); }
.btn.primary { background: var(--accent); color: #1b1d23; font-weight: 600; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.big { width: 100%; padding: 11px; font-size: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); flex: none; }
.icon-btn:hover { background: var(--bg3); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm svg.i { width: 16px; height: 16px; }
.icon-btn.accent { color: var(--accent); }
.icon-btn.off { color: var(--danger); }
.icon-btn.danger:hover { color: var(--danger); }
.pill { flex: 1; display: grid; place-items: center; height: 32px; border: 0; border-radius: 8px; background: var(--bg3); color: var(--text); }
.pill:hover { background: var(--bg4); }
.pill.on { background: var(--accent); color: #1b1d23; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--bg3); color: var(--text); display: grid; place-items: center; }
.round:hover { background: var(--bg4); }
.round.on { background: var(--accent); color: #1b1d23; }
.round.off { background: #fff; color: var(--danger); }
.round.danger { background: var(--danger); color: #fff; }
.round svg.i { width: 22px; height: 22px; }

/* ---------- вход ---------- */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, #ff7a5922, transparent), radial-gradient(900px 600px at 110% 110%, #60a5fa22, transparent), var(--bg0); }
.auth-card { width: 100%; max-width: 380px; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 12px; box-shadow: 0 20px 60px #0008; }
.auth-card h1 { margin: 4px 0 0; font-size: 24px; }
.auth-card p { margin: 0 0 4px; }
.auth-card label { display: grid; gap: 4px; font-size: 13px; color: var(--text2); }
input, textarea, select { background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.tabs { display: flex; gap: 4px; background: var(--bg0); padding: 4px; border-radius: 10px; }
.tab { flex: 1; border: 0; background: transparent; padding: 7px; border-radius: 7px; color: var(--text2); }
.tab.active { background: var(--bg3); color: var(--text); }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.logo { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--bg1); font-weight: 800; font-size: 28px; display: grid; place-items: center; }
.logo.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 17px; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr) auto auto; height: 100vh; height: 100dvh; }
.sidebar { background: var(--bg0); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.server-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; font-weight: 700; border-bottom: 1px solid var(--line); flex: none; }
.channels { flex: 1; overflow-y: auto; padding: 10px 8px; }
.ch-group { display: flex; align-items: center; justify-content: space-between; margin: 14px 6px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); }
.ch-group:first-child { margin-top: 2px; }
.ch { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); text-align: left; position: relative; }
.ch:hover { background: var(--bg2); color: var(--text); }
.ch.active { background: var(--bg3); color: var(--text); }
.ch.unread { color: var(--text); font-weight: 600; }
.ch.unread::before { content: ""; position: absolute; left: -8px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); }
.ch .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .ch-tools { display: none; gap: 2px; }
.ch:hover .ch-tools { display: flex; }
.ch svg.i { width: 18px; height: 18px; color: var(--text3); }
.voice-users { margin: 2px 0 6px 28px; display: grid; gap: 2px; }
.vu { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 14px; color: var(--text2); }
.vu .av { width: 24px; height: 24px; font-size: 11px; }
.vu .badges { margin-left: auto; display: flex; gap: 3px; color: var(--text3); }
.vu .badges svg.i { width: 15px; height: 15px; }
.vu .live { background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; }

.voice-panel { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 8px; background: var(--bg1); }
.vp-row { display: flex; align-items: center; justify-content: space-between; }
.vp-status { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.vp-channel { border: 0; background: none; color: var(--text2); text-align: left; padding: 0; font-size: 13px; margin-top: -6px; }
.vp-channel:hover { text-decoration: underline; }
.vp-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }

.user-panel { display: flex; align-items: center; gap: 2px; padding: 8px; background: var(--bg1); border-top: 1px solid var(--line); }
.me { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.me .nm { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1b1d23; flex: none; background-size: cover; background-position: center; position: relative; font-size: 15px; }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.av .st { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--bg1); background: var(--text3); }
.av .st.on { background: var(--ok); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg1); }
.topbar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.topbar .title { font-weight: 700; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; }
.topbar .title svg.i { color: var(--text3); }
.spacer { flex: 1; }
.mobile-only { display: none; }

.members { width: 230px; background: var(--bg0); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 10px; }
.members.collapsed { display: none; }
.members h4 { margin: 12px 6px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; }
.member.off { opacity: .45; }
.member .nm { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- чат ---------- */
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; }
.load-more { display: block; margin: 0 auto 12px; }
.empty-chat { padding: 32px 20px; color: var(--text2); }
.empty-chat h2 { color: var(--text); margin: 0 0 4px; }
.msg { display: grid; grid-template-columns: 56px 1fr; padding: 2px 16px 2px 0; position: relative; }
.msg:hover { background: #ffffff06; }
.msg.first { margin-top: 12px; }
.msg .gutter { display: flex; justify-content: center; padding-top: 2px; }
.msg .time-side { visibility: hidden; font-size: 11px; color: var(--text3); padding-top: 4px; }
.msg:hover .time-side { visibility: visible; }
.msg .head { display: flex; align-items: baseline; gap: 8px; }
.msg .author { font-weight: 600; }
.msg .time { font-size: 12px; color: var(--text3); }
.msg .text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .text code { background: var(--bg0); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.msg .edited { font-size: 11px; color: var(--text3); }
.msg .spoiler { background: var(--bg4); color: transparent; border-radius: 4px; cursor: pointer; }
.msg .spoiler.shown { color: inherit; background: var(--bg3); }
.msg .reply { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); margin-bottom: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg .reply b { color: var(--text); }
.msg.flash { animation: flash 1.4s; }
@keyframes flash { from { background: #ff7a5933; } }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.att { position: relative; max-width: min(420px, 100%); border-radius: 8px; overflow: hidden; background: var(--bg0); }
.att img, .att video { display: block; max-width: 100%; max-height: 340px; cursor: zoom-in; }
.att video { cursor: auto; }
.att .att-tools { position: absolute; top: 6px; right: 6px; display: none; gap: 4px; }
.att:hover .att-tools { display: flex; }
.att-tools button { border: 0; background: #000b; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.att.file, .att.audio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.att.audio audio { height: 34px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 1px 7px; font-size: 14px; }
.reaction.mine { border-color: var(--accent); background: #ff7a5922; }
.reaction .n { font-size: 12px; color: var(--text2); font-weight: 600; }
.msg-tools { position: absolute; right: 16px; top: -14px; display: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.quick-react { border: 0; background: none; padding: 3px 5px; border-radius: 6px; font-size: 16px; }
.quick-react:hover { background: var(--bg3); }

.typing { height: 20px; padding: 0 18px; font-size: 13px; color: var(--text2); }
.reply-bar { display: flex; align-items: center; justify-content: space-between; margin: 0 16px; padding: 6px 10px; background: var(--bg2); border-radius: 10px 10px 0 0; font-size: 13px; color: var(--text2); }
.pending-files { display: flex; gap: 8px; margin: 0 16px; flex-wrap: wrap; }
.pending-files:not(:empty) { padding: 10px; background: var(--bg2); border-radius: 10px 10px 0 0; }
.pf { position: relative; width: 90px; height: 90px; border-radius: 8px; background: var(--bg0) center/cover; display: grid; place-items: center; font-size: 11px; text-align: center; padding: 4px; overflow: hidden; word-break: break-all; }
.pf button { position: absolute; top: 2px; right: 2px; border: 0; width: 22px; height: 22px; border-radius: 50%; background: #000b; color: #fff; }
.composer { display: flex; align-items: flex-end; gap: 4px; margin: 0 16px 16px; padding: 6px; background: var(--bg2); border-radius: 12px; }
.composer textarea { flex: 1; resize: none; border: 0; background: transparent; padding: 7px 4px; max-height: 200px; }
.drop-hint { position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 14px; background: #1b1d23e6; display: none; place-items: center; font-size: 20px; font-weight: 700; z-index: 5; pointer-events: none; }
.drop-hint.show { display: grid; }

/* ---------- голос ---------- */
.voice-view { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--bg0); }
.stage { flex: 1; min-height: 0; padding: 16px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: minmax(150px, 1fr); overflow-y: auto; align-content: center; }
.stage.focus { grid-template-columns: 1fr; grid-template-rows: 1fr auto; grid-auto-rows: auto; align-content: stretch; }
.stage.focus .strip { display: flex; gap: 10px; overflow-x: auto; }
.stage.focus .strip .tile { width: 180px; height: 110px; flex: none; }
.tile { position: relative; background: var(--bg2); border-radius: 14px; overflow: hidden; display: grid; place-items: center; border: 2px solid transparent; transition: border-color .12s; min-height: 0; cursor: pointer; }
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.cam video { object-fit: contain; }
.tile .av { width: 84px; height: 84px; font-size: 32px; }
.stage.focus .strip .tile .av { width: 46px; height: 46px; font-size: 18px; }
.tile .label { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; background: #000a; padding: 3px 8px; border-radius: 6px; font-size: 13px; max-width: calc(100% - 16px); }
.tile .label svg.i { width: 15px; height: 15px; color: var(--danger); }
.tile .tile-tools { position: absolute; right: 8px; top: 8px; display: none; gap: 4px; }
.tile:hover .tile-tools { display: flex; }
.tile-tools button { border: 0; background: #000a; color: #fff; border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; }
.tile .live { position: absolute; left: 8px; top: 8px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.stage-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--text2); }
.stage-bar { display: flex; justify-content: center; gap: 12px; padding: 14px; flex: none; }

/* ---------- всплывашки ---------- */
.popover { position: fixed; z-index: 50; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px #000a; padding: 10px; max-height: 70vh; overflow: auto; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; }
.emoji-grid button { border: 0; background: none; font-size: 20px; height: 34px; border-radius: 6px; }
.emoji-grid button:hover { background: var(--bg3); }
.meme-pop { width: min(460px, calc(100vw - 32px)); display: grid; gap: 8px; }
.meme-head { display: flex; gap: 6px; }
.meme-head input { flex: 1; }
.meme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 50vh; overflow-y: auto; }
.meme { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg0); cursor: pointer; border: 0; padding: 0; }
.meme img, .meme video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.meme .cap { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 3px 5px; background: linear-gradient(transparent, #000c); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meme .meme-tools { position: absolute; top: 4px; right: 4px; display: none; gap: 3px; }
.meme:hover .meme-tools { display: flex; }
.meme-tools span { background: #000b; border-radius: 5px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; pointer-events: auto; }
.sound-pop { width: min(380px, calc(100vw - 32px)); display: grid; gap: 8px; }
.sound-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sound { position: relative; border: 0; background: var(--bg3); border-radius: 10px; padding: 10px 6px; display: grid; gap: 2px; justify-items: center; font-size: 13px; }
.sound:hover { background: var(--bg4); }
.sound .em { font-size: 22px; }
.sound .del { position: absolute; top: 2px; right: 4px; display: none; color: var(--text3); font-size: 12px; }
.sound:hover .del { display: block; }
.pop-title { font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.hint { font-size: 12px; color: var(--text3); }

.modal { position: fixed; inset: 0; z-index: 60; background: #000a; display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 14px; }
.modal-card h2 { margin: 0; font-size: 20px; }
.modal-card label { display: grid; gap: 5px; font-size: 13px; color: var(--text2); }
.modal-card .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-card .actions { display: flex; justify-content: flex-end; gap: 8px; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; color: var(--text) !important; font-size: 14px !important; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.swatch.sel { border-color: #fff; }
.meter { height: 8px; border-radius: 4px; background: var(--bg0); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.invite { display: flex; gap: 6px; }
.invite code { flex: 1; background: var(--bg0); padding: 8px 10px; border-radius: 8px; font-size: 15px; letter-spacing: .05em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }

.lightbox { position: fixed; inset: 0; z-index: 70; background: #000d; display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; border-radius: 8px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--bg3); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px #0008; font-size: 14px; animation: tin .2s; max-width: 320px; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- телефон ---------- */
@media (max-width: 1000px) { .members { position: fixed; right: 0; top: 52px; bottom: 0; z-index: 30; box-shadow: -10px 0 30px #0008; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 10px 0 40px #000a; }
  .mobile-only { display: inline-grid; }
  .msg { grid-template-columns: 48px 1fr; padding-right: 8px; }
  .composer { margin: 0 8px 8px; }
  .stage { padding: 8px; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(120px, 1fr); }
  .round { width: 46px; height: 46px; }
  .stage-bar { gap: 8px; }
}

/* гифки и статусы */
.gif-btn { font-size: 11px; font-weight: 800; letter-spacing: .03em; width: auto; padding: 0 7px; }
.gif-grid { columns: 3 120px; column-gap: 6px; max-height: 50vh; overflow-y: auto; }
.gif-item { display: block; width: 100%; margin: 0 0 6px; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--bg0); cursor: pointer; break-inside: avoid; min-height: 40px; }
.gif-item img, .gif-item video { width: 100%; display: block; }
.gif-item:hover { outline: 2px solid var(--accent); }
.status-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { cursor: pointer; border-radius: 8px; padding: 2px; }
.me:hover { background: var(--bg2); }

/* эмодзи, стикеры, упоминания */
.cemoji { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; }
.text.big-emoji .cemoji { width: 48px; height: 48px; }
.reaction .cemoji { width: 18px; height: 18px; vertical-align: -4px; }
.sticker { display: block; max-width: 160px; max-height: 160px; margin-top: 4px; }
.mention { background: #ff7a5933; color: var(--accent2); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.msg.mentioned { background: #ff7a5914; box-shadow: inset 3px 0 0 var(--accent); }
.ch .badge { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; padding: 0 6px; }
.ep-tabs { display: flex; gap: 4px; }
.ep-tabs button { flex: 1; border: 0; padding: 6px; border-radius: 8px; background: var(--bg3); }
.ep-tabs button.on { background: var(--accent); color: #1b1d23; font-weight: 600; }
.emoji-grid .cust img { width: 24px; height: 24px; object-fit: contain; }
.emoji-grid .sep { grid-column: 1 / -1; font-size: 12px; color: var(--text3); padding: 6px 2px 2px; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 44vh; overflow-y: auto; }
.sticker-grid button { position: relative; aspect-ratio: 1; border: 0; background: var(--bg0); border-radius: 8px; padding: 4px; }
.sticker-grid img { width: 100%; height: 100%; object-fit: contain; }
.del-x { position: absolute; top: 2px; right: 2px; display: none; background: #000b; color: #fff; border-radius: 4px; font-size: 11px; padding: 0 4px; }
.sticker-grid button:hover .del-x, .emoji-grid .cust:hover .del-x { display: block; }
.emoji-grid .cust { position: relative; }

/* команды, рулетки, опросы */
.cmd-hint { margin: 0 16px 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 2px; }
.cmd-hint button { text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 6px; }
.cmd-hint button:hover { background: var(--bg3); }
.cmd-hint code { color: var(--accent2); }
.bot-card { margin-top: 4px; display: inline-flex; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; max-width: 100%; }
.bot-card .big { font-size: 22px; font-weight: 800; color: var(--accent2); }
.bot-card .em { font-size: 26px; }
.bot-cmd { font-size: 12px; color: var(--text3); }
.poll { margin-top: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-width: 460px; display: grid; gap: 6px; }
.poll .q { font-weight: 700; }
.poll-opt { position: relative; border: 1px solid var(--line); background: var(--bg1); border-radius: 8px; padding: 7px 10px; text-align: left; overflow: hidden; display: flex; justify-content: space-between; gap: 8px; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: #ff7a5926; transition: width .3s; }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt span { position: relative; }

/* совместный просмотр */
.voice-view.watching .stage { flex: 0 0 auto; grid-auto-rows: 110px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); max-height: 140px; padding: 8px 16px; }
.voice-view.watching .stage .tile .av { width: 46px; height: 46px; font-size: 18px; }
.watch-area { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 0; gap: 8px; }
.watch-screen { position: relative; flex: 1; min-height: 0; background: #000; border-radius: 12px; overflow: hidden; }
.watch-screen iframe, .watch-screen video, .watch-screen > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-screen video { object-fit: contain; }
.watch-shield { position: absolute; inset: 0; z-index: 2; }
.watch-tap { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #000a; font-size: 18px; font-weight: 700; cursor: pointer; }
.watch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.watch-bar input[type=range].seek { flex: 1; min-width: 160px; }
.watch-bar .t { font-variant-numeric: tabular-nums; color: var(--text2); font-size: 13px; }
.watch-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }

/* мем-генератор */
.memegen canvas { width: 100%; border-radius: 8px; background: #000; }
.memegen .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal-card.wide { max-width: 640px; }

/* музыка */
.music-dock { border-top: 1px solid var(--line); padding: 10px; background: var(--bg1); display: grid; gap: 6px; }
.md-row { display: flex; align-items: center; gap: 6px; }
.md-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; cursor: pointer; }
.md-title:hover { text-decoration: underline; }
.md-yt { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.md-yt > div, .md-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.md-yt .watch-shield { z-index: 2; }
.md-bar { height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.md-bar > div { height: 100%; background: var(--accent); width: 0; }
.music-pop { width: min(420px, calc(100vw - 32px)); display: grid; gap: 8px; }
.mq { display: grid; gap: 2px; max-height: 38vh; overflow-y: auto; }
.mq-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.mq-item:hover { background: var(--bg3); }
.mq-item.cur { background: #ff7a5922; color: var(--accent2); font-weight: 600; }
.mq-item.done { opacity: .5; }
.mq-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-item .x { display: none; color: var(--text3); }
.mq-item:hover .x { display: block; }
.music-dock #mdTime { white-space: nowrap; font-size: 11px; }
.music-dock .md-row { gap: 2px; }
.music-pop .btn { white-space: nowrap; }

/* громкость, плееры (v2) */
.vol { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.vol-range { accent-color: var(--accent); min-width: 60px; flex: 1; }
.vol-pct { font-size: 12px; color: var(--text2); width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.music-dock .vol { width: 100%; }
.music-dock .vol-range { width: auto !important; }
input[type=range] { accent-color: var(--accent); }
.watch-bar { display: grid; gap: 6px; padding-bottom: 4px; }
.wb-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wb-row .seek { flex: 1; min-width: 80px; }
.watch-title { max-width: none; flex: 1; min-width: 0; }
.aplayer { display: grid !important; gap: 6px; width: min(380px, 100%); padding: 10px 12px; }
.ap-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ap-row .seek { flex: 1; min-width: 60px; }
.ap-row .t { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.round.sm-round { width: 34px; height: 34px; }
.round.sm-round svg.i { width: 16px; height: 16px; }
.att video { min-width: min(340px, 100%); }
.popover { overflow-y: auto; overscroll-behavior: contain; }
.gif-grid { max-height: none; }

.sticky-head { position: sticky; top: -10px; z-index: 3; background: var(--bg2); display: grid; gap: 8px; padding: 10px 0 8px; margin-top: -10px; }

/* фикс: плеер музыки не шире боковой панели */
.sidebar { min-width: 0; overflow: hidden; }
.music-dock { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; overflow: hidden; }
.music-dock > * { min-width: 0; max-width: 100%; }
.md-row { min-width: 0; }
.md-title { min-width: 0; }
.md-yt { max-width: 100%; }
.music-dock .vol { width: 100%; min-width: 0; }
.music-dock .vol-range { min-width: 0; flex: 1 1 auto; }
.voice-panel, .user-panel { min-width: 0; }

/* личные сообщения */
.av.xs { width: 22px; height: 22px; font-size: 10px; }
.av.xs .st { width: 9px; height: 9px; border-width: 2px; }
.ch.dm { gap: 9px; }
.topbar .title .av.xs { margin-right: 2px; }
.empty-chat .av { width: 64px; height: 64px; font-size: 26px; margin-bottom: 8px; }

/* оформление */
body.has-bg .app { position: relative; isolation: isolate; background: transparent; }
body.has-bg .app::before { content: ""; position: fixed; inset: -30px; z-index: -1; background: var(--app-bg); filter: blur(var(--bg-blur)) brightness(var(--bg-dim)); }
body.has-bg .main, body.has-bg .chat-view, body.has-bg .voice-view { background: transparent; }
body.has-bg .main { background: var(--bg1); }
body.has-bg .voice-view { background: color-mix(in srgb, var(--bg0) 60%, transparent); }
body.has-bg .sidebar, body.has-bg .members, body.has-bg .topbar { backdrop-filter: blur(6px); }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.look-opt { position: relative; height: 58px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; display: flex; align-items: flex-end; padding: 6px; overflow: hidden; color: #fff; }
.look-opt.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.look-name { font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px #0009; }
.swatch.custom { display: inline-block; overflow: hidden; position: relative; }
.theme-light .msg:hover { background: #0000000a; }
.theme-light .tile .label, .theme-light .att-tools button { color: #fff; }
.theme-light .btn.primary, .theme-light .pill.on, .theme-light .round.on { color: #fff; }
.theme-light .logo { color: #fff; }
.theme-light ::-webkit-scrollbar-thumb { background-color: #c4c8d2; }
body.compact .msg.first { margin-top: 6px; }
body.compact .msg { grid-template-columns: 46px 1fr; }
body.compact .msg .gutter .av { width: 30px; height: 30px; font-size: 12px; }
body.compact .ch { padding: 4px 8px; }
body.compact .member { padding: 3px 6px; }
body.compact .messages { padding-top: 8px; }

/* ===== Markdown ===== */
.messages { position: relative; }
.msg .text pre.code { white-space: pre; overflow-x: auto; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 4px 0; font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; max-width: 100%; }
.msg .text pre.code code { background: none; padding: 0; font-size: inherit; }
.msg .text blockquote { margin: 2px 0; padding: 0 0 0 10px; border-left: 4px solid var(--bg4); color: var(--text); white-space: pre-wrap; }
.msg .text .md-h1 { font-size: 22px; font-weight: 800; margin: 6px 0 2px; }
.msg .text .md-h2 { font-size: 18px; font-weight: 700; margin: 4px 0 2px; }
.msg .text .md-h3 { font-size: 16px; font-weight: 700; margin: 2px 0; }
.msg .text .md-list { margin: 2px 0; padding-left: 22px; white-space: normal; }
.hljs { color: #e8e9ee; } .hljs-keyword, .hljs-selector-tag, .hljs-built_in { color: #ff9c80; } .hljs-string, .hljs-attr { color: #9fe0a8; }
.hljs-number, .hljs-literal { color: #ffc94d; } .hljs-comment { color: #737a8c; font-style: italic; } .hljs-title, .hljs-function .hljs-title { color: #8ab4ff; } .hljs-type, .hljs-class { color: #c49bff; }

/* ===== превью ссылок ===== */
.embed { display: grid; gap: 6px; max-width: 440px; margin-top: 4px; padding: 10px 12px; background: var(--bg0); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; }
.embed-site { font-size: 12px; color: var(--text3); }
.embed-title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.embed-title:hover { text-decoration: underline; }
.embed-desc { font-size: 13.5px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.embed-img { max-width: 100%; max-height: 220px; border-radius: 6px; object-fit: cover; }
.embed-yt { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.embed-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: #f00d; color: #fff; display: grid; place-items: center; font-size: 22px; }
.embed-yt:hover .yt-play { background: #f00; }

/* ===== голосовые сообщения ===== */
.att.voice-msg { display: flex; align-items: center; gap: 10px; padding: 8px 12px; width: min(340px, 100%); border: 1px solid var(--line); }
.round.sm-round { width: 36px; height: 36px; background: var(--accent); color: #1b1d23; }
.round.sm-round svg.i { width: 18px; height: 18px; }
.vwave { flex: 1; height: 32px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.vwave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--bg4); }
.vwave i.on { background: var(--accent); }
.voice-msg .t { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 34px; }
.voice-msg .speed { border: 0; background: var(--bg3); color: var(--text2); border-radius: 6px; font-size: 12px; padding: 2px 6px; }
.rec-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 6px; padding: 8px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: recblink 1s infinite; flex: none; }
@keyframes recblink { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; min-width: 40px; }
.rec-wave { flex: 1; min-width: 0; height: 32px; }
#btnVoice.on { color: var(--danger); }

/* ===== разделители, частичный режим, закрепы ===== */
.new-divider { display: flex; align-items: center; gap: 8px; margin: 8px 16px; font-size: 12px; font-weight: 700; color: var(--danger); }
.new-divider::before, .new-divider::after { content: ''; flex: 1; height: 1px; background: var(--danger); }
.new-divider.muted-div { color: var(--text3); }
.new-divider.muted-div::before, .new-divider.muted-div::after { background: var(--line); }
.partial-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 16px 6px; padding: 6px 10px; background: var(--bg2); border-radius: 8px; font-size: 13px; color: var(--text2); }
.partial-bar .btn { padding: 4px 12px; }
.pin-mark { font-size: 12px; margin-left: 4px; }
.msg.pinned { background: #ffc94d0d; }
.msg.system .author { color: var(--accent2); }
.msg.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 40% { background: #ff7a5933; } }
.role-badge { font-size: 12px; margin-left: 2px; }
.role-badge.bot { font-size: 10px; font-weight: 800; background: var(--accent); color: #1b1d23; border-radius: 4px; padding: 0 4px; vertical-align: 2px; }

/* ===== ветки ===== */
.thread-sum { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px; border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; color: var(--accent2); font-size: 13px; font-weight: 600; }
.thread-sum:hover { background: var(--bg3); }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av { margin-right: -6px; border: 2px solid var(--bg2); box-sizing: content-box; }
.av-stack .av:last-of-type { margin-right: 4px; }
.msg.thread-parent { background: var(--bg2); border-radius: 8px; margin: 0 8px; }

/* ===== боковая панель (ветка/поиск) ===== */
.side-panel { width: 380px; background: var(--bg1); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); flex: none; overflow: hidden; white-space: nowrap; }
.side-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.side-list .msg { grid-template-columns: 48px 1fr; }
.side-composer { margin: 0 10px 10px; }
.search-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.search-filters input { grid-column: 1 / -1; }
.search-filters input, .search-filters select { background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; }
.search-hit { display: grid; gap: 4px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; }
.search-hit:hover { background: var(--bg2); }
.sh-head { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.sh-head .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-text { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.sh-text mark { background: #ffc94d55; color: inherit; border-radius: 3px; }
.sh-img { max-width: 120px; max-height: 80px; border-radius: 6px; }
.search-box { width: 170px; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 14px; transition: width .2s; }
.search-box:focus { width: 240px; outline: none; border-color: var(--accent); }
.topbar .topic { color: var(--text3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 40%; border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px; }

/* ===== профиль ===== */
.popover:has(.profile-card) { padding: 0; overflow: hidden auto; }
.profile-card { width: 300px; }
.pc-banner { height: 72px; background-size: cover; background-position: center; }
.pc-banner.big { height: 110px; border-radius: 10px; }
.pc-body { padding: 0 14px 14px; display: grid; gap: 6px; }
.pc-body > .av { width: 72px; height: 72px; font-size: 26px; margin-top: -36px; border: 5px solid var(--bg2); box-sizing: content-box; }
.pc-body > .av .st { width: 16px; height: 16px; border-width: 4px; border-color: var(--bg2); }
.pc-name { font-size: 18px; font-weight: 800; }
.pc-activity { background: var(--bg0); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.pc-section { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 2px; }
.pc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text3); letter-spacing: .04em; }
.pc-bio { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.pc-meta { font-size: 13px; color: var(--text2); }
.member .activity, .activity { font-size: 12px; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== виджеты в сайдбаре ===== */
.side-widgets { display: grid; gap: 4px; margin-bottom: 4px; }
.widget { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 6px 8px; color: var(--text); }
button.widget:hover { background: var(--bg3); }
.w-ico { font-size: 20px; flex: none; }
.w-body { min-width: 0; flex: 1; }
.w-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.widget .hint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-link { border: 0; background: transparent; color: var(--text3); font-size: 12px; text-align: left; padding: 2px 8px; }
.widget-link:hover { color: var(--accent2); }
.mc-widget .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.mc-widget .dot.ok { background: var(--ok); }

/* ===== категории, drag&drop ===== */
.ch-group.cat { cursor: pointer; user-select: none; }
.ch-group.cat:hover { color: var(--text2); }
.ch-group .cat-tools { display: none; gap: 2px; }
.ch-group.cat:hover .cat-tools { display: inline-flex; }
.ch.dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.ch .limit { font-size: 11px; color: var(--text3); background: var(--bg0); border-radius: 6px; padding: 0 5px; }
.av-group { display: inline-flex; flex: none; }
.av-group .av + .av { margin-left: -10px; border: 2px solid var(--bg0); box-sizing: content-box; }
.pick-row { cursor: pointer; }
.pick-row:hover { background: var(--bg2); }

/* ===== события ===== */
.rsvp { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rsvp .reaction { padding: 3px 9px; }
.ev-card .big { font-size: 18px; }
.ev-list { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.ev-item { background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.ev-item.focus { border-color: var(--accent); }
.ev-title { font-size: 16px; }
.ev-desc { white-space: pre-wrap; font-size: 14px; color: var(--text2); }
.ev-form { display: grid; gap: 10px; background: var(--bg0); border-radius: 10px; padding: 12px; }

/* ===== меню, админка ===== */
.menu { display: grid; min-width: 200px; }
.menu hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-item { border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 6px; }
.menu-item:hover { background: var(--bg3); }
.menu-item.danger { color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.adm-users { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.adm-user { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; flex-wrap: wrap; }
.adm-user:hover { background: var(--bg0); }
.adm-user.banned .name { text-decoration: line-through; color: var(--text3); }
.adm-user select { background: var(--bg0); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.modal-card h3 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.push-box { display: grid; gap: 6px; }

@media (max-width: 1000px) {
  .side-panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); z-index: 35; box-shadow: -10px 0 30px #0008; }
  .topbar .topic { display: none; }
  .search-box { width: 110px; }
  .search-box:focus { width: 160px; }
}
@media (max-width: 760px) {
  .side-panel { width: 100vw; }
  .search-box { display: none; }
}

/* модалки не шире экрана: длинные названия устройств больше не растягивают окно вбок */
.modal-card { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); max-width: min(480px, 100%); }
.modal-card.wide { max-width: min(640px, 100%); }
.modal-card > *, .modal-card label > *, .modal-card .row > *, .invite > * { min-width: 0; max-width: 100%; }
.modal-card select, .modal-card input, .modal-card textarea { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.modal-card label select, .modal-card label input:not([type=checkbox]):not([type=range]) { width: 100%; }
.modal-card .check { align-items: flex-start; overflow-wrap: anywhere; }
.modal-card .check input { margin-top: 3px; flex: none; }
.invite code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.modal-card .btn { overflow-wrap: anywhere; }
@media (max-height: 640px) { .modal-card { padding: 14px; gap: 10px; } .modal { padding: 8px; } }

/* ===== личные звонки ===== */
.incoming-call { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 50px #000c; min-width: min(360px, calc(100vw - 32px)); animation: callin .3s ease-out; }
@keyframes callin { from { transform: translate(-50%, -20px); opacity: 0; } }
.incoming-call .ic-av .av { width: 52px; height: 52px; font-size: 20px; animation: callpulse 1.4s infinite; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 #3ddc8488; } 100% { box-shadow: 0 0 0 14px #3ddc8400; } }
.incoming-call .ic-text { flex: 1; min-width: 0; }
.incoming-call .ic-text b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incoming-call .round { width: 46px; height: 46px; }
.round.ok { background: var(--ok); color: #10301d; }
.ch .dm-call { color: var(--ok); display: inline-grid; place-items: center; padding: 2px; border-radius: 6px; }
.ch .dm-call:hover { background: var(--bg3); }
.ch .dm-call svg.i { width: 16px; height: 16px; color: var(--ok); }
#btnCall.live { color: var(--ok); animation: callpulse 1.4s infinite; border-radius: 50%; }

/* ===== профиль: расширенный ===== */
.profile-card { --pc: transparent; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 28%, transparent), transparent 70%); }
.profile-card .av.zoomable { cursor: zoom-in; }
.profile-card .av.zoomable:hover { filter: brightness(1.1); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-tag { font-size: 12.5px; background: var(--bg0); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--text); text-decoration: none; }
.pc-tag.link:hover { border-color: var(--accent); color: var(--accent2); }
.pc-note { width: 100%; resize: none; background: transparent; border: 1px dashed transparent; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: var(--text2); overflow: hidden; }
.pc-note:hover, .pc-note:focus { border-color: var(--line); background: var(--bg0); outline: none; }
.pc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-btns .btn { flex: 1; padding: 7px 10px; white-space: nowrap; }
.pc-bio a { word-break: break-all; }
.modal-card.profile-modal { padding: 0; max-width: min(460px, 100%); }
.profile-card.big { width: 100%; }
.profile-card.big .pc-banner { height: 130px; }
.profile-card.big .pc-body { padding: 0 20px 20px; gap: 8px; }
.profile-card.big .pc-body > .av { width: 96px; height: 96px; font-size: 34px; margin-top: -50px; }
.profile-card.big .pc-name { font-size: 22px; }
.swatch.none { display: grid; place-items: center; background: var(--bg0); color: var(--text3); border: 1px dashed var(--line); font-size: 14px; }

/* ===== саундпад ===== */
.modal-card.pad-card { max-width: min(720px, 100%); }
.modal-card.pad-card.drag { outline: 2px dashed var(--accent); outline-offset: -8px; }
.pad-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pad-head .check { font-size: 13px !important; }
.pad-vol { display: flex !important; align-items: center; gap: 4px !important; font-size: 15px !important; }
.pad-vol input { width: 90px; }
.pad-list { display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.pad-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; }
.pad-row.on { border-color: var(--accent); }
.pad-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pad-name { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; font-weight: 600; min-width: 0; }
.pad-name:hover, .pad-name:focus { border-color: var(--line); background: var(--bg1); outline: none; }
.pad-prog { height: 3px; width: 0; background: var(--accent); border-radius: 2px; }
.key-btn { font-family: ui-monospace, Consolas, monospace; font-size: 12px !important; min-width: 74px; white-space: nowrap; }
.key-btn.capturing { background: var(--accent); color: #1b1d23; }
.key-btn.bad { outline: 1px solid var(--danger); }
.key-btn.bad::after { content: ' занята'; color: var(--danger); }
.pad-svol { width: 80px; }
.pad-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; color: var(--text2); text-align: center; border: 2px dashed var(--line); border-radius: 12px; }
@media (max-width: 600px) { .pad-svol { display: none; } .pad-vol input { width: 64px; } .key-btn { min-width: 0; } }
