/* SOCIAL: истории, статусы, каналы, стикеры и GIF (social.js) */
.so-stories { display: flex; gap: 10px; padding: 8px 12px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); flex: none; }
.so-stories::-webkit-scrollbar { display: none; }
.so-st { position: relative; flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.so-st small { max-width: 62px; font-size: 11px; color: var(--muted, #8a9690); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-ring { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; padding: 2.5px; background: conic-gradient(from 210deg, #f59e0b, #ec4899, #8b5cf6, #22d3ee, #f59e0b); transition: transform .15s; }
.so-ring .av { width: 100% !important; height: 100% !important; border: 2.5px solid var(--sidebar, #101614); font-size: 18px; }
.so-ring.seen { background: rgba(255,255,255,.18); }
.so-ring.none { background: transparent; }
.so-st:hover .so-ring, .so-st:hover .so-tool { transform: scale(1.05); }
.so-add { position: absolute; right: 2px; top: 36px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #22c55e, #0ea5e9); border: 2px solid var(--sidebar, #101614); }
.so-tool { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.06); color: var(--muted, #aeb9b3); border: 1px dashed rgba(255,255,255,.18); transition: transform .15s; }
.so-tool b { font-size: 24px; }
#peer-av.so-has-story { box-shadow: 0 0 0 2px var(--bg, #0b0f0d), 0 0 0 4px #ec4899; }
.so-hs { display: block; max-width: 260px; font-size: 12px; color: var(--muted, #8a9690); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* окна */
.so-modal { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 16px; background: rgba(3,6,5,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.so-modal.open { opacity: 1; }
.so-card { width: min(440px, 100%); max-height: min(86vh, 760px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px;
  background: var(--panel, #121a17); color: var(--text, #e9efec); border: 1px solid var(--line, rgba(255,255,255,.08)); box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: translateY(8px); transition: transform .18s; }
.so-modal.open .so-card { transform: none; }
.so-h { display: flex; align-items: center; justify-content: space-between; }
.so-h b { font-size: 18px; }
.so-x, .so-ib { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.so-x:hover, .so-ib:hover { background: rgba(255,255,255,.08); }
.so-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 11px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--text, #e9efec); background: rgba(255,255,255,.07); border: 1px solid var(--line, rgba(255,255,255,.1)); white-space: nowrap; }
.so-btn.pri { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--accent, #22c55e), #0ea5e9); }
.so-btn.ghost { background: transparent; }
.so-btn:disabled { opacity: .5; }
.so-in { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: rgba(255,255,255,.04); color: inherit; font: inherit; }
.so-fine { margin: 0; font-size: 12px; color: var(--muted, #8a9690); }
.so-row { display: flex; gap: 8px; justify-content: flex-end; }
.so-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); }
.so-tabs button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted, #aeb9b3); font: inherit; font-weight: 700; cursor: pointer; }
.so-tabs button.on { background: rgba(255,255,255,.1); color: var(--text, #e9efec); }
.so-tprev { aspect-ratio: 9 / 12; max-height: 46vh; border-radius: 16px; display: grid; place-items: center; padding: 18px; }
.so-tprev textarea { width: 100%; min-height: 40%; border: 0; outline: 0; resize: none; background: transparent; color: #fff; font: 800 22px/1.3 inherit; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.so-tprev textarea::placeholder { color: rgba(255,255,255,.7); }
.so-bgs { display: flex; gap: 8px; justify-content: center; }
.so-bgs button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.so-bgs button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.so-drop { display: grid; place-items: center; min-height: 220px; border-radius: 16px; border: 2px dashed rgba(255,255,255,.18); cursor: pointer; text-align: center; color: var(--muted, #aeb9b3); overflow: hidden; }
.so-drop img, .so-drop video { max-width: 100%; max-height: 46vh; display: block; }
.so-emos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.so-emos button { height: 44px; font-size: 24px; border-radius: 12px; border: 1px solid transparent; background: rgba(255,255,255,.05); cursor: pointer; }
.so-emos button.on { border-color: var(--accent, #22c55e); background: rgba(34,197,94,.15); }
/* просмотр историй */
.so-viewer { position: fixed; inset: 0; z-index: 2600; display: grid; place-items: center; background: rgba(0,0,0,.92); animation: so-in .2s ease; }
@keyframes so-in { from { opacity: 0; transform: scale(.98); } }
.so-vbox { position: relative; width: min(420px, 100vw); height: min(92vh, 760px); display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #000; color: #fff; }
.so-prog { position: absolute; top: 8px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.so-prog i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.so-prog i b { display: block; height: 100%; width: 0; background: #fff; }
.so-prog i.done b { width: 100%; }
.so-prog i.now b { animation: so-p linear forwards; }
@keyframes so-p { to { width: 100%; } }
.so-vh { position: absolute; top: 18px; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.so-vh > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.so-vh b { font-size: 14px; } .so-vh small { font-size: 12px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-vh .so-ib { color: #fff; }
.so-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.so-vmedia { max-width: 100%; max-height: 100%; object-fit: contain; }
.so-vtext { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; }
.so-vtext p { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.3; text-align: center; white-space: pre-wrap; word-break: break-word; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.so-cap2 { position: absolute; left: 0; right: 0; bottom: 10px; padding: 8px 16px; text-align: center; background: rgba(0,0,0,.45); }
.so-nav { position: absolute; top: 0; bottom: 0; width: 34%; border: 0; background: transparent; cursor: pointer; }
.so-nav.prev { left: 0; } .so-nav.next { right: 0; }
.so-vf { padding: 10px; background: #0b0b0b; display: flex; flex-direction: column; gap: 8px; }
.so-reacts { display: flex; justify-content: space-around; }
.so-reacts button { font-size: 24px; border: 0; background: none; cursor: pointer; transition: transform .15s; }
.so-reacts button:hover { transform: scale(1.2); } .so-reacts button.pop { animation: so-pop .4s; }
@keyframes so-pop { 50% { transform: scale(1.5); } }
.so-reply { display: flex; gap: 8px; }
.so-reply input { flex: 1; height: 42px; padding: 0 14px; border-radius: 21px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; }
.so-reply button { width: 42px; height: 42px; border-radius: 50%; border: 0; color: #fff; background: linear-gradient(135deg, #22c55e, #0ea5e9); cursor: pointer; }
.so-vlist { max-height: 34vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.so-vrow { display: flex; align-items: center; gap: 10px; }
.so-vrow span { flex: 1; display: flex; flex-direction: column; } .so-vrow small { font-size: 11px; opacity: .7; } .so-vrow b { font-size: 20px; }
/* каналы */
.so-clist { display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.so-crow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.035); }
.so-cav { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); overflow: hidden; }
.so-cav img { width: 100%; height: 100%; object-fit: cover; }
.so-cm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.so-cm b { font-size: 14px; } .so-cm small { font-size: 12px; color: var(--muted, #8a9690); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-off { font-style: normal; color: #38bdf8; }
.so-new summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.so-new[open] { display: flex; flex-direction: column; gap: 8px; }
.composer.so-ro { display: none !important; }
.so-chbar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 14px; color: var(--muted, #aeb9b3); font-size: 13.5px; }
.so-chbar span { display: inline-flex; align-items: center; gap: 6px; }
.thread.so-channel .msg.them .gav, .thread.so-channel .msg.them .g-sender { display: none; }
.thread.so-channel .msg.grp { padding-left: 0; }
.so-views { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; opacity: .8; }
/* стикеры и GIF */
.so-stk-btn { margin-right: -4px; }
.so-picker { margin: 0 8px 6px; border-radius: 16px; background: var(--panel, #121a17); border: 1px solid var(--line, rgba(255,255,255,.08)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); overflow: hidden; animation: so-in .16s ease; }
.so-ptabs { display: flex; gap: 4px; padding: 6px; overflow-x: auto; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); }
.so-ptabs button { flex: none; height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--muted, #aeb9b3); font: inherit; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.so-ptabs button img { width: 28px; height: 28px; }
.so-ptabs button.on { background: rgba(255,255,255,.09); color: var(--text, #e9efec); }
.so-ptabs .so-pclose { margin-left: auto; }
.so-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; padding: 8px; max-height: 280px; overflow-y: auto; align-content: start; }
.so-pgrid.gif { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.so-pcell { position: relative; aspect-ratio: 1; padding: 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted, #aeb9b3); font: inherit; transition: background .15s, transform .15s; }
.so-pcell:hover { background: rgba(255,255,255,.07); transform: scale(1.04); }
.so-pcell img { width: 100%; height: 100%; object-fit: contain; }
.so-pgrid.gif .so-pcell img { object-fit: cover; border-radius: 10px; }
.so-pcell.add { border: 1px dashed rgba(255,255,255,.2); display: flex; flex-direction: column; gap: 4px; font-size: 20px; }
.so-pcell.add small { font-size: 11px; }
.so-pcell.wide { grid-column: span 2; aspect-ratio: auto; height: 84px; }
.so-pdel { position: absolute; top: 2px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center; font-style: normal; color: #fff; background: rgba(220,38,38,.9); }
.so-pcell:hover .so-pdel { display: grid; }
.so-psec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.so-mini { border: 0; background: none; color: var(--accent, #22c55e); font: inherit; font-size: 12px; cursor: pointer; }
.so-pgrid .so-fine { grid-column: 1 / -1; }
.msg.so-sticker .bubble { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
.msg.so-sticker .bubble img.photo { width: 168px !important; height: 168px !important; max-width: 168px; object-fit: contain; background: none; border-radius: 0; cursor: default; }
.msg.so-sticker .bubble .foot { position: static; justify-content: flex-end; background: rgba(0,0,0,.35); width: max-content; margin-left: auto; padding: 1px 7px; border-radius: 9px; color: #fff; }
.msg.so-gif .bubble { position: relative; }
.so-gifsave { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border: 0; border-radius: 8px; font: 800 11px/1.2 system-ui, sans-serif; color: #fff; background: rgba(0,0,0,.55); cursor: pointer; opacity: .85; }
.so-gifsave:hover { opacity: 1; background: rgba(0,0,0,.75); }
@media (max-width: 860px) {
  .so-card { width: 100%; max-height: 92vh; }
  .so-vbox { width: 100vw; height: 100vh; border-radius: 0; }
  .so-pgrid { grid-template-columns: repeat(4, 1fr); max-height: 240px; }
  .so-pgrid.gif { grid-template-columns: repeat(3, 1fr); }
  .msg.so-sticker .bubble img.photo { width: 140px !important; height: 140px !important; }
}
@media (prefers-reduced-motion: reduce) { .so-viewer, .so-picker, .so-modal, .so-card { animation: none; transition: none; } }
.so-vh .av, .so-vrow .av { flex: none; width: 36px !important; height: 36px !important; }
@media (max-width: 860px) { .so-hs { display: none; } }

/* CHCOMM / CHINFO / verified */
.vbadge { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; background: var(--accent, #1e88ff); color: #fff; font-size: 9px; font-weight: 700; vertical-align: 1px; flex: none; }
.so-cm { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 7px 2px 1px; border: 0; border-top: 1px solid var(--line, rgba(255,255,255,.08)); background: none; color: var(--accent-light, #5aaeff); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.so-cm:hover span { text-decoration: underline; }
.so-cmodal .so-card, .so-cimodal .so-card { width: min(520px, 96vw); max-height: min(86vh, 760px); display: flex; flex-direction: column; }
.so-cmlist { flex: 1; min-height: 160px; overflow-y: auto; padding: 6px 2px; scrollbar-gutter: stable; }
.so-cmi { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); }
.so-cmi p { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; }
.so-cmi small { color: var(--muted, #8b95a8); font-size: 11.5px; }
.so-cmdel { border: 0; background: none; color: var(--muted, #8b95a8); cursor: pointer; align-self: start; }
.so-cmdel:hover { color: #ef4444; }
.so-cmform { display: flex; gap: 8px; padding-top: 10px; }
.so-cmform input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2, rgba(255,255,255,.12)); background: var(--input, #131a27); color: inherit; font: inherit; }
.so-ci { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px 4px; overflow-y: auto; }
.so-ci h2 { margin: 4px 0 0; font-size: 20px; text-align: center; }
.so-ci .so-muted { margin: 0; }
.so-ciav { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.so-ciav-i { display: grid; place-items: center; background: var(--grad, linear-gradient(135deg, #1e88ff, #7c3aed)); color: #fff; }
.so-ciav-i svg { width: 38px; height: 38px; }
.so-ciabout { margin: 0; text-align: center; white-space: pre-wrap; }
.so-cil { width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted, #8b95a8); }
.so-cil textarea { min-height: 70px; resize: vertical; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2, rgba(255,255,255,.12)); background: var(--input, #131a27); color: var(--text, #eef2f8); font: inherit; }
.so-cirow { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-top: 1px solid var(--line, rgba(255,255,255,.07)); cursor: pointer; }
.so-btn.danger { background: rgba(239,68,68,.14); color: #f87171; }
.so-muted { color: var(--muted, #8b95a8); }

#profile.so-ch #group-card, #profile.so-ch #profile-status { display: none !important; }
.so-chcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.so-chsub { color: var(--muted, #8b95a8); font-size: 13px; }
.so-chabout { margin: 4px 0 6px; white-space: pre-wrap; }
.so-cm { white-space: nowrap; min-width: 170px; justify-content: flex-start; flex-direction: row; }
