/* ============================================================
   hlorchat v5 — Discord layout · full theme tokens
   ============================================================ */

:root, html[data-theme="discord"] {
  --bg: #1e1f22;
  --bg-2: #2b2d31;
  --bg-3: #313338;
  --bg-4: #383a40;
  --bg-mod: #2b2d31;
  --bg-elev: #232428;
  --stroke: rgba(255, 255, 255, .06);
  --stroke-2: rgba(255, 255, 255, .1);
  --text: #f2f3f5;
  --muted: #b5bac1;
  --muted-2: #949ba4;
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, .24);
  --accent-grad: #5865F2;
  --bubble-me: transparent;
  --bubble-them: transparent;
  --green: #23a559;
  --yellow: #f0b232;
  --danger: #ed4245;
  --glow: transparent;
  --shadow: 0 8px 16px rgba(0, 0, 0, .24);
  --blur: none;
  --rail: #1e1f22;
  --channels: #2b2d31;
  --chat: #313338;
  --input: #383a40;
  --hover: rgba(79, 84, 92, .48);
  --active: rgba(79, 84, 92, .6);
  --link: #00a8fc;
  --btn-sec: #4e5058;
  --btn-sec-h: #6d6f78;
  --btn-h: #404249;
  --scroll: #1a1b1e;
  --scroll-h: #0e0f11;
  --wall-rail: rgba(30, 31, 34, .88);
  --wall-side: rgba(43, 45, 49, .78);
  --wall-head: rgba(49, 51, 56, .72);
  --wall-foot: rgba(35, 36, 40, .88);
  --wall-comp: rgba(56, 58, 64, .92);
  --wall-input: rgba(30, 31, 34, .78);
  /* aliases */
  --bg0: var(--bg); --bg1: var(--bg-2); --bg2: var(--bg-3); --bg3: var(--bg-4);
  --text-muted: var(--muted); --border: var(--stroke);
  --success: var(--green); --sidebar: var(--channels);
  --chat-bg: var(--chat); --composer: var(--input);
}

/* красная ночь — бордо + алый акцент */
html[data-theme="rednight"] {
  --bg: #140c0e; --bg-2: #1c1014; --bg-3: #261418; --bg-4: #321c22;
  --bg-mod: #1c1014; --bg-elev: #180e12;
  --stroke: rgba(255,120,130,.1); --stroke-2: rgba(255,140,150,.16);
  --text: #ffe8ea; --muted: #d4a0a6; --muted-2: #a87880;
  --accent: #ed4245; --accent-hover: #c03537; --accent-soft: rgba(237,66,69,.28);
  --accent-grad: #ed4245; --green: #3dd68c; --yellow: #f0b232; --danger: #ff6b6e;
  --rail: #10090b; --channels: #1c1014; --chat: #261418; --input: #321c22;
  --hover: rgba(237,66,69,.14); --active: rgba(237,66,69,.22); --link: #ff8a8d;
  --btn-sec: #4a2428; --btn-sec-h: #5e3036; --btn-h: #3a1c22;
  --scroll: #2a1418; --scroll-h: #3a1c22;
  --wall-rail: rgba(16,9,11,.9); --wall-side: rgba(28,16,20,.8);
  --wall-head: rgba(38,20,24,.75); --wall-foot: rgba(24,14,18,.9);
  --wall-comp: rgba(50,28,34,.92); --wall-input: rgba(20,12,14,.8);
}

/* amoled — чистый чёрный + красный */
html[data-theme="amoled"] {
  --bg: #000000; --bg-2: #050505; --bg-3: #0c0c0c; --bg-4: #161616;
  --bg-mod: #080808; --bg-elev: #030303;
  --stroke: rgba(255,255,255,.07); --stroke-2: rgba(255,80,90,.14);
  --text: #f5f5f5; --muted: #a8a8a8; --muted-2: #777;
  --accent: #ff2d55; --accent-hover: #d92045; --accent-soft: rgba(255,45,85,.28);
  --accent-grad: #ff2d55; --green: #30d158; --yellow: #ffd60a; --danger: #ff453a;
  --rail: #000; --channels: #050505; --chat: #0c0c0c; --input: #161616;
  --hover: rgba(255,255,255,.06); --active: rgba(255,45,85,.2); --link: #ff6b8a;
  --btn-sec: #222; --btn-sec-h: #333; --btn-h: #1a1a1a;
  --scroll: #1a1a1a; --scroll-h: #2a2a2a;
  --wall-rail: rgba(0,0,0,.92); --wall-side: rgba(5,5,5,.86);
  --wall-head: rgba(12,12,12,.8); --wall-foot: rgba(3,3,3,.92);
  --wall-comp: rgba(22,22,22,.94); --wall-input: rgba(0,0,0,.82);
}

/* graphite / gnome — тёплый графит + indigo */
html[data-theme="gnome"] {
  --bg: #1c1c1e; --bg-2: #2c2c2e; --bg-3: #3a3a3c; --bg-4: #48484a;
  --bg-mod: #2c2c2e; --bg-elev: #242426;
  --stroke: rgba(255,255,255,.08); --stroke-2: rgba(255,255,255,.12);
  --text: #f5f5f7; --muted: #aeaeb2; --muted-2: #8e8e93;
  --accent: #5e5ce6; --accent-hover: #4b49c9; --accent-soft: rgba(94,92,230,.24);
  --accent-grad: #5e5ce6; --green: #30d158; --yellow: #ffd60a; --danger: #ff453a;
  --rail: #1c1c1e; --channels: #2c2c2e; --chat: #3a3a3c; --input: #48484a;
  --hover: rgba(255,255,255,.08); --active: rgba(94,92,230,.22); --link: #64d2ff;
  --btn-sec: #636366; --btn-sec-h: #8e8e93; --btn-h: #48484a;
  --scroll: #2c2c2e; --scroll-h: #3a3a3c;
  --wall-rail: rgba(28,28,30,.9); --wall-side: rgba(44,44,46,.8);
  --wall-head: rgba(58,58,60,.75); --wall-foot: rgba(36,36,38,.9);
  --wall-comp: rgba(72,72,74,.92); --wall-input: rgba(28,28,30,.8);
}

/* deep ocean */
html[data-theme="ocean"] {
  --bg: #0b1624; --bg-2: #122033; --bg-3: #1a2d45; --bg-4: #243b58;
  --bg-mod: #122033; --bg-elev: #0e1a2a;
  --stroke: rgba(100,180,255,.1); --stroke-2: rgba(100,180,255,.16);
  --text: #e8f1ff; --muted: #8fb4d4; --muted-2: #6a8faf;
  --accent: #3b82f6; --accent-hover: #2563eb; --accent-soft: rgba(59,130,246,.28);
  --accent-grad: #3b82f6; --green: #34d399; --yellow: #fbbf24; --danger: #f87171;
  --rail: #071018; --channels: #122033; --chat: #1a2d45; --input: #243b58;
  --hover: rgba(59,130,246,.14); --active: rgba(59,130,246,.24); --link: #38bdf8;
  --btn-sec: #1e3a5f; --btn-sec-h: #2a4d7a; --btn-h: #1a3048;
  --scroll: #152638; --scroll-h: #1e354c;
  --wall-rail: rgba(7,16,24,.9); --wall-side: rgba(18,32,51,.8);
  --wall-head: rgba(26,45,69,.75); --wall-foot: rgba(14,26,42,.9);
  --wall-comp: rgba(36,59,88,.92); --wall-input: rgba(11,22,36,.8);
}

/* matrix — терминал */
html[data-theme="matrix"] {
  --bg: #050a07; --bg-2: #0b140e; --bg-3: #101c14; --bg-4: #18261c;
  --bg-mod: #0b140e; --bg-elev: #08100b;
  --stroke: rgba(35,165,89,.14); --stroke-2: rgba(35,165,89,.22);
  --text: #d8ffe4; --muted: #8fbc9a; --muted-2: #5f8a6c;
  --accent: #23a559; --accent-hover: #1a7f43; --accent-soft: rgba(35,165,89,.26);
  --accent-grad: #23a559; --green: #3dff8a; --yellow: #c8ff4a; --danger: #ff5a5a;
  --rail: #030605; --channels: #0b140e; --chat: #101c14; --input: #18261c;
  --hover: rgba(35,165,89,.12); --active: rgba(35,165,89,.22); --link: #5dff9a;
  --btn-sec: #1a3222; --btn-sec-h: #254832; --btn-h: #14281a;
  --scroll: #0e1a12; --scroll-h: #18261c;
  --wall-rail: rgba(3,6,5,.92); --wall-side: rgba(11,20,14,.84);
  --wall-head: rgba(16,28,20,.78); --wall-foot: rgba(8,16,11,.92);
  --wall-comp: rgba(24,38,28,.94); --wall-input: rgba(5,10,7,.84);
}

/* vaporwave — фиолетово-розовый */
html[data-theme="vapor"] {
  --bg: #1a0f24; --bg-2: #241633; --bg-3: #2e1c42; --bg-4: #3a2552;
  --bg-mod: #241633; --bg-elev: #1e1230;
  --stroke: rgba(235,69,158,.14); --stroke-2: rgba(168,85,247,.2);
  --text: #ffe6f6; --muted: #d4a8c8; --muted-2: #a878a0;
  --accent: #eb459e; --accent-hover: #c73d86; --accent-soft: rgba(235,69,158,.28);
  --accent-grad: #eb459e; --green: #2dd4bf; --yellow: #f0abfc; --danger: #fb7185;
  --rail: #140a1c; --channels: #241633; --chat: #2e1c42; --input: #3a2552;
  --hover: rgba(235,69,158,.14); --active: rgba(168,85,247,.22); --link: #e879f9;
  --btn-sec: #4a2a5e; --btn-sec-h: #5e3874; --btn-h: #352048;
  --scroll: #2a1838; --scroll-h: #3a2552;
  --wall-rail: rgba(20,10,28,.9); --wall-side: rgba(36,22,51,.8);
  --wall-head: rgba(46,28,66,.75); --wall-foot: rgba(30,18,48,.9);
  --wall-comp: rgba(58,37,82,.92); --wall-input: rgba(26,15,36,.8);
}

/* royal gold */
html[data-theme="gold"] {
  --bg: #12100a; --bg-2: #1c1810; --bg-3: #262016; --bg-4: #322a1c;
  --bg-mod: #1c1810; --bg-elev: #16120c;
  --stroke: rgba(240,178,50,.12); --stroke-2: rgba(240,178,50,.2);
  --text: #fff6e0; --muted: #c8b890; --muted-2: #9a8a68;
  --accent: #f0b232; --accent-hover: #c9921f; --accent-soft: rgba(240,178,50,.26);
  --accent-grad: #f0b232; --green: #86efac; --yellow: #fde68a; --danger: #f87171;
  --rail: #0e0c08; --channels: #1c1810; --chat: #262016; --input: #322a1c;
  --hover: rgba(240,178,50,.12); --active: rgba(240,178,50,.2); --link: #fbbf24;
  --btn-sec: #3a3220; --btn-sec-h: #4e442c; --btn-h: #2a2216;
  --scroll: #221c12; --scroll-h: #322a1c;
  --wall-rail: rgba(14,12,8,.92); --wall-side: rgba(28,24,16,.84);
  --wall-head: rgba(38,32,22,.78); --wall-foot: rgba(22,18,12,.92);
  --wall-comp: rgba(50,42,28,.94); --wall-input: rgba(18,16,10,.84);
}

/* snow — светлая */
html[data-theme="snow"] {
  --bg: #e3e5e8; --bg-2: #f2f3f5; --bg-3: #ffffff; --bg-4: #ebedef;
  --bg-mod: #ffffff; --bg-elev: #f2f3f5;
  --stroke: rgba(0,0,0,.08); --stroke-2: rgba(0,0,0,.12);
  --text: #060607; --muted: #4e5058; --muted-2: #6d6f78;
  --accent: #5865F2; --accent-hover: #4752c4; --accent-soft: rgba(88,101,242,.16);
  --accent-grad: #5865F2; --green: #23a559; --yellow: #e67e22; --danger: #ed4245;
  --rail: #e3e5e8; --channels: #f2f3f5; --chat: #ffffff; --input: #ebedef;
  --hover: rgba(0,0,0,.06); --active: rgba(88,101,242,.12); --link: #0068e0;
  --shadow: 0 8px 16px rgba(0,0,0,.08);
  --btn-sec: #4e5058; --btn-sec-h: #6d6f78; --btn-h: #dcdfe3;
  --scroll: #c4c7cc; --scroll-h: #a0a4ab;
  --wall-rail: rgba(227,229,232,.9); --wall-side: rgba(242,243,245,.82);
  --wall-head: rgba(255,255,255,.78); --wall-foot: rgba(242,243,245,.9);
  --wall-comp: rgba(235,237,239,.94); --wall-input: rgba(227,229,232,.82);
}

/* dark glass — матовый сланец + cyan */
html[data-theme="darkglass"] {
  --bg: #0e1116; --bg-2: #151a22; --bg-3: #1c2430; --bg-4: #263040;
  --bg-mod: #151a22; --bg-elev: #12161c;
  --stroke: rgba(120,200,255,.1); --stroke-2: rgba(120,200,255,.16);
  --text: #e8eef6; --muted: #9aadc0; --muted-2: #6f8499;
  --accent: #22d3ee; --accent-hover: #06b6d4; --accent-soft: rgba(34,211,238,.22);
  --accent-grad: #22d3ee; --green: #4ade80; --yellow: #facc15; --danger: #f87171;
  --rail: #0a0d11; --channels: #151a22; --chat: #1c2430; --input: #263040;
  --hover: rgba(34,211,238,.1); --active: rgba(34,211,238,.18); --link: #67e8f9;
  --btn-sec: #2a3544; --btn-sec-h: #3a4860; --btn-h: #1e2834;
  --scroll: #1a222c; --scroll-h: #263040;
  --wall-rail: rgba(10,13,17,.9); --wall-side: rgba(21,26,34,.82);
  --wall-head: rgba(28,36,48,.76); --wall-foot: rgba(18,22,28,.9);
  --wall-comp: rgba(38,48,64,.92); --wall-input: rgba(14,17,22,.82);
}

/* cyberpunk — неон на тёмно-фиолетовом */
html[data-theme="cyber"] {
  --bg: #0a0612; --bg-2: #120a1e; --bg-3: #1a102c; --bg-4: #24183a;
  --bg-mod: #120a1e; --bg-elev: #0e0818;
  --stroke: rgba(57,255,20,.12); --stroke-2: rgba(255,0,170,.18);
  --text: #f0ffe8; --muted: #a8c8b0; --muted-2: #6e8a78;
  --accent: #39ff14; --accent-hover: #2ad00e; --accent-soft: rgba(57,255,20,.22);
  --accent-grad: #39ff14; --green: #39ff14; --yellow: #ff00aa; --danger: #ff2a6d;
  --rail: #06040c; --channels: #120a1e; --chat: #1a102c; --input: #24183a;
  --hover: rgba(57,255,20,.1); --active: rgba(255,0,170,.18); --link: #00f0ff;
  --btn-sec: #2a1a40; --btn-sec-h: #3a2858; --btn-h: #1e1430;
  --scroll: #180e28; --scroll-h: #24183a;
  --wall-rail: rgba(6,4,12,.92); --wall-side: rgba(18,10,30,.84);
  --wall-head: rgba(26,16,44,.78); --wall-foot: rgba(14,8,24,.92);
  --wall-comp: rgba(36,24,58,.94); --wall-input: rgba(10,6,18,.84);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; width: 100%; }
body {
  font-family: "gg sans", "Whitney", Figtree, "IBM Plex Sans", "Noto Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  transition: background .3s ease, color .2s ease;
}
.nav-rail, .sidebar, .main, .chat, .settings, .music-view, .player-view,
.sidebar-foot, .chat-head, .sidebar-head, .composer-pill, .composer-bar,
.set-card, .search-wrap, .now-playing, .pcard, .empty-state {
  transition: background .28s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.red-txt { color: var(--accent); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* no aurora / no glass blur spam */
.aurora { display: none !important; }
.glass {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ds-panel {
  background: var(--bg-mod);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* ---------- BOOT ---------- */
.boot {
  position: fixed; inset: 0; z-index: 1000; background: #1e1f22;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.boot-logo {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent); font-size: 13px; line-height: 1.25;
  opacity: .95;
}
.boot-box { width: 420px; max-width: 88vw; display: flex; flex-direction: column; gap: 12px; }
.boot-lines { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); min-height: 88px; }
.boot-lines .ok { color: var(--green); }
.boot-bar { height: 4px; border-radius: 2px; overflow: hidden; background: var(--bg-4); }
#bootBar { height: 100%; width: 0%; background: var(--accent); transition: width .18s linear; }
.boot-pct { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); text-align: right; }
.boot.done { animation: bootOut .4s ease forwards; }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(3px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes springIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }
@keyframes appIn { from { opacity: 0; } }
@keyframes pressPop { from { transform: scale(.97); } }

/* ---------- AUTH ---------- */
.auth {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: #5865F2;
  background: linear-gradient(135deg, #5865F2 0%, #404eed 45%, #1e1f22 45.1%);
}
.auth-card {
  width: 420px; max-width: 92vw;
  background: var(--bg-3);
  border: none;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  animation: springIn .35s ease both;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 8px; }
.auth-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px;
}
.auth-title { font-size: 24px; font-weight: 700; letter-spacing: -.2px; }
.auth-sub { color: var(--muted); font-size: 14px; text-align: center; margin: 4px 0 18px; }
.fld-label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; color: var(--muted-2); margin: 16px 0 8px;
}
.auth input, .set-card input[type="text"], .set-card input[type="password"],
.set-card input[type="email"], .set-card textarea, .set-card select {
  width: 100%;
  background: var(--bg0); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 10px 12px; outline: none; resize: none;
}
.auth input:focus, .set-card input:focus, .set-card textarea:focus, .set-card select:focus {
  outline: 2px solid var(--accent);
}
.auth input::placeholder, .set-card input::placeholder, .set-card textarea::placeholder { color: #6d6f78; }
.auth-hint { min-height: 17px; font-size: 13px; margin-top: 8px; }
.auth-hint.err { color: var(--danger); }
.auth-hint.okk { color: var(--green); }
.auth-btns { display: flex; gap: 10px; margin-top: 18px; }
.btn-wide { flex: 1; padding: 12px 0; font-size: 15px; justify-content: center; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted-2); }

/* ---------- LAYOUT ---------- */
.app {
  position: relative; z-index: 1;
  display: flex; height: 100vh; height: 100dvh;
  padding: 0; gap: 0; background: var(--bg);
  animation: appIn .28s ease both;
}
.nav-rail {
  width: 72px; min-width: 72px;
  background: var(--rail);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 8px;
  z-index: 5;
}
.rail-brand {
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  transition: border-radius .18s cubic-bezier(.2,.8,.3,1), transform .15s ease;
  cursor: default;
}
.rail-brand:hover { border-radius: 14px; }
.rail-brand:active { transform: scale(.94); }
.rail-sep {
  width: 32px; height: 2px; border-radius: 1px;
  background: var(--stroke-2); margin: 4px 0;
}
.rail-btn.seg-btn {
  position: relative;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: none; color: var(--muted);
  cursor: pointer; padding: 0; flex: none;
  transition: border-radius .18s cubic-bezier(.2,.8,.3,1), background .15s, color .15s, transform .12s ease;
}
.rail-btn.seg-btn svg { width: 22px; height: 22px; }
.rail-btn .rail-lbl { display: none; }
.rail-btn.seg-btn:hover {
  border-radius: 16px; background: var(--accent); color: #fff;
}
.rail-btn.seg-btn:active { transform: scale(.92); }
.rail-btn.seg-btn.active {
  border-radius: 16px; background: var(--accent); color: #fff;
  box-shadow: none;
}
.rail-spacer { flex: 1; }
.badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; text-align: center;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  border: 3px solid var(--rail);
}
.rail-btn.active .badge { border-color: var(--accent); }

/* ---------- SIDEBAR (tether-inspired density × Discord chrome) ---------- */
.sidebar {
  width: 268px; min-width: 268px;
  background: var(--channels);
  display: flex; flex-direction: column;
  padding: 0;
  border-right: 1px solid rgba(0,0,0,.2);
}
.sidebar-head {
  height: 52px; min-height: 52px;
  display: flex; align-items: center;
  padding: 0 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.sidebar-title { font-weight: 700; font-size: 16px; letter-spacing: .1px; }
.panel { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 10px 0; }
.item-list { list-style: none; overflow-y: auto; flex: 1; padding: 0 0 10px; }

.search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.search-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg0); border: 1px solid var(--border); border-radius: 18px;
  padding: 9px 14px;
  transition: box-shadow .15s ease, background .15s ease;
}
.search-row .search-wrap { margin-bottom: 0; }
.search-wrap svg { width: 15px; height: 15px; color: var(--muted-2); flex-shrink: 0; }
.search-wrap input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
}
.search-wrap input::placeholder { color: #6d6f78; }
.search-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent);
  background: var(--bg-elev);
}

.chat-item, .friend-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 16px; cursor: pointer;
  border: none; margin-bottom: 2px;
  transition: background .14s ease, transform .12s ease, box-shadow .14s ease;
}
.chat-item.ci-enter, .friend-item.ci-enter { animation: slideIn .22s cubic-bezier(.2,.8,.3,1) both; }
.chat-item:hover, .friend-item:hover { background: var(--hover); }
.chat-item:active, .friend-item:active { transform: scale(.985); }
.chat-item.active, .friend-item.active {
  background: var(--active);
  box-shadow: inset 3px 0 0 var(--accent);
}
.chat-item.has-unread .ci-name { font-weight: 800; color: var(--text); }
.chat-item.has-unread .ci-preview { color: var(--muted); font-weight: 500; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent);
  color: #fff; font-weight: 600; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; object-fit: cover; user-select: none;
}
.ava-wrap { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.ava-wrap .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 14px; height: 14px; border: 3px solid var(--channels);
}
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.ci-preview { font-size: 13px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.ci-preview.typing { color: var(--green); font-style: italic; }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ci-time { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chat-item.has-unread .ci-time { color: var(--accent); font-weight: 600; }
.ci-unread {
  min-width: 20px; height: 20px; line-height: 20px; padding: 0 7px;
  background: var(--accent); color: #fff; text-align: center;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(88,101,242,.35);
}
.ci-sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

.add-box { margin-bottom: 8px; padding: 0 2px; }
.input-row { display: flex; gap: 8px; }
.input-row input {
  flex: 1; min-width: 0;
  background: var(--bg0); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); font-family: inherit; font-size: 14px;
  padding: 10px 12px; outline: none;
}
.input-row input:focus { outline: 2px solid var(--accent); }
.input-row input::placeholder { color: #6d6f78; }
.hint { font-size: 12px; margin-top: 6px; min-height: 15px; padding: 0 2px; }
.hint.err { color: var(--danger); }
.hint.okk { color: var(--green); }
.panel-empty { color: var(--muted-2); font-size: 14px; padding: 40px 16px; text-align: center; line-height: 1.55; }
.panel-empty small { font-size: 12px; opacity: .85; display: block; margin-top: 6px; }
.music-side-hint { font-size: 11px; color: var(--muted-2); padding: 4px 6px 8px; line-height: 1.4; }

.sidebar-foot {
  padding: 8px;
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 6px;
}
.status-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted-2); padding: 0 4px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); animation: pulse 1.4s ease infinite; }
.dot-red { background: var(--danger); animation: pulse 1s ease infinite; }
.dot-grey { background: #80848e; }
.foot-tag { display: none; }

.me-card {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none;
  border-radius: 4px; padding: 6px 8px; cursor: pointer;
}
.me-card:hover { background: var(--hover); }
.me-ava-wrap { position: relative; width: 32px; height: 32px; flex-shrink: 0; }
.me-ava-wrap .avatar, .me-ava-wrap img { width: 32px; height: 32px; font-size: 13px; }
.me-ava-wrap .dot {
  position: absolute; right: -2px; bottom: -2px;
  width: 10px; height: 10px; border: 2px solid var(--bg-elev);
}
.me-info { flex: 1; min-width: 0; }
.me-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.me-sub .dot { width: 6px; height: 6px; }
.me-chev { width: 14px; height: 14px; color: var(--muted-2); flex-shrink: 0; }

/* legacy seg (hidden — rail replaces) */
.seg { display: none; }

/* ---------- BUTTONS (Discord chrome × iOS roundness) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  background: var(--bg-4); color: var(--text);
  border: none; border-radius: 14px;
  padding: 9px 18px; cursor: pointer;
  transition: background .15s, transform .12s cubic-bezier(.2,.8,.3,1), filter .12s;
  user-select: none;
}
.btn:hover { background: var(--btn-h); }
.btn:active { filter: brightness(.92); transform: scale(.96); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary, .btn-glass { background: var(--btn-sec); color: #fff; }
.btn-secondary:hover, .btn-glass:hover { background: var(--btn-sec-h); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: rgba(237, 66, 69, .12); }
.btn-round { border-radius: 50%; width: 36px; height: 36px; padding: 0; flex-shrink: 0; }
.btn-round svg { width: 16px; height: 16px; }
.btn-sq { padding: 8px 14px; border-radius: 12px; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 999px; }

.rbtn {
  width: 34px; height: 34px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; transition: background .12s, color .12s, transform .12s ease;
}
.rbtn svg { width: 18px; height: 18px; }
.rbtn:hover { background: var(--hover); color: var(--text); }
.rbtn:active { transform: scale(.9); }
.rbtn.danger { background: var(--danger); color: #fff; border-radius: 12px; }
.rbtn.danger:hover { filter: brightness(1.08); }
.rbtn.ghost { background: transparent; color: var(--muted); }

/* ---------- MAIN ---------- */
.main {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--chat);
}
.empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: var(--muted);
  padding: 32px 24px;
  animation: fadeUp .35s ease both;
}
.empty-mark {
  width: 80px; height: 80px; border-radius: 24px;
  background: var(--bg-4); color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; margin-bottom: 4px;
  box-shadow: inset 0 0 0 1px var(--stroke);
}
.empty-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.empty-sub { font-size: 14px; color: var(--muted); text-align: center; max-width: 340px; line-height: 1.45; }
.empty-art { display: none; }

/* ---------- CHAT ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 52px; min-height: 52px;
  padding: 0 18px;
  background: var(--chat);
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
  border-radius: 0; margin: 0;
  z-index: 2;
}
.chat-peer { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; flex: 1; }
.head-ava { display: inline-flex; align-items: center; }
.head-ava .avatar, .head-ava img { width: 32px !important; height: 32px !important; font-size: 13px; }
.cp-info { min-width: 0; }
#chatPeerName { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-status { font-size: 12px; color: var(--muted-2); margin-top: 1px; }
.cp-status.online { color: var(--green); }
.cp-status.typing { color: var(--green); font-style: italic; }
.chat-actions { display: flex; gap: 4px; }
.chat-back { display: none; }

/* ---------- MESSAGES (Stream grouping × Discord flat × iOS round media) ---------- */
.messages {
  flex: 1; overflow-y: auto;
  padding: 12px 0 18px;
  display: flex; flex-direction: column;
  scroll-behavior: smooth;
}
.mrow {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 2px 18px;
  margin-top: 14px;
  position: relative;
  animation: msgIn .2s cubic-bezier(.2,.8,.3,1) both;
  transition: background .12s ease;
  border-radius: 8px;
}
.mrow.grp { margin-top: 1px; padding-top: 0; padding-bottom: 0; }
.mrow.me, .mrow.them { justify-content: flex-start; }
.mrow:hover { background: rgba(4, 4, 5, .07); }
html[data-theme="snow"] .mrow:hover { background: rgba(0,0,0,.04); }
.m-ava {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  font-size: 15px; margin-right: 0; align-self: flex-start;
  cursor: pointer; transition: transform .12s ease;
}
.m-ava:hover { transform: scale(1.06); }
.mrow.grp .m-ava { visibility: hidden; height: 0; width: 40px; margin: 0; }
.m-stack { max-width: min(680px, calc(100% - 60px)); display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mrow.me .m-stack { align-items: flex-start; }
.m-bubble {
  position: relative;
  padding: 0;
  border-radius: 0;
  font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
  box-shadow: none; background: transparent; border: none; color: var(--text);
}
.mrow.me .m-bubble, .mrow.them .m-bubble {
  background: transparent; color: var(--text); border: none; backdrop-filter: none;
}
.m-meta {
  display: inline-flex; align-items: center; gap: 4px;
  float: none; margin: 0 0 0 8px;
  font-size: 11px; opacity: .7; font-weight: 500;
  user-select: none; white-space: nowrap; vertical-align: middle;
}
.m-author {
  font-size: 15px; font-weight: 650; margin-bottom: 2px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.m-author .m-ts { font-size: 11px; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.sysmsg {
  align-self: center; font-size: 12px; color: var(--muted-2);
  background: rgba(0,0,0,.18); border: none;
  padding: 6px 14px; border-radius: 999px; margin: 12px auto;
  text-align: center;
}
.file-msg { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 10px 12px; background: var(--bg-2); border-radius: 16px; border: 1px solid var(--stroke); margin-top: 4px; }
.file-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.file-ico svg { width: 18px; height: 18px; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12px; color: var(--muted-2); margin-top: 1px; }
.prog { height: 4px; background: rgba(0,0,0,.35); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.prog > div { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; transition: width .15s linear; }
.file-dl { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--link); text-decoration: none; cursor: pointer; }
.file-dl:hover { text-decoration: underline; }
.file-expired { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.m-quote {
  border-left: 3px solid var(--accent);
  background: rgba(0,0,0,.15);
  border-radius: 0 12px 12px 0; padding: 6px 10px; margin-bottom: 4px;
  font-size: 13px; overflow: hidden;
}
.m-quote .q-name { font-weight: 600; font-size: 12px; color: var(--accent); margin-bottom: 1px; }
.m-quote .q-text { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.m-edited { font-size: 10px; opacity: .55; font-style: italic; }
.m-bubble.deleted { color: var(--muted-2) !important; font-style: italic; font-size: 14px; }
.m-img { margin: 4px 0; }
.m-img img {
  display: block; max-width: 400px; max-height: 300px; border-radius: 18px;
  cursor: zoom-in;
}
.m-img .prog { margin: 6px 0 0; }
.m-vid video { max-width: min(420px, 100%); border-radius: 18px; background: #000; }
.m-meta .m-state { font-size: 11px; color: var(--muted-2); opacity: .8; letter-spacing: -.04em; }
.m-state.read { color: var(--accent); opacity: 1; text-shadow: none; }

/* ---------- COMPOSER (Stream composer × iOS pill) ---------- */
.composer { padding: 0 16px 22px; position: relative; }
.composer-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: none;
  border-radius: 22px 22px 0 0; padding: 10px 14px; margin-bottom: 0;
  border-bottom: 1px solid var(--stroke);
}
.cb-ico { color: var(--accent); display: flex; }
.cb-ico svg { width: 16px; height: 16px; }
.cb-body { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 10px; border-radius: 0 8px 8px 0; }
.cb-title { font-size: 12px; font-weight: 700; color: var(--accent); }
.cb-text { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-x {
  width: 28px; height: 28px; border-radius: 14px; border: none; flex-shrink: 0;
  background: transparent; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, transform .12s;
}
.cb-x svg { width: 14px; height: 14px; }
.cb-x:hover { background: var(--hover); color: var(--text); }
.cb-x:active { transform: scale(.9); }
.composer-pill {
  display: flex; align-items: flex-end; gap: 6px;
  background: var(--input); border: none;
  border-radius: 28px; padding: 6px 10px 6px 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transition: background .15s, box-shadow .15s;
}
.composer-bar:not(.hidden) + .composer-pill { border-radius: 0 0 22px 22px; box-shadow: none; }
.composer-pill:focus-within {
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent), 0 10px 32px rgba(0,0,0,.22);
  background: var(--bg-4);
}
#msgInput {
  flex: 1; resize: none; max-height: 160px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 10px 6px; line-height: 1.4;
}
#msgInput::placeholder { color: #6d6f78; }
.send-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); border: none; color: #fff;
  cursor: pointer; box-shadow: 0 4px 14px rgba(88,101,242,.35);
  transition: background .12s, transform .12s cubic-bezier(.2,.8,.3,1);
}
.send-btn svg { width: 16px; height: 16px; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:active { transform: scale(.9); }
.hidden-input { display: none; }

.emoji-pop {
  position: absolute; bottom: 72px; left: 16px; z-index: 60;
  width: 340px; max-height: 260px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--stroke-2); border-radius: 20px;
  padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  box-shadow: var(--shadow);
}
.emoji-pop button {
  border: none; background: transparent; font-size: 20px; line-height: 1;
  padding: 6px 0; border-radius: 10px; cursor: pointer;
}
.emoji-pop button:hover { background: var(--hover); }

/* ---------- SETTINGS ---------- */
.settings { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.settings-scroll {
  flex: 1; overflow-y: auto; padding: 16px 24px 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.set-group { max-width: 740px; width: 100%; margin: 0 auto; }
.set-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--muted-2); margin: 0 0 8px;
}
.set-card {
  background: var(--bg-2); border: none; border-radius: 8px;
  padding: 16px 18px; box-shadow: none;
}
.set-line { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; padding: 4px 0 8px; }
.devices-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.device-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--stroke);
}
.device-meta { min-width: 0; flex: 1; }
.device-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.device-badge { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--accent); }
.device-kick { flex-shrink: 0; padding: 6px 12px; font-size: 12px; }
.theme-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-card {
  flex: 1; min-width: 120px; cursor: pointer;
  background: var(--bg-3); border: 1px solid transparent; border-radius: 8px;
  padding: 10px; text-align: center;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.theme-card small { color: var(--muted-2); font-size: 10px; font-weight: 500; }
.theme-card:hover { border-color: var(--stroke-2); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sw { width: 100%; height: 36px; border-radius: 6px; border: 1px solid var(--stroke); }
.sw-discord { background: linear-gradient(120deg, #1e1f22 45%, #5865F2); }
.sw-rednight { background: linear-gradient(120deg, #1a1214 52%, #ed4245); }
.sw-amoled { background: linear-gradient(120deg, #000 52%, #ff2d55); }
.sw-gnome { background: linear-gradient(120deg, #2c2c2e 52%, #5e5ce6); }
.sw-ocean { background: linear-gradient(120deg, #0b1624 52%, #3b82f6); }
.sw-matrix { background: linear-gradient(120deg, #050a07 52%, #23a559); }
.sw-vapor { background: linear-gradient(120deg, #1a0f24 52%, #eb459e); }
.sw-gold { background: linear-gradient(120deg, #12100a 52%, #f0b232); }
.sw-snow { background: linear-gradient(120deg, #f2f3f5 52%, #5865F2); }
.sw-darkglass { background: linear-gradient(120deg, #0e1116 52%, #22d3ee); }
.sw-cyber { background: linear-gradient(120deg, #0a0612 52%, #39ff14); }

.author-badge {
  display: inline-flex; align-items: center; gap: 3px; vertical-align: middle;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  background: linear-gradient(135deg, #f0b232, #d4920f);
  line-height: 1.4;
}
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.author-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; text-decoration: none;
  color: var(--link); cursor: pointer;
  padding: 8px 12px; border-radius: 12px;
  background: var(--bg-3); border: none;
  transition: background .12s, transform .12s;
}
.author-link:hover { text-decoration: underline; background: var(--hover); }
.author-link:active { transform: scale(.97); }

/* ---------- ОБОИ (видны сквозь полупрозрачные панели) ---------- */
.wallpaper {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none; background: transparent;
}
.wallpaper img, .wallpaper video {
  width: 100%; height: 100%; object-fit: cover;
}
.wall-dimmer {
  position: fixed; inset: 0; z-index: 0;
  background: var(--bg); opacity: .55;
  pointer-events: none;
}
.wall-prev {
  width: 100%; height: 88px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--stroke); background: var(--bg-3);
  display: flex; align-items: center; justify-content: center; font-size: 12px; margin-bottom: 10px;
}
.wall-prev img, .wall-prev video { width: 100%; height: 100%; object-fit: cover; }
#wallDim { width: 100%; accent-color: var(--accent); }
html[data-fs="s"] .m-bubble { font-size: 13px; }
html[data-fs="s"] .ci-preview { font-size: 11px; }
html[data-fs="l"] .m-bubble { font-size: 17px; }
html[data-fs="l"] .ci-preview { font-size: 14px; }
html[data-fs="l"] #msgInput { font-size: 16px; }
.set-card select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b5bac1' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px !important; cursor: pointer; margin-bottom: 4px;
}
.set-card select option { background: var(--bg0); color: var(--text); }
.about-line { font-size: 14px; padding: 4px 0; }
#profSaveBtn { margin-top: 12px; }

.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0; border-radius: 999px;
  background: #72767d; transition: background .2s; cursor: pointer;
}
.switch .sl::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.switch input:checked + .sl { background: var(--green); }
.switch input:checked + .sl::before { transform: translateX(16px); }

.prof-banner-prev {
  width: 100%; height: 96px; border-radius: 8px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, var(--accent), var(--bg) 75%);
  background-size: cover; background-position: center; margin-bottom: 10px;
}
.prof-btns-row { display: flex; gap: 8px; margin-bottom: 6px; }
.prof-row { display: flex; align-items: center; gap: 16px; margin: 12px 0 4px; }
.prof-ava-wrap { width: 80px; height: 80px; position: relative; flex-shrink: 0; }
.prof-ava-wrap .prof-ava { width: 80px; height: 80px; font-size: 32px; border-radius: 50%; object-fit: cover; }
.prof-btns { display: flex; flex-direction: column; gap: 8px; }

/* ---------- MODALS ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .7);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s both;
}
.modal-card {
  background: var(--bg-mod); border-radius: 8px; padding: 24px;
  text-align: center; box-shadow: var(--shadow); min-width: 320px;
}
.req-ava {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--accent); color: #fff; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.req-ava img { width: 100%; height: 100%; object-fit: cover; }
.modal-peer { color: var(--text); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-type { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- CALL STAGE (FaceTime glass × Discord dark × iOS round) ---------- */
.call-stage {
  position: fixed; inset: 0; z-index: 380;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  background: #0c0d10;
  animation: fadeIn .25s both;
}
.call-stage.hidden { display: none !important; }
.call-stage.leaving { opacity: 0; transition: opacity .25s; }
.cs-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(55% 42% at 50% 28%, rgba(88,101,242,.22), transparent 72%), #0c0d10;
}
.cs-remote {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; background: #000;
  transition: object-fit .2s ease;
}
.call-stage.audio-only .cs-remote { opacity: 0; pointer-events: none; }
.call-stage.remote-share .cs-remote { object-fit: contain; background: #050506; }
.cs-audio {
  position: absolute; inset: 0; z-index: 2;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.call-stage.audio-only .cs-audio { display: flex; }
.cs-ring {
  position: absolute; width: 148px; height: 148px; border-radius: 50%;
  border: 2px solid rgba(88,101,242,.45); opacity: 0;
  animation: csPulse 2s ease-out infinite;
}
.cs-ring-b { animation-delay: 1s; }
@keyframes csPulse { 0% { transform: scale(.75); opacity: .6; } 100% { transform: scale(1.55); opacity: 0; } }
.as-ava-wrap {
  position: relative; width: 128px; height: 128px;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.as-speak-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid transparent; opacity: 0;
  transition: opacity .15s, transform .15s, border-color .15s;
  pointer-events: none;
}
.as-ava-wrap.speaking .as-speak-ring {
  opacity: 1; border-color: var(--green);
  box-shadow: 0 0 0 6px rgba(35,165,89,.18), 0 0 28px rgba(35,165,89,.35);
  transform: scale(1.04);
  animation: speakPulse 1.1s ease-in-out infinite;
}
@keyframes speakPulse {
  0%, 100% { transform: scale(1.02); }
  50% { transform: scale(1.08); }
}
.call-stage .as-ava {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: #fff; font-size: 48px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid rgba(255,255,255,.12); position: relative; z-index: 1;
}
.call-stage .as-ava img { width: 100%; height: 100%; object-fit: cover; }
.call-stage .as-name { font-size: 26px; font-weight: 700; color: #fff; z-index: 1; letter-spacing: -.02em; }
.cs-state { color: rgba(255,255,255,.62); font-size: 14px; z-index: 1; }
.cs-local-wrap {
  position: absolute; right: 16px; top: calc(16px + env(safe-area-inset-top));
  z-index: 5; width: 148px;
}
.cs-local {
  width: 100%; display: block;
  border-radius: 22px;
  border: 2px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 40px rgba(0,0,0,.45); background: #111;
  transform-origin: top right;
  transition: transform .2s ease, box-shadow .2s ease;
}
.call-stage.sharing .cs-local {
  box-shadow: 0 0 0 2px var(--green), 0 12px 40px rgba(0,0,0,.5);
}
.cs-local-label {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(35,165,89,.9); border-radius: 999px; padding: 3px 8px;
  pointer-events: none;
}
.cs-local-label.hidden { display: none !important; }
.cs-top {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 0; right: 0;
  z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.cs-peer { text-align: center; }
.cs-name { color: #fff; font-size: 16px; font-weight: 650; opacity: .96; margin-bottom: 4px; }
.cs-top-actions {
  position: absolute; top: 0; right: 14px;
  display: flex; gap: 8px; pointer-events: auto;
}
.cs-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(20,20,24,.55); color: #fff; cursor: pointer; font-size: 14px;
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.1);
}
.cs-icon-btn:hover { background: rgba(255,255,255,.14); }
.call-stage .call-duration {
  position: static; display: inline-block;
  background: rgba(20,20,24,.5); border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.call-stage .share-badge {
  position: static; transform: none; pointer-events: none;
  color: #fff; font-size: 12px; font-weight: 650;
  background: rgba(35,165,89,.92); border-radius: 999px; padding: 6px 12px;
  box-shadow: 0 6px 18px rgba(35,165,89,.3);
}
.call-stage .share-badge.remote { background: rgba(88,101,242,.92); box-shadow: 0 6px 18px rgba(88,101,242,.3); }
.call-stage.minimized { display: none !important; }
.call-audio-panel {
  position: absolute; left: 50%; bottom: calc(128px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 8;
  width: min(360px, calc(100vw - 28px));
  padding: 16px 16px 18px;
  background: rgba(30,31,34,.88); border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45); pointer-events: auto;
  backdrop-filter: blur(22px) saturate(1.25); -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.call-audio-panel.hidden { display: none !important; }
.cap-title { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.call-audio-panel .fld-label { color: var(--muted); font-size: 11px; margin: 8px 0 4px; display: block; }
.call-audio-panel select, .call-audio-panel input[type="range"] { width: 100%; box-sizing: border-box; }
.call-audio-panel select {
  background: #1e1f22; color: #fff; border: none; border-radius: 12px; padding: 9px 10px; font-size: 13px;
}
.cap-meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 6px; }
.cap-meter-fill { height: 100%; width: 0%; border-radius: 999px; background: var(--green); transition: width .08s linear; }

.call-pip {
  position: fixed; z-index: 370;
  left: 14px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  max-width: 420px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(30,31,34,.92); border: 1px solid rgba(255,255,255,.1); border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4); color: #fff; cursor: pointer;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.call-pip.hidden { display: none !important; }
.pip-ava {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; overflow: hidden;
}
.pip-ava img { width: 100%; height: 100%; object-fit: cover; }
.pip-meta { min-width: 0; flex: 1; }
.pip-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pip-state { font-size: 11px; color: var(--muted); margin-top: 1px; }
.pip-dur { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); flex-shrink: 0; }
.pip-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; flex-shrink: 0;
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer; font-size: 12px;
}
.pip-btn:hover { background: rgba(255,255,255,.18); }
.pip-btn.off { background: #fff; color: #111; }
.pip-btn.pip-end { background: var(--danger); }
.cs-controls {
  position: relative; z-index: 6;
  display: flex; gap: 14px; align-items: flex-end; justify-content: center;
  margin-bottom: calc(28px + env(safe-area-inset-bottom));
  padding: 14px 18px 12px;
  background: rgba(22,23,27,.72);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
}
.ft-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ft-lbl {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.55);
  letter-spacing: .02em; text-transform: lowercase; user-select: none;
}
.ft-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.08);
  color: #fff; cursor: pointer;
  transition: background .12s, transform .12s, box-shadow .12s;
}
.ft-btn svg { width: 20px; height: 20px; }
.ft-btn:hover { background: rgba(255,255,255,.2); }
.ft-btn:active { transform: scale(.94); }
.ft-btn.off { background: #fff; color: #111; border-color: transparent; }
.ft-btn.end {
  background: var(--danger); width: 60px; height: 60px; border: none;
  box-shadow: 0 8px 24px rgba(237,66,69,.4);
}
.ft-btn.end:hover { filter: brightness(1.08); }
.as-eq { display: flex; align-items: flex-end; gap: 4px; height: 22px; z-index: 1; opacity: .35; transition: opacity .2s; }
.as-ava-wrap.speaking ~ .as-eq,
.call-stage.peer-speaking .as-eq { opacity: 1; }
.as-eq i {
  width: 4px; border-radius: 2px; background: var(--accent);
  animation: eqBounce 1s ease-in-out infinite;
  animation-play-state: paused;
}
.call-stage.peer-speaking .as-eq i,
.as-ava-wrap.speaking ~ .as-eq i { animation-play-state: running; }
.as-eq i:nth-child(1) { height: 30%; }
.as-eq i:nth-child(2) { height: 70%; animation-delay: .15s; }
.as-eq i:nth-child(3) { height: 100%; animation-delay: .3s; }
.as-eq i:nth-child(4) { height: 60%; animation-delay: .45s; }
.as-eq i:nth-child(5) { height: 35%; animation-delay: .6s; }
@keyframes eqBounce { 50% { transform: scaleY(.35); } }

/* ---------- INCOMING CALL ---------- */
.call-modal { background: rgba(0,0,0,.75); z-index: 400; }
.ios-call { text-align: center; padding: 24px; }
.call-avatar-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 24px; }
.call-avatar {
  position: absolute; inset: 10px; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: #fff; font-size: 48px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #2b2d31;
}
.call-avatar img { width: 100%; height: 100%; object-fit: cover; }
.call-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ringPulse 1.8s ease-out infinite; }
.call-ring.r2 { animation-delay: .9s; }
@keyframes ringPulse { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.45); opacity: 0; } }
.call-name { color: #fff; font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.call-status { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.ios-call-actions { display: flex; gap: 64px; justify-content: center; }
.ica { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ica span { font-size: 12px; color: var(--muted); }
.big-btn {
  width: 64px; height: 64px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
}
.big-btn svg { width: 28px; height: 28px; }
.big-btn.accept { background: var(--green); }
.big-btn.decline { background: var(--danger); }

/* ---------- PROFILE CARD ---------- */
.pcard {
  position: relative; width: 340px; max-width: 94vw;
  background: var(--bg-mod); border: 1px solid var(--stroke);
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow);
}
.pcard-banner {
  position: relative; height: 120px;
  background: linear-gradient(135deg, var(--accent), var(--bg) 80%);
}
.pcard-banner::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -40px 36px -28px rgba(0,0,0,.55); }
#pfBanner { position: absolute; inset: 0; }
#pfBanner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pcard-close svg { width: 14px; height: 14px; }
.pcard-ava-wrap { position: relative; width: 84px; height: 84px; margin: -42px auto 0; }
#pfAva {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--bg-mod); background: var(--accent);
}
#pfAva .avatar { width: 100%; height: 100%; font-size: 36px; border-radius: 50%; }
#pfAva img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-dot {
  position: absolute; right: 2px; bottom: 4px; z-index: 2;
  width: 18px; height: 18px; border: 4px solid var(--bg-mod);
}
.pcard-body { padding: 10px 20px 20px; text-align: center; }
.pcard-name { font-size: 20px; font-weight: 700; margin-top: 6px; }
.pcard-user { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pcard-statusline { color: var(--muted); font-size: 13px; margin-top: 8px; }
.pcard-statusline.online { color: var(--green); }
.pcard-bio {
  margin-top: 12px; text-align: left;
  background: var(--bg-3); border-radius: 6px; padding: 10px 12px;
  font-size: 13px; line-height: 1.45; white-space: pre-wrap;
}
.pcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pcard-actions .btn { width: 100%; }
#pfMsg, #pfEdit, #pfDel { grid-column: 1 / -1; }
.pcard.author { box-shadow: var(--shadow), 0 0 0 1px rgba(240,178,50,.35); }
.pf-pinned { margin-top: 14px; text-align: left; }
.pf-pinned-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.pf-pinned-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; background: var(--bg-3); border-radius: 8px; margin-bottom: 8px;
}
.pf-pl-cover { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg-4); }
.pf-pl-cover img, .pf-pl-cover .cover-ph { width: 100%; height: 100%; object-fit: cover; }
.pf-pl-meta { flex: 1; min-width: 0; }
.pf-pl-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-pl-sub { font-size: 12px; color: var(--muted-2); }
.pf-tracks { display: flex; flex-direction: column; gap: 2px; }
.pf-track-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border: none; border-radius: 4px; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pf-track-row:hover { background: var(--hover); }
.pf-track-art { width: 36px; height: 36px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--bg-4); }
.pf-track-art img { width: 100%; height: 100%; object-fit: cover; }
.pf-track-meta { flex: 1; min-width: 0; }
.pf-track-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-track-artist { font-size: 11px; color: var(--muted-2); }
.pf-track-play { color: var(--muted); font-size: 12px; }
.pf-track-del { color: var(--danger); padding: 0 6px; cursor: pointer; }
.pf-empty-music { font-size: 12px; color: var(--muted-2); padding: 6px 2px; }
.pf-music-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- TOASTS ---------- */
.toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-2); border: 1px solid var(--stroke-2);
  border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); animation: toastIn .25s ease both; max-width: 80vw;
}
.toast.err { border-color: rgba(237,66,69,.5); color: #ffb3b5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- CROP / CTX / VIEWER / GROUPS ---------- */
.crop-modal { z-index: 420; }
.crop-card { width: min(660px, 94vw); border-radius: 8px; padding: 18px 20px; background: var(--bg-mod); }
.crop-title { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.crop-frame {
  position: relative; overflow: hidden;
  background: repeating-conic-gradient(#141318 0% 25%, #1b1c20 0% 50%) 0 0 / 22px 22px;
  border-radius: 6px; border: 1px solid var(--stroke);
  cursor: grab; touch-action: none; user-select: none;
}
.crop-frame:active { cursor: grabbing; }
.crop-frame.dragging { box-shadow: inset 0 0 0 2px var(--accent); }
#cropImg { position: absolute; pointer-events: none; max-width: none; }
.crop-zoom-row { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 17px; margin: 14px 2px 12px; }
#cropZoom { flex: 1; height: auto !important; padding: 0 !important; border: none !important; background: transparent !important; accent-color: var(--accent); cursor: pointer; }
.crop-actions { display: flex; gap: 10px; justify-content: flex-end; }

.ctx-menu {
  position: fixed; z-index: 600; min-width: 180px;
  background: var(--bg-2); border: 1px solid var(--stroke-2); border-radius: 6px;
  padding: 6px; box-shadow: var(--shadow);
}
.ctx-menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 10px; border-radius: 4px; cursor: pointer;
}
.ctx-menu button:hover { background: var(--accent); color: #fff; }
.ctx-menu button.danger { color: var(--danger); }
.ctx-menu button.danger:hover { background: var(--danger); color: #fff; }

.viewer { background: rgba(0,0,0,.88); z-index: 450; cursor: zoom-out; }
.viewer img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow); }
.viewer-x {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.viewer-x svg { width: 16px; height: 16px; }

.grp-card, .ginfo-card { width: 400px; max-width: 92vw; text-align: left; background: var(--bg-mod); }
.grp-card .modal-peer, .ginfo-card .modal-peer { text-align: center; }
.grp-card .modal-type, .ginfo-card .modal-type { text-align: center; }
.grp-title-inp {
  width: 100%; background: var(--bg0); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); font-family: inherit; font-size: 14px;
  padding: 10px 12px; outline: none; margin-bottom: 12px;
}
.grp-title-inp:focus { outline: 2px solid var(--accent); }
.grp-list { max-height: 220px; overflow-y: auto; margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.grp-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 4px; cursor: pointer;
}
.grp-pick:hover { background: var(--hover); }
.grp-pick .avatar { width: 32px; height: 32px; font-size: 13px; }
.grp-pick .gp-name { flex: 1; font-size: 14px; font-weight: 500; }
.grp-pick .gp-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--muted-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.grp-pick.on .gp-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.grp-pick .gp-check svg { width: 12px; height: 12px; }
.ginfo-ava {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--bg-4); display: flex; align-items: center; justify-content: center;
}
.ginfo-ava svg { width: 28px; height: 28px; color: var(--muted); }
.gi-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 4px;
}
.gi-member .avatar { width: 32px; height: 32px; font-size: 13px; }
.grp-ava {
  background: var(--bg-4) !important; border: none;
}
.grp-ava svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- MUSIC ---------- */
.music-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.music-scroll {
  flex: 1; overflow-y: auto; padding: 12px 16px 100px;
  display: flex; flex-direction: column; gap: 12px;
}
.music-sc-row { display: flex; gap: 8px; }
.music-sc-row input {
  flex: 1; border-radius: 4px; border: none;
  background: var(--bg0); color: inherit; padding: 10px 12px; font: inherit;
}
.music-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; color: var(--muted-2);
}
.track-grid, .pl-tracks { display: flex; flex-direction: column; gap: 2px; }
.track-card, .sp-track {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border-radius: 4px; border: none; background: transparent; cursor: pointer;
  color: inherit; font: inherit; text-align: left; width: 100%;
}
.track-card:hover, .sp-track:hover { background: var(--hover); }
.tc-art, .sp-thumb {
  width: 40px; height: 40px; border-radius: 4px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-4); display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.tc-art img, .sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-body, .sp-tmeta { min-width: 0; flex: 1; }
.tc-title, .sp-ttitle { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-artist, .sp-tartist { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-play, .tc-add, .sp-more-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px;
}
.tc-play:hover, .tc-add:hover { background: var(--accent); color: #fff; }
.sp-more-btn:hover { background: var(--hover); color: var(--text); }
.lyrics-empty { color: var(--muted-2); font-size: 14px; padding: 24px 8px; text-align: center; }
.lyrics-pane, .pv-lyrics-body { min-height: 120px; }
.lyrics-scroll { padding: 12px; font-size: 16px; line-height: 1.6; }
.lrc-line { padding: 4px 0; color: var(--muted); transition: color .15s; }
.lrc-line.active { color: var(--text); font-weight: 600; }
.lyrics-note { font-size: 11px; color: var(--muted-2); margin-top: 12px; }
.track-badge, .tb {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px; background: var(--accent-soft); color: var(--accent);
  margin-left: 4px; vertical-align: middle;
}
.tc-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: middle;
}
.tc-badge.yandex { background: rgba(255,204,0,.15); color: #ffcc00; }
.tc-badge.full, .tc-badge.prev { display: none !important; }

/* Spotify-like playlist page → Discord dark */
.playlist-view .sp-page { flex: 1; overflow-y: auto; background: var(--chat); }
.sp-hero {
  display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap;
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, #3b4170 0%, var(--chat) 100%) !important;
  position: relative;
}
.sp-back { position: absolute; top: 12px; left: 12px; }
.sp-cover {
  width: 180px; height: 180px; border-radius: 8px; overflow: hidden;
  background: var(--bg-4); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--muted);
}
.sp-cover img { width: 100%; height: 100%; object-fit: cover; }
.sp-meta { flex: 1; min-width: 200px; }
.sp-kind { font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.sp-title { font-size: 42px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; margin-bottom: 10px; }
.sp-creator { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.sp-ava { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: var(--accent); }
.sp-ava img, .sp-ava .avatar { width: 100%; height: 100%; object-fit: cover; }
.sp-dot { opacity: .5; }
.sp-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-actions-left, .sp-actions-right { display: flex; align-items: center; gap: 8px; }
.sp-ico {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.sp-ico:hover { color: var(--text); }
.sp-shuffle {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: transparent; color: var(--muted); font-size: 18px; cursor: pointer;
}
.sp-shuffle.on { color: var(--accent); }
.sp-play {
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sp-play:hover { background: var(--accent-hover); transform: scale(1.04); }
.sp-add-song {
  margin-top: 10px; background: transparent; border: 1px solid var(--stroke-2);
  color: var(--muted); border-radius: 4px; padding: 6px 12px; cursor: pointer; font: inherit;
}
.sp-add-song:hover { border-color: var(--text); color: var(--text); }
.sp-list { padding: 8px 16px 100px; }

/* now playing + full player — только над main, не режет sidebar/me-card */
.now-playing {
  position: fixed; z-index: 95;
  left: 340px; right: 0; bottom: 0;
  height: 64px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--bg-elev); border-top: 1px solid var(--stroke);
  color: var(--text); cursor: pointer;
  box-shadow: 0 -4px 16px rgba(0,0,0,.18);
}
.now-playing.hidden { display: none !important; }
body.has-np .composer { padding-bottom: 84px; }
body.has-np .music-scroll, body.has-np .sp-list, body.has-np .settings-scroll { padding-bottom: 100px; }
body.has-np .modal { align-items: center; padding-bottom: 72px; }
body.has-np .pcard { margin-bottom: 8px; }
.np-art { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--bg-4); flex-shrink: 0; }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-meta { min-width: 0; flex: 1; }
.np-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-btn {
  width: 34px; height: 34px; border-radius: 12px; border: none;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px;
  transition: background .12s, color .12s, transform .12s;
}
.np-btn:hover { color: var(--text); background: var(--hover); }
.np-btn:active { transform: scale(.9); }

.player-view {
  position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: var(--chat); overflow: hidden;
}
.pv-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.2); transform: scale(1.2); opacity: .35;
}
.pv-veil { position: absolute; inset: 0; background: rgba(30,31,34,.78); }
.pv-shell {
  position: relative; z-index: 1; flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px 100px; gap: 16px;
}
.pv-close { align-self: flex-end; }
.pv-art-wrap { width: min(320px, 70vw); }
.pv-art {
  width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: var(--bg-4); box-shadow: var(--shadow);
}
.pv-art img { width: 100%; height: 100%; object-fit: cover; }
.pv-art-pop { animation: popIn .3s ease both; }
.pv-info { text-align: center; width: min(420px, 100%); }
.pv-title { font-size: 22px; font-weight: 700; }
.pv-artist { font-size: 15px; color: var(--muted); margin-top: 4px; }
.pv-album { font-size: 12px; margin-top: 4px; }
.pv-progress { width: min(420px, 100%); }
.pv-progress input[type="range"] { width: 100%; accent-color: var(--accent); }
.pv-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.pv-controls { display: flex; align-items: center; gap: 12px; }
.pv-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: transparent; color: var(--text); font-size: 16px; cursor: pointer;
}
.pv-btn.pv-main { width: 52px; height: 52px; background: var(--accent); color: #fff; }
.pv-btn:hover { background: var(--hover); }
.pv-btn.pv-main:hover { background: var(--accent-hover); }
.pv-lyrics-card {
  width: min(520px, 100%); background: var(--bg-2); border-radius: 8px;
  padding: 12px 14px; max-height: 280px; overflow: hidden;
}
.pv-lyrics-head { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.pv-lyrics-body { max-height: 220px; overflow-y: auto; }

.sc-widget-host iframe { width: 100%; height: 120px; border: 0; }
.sc-widget-offscreen {
  position: fixed; left: -9999px; top: 0; width: 320px; height: 120px; opacity: 0; pointer-events: none;
}
.cover-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--accent);
}

/* ---------- SCROLLBARS ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: var(--scroll); border-radius: 4px;
  border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-h); background-clip: padding-box; }

input, textarea, select, button { font-family: inherit; }
button { user-select: none; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
.btn:focus-visible, .seg-btn:focus-visible, .rbtn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

/* ---------- MOBILE ---------- */
.burger {
  display: none; position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px;
  z-index: 70; width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px; background: var(--bg-2); border: 1px solid var(--stroke);
  color: inherit; cursor: pointer; touch-action: manipulation;
}
#sbBackdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}

@media (max-width: 820px) {
  .app { padding: 0; gap: 0; height: 100dvh; width: 100%; overflow: hidden; }
  .nav-rail {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 85;
    transform: translateX(0);
    transition: transform .25s ease;
  }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 72px; right: 0;
    width: auto; min-width: 0; max-width: none;
    z-index: 80; border-radius: 0;
    padding: 0;
    transform: none;
    transition: transform .25s ease;
  }

  /* full-screen chat/settings/music: hide rail+list completely */
  body.chat-open .nav-rail,
  body.settings-open .nav-rail,
  body.music-open .nav-rail,
  body.player-open .nav-rail,
  body.chat-open .sidebar,
  body.settings-open .sidebar,
  body.music-open .sidebar,
  body.player-open .sidebar {
    transform: translateX(-120%);
    pointer-events: none;
    visibility: hidden;
  }
  body.sb-open .nav-rail,
  body.sb-open .sidebar {
    transform: none;
    pointer-events: auto;
    visibility: visible;
  }
  body.sb-open #sbBackdrop { opacity: 1; pointer-events: auto; }

  /* header back buttons own navigation — burger stays hidden on mobile */
  .burger { display: none !important; }

  .main { flex: 1; width: 100%; min-width: 0; min-height: 0; }
  body:not(.chat-open):not(.settings-open):not(.music-open):not(.player-open) .main {
    visibility: hidden; pointer-events: none; position: absolute; inset: 0;
  }

  section.view, .chat, .settings, .music-view {
    flex: 1; width: 100%; min-width: 0; min-height: 0;
    display: flex; flex-direction: column;
  }

  .chat-head {
    height: auto; min-height: 48px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    gap: 6px;
  }
  .chat-back { display: inline-flex !important; width: 36px; height: 36px; }
  .chat-actions .rbtn { width: 36px; height: 36px; }

  .messages { padding: 8px 0 8px; -webkit-overflow-scrolling: touch; }
  .mrow { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .m-ava { width: 36px; height: 36px; }
  .mrow.grp .m-ava { width: 36px; }
  .m-stack { max-width: calc(100% - 50px); }
  .m-img img { max-width: min(320px, 78vw); }

  .composer {
    padding: 4px 10px calc(12px + env(safe-area-inset-bottom));
    flex-shrink: 0;
  }
  body.has-np .composer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .composer textarea, #msgInput { font-size: 16px !important; }
  .send-btn, .composer .rbtn { width: 36px; height: 36px; min-width: 36px; }

  .settings-scroll {
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
  }
  .auth { background: #1e1f22; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); overflow-y: auto; }
  .auth-card { max-width: 92vw; width: 100%; }
  .now-playing { left: 0 !important; }
  body.has-np .modal { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toasts {
    left: 12px; right: 12px; transform: none; top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .sp-title { font-size: 28px; }
  .sp-cover { width: 140px; height: 140px; }
  .app, .sidebar, .main, .messages, .settings-scroll { overflow-x: hidden; }
  .file-msg { min-width: 0; max-width: 100%; }
}

@media (max-width: 420px) {
  .nav-rail { width: 64px; min-width: 64px; }
  .rail-btn.seg-btn, .rail-brand { width: 44px; height: 44px; }
  .sidebar { left: 64px; }
  .ios-call-actions { gap: 36px; }
  .cs-local-wrap { width: 104px; right: 10px; }
  .ft-btn { width: 46px; height: 46px; }
  .ft-btn.end { width: 54px; height: 54px; }
  .cs-controls { gap: 10px; padding: 12px 12px 10px; border-radius: 24px; }
  .ft-lbl { font-size: 9px; }
  .m-vid video { max-width: 86vw; }
}

/* ---------- WALLPAPER VISIBILITY (theme-aware translucent panels) ---------- */
body.has-wall .app { background: transparent; }
body.has-wall .nav-rail { background: var(--wall-rail); }
body.has-wall .sidebar { background: var(--wall-side); }
body.has-wall .main,
body.has-wall .chat,
body.has-wall .settings,
body.has-wall .music-view,
body.has-wall .player-view,
body.has-wall .empty-state { background: transparent; }
body.has-wall .messages { background: transparent; }
body.has-wall .chat-head,
body.has-wall .sidebar-head,
body.has-wall .music-head {
  background: var(--wall-head);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.has-wall .sidebar-foot { background: var(--wall-foot); }
body.has-wall .composer-pill { background: var(--wall-comp); }
body.has-wall .composer-bar { background: var(--wall-side); }
body.has-wall .set-card,
body.has-wall .search-wrap,
body.has-wall .input-row input { background: var(--wall-input); }
body.has-wall .settings-scroll,
body.has-wall .music-scroll,
body.has-wall .sp-page { background: transparent; }
body.has-wall .now-playing { background: var(--wall-foot); }

/* inputs rounder */
.search-wrap { border-radius: 12px !important; }
.auth input, .set-card input[type="text"], .set-card input[type="password"],
.set-card input[type="email"], .set-card textarea, .set-card select,
.input-row input, .music-sc-row input, .grp-title-inp {
  border-radius: 12px !important;
}
.me-card { border-radius: 12px; transition: background .12s, transform .12s; }
.me-card:active { transform: scale(.98); }
.modal-card, .pcard, .crop-card, .grp-card, .ginfo-card { border-radius: 16px; }
.set-card { border-radius: 14px; }
.theme-card { border-radius: 14px; transition: border-color .15s, transform .12s; }
.theme-card:active { transform: scale(.97); }
.emoji-pop { border-radius: 16px; }
.ctx-menu { border-radius: 14px; }
.file-msg { border-radius: 14px; }

/* ---------- PROFILE FLAIR / ДЕКОР ПРОФАКИ ---------- */
.pcard-banner-fx {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: .85; mix-blend-mode: soft-light;
}
.pcard[data-ban="wave"] .pcard-banner-fx {
  background:
    radial-gradient(120% 80% at 10% 110%, var(--accent-soft), transparent 55%),
    radial-gradient(90% 70% at 90% -10%, var(--accent), transparent 50%);
}
.pcard[data-ban="grid"] .pcard-banner-fx {
  background-image:
    linear-gradient(var(--stroke-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--stroke-2) 1px, transparent 1px);
  background-size: 18px 18px; opacity: .55; mix-blend-mode: normal;
}
.pcard[data-ban="aurora"] .pcard-banner-fx {
  background: linear-gradient(115deg, transparent 20%, var(--accent-soft) 45%, transparent 70%),
    linear-gradient(250deg, transparent 30%, color-mix(in srgb, var(--yellow) 40%, transparent) 55%, transparent 75%);
  animation: pfAurora 6s ease-in-out infinite alternate;
}
.pcard[data-ban="stripes"] .pcard-banner-fx {
  background: repeating-linear-gradient(-45deg, transparent, transparent 10px, var(--accent-soft) 10px, var(--accent-soft) 20px);
  opacity: .45; mix-blend-mode: normal;
}
.pcard[data-ban="noise"] .pcard-banner-fx {
  background:
    radial-gradient(circle at 20% 30%, var(--accent-soft), transparent 40%),
    radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--green) 35%, transparent), transparent 42%);
}
@keyframes pfAurora { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

.pcard-ava-wrap { z-index: 2; }
.pcard-ava-ring {
  position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  border: 2px solid transparent; z-index: 0;
}
.pcard[data-ring="accent"] .pcard-ava-ring {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px var(--accent-soft);
}
.pcard[data-ring="gold"] .pcard-ava-ring {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 30%, transparent), 0 0 16px color-mix(in srgb, var(--yellow) 35%, transparent);
}
.pcard[data-ring="neon"] .pcard-ava-ring {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 28px var(--accent-soft);
  animation: pfRingPulse 2.2s ease-in-out infinite;
}
.pcard[data-ring="matrix"] .pcard-ava-ring {
  border-color: var(--green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 35%, transparent), 0 0 14px color-mix(in srgb, var(--green) 40%, transparent);
}
.pcard[data-ring="dual"] .pcard-ava-ring {
  border: 3px solid transparent;
  background:
    linear-gradient(var(--bg-mod), var(--bg-mod)) padding-box,
    linear-gradient(135deg, var(--accent), var(--yellow), var(--accent)) border-box;
}
.pcard[data-ring="pulse"] .pcard-ava-ring {
  border-color: var(--accent);
  animation: pfRingPulse 1.4s ease-in-out infinite;
}
@keyframes pfRingPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent-soft); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px transparent, 0 0 20px var(--accent-soft); transform: scale(1.03); }
}

.pcard-ornament {
  position: absolute; top: -2px; left: -2px; z-index: 3;
  font-size: 18px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
  pointer-events: none;
}
.pcard[data-badge="none"] .pcard-ornament,
.pcard:not([data-badge]) .pcard-ornament { display: none; }
.pcard[data-badge="star"] .pcard-ornament::before { content: '⭐'; }
.pcard[data-badge="fire"] .pcard-ornament::before { content: '🔥'; }
.pcard[data-badge="heart"] .pcard-ornament::before { content: '💗'; }
.pcard[data-badge="bolt"] .pcard-ornament::before { content: '⚡'; }
.pcard[data-badge="gem"] .pcard-ornament::before { content: '💎'; }
.pcard[data-badge="ghost"] .pcard-ornament::before { content: '👻'; }
.pcard[data-badge="moon"] .pcard-ornament::before { content: '🌙'; }
.pcard[data-badge="rose"] .pcard-ornament::before { content: '🌹'; }

.pcard-name[data-namefx="glow"] {
  text-shadow: 0 0 12px var(--accent-soft), 0 0 24px var(--accent-soft);
  color: var(--text);
}
.pcard-name[data-namefx="gradient"] {
  background: linear-gradient(90deg, var(--accent), var(--yellow), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: pfNameShine 4s linear infinite;
}
.pcard-name[data-namefx="shine"] {
  text-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 50%, transparent);
  letter-spacing: .02em;
}
.pcard-name[data-namefx="type"] {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent); letter-spacing: -.02em;
}
@keyframes pfNameShine { to { background-position: 200% center; } }

.pcard-pins {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 10px; min-height: 0;
}
.pcard-pins:empty { display: none; }
.pf-pin {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: 11px; font-weight: 600; line-height: 1.2;
}
.pf-pin .pf-pin-ico { font-size: 12px; }

.pcard.author {
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--yellow) 45%, transparent),
    0 0 28px color-mix(in srgb, var(--yellow) 18%, transparent);
}
.pcard.author .pcard-ava-ring {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 28%, transparent);
}
.pcard.author .pcard-banner::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--yellow) 22%, transparent), transparent);
}

/* picker в настройках */
.flair-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--stroke); }
.flair-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted-2); margin: 10px 0 6px;
}
.flair-row { display: flex; flex-wrap: wrap; gap: 6px; }
.flair-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
  background: var(--bg-3); border: 1px solid transparent;
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600;
  transition: border-color .12s, background .12s, transform .1s;
}
.flair-chip:hover { border-color: var(--stroke-2); background: var(--hover); }
.flair-chip.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.flair-chip:active { transform: scale(.96); }
.flair-chip.pin-chip.active { background: var(--accent); color: #fff; }
