/* Guildas: a pagina no estilo do Discord (trilho de guildas, canais, conversa, membros) */

html, body { height: 100%; }
/* preso nas bordas da janela: no Chrome do Linux o 100vh/100dvh as vezes vinha menor que a janela e sobrava uma faixa vazia embaixo */
body.gapp { position: fixed; inset: 0; margin: 0; overflow: hidden; display: grid; grid-template-columns: 72px var(--chans-w, 264px) minmax(0, 1fr) var(--mlist-w, 248px); grid-template-rows: minmax(0, 1fr); background: var(--bg); }
/* cada coluna no seu lugar: no celular o trilho e os canais somem (display: none) e, sem isto, a conversa caia na coluna 1 (0 px) */
body.gapp > .rail { grid-column: 1; } body.gapp > .chans { grid-column: 2; } body.gapp > .pane { grid-column: 3; } body.gapp > .mlist { grid-column: 4; }
body.gapp.homeview { grid-template-columns: 72px var(--chans-w, 264px) minmax(0, 1fr) 0; }
body.gapp.homeview .mlist { display: none; }
body.gapp.nomembers { grid-template-columns: 72px var(--chans-w, 264px) minmax(0, 1fr) 0; }
body.gapp.nomembers .mlist { display: none; }

/* ---------------------------------------------------------------- trilho */
.rail { background: var(--deep); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rlist { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rbtn { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-2); color: var(--text-2); border: 0; cursor: pointer; text-decoration: none; overflow: visible; transition: border-radius .15s, background .15s, color .15s; font: 700 15px var(--font); }
.rbtn img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.rbtn.home img { width: 40px; height: 40px; object-fit: contain; border-radius: 0; }
.rbtn:hover, .rbtn.on { border-radius: 16px; background: var(--surface-3); color: var(--title); }
.rbtn.add { color: var(--online); background: var(--surface); }
.rbtn.add:hover { background: var(--online); color: var(--on-accent); }
.rbtn::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: var(--title); transform: translateY(-50%); transition: height .15s; }
.rbtn:hover::before { height: 18px; }
.rbtn.on::before { height: 36px; }
.rbtn.frozen { opacity: .5; }
.rsep { width: 32px; height: 2px; border-radius: 2px; background: var(--line-2); flex: 0 0 auto; }
.rtip { position: fixed; z-index: 60; padding: 7px 11px; border-radius: 8px; background: var(--deep); border: 1px solid var(--line-2); color: var(--title); font: 600 13px var(--font); pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; }

/* ---------------------------------------------------------------- canais */
.chans { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); border-right: 1px solid var(--line); }
.ghead { height: 52px; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--title); font: 700 15px var(--font-display); }
.ghead:hover { background: var(--surface); }
.ghead .gname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghead .gico { color: var(--text-3); }
.gmenu { position: absolute; z-index: 30; top: 56px; left: 10px; right: 10px; display: grid; gap: 2px; padding: 6px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.gmenu button { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 13.5px var(--font); cursor: pointer; text-align: left; }
.gmenu button:hover { background: var(--surface-3); color: var(--title); }
.gmenu button.bad { color: var(--danger-text); }
.gmenu button.bad:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); }

.planbar { margin: 10px 10px 0; padding: 9px 11px; border-radius: 9px; font-size: 12px; line-height: 1.4; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; }
.planbar b { color: var(--title); }
.planbar.warn { border-color: color-mix(in srgb, var(--busy) 45%, transparent); background: color-mix(in srgb, var(--busy) 10%, transparent); }
.planbar.bad { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.clist { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 14px; }
.cat { display: flex; align-items: center; gap: 4px; margin: 16px 0 3px; padding: 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); cursor: pointer; user-select: none; }
.cat:hover { color: var(--text-2); }
.cat .chev { width: 12px; height: 12px; transition: transform .12s; }
.cat.closed .chev { transform: rotate(-90deg); }
.cat .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .cadd { opacity: 0; border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; display: grid; }
.cat:hover .cadd { opacity: 1; }
.ch { display: flex; align-items: center; gap: 7px; margin: 1px 0; padding: 6px 8px; border-radius: 7px; color: var(--text-3); cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.ch .ic { width: 17px; height: 17px; flex: 0 0 auto; opacity: .8; }
.ch .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch:hover { background: var(--surface-2); color: var(--text-2); }
.ch.on { background: var(--surface-3); color: var(--title); }
/* nao lido: nome branco e forte + pilula branca na borda da lista (como no Discord) */
.ch { position: relative; }
.ch.unread { color: var(--title); font-weight: 700; }
.ch.unread .ic { color: var(--title); }
.ch.unread::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--title); transform: translateY(-50%); }
.cat.unread { color: var(--title); }
.cat.unread .n::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--title); vertical-align: 2px; }
.rbtn.unread:not(.on):not(:hover)::before { height: 8px; }
/* linha "Novas mensagens" ao abrir um canal com coisa nova */
.newsep { display: flex; align-items: center; gap: 10px; margin: 12px 16px 4px; color: var(--danger-text); font: 700 11px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.newsep::before, .newsep::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--danger) 55%, transparent); }
.newsep::before { flex: 0 0 0; }
.ch .cfg { opacity: 0; border: 0; background: none; color: inherit; cursor: pointer; padding: 1px; display: grid; }
.ch:hover .cfg, .ch.on .cfg { opacity: .8; }
.ch .cnt { font-size: 11px; color: var(--text-3); font-weight: 600; }
.ch.locked { opacity: .55; }
.vlist { display: grid; gap: 1px; margin: 0 0 6px 30px; }
.vu { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.vu .av { width: 22px; height: 22px; font-size: 9px; }
.vu .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu .ic { width: 14px; height: 14px; color: var(--text-3); }
.vu .ic.off { color: var(--danger-text); }
.vu.me .n { color: var(--title); font-weight: 600; }
/* transmitindo a tela: "AO VIVO" e quantos assistem (como no Discord) */
.vu .vlive { flex: 0 0 auto; padding: 0 5px; border-radius: 4px; background: var(--danger); color: #fff; font: 800 9px/1.6 var(--font); letter-spacing: .04em; }
.vu .vviews { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; font: 700 11px var(--font); color: var(--text-3); }
.vu .vviews .ic { width: 12px; height: 12px; }
/* falando na chamada: anel verde no avatar, igual ao quadro da chamada */
.vu .av { transition: box-shadow .12s; }
.vu.speaking .av { box-shadow: 0 0 0 2px var(--online), 0 0 8px color-mix(in srgb, var(--online) 45%, transparent); }
.vu.speaking .n { color: var(--title); }
/* com moldura o anel fica escondido atras dela: a propria moldura acende em verde */
.vu .avframe { transition: filter .12s; }
.vu.speaking .avframe { filter: drop-shadow(0 0 1.5px var(--online)) drop-shadow(0 0 1.5px var(--online)) drop-shadow(0 0 4px color-mix(in srgb, var(--online) 70%, transparent)); }
/* arrastar alguem para outro canal de voz */
.vu[draggable="true"] { cursor: grab; }
.vu.dragging { opacity: .4; }
body.vdrag .ch .cfg { visibility: hidden; }
.ch.dropok { background: color-mix(in srgb, var(--online) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--online) 55%, transparent); color: var(--title); }
/* arrastando a janelinha do video: os iframes nao roubam o ponteiro */
.aview.pip.dragging { cursor: grabbing; }
html:has(.aview.pip.dragging) iframe { pointer-events: none; }

.vbar { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--online) 7%, var(--bg-2)); }
.vbar .vinfo { flex: 1; min-width: 0; }
.vbar b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--online); }
.vbar small { display: block; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.vbar .ibtn.off { color: var(--danger-text); }
.ubar { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-top: 1px solid var(--line); background: var(--deep); }
.ubar .uinfo { flex: 1; min-width: 0; }
.ubar b { display: block; font-size: 13px; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubar small { display: block; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* placa (Loja): a barra vira um cartao com a arte, presa na direita e cortada sem esticar (cover) */
.ubar.plated { position: relative; isolation: isolate; margin: 6px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: var(--deep) var(--plate) right center / cover no-repeat; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.ubar.plated::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .3) 50%, rgba(0, 0, 0, 0) 85%); pointer-events: none; }
.ubar.plated b, .ubar.plated small { text-shadow: 0 1px 3px rgba(0, 0, 0, .85); }
.ubar.plated small { color: rgba(255, 255, 255, .78); }
.ubar.plated .ubtns { background: rgba(0, 0, 0, .38); border-radius: 9px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mem.plated { position: relative; isolation: isolate; }
.mem.plated::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--plate) right center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 30%, #000 80%); mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 30%, #000 80%); opacity: .9; pointer-events: none; }
.mem.plated .n { text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.mem.plated.off::before { opacity: .4; }

/* ---------------------------------------------------------------- meio */
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.phead { height: 52px; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.phead .pic { display: grid; color: var(--text-3); }
.phead .ptitle { color: var(--title); font-size: 15px; white-space: nowrap; }
.phead .ptopic { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 13px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.phead .ptopic:empty { display: none; }
.phead .sp { flex: 1; }
.phead .menubtn { display: none; }
.phead .ibtn.on { background: var(--surface-3); color: var(--title); box-shadow: none; }

.tview, .vview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vview { position: relative; background: var(--deep); }
.vview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vview iframe.away { visibility: hidden; }
.hview { flex: 1; min-height: 0; position: relative; background: var(--bg); }
.hview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* chamada minimizada: janelinha no canto (arrasta e gruda no canto mais perto) */
.pipui { display: none; }
.vview.pip { position: fixed; z-index: 45; width: 384px; height: 216px; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-3); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transition: left .18s, top .18s, right .18s, bottom .18s; }
.vview.pip.dragging { transition: none; opacity: .92; }
.vview.pip.pip-br { right: var(--pip-r, 20px); bottom: 92px; }
.vview.pip.pip-bl { left: var(--pip-l, 340px); bottom: 92px; }
.vview.pip.pip-tr { right: var(--pip-r, 20px); top: 66px; }
.vview.pip.pip-tl { left: var(--pip-l, 340px); top: 66px; }
@media (max-width: 700px) { .vview.pip { width: 240px; height: 135px; } }
.vview.pip .pipui { display: flex; position: absolute; inset: 0; z-index: 2; flex-direction: column; justify-content: space-between; cursor: pointer; touch-action: none; }
.vview.pip.dragging .pipui { cursor: grabbing; }
.pipui .piptop, .pipui .pipbot { display: flex; align-items: center; gap: 6px; padding: 7px 8px; opacity: 0; transition: opacity .15s; }
.pipui .piptop { background: linear-gradient(rgba(0, 0, 0, .72), transparent); }
.pipui .pipbot { justify-content: center; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.vview.pip:hover .pipui .piptop, .vview.pip:hover .pipui .pipbot, .pipui:focus-within .piptop, .pipui:focus-within .pipbot { opacity: 1; }
.pipui .pipname { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; color: #fff; font: 600 12.5px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipui .pipname .dot { flex: 0 0 auto; width: 8px; height: 8px; }
.pipui .ibtn { background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .12); color: #fff; }
.pipui .ibtn:hover { background: rgba(255, 255, 255, .14); }
.pipui .ibtn.off { color: var(--danger-text); }
.pipui .ibtn.bad { background: var(--danger); border-color: transparent; }
.pipui .ibtn.bad:hover { filter: brightness(1.1); }

/* menu do botao direito, no jeito do Discord */
.ctx { position: fixed; z-index: 80; min-width: 210px; max-width: 280px; padding: 6px; border-radius: 8px; background: var(--deep); border: 1px solid var(--line-2); box-shadow: 0 12px 34px rgba(0, 0, 0, .55); font: 500 13.5px var(--font); user-select: none; animation: ctxIn .08s ease-out; }
@keyframes ctxIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.ctx[hidden] { display: none; }
.ctx .citem { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.ctx .citem .cl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx .citem .ic { flex: 0 0 auto; width: 16px; height: 16px; opacity: .85; }
.ctx .citem:hover, .ctx .citem:focus-visible, .ctx .citem.hassub[data-k]:hover { background: var(--accent); color: var(--on-accent); outline: none; }
.ctx .citem.bad { color: var(--danger-text); }
.ctx .citem.bad:hover, .ctx .citem.bad:focus-visible { background: var(--danger); color: #fff; }
.ctx .citem:disabled { opacity: .4; cursor: default; background: transparent; color: var(--text-2); }
.ctx .cdot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; }
.ctx .cchk { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line-3); display: grid; place-items: center; }
.ctx .cchk .ic { width: 13px; height: 13px; opacity: 0; }
.ctx .cchk.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ctx .cchk.on .ic { opacity: 1; }
.ctx .citem:hover .cchk.on { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }
.ctx .cchev { width: 15px; height: 15px; }
.ctx .csep { height: 1px; margin: 4px 6px; background: var(--line); }
.ctx .crange { padding: 6px 8px 8px; }
.ctx .crl { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12.5px; margin-bottom: 6px; }
.ctx .crl b { color: var(--title); font-weight: 600; }
.ctx .crange input { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--track-2) var(--p, 50%)); outline: none; cursor: pointer; }
.ctx .crange input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ctx .crange input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.vu { cursor: pointer; }
.empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 20px; color: var(--text-3); }
.empty h2 { margin: 0; color: var(--title); font: 700 20px var(--font-display); }
.empty p { margin: 0; max-width: 420px; }

.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 0 10px; overflow-anchor: none; }
.mstart { padding: 10px 18px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.mstart .big { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--title); margin-bottom: 12px; }
.mstart .big .ic { width: 32px; height: 32px; }
.mstart h2 { margin: 0 0 4px; color: var(--title); font: 700 24px var(--font-display); }
.mstart p { margin: 0; color: var(--text-3); }
.more { display: flex; justify-content: center; padding: 8px; }
.daysep { display: flex; align-items: center; gap: 10px; margin: 18px 18px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.daysep::before, .daysep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m { position: relative; padding: 2px 18px 2px 74px; min-height: 22px; }
.m:hover { background: var(--accent-tint); }
.m.head { margin-top: 14px; padding-top: 4px; }
.m .av { position: absolute; left: 18px; top: 6px; width: 40px; height: 40px; font-size: 14px; cursor: pointer; }
.m .who { display: flex; align-items: baseline; gap: 8px; }
.m .who b { color: var(--title); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.m .who b:hover { text-decoration: underline; }
.m .who time { font-size: 11px; color: var(--text-3); }
.m .hm { position: absolute; left: 0; width: 70px; top: 4px; text-align: center; font-size: 10.5px; color: var(--text-3); opacity: 0; }
.m:hover .hm { opacity: 1; }
.m .tx { color: var(--text); font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.m .tx a { color: var(--link); }
.m .ed { font-size: 10.5px; color: var(--text-3); margin-left: 4px; }
.m.pending .tx { opacity: .55; }
.m .acts { position: absolute; right: 18px; top: -12px; display: none; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.m:hover .acts { display: flex; }
.m .acts button { width: 28px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.m .acts button:hover { background: var(--surface-3); color: var(--title); }
.m .acts button.bad:hover { color: var(--danger-text); }
.m .edit textarea { width: 100%; min-height: 44px; resize: vertical; background: var(--inset); color: var(--text); border: 1px solid var(--line-3); border-radius: 8px; padding: 8px; font: 14.5px/1.45 var(--font); }
.m .edit small { font-size: 11.5px; color: var(--text-3); }
.att { margin-top: 6px; max-width: 520px; }
.att img, .att video { display: block; max-width: 100%; max-height: 340px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--deep); }
.att audio { display: block; width: 100%; max-width: 420px; height: 38px; }
.att .fcard { display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); text-decoration: none; color: var(--text); }
.att a.fcard:hover { border-color: var(--line-3); }
.att .fic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-3); color: var(--text-2); }
.att .fn { flex: 1; min-width: 0; }
.att .fn b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .fn small, .att .meta { font-size: 11px; color: var(--text-3); }
.att .meta { margin-top: 4px; }
.att.gone { opacity: .6; }
.upl { display: flex; align-items: center; gap: 10px; margin: 8px 18px 0 74px; padding: 9px 11px; max-width: 420px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.upl .un { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl .bar { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; margin-top: 6px; }
.upl .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .12s linear; }
.upl > div { flex: 1; min-width: 0; }

.typing { height: 22px; flex: 0 0 auto; padding: 2px 20px 0; font-size: 12px; color: var(--text-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.typing b { color: var(--text-2); }
.composer { position: relative; flex: 0 0 auto; padding: 0 16px 16px; }
.composer .box { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.composer .box:focus-within { border-color: var(--line-3); }
.composer textarea { flex: 1; min-width: 0; max-height: 40vh; resize: none; border: 0; outline: none; background: transparent; color: var(--text); font: 14.5px/1.45 var(--font); padding: 7px 4px; }
.composer .ibtn { background: transparent; border-color: transparent; }
.composer .ibtn:hover { background: var(--surface-3); }
.nosend { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-3); font-size: 13px; text-align: center; }
body.dropping .pane::after { content: "Solte para anexar"; position: fixed; inset: 14px; z-index: 40; display: grid; place-items: center; border: 2px dashed var(--line-3); border-radius: 18px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); font: 600 18px var(--font-display); color: var(--title); pointer-events: none; }

/* ---------------------------------------------------------------- membros */
.mlist { background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; padding: 8px 8px 20px; min-width: 0; }
.mgrp { margin: 18px 8px 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.mem { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; cursor: pointer; }
.mem:hover { background: var(--surface-2); }
.mem .avw { position: relative; flex: 0 0 auto; }
.mem .av { width: 32px; height: 32px; }
.mem .avw .dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; box-shadow: 0 0 0 3px var(--bg-2); }
.mem .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--text-2); }
.mem .ic { width: 14px; height: 14px; color: var(--busy); }
.mem.off { opacity: .42; }

/* ---------------------------------------------------------------- cartao de membro */
.pop { position: fixed; z-index: 50; width: 290px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100dvh - 16px); }
.pop .ptop { height: 54px; background: linear-gradient(135deg, var(--surface-3), var(--surface)); }
.pop .ptop.img { height: 110px; }
.pop .pav { margin: -34px 0 0 14px; }
.pop .pav .av { width: 68px; height: 68px; font-size: 22px; box-shadow: 0 0 0 5px var(--deep); }
.pop .pbody { padding: 8px 14px 14px; overflow-y: auto; min-height: 0; }
.pop > :not(.pbody) { flex-shrink: 0; }
.pop .rolewrap { margin-top: 8px; display: grid; gap: 6px; }
.pop .rolesearch { padding: 7px 10px; font-size: 13px; }
.pop .rolemore { margin: 0; font-size: 11.5px; }
.pop .rolepick .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop h3 { margin: 0; color: var(--title); font: 700 17px var(--font-display); }
.pop .sub { font-size: 12.5px; color: var(--text-3); }
.pop .roles { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 2px; }
.pop .bio { margin-top: 10px; padding: 9px 10px; border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.pop .badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge2 { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--title); background: var(--surface-3); border: 1px solid var(--line-3); }
.pop .rchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); font-size: 11.5px; color: var(--text-2); }
.pop .rchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.pop .pacts { display: grid; gap: 4px; margin-top: 12px; }
.pop .pacts .btn { justify-content: flex-start; }
.pop .rolepick { display: grid; gap: 2px; max-height: 230px; overflow-y: auto; padding: 4px; border-radius: 8px; background: var(--surface); }
.pop .rolepick label { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pop .rolepick label:hover { background: var(--surface-3); }
.pop .rolepick label.dis { opacity: .4; cursor: not-allowed; }

/* ---------------------------------------------------------------- janelas */
.gov { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--deep) 82%, transparent); backdrop-filter: blur(6px); }
.gcard { width: min(480px, 100%); max-height: min(92vh, 820px); display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; }
.gcard.wide { width: min(860px, 100%); height: min(92vh, 720px); }
.gcard .mh { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.gcard .mh h3 { flex: 1; margin: 0; color: var(--title); font: 700 17px var(--font-display); }
.gcard .mb { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 18px 16px; display: grid; gap: 14px; align-content: start; }
.gcard .mf { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.gcard .hint { margin: 0; }
.kinds { display: grid; gap: 8px; }
.kind { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; }
.kind input { accent-color: var(--accent); }
.kind b { display: block; color: var(--title); font-size: 14px; }
.kind small { color: var(--text-3); font-size: 12px; }
.kind:has(input:checked) { border-color: var(--line-3); background: var(--surface-3); }

/* configuracoes grandes: abas na esquerda */
.settings { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.settings nav { padding: 18px 10px; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.settings nav h4 { margin: 0 8px 8px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings nav button { padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.settings nav button:hover { background: var(--surface-2); color: var(--title); }
.settings nav button.on { background: var(--surface-3); color: var(--title); }
.settings nav button.bad { color: var(--danger-text); margin-top: auto; }
.settings .sbody { min-width: 0; overflow-y: auto; padding: 22px 24px 30px; display: grid; gap: 16px; align-content: start; }
.settings .sbody h3 { margin: 0; color: var(--title); font: 700 18px var(--font-display); }
.settings .xbtn, .gcard > .xbtn { position: absolute; top: 14px; right: 14px; z-index: 5; }
.gcard.wide { position: relative; }

.iconpick { display: flex; align-items: center; gap: 16px; }
.gico-big { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; background: var(--surface-3); color: var(--title); font: 700 26px var(--font); overflow: hidden; flex: 0 0 auto; }
.gico-big img { width: 100%; height: 100%; object-fit: cover; }
.rowline { display: flex; align-items: center; gap: 14px; }
.rowline > div { flex: 1; min-width: 0; }
.rowline b { display: block; color: var(--text); font-size: 14px; }
.rowline small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }

.rolelist { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; min-height: 0; }
.rolecol { display: grid; gap: 2px; align-content: start; }
.rolecol button.r { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 13.5px var(--font); text-align: left; cursor: pointer; }
.rolecol button.r:hover { background: var(--surface-2); }
.rolecol button.r.on { background: var(--surface-3); color: var(--title); }
.roledot { display: block; width: 14px; height: 14px; margin: 5px; border-radius: 50%; background: var(--text-3); }
.rolecol button.r i { width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); flex: 0 0 auto; }
.rolecol button.r .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permgrp h4 { margin: 8px 0 4px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.permrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.permrow > div { flex: 1; min-width: 0; }
.permrow b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.permrow small { display: block; color: var(--text-3); font-size: 12px; margin-top: 1px; }
.permrow.dis { opacity: .45; }
.tri { display: flex; flex: 0 0 auto !important; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); }
.roleed { display: grid; gap: 14px; align-content: start; min-width: 0; }
.roleed .permgrp { margin-top: 4px; }
.tri button { width: 34px; height: 28px; border: 0; background: var(--surface-2); color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.tri button + button { border-left: 1px solid var(--line-2); }
.tri button.on.deny { background: var(--danger); color: #fff; }
.tri button.on.mid { background: var(--surface-3); color: var(--title); }
.tri button.on.allow { background: var(--ok); color: #fff; }
.tri .ic { width: 14px; height: 14px; }
.colors { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.colors button { width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--title); }
.colors input[type="color"] { width: 40px; height: 30px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); }

.tbl2 { display: grid; gap: 2px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; }
.trow:hover { background: var(--surface-2); }
.trow > div { flex: 1; min-width: 0; }
.trow b { display: block; color: var(--text); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow small { display: block; color: var(--text-3); font-size: 12px; }
.trow code { font: 13px var(--mono); color: var(--title); }
.planbox { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.planbox .big { font: 700 26px var(--font-display); color: var(--title); }
.paytext { white-space: pre-wrap; padding: 12px; border-radius: 10px; background: var(--inset); border: 1px solid var(--line-2); font: 13px/1.5 var(--mono); color: var(--text); }

/* ---------------------------------------------------------------- telas estreitas */
@media (max-width: 1150px) {
  body.gapp { grid-template-columns: 72px var(--chans-w, 264px) minmax(0, 1fr) 0; }
  body.gapp .mlist { display: none; }
  body.gapp.showmembers .mlist { display: block; position: fixed; z-index: 35; right: 0; top: 52px; bottom: 0; width: 260px; box-shadow: var(--shadow); }
}
@media (max-width: 760px) {
  body.gapp, body.gapp.homeview, body.gapp.nomembers { grid-template-columns: 0 0 minmax(0, 1fr) 0; }
  #grpBtn { display: none; }   /* no celular, adicionar gente fica na gaveta das pessoas: aqui espremia o nome */
  body.gapp .rail, body.gapp .chans { display: none; }
  body.gapp.showchans .rail { display: flex; position: fixed; z-index: 36; left: 0; top: 0; bottom: 0; width: 72px; }
  body.gapp.showchans .chans { display: flex; position: fixed; z-index: 36; left: 72px; top: 0; bottom: 0; width: min(280px, calc(100vw - 72px)); box-shadow: var(--shadow); }
  .phead .menubtn { display: grid; }
  .phead .ptopic { display: none; }
  .settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .settings nav { flex-direction: row; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings nav h4 { display: none; }
  .settings nav button.bad { margin-top: 0; }
  .rolelist { grid-template-columns: 1fr; }
  .m { padding-left: 66px; padding-right: 12px; }
  .m .av { left: 12px; width: 38px; height: 38px; }
}

/* painel de conexao ("Voz conectada" com o mouse em cima) */
.vbar .vinfo { cursor: default; }
.netpop { position: fixed; z-index: 70; width: 300px; padding: 12px 14px 12px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line-2); box-shadow: 0 16px 44px rgba(0, 0, 0, .6); font: 13px var(--font); color: var(--text-2); animation: ctxIn .1s ease-out; }
.netpop[hidden] { display: none; }
.netpop .nh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.netpop .nh b { flex: 1; color: var(--title); font: 600 14px var(--font-display); }
.netpop .nq { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.netpop .nq.good { background: color-mix(in srgb, var(--online) 18%, transparent); color: var(--ok-text); }
.netpop .nq.mid { background: color-mix(in srgb, var(--busy) 18%, transparent); color: var(--busy-text); }
.netpop .nq.bad { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger-text); }
.netpop canvas { display: block; width: 100%; height: 95px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line); }
.netpop .nsrv { margin: 9px 0 6px; color: var(--title); font: 600 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpop .nrows { display: grid; gap: 3px; }
.netpop .nrows div { display: flex; justify-content: space-between; gap: 10px; }
.netpop .nrows b { color: var(--title); font-weight: 600; }
.netpop .ntip { margin: 9px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }

/* ---------------------------------------------------------------- PV (mensagens diretas) */
.rbadge { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--danger); color: #fff; font: 700 11px var(--font); box-shadow: 0 0 0 3px var(--deep); pointer-events: none; }
body.dmmode .ghead, body.dmmode .gmenu, body.dmmode .planbar, body.dmmode .clist, body.dmmode #membersBtn { display: none !important; }
.dmside { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dmside[hidden] { display: none; }
.dmtop { height: 52px; flex: 0 0 auto; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--title); font: 700 15px var(--font-display); }
.dmlist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.dmrow { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--text-2); }
.dmrow:hover { background: var(--surface-2); color: var(--text); }
.dmrow.on { background: var(--surface-3); color: var(--title); }
.dmrow.home, .dmrow.fr { margin-bottom: 6px; padding: 9px 8px; }
.dmrow .dmic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--title); flex: 0 0 auto; }
.dmrow .avw { position: relative; flex: 0 0 auto; }
.dmrow .av { width: 32px; height: 32px; font-size: 12px; }
.dmrow .avw .dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; box-shadow: 0 0 0 3px var(--bg-2); }
.dmrow:hover .avw .dot { box-shadow: 0 0 0 3px var(--surface-2); }
.dmrow .dmn { flex: 1; min-width: 0; display: grid; }
.dmrow .dmn b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmrow .dmn small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmrow.unread .dmn b { color: var(--title); font-weight: 700; }
.dmrow.unread .dmn small { color: var(--text-2); }
.dmrow .udot { width: 8px; height: 8px; border-radius: 50%; background: var(--title); flex: 0 0 auto; }
.dmrow .dmx { display: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); cursor: pointer; place-items: center; }
.dmrow .dmx .ic { width: 14px; height: 14px; }
.dmrow:hover .dmx { display: grid; }
.dmrow:hover .udot { display: none; }
.dmrow .dmx:hover { color: var(--title); background: var(--surface-3); }
.dmhead { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px; font: 700 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.dmhead .cadd { display: grid; }
.dmempty { padding: 10px 8px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.phead .pic .av { width: 24px; height: 24px; font-size: 10px; }
.dmstart .av { width: 80px; height: 80px; font-size: 26px; margin-bottom: 12px; }
/* perfil da pessoa a' direita */
.mlist.dmprof { padding: 0; background: var(--bg-2); }
.dpban { height: 120px; background: linear-gradient(135deg, var(--surface-3), var(--surface)); }
.dpav { position: relative; width: 92px; margin: -46px 0 0 16px; }
.dpav .av { width: 92px; height: 92px; font-size: 30px; box-shadow: 0 0 0 6px var(--bg-2); }
.dpav .dot { position: absolute; right: 2px; bottom: 4px; width: 18px; height: 18px; box-shadow: 0 0 0 5px var(--bg-2); }
.dpbody { padding: 10px 16px 20px; display: grid; gap: 10px; }
.dpbody h3 { margin: 0; color: var(--title); font: 700 19px var(--font-display); overflow-wrap: anywhere; }
.dpbody .bio { padding: 10px 11px; border-radius: 9px; background: var(--surface); color: var(--text-2); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dpbody .since { font-size: 12px; color: var(--text-3); }
.dpbody .badges { display: flex; flex-wrap: wrap; gap: 6px; }
/* nova conversa */
.dmpick { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; margin-top: 10px; }
.dmprow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.dmprow:hover { background: var(--surface-3); }
.dmprow .av { width: 32px; height: 32px; font-size: 12px; }
.dmprow .dmn { display: grid; }
.dmprow .dmn b { font-weight: 600; font-size: 14px; }
.dmprow .dmn small { font-size: 12px; color: var(--text-3); }
.dmhead .cadd { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); cursor: pointer; place-items: center; }
.dmhead .cadd .ic { width: 15px; height: 15px; }
.dmhead .cadd:hover { color: var(--title); background: var(--surface-3); }

.pop h3 img.bdg, .dpbody h3 img.bdg { margin-left: 6px; vertical-align: -5px; }
.vu .n img.bdg { margin-left: 5px; vertical-align: -3px; }
.pop .bdgrow { margin-top: 8px; }

/* ---------------------------------------------------------------- tópicos, caixa de entrada, modo lento e arrastar canais */
.thlist { position: relative; margin: 0 0 4px 18px; padding-left: 12px; }
.thlist::before { content: ''; position: absolute; left: 3px; top: 0; bottom: 15px; width: 1px; background: var(--line-2); }
.ch.th { position: relative; min-height: 30px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
.ch.th::after { content: ''; position: absolute; left: -9px; top: 50%; width: 8px; height: 1px; background: var(--line-2); }
.ch.th.unread::before { display: none; }
.inboxm { display: none; }
.thchip { display: inline-flex; align-items: center; gap: 8px; max-width: min(420px, 100%); margin: 6px 0 4px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--text-3); font: 500 13px var(--font); text-align: left; cursor: pointer; }
.thchip:hover { background: var(--surface-2); border-color: var(--text-3); }
.thchip b { color: var(--title); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thchip span { flex: 0 0 auto; white-space: nowrap; }
.thchip .ic { width: 16px; height: 16px; flex: 0 0 auto; }
.thchip.unread { border-color: var(--title); }
.phead .thup { padding: 0; border: 0; background: none; color: var(--text-3); font: inherit; font-weight: 600; cursor: pointer; }
.phead .thup:hover { color: var(--title); text-decoration: underline; }
.phead .thsep { margin: 0 7px; color: var(--text-3); font-weight: 400; }
.throot { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--line-2); border-radius: 4px 10px 10px 4px; background: var(--surface); cursor: pointer; }
.throot:hover { background: var(--surface-2); }
.thrh { display: flex; align-items: center; gap: 8px; }
.thrh .av { width: 24px; height: 24px; font-size: 10px; position: static; margin: 0; }
.thrh b { color: var(--title); font-size: 14px; }
.thrh time { color: var(--text-3); font-size: 11.5px; }
.throot .tx { margin-top: 5px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: hidden; }
.throw { display: flex; align-items: center; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.throw:hover { background: var(--surface-2); }
.throw.unread { border-color: var(--text-3); }
.throw .frn b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.throw .frn b .ic { width: 13px; height: 13px; color: var(--text-3); }
.pinspop .frcap { padding: 4px 4px 0; }
.intabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 8px 10px 0; }
.intabs button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 600 13.5px var(--font); cursor: pointer; }
.intabs button:hover { background: var(--surface-2); }
.intabs button.on { background: var(--surface-3); color: var(--title); }
.inpop { width: min(480px, calc(100vw - 16px)); }
.incard { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.incard.read { opacity: .62; }
.incard.read:hover { opacity: 1; }
.inwh { display: flex; align-items: center; gap: 9px; padding: 9px 9px 6px 11px; }
.ini { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background-color: var(--surface-3); color: var(--title); font: 700 10px var(--font); }
.ini.av, .ini.gav { border-radius: 50%; }
.ini img { width: 100%; height: 100%; object-fit: cover; }
.inn { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.inn b { color: var(--title); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inn small { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inm { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 7px 11px 9px; cursor: pointer; border-top: 1px solid var(--line); }
.inm:hover, .inm:focus-visible { background: var(--surface-2); }
.inm .av { width: 30px; height: 30px; font-size: 11px; }
.inwhy { color: #f0b232; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intx { margin-top: 1px; color: var(--text); font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.inmore { padding: 0 11px 6px 46px; color: var(--text-3); font-size: 12px; }
.inall { justify-self: center; }
.slowlb { flex: 0 0 auto; align-self: flex-end; margin: -22px 20px 0 0; display: flex; align-items: center; gap: 5px; height: 22px; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.slowlb[hidden] { display: none; }
.slowlb .ic { width: 13px; height: 13px; }
.slowlb.wait { color: #f0b232; }
@media (max-width: 760px) {
  #inboxBtn { display: none; }
  .chans .inboxm { display: flex; margin: 8px 10px 0; }
  body.dmmode .chans > .inboxm, body:not(.dmmode) .dmside .inboxm { display: none; }
  .phead .thup { font-size: 0; }
  .phead .thup::before { content: '‹'; font-size: 24px; line-height: 1; padding: 0 8px 0 2px; }
  .phead .thsep { display: none; }
}
@media (max-width: 420px) { #notifBtn { display: none; } }   /* o sino do canal tambem esta' em segurar o canal na lista */
.cdrag #clist .ch, .cdrag #clist .cat { cursor: grabbing; }
#clist .dragging { opacity: .4; }
#clist .dropb, #clist .dropa { position: relative; }
#clist .dropb::before, #clist .dropa::before { content: ''; position: absolute; z-index: 2; left: 6px; right: 6px; height: 3px; border-radius: 2px; background: var(--online); }
#clist .dropb::before { top: -2px; } #clist .dropa::before { bottom: -2px; top: auto; }
#clist .cat.dropin { background: color-mix(in srgb, var(--online) 22%, transparent); border-radius: 6px; color: var(--title); }

/* ---------------------------------------------------------------- amigos (friends.js) e grupos (groups.js) */
.handle { color: var(--text-3); font-size: 13px; overflow-wrap: anywhere; }
.pop .handle { margin: 1px 0 6px; }
.dpbody .handle { margin-top: -8px; }
.fview { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.fview[hidden] { display: none; }
.frtabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 10px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.frtabs::-webkit-scrollbar { display: none; }
.frtabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 600 14px var(--font); cursor: pointer; }
.frtabs button:hover { background: var(--surface-2); color: var(--title); }
.frtabs button.on { background: var(--surface-3); color: var(--title); }
.frtabs button.add { color: var(--online); }
.frtabs button.add.on { background: color-mix(in srgb, var(--online) 18%, transparent); color: var(--online); }
.frnum { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; font: 700 11px var(--font); flex: 0 0 auto; }
.frlist { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 24px; }
.frq { width: 100%; margin-bottom: 12px; }
.frcap { padding: 8px 8px 8px; font: 700 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.frno { padding: 24px 12px; color: var(--text-3); font-size: 14px; text-align: center; line-height: 1.5; }
.frrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text-2); font: inherit; text-align: left; }
.fview .frrow { cursor: pointer; }
.frrow:hover { background: var(--surface-2); border-radius: 8px; border-top-color: transparent; }
.frrow:hover + .frrow { border-top-color: transparent; }
.frrow .avw { position: relative; flex: 0 0 auto; }
.frrow .av { width: 36px; height: 36px; font-size: 13px; }
.frrow .avw .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--bg); }
.frrow:hover .avw .dot { box-shadow: 0 0 0 3px var(--surface-2); }
.frn { flex: 1; min-width: 0; display: grid; }
.frn b { color: var(--title); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frn b i { margin-left: 7px; font-style: normal; font-weight: 400; font-size: 13px; color: var(--text-3); }
.frn small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fra { display: flex; gap: 8px; flex: 0 0 auto; }
.frib { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); }
.frib.ok:hover { color: var(--online); }
.frib.bad:hover { color: var(--danger); }
.fradd { padding: 6px 4px 18px; border-bottom: 1px solid var(--line); }
.fradd h3 { margin: 0 0 4px; color: var(--title); font: 700 17px var(--font-display); }
.fradd .hint { margin: 0 0 12px; }
.frin { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); }
.frin:focus-within { border-color: var(--title); }
.frin span { color: var(--text-3); font-size: 16px; }
.frin input { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; color: var(--title); font: 500 16px var(--font); }
.frmsg { min-height: 20px; margin: 9px 2px 0; font-size: 13.5px; color: var(--text-2); }
.frmsg.ok { color: var(--online); }
.frmsg.bad { color: #f2777a; }
.frme { display: grid; gap: 6px; padding: 18px 4px; }
.frme small { color: var(--text-3); }
.frme div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.frme b { color: var(--title); font-size: 16px; margin-right: 4px; overflow-wrap: anywhere; }
.dmrow.fr { margin-top: -2px; }
.gav { display: grid; place-items: center; color: #fff; }
.gav .ic { width: 54%; height: 54%; }
.grpm .nset { gap: 10px; }
.grpchips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 92px; overflow-y: auto; }
.grpchips[hidden] { display: none; }
.grpchip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--title); font: 600 13px var(--font); cursor: pointer; }
.grpchip .ic { width: 13px; height: 13px; color: var(--text-3); }
.grpck { margin-left: auto; width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid var(--line-2); border-radius: 6px; color: #fff; }
.dmprow.on .grpck { background: #5b7fd6; border-color: #5b7fd6; }
.grpck .ic { width: 15px; height: 15px; }
.grpm .mf { align-items: center; }
.grpn { margin-right: auto; color: var(--text-3); font-size: 12.5px; line-height: 1.35; }
.mlist.grpside { padding: 12px 8px; }
.grpadd { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; margin-bottom: 8px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 600 14px var(--font); cursor: pointer; }
.grpadd:hover { background: var(--surface-2); color: var(--title); }
.grpadd .ic { width: 18px; height: 18px; }
.grpp { min-height: 46px; padding: 5px 8px; gap: 10px; border-top: 0; border-radius: 8px; cursor: pointer; }
.grpp .av { width: 32px; height: 32px; font-size: 12px; }
.grpp .avw .dot { box-shadow: 0 0 0 3px var(--bg-2); }
.grpp .frn b { font-size: 14px; display: flex; align-items: center; gap: 5px; }
.grpp.off { opacity: .45; }
.grpp.off:hover { opacity: .85; }
.grpp .own { display: inline-grid; margin: 0; color: #f0b232; }
.grpp .own .ic { width: 14px; height: 14px; }
.grpst { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dmcall .cpe.calling .av { animation: grpcall 1.4s ease-in-out infinite; }
@keyframes grpcall { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dmcall .cpe.calling .av { animation: none; opacity: .5; } }
@media (max-width: 760px) {
  .frtabs { padding: 8px 10px; }
  .frtabs button { height: 42px; padding: 0 11px; }
  .frtabs button.add { order: -1; }
  .frlist { padding: 10px 8px 24px; }
  .frib { width: 42px; height: 42px; }
  .frin { flex-wrap: wrap; padding-left: 12px; }
  .frin .btn { width: 100%; height: 42px; }
  .grpp { min-height: 52px; }
}

/* ---------------------------------------------------------------- menções, reações, emojis */
.m.ment { background: rgba(240, 178, 50, .07); box-shadow: inset 2px 0 0 #f0b232; }
.m.ment:hover { background: rgba(240, 178, 50, .1); }
.rx { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.rxb { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: var(--surface-2); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.rxb .e { font-size: 16px; line-height: 1; }
.rxb:hover { border-color: var(--line-3); }
.rxb.me { background: var(--accent-soft, rgba(88, 101, 242, .18)); border-color: var(--accent-line, rgba(88, 101, 242, .6)); color: var(--title); }
.rxb.add { opacity: 0; padding: 0 6px; transition: opacity .1s; }
.rxb.add .ic { width: 16px; height: 16px; }
.m:hover .rxb.add { opacity: 1; }
.m .acts .qr { font-size: 16px; line-height: 1; filter: none; }
.edit { position: relative; }
.ch .mcount { margin-left: auto; min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px; display: grid; place-items: center; background: var(--danger); color: #fff; font: 700 10.5px var(--font); }
.ch .mcount + .cfg { margin-left: 4px; }
/* barra de baixo: microfone, fone, configuracoes */
.ubar .ubtns { display: flex; gap: 2px; flex: 0 0 auto; }
.ubtn { width: 32px; height: 32px; border: 0; border-radius: 8px; display: grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer; }
.ubtn:hover { background: var(--surface-2); color: var(--title); }
.ubtn .ic { width: 19px; height: 19px; }
.ubtn.off { color: var(--danger-text); }
.ubtn.off:hover { background: rgba(229, 83, 75, .12); }
#ubarCfg:hover .ic { transform: rotate(45deg); transition: transform .2s; }
/* loja no trilho */
.rbtn.add.shop { color: #f6bd45; }
.rbtn.add.shop:hover { background: #f6bd45; color: #2b1a00; }
.rbadge.gift { background: var(--online); color: #04210f; }

/* ---------------------------------------------------------------- canais de aplicativo (watch party, musica) */
.aview { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 16px; overflow: hidden; }
.aview[hidden] { display: none; }
.amain { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.aplayer { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 330px); border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line-2); flex: 0 0 auto; }
.aview.music .aplayer { aspect-ratio: auto; height: 232px; max-width: 720px; background: var(--bg-2); }
.aview.music .aplayer[data-src="yt"] { aspect-ratio: 16 / 9; height: auto; max-width: 640px; background: #000; }
.aview .aplayer[data-src="sp"] { aspect-ratio: auto; height: 232px; max-width: 720px; background: transparent; border: 0; }
.ahost, .ahost .aframe, .ahost iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.aempty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 20px; background: radial-gradient(60% 70% at 50% 40%, rgba(255, 255, 255, .05), transparent 70%), var(--bg-2); }
.aempty[hidden] { display: none; }
.aempty .aei .ic { width: 46px; height: 46px; color: var(--text-3); }
.aempty b { color: var(--title); font-size: 16px; }
.aempty small { color: var(--text-3); font-size: 13px; }
.agate { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .78); color: #fff; font: 600 13.5px var(--font); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.agate[hidden] { display: none; }
.anow { display: flex; align-items: center; gap: 12px; }
.athumb { width: 64px; height: 40px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.aview.music .athumb { width: 48px; height: 48px; }
.athumb img { width: 100%; height: 100%; object-fit: cover; }
.ainfo { flex: 1; min-width: 0; }
.ainfo b { display: block; color: var(--title); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ainfo small { display: block; color: var(--text-3); font-size: 12.5px; }
.actl { display: flex; gap: 6px; }
.actl .ibtn { width: 40px; height: 40px; }
.actl #aPlay { background: var(--title); color: var(--bg); border-color: var(--title); }
.aseek { display: flex; align-items: center; gap: 10px; color: var(--text-3); font: 600 12px var(--mono); }
.aseek input { flex: 1; }
.aseek input:disabled { opacity: .45; cursor: default; }
.aact { min-height: 16px; color: var(--text-3); font-size: 12.5px; opacity: 0; transition: opacity .2s; }
.aact.on { opacity: 1; }
.aadd { display: flex; gap: 8px; }
.aadd .field { flex: 1; min-width: 0; }
.ahint { margin: 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.aside { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); }
.aside h4 { margin: 6px 2px 2px; font: 600 11px var(--font); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.aqueue, .awho { display: grid; gap: 4px; }
.aqe { color: var(--text-3); font-size: 12.5px; padding: 6px 2px; }
.aqi { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: var(--surface); }
.aqi:hover { background: var(--surface-2); }
.aqt { width: 54px; height: 34px; flex: 0 0 auto; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.aqt img { width: 100%; height: 100%; object-fit: cover; }
.aqn { flex: 1; min-width: 0; }
.aqn b { display: block; font-size: 12.5px; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aqn small { display: block; font-size: 11px; color: var(--text-3); }
.awi { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.awi:hover { background: var(--surface); }
@media (max-width: 1100px) { .aview { grid-template-columns: 1fr; overflow-y: auto; } .amain { overflow: visible; } .aplayer { max-height: none; } }
/* barrinha "tocando" e lista de canais */
.abar { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--line); background: color-mix(in srgb, #c084fc 8%, var(--bg-2)); }
.abar .abic { color: #c084fc; display: grid; place-items: center; }
.abar .vinfo { flex: 1; min-width: 0; }
.abar b { display: block; font-size: 12.5px; color: #d8b4fe; }
.abar small { display: block; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.abar small:hover { color: var(--title); }
.appnow { display: flex; align-items: center; gap: 6px; margin: -2px 0 2px 34px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; color: var(--text-3); cursor: pointer; overflow: hidden; }
.appnow .ic { width: 12px; height: 12px; flex: 0 0 auto; }
.appnow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appnow.on { color: #d8b4fe; }
.appnow:hover { background: var(--surface); }
/* criar canal: qual aplicativo */
.appkinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.appkinds[hidden] { display: none; }
.appkind { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; font: 13px var(--font); }
.appkind b { display: block; color: var(--title); margin-bottom: 2px; }
.appkind small { color: var(--text-3); font-size: 12px; line-height: 1.4; }
.appkind.on { border-color: var(--title); }
.appkind .ic { flex: 0 0 auto; color: #c084fc; }

/* ---------------------------------------------------------------- banner da guilda */
.ghead.ban { height: 136px; align-items: flex-start; padding-top: 14px; background: center / cover no-repeat var(--surface-2); border-bottom-color: transparent; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.ghead.ban .gico { color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7)); }
.ghead.ban:hover { background-color: var(--surface-2); filter: brightness(1.06); }
.banpick { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: center; margin: 4px 0 6px; }
.banprev { width: 240px; aspect-ratio: 16 / 9; border-radius: 10px; background: center / cover no-repeat var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); font-size: 12.5px; }
.rowbtns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .banpick { grid-template-columns: 1fr; } .banprev { width: 100%; } }
/* ---------------------------------------------------------------- setinhas e menus rapidos do microfone e do fone */
.ugrp { display: inline-flex; align-items: center; border-radius: 8px; }
.ugrp:hover { background: var(--surface); }
.ugrp .ubtn { width: 30px; }
.ucar { width: 14px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.ucar .ic { width: 12px; height: 12px; }
.ucar:hover { color: var(--title); background: var(--surface-2); }
.qmenu { position: fixed; z-index: 70; width: 264px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 6px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); animation: sspIn .1s ease-out; }
.qrow { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer; font: 13.5px var(--font); }
.qrow > span { flex: 1; min-width: 0; display: grid; }
.qrow b { color: var(--title); font-weight: 600; }
.qrow small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow > .ic { width: 16px; height: 16px; color: var(--text-3); transition: transform .15s; }
.qrow.open > .ic { transform: rotate(90deg); }
.qrow:hover { background: var(--surface-2); }
.qrow.cfg > .ic { transform: none; color: var(--text-2); }
.qopts { display: grid; gap: 1px; padding: 2px 0 6px 8px; }
.qopts[hidden] { display: none; }
.qopt { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer; font: 13px var(--font); }
.qopt i { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--line-3); }
.qopt.on i { border-color: var(--title); box-shadow: inset 0 0 0 3px var(--deep); background: var(--title); }
.qopt > span { min-width: 0; display: grid; }
.qopt b { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qopt small { color: var(--text-3); font-size: 11.5px; }
.qopt:hover { background: var(--surface-2); }
.qsep { height: 1px; margin: 6px 4px; background: var(--line); }
.qslider { padding: 6px 10px 8px; }
.qsl { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.qsl b { color: var(--title); font-weight: 600; }
.qsl span { color: var(--text-3); font: 600 12px var(--mono); }
.qslider input { width: 100%; }
.qcheck { cursor: pointer; }
.qcheck input { width: 16px; height: 16px; accent-color: var(--title); flex: 0 0 auto; }
.qkey { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-3); background: var(--surface-2); color: var(--title); font: 700 11.5px var(--mono); cursor: pointer; flex: 0 0 auto; }
.qnote { padding: 6px 10px; color: var(--text-3); font-size: 12px; line-height: 1.4; }
/* balao do trilho com quem esta' na voz */
.rtip.rich { display: grid; gap: 6px; padding: 9px 12px; white-space: normal; max-width: 260px; }
.rtip.rich .tn { font: 700 13.5px var(--font); color: var(--title); }
.rtip.rich .tm { color: var(--danger-text); font: 600 12px var(--font); }
.rtip.rich .tv { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.rtip.rich .tv > .ic { width: 15px; height: 15px; flex: 0 0 auto; }
.rtip.rich .tavs { display: flex; }
.rtip.rich .tavs .av { width: 24px; height: 24px; margin-left: -6px; box-shadow: 0 0 0 2px var(--deep); font-size: 9px; }
.rtip.rich .tavs .av:first-child { margin-left: 0; }
.rtip.rich .tmore { padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: 700 11px var(--font); }

/* alcas das colunas (canais a esquerda, membros a direita) */
.chans, .pane { position: relative; }
.chans > .rsz { right: -4px; }
.pane > .rsz.mr { right: -4px; }
body.gapp.homeview .pane > .rsz.mr, body.gapp.nomembers .pane > .rsz.mr { display: none; }
@media (max-width: 1150px) { .pane > .rsz.mr { display: none; } }
@media (max-width: 760px) { .rsz { display: none; } }

/* janelinha do aplicativo (fora da tela dele), em cima da janelinha da chamada */
.apipui { display: none; }
.aview.pip { position: fixed; z-index: 46; display: block; width: 384px; padding: 0; overflow: visible; }
.aview.pip .amain { display: block; overflow: visible; }
.aview.pip .aplayer { width: 384px; height: 216px; max-height: none; max-width: none; aspect-ratio: auto; border-radius: 12px; border: 1px solid var(--line-3); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); background: #000; }
.aview.pip .aplayer[data-src="sp"] { height: 152px; background: var(--bg-2); }
.aview.pip .anow, .aview.pip .aseek, .aview.pip .aact, .aview.pip .aadd, .aview.pip .ahint, .aview.pip .aside, .aview.pip .agate { display: none; }
.aview.pip .aempty b { font-size: 13px; } .aview.pip .aempty small { display: none; }
.aview.pip .apipui { display: flex; position: absolute; inset: 0; z-index: 3; flex-direction: column; justify-content: space-between; cursor: pointer; }
.aview.pip .apipui .piptop, .aview.pip .apipui .pipbot { display: flex; align-items: center; gap: 6px; padding: 8px; opacity: 0; transition: opacity .15s; }
.aview.pip .apipui .piptop { background: linear-gradient(rgba(0, 0, 0, .7), transparent); }
.aview.pip .apipui .pipbot { justify-content: center; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.aview.pip:hover .apipui .piptop, .aview.pip:hover .apipui .pipbot { opacity: 1; }
.aview.pip .apipui .pipname { flex: 1; min-width: 0; color: #fff; font: 600 12.5px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.aview.pip .apipui .ibtn { background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .15); color: #fff; }
@media (max-width: 700px) { .aview.pip, .aview.pip .aplayer { width: 240px; } .aview.pip .aplayer { height: 135px; } }

/* ---------------------------------------------------------------- aparencia da guilda */
body.g-accent {
  --accent-text: color-mix(in srgb, var(--accent) 55%, #fff);
  --accent-tint: color-mix(in srgb, var(--accent) 9%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 19%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 44%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 26%, transparent);
  --accent-shadow: color-mix(in srgb, var(--accent) 32%, transparent);
  --link: color-mix(in srgb, var(--accent) 60%, #fff);
  --primary: var(--accent); --primary-2: var(--accent-2);
}
body.g-accent .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
body.g-accent .ch.on { box-shadow: inset 3px 0 0 var(--accent); }
.tview.gbg, .chans.gbg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.chans.gbg .ch:not(.on):not(:hover), .chans.gbg .cat { text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.tview.gbg .daysep { text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.lookrow { display: grid; gap: 8px; margin: 6px 0 4px; }
.lookrow > b { color: var(--text); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches .sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); cursor: pointer; padding: 0; }
.swatches .sw.none { width: auto; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: 600 12px var(--font); }
.swatches .sw.on { outline: 2px solid var(--title); outline-offset: 2px; }
.swatches input[type=color] { width: 36px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); padding: 2px; cursor: pointer; }
.lookimg { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: center; margin: 4px 0; }
.lookimg.tall { grid-template-columns: 90px minmax(0, 1fr); }
.lookprev { border-radius: 10px; background: center / cover no-repeat var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); font-size: 12px; text-align: center; }
.lookimg.wide .lookprev { aspect-ratio: 16 / 9; }
.lookimg.tall .lookprev { aspect-ratio: 4 / 9; }
.lookdim { display: flex; align-items: center; gap: 10px; }
.lookdim input { flex: 1; max-width: 320px; }
.lookdim span { color: var(--text-3); font: 600 12px var(--mono); }

/* ---------------------------------------------------------------- canais-ferramenta (widgets.js) */
.appkinds { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ch.tempch .n::after { content: " · temporária"; color: var(--text-3); font-weight: 400; font-size: 11px; }
.xview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; }
.xview[hidden] { display: none; }
.xhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xhead > div { flex: 1; min-width: 200px; }
.xhead b { display: block; color: var(--title); font: 700 18px var(--font-display); }
.xhead small { color: var(--text-3); font-size: 13px; }
.xempty { padding: 28px 10px; text-align: center; color: var(--text-3); font-size: 13.5px; }
/* procurar grupo */
.lfgform { display: grid; grid-template-columns: 1.4fr 1.6fr 150px auto; gap: 8px; }
.lfgform[hidden] { display: none; }
@media (max-width: 900px) { .lfgform { grid-template-columns: 1fr; } }
.lfggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lfgcard { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.lfgcard.mine { border-color: var(--accent-line, var(--line-3)); }
.lfgcard.full { background: color-mix(in srgb, var(--online) 6%, var(--surface)); border-color: color-mix(in srgb, var(--online) 40%, transparent); }
.lfgcard .lg { color: var(--title); font: 700 16px var(--font); }
.lfgcard p { margin: 0; color: var(--text-2); font-size: 13px; }
.lfgcard .slots { display: flex; align-items: center; gap: 4px; }
.lfgcard .slots i { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-3); }
.lfgcard .slots i.on { background: var(--online); }
.lfgcard .slots span { margin-left: 6px; color: var(--text-2); font: 700 12.5px var(--mono); }
.lfgcard .mem { display: flex; gap: 4px; flex-wrap: wrap; }
.lfgcard .by { color: var(--text-3); font-size: 11.5px; }
.lfgcard .acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* torneio */
.tform { display: grid; gap: 8px; max-width: 560px; }
.tform .chk { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.champ { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(251, 191, 36, .18), transparent); border: 1px solid rgba(251, 191, 36, .4); color: #fde68a; font-size: 15px; }
.champ .ic { color: #fbbf24; }
.twrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .twrap { grid-template-columns: 1fr; } }
.bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px; }
.tcol { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 200px; }
.tr { color: var(--text-3); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.tm { display: grid; gap: 2px; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.ts { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-radius: 7px; background: var(--surface-2); color: var(--text); text-align: left; font: 600 13px var(--font); cursor: pointer; }
.ts:disabled { cursor: default; }
.ts .tn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts .tsc { font: 700 12.5px var(--mono); color: var(--text-2); }
.ts.win { background: color-mix(in srgb, var(--online) 16%, var(--surface-2)); color: var(--title); }
.ts.win .tsc { color: var(--online); }
.ts.pick { box-shadow: inset 0 0 0 2px var(--accent-line, #7c5cff); }
.tm.done .ts:not(.win) { opacity: .55; }
.tmrep { margin-top: 2px; padding: 5px; border: 1px dashed var(--line-3); border-radius: 7px; background: transparent; color: var(--text-3); font: 600 12px var(--font); cursor: pointer; }
.tmrep:hover { color: var(--title); }
.tlb { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); }
.tlb h4 { margin: 0 0 4px; color: var(--text-3); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.tlr { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.tlr.me { background: var(--surface-2); color: var(--title); }
.tlr .pos { width: 26px; color: var(--text-3); font: 700 12px var(--mono); }
.tlr .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* capsula */
.capform, .capadd { display: grid; gap: 8px; max-width: 560px; }
.caplock, .capopen { display: grid; justify-items: center; gap: 8px; padding: 26px; border-radius: 16px; text-align: center; background: radial-gradient(70% 90% at 50% 0%, rgba(124, 92, 255, .18), transparent 70%), var(--surface); border: 1px solid var(--line-2); }
.capic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: #c4b5fd; }
.capic .ic { width: 30px; height: 30px; }
.capic.open { color: var(--online); }
.caplock .ct, .capopen b { color: var(--title); font: 700 20px var(--font-display); }
.caplock .cd { color: var(--title); font: 800 34px var(--mono); letter-spacing: .02em; }
.caplock .cw, .capopen small { color: var(--text-3); font-size: 13px; }
.cauth { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.capmine { display: grid; gap: 6px; max-width: 560px; }
.capmine h4 { margin: 4px 0; color: var(--text-3); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; }
.capit { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.capit .cx { flex: 1; min-width: 0; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capedit summary { cursor: pointer; color: var(--text-3); font-size: 13px; }
.caplist { display: grid; gap: 10px; }
.capmsg { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.capmsg .w { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.capmsg .w b { color: var(--title); font-size: 13.5px; }
.capmsg .w time { color: var(--text-3); font-size: 11.5px; }
.capmsg .tx { color: var(--text); font-size: 14px; white-space: pre-wrap; }
/* codigo ao vivo */
.xview.k-code { gap: 8px; }
.codehead select { width: auto; }
.codeed { flex: 1; min-height: 320px; display: flex; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #0b0d12; }
.gutter { margin: 0; padding: 12px 8px; min-width: 44px; text-align: right; color: #4b5563; background: #090a0e; font: 13px/1.55 var(--mono); overflow: hidden; user-select: none; }
.codeta { flex: 1; min-width: 0; padding: 12px; border: 0; outline: 0; resize: none; background: transparent; color: #e5e7eb; font: 13px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }
.codepv { flex: 1; overflow: auto; padding: 8px; }
.codepv[hidden], .codeta[hidden], .gutter[hidden] { display: none; }
.codefoot { color: var(--text-3); font: 12px var(--mono); }
/* quadro branco */
.xview.k-board { padding: 0; gap: 0; overflow: hidden; }
.bbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.btools, .bcolors, .bwidths { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); }
.bt { width: 32px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 15px; cursor: pointer; }
.bt:hover { background: var(--surface-2); color: var(--title); }
.bt.on { background: var(--title); color: var(--bg); }
.bt:disabled { opacity: .35; cursor: default; }
.bc { width: 22px; height: 22px; margin: 4px 2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.bc.on { outline: 2px solid var(--title); outline-offset: 2px; }
.bw { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; display: grid; place-items: center; cursor: pointer; }
.bw i { display: block; width: 16px; border-radius: 6px; background: var(--text-2); }
.bw.on { background: var(--surface-3); }
.bstage { position: relative; flex: 1; min-height: 0; background: #0e1015; overflow: hidden; }
.bcv { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }

/* ================================================================ automacoes (auto.js, docs/metas M0) */
/* mensagem do sistema: avatar da guilda + etiqueta */
.m .av.sysav { background: var(--surface-3); overflow: hidden; }
.m .av.sysav img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.systag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); font: 700 9.5px/1.4 var(--font); letter-spacing: .06em; vertical-align: 2px; }
/* card */
.scard { --sc: var(--line-3); position: relative; margin: 4px 0 2px; max-width: min(520px, 100%); padding: 10px 14px 10px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sc); display: grid; gap: 6px; }
.scard .sc-title, .scard .sc-user b { color: var(--title); font-size: 14px; }
.scard .sc-user { display: flex; align-items: center; gap: 8px; }
.scard .sc-user .av, .scard .av { position: static; width: 22px; height: 22px; font-size: 9px; cursor: default; flex: 0 0 auto; }
.scard .sc-desc { color: var(--text); font-size: 13.5px; }
.scard .sc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; }
.scard .sc-f { grid-column: 1 / -1; min-width: 0; }
.scard .sc-f.i { grid-column: auto; }
.scard .sc-f small { display: block; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.scard .sc-f > div { color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.scard .sc-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.scard .sc-btns .btn.okb { background: color-mix(in srgb, var(--online) 22%, var(--surface-2)); border-color: color-mix(in srgb, var(--online) 45%, transparent); color: var(--ok-text); }
.scard .sc-foot { color: var(--text-3); font-size: 11px; }
@media (max-width: 560px) { .scard .sc-fields { grid-template-columns: 1fr 1fr; } }
/* "so' voce ve" */
.m.eph { background: color-mix(in srgb, var(--info) 7%, transparent); border-left: 2px solid color-mix(in srgb, var(--info) 60%, transparent); }
.m.eph .ephx { margin-left: 8px; background: none; border: 0; color: var(--link); cursor: pointer; font: 500 12px var(--font); padding: 0; }
/* formulario do modulo */
.aform { display: grid; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); margin: 12px 0 18px; }
.aform .ahead { display: flex; gap: 14px; align-items: flex-start; }
.aform .ahead > div { flex: 1; }
.aform .ahead b { color: var(--title); font-size: 14.5px; }
.aform .ahead .hint { margin: 2px 0 0; }
.aform .astatus { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--busy) 10%, transparent); border: 1px solid color-mix(in srgb, var(--busy) 30%, transparent); color: var(--busy-text); font-size: 12.5px; }
.achips { display: flex; flex-wrap: wrap; gap: 6px; }
.achip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font: 500 12.5px var(--font); cursor: pointer; }
.achip.on { border-color: var(--title); color: var(--title); background: var(--surface-3); }
/* linhas de um campo "rows" (botoes do painel, mensagens automaticas, punicoes) */
.arowsbox { display: grid; gap: 8px; }
.arowsbox > .hint { margin: -4px 0 0; }
.arows { display: grid; gap: 10px; }
.arows > .btn { justify-self: start; }
.arow-item { border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-1, var(--bg-1)); padding: 10px 12px 12px; }
.arow-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.arow-top b { color: var(--text-3); font-size: 12px; }
.arow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.arow-grid > .wide { grid-column: 1 / -1; }
.aform .switch { display: block; }
.arow-grid label.switch { margin: 0 0 8px; }
.abool { display: flex; align-items: center; gap: 14px; }
.abool > div { flex: 1; min-width: 0; }
.abool > div > span { color: var(--text); font-size: 13.5px; }
.abool .hint { margin: 2px 0 0; }
.apub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.apub .hint { margin: 0; flex: 1; min-width: 200px; }
.warnlist { display: grid; gap: 8px; margin: 6px 0 12px; max-height: 50vh; overflow: auto; }
.warnrow { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); }
.warnrow > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.warnrow b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.warnrow small { color: var(--text-3); }
/* bots e webhooks (M2) */
.systag.bot { background: color-mix(in srgb, #5865f2 30%, transparent); color: #c9cdfb; border-color: color-mix(in srgb, #5865f2 50%, transparent); }
.mem .systag.bot { margin-left: 6px; font-size: 9.5px; padding: 1px 5px; }
.scard .sc-auth { display: block; color: var(--text-3); font-size: 12px; margin-bottom: 2px; }
.scard a.sc-title { color: var(--accent, #7aa2ff); font-weight: 700; text-decoration: none; display: block; }
.scard a.sc-title:hover { text-decoration: underline; }
.hookbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 12px; }
.hookbar .field { flex: 1; min-width: 180px; }
.hooklist { display: grid; gap: 8px; margin-bottom: 14px; }
.hookrow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); flex-wrap: wrap; }
.hookrow > .av { width: 36px; height: 36px; flex: 0 0 auto; }
.hooktx { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.hooktx b { color: var(--title); display: flex; align-items: center; gap: 6px; }
.hooktx small { color: var(--text-3); }
.hookurl { font-size: 11.5px; color: var(--text-2); overflow-wrap: anywhere; }
.hookacts { display: flex; gap: 6px; flex-wrap: wrap; }
.hookex { margin-top: 6px; color: var(--text-2); }
.hookex summary { cursor: pointer; color: var(--text); font-weight: 600; }
.hookex pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--deep); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.integh { margin: 14px 0 6px; color: var(--text); font-size: 13px; }
/* componentes de bot (Components V2 do Discord) */
.comps { display: grid; gap: 8px; margin-top: 6px; max-width: 560px; }
.crow { display: flex; flex-wrap: wrap; gap: 6px; }
.cbtn { gap: 5px; }
.cbtn .ic { width: 13px; height: 13px; }
.csel { display: flex; gap: 6px; align-items: flex-start; max-width: 420px; }
.csel .field { flex: 1; min-width: 0; padding: 7px 10px; font-size: 13px; }
.ccont { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); border-left: 4px solid var(--cc, var(--line-3)); }
.csec { display: flex; gap: 12px; align-items: flex-start; }
.csec-tx { flex: 1; min-width: 0; display: grid; gap: 4px; }
.csec-acc { flex: 0 0 auto; }
.ctext { color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.cthumb { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; display: block; }
a.cthumb, a.cgimg { display: grid; place-items: center; width: auto; height: auto; padding: 10px; border: 1px dashed var(--line-3); color: var(--text-2); font-size: 12px; text-decoration: none; }
.cgal { display: grid; gap: 4px; grid-template-columns: repeat(2, 1fr); border-radius: 10px; overflow: hidden; }
.cgal.n1 { grid-template-columns: 1fr; }
.cgal.n3 { grid-template-columns: repeat(3, 1fr); }
.cgimg { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.csep { height: 1px; background: var(--line-2); margin: 2px 0; }
.csep.nodiv { background: transparent; }
.csep.big { margin: 8px 0; }
.cfile { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; width: fit-content; }
.cspoil { filter: blur(14px); cursor: pointer; }
.usedcmd { display: flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12px; margin: 0 0 2px; }
.usedcmd .ic { width: 12px; height: 12px; }
.usedcmd b { color: var(--text-2); font-weight: 600; }
.thinking { color: var(--text-3); font-size: 13px; font-style: italic; }
.thinking::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
/* criar guilda (do zero, modelo, Discord, arquivo) */
.newg { display: grid; gap: 12px; }
.ngtabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.ngtab { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.ngtab .ic { width: 16px; height: 16px; }
.ngtab.on { border-color: var(--title); color: var(--title); background: var(--surface-3); }
.ngpane { display: grid; gap: 10px; min-height: 120px; }
.ngpresets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ngpre { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; }
.ngpre.on { border-color: var(--title); background: var(--surface-3); }
.ngpre b { display: block; color: var(--title); font-size: 14px; }
.ngpre small { color: var(--text-3); font-size: 12px; }
.ngpi { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--title); }
.ngsteps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13px; display: grid; gap: 4px; }
.ngsteps b { color: var(--text); }
.ngprev { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); padding: 12px; display: grid; gap: 10px; }
.ngph b { display: block; color: var(--title); font-size: 15px; }
.ngph small { color: var(--text-3); }
.ngch { display: grid; gap: 2px; max-height: 240px; overflow: auto; padding-right: 4px; }
.ngc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); padding: 2px 4px; }
.ngc.cat { margin-top: 6px; font: 700 11px var(--font); letter-spacing: .06em; color: var(--text-3); }
.ngc.sub { padding-left: 14px; }
.ngc .ic { width: 14px; height: 14px; color: var(--text-3); }
.ngroles { display: flex; flex-wrap: wrap; gap: 4px; }
.ngroles .rchip { padding: 2px 9px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); font-weight: 500; }
.hookout-new { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line-3); border-radius: 12px; margin-bottom: 14px; }
.hookout-new .btn { justify-self: start; }
.hint.bad { color: var(--danger-text); }
/* tickets */
.tkover { margin-top: 6px; }
.tkkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.tkkpi { padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); display: grid; gap: 2px; }
.tkkpi b { color: var(--title); font: 700 20px var(--font); }
.tkkpi small { color: var(--text-3); font-size: 12px; }
/* registro */
.auditbar { display: flex; gap: 8px; margin: 6px 0 10px; }
.auditbar .field { width: auto; min-width: 220px; padding: 8px 11px; }
.auditlist { display: grid; gap: 2px; }
.arow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 8px; border-radius: 8px; }
.arow:hover { background: var(--surface-2); }
.arow .aic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.arow .aic .ic { width: 15px; height: 15px; }
.arow .atx { font-size: 13px; color: var(--text-2); min-width: 0; }
.arow .atx b { color: var(--title); font-weight: 600; }
.arow .atx small { display: block; color: var(--text-3); font-size: 12px; overflow-wrap: anywhere; }
.arow time { color: var(--text-3); font-size: 11.5px; white-space: nowrap; padding-top: 2px; }
/* secoes do menu das configuracoes */
.settings nav .nsec { padding: 14px 10px 4px; color: var(--text-3); font: 700 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; }
/* silenciado */
.mutedline { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--busy-text); font-size: 12px; }
.mutedline .ic { width: 14px; height: 14px; }
.mem .mutedic { width: 14px; height: 14px; color: var(--busy-text); margin-left: 4px; flex: 0 0 auto; }
.mem.muted .n { opacity: .75; }
/* ---------------------------------------------------------------- chamadas do PV e fone cortado (2026-11-28) */
.vu .ic.hi { margin-left: -3px; }
.phead .callbtn.live { color: var(--online); }
/* faixa "Em chamada" em cima da conversa do PV */
.dmcall { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; margin: 10px 16px 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--online) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--online) 30%, var(--line-2)); }
.dmcall[hidden] { display: none; }
.dmcall.ringing { background: var(--surface); border-color: var(--line-2); }
.dmcall .dcp { display: flex; gap: 6px; flex: 0 0 auto; }
.dmcall .cpe { position: relative; display: grid; }
.dmcall .cpe .av { width: 36px; height: 36px; font-size: 13px; transition: box-shadow .12s; }
.dmcall .cpe.speaking .av { box-shadow: 0 0 0 2px var(--online), 0 0 8px color-mix(in srgb, var(--online) 45%, transparent); }
.dmcall .cpe .cpi { position: absolute; right: -6px; bottom: -4px; display: flex; gap: 1px; padding: 2px; border-radius: 8px; background: var(--bg-2); box-shadow: 0 0 0 2px var(--surface); color: var(--danger-text); }
.dmcall .cpe .cpi .ic { width: 12px; height: 12px; }
.dmcall .dct { flex: 1; min-width: 0; display: grid; }
.dmcall .dct b { color: var(--title); font-size: 13.5px; }
.dmcall .dct small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dmcall .dca { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* conversa da lista com chamada */
.dmrow .callsub { display: flex; align-items: center; gap: 4px; color: var(--online) !important; font-weight: 600; }
.dmrow .callsub .ic { width: 12px; height: 12px; }
/* linha da chamada dentro da conversa */
.m.callline { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 6px; padding-bottom: 6px; min-height: 44px; }
.m.callline .cic { position: absolute; left: 23px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--online); }
.m.callline.missed .cic, .m.callline.declined .cic { color: var(--danger-text); }
.m.callline .cic .ic { width: 15px; height: 15px; }
.m.callline .clt { display: grid; min-width: 0; }
.m.callline .clt b { color: var(--title); font-size: 14px; font-weight: 600; }
.m.callline .clt span { color: var(--text-3); font-size: 12.5px; }
.m.callline.missed:not(.mine) .clt b { color: var(--danger-text); }
.m.callline time { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.m.callline .cagain { margin-left: auto; }
@media (max-width: 640px) { .dmcall { flex-wrap: wrap; } .dmcall .dca { width: 100%; justify-content: flex-start; } }

/* responder (replies.go): a citacao em cima da resposta, com a curva saindo do avatar, e a barra do campo */
.m .rq { position: relative; display: flex; align-items: center; gap: 5px; height: 20px; margin-bottom: 2px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.m .rq::before { content: ''; position: absolute; left: -36px; top: 10px; width: 30px; height: 12px; border: 2px solid var(--line-3); border-right: 0; border-bottom: 0; border-top-left-radius: 7px; pointer-events: none; }
.m .rq .av { position: static; width: 16px; height: 16px; font-size: 7px; flex: 0 0 auto; cursor: pointer; }
.m .rq .rqn { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; color: var(--title); font-weight: 600; cursor: pointer; }
.m .rq .rqn:hover { text-decoration: underline; }
.m .rq .rqt { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.m .rq:hover .rqt { color: var(--title); }
.m .rq .rqt .md-ic { font-size: 12px; }
.m .rq .rqt .md-men, .m .rq .rqt .md-men:hover { padding: 0; background: none; font-weight: 500; }   /* na linha da citacao, menção vira so' texto colorido */
.m .rq .rqt.noat { display: inline-flex; align-items: center; gap: 4px; }
.m .rq .rqt.noat i { font-style: italic; overflow: hidden; text-overflow: ellipsis; }
.m .rq .rqt.noat .ic { width: 13px; height: 13px; flex: 0 0 auto; }
.m .rq.gone { cursor: default; }
.m .rq.gone .rqic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex: 0 0 auto; }
.m .rq.gone .rqic .ic { width: 10px; height: 10px; }
.m .rq.gone .rqt, .m .rq.gone:hover .rqt { color: var(--text-3); font-style: italic; }
.m.reply > .av { top: 28px; }
.m.flash { animation: rqflash 2.4s ease-out; }
@keyframes rqflash { 0%, 30% { background: color-mix(in srgb, var(--info) 24%, transparent); } 100% { background: transparent; } }
.replybar { display: flex; align-items: center; gap: 8px; min-width: 0; height: 36px; padding: 0 6px 0 14px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface-3); font-size: 13px; color: var(--text-2); }
.replybar .rbl { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.replybar .rbl b { color: var(--title); font-weight: 600; }
.replybar .rbping { flex: 0 0 auto; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; font: 700 11.5px var(--font); letter-spacing: .03em; color: var(--link); white-space: nowrap; cursor: pointer; }
.replybar .rbping.off { color: var(--text-3); }
.replybar .rbping:hover { background: var(--surface-2); }
.replybar .rbx { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer; }
.replybar .rbx:hover { background: var(--surface-2); color: var(--title); }
.replybar .rbx .ic { width: 15px; height: 15px; }
.composer.replying .box { border-top-left-radius: 0; border-top-right-radius: 0; }
@media (max-width: 760px) { .m .rq::before { left: -35px; width: 29px; } .replybar { padding-left: 10px; } }

/* atividade (activity.js): segunda linha na lista de membros e no PV, iconezinho do jogo, status na barra de baixo */
.mem .mtx { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.mem .mtx .n { flex: none; }
.mem.hasact { padding-top: 4px; padding-bottom: 4px; }
.mem .aline { margin-top: 1px; }
.mem .abadge { margin-left: 2px; }
.mem.plated .aline { text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.dmrow .aline.dmact { font-size: 11.5px; }
.dmrow .abadge { margin-left: auto; }
.dmrow:hover .abadge { display: none; }
.vu .abadge { width: 16px; height: 16px; border-radius: 4px; }
.ubar small.ucs { color: var(--text-2); }
.pop .acs.big { margin-top: 10px; }
.dmprof .acs.big, .dmprof .act-list { margin-left: 0; margin-right: 0; }

/* ---------------------------------------------------------------- rodada 1 de paridade com o Discord */
/* silenciar (notif.go): canal cinza, sem destaque de nao lida; sino cortado no canal, no nome da guilda e no alto */
.ch.muted:not(.on) > .ic:first-child, .ch.muted:not(.on) .n { opacity: .45; }
.ch .mut { display: grid; color: var(--text-3); opacity: .75; flex: 0 0 auto; }
.ch .mut .ic { width: 13px; height: 13px; }
.ghead .gmute { display: grid; color: var(--text-3); }
.ghead .gmute .ic { width: 15px; height: 15px; }
.ghead .gmute[hidden] { display: none; }
.phead #notifBtn.muted { color: var(--text-3); }
.phead #pinsBtn.on { background: var(--surface-3); color: var(--title); }
/* convite para ligar os avisos do sistema (uma vez so') */
.nbar { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin: 8px 14px 0; padding: 7px 8px 7px 12px; border-radius: 10px; font-size: 13px; color: var(--text-2);
  background: color-mix(in srgb, var(--info) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--info) 40%, var(--line-2)); }
.nbar[hidden] { display: none; }
.nbar .nbic { display: grid; color: var(--info); }
.nbar .nbtx { flex: 1; min-width: 0; }
/* "N novas mensagens desde HH:MM" e "Marcar como lido" (em cima da conversa) */
.tview { position: relative; }
.newbar { position: absolute; z-index: 4; top: 0; left: 16px; right: 16px; display: flex; align-items: stretch; height: 30px; border-radius: 0 0 10px 10px; overflow: hidden;
  background: var(--info); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); font: 600 12.5px var(--font); }
.newbar[hidden] { display: none; }
.newbar button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0 12px; }
.newbar .nbt { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newbar .nbr { flex: 0 0 auto; border-left: 1px solid rgba(255, 255, 255, .28); }
.newbar button:hover { background: rgba(255, 255, 255, .12); }
/* "Você está vendo mensagens antigas · Pular para o presente" (em cima do campo) */
.oldbar { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 5px 6px 5px 14px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.oldbar[hidden] { display: none; }
.oldbar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oldbar button { flex: 0 0 auto; border: 0; border-radius: 7px; padding: 5px 10px; background: var(--info); color: #fff; font: 700 12px var(--font); cursor: pointer; }
.oldbar button:hover { filter: brightness(1.1); }
/* aviso "fulano fixou uma mensagem" na conversa */
.m.pinline { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 5px; padding-bottom: 5px; min-height: 36px; }
.m.pinline .cic { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-3); }
.m.pinline .cic .ic { width: 17px; height: 17px; }
.m.pinline .plt { flex: 1; min-width: 0; color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
.m.pinline .pwho { color: var(--title); font-weight: 600; cursor: pointer; }
.m.pinline .pwho:hover { text-decoration: underline; }
.m.pinline time { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.plink { border: 0; background: none; padding: 0; color: var(--title); font: inherit; font-weight: 600; cursor: pointer; }
.plink:hover { text-decoration: underline; }
/* lista de mensagens fixadas */
.pinspop { position: fixed; z-index: 46; width: min(430px, calc(100vw - 16px)); max-height: min(72vh, 620px); display: flex; flex-direction: column; border-radius: 12px;
  background: var(--deep); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; animation: ctxIn .12s ease-out; }
.pinspop[hidden] { display: none; }
.pinspop .pph { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); color: var(--title); font-size: 14.5px; }
.pinspop .pph b { flex: 1; }
.pinspop .ppic { display: grid; color: var(--text-3); }
.pinspop .ppl { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; }
.pinspop .ppi { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.pinspop .ppi .av { width: 32px; height: 32px; font-size: 12px; }
.pinspop .ppt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pinspop .ppt b { color: var(--title); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinspop .ppt time { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.pinspop .tx { margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: hidden; }
.pinspop .ppf { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.pinspop .ppa { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pinspop .ppa .ppun { opacity: .6; }
.pinspop .ppa .ppun:hover { opacity: 1; color: var(--danger-text); }
.pinspop .ppempty { display: grid; justify-items: center; gap: 6px; padding: 28px 18px; text-align: center; color: var(--text-2); }
.pinspop .ppempty .ppbig { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.pinspop .ppempty .ppbig .ic { width: 26px; height: 26px; }
.pinspop .ppempty small { color: var(--text-3); font-size: 12.5px; }
.pinspop .ppfoot { text-align: center; font-size: 11.5px; color: var(--text-3); padding: 2px 0 4px; }
/* janelas de notificacao (guilda e engrenagem) */
.nset { display: grid; gap: 12px; }
.nset .hint { margin: 0; }
.nset .ngname { color: var(--title); font-weight: 600; font-size: 14px; }
.nset .lbl { margin-bottom: -4px; }
.nset .nsel { max-width: 240px; }
.nradios { display: grid; gap: 6px; }
.nradio { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.nradio.on { border-color: var(--line-3); background: var(--surface-2); }
.nradio input { margin-top: 3px; accent-color: var(--info); }
.nradio b { display: block; color: var(--text); font-size: 14px; }
.nradio small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 1px; }
.novr { display: grid; gap: 6px; }
.novrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface); }
.novrow .n { color: var(--text); font-weight: 600; font-size: 13.5px; }
.novrow small { flex: 1; min-width: 0; color: var(--text-3); font-size: 12px; }
@media (max-width: 760px) {
  .newbar { left: 8px; right: 8px; }
  .nbar { margin: 6px 8px 0; flex-wrap: wrap; }
  .pinspop { right: 8px !important; left: 8px; width: auto; }
  .m.pinline .cic { left: 14px; }
}

/* ---------------------------------------------------------------- avisos por push (Notificações) */
.iosbox { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.iosbox[hidden] { display: none; }
.iosbox .ic { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; color: var(--title); }
.pushdev { display: grid; gap: 6px; }
.pushdev:empty { display: none; }
.pdhere { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.pdhere .ic { width: 16px; height: 16px; }
.pdhere.on { color: var(--ok-text); font-weight: 600; }
.pdh { margin-top: 4px; color: var(--text-3); font: 700 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase; }
.pdrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface); }
.pdrow .pdn { flex: 1; min-width: 0; }
.pdrow .pdn b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdrow .pdn small { display: block; color: var(--text-3); font-size: 12px; }

/* ---------------------------------------------------------------- celular: gavetas, folhas de baixo e toque (touch.js) */
.dscrim, .sscrim { display: none; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
/* no toque o :hover gruda depois do toque: nada de barrinha de acoes nem fundo de hover; segurar destaca a mensagem */
html.touch .m:hover { background: transparent; }
html.touch .m:hover .acts { display: none; }
html.touch .m:hover .hm { opacity: 0; }
html.touch #msgs .m { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html.touch #msgs .m textarea { -webkit-user-select: text; user-select: text; }
html.touch .ch, html.touch .mem, html.touch .dmrow, html.touch .rbtn, html.touch .vu { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.m.lp, .ch.lp, .mem.lp, .dmrow.lp, .vu.lp { background: var(--accent-tint) !important; transition: background .12s; }
.rbtn.lp { border-radius: 16px; background: var(--surface-3); }
/* reacoes rapidas em cima do menu da mensagem */
.ctx .sqr { display: flex; justify-content: space-between; gap: 6px; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ctx .sqr .sq { flex: 1; max-width: 52px; height: 44px; border: 0; border-radius: 22px; background: var(--surface-2); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ctx .sqr .sq.on { background: color-mix(in srgb, var(--info) 22%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 55%, transparent); }
.ctx .sqr .sq.more { color: var(--text-2); }
.ctx .sqr .sq .ic { width: 22px; height: 22px; }

@media (max-width: 760px) {
  body.gapp { touch-action: manipulation; top: var(--vvt, 0px); bottom: var(--kb, 0px); }
  :root { --lcw: min(300px, calc(100vw - 72px - 44px)); --rdw: min(300px, calc(100vw - 44px)); }
  /* gaveta da esquerda: trilho + canais, fora da tela ate abrir (o dedo arrasta: --ldx) */
  body.gapp .rail, body.gapp .chans { display: flex; position: fixed; top: 0; bottom: 0; z-index: 36; visibility: hidden; will-change: transform;
    transform: translateX(calc(-72px - var(--lcw) + var(--ldx, 0px))); transition: transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s; }
  body.gapp .rail { left: 0; width: 72px; }
  body.gapp .chans, body.gapp.showchans .chans { left: 72px; width: var(--lcw); }
  body.gapp.showchans .rail, body.gapp.showchans .chans { visibility: visible; transform: translateX(var(--ldx, 0px)); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  body.gapp.showchans .chans, body.gapp.drag-l .chans { box-shadow: 14px 0 34px rgba(0, 0, 0, .5); }
  /* gaveta da direita: membros (ou o perfil no PV) */
  body.gapp .mlist, body.gapp.nomembers:not(.homeview) .mlist { display: block; position: fixed; z-index: 36; right: 0; top: 0; bottom: 0; width: var(--rdw); visibility: hidden; will-change: transform;
    transform: translateX(calc(100% + var(--rdx, 0px))); transition: transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s; box-shadow: -14px 0 34px rgba(0, 0, 0, .5); padding-top: calc(8px + env(safe-area-inset-top)); }
  body.gapp.showmembers .mlist { top: 0; z-index: 36; width: var(--rdw); visibility: visible; transform: translateX(var(--rdx, 0px)); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  body.gapp.homeview .mlist { display: none; }
  body.gapp.drag-l .rail, body.gapp.drag-l .chans, body.gapp.drag-r .mlist { visibility: visible; transition: none; }
  .dscrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity .22s, visibility 0s linear .22s; }
  body.showchans .dscrim, body.showmembers .dscrim { opacity: 1; visibility: visible; transition: opacity .22s; }
  body.drag .dscrim { visibility: visible; opacity: var(--dsp, 0); transition: none; }
  .sscrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s linear .18s; }
  .sscrim.on { opacity: 1; visibility: visible; transition: opacity .18s; }

  /* cabecalho: alvos de 40 px; ajuda e configuracoes do canal ficam no menu (engrenagem embaixo / tocar no nome) */
  .phead { gap: 4px; padding: 0 6px 0 4px; }
  .phead .ibtn.sm { width: 40px; height: 40px; flex: 0 0 auto; }
  .phead .ibtn.sm .ic { width: 19px; height: 19px; }
  .phead #helpBtn, .phead #chanCfg { display: none; }
  .phead .menubtn { border-color: transparent; background: transparent; }
  .phead .ptitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; cursor: pointer; font-size: 16px; }
  .phead .pic { flex: 0 0 auto; }
  /* campo de mensagem: 16 px (o iPhone nao da zoom), botoes de 40 px, respeita a barra do sistema */
  .composer { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .composer .box { gap: 2px; padding: 3px; border-radius: 22px; }
  .composer .ibtn.sm { width: 40px; height: 40px; border-radius: 20px; }
  .composer .ibtn.sm .ic { width: 20px; height: 20px; }
  .composer textarea { font-size: 16px; padding: 9px 4px; }
  /* listas: alvos maiores */
  .ch { min-height: 40px; font-size: 15px; }
  .mem { min-height: 46px; }
  .dmrow { min-height: 46px; }
  .ubar .ubtn { width: 36px; height: 40px; }
  .m .tx { font-size: 15.5px; }
  /* menu (botao direito / segurar) vira folha de baixo */
  .ctx { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; min-width: 0; max-width: none; max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 18px 18px 0 0; padding: 20px 10px calc(10px + env(safe-area-inset-bottom)); font-size: 15.5px; animation: sheetUp .2s ease-out; box-shadow: 0 -12px 40px rgba(0, 0, 0, .55); }
  .ctx::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-3); }
  .ctx.csub { z-index: 81; }
  .ctx .citem { min-height: 48px; padding: 10px 12px; border-radius: 10px; gap: 12px; }
  .ctx .citem .ic { width: 20px; height: 20px; }
  .ctx .csep { margin: 6px 4px; }
  html.touch .ctx .citem:hover { background: transparent; color: var(--text-2); }
  html.touch .ctx .citem.bad:hover { color: var(--danger-text); }
  .ctx .citem:active { background: var(--surface-3) !important; }
  /* cartao do perfil: folha de baixo */
  .pop { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto; max-height: 86dvh; border-radius: 18px 18px 0 0; animation: sheetUp .2s ease-out; padding-bottom: env(safe-area-inset-bottom); }
  /* janelas: folha de baixo; as grandes (configuracoes) ocupam a tela toda */
  .gov { padding: 0; place-items: end stretch; }
  .gcard { width: 100%; max-height: calc(100dvh - 12px); border-radius: 18px 18px 0 0; animation: sheetUp .2s ease-out; padding-bottom: env(safe-area-inset-bottom); }
  .gcard.wide { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .gcard .mh { padding-top: 18px; }
  /* emojis: folha de baixo */
  .emp { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; height: min(62dvh, 460px) !important; border-radius: 18px 18px 0 0 !important; }
  /* janelinha da chamada: menor, num canto, sempre acima do campo de mensagem */
  .vview.pip { width: 176px; height: 99px; }
  .vview.pip.pip-br, .vview.pip.pip-bl { bottom: calc(var(--compose-h, 70px) + 10px); }
  .vview.pip.pip-br, .vview.pip.pip-tr { right: 10px; }
  .vview.pip.pip-bl, .vview.pip.pip-tl { left: 10px; }
  .vview.pip.pip-tr, .vview.pip.pip-tl { top: 62px; }
}
/* janelas de Notificações (rodada 1 e 2): o conteudo com respiro dos lados */
.gcard > .nset { padding: 4px 18px 18px; min-height: 0; overflow-y: auto; }
