/* Дополнения нового клиента к стилям прототипа: аватары живых людей, ссылки-кнопки, заметки. */

/* аватар человека: его цвет приглушён к фону палитры — читается в обеих темах */
.av.av-u{background:color-mix(in srgb,var(--uc) 34%,var(--bg-3));color:var(--text-1);overflow:hidden}
:root[data-theme="light"] .av.av-u{background:color-mix(in srgb,var(--uc) 28%,#ffffff)}
.av.av-u img{width:100%;height:100%;object-fit:cover;display:block}

/* в прототипе строки и кнопки были <button>; в новом клиенте часть из них — ссылки */
a.rw,a.pl-all,a.hbtn,a.mb-ghost,a.um-adm,.pon a{color:inherit;text-decoration:none}
a.mb-ghost{display:flex;align-items:center;justify-content:center}
.pon a{position:relative;display:inline-flex}
.rw .sd.late{background:var(--accent)}

.nx-note{margin:4px 0 2px;font-size:12px;line-height:1.45;color:var(--text-3)}
#desk{position:fixed;inset:0}
:root[data-theme="light"] .hgreet b{color:#c98512}

/* лист поверх главной: плашки под ним гаснут */
#desk.cl-on .pgrid .ptile{opacity:.18;filter:blur(3px);pointer-events:none}
#desk.cl-on #hxc:not(.docked){opacity:.35}
#hxc.docked{z-index:20}

/* чат: то, чего не было в прототипе или что движок делает иначе */
.ch-emo{font-style:normal;font-size:15px;line-height:1}
.ch-head .ch-hash.big .ch-emo{font-size:19px}
.ch-avw.big .av{width:34px;height:34px;border-radius:11px}
.ch-empty{padding:28px 16px;text-align:center;font-size:13px;color:var(--text-4)}
.ch-empty.sm{padding:10px 12px;text-align:left}
.ch-older{display:block;margin:6px auto 10px;height:30px;padding:0 14px;border-radius:10px;background:var(--bg-3);color:var(--text-2);font-size:12.5px}
.ch-ed{font-size:11px;color:var(--text-4)}
.ch-m.hl{background:var(--current-soft)}
.ch-m.flash{animation:chflash 1.4s var(--ease)}
@keyframes chflash{0%,40%{background:var(--accent-soft)}100%{background:transparent}}
.ch-rm i.ment{background:var(--accent);color:#1f1606}
.ch-img{display:block;max-width:min(420px,100%);margin-top:6px;border-radius:12px;overflow:hidden;border:1px solid var(--line-soft)}
.ch-img img{display:block;width:100%;height:auto;max-height:320px;object-fit:cover}
.ch-vid{display:block;max-width:min(480px,100%);max-height:300px;margin-top:6px;border-radius:12px;background:#000}
a.ch-file{color:inherit;text-decoration:none}
.ch-tx a{color:var(--text-1);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:2px}
.ch-tx code{font:500 12.5px var(--font-mono);background:var(--bg-3);padding:1px 5px;border-radius:5px}
.ch-at{color:var(--text-1);font-weight:600}
.ch-at.me{color:var(--accent)}
.ch-atts{display:flex;flex-wrap:wrap;gap:6px;padding:6px 8px 0}
.ch-attp{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 4px 0 10px;border-radius:9px;background:var(--bg-3);font-size:12.5px;color:var(--text-2)}
.ch-attp svg{width:14px;height:14px}
.ch-attp b{font-weight:500;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-attp button{width:22px;height:22px;display:grid;place-items:center;border-radius:7px;color:var(--text-3)}
.ch-attp button:hover{background:var(--bg-4);color:var(--text-1)}
.ch-attp button svg{width:12px;height:12px}
.ch-attp .spin{width:12px;height:12px;border-radius:50%;border:2px solid var(--line-strong);border-top-color:var(--text-1);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.ch-box{position:relative}
.ch-emop{position:absolute;left:8px;bottom:calc(100% + 8px);z-index:5;display:grid;grid-template-columns:repeat(8,34px);gap:2px;padding:8px;border-radius:14px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(18px);box-shadow:var(--shadow-lift)}
.ch-emop button{width:34px;height:34px;border-radius:9px;font-size:18px}
.ch-emop button:hover{background:var(--bg-4)}
#chMent{position:relative}
/* настройки канала — своя панель справа */
#chSetP{overflow-y:auto}
.st-chb{display:flex;flex-direction:column;gap:18px;padding:14px 16px 20px}
.st-f{display:flex;flex-direction:column;gap:8px}
.st-f>span{font-size:12px;font-weight:600;color:var(--text-3)}
.st-f input{height:40px;padding:0 12px;border-radius:11px;background:var(--bg-1);border:1px solid var(--line);color:var(--text-1);font:14px var(--font-ui);outline:0}
.st-f input:focus{border-color:var(--text-3)}
.st-ics{display:flex;flex-wrap:wrap;gap:4px}
.st-ics button{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:17px;color:var(--text-3)}
.st-ics button svg{width:16px;height:16px}
.st-ics button:hover{background:var(--bg-3)}
.st-ics button.on{background:var(--bg-4);box-shadow:inset 0 0 0 1px var(--line-strong);color:var(--text-1)}
.st-acc{display:flex;flex-direction:column;gap:4px}
.st-acc button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:9px 12px;border-radius:11px;text-align:left}
.st-acc button:hover{background:var(--bg-3)}
.st-acc button.on{background:var(--bg-4);box-shadow:inset 0 0 0 1px var(--line-strong)}
.st-acc b{font-size:13.5px;font-weight:500}
.st-acc small{font-size:12px;color:var(--text-3)}
.st-danger{display:flex;flex-direction:column;gap:8px;padding-top:6px;border-top:1px solid var(--line-soft)}
.st-danger .mt-st{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--accent)}
.st-danger small{font-size:12px;color:var(--text-4);line-height:1.4}
.st-b.danger{height:38px;border-radius:11px;background:var(--accent-soft);color:var(--accent);font-weight:600;font-size:13px}
.st-b.danger:hover{background:var(--accent);color:#1f1606}
/* цитата при ответе — из исходных стилей прототипа (в сборку не попала: в прототипе ответ появлялся только после отправки) */
.ch-quote{display:flex;flex-direction:column;align-items:flex-start;gap:1px;max-width:min(520px,100%);margin:2px 0 4px;padding:5px 10px;border-left:2px solid var(--line-strong);border-radius:0 8px 8px 0;background:var(--bg-hover);text-align:left}
.ch-quote b{font-size:12px;font-weight:600;color:var(--text-2)}
.ch-quote span{font-size:12.5px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ch-quote:hover{background:var(--bg-3)}
/* карточка человека и окно статуса — живут на body, а не внутри главной */
#pfst,#pfcard{position:fixed;z-index:60}
#pfcard{width:320px}
.pf-ct{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 8px;border-radius:9px;font-size:13px;color:var(--text-1);text-decoration:none}
.pf-ct:hover{background:var(--bg-3)}
.pf-ch small{font-size:11.5px;font-weight:400;color:var(--text-4)}
.ch-m [data-pcard]{cursor:pointer}
/* всплывающее сообщение */
.toast{position:fixed;left:50%;top:68px;transform:translateX(-50%);z-index:90;display:flex;align-items:center;gap:12px;background:var(--bg-4);border:1px solid var(--line);border-radius:12px;padding:9px 14px;font-size:13px;color:var(--text-1);box-shadow:var(--shadow-2);max-width:calc(100vw - 32px);box-sizing:border-box;animation:tin .18s var(--ease)}
@keyframes tin{from{opacity:0;transform:translate(-50%,-6px)}to{opacity:1;transform:translate(-50%,0)}}
#pfst{box-sizing:border-box;max-width:calc(100vw - 24px)}
.toast-do{flex:none;height:26px;padding:0 10px;border-radius:8px;font:600 12.5px var(--font-ui);color:var(--text-1);background:var(--bg-3);border:1px solid var(--line)}.toast-do:hover{border-color:var(--line-strong)}
/* просмотр картинки или ролика внутри AVE (core/viewer.js) — всегда тёмный, как кинозал */
.fv{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:64px 24px 24px;background:rgba(8,8,10,.94);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);animation:fvin .18s ease both;color:#f4f4f6}
.fv[hidden]{display:none}
.fv img,.fv video{max-width:100%;max-height:calc(100vh - 96px);border-radius:12px;background:#000;box-shadow:0 30px 80px -30px #000}
.fv-bar{position:absolute;left:16px;right:16px;top:12px;height:44px;display:flex;align-items:center;gap:12px;font:500 13px var(--font-ui)}
.fv-bar b{flex:1;min-width:0;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fv-bar a{color:rgba(244,244,246,.66);text-decoration:none;padding:8px 12px;border-radius:10px}
.fv-bar a:hover{background:rgba(255,255,255,.08);color:#f4f4f6}
.fv-bar button{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.08);color:#f4f4f6}
.fv-bar button:hover{background:rgba(255,255,255,.16)}
.fv-bar button svg{width:20px;height:20px}
@keyframes fvin{from{opacity:0}to{opacity:1}}
/* нет связи с сервером (app.js, C-13) — тихая плашка сверху по центру, поверх всего */
.netoff{position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:250;padding:8px 14px 8px 30px;border-radius:12px;background:var(--bg-2);border:1px solid var(--line);color:var(--text-1);font:500 13px var(--font-ui);box-shadow:0 12px 30px -14px rgba(0,0,0,.7);animation:fvin .2s ease both}
.netoff::before{content:'';position:absolute;left:13px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:#e07a4a;animation:plpulse 1.4s ease-in-out infinite}
.netoff[hidden]{display:none}
