/* ===== Smart Stavba Chat ===== */
:root{
  --cx-glass:rgba(18,26,52,.46);
  --cx-glass-2:rgba(255,255,255,.06);
  --cx-line:rgba(255,255,255,.09);
  --cx-text:#edf3fb;
  --cx-mute:#9fb0c6;
  --cx-accent:#5b8def;
  --cx-accent-2:#3d6fe0;
  --cx-mine:linear-gradient(160deg,#4f86f0 0%,#3a67d8 100%);
  --cx-other:rgba(32,44,74,.82);
  --cx-warn:#f2a33c;
  --cx-danger:#ff6b6b;
  --cx-sheet:#141d33;
}
html[data-theme="light"]{
  --cx-glass:rgba(255,255,255,.72);
  --cx-glass-2:rgba(15,30,60,.05);
  --cx-line:rgba(15,30,60,.10);
  --cx-text:#13203a;
  --cx-mute:#5d6b82;
  --cx-other:#ffffff;
  --cx-sheet:#f4f7fc;
}

.cx [hidden],.cx-layer [hidden],.cx-sheet [hidden]{display:none!important;}
.cx-off{display:flex;flex-direction:column;align-items:center;gap:10px;padding:60px 20px;color:var(--cx-mute);text-align:center;}
.cx-off i{font-size:34px;opacity:.6;}

.cx{display:grid;grid-template-columns:minmax(300px,360px) 1fr;gap:16px;height:calc(100vh - 150px);height:calc(100dvh - 150px);min-height:480px;color:var(--cx-text);}
.cx-side,.cx-main{
  background:linear-gradient(180deg,rgba(255,255,255,.07) 0%,rgba(255,255,255,0) 40%),var(--cx-glass);
  -webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);
  border:1px solid var(--cx-line);border-radius:22px;overflow:hidden;min-height:0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 18px 40px -22px rgba(0,0,0,.55);
}
.cx-side{display:flex;flex-direction:column;}
.cx-main{display:flex;flex-direction:column;position:relative;}

.cx-side-head{display:flex;align-items:center;gap:8px;padding:16px 16px 10px;}
.cx-side-title{flex:1;min-width:0;}
.cx-side-title h2{margin:0;font-size:22px;font-weight:800;letter-spacing:-.02em;}
.cx-side-sub{display:block;color:var(--cx-mute);font-size:12.5px;min-height:15px;}

.cx-icon-btn{
  width:38px;height:38px;flex:0 0 38px;border-radius:12px;border:1px solid var(--cx-line);
  background:var(--cx-glass-2);color:var(--cx-text);display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:15px;transition:background .15s,transform .12s;
}
.cx-icon-btn:hover{background:rgba(255,255,255,.12);}
.cx-icon-btn:active{transform:scale(.94);}
.cx-icon-btn.cx-primary{background:linear-gradient(160deg,#5b8def,#3d6fe0);border-color:transparent;color:#fff;box-shadow:0 8px 18px -8px rgba(61,111,224,.8);}
.cx-icon-btn.cx-xs{width:28px;height:28px;flex-basis:28px;border-radius:9px;font-size:12px;}

.cx-search{display:flex;align-items:center;gap:8px;margin:0 16px 10px;padding:0 12px;height:40px;border-radius:12px;background:rgba(0,0,0,.18);border:1px solid var(--cx-line);color:var(--cx-mute);}
html[data-theme="light"] .cx-search{background:rgba(15,30,60,.05);}
.cx-search input{flex:1;min-width:0;border:0!important;outline:0;background:transparent!important;color:var(--cx-text);font-size:14.5px;padding:0!important;height:100%;box-shadow:none!important;}
.cx-search input::-webkit-search-cancel-button{display:none;}

.cx-filters{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px;}
.cx-filters::-webkit-scrollbar{display:none;}
.cx-chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:10px;border:1px solid var(--cx-line);background:transparent;color:var(--cx-mute);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;}
.cx-chip b{min-width:18px;height:18px;padding:0 5px;border-radius:6px;background:var(--cx-accent);color:#fff;font-size:11px;display:inline-flex;align-items:center;justify-content:center;}
.cx-chip.is-on{background:rgba(91,141,239,.18);border-color:rgba(91,141,239,.55);color:var(--cx-text);}

.cx-list{flex:1;overflow-y:auto;padding:4px 8px 12px;-webkit-overflow-scrolling:touch;}
.cx-row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border:0;border-radius:14px;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit;transition:background .12s;}
.cx-row:hover{background:rgba(255,255,255,.05);}
.cx-row.is-active{background:rgba(91,141,239,.2);box-shadow:inset 0 0 0 1px rgba(91,141,239,.4);}
.cx-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.cx-row-top,.cx-row-bot{display:flex;align-items:center;gap:6px;min-width:0;}
.cx-row-top b{font-size:15px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.cx-row-top time{margin-left:auto;flex:0 0 auto;font-size:12px;color:var(--cx-mute);}
.cx-row.is-unread .cx-row-top time{color:var(--cx-accent);font-weight:700;}
.cx-row-prev{flex:1;min-width:0;font-size:13.5px;color:var(--cx-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cx-row.is-unread .cx-row-prev{color:var(--cx-text);opacity:.85;}
.cx-flag{font-size:11px;color:var(--cx-mute);flex:0 0 auto;}
.cx-imp-ico{color:var(--cx-warn);}
.cx-tag{flex:0 0 auto;font-size:10.5px;font-weight:700;padding:2px 6px;border-radius:6px;background:rgba(63,182,139,.18);color:#5fd3a6;letter-spacing:.01em;}
.cx-badge{flex:0 0 auto;min-width:20px;height:20px;padding:0 6px;border-radius:7px;background:var(--cx-accent);color:#fff;font-size:11.5px;font-weight:750;display:inline-flex;align-items:center;justify-content:center;}
.cx-badge.is-quiet{background:rgba(159,176,198,.32);}
.cx-badge.is-mention{background:var(--cx-warn);}
.cx-badge.is-imp{background:var(--cx-danger);}
.cx-sep{padding:14px 10px 6px;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--cx-mute);font-weight:700;}
.cx-skel{height:58px;margin:6px 4px;border-radius:14px;background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.09),rgba(255,255,255,.04));background-size:200% 100%;animation:cxSk 1.2s linear infinite;}
@keyframes cxSk{to{background-position:-200% 0;}}
.cx-empty-list{display:flex;flex-direction:column;align-items:center;gap:6px;padding:40px 20px;text-align:center;color:var(--cx-mute);}
.cx-empty-list i{font-size:28px;opacity:.5;margin-bottom:4px;}
.cx-empty-list b{color:var(--cx-text);font-size:15px;}
.cx-empty-list span{font-size:13px;}

/* Avatars — rounded squares like the rest of the app */
.cx-av{position:relative;flex:0 0 46px;width:46px;height:46px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--cx-av,#5b8def);color:#fff;font-weight:750;font-size:15px;overflow:hidden;letter-spacing:.02em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25);}
.cx-av img{width:100%;height:100%;object-fit:cover;}
.cx-av-sm{flex-basis:30px;width:30px;height:30px;border-radius:10px;font-size:11px;}
.cx-av-md{flex-basis:40px;width:40px;height:40px;border-radius:12px;font-size:14px;}
.cx-av-lg{flex-basis:76px;width:76px;height:76px;border-radius:22px;font-size:26px;}
.cx-av-ico{font-size:18px;}
.cx-av-ico.cx-av-lg{font-size:30px;}
.cx-k-site{background:linear-gradient(160deg,#3fb68b,#23876a);}
.cx-k-general{background:linear-gradient(160deg,#f2a33c,#d37a17);}
.cx-k-group{background:linear-gradient(160deg,#8d6ff0,#6247d1);}

/* Empty main (desktop) */
.cx-empty-main{margin:auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:30px;max-width:360px;}
.cx-empty-main h3{margin:6px 0 0;font-size:19px;}
.cx-empty-main p{margin:0 0 10px;color:var(--cx-mute);font-size:14px;line-height:1.45;}
.cx-empty-ico{width:72px;height:72px;border-radius:22px;display:inline-flex;align-items:center;justify-content:center;font-size:30px;color:#cfe0ff;
  background:linear-gradient(160deg,rgba(91,141,239,.35),rgba(91,141,239,.12));box-shadow:inset 0 1px 0 rgba(255,255,255,.2);}

.cx-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:12px;border:1px solid var(--cx-line);background:var(--cx-glass-2);color:var(--cx-text);font:inherit;font-size:14px;font-weight:650;cursor:pointer;white-space:nowrap;}
.cx-btn-primary{background:linear-gradient(160deg,#5b8def,#3d6fe0);border-color:transparent;color:#fff;}
.cx-btn-danger{color:var(--cx-danger);}
.cx-btn-sm{height:30px;padding:0 12px;font-size:12.5px;border-radius:9px;}
.cx-btn-block{width:100%;height:48px;font-size:15.5px;border-radius:14px;}
.cx-btn:disabled{opacity:.5;cursor:default;}
.cx-link{border:0;background:none;color:var(--cx-accent);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:4px 0;text-transform:none;letter-spacing:0;}

/* ===== Thread ===== */
.cx-thread{display:flex;flex-direction:column;height:100%;min-height:0;position:relative;}
.cx-th-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--cx-line);background:rgba(255,255,255,.02);}
.cx-back{display:none;}
.cx-th-id{flex:1;min-width:0;display:flex;align-items:center;gap:11px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;padding:0;}
.cx-th-copy{min-width:0;display:flex;flex-direction:column;}
.cx-th-copy b{font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cx-th-copy small{font-size:12.5px;color:var(--cx-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.cx-msgs{flex:1;overflow-y:auto;padding:10px 14px 6px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
.cx-msgs-inner{display:flex;flex-direction:column;gap:2px;max-width:860px;margin:0 auto;}
.cx-older{align-self:center;margin:6px 0 10px;border:1px solid var(--cx-line);background:var(--cx-glass-2);color:var(--cx-mute);border-radius:10px;padding:6px 12px;font:inherit;font-size:12.5px;cursor:pointer;}
.cx-day{align-self:center;margin:12px 0 8px;}
.cx-day span{display:inline-block;padding:4px 11px;border-radius:9px;background:rgba(10,16,34,.55);color:#dbe5f5;font-size:12px;font-weight:650;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}
html[data-theme="light"] .cx-day span{background:rgba(15,30,60,.08);color:var(--cx-mute);}
.cx-new-sep{align-self:stretch;display:flex;align-items:center;gap:10px;}
.cx-new-sep::before,.cx-new-sep::after{content:"";flex:1;height:1px;background:rgba(91,141,239,.45);}
.cx-new-sep span{background:rgba(91,141,239,.22);color:#cfe0ff;}
.cx-nomsgs{margin:auto;padding:50px 20px;display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--cx-mute);text-align:center;}

.cx-msg{display:flex;align-items:flex-end;gap:8px;position:relative;margin-top:2px;}
.cx-msg:not(.is-cont){margin-top:8px;}
.cx-msg.is-mine{flex-direction:row-reverse;}
.cx-av-gap{flex:0 0 30px;width:30px;}
.cx-bubble{position:relative;max-width:min(76%,560px);padding:7px 11px 6px;border-radius:18px;background:var(--cx-other);color:var(--cx-text);
  font-size:15px;line-height:1.38;word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 1px rgba(0,0,0,.18);
  -webkit-user-select:text;user-select:text;}
html[data-theme="light"] .cx-bubble{box-shadow:0 1px 2px rgba(15,30,60,.12);}
.cx-msg:not(.is-mine).is-tail .cx-bubble{border-bottom-left-radius:6px;}
.cx-msg.is-mine .cx-bubble{background:var(--cx-mine);color:#fff;}
.cx-msg.is-mine.is-tail .cx-bubble{border-bottom-right-radius:6px;}
.cx-msg.is-ping:not(.is-mine) .cx-bubble{box-shadow:inset 3px 0 0 var(--cx-warn),0 1px 1px rgba(0,0,0,.18);}
.cx-msg.is-imp .cx-bubble{box-shadow:inset 0 0 0 1.5px rgba(242,163,60,.75);}
.cx-msg.is-flash .cx-bubble{animation:cxFlash 1.1s ease;}
@keyframes cxFlash{0%,60%{filter:brightness(1.35);}100%{filter:none;}}
.cx-name{display:block;font-size:13px;font-weight:700;margin-bottom:2px;}
.cx-text a{color:inherit;text-decoration:underline;}
.cx-mention{font-weight:700;color:#9cc0ff;}
.cx-msg.is-mine .cx-mention{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.5);}
.cx-mention.is-me{background:rgba(242,163,60,.22);color:#ffc27a;border-radius:5px;padding:0 3px;}
.cx-meta{float:right;margin:6px 0 -2px 10px;font-size:11px;opacity:.62;display:inline-flex;align-items:center;gap:4px;line-height:1;white-space:nowrap;}
.cx-tick{font-size:10.5px;}
.cx-tick.is-read{color:#bfe3ff;opacity:1;}
.cx-del{font-style:italic;opacity:.65;font-size:14px;}
.cx-imp-tag{display:flex;width:max-content;align-items:center;gap:5px;font-size:11.5px;font-weight:800;color:var(--cx-warn);text-transform:uppercase;letter-spacing:.04em;margin-bottom:3px;}
.cx-msg.is-mine .cx-imp-tag{color:#ffe0b3;}
.cx-quote{display:flex;flex-direction:column;gap:1px;margin:2px 0 5px;padding:5px 9px;border-radius:9px;background:rgba(0,0,0,.18);border-left:3px solid rgba(255,255,255,.55);cursor:pointer;min-width:0;}
.cx-quote b{font-size:12.5px;}
.cx-quote span{font-size:13px;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px;}
.cx-msg.is-mine .cx-quote b{color:#fff!important;}
.cx-pics{display:grid;gap:3px;margin:2px -6px 4px;border-radius:13px;overflow:hidden;max-width:320px;}
.cx-bubble.is-media{padding:4px;}
.cx-bubble.is-media .cx-pics{margin:0;}
.cx-bubble.is-media .cx-meta{position:absolute;right:10px;bottom:9px;margin:0;padding:3px 6px;border-radius:7px;background:rgba(0,0,0,.45);color:#fff;opacity:1;}
.cx-pics.n2{grid-template-columns:1fr 1fr;}
.cx-pics.n3,.cx-pics.n4{grid-template-columns:1fr 1fr;}
.cx-pics img{width:100%;height:100%;min-height:90px;max-height:300px;object-fit:cover;display:block;cursor:zoom-in;background:rgba(255,255,255,.05);}
.cx-pics.n1 img{max-height:340px;}
.cx-pics.n3 img:first-child{grid-column:1 / -1;}
.cx-msg-act{opacity:0;align-self:center;width:28px;height:28px;border:0;border-radius:9px;background:transparent;color:var(--cx-mute);cursor:pointer;transition:opacity .12s;}
.cx-msg:hover .cx-msg-act{opacity:1;}
.cx-msg-act:hover{background:rgba(255,255,255,.08);}

.cx-jump{position:absolute;right:18px;bottom:96px;width:42px;height:42px;border-radius:14px;border:1px solid var(--cx-line);background:var(--cx-sheet);color:var(--cx-text);box-shadow:0 10px 24px -10px rgba(0,0,0,.6);cursor:pointer;z-index:3;}

/* Composer */
.cx-foot{position:relative;padding:8px 12px 12px;border-top:1px solid var(--cx-line);background:rgba(255,255,255,.02);}
.cx-composer{display:flex;align-items:flex-end;gap:8px;max-width:860px;margin:0 auto;}
.cx-input-wrap{flex:1;min-width:0;display:flex;align-items:flex-end;border-radius:16px;background:rgba(0,0,0,.22);border:1px solid var(--cx-line);padding:0 4px 0 0;}
html[data-theme="light"] .cx-input-wrap{background:#fff;}
.cx-input{flex:1;min-width:0;resize:none;border:0!important;outline:0;background:transparent!important;color:var(--cx-text);font:inherit;font-size:16px;line-height:1.35;
  padding:9px 12px!important;max-height:140px;min-height:40px;box-shadow:none!important;border-radius:16px;}
.cx-imp-toggle{flex:0 0 auto;width:32px;height:32px;margin-bottom:4px;border:0;border-radius:10px;background:transparent;color:var(--cx-mute);cursor:pointer;font-size:15px;}
.cx-imp-toggle.is-on{background:rgba(242,163,60,.2);color:var(--cx-warn);}
.cx-attach{border-radius:14px;width:40px;height:40px;flex-basis:40px;}
.cx-send{flex:0 0 40px;width:40px;height:40px;border-radius:14px;border:0;background:linear-gradient(160deg,#5b8def,#3d6fe0);color:#fff;cursor:pointer;font-size:15px;
  box-shadow:0 8px 18px -8px rgba(61,111,224,.9);transition:transform .12s,opacity .15s;}
.cx-send:disabled{opacity:.4;box-shadow:none;cursor:default;}
.cx-send:not(:disabled):active{transform:scale(.92);}
.cx-send.is-busy i{animation:cxPulse .8s ease infinite alternate;}
@keyframes cxPulse{to{opacity:.3;}}
.cx-replybox{display:flex;align-items:center;gap:10px;max-width:860px;margin:0 auto 8px;padding:7px 8px 7px 12px;border-radius:12px;background:rgba(91,141,239,.13);border-left:3px solid var(--cx-accent);color:var(--cx-accent);}
.cx-replybox-copy{flex:1;min-width:0;display:flex;flex-direction:column;}
.cx-replybox-copy b{font-size:12.5px;color:var(--cx-accent);}
.cx-replybox-copy span{font-size:13px;color:var(--cx-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cx-photos-pre{display:flex;gap:8px;max-width:860px;margin:0 auto 8px;overflow-x:auto;}
.cx-pre{position:relative;flex:0 0 64px;width:64px;height:64px;border-radius:12px;overflow:hidden;}
.cx-pre img{width:100%;height:100%;object-fit:cover;}
.cx-pre button{position:absolute;top:3px;right:3px;width:22px;height:22px;border-radius:7px;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:11px;cursor:pointer;}
.cx-mention-pop{position:absolute;left:12px;right:12px;bottom:calc(100% - 4px);max-width:420px;padding:6px;border-radius:16px;background:var(--cx-sheet);border:1px solid var(--cx-line);box-shadow:0 18px 40px -14px rgba(0,0,0,.6);z-index:5;}
.cx-mention-pop button{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;border:0;border-radius:10px;background:transparent;color:var(--cx-text);font:inherit;text-align:left;cursor:pointer;}
.cx-mention-pop button:hover,.cx-mention-pop button:first-child{background:rgba(91,141,239,.14);}
.cx-mention-pop b{font-size:14px;}
.cx-mention-pop small{margin-left:auto;color:var(--cx-mute);font-size:12px;}
.cx-readonly{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;color:var(--cx-mute);font-size:13.5px;text-align:center;}
.cx-joinbar{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:860px;margin:0 auto 8px;padding:8px 8px 8px 12px;border-radius:12px;background:rgba(63,182,139,.12);font-size:13px;color:var(--cx-mute);}

/* ===== Sheets ===== */
.cx-sheet-ov{position:fixed;inset:0;z-index:10080;background:rgba(3,7,18,.55);display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;transition:opacity .2s;}
.cx-sheet-ov.is-open{opacity:1;}
.cx-sheet{width:100%;max-width:480px;max-height:min(82vh,760px);display:flex;flex-direction:column;background:var(--cx-sheet);color:var(--cx-text);border:1px solid var(--cx-line);
  border-radius:24px;box-shadow:0 30px 70px -20px rgba(0,0,0,.7);overflow:hidden;transform:translateY(14px) scale(.98);transition:transform .22s cubic-bezier(.2,.8,.2,1);}
.cx-sheet-ov.is-open .cx-sheet{transform:none;}
.cx-sh-head{position:relative;display:flex;align-items:flex-start;gap:10px;padding:18px 18px 12px;}
.cx-sh-grab{display:none;}
.cx-sh-title{flex:1;min-width:0;}
.cx-sh-title h3{margin:0;font-size:19px;font-weight:800;}
.cx-sh-title small{display:block;margin-top:4px;color:var(--cx-mute);font-size:12.5px;line-height:1.4;}
.cx-seg{display:flex;gap:4px;margin:0 18px 12px;padding:4px;border-radius:13px;background:rgba(0,0,0,.2);}
html[data-theme="light"] .cx-seg{background:rgba(15,30,60,.06);}
.cx-seg button{flex:1;height:36px;border:0;border-radius:10px;background:transparent;color:var(--cx-mute);font:inherit;font-size:14px;font-weight:700;cursor:pointer;}
.cx-seg button.is-on{background:var(--cx-accent);color:#fff;box-shadow:0 6px 14px -8px rgba(61,111,224,.9);}
.cx-group-fields{padding:0 18px 4px;}
.cx-field{width:100%;height:44px;border-radius:12px;border:1px solid var(--cx-line);background:rgba(0,0,0,.18);color:var(--cx-text);padding:0 14px;font:inherit;font-size:15px;margin-bottom:10px;box-sizing:border-box;}
html[data-theme="light"] .cx-field{background:#fff;}
.cx-sel-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px;max-height:84px;overflow-y:auto;}
.cx-sel-chips:empty{display:none;}
.cx-sel-chip{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:9px;border:0;background:rgba(91,141,239,.2);color:var(--cx-text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;}
.cx-sel-chip i{font-size:10px;opacity:.7;}
.cx-search-sheet{margin:0 18px 8px;}
.cx-people{flex:1;overflow-y:auto;padding:0 10px 12px;min-height:120px;}
.cx-pg-head{display:flex;align-items:center;justify-content:space-between;padding:12px 8px 6px;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--cx-mute);font-weight:750;}
.cx-prow{display:flex;align-items:center;gap:12px;width:100%;padding:8px;border:0;border-radius:14px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;}
.cx-prow:hover{background:rgba(255,255,255,.05);}
.cx-prow:disabled{cursor:default;opacity:.85;}
.cx-prow .cx-av{flex-basis:42px;width:42px;height:42px;border-radius:13px;}
.cx-prow-copy{flex:1;min-width:0;display:flex;flex-direction:column;}
.cx-prow-copy b{font-size:15px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cx-prow-copy small{font-size:12.5px;color:var(--cx-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cx-chev{color:var(--cx-mute);font-size:12px;}
.cx-check{flex:0 0 24px;width:24px;height:24px;border-radius:8px;border:1.5px solid rgba(159,176,198,.5);display:inline-flex;align-items:center;justify-content:center;color:transparent;font-size:12px;transition:all .12s;}
.cx-prow.is-on .cx-check{background:var(--cx-accent);border-color:var(--cx-accent);color:#fff;}
.cx-sh-foot{padding:12px 18px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--cx-line);}
.cx-info-hero{display:flex;flex-direction:column;align-items:center;gap:6px;padding:0 18px 14px;text-align:center;}
.cx-info-hero b{font-size:19px;margin-top:6px;}
.cx-info-hero small{color:var(--cx-mute);font-size:13px;}
.cx-info-actions{display:flex;gap:8px;padding:0 18px 6px;flex-wrap:wrap;justify-content:center;}
.cx-sheet-info{overflow-y:auto;}
.cx-sheet-info .cx-people{overflow:visible;flex:none;min-height:0;}
.cx-info-sec{padding:0 10px;}
.cx-opts{display:flex;flex-direction:column;gap:6px;padding:0 8px 14px;}
.cx-sheet-notify .cx-opts{padding:0 18px 18px;}
.cx-opt{display:flex;align-items:center;gap:12px;width:100%;padding:11px 12px;border-radius:14px;border:1px solid var(--cx-line);background:var(--cx-glass-2);color:inherit;font:inherit;text-align:left;cursor:pointer;}
.cx-opt.is-on{border-color:rgba(91,141,239,.6);background:rgba(91,141,239,.14);}
.cx-opt-ico{flex:0 0 36px;width:36px;height:36px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.07);color:var(--cx-accent);}
.cx-opt-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.cx-opt-copy b{font-size:14.5px;}
.cx-opt-copy small{font-size:12.5px;color:var(--cx-mute);line-height:1.35;}
.cx-radio{flex:0 0 20px;width:20px;height:20px;border-radius:50%;border:2px solid rgba(159,176,198,.5);}
.cx-opt.is-on .cx-radio{border:6px solid var(--cx-accent);}
.cx-sheet-menu{max-width:340px;}
.cx-menu-prev{padding:16px 18px 10px;font-size:14px;color:var(--cx-mute);border-bottom:1px solid var(--cx-line);white-space:pre-wrap;max-height:120px;overflow:hidden;}
.cx-menu{display:flex;flex-direction:column;padding:6px;}
.cx-menu button{display:flex;align-items:center;gap:12px;height:46px;padding:0 14px;border:0;border-radius:12px;background:transparent;color:var(--cx-text);font:inherit;font-size:15px;cursor:pointer;text-align:left;}
.cx-menu button:hover{background:rgba(255,255,255,.06);}
.cx-menu button i{width:18px;color:var(--cx-mute);}
.cx-menu button.is-danger,.cx-menu button.is-danger i{color:var(--cx-danger);}

.cx-viewer{position:fixed;inset:0;z-index:10090;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center;padding:calc(env(safe-area-inset-top) + 50px) 12px calc(env(safe-area-inset-bottom) + 20px);}
.cx-viewer img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;}
.cx-viewer-x{position:absolute;top:calc(env(safe-area-inset-top) + 10px);right:14px;background:rgba(255,255,255,.12)!important;color:#fff!important;border:0!important;}
.cx-viewer-n{position:absolute;top:calc(env(safe-area-inset-top) + 20px);left:50%;transform:translateX(-50%);color:#fff;font-size:13px;opacity:.8;}

.cx-layer{display:none;}

/* ===== Phones ===== */
@media (max-width:900px){
  .cx{display:block;height:auto;min-height:0;}
  .cx-main{display:none;}
  .cx-side{background:transparent;border:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;overflow:visible;border-radius:0;}
  .cx-side-head{padding:4px 2px 12px;}
  .cx-side-title h2{font-size:26px;}
  .cx-search{margin:0 0 10px;height:42px;background:rgba(10,16,34,.42);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);}
  .cx-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:0 16px 12px;margin:0 -16px;}
  .cx-list{overflow:visible;padding:0 0 calc(110px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:6px;}
  .cx-row{padding:11px 12px;border-radius:18px;
    background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.02)),rgba(14,22,44,.62);
    -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 0 0 1px rgba(10,16,34,.4);}
  html[data-theme="light"] .cx-row{background:rgba(255,255,255,.78);box-shadow:0 0 0 1px rgba(15,30,60,.06);}
  .cx-row:active{transform:scale(.985);}
  .cx-sep{padding:12px 4px 2px;}

  .cx-layer{display:block;position:fixed;left:0;right:0;top:0;height:100vh;height:100dvh;z-index:10040;
    background:#0b1222;transform:translateX(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1);visibility:hidden;}
  html[data-theme="light"] .cx-layer{background:#eef2f9;}
  .cx-layer::before{content:"";position:absolute;inset:0;pointer-events:none;
    background:radial-gradient(120% 60% at 100% 0%,rgba(61,111,224,.16),transparent 60%),radial-gradient(90% 50% at 0% 100%,rgba(63,182,139,.10),transparent 60%);}
  .cx-layer.is-open{transform:none;visibility:visible;}
  .cx-layer .cx-thread{position:relative;}
  .cx-layer .cx-th-head{padding:calc(env(safe-area-inset-top) + 8px) 10px 10px;background:rgba(14,22,44,.78);-webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);}
  html[data-theme="light"] .cx-layer .cx-th-head{background:rgba(255,255,255,.85);}
  .cx-layer .cx-back{display:inline-flex;border:0;background:transparent;font-size:18px;width:34px;flex-basis:34px;}
  .cx-layer .cx-msgs{padding:8px 10px 6px;}
  .cx-layer .cx-bubble{max-width:82%;}
  .cx-layer .cx-msg-act{display:none;}
  .cx-layer .cx-foot{padding:8px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(14,22,44,.78);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);}
  html[data-theme="light"] .cx-layer .cx-foot{background:rgba(255,255,255,.88);}
  .cx-layer .cx-jump{bottom:calc(84px + env(safe-area-inset-bottom));}

  body.cx-thread-open #workerNav#workerNav,
  body.cx-sheet-open #workerNav#workerNav{clip-path:inset(50%)!important;pointer-events:none!important;}
  body.cx-thread-open #workerToolsScanBar,body.cx-sheet-open #workerToolsScanBar{display:none!important;}

  .cx-sheet-ov{align-items:flex-end;padding:0;}
  .cx-sheet{max-width:none;max-height:88vh;max-height:88dvh;border-radius:26px 26px 0 0;transform:translateY(100%);border-bottom:0;}
  .cx-sh-grab{display:block;position:absolute;top:7px;left:50%;width:38px;height:5px;margin-left:-19px;border-radius:3px;background:rgba(159,176,198,.4);}
  .cx-sh-head{padding-top:22px;}
  .cx-sheet-menu{max-width:none;}
  .cx-menu{padding-bottom:calc(8px + env(safe-area-inset-bottom));}
  .cx-sheet-notify .cx-opts{padding-bottom:calc(18px + env(safe-area-inset-bottom));}
  .cx-sheet-info{padding-bottom:env(safe-area-inset-bottom);}
}

/* ===== Voice messages & video circles ===== */
.cx-rec-btn{flex:0 0 40px;width:40px;height:40px;border-radius:14px;border:1px solid var(--cx-line);background:var(--cx-glass-2);color:var(--cx-text);cursor:pointer;font-size:16px;display:none;align-items:center;justify-content:center;transition:transform .12s;}
.cx-rec-btn:active{transform:scale(.92);}
.cx-composer.is-empty .cx-send{display:none;}
.cx-composer.is-empty .cx-rec-btn{display:inline-flex;}
.cx-recbar{display:flex;align-items:center;gap:10px;max-width:860px;margin:0 auto;height:44px;}
.cx-rec-x{color:var(--cx-danger);}
.cx-rec-dot{flex:0 0 10px;width:10px;height:10px;border-radius:50%;background:#ff4d5e;box-shadow:0 0 0 0 rgba(255,77,94,.6);animation:cxRecDot 1.2s ease infinite;}
@keyframes cxRecDot{0%{box-shadow:0 0 0 0 rgba(255,77,94,.55);}70%{box-shadow:0 0 0 9px rgba(255,77,94,0);}100%{box-shadow:0 0 0 0 rgba(255,77,94,0);}}
.cx-rec-time{font-variant-numeric:tabular-nums;font-weight:700;font-size:15px;min-width:40px;}
.cx-rec-level{flex:1;min-width:0;height:30px;display:flex;align-items:center;justify-content:flex-end;gap:3px;overflow:hidden;}
.cx-rec-level i{flex:0 0 3px;width:3px;height:100%;border-radius:2px;background:var(--cx-accent);transform:scaleY(.08);transform-origin:50% 50%;transition:transform .1s linear;will-change:transform;}
.cx-rec-sending{flex:1;text-align:center;color:var(--cx-mute);font-size:14px;}

.cx-bubble.is-voice{min-width:250px;}
.cx-voice{display:flex;align-items:center;gap:10px;padding:2px 0 0;min-width:0;}
.cx-vplay{flex:0 0 42px;width:42px;height:42px;border-radius:50%;border:0;cursor:pointer;font-size:15px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--cx-accent);color:#fff;box-shadow:0 6px 14px -8px rgba(61,111,224,.9);}
.cx-vplay .fa-play{margin-left:3px;}
.cx-msg.is-mine .cx-vplay{background:#fff;color:#3a67d8;}





.cx-vdur{flex:0 0 auto;font-size:12px;font-variant-numeric:tabular-nums;opacity:.75;min-width:30px;}
.cx-bubble.is-voice .cx-meta{margin-top:2px;}


  background:rgba(4,8,20,.88);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);opacity:0;transition:opacity .2s;
  padding:calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 24px);}

/* ===== Motion ===== */
@keyframes cxRowIn{from{opacity:0;transform:translateY(10px) scale(.985);}to{opacity:1;transform:none;}}
@keyframes cxFadeUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
@keyframes cxMsgMine{0%{opacity:0;transform:translateY(16px) scale(.94);}60%{opacity:1;}100%{opacity:1;transform:none;}}
@keyframes cxMsgOther{0%{opacity:0;transform:translateX(-10px) translateY(8px) scale(.96);}100%{opacity:1;transform:none;}}
@keyframes cxPop{0%{transform:scale(.6);opacity:0;}70%{transform:scale(1.12);opacity:1;}100%{transform:scale(1);}}
@keyframes cxBump{0%{transform:scale(1);}35%{transform:scale(1.35);}100%{transform:scale(1);}}
@keyframes cxOut{to{opacity:0;transform:scale(.92);}}
@keyframes cxShimmer{to{background-position:-200% 0;}}
@keyframes cxBarPulse{0%,100%{transform:scaleY(1);}50%{transform:scaleY(.55);}}
@keyframes cxSlideUp{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}

.cx-row.is-intro{animation:cxRowIn .42s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 35ms);}
.cx-row.is-in{animation:cxRowIn .32s cubic-bezier(.2,.8,.2,1) both;}
.cx-row{transition:background .15s,transform .15s;will-change:transform;}
.cx-badge.is-bump{animation:cxBump .45s cubic-bezier(.3,1.5,.5,1);}
.cx-chip{transition:background .18s,border-color .18s,color .18s,transform .12s;}
.cx-chip:active{transform:scale(.95);}


.cx-thread.is-enter .cx-th-head{animation:cxFadeUp .28s ease both;}
.cx-thread.is-enter .cx-msgs-inner{animation:cxFadeUp .34s cubic-bezier(.2,.8,.2,1) both;animation-delay:.03s;}
.cx-thread.is-enter .cx-foot{animation:cxFadeUp .3s ease both;animation-delay:.06s;}
.cx-empty-main{animation:cxFadeUp .4s ease both;}

.cx-msg.is-new.is-mine .cx-bubble{animation:cxMsgMine .34s cubic-bezier(.2,.9,.3,1.15) both;transform-origin:100% 100%;}
.cx-msg.is-new:not(.is-mine) .cx-bubble,.cx-msg.is-new:not(.is-mine) .cx-av{animation:cxMsgOther .32s cubic-bezier(.2,.8,.2,1) both;transform-origin:0 100%;}
.cx-msg.is-pending .cx-bubble{opacity:.78;}
.cx-msg.is-out{animation:cxOut .2s ease forwards;}
.cx-day{animation:cxFadeUp .3s ease both;}
.cx-msk{display:flex;flex-direction:column;gap:12px;padding:16px 4px;}
.cx-msk i{display:block;width:58%;height:44px;border-radius:18px;background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.1),rgba(255,255,255,.04));background-size:200% 100%;animation:cxShimmer 1.2s linear infinite;}
.cx-msk i.r{align-self:flex-end;width:44%;background-color:rgba(91,141,239,.12);}

.cx-send,.cx-rec-btn{animation:cxPop .22s cubic-bezier(.3,1.4,.5,1) both;}
.cx-recbar:not([hidden]){animation:cxSlideUp .22s ease both;}
.cx-replybox:not([hidden]),.cx-joinbar{animation:cxSlideUp .2s ease both;}
.cx-pre{animation:cxPop .25s ease both;}
.cx-mention-pop:not([hidden]){animation:cxSlideUp .16s ease both;}
.cx-jump{transition:opacity .2s,transform .2s;}
.cx-jump:not([hidden]){animation:cxPop .25s ease both;}
.cx-jump b{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;padding:0 5px;border-radius:7px;background:var(--cx-accent);color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;animation:cxPop .3s ease both;}

.cx-vplay{transition:transform .15s;}
.cx-vplay:active{transform:scale(.9);}
.cx-sheet-ov{transition:opacity .22s ease;}
.cx-sheet{transition:transform .32s cubic-bezier(.2,.9,.25,1);}
.cx-opt,.cx-prow,.cx-menu button{transition:background .15s,border-color .15s,transform .12s;}
.cx-opt:active,.cx-prow:active,.cx-menu button:active{transform:scale(.985);}
.cx-check{transition:background .15s,border-color .15s,transform .2s cubic-bezier(.3,1.5,.5,1);}
.cx-prow.is-on .cx-check{transform:scale(1.08);}
.cx-sel-chip{animation:cxPop .22s ease both;}
@media (max-width:900px){
  .cx-layer{transition:transform .34s cubic-bezier(.2,.9,.25,1),visibility 0s linear .34s;}
  .cx-layer.is-open{transition:transform .34s cubic-bezier(.2,.9,.25,1),visibility 0s;}
}
@media (prefers-reduced-motion: reduce){
}

/* Voice v2: progress = one clipped overlay row (GPU, no per-bar repaint) */
.cx-wave{position:relative;flex:1;min-width:100px;height:30px;cursor:pointer;touch-action:manipulation;}
.cx-wave-row{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;gap:1.5px;overflow:hidden;pointer-events:none;}
.cx-wave-row i{flex:1 1 0;min-width:1.5px;max-width:4px;border-radius:2px;background:rgba(159,176,198,.45);}
.cx-wave-fill{clip-path:inset(0 calc(100% - var(--p,0%)) 0 0);-webkit-clip-path:inset(0 calc(100% - var(--p,0%)) 0 0);will-change:clip-path;}
.cx-wave-fill i{background:var(--cx-accent);}
.cx-msg.is-mine .cx-wave-row i{background:rgba(255,255,255,.42);}
.cx-msg.is-mine .cx-wave-fill i{background:#fff;}
.cx-vside{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:3px;}
.cx-vspeed{display:none;border:0;border-radius:6px;padding:1px 6px;font:inherit;font-size:11px;font-weight:800;cursor:pointer;background:rgba(159,176,198,.2);color:inherit;line-height:1.4;}
.cx-voice.is-active .cx-vspeed{display:inline-block;animation:cxPop .2s ease both;}
.cx-msg.is-mine .cx-vspeed{background:rgba(255,255,255,.22);}
.cx-voice.is-playing .cx-vplay{box-shadow:0 0 0 4px rgba(91,141,239,.22);}
.cx-msg.is-mine .cx-voice.is-playing .cx-vplay{box-shadow:0 0 0 4px rgba(255,255,255,.22);}
.cx-legacy-vid{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:12px;padding:9px 12px;background:rgba(0,0,0,.18);color:inherit;font:inherit;font-size:14px;font-weight:650;cursor:pointer;}
.cx-legacy-vid i{font-size:20px;}

/* ---------- moderation: report / block / admin reports ---------- */
.cx-reports-btn{position:relative;}
.cx-reports-btn .cx-rep-n{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--cx-danger,#ff5a6a);color:#fff;font-size:10.5px;font-weight:750;display:inline-flex;align-items:center;justify-content:center;}
.cx-reports-btn .cx-rep-n[hidden]{display:none;}
.cx-rep-reasons{display:flex;flex-direction:column;gap:8px;padding:12px 16px 4px;}
.cx-rep-reasons .cx-opt i:first-child{width:18px;text-align:center;color:var(--cx-mute);}
.cx-rep-reasons .cx-opt span{flex:1;}
.cx-rep-reasons .cx-opt .cx-opt-ok{opacity:0;color:var(--cx-accent);}
.cx-rep-reasons .cx-opt.is-on .cx-opt-ok{opacity:1;}
.cx-rep-note{padding:8px 16px;}
.cx-rep-note textarea{width:100%;box-sizing:border-box;resize:none;border-radius:12px;border:1px solid var(--cx-line);background:var(--cx-glass-2);color:var(--cx-text);font:inherit;font-size:14px;padding:10px 12px;outline:none;}
.cx-rep-note textarea:focus{border-color:rgba(91,141,239,.6);}
.cx-rep-foot{display:flex;justify-content:flex-end;padding:6px 16px calc(14px + env(safe-area-inset-bottom));}
.cx-rep-foot .cx-btn{width:100%;justify-content:center;}
.cx-rep-list{display:flex;flex-direction:column;gap:10px;padding:12px 16px calc(16px + env(safe-area-inset-bottom));max-height:70vh;overflow:auto;}
.cx-rep-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 10px;color:var(--cx-mute);text-align:center;}
.cx-rep-empty i{font-size:26px;}
.cx-rep-item{border:1px solid var(--cx-line);background:var(--cx-glass-2);border-radius:14px;padding:12px;}
.cx-rep-top{display:flex;align-items:center;gap:10px;}
.cx-rep-who{display:flex;flex-direction:column;min-width:0;}
.cx-rep-who small{color:var(--cx-mute);font-size:12px;}
.cx-rep-body{margin:10px 0 8px;padding:10px 12px;border-radius:10px;background:rgba(0,0,0,.18);white-space:pre-wrap;word-break:break-word;font-size:14px;}
.cx-rep-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12.5px;color:var(--cx-mute);}
.cx-rep-reason{color:var(--cx-danger,#ff5a6a);font-weight:650;}
.cx-rep-note-txt{margin-top:6px;font-size:13px;color:var(--cx-mute);font-style:italic;}
.cx-rep-acts{display:flex;justify-content:flex-end;gap:8px;margin-top:10px;}
.cx-blocked-bar{gap:10px;}
html[data-theme="light"] .cx-rep-body{background:rgba(0,0,0,.05);}
