/* ============================================================
   HIDROCÉU — identidade visual "Hidromel"
   Âmbar/mel suave (sem cansar os olhos), painéis flutuantes, gradiente mel→âmbar.
   Dois temas: escuro (padrão, "taverna à noite") e claro ("pergaminho"): data-theme no <html>.
   A sala de voz fica sempre escura (vídeo fica melhor assim, como em qualquer app de chamada).
   ============================================================ */
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root,
:root[data-theme="light"] .stage,
:root[data-theme="light"] .cp-head,
:root[data-theme="light"] .lightbox {
  --bg: #100e0b;
  --panel: #17140f;
  --elev: #1f1b15;
  --elev-2: #28231b;
  --hover: #312b21;
  --line: rgba(240, 215, 170, .07);
  --line-2: rgba(240, 215, 170, .12);
  --text: #f0e9dc;
  --muted: #ada18b;
  --faint: #7b705d;
  --accent: #e2b052;
  --accent-rgb: 226, 176, 82;
  --blue: #ecc46e;
  --mint: #6fcf9f;
  --mint-rgb: 111, 207, 159;
  --grad: linear-gradient(135deg, #f4d27a 0%, #e3a947 55%, #cf8a34 100%);
  --grad-soft: linear-gradient(135deg, rgba(226, 176, 82, .15), rgba(207, 138, 52, .08));
  --mine: linear-gradient(135deg, #8f6425 0%, #7a5420 100%);
  --on-accent: #2a1c06;
  --ink-rgb: 255, 255, 255;
  --panel-rgb: 23, 20, 15;
  --shade-rgb: 10, 8, 5;
  --stage-bg: #0f0d0a;
  --scroll: #3b342a;
  --glow-1: rgba(226, 176, 82, .07);
  --glow-2: rgba(207, 138, 52, .05);
  --danger: #ef6b6b;
  --warn: #f0924a;
  --ok: #6fcf9f;
  --violet: var(--accent);
  --shadow-rgb: 0, 0, 0;
  --shadow-k: 1;
  --backdrop: rgba(10, 8, 5, .7);
  --sunk: rgba(0, 0, 0, .12);
  color-scheme: dark;
}
:root {
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --rail-w: 272px;
  --presence-w: 248px;
  --gap: 10px;
  font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f5efe4;
  --panel: #fffdf9;
  --elev: #f8f3ea;
  --elev-2: #f0e7d8;
  --hover: #e9dec9;
  --line: rgba(110, 75, 25, .10);
  --line-2: rgba(110, 75, 25, .17);
  --text: #2a2117;
  --muted: #6b5e4b;
  --faint: #9a8c76;
  --accent: #b9831f;
  --accent-rgb: 185, 131, 31;
  --blue: #8f6110;
  --mint: #1c936a;
  --mint-rgb: 28, 147, 106;
  --grad: linear-gradient(135deg, #f2cf6f 0%, #dfa33d 55%, #c98a2e 100%);
  --grad-soft: linear-gradient(135deg, rgba(185, 131, 31, .12), rgba(201, 138, 46, .07));
  --mine: linear-gradient(135deg, #956720 0%, #80581b 100%);
  --on-accent: #2a1c06;
  --ink-rgb: 110, 75, 25;
  --panel-rgb: 255, 253, 249;
  --scroll: #dacdb5;
  --glow-1: rgba(242, 207, 111, .28);
  --glow-2: rgba(201, 138, 46, .10);
  --danger: #c9384f;
  --warn: #c0641a;
  --ok: #1c936a;
  --shadow-rgb: 90, 60, 20;
  --shadow-k: .35;
  --backdrop: rgba(60, 42, 15, .30);
  --sunk: #f8f3ea;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 0% 0%, var(--glow-1), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, var(--glow-2), transparent 60%);
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(var(--accent-rgb), .4); }

/* ---------- botões ---------- */
.btn { border: 0; border-radius: 12px; padding: 10px 18px; background: var(--elev-2); color: var(--text); font-weight: 700; transition: transform .08s, filter .15s, background .15s; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: rgba(255, 85, 119, .14); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--elev); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.round-btn { border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.round-btn:hover { background: var(--hover); color: var(--text); }
.round-btn.danger { background: rgba(255, 85, 119, .14); color: var(--danger); }
.round-btn.danger:hover { background: var(--danger); color: #fff; }
.round-btn .off, .dock-btn .off { display: none; }
.round-btn.toggled .on, .dock-btn.toggled .on { display: none; }
.round-btn.toggled .off, .dock-btn.toggled .off { display: block; }
.round-btn.toggled { color: var(--danger); background: rgba(255, 85, 119, .12); }
.mini-btn { border: 0; background: transparent; color: var(--faint); width: 22px; height: 22px; border-radius: 7px; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.mini-btn:hover { background: var(--hover); color: var(--text); }

/* ---------- entrada ---------- */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 5; overflow: hidden; }
.auth-glow { position: absolute; width: 900px; height: 900px; border-radius: 50%; background: conic-gradient(from 90deg, rgba(var(--accent-rgb), .24), rgba(var(--accent-rgb), .10), rgba(201, 120, 40, .20), rgba(var(--accent-rgb), .24)); filter: blur(120px); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-card { position: relative; width: 100%; max-width: 420px; background: rgba(var(--panel-rgb), .82); backdrop-filter: blur(24px); border: 1px solid var(--line-2); border-radius: 26px; padding: 36px 32px 24px; box-shadow: 0 30px 80px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); text-align: center; }
.auth-logo { width: 64px; height: 64px; }
.auth-card h1 { margin: 14px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.auth-card form { text-align: left; margin-top: 22px; display: grid; gap: 14px; }
.auth-card .auth-switch { margin: 16px 0 0; text-align: center; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.auth-card input, .modal input[type=text], .modal input[type=password], .modal input:not([type]), .modal input[type=date], .modal input[type=time], .modal select, .modal textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; outline: none; font-weight: 500; font-size: 15px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.modal textarea { resize: vertical; font-size: 14px; line-height: 1.45; }
.modal input:disabled { opacity: .55; }
.auth-card input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2); }
.auth:not(.register) .reg-only { display: none; }

/* ---------- layout em painéis flutuantes ---------- */
.app { position: relative; z-index: 1; display: flex; gap: var(--gap); padding: var(--gap); height: 100vh; height: 100dvh; }
.rail, .main, .presence { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rail { width: clamp(200px, var(--rail-w), 40vw); display: flex; flex-direction: column; flex: none; overflow: hidden; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.presence { width: clamp(170px, var(--presence-w), 34vw); flex: none; display: flex; flex-direction: column; overflow: hidden; padding: 0; }

/* marca */
.brand { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.brand:hover .brand-more { color: var(--text); }
.brand-logo { width: 38px; height: 38px; }
.brand-text { flex: 1; min-width: 0; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.brand-sub::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.brand-more { color: var(--faint); }

.rail-scroll { flex: 1; overflow-y: auto; padding: 6px 10px 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }

/* salas de voz (cards) */
.rooms { display: grid; gap: 8px; }
.room { background: var(--elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 10px 8px; cursor: pointer; transition: background .15s, border-color .15s; }
.room:hover { background: var(--elev-2); }
.room.active { border-color: rgba(var(--accent-rgb), .5); background: linear-gradient(var(--elev), var(--elev)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.room.live { box-shadow: inset 0 0 0 1px rgba(var(--mint-rgb), .12); }
.room-head { display: flex; align-items: center; gap: 9px; }
.room-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.room-ico svg { width: 17px; height: 17px; }
.room.live .room-ico { color: var(--mint); }
.room-name { flex: 1; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-count { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 2px 8px; }
.room.live .room-count { color: var(--mint); }
.room-people { margin-top: 8px; display: grid; gap: 2px; }
.person { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 9px; font-size: 13px; color: var(--text); }
.person:hover { background: rgba(var(--ink-rgb), .03); }
.person .avatar { width: 24px; height: 24px; font-size: 11px; }
.person .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .flags { display: flex; gap: 4px; align-items: center; color: var(--faint); }
.person .flags svg { width: 14px; height: 14px; }
.person .flags .red { color: var(--danger); }
.tag-live { background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: .04em; }

/* chats */
.chats { display: grid; gap: 2px; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; position: relative; }
.chat-item:hover { background: var(--elev); color: var(--text); }
.chat-item.active { background: var(--elev-2); color: var(--text); }
.chat-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.chat-item svg { width: 17px; height: 17px; opacity: .7; }
.chat-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .badge { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); display: none; flex: none; }
.chat-item.unread { color: var(--text); font-weight: 800; background: rgba(var(--accent-rgb), .08); }
.chat-item.unread .nm { color: var(--text); }
.chat-item.unread .badge { display: grid; place-items: center; }
.chat-item .badge.count { width: auto; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; font-weight: 800; color: var(--panel); box-shadow: 0 0 0 2px var(--panel), 0 0 10px rgba(var(--accent-rgb), .45); background: var(--mint); }
.chat-item .badge.hot { background: var(--danger); color: #fff; box-shadow: 0 0 0 2px var(--panel), 0 0 12px rgba(255, 85, 119, .55); animation: badge-pop .35s ease; }
@keyframes badge-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* cartão da chamada */
.call-card { margin: 0 10px 8px; padding: 10px 10px 9px 12px; border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid rgba(var(--mint-rgb), .2); }
.call-top { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(var(--mint-rgb), .6); animation: pulse 2s infinite; flex: none; }
.call-card.bad .live-dot { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--mint-rgb), .55); } 70% { box-shadow: 0 0 0 8px rgba(var(--mint-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--mint-rgb), 0); } }
.call-info { flex: 1; min-width: 0; }
.call-status { font-weight: 800; font-size: 13px; color: var(--mint); }
.call-card.bad .call-status { color: var(--warn); }
.call-room { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-meta { margin-top: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.signal { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.signal i { width: 4px; border-radius: 2px; background: rgba(var(--ink-rgb), .15); }
.signal i:nth-child(1) { height: 5px; } .signal i:nth-child(2) { height: 9px; } .signal i:nth-child(3) { height: 14px; }
.signal.q3 i { background: var(--ok); }
.signal.q2 i:nth-child(-n+2) { background: var(--warn); }
.signal.q1 i:nth-child(1) { background: var(--danger); }

/* cartão do usuário */
.me-card { display: flex; align-items: center; gap: 6px; padding: 10px; margin: 0 10px 10px; border-radius: var(--r-md); background: var(--elev); }
.me-avatar { position: relative; }
.me-avatar .avatar { width: 36px; height: 36px; }
.me-names { flex: 1; min-width: 0; padding-left: 4px; }
.me-name { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .round-btn { width: 34px; height: 34px; border-radius: 10px; }

/* avatar */
.avatar { width: 32px; height: 32px; border-radius: 30%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; background-size: cover; background-position: center; font-size: 14px; position: relative; transition: box-shadow .12s; }
.speaking .avatar, .avatar.speaking { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--mint); }
.dot-on { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 3px solid var(--panel); }

/* ---------- topo ---------- */
.topbar { height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.topbar-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.topbar-icon svg { width: 19px; height: 19px; }
.topbar-title { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.topbar-sub { font-size: 12px; color: var(--muted); }
.topbar-text { min-width: 0; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.messages { flex: 1; overflow-y: auto; padding: 18px 22px 8px; }
.load-more { text-align: center; padding: 8px; }
.chat-hello { text-align: center; padding: 30px 10px 24px; color: var(--muted); }
.chat-hello .hello-ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); }
.chat-hello .hello-ico svg { width: 28px; height: 28px; }
.chat-hello h2 { color: var(--text); margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; color: var(--faint); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.msg { display: flex; gap: 10px; align-items: flex-end; margin-top: 3px; position: relative; }
.msg.head { margin-top: 14px; }
.msg .av-slot { width: 34px; flex: none; }
.msg .avatar { width: 34px; height: 34px; }
.msg .col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(680px, 78%); min-width: 0; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; margin: 0 4px 4px; font-size: 12px; }
.msg .author { font-weight: 800; font-size: 13px; }
.msg .time { color: var(--faint); font-size: 11px; }
.bubble { background: var(--elev-2); border: 1px solid var(--line); padding: 8px 13px; border-radius: 6px 16px 16px 6px; min-width: 0; max-width: 100%; }
.msg.head .bubble { border-top-left-radius: 16px; }
.msg.last .bubble { border-bottom-left-radius: 16px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .col { align-items: flex-end; }
.msg.mine .bubble { background: var(--mine); border-color: transparent; color: #fff; border-radius: 16px 6px 6px 16px; }
.msg.mine.head .bubble { border-top-right-radius: 16px; }
.msg.mine.last .bubble { border-bottom-right-radius: 16px; }
.msg.mine .meta { flex-direction: row-reverse; }
.msg.mention .bubble { box-shadow: 0 0 0 2px var(--mint); }
.bubble .text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble .edited { font-size: 11px; opacity: .6; }
.bubble.empty { display: none; }
.msg .actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; align-self: center; }
.msg:hover .actions { opacity: 1; }
.msg .actions button { border: 0; background: var(--elev); color: var(--muted); width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.msg .actions button:hover { color: var(--text); background: var(--hover); }
.msg .actions svg { width: 15px; height: 15px; }
.text code { background: rgba(0, 0, 0, .3); padding: 1px 5px; border-radius: 6px; font-family: 'Cascadia Code', Consolas, monospace; font-size: 13.5px; }
.text pre { background: rgba(0, 0, 0, .35); padding: 10px; border-radius: 10px; overflow-x: auto; margin: 4px 0; white-space: pre-wrap; }
.text pre code { background: none; padding: 0; }
.text blockquote { margin: 2px 0; padding-left: 10px; border-left: 3px solid rgba(var(--ink-rgb), .25); }
.text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg:not(.mine) .text a { color: var(--blue); }
.mention-tag { background: rgba(var(--mint-rgb), .18); color: var(--mint); padding: 0 4px; border-radius: 6px; font-weight: 700; }
.msg.mine .mention-tag { background: rgba(255, 255, 255, .2); color: #fff; }
.spoiler { background: #000; color: transparent; border-radius: 5px; cursor: pointer; padding: 0 3px; transition: background .2s; }
.spoiler.shown { background: rgba(var(--ink-rgb), .1); color: inherit; }
/* anexos fora do balão: imagem e vídeo só na moldura, como no Discord */
.attachments { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 100%; }
.bubble:not(.empty) + .attachments { margin-top: 5px; }
.msg.mine .attachments { align-items: flex-end; }
.attachments .media { position: relative; border-radius: 8px; overflow: hidden; max-width: min(550px, 100%); line-height: 0;
  background: rgba(var(--ink-rgb), .05); box-shadow: 0 0 0 1px rgba(var(--ink-rgb), .08); }
.attachments .media img, .attachments .media video { display: block; max-width: 100%; max-height: 380px; width: auto; height: auto; cursor: zoom-in; }
.attachments .media:not(.ok) img { min-width: 120px; min-height: 90px; }
/* carregou: só a imagem, sem fundo nem borda (PNG transparente fica limpo) */
.attachments .media.ok { background: transparent; box-shadow: none; }
.attachments .media.err img { min-height: 60px; }
.attachments .media video { cursor: auto; background: #000; }
.attachments .media img { transition: filter .15s; }
.attachments .media:hover img { filter: brightness(1.06); }
.attachments.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 270px)); }
.attachments.grid .media img, .attachments.grid .media video { width: 100%; height: 220px; object-fit: cover; max-height: none; }
.attachments.grid .media { max-width: none; }
.attachments audio { max-width: 100%; }
.msg.pinned .attachments .media, .msg.pinned .attachments .media.ok, .msg.pinned .attachments .file-card { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .7); }
.msg.mention .attachments .media, .msg.mention .attachments .media.ok { box-shadow: 0 0 0 2px var(--mint); }
.file-card { display: flex; align-items: center; gap: 10px; background: var(--elev-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-width: 360px; color: var(--text); }
.file-card .fi { width: 36px; height: 36px; border-radius: 10px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); }
.file-card .fs { font-size: 12px; opacity: .7; }
.file-card a { color: inherit; font-weight: 700; word-break: break-all; }

.typing { height: 22px; padding: 0 24px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.typing b { color: var(--text); }
.composer-wrap { padding: 0 16px 16px; }
.composer { display: flex; align-items: flex-end; gap: 6px; background: var(--elev); border: 1px solid var(--line-2); border-radius: 18px; padding: 6px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: rgba(var(--accent-rgb), .5); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.composer textarea { flex: 1; background: transparent; border: 0; outline: none; resize: none; padding: 8px 4px; max-height: 40vh; line-height: 1.45; font-size: 15px; }
.send-btn { border: 0; width: 38px; height: 38px; border-radius: 13px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; flex: none; transition: filter .15s, transform .08s, opacity .15s; }
.send-btn:hover { filter: brightness(1.1); }
.send-btn:active { transform: scale(.94); }
.send-btn.idle { opacity: .35; }
.pending-files { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.pending-files:empty { display: none; }
.pf { background: var(--elev); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; max-width: 240px; }
.pf img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.pf .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pf button { border: 0; background: transparent; color: var(--danger); font-size: 16px; }
.drop-hint { position: absolute; inset: 10px; border-radius: var(--r-lg); background: rgba(var(--accent-rgb), .1); border: 2px dashed var(--accent); display: grid; place-items: center; font-size: 20px; font-weight: 800; z-index: 30; pointer-events: none; }

/* ---------- presença ---------- */
.presence .p-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); padding: 6px 8px 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; }
.member:hover { background: var(--elev); }
.member.offline { opacity: .38; }
.member .aw { position: relative; }
.member .nm { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .st { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.member .st svg { width: 12px; height: 12px; color: var(--mint); }
.member .role { font-size: 10px; font-weight: 800; color: var(--accent); background: rgba(var(--accent-rgb), .14); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }

/* ---------- sala de voz ---------- */
.stage { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; background: radial-gradient(800px 400px at 50% 0%, rgba(var(--accent-rgb), .08), transparent 70%), var(--stage-bg); color: var(--text); }
.stage-grid { flex: 1; display: grid; gap: 10px; padding: 14px 14px 0; align-content: center; justify-content: center; overflow: auto; min-height: 0;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.stage-grid.has-focus { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; }
.tile { position: relative; background: var(--elev); border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; display: grid; place-items: center; min-height: 0; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .12s; cursor: pointer; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--mint), 0 0 24px rgba(var(--mint-rgb), .25); }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; position: absolute; inset: 0; }
.tile.cam video { object-fit: cover; }
.tile.mirror video { transform: scaleX(-1); }
.tile .tile-avatar { display: grid; place-items: center; gap: 10px; }
.tile .tile-avatar .avatar { width: 84px; height: 84px; font-size: 34px; border-radius: 28px; }
.tile.speaking .tile-avatar .avatar { box-shadow: 0 0 0 4px var(--elev), 0 0 0 7px var(--mint); }
.tile .label { position: absolute; left: 10px; bottom: 10px; background: rgba(var(--shade-rgb), .72); backdrop-filter: blur(10px); padding: 5px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; max-width: calc(100% - 20px); }
.tile .label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .label svg { width: 15px; height: 15px; color: var(--danger); }
.tile .badges { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; align-items: center; }
.tile .res { background: rgba(var(--shade-rgb), .72); padding: 3px 7px; border-radius: 8px; font-size: 11px; font-weight: 800; color: var(--mint); }
.tile .sig { background: rgba(var(--shade-rgb), .72); padding: 5px 7px; border-radius: 8px; display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .tools { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.tile:hover .tools { opacity: 1; }
.tile .tools button { border: 0; background: rgba(var(--shade-rgb), .72); color: #fff; border-radius: 9px; height: 30px; padding: 0 9px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tile .tools button:hover { background: rgba(var(--shade-rgb), .9); }
.tile .tools input { width: 80px; accent-color: var(--mint); }
.tile .tools svg { width: 15px; height: 15px; }
.focus-main { min-height: 0; display: grid; }
.focus-main .tile { aspect-ratio: auto; height: 100%; }
.focus-strip { display: flex; gap: 10px; overflow-x: auto; justify-content: center; padding-bottom: 2px; }
.focus-strip .tile { width: 190px; flex: none; }
.focus-strip .tile .tile-avatar .avatar { width: 44px; height: 44px; font-size: 18px; border-radius: 15px; }
.focus-strip .tile .tools, .focus-strip .tile .sig { display: none; }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 4px; z-index: 2; }
.empty-orb { width: 86px; height: 86px; border-radius: 30px; background: var(--grad); display: grid; place-items: center; color: var(--on-accent); margin-bottom: 10px; box-shadow: 0 20px 60px rgba(var(--accent-rgb), .35); }
.empty-orb svg { width: 38px; height: 38px; }
.stage-empty h2 { margin: 0; font-size: 22px; font-weight: 800; }
.stage-empty .btn { margin-top: 14px; padding: 12px 26px; }

.dock { position: relative; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px auto 14px; padding: 8px; border-radius: 22px; background: rgba(var(--panel-rgb), .85); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: 0 10px 40px rgba(var(--shadow-rgb), calc(.4 * var(--shadow-k))); }
.dock-btn { border: 0; background: transparent; color: var(--text); min-width: 76px; padding: 8px 10px 6px; border-radius: 15px; display: grid; justify-items: center; gap: 3px; transition: background .15s; }
.dock-btn:hover { background: var(--hover); }
.dock-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--elev-2); transition: background .15s, color .15s; }
.dock-ico svg { width: 21px; height: 21px; }
.dock-label { font-size: 11px; font-weight: 700; color: var(--muted); }
.dock-btn.on .dock-ico { background: var(--grad); color: var(--on-accent); }
.dock-btn.on .dock-label { color: var(--text); }
.dock-btn.toggled .dock-ico { background: rgba(255, 85, 119, .16); color: var(--danger); }
.dock-btn.leave .dock-ico { background: var(--danger); color: #fff; }
.ptt-chip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; background: var(--elev-2); border: 1px solid var(--line-2); color: var(--muted); }
.ptt-chip.live { background: var(--mint); color: var(--on-accent); border-color: transparent; }

/* ---------- modal / menus ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--backdrop); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 24px; width: 100%; max-width: 600px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 90px rgba(var(--shadow-rgb), calc(.6 * var(--shadow-k))); }
.modal-head { padding: 20px 22px 10px; display: flex; align-items: center; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; flex: 1; }
.modal-body { padding: 10px 22px 18px; display: grid; gap: 16px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.tabs { display: flex; gap: 4px; padding: 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; color: var(--muted); font-weight: 700; border-radius: 10px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--elev-2); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-preview { display: flex; align-items: center; gap: 14px; background: var(--grad-soft); border: 1px solid var(--line); padding: 16px; border-radius: 16px; }
.profile-preview .avatar { width: 64px; height: 64px; font-size: 26px; border-radius: 22px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 30px; height: 30px; border-radius: 10px; border: 2px solid transparent; }
.colors button.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel) inset; }
.meter { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--grad); transition: width .06s; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; }
.seg button.sel { background: var(--elev-2); color: var(--text); }
.keycap { display: inline-block; min-width: 40px; text-align: center; background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 3px; border-radius: 9px; padding: 6px 10px; font-weight: 800; }
.keycap.listening { border-color: var(--mint); color: var(--mint); }
.hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.invite-box { display: flex; gap: 8px; }
.invite-box input { flex: 1; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--elev); }
.member-row .nm { flex: 1; min-width: 0; font-weight: 700; }
.member-row .nm small { color: var(--muted); display: block; font-weight: 500; }
.ctx-menu { position: fixed; z-index: 60; background: var(--elev); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; min-width: 200px; box-shadow: 0 16px 40px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); }
.ctx-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.ctx-menu button:hover { background: var(--hover); }
.ctx-menu button.danger { color: var(--danger); }
.ctx-menu button.danger:hover { background: rgba(255, 85, 119, .14); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--elev-2); border: 1px solid var(--line-2); padding: 11px 18px; border-radius: 14px; z-index: 70; box-shadow: 0 12px 30px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); max-width: 90vw; font-weight: 600; font-size: 14px; }
.lightbox { position: fixed; inset: 0; background: rgba(var(--shade-rgb), .92); z-index: 80; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 95vh; border-radius: 10px; }
.edit-box { width: 100%; }
.edit-box textarea { width: 100%; min-width: 260px; background: rgba(0, 0, 0, .25); border: 0; border-radius: 10px; padding: 8px; resize: vertical; outline: none; color: inherit; }
.edit-box .hint { color: inherit; opacity: .7; margin-top: 4px; }

.mobile-only { display: none; }
@media (max-width: 1180px) { .presence { display: none; } .presence.force { display: flex; } #rz-presence { display: none; } }
@media (max-width: 760px) {
  :root { --gap: 0px; }
  .app { padding: 0; }
  .main { border-radius: 0; border: 0; }
  .mobile-only { display: inline-grid; }
  .rail { position: fixed; left: 8px; top: 8px; bottom: 8px; z-index: 40; transform: translateX(-110%); transition: transform .22s ease; box-shadow: 10px 0 40px rgba(var(--shadow-rgb), calc(.6 * var(--shadow-k))); }
  .rail.open { transform: none; }
  .presence.force { position: fixed; right: 8px; top: 70px; bottom: 8px; z-index: 35; box-shadow: -10px 0 40px rgba(var(--shadow-rgb), calc(.6 * var(--shadow-k))); }
  .stage-grid { --cols: 1 !important; }
  .msg .col { max-width: 86%; }
  .msg .actions { opacity: 1; }
  .dock-btn { min-width: 60px; }
}

/* ---------- nivelador de sensibilidade ---------- */
.section-head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin-top: 4px; }
.sens { background: var(--elev); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.sens-top { display: flex; justify-content: space-between; align-items: baseline; }
.sens-db { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.sens-bar { position: relative; height: 14px; border-radius: 8px; background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.sens-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--hover), var(--faint)); transition: width .06s linear; }
.sens-bar.open .sens-fill { background: var(--grad); }
.sens-mark { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 2px rgba(var(--shade-rgb), .6); }
.sens-range { width: 100%; accent-color: var(--accent); margin: 0; }
.sens-foot { display: flex; align-items: center; }
.sens-state { font-size: 12px; font-weight: 700; color: var(--muted); }
.sens-state.on { color: var(--mint); }

/* ---------- mensagens privadas ---------- */
.dm-item { padding: 6px 10px; }
.dm-item .aw { position: relative; }
.dm-item .avatar { width: 26px; height: 26px; font-size: 12px; }
.dm-item .dot-on { width: 10px; height: 10px; border-width: 2px; right: -2px; bottom: -2px; border-color: var(--panel); }
.dm-empty { font-size: 12px; color: var(--faint); padding: 4px 10px 6px; line-height: 1.4; }
.member.clickable { cursor: pointer; }
.topbar-icon.private { background: rgba(var(--mint-rgb), .14); color: var(--mint); }
.composer.private { border-color: rgba(var(--mint-rgb), .35); }
.composer.private:focus-within { border-color: rgba(var(--mint-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .12); }
.chat-hello.private .hello-av { display: grid; place-items: center; margin-bottom: 10px; }
.chat-hello.private .hello-av .avatar { width: 64px; height: 64px; font-size: 26px; border-radius: 22px; }
.chat-hello.private svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--mint); }
.pick-list { display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 12px; border: 0; background: var(--elev); padding: 10px 12px; border-radius: 14px; text-align: left; }
.pick:hover { background: var(--hover); }
.pick .aw { position: relative; }
.pick .dot-on { border-color: var(--elev); }
.pick-nm { flex: 1; font-weight: 700; }
.pick-nm small { display: block; font-weight: 500; color: var(--muted); }
.pick svg { color: var(--faint); width: 16px; height: 16px; }
.modal-head, .tabs, .modal-foot { flex: none; }
.tabs { padding-bottom: 6px; }

/* ---------- cargos e cartão de usuário ---------- */
.role-mod { color: var(--mint); background: rgba(var(--mint-rgb), .14); }
.round-btn.modlock { color: var(--danger); background: rgba(255, 85, 119, .12); }
.me-names { cursor: pointer; border-radius: 8px; }
.me-names:hover .me-name { text-decoration: underline; text-underline-offset: 3px; }
.user-card { position: fixed; z-index: 65; width: 300px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--elev); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px; display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k))); }
.uc-head { display: flex; gap: 12px; align-items: center; }
.uc-head .aw { position: relative; }
.uc-head .avatar { width: 52px; height: 52px; font-size: 22px; border-radius: 18px; }
.uc-head .dot-on { border-color: var(--elev); }
.uc-names { min-width: 0; }
.uc-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 4px; }
.uc-sub { font-size: 12px; color: var(--muted); }
.uc-warn { font-size: 12px; color: var(--danger); font-weight: 700; display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.uc-warn svg { width: 14px; height: 14px; }
.uc-sec { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.uc-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.uc-label svg { width: 15px; height: 15px; }
.uc-pct { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.uc-sec input[type=range] { width: 100%; accent-color: var(--mint); }
.uc-pct.boost { color: var(--warn); font-weight: 800; }
.vol-range { position: relative; background: linear-gradient(90deg, transparent 49.6%, var(--line-2) 49.6%, var(--line-2) 50.4%, transparent 50.4%); border-radius: 4px; }
.uc-hint { font-size: 11px; color: var(--muted); margin-top: -4px; }
.uc-row { display: flex; gap: 6px; }
.uc-row input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; outline: none; }
.uc-row input:focus { border-color: var(--accent); }
.uc-row .btn { padding: 8px 12px; }
.user-card > .btn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.user-card .btn svg { width: 16px; height: 16px; }
.uc-mod { background: rgba(255, 85, 119, .05); margin: 0 -14px -14px; padding: 12px 14px 14px; border-radius: 0 0 18px 18px; }
.uc-moves { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line-2); background: var(--elev-2); border-radius: 20px; padding: 5px 11px; font-size: 12px; font-weight: 700; }
.chip:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.seg-sm button { padding: 5px 9px; font-size: 12px; }
.person { cursor: pointer; }

/* ---------- Bardo (música) ---------- */
.main { position: relative; }
/* caixinha de controle embaixo da lista de membros (nunca por cima das câmeras/chat) */
.presence { background: transparent; border: 0; gap: 8px; }
.members-list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.bardo { position: relative; flex: none; display: flex; flex-direction: column; margin: 0; max-height: 70%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bd-head { display: flex; align-items: center; gap: 4px; padding: 8px 6px 6px 8px; flex: none; }
.bd-logo { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; flex: none; margin-right: 4px; }
.bd-logo svg { width: 15px; height: 15px; }
.bardo.playing .bd-logo { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-6deg); } }
.bd-titles { flex: 1; min-width: 0; line-height: 1.15; }
.bd-titles b { display: block; font-size: 13px; }
.bd-titles span { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-head .round-btn { width: 26px; height: 26px; flex: none; }
.bd-head .round-btn svg { width: 16px; height: 16px; }
#bd-collapse.on { background: rgba(var(--accent-rgb), .18); color: var(--accent); }
.bd-unlock { padding: 0 8px 6px; flex: none; }
.bd-unlock .btn { width: 100%; padding: 8px; font-size: 13px; }
/* tocando agora: só o nome da música (o player oficial fica escondido, só o som) */
.bd-main { display: flex; align-items: center; gap: 9px; padding: 2px 8px 4px; flex: none; min-width: 0; }
.bd-stage { position: relative; flex: none; border-radius: 9px; overflow: hidden; background: #000; }
.bd-player { width: 100%; height: 100%; }
.bd-player iframe, .bd-player > div { width: 100% !important; height: 100% !important; border: 0; display: block; }
.bd-now { flex: 1; min-width: 0; }
.bd-title { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-meta { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-hint { font-size: 11px; color: var(--warn); padding: 0 10px 2px; line-height: 1.35; flex: none; }
.bd-progress { display: flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.bd-progress input { flex: 1; min-width: 0; accent-color: var(--mint); }
.bd-ctrls { display: flex; align-items: center; gap: 2px; padding: 2px 8px 8px; flex: none; min-width: 0; }
.bd-ctrls .round-btn { width: 30px; height: 30px; flex: none; }
.bd-ctrls .round-btn svg { width: 17px; height: 17px; }
.bd-ctrls .round-btn:disabled, .bd-play:disabled { opacity: .35; cursor: default; }
.bd-play { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; }
.bd-play svg { width: 20px; height: 20px; }
.bd-play .i-pause, .bardo.playing .bd-play .i-play { display: none; }
.bardo.playing .bd-play .i-pause { display: block; }
#bd-loop { position: relative; }
#bd-loop.on { color: var(--mint); }
.bd-loop-one { display: none; position: absolute; right: 2px; bottom: 2px; font-size: 9px; font-style: normal; font-weight: 800; }
#bd-loop.one .bd-loop-one { display: block; }
.bd-vol { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.bd-vol-ico { width: 16px; height: 16px; color: var(--muted); flex: none; fill: currentColor; }
#bd-vol { flex: 1; min-width: 30px; width: 100%; accent-color: var(--accent); }
/* fila e "adicionar música": abre dentro da caixinha */
.bd-body { display: none; border-top: 1px solid var(--line); padding: 8px; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; }
.bardo.queue-open .bd-body { display: flex; }
.bd-empty { font-size: 12px; color: var(--muted); padding: 2px 2px 0; }
.bd-add { display: flex; gap: 4px; flex: none; }
.bd-add input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 9px; outline: none; font-size: 12.5px; }
.bd-add input:focus { border-color: var(--accent); }
.bd-add .round-btn { width: 32px; height: 32px; flex: none; }
.bd-queue { overflow-y: auto; display: grid; gap: 2px; align-content: start; min-height: 0; max-height: 220px; }
.bd-q { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 9px; cursor: pointer; }
.bd-q:hover { background: var(--hover); }
.bd-q.now { background: var(--grad-soft); }
.bd-q.done { opacity: .5; }
.bd-q-n { width: 14px; text-align: center; font-size: 10.5px; color: var(--faint); font-weight: 800; flex: none; }
.bd-q.now .bd-q-n { color: var(--mint); }
.bd-q img, .bd-q-ico { width: 34px; height: 26px; border-radius: 5px; object-fit: cover; flex: none; background: var(--elev-2); display: grid; place-items: center; color: var(--accent); }
.bd-q-ico svg { width: 14px; height: 14px; }
.bd-q-txt { flex: 1; min-width: 0; }
.bd-q-t { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-q-m { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-q-x { border: 0; background: transparent; color: var(--faint); width: 24px; height: 24px; border-radius: 7px; opacity: 0; flex: none; }
.bd-q:hover .bd-q-x { opacity: 1; }
.bd-q-x:hover { background: rgba(255, 85, 119, .15); color: var(--danger); }
.bd-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; flex: none; }
.bd-foot:empty { display: none; }
.bd-foot .btn { padding: 5px 9px; font-size: 12px; }
.check.small { font-size: 12px; }
.room-music { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 8px; border-radius: 9px; background: rgba(var(--mint-rgb), .08); color: var(--mint); font-size: 12px; font-weight: 700; }
.room-music svg { width: 14px; height: 14px; flex: none; }
.room-music .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vp-music.on, #ctrl-music.on .dock-ico { color: var(--mint); }
/* lista de membros escondida (botão no PC grande / tela estreita): a caixinha do Bardo fica sozinha no canto */
@media (min-width: 1181px) {
  .presence.collapsed.has-bardo { display: flex; align-self: flex-end; height: auto; max-height: 100%; }
  .presence.collapsed.has-bardo .members-list { display: none; }
  .presence.collapsed.has-bardo { background: transparent; border: 0; }
  .presence.collapsed.has-bardo .bardo { margin: 0; max-height: none; background: var(--panel); box-shadow: var(--shadow-2, 0 10px 30px rgba(var(--shadow-rgb), calc(.4 * var(--shadow-k)))); }
}
@media (max-width: 1180px) {
  .presence.has-bardo:not(.force) { display: flex; position: fixed; z-index: 34; right: calc(8px + var(--sar, 0px)); top: calc(70px + var(--sat, 0px)); width: min(300px, calc(100vw - 16px)); height: auto; max-height: calc(100% - 90px); box-shadow: 0 16px 50px rgba(var(--shadow-rgb), calc(.6 * var(--shadow-k))); }
  .presence.has-bardo:not(.force) .members-list { display: none; }
  .presence.has-bardo:not(.force) { background: transparent; border: 0; }
  .presence.has-bardo:not(.force) .bardo { margin: 0; background: var(--panel); }
}

/* ---------- Escriba (transcrição e crônicas) ---------- */
.es-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(255, 85, 119, .6); animation: es-pulse 1.6s infinite; flex: none; display: inline-block; }
@keyframes es-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 85, 119, .55); } 70% { box-shadow: 0 0 0 7px rgba(255, 85, 119, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 85, 119, 0); } }
.es-rail .nm { display: grid; line-height: 1.2; }
.es-rail-sub { font-size: 11px; font-weight: 600; color: var(--faint); }
.es-rail.live .es-rail-sub { color: var(--danger); }
.es-live-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: es-pulse 1.6s infinite; }
.es-rail.live .es-live-dot { display: block; }
.room-escriba { margin-top: 7px; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; color: var(--danger); background: rgba(255, 85, 119, .08); border-radius: 9px; padding: 4px 8px; text-transform: uppercase; letter-spacing: .04em; }
.dock-btn.rec .dock-ico { background: rgba(255, 85, 119, .18); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 85, 119, .4); }
.dock-btn.rec .dock-label { color: var(--danger); }
/* Escriba ligado: plaquinha no canto de baixo, na altura dos botões da chamada (não cobre as câmeras) */
.es-banner { position: absolute; left: 14px; bottom: 60px; transform: translateY(50%); z-index: 6; display: flex; align-items: center; gap: 8px; max-width: min(300px, calc(50% - 300px)); padding: 8px 8px 8px 12px; border-radius: 16px;
  background: rgba(var(--panel-rgb), .88); backdrop-filter: blur(14px); border: 1px solid rgba(255, 85, 119, .3); font-size: 12.5px; box-shadow: 0 8px 30px rgba(var(--shadow-rgb), calc(.35 * var(--shadow-k))); transition: opacity .25s; }
.es-banner b { color: var(--danger); display: block; white-space: nowrap; }
.es-pill-txt { min-width: 0; line-height: 1.25; }
.es-pill-txt .es-rec-who { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-pill-btn { flex: none; border: 1px solid var(--line-2); background: var(--elev-2); color: var(--text); height: 30px; min-width: 30px; padding: 0 9px; border-radius: 10px; font-weight: 700; font-size: 12px; }
.es-pill-btn:hover { background: var(--hover); border-color: rgba(var(--accent-rgb), .4); }
.stage.cinema:not(.awake) .es-banner { opacity: 0; pointer-events: none; }
/* pouco espaço ao lado dos botões: fica só o pontinho e os botões; bem estreito, sobe para cima deles */
.es-pill-btn .lv-ico { display: none; }
.es-pill-btn .lv-ico svg { width: 16px; height: 16px; fill: currentColor; display: block; }
@container stage (max-width: 1040px) { .es-banner { max-width: none; gap: 6px; padding: 6px 6px 6px 10px; } .es-pill-txt, .es-pill-btn .lv-txt { display: none; } .es-pill-btn .lv-ico { display: block; } .es-pill-btn { padding: 0 7px; } }
@container stage (max-width: 880px) { .es-banner { bottom: 138px; } }

.escriba { flex: 1; display: flex; min-height: 0; }
.es-side { width: clamp(200px, var(--es-side-w, 300px), 55%); flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.es-side-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 8px; font-size: 13px; }
.es-side-head b { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }
.es-list { flex: 1; overflow-y: auto; padding: 4px 10px 14px; display: grid; gap: 8px; align-content: start; }
.es-item { background: var(--elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; transition: background .15s; }
.es-item:hover { background: var(--elev-2); }
.es-item.active { background: linear-gradient(var(--elev-2), var(--elev-2)) padding-box, var(--grad) border-box; border-color: transparent; }
.es-item-top { display: flex; align-items: center; gap: 8px; }
.es-item-top b { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-item-sub { font-size: 12px; color: var(--muted); }
.es-empty-list { color: var(--muted); font-size: 13px; padding: 16px 6px; display: grid; gap: 6px; }
.es-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; background: var(--bg); color: var(--muted); }
.es-chip.live { color: var(--danger); background: rgba(255, 85, 119, .1); }
.es-chip.busy { color: var(--warn); background: rgba(255, 181, 71, .1); }
.es-chip.ok { color: var(--mint); background: rgba(var(--mint-rgb), .1); }
.es-chip.err { color: var(--danger); }
.es-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.es-head { padding: 18px 24px 10px; display: grid; gap: 8px; }
.es-head-top { display: flex; align-items: center; gap: 10px; }
.es-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.es-title.editable { cursor: text; }
.es-title.editable:hover { text-decoration: underline dotted var(--faint); text-underline-offset: 5px; }
.es-meta { font-size: 13px; color: var(--muted); }
.es-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.es-actions .btn { padding: 8px 14px; font-size: 13px; }
.es-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--warn); }
.es-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 181, 71, .25); border-top-color: var(--warn); animation: es-rot .8s linear infinite; }
@keyframes es-rot { to { transform: rotate(360deg); } }
.es-tabs { display: flex; gap: 4px; padding: 4px 22px 0; border-bottom: 1px solid var(--line); }
.es-tabs button { border: 0; background: transparent; padding: 9px 14px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.es-tabs button:hover { color: var(--text); }
.es-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.es-body { flex: 1; overflow-y: auto; padding: 18px 24px 28px; }
.es-loading, .es-empty { color: var(--muted); padding: 30px 0; text-align: center; max-width: 520px; margin: 0 auto; }
.es-hello { text-align: center; max-width: 560px; margin: 8vh auto 0; display: grid; justify-items: center; gap: 6px; }
.es-hello h2 { margin: 4px 0 0; font-size: 24px; }
.es-hello-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.es-hello-ico svg { width: 32px; height: 32px; }
.es-doc { max-width: 780px; line-height: 1.65; font-size: 15px; }
.es-doc h2 { font-size: 18px; margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.es-doc h3, .es-doc h4 { font-size: 15px; margin: 18px 0 6px; color: var(--accent); }
.es-doc h2:first-child { margin-top: 0; }
.es-doc p { margin: 0 0 12px; }
.es-doc ul, .es-doc ol { margin: 0 0 12px; padding-left: 22px; }
.es-doc li { margin: 3px 0; }
.es-doc blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--elev); border-radius: 0 10px 10px 0; }
.es-doc.recap { font-size: 16px; font-style: italic; }
.es-doc.recap p:first-child::first-letter { font-size: 2.4em; float: left; line-height: 1; padding: 4px 6px 0 0; font-style: normal; font-weight: 800; color: var(--accent); }
.es-ts { font-size: 11px; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.es-search { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 11px; padding: 9px 12px; outline: none; margin-bottom: 12px; }
.es-search:focus { border-color: var(--accent); }
.es-lines { display: grid; gap: 2px; max-width: 860px; }
.es-line { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.es-line:hover { background: var(--elev); }
.es-line .es-ts { padding-top: 3px; text-align: right; }
.es-line-main { min-width: 0; }
.es-who { font-weight: 800; font-size: 13px; margin-right: 8px; }
.es-who small { font-weight: 600; color: var(--faint); font-size: 11px; }
.es-text { font-size: 15px; }
.es-line.fresh { animation: es-in .6s ease; }
@keyframes es-in { from { background: rgba(var(--accent-rgb), .16); } to { background: transparent; } }
.es-mark { display: flex; gap: 10px; align-items: center; padding: 6px 8px; margin: 4px 0; border-radius: 10px; background: rgba(255, 181, 71, .08); color: var(--warn); font-weight: 700; font-size: 13px; }
.es-set-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding-top: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.es-ready { font-size: 11px; letter-spacing: 0; text-transform: none; padding: 2px 8px; border-radius: 20px; }
.es-ready.ok { color: var(--mint); background: rgba(var(--mint-rgb), .1); }
.es-ready.no { color: var(--warn); background: rgba(255, 181, 71, .1); }
.es-set-box { display: grid; gap: 12px; padding: 12px; border-radius: 14px; background: var(--elev); }
.es-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.es-roster { display: grid; gap: 8px; }
.es-roster-row { display: grid; grid-template-columns: 110px 82px 1fr 1.3fr; gap: 8px; align-items: center; }
.es-roster-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-roster-row .es-gm { font-size: 12px; gap: 6px; }
.es-roster-row input:not([type=checkbox]) { min-width: 0; }
.es-mem-edit { min-height: 280px; font-size: 13px; line-height: 1.5; }
@media (max-width: 1100px) { .es-side { width: 240px; } }
@media (max-width: 760px) {
  .escriba { flex-direction: column; }
  .es-side { width: auto; max-height: 34vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .es-head { padding: 14px 14px 8px; }
  .es-body { padding: 14px; }
  .es-tabs { padding: 0 10px; overflow-x: auto; }
  .es-line { grid-template-columns: 44px 1fr; }
  .es-roster-row { grid-template-columns: 1fr auto; }
  .es-roster-row input:not([type=checkbox]) { grid-column: 1 / -1; }
  .es-two { grid-template-columns: 1fr; }
}
.modal:has(.es-roster) { max-width: 780px; }
.es-rec-who { color: var(--muted); font-size: 12px; } .es-rec-who.warn { color: var(--warn); font-weight: 700; }

/* ---------- cargos ---------- */
.role-owner { color: #ffd44f; background: rgba(255, 212, 79, .14); }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.role-chip { --rc: #a0a7c0; display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line-2); background: transparent; color: var(--faint); border-radius: 20px; padding: 3px 10px 3px 8px; font-size: 12px; font-weight: 700; }
.role-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); opacity: .45; }
.role-chip.on { border-style: solid; border-color: color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 14%, transparent); color: var(--text); }
.role-chip.on i { opacity: 1; }
.role-chip:not(:disabled):hover { border-color: var(--rc); }
.role-chip:disabled { cursor: default; }
.member-row .nm { display: grid; gap: 2px; }
.roles-ed { display: grid; grid-template-columns: 210px 1fr; gap: 16px; min-height: 380px; }
.roles-list { display: grid; gap: 4px; align-content: start; }
.roles-list .hint { margin: 4px 0 6px; }
.role-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 14px; }
.role-item:hover { background: var(--elev); }
.role-item.sel { background: var(--elev-2); }
.role-item i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.role-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-item small { color: var(--faint); font-size: 11px; }
.roles-form { display: grid; gap: 12px; align-content: start; }
.roles-form-head { display: flex; align-items: center; gap: 8px; }
.roles-form-head h3 { margin: 0; flex: 1; font-size: 17px; }
.role-moves { display: flex; gap: 4px; }
.modal input[type=color] { width: 100%; height: 44px; padding: 4px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; }
.perm-list { display: grid; gap: 2px; }
.perm { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.perm > div { flex: 1; display: grid; gap: 2px; }
.perm small { color: var(--muted); font-weight: 500; font-size: 12px; }
.perm.danger b { color: var(--danger); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 20px; background: var(--elev-2); transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: .45; }
.modal:has(.roles-ed) { max-width: 820px; }
.es-line { grid-template-columns: 64px 1fr; }
@media (max-width: 760px) { .roles-ed { grid-template-columns: 1fr; } }
.role { font-size: 10px; font-weight: 800; color: var(--accent); background: rgba(var(--accent-rgb), .14); padding: 1px 6px; border-radius: 6px; margin-left: 4px; letter-spacing: .03em; white-space: nowrap; }
.nm-row { display: flex; align-items: center; gap: 4px; }
.modal:has(.member-row) { max-width: 760px; }
.es-side-head { flex-wrap: wrap; }
.es-side-head b { flex-basis: 100%; }
.es-side-head .spacer { display: none; }
.es-side-head .chip { white-space: nowrap; }
.tile .tools .tile-vol { display: flex; align-items: center; gap: 6px; background: rgba(var(--shade-rgb), .72); border-radius: 9px; padding: 0 8px 0 0; height: 30px; }
.tile .tools .tile-vol button { background: transparent; }
.tile .tools .tile-vol button.off { color: var(--danger); }
.tile .tools .tile-vol input { width: 96px; }
.tv-pct { font-size: 11px; font-weight: 800; color: #fff; min-width: 34px; font-variant-numeric: tabular-nums; }
.tv-pct.boost { color: var(--warn); }
.uc-sec .tile-vol { display: flex; align-items: center; gap: 8px; } .uc-sec .tile-vol input { flex: 1; } .uc-sec .tile-vol button { border: 0; background: var(--elev-2); color: var(--text); border-radius: 9px; width: 32px; height: 30px; display: grid; place-items: center; } .uc-sec .tile-vol button svg { width: 16px; } .uc-sec .tv-pct { color: var(--muted); }
.es-camp-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.es-camp-filter:empty { display: none; }
.es-camp-filter .chip.sel { background: var(--accent); color: #fff; }
.es-item-camp { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.es-item-camp.unknown { color: var(--warn); }
.es-camp-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.es-camp-row b { color: var(--text); }
.es-camp-sel { background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; padding: 5px 8px; color: var(--text); }
.es-camp-hint { font-size: 11px; color: var(--faint); }
.es-camp-bar { display: flex; gap: 8px; align-items: center; }
.es-camp-bar select { flex: 1; }
.es-pick { display: grid; gap: 8px; }
@media (max-width: 560px) {
  .dock { gap: 2px; padding: 8px 6px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
  .dock-btn { min-width: 50px; padding: 0 2px; }
  .dock-btn .dock-label { font-size: 10px; }
}
.hint.ok { color: var(--mint); }
.dl-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--elev); border: 1px solid var(--line); }
.dl-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); flex: none; }
.dl-ico svg { width: 26px; height: 26px; fill: currentColor; }
.dl-main { flex: 1; display: grid; gap: 4px; }
.dl-main b { font-size: 15px; }
.dl-card .btn { white-space: nowrap; text-decoration: none; display: inline-flex; gap: 4px; align-items: baseline; }
.dl-card .btn small { font-weight: 600; opacity: .7; font-size: 11px; }
.hint.warn { color: var(--warn); }
@media (max-width: 560px) { .dl-card { flex-wrap: wrap; } .dl-card .btn { width: 100%; justify-content: center; } }

/* Escriba na placa de vídeo */
.es-gpu { display: flex; flex-direction: column; gap: 8px; }
.es-beta { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #fff; vertical-align: middle; }
.es-gpu-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.es-gpu-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* ---------- bordas arrastáveis (ajustar largura dos painéis) ---------- */
.rz { flex: none; width: 10px; margin: 0 calc(-5px - var(--gap) / 2); position: relative; z-index: 6; cursor: col-resize; touch-action: none; }
.rz::after { content: ''; position: absolute; top: 14px; bottom: 14px; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 3px; background: transparent; transition: background .15s; }
.rz:hover::after, .rz.drag::after { background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .5); }
.views > .rz, .escriba > .rz { margin: 0 -5px; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe, body.resizing video, body.resizing .main, body.resizing .rail, body.resizing .presence { pointer-events: none; }
body.resizing .rz.drag { pointer-events: auto; }
.presence.hidden + .rz, .escriba.hidden .rz { display: none; }

/* ---------- área principal: chat, sala, escriba (e chat ao lado da sala) ---------- */
.views { flex: 1; display: flex; min-height: 0; min-width: 0; }
.views > .chat, .views > .stage, .views > .escriba { min-width: 0; }
#rz-sidechat { display: none; }
.side-head { display: none; }
.views.split .stage { order: 1; }
.views.split #rz-sidechat { display: block; order: 2; }
.views.split .chat { order: 3; flex: none; width: clamp(260px, var(--side-chat-w, 380px), calc(100% - 300px)); border-left: 1px solid var(--line); background: var(--panel); }
.views.split .side-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.side-head svg { width: 16px; height: 16px; fill: var(--accent); flex: none; }
.side-head select { flex: 1; min-width: 0; background: var(--elev); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 7px 10px; font: inherit; font-weight: 700; font-size: 13px; }
.side-head .round-btn { width: 30px; height: 30px; font-size: 13px; }
#btn-sidechat.active { background: var(--elev-2); color: var(--accent); }

/* ---------- configurações com menu lateral ---------- */
.modal.settings-modal { max-width: 1060px; height: min(820px, 90vh); }
.set-split { flex: 1; display: flex; min-height: 0; border-top: 1px solid var(--line); }
.set-nav.tabs { flex-direction: column; width: 220px; flex: none; padding: 14px 10px; overflow-y: auto; border-right: 1px solid var(--line); gap: 2px; background: var(--sunk); }
.set-nav.tabs button { text-align: left; padding: 9px 12px; font-size: 14px; white-space: normal; }
.set-group { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); padding: 12px 12px 6px; }
.set-group:first-child { padding-top: 2px; }
.settings-modal .modal-body { flex: 1; padding: 18px 26px 22px; align-content: start; }
.set-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.set-title { margin: 0; padding: 18px 26px 0; font-size: 18px; font-weight: 800; flex: none; }
@media (max-width: 760px) {
  .rz { display: none !important; }
  .modal.settings-modal { height: min(92vh, calc(100dvh - 32px - var(--sat) - var(--sab))); }
  .set-split { flex-direction: column; }
  .set-nav.tabs { flex-direction: row; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-x: auto; }
  .set-nav.tabs button { white-space: nowrap; }
  .set-group { display: none; }
  .settings-modal .modal-body { padding: 14px 16px; }
  .set-title { padding: 14px 16px 0; }
}
/* sala estreita (chat ao lado bem largo): botões da sala só com ícone, e quebram linha se precisar */
.stage { container-type: inline-size; container-name: stage; }
@container stage (max-width: 640px) {
  .dock { gap: 4px; padding: 6px; flex-wrap: wrap; max-width: calc(100% - 16px); }
  .dock-btn { min-width: 0; padding: 4px; }
  .dock-label { display: none; }
}
@container stage (max-width: 380px) {
  .dock-ico { width: 36px; height: 36px; border-radius: 12px; }
}

/* ---------- modo cinema (só a transmissão em foco) ---------- */
.focus-main { position: relative; }
.cine-pill { position: absolute; right: 12px; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(var(--ink-rgb), .1); background: rgba(var(--shade-rgb), .78); backdrop-filter: blur(14px); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 800; padding: 6px 12px 6px 8px; border-radius: 999px; cursor: pointer; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s, background .15s, border-color .15s; }
.focus-main:hover .cine-pill, .cine-pill:focus-visible, .stage.cinema.awake .cine-pill { opacity: 1; transform: none; }
.cine-pill:hover { background: rgba(var(--panel-rgb), .92); border-color: rgba(var(--accent-rgb), .55); }
.cine-pill .cine-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--on-accent); }
.cine-pill .cine-ico svg { width: 14px; height: 14px; }
.cine-faces { display: flex; padding-left: 6px; }
.cine-faces .avatar { width: 24px; height: 24px; font-size: 11px; border-radius: 50%; margin-left: -7px; box-shadow: 0 0 0 2px rgba(var(--shade-rgb), .95); }
.cine-more { font-size: 11px; color: var(--muted); margin-left: -2px; }

.cine-talk { display: none; }
.stage.cinema .cine-talk { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; position: absolute; left: 12px; bottom: 52px; z-index: 4; pointer-events: none; }
.cine-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(var(--shade-rgb), .78); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1.5px rgba(var(--mint-rgb), .55), 0 6px 20px rgba(var(--shadow-rgb), calc(.35 * var(--shadow-k))); font-size: 12.5px; font-weight: 800; animation: cineIn .18s ease-out; }
.cine-chip .avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 50%; }
.cine-wave { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.cine-wave b { width: 3px; border-radius: 2px; background: var(--mint); animation: cineWave .9s ease-in-out infinite; }
.cine-wave b:nth-child(2) { animation-delay: .15s; }
.cine-wave b:nth-child(3) { animation-delay: .3s; }
@keyframes cineWave { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@keyframes cineIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.stage.cinema .stage-grid { padding: 10px; grid-template-rows: minmax(0, 1fr); }
.stage.cinema .focus-strip { display: none; }
.stage.cinema .focus-main .tile { border-radius: 14px; }
.stage.cinema .dock { position: absolute; left: 50%; bottom: 18px; margin: 0; z-index: 6; transform: translateX(-50%); transition: opacity .25s, transform .25s; }
.stage.cinema:not(.awake) .dock { opacity: 0; transform: translate(-50%, 14px); pointer-events: none; }
.stage.cinema:not(.awake) { cursor: none; }
.stage.cinema:not(.awake) .tile .label { opacity: .0; transition: opacity .25s; }
@media (hover: none) {
  .cine-pill { opacity: 1; transform: none; }
  .stage.cinema:not(.awake) .dock { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
  .stage.cinema:not(.awake) { cursor: auto; }
}
.stage.cinema .cine-pill { top: 12px; bottom: auto; right: auto; left: 50%; transform: translate(-50%, -4px); }
.stage.cinema.awake .cine-pill, .stage.cinema .focus-main:hover .cine-pill { transform: translate(-50%, 0); }
@media (hover: none) { .stage.cinema .cine-pill { transform: translate(-50%, 0); } }

/* troca de tema suave (só no momento da troca) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .3s, border-color .3s, color .2s, fill .3s !important; }

/* ---------- Aparência (escolha do tema) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-card { align-content: start; text-align: left; border: 1.5px solid var(--line-2); background: var(--elev); border-radius: 16px; padding: 10px 10px 12px; display: grid; gap: 8px; transition: border-color .15s, box-shadow .15s, transform .1s; }
.theme-card:hover { border-color: rgba(var(--accent-rgb), .5); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.theme-name { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.theme-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.theme-card.on .theme-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.theme-mini { height: 92px; border-radius: 11px; display: flex; gap: 5px; padding: 6px; overflow: hidden; }
.theme-mini i { display: flex; flex-direction: column; gap: 5px; border-radius: 7px; padding: 6px; }
.theme-mini .tm-rail { width: 30%; }
.theme-mini .tm-main { flex: 1; }
.theme-mini b { display: block; height: 8px; border-radius: 4px; }
.theme-mini .tm-main .tm-msg { width: 70%; }
.theme-mini .tm-main .tm-msg.me { align-self: flex-end; width: 55%; }
.theme-mini .tm-box { margin-top: auto; height: 12px; width: 100%; }
.theme-mini.dark { background: #100e0b; }
.theme-mini.dark i { background: #17140f; }
.theme-mini.dark .tm-rail b, .theme-mini.dark .tm-msg, .theme-mini.dark .tm-box { background: #28231b; }
.theme-mini.light { background: #f5efe4; }
.theme-mini.light i { background: #fffdf9; }
.theme-mini.light .tm-rail b, .theme-mini.light .tm-msg, .theme-mini.light .tm-box { background: #efe5d3; }
.theme-mini .tm-msg.me { background: linear-gradient(135deg, #e3a947, #cf8a34) !important; }
.theme-mini.system { background: linear-gradient(110deg, #100e0b 50%, #f5efe4 50%); }
.theme-mini.system .tm-rail { background: #17140f; }
.theme-mini.system .tm-rail b { background: #28231b; }
.theme-mini.system .tm-main { background: #fffdf9; }
.theme-mini.system .tm-main .tm-msg, .theme-mini.system .tm-box { background: #efe5d3; }
@media (max-width: 760px) { .theme-grid { grid-template-columns: 1fr; } .theme-mini { height: 70px; } }

/* ---------- janelinha de texto (renomear, marcar momento, etc.) ---------- */
.ask-bg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: var(--backdrop); backdrop-filter: blur(4px); animation: askFade .12s ease-out; }
.ask { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 18px 18px 14px; display: grid; gap: 10px; box-shadow: 0 24px 60px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); animation: askPop .14s ease-out; }
.ask-title { font-size: 17px; font-weight: 800; }
.ask-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: -4px; }
.ask input, .ask textarea { width: 100%; background: var(--elev); border: 1px solid var(--line-2); color: var(--text); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 14.5px; outline: none; resize: vertical; }
.ask input:focus, .ask textarea:focus { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.ask-actions .btn:disabled { opacity: .45; cursor: default; }
@keyframes askFade { from { opacity: 0; } }
@keyframes askPop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------- tempo de sessão das salas ---------- */
.room-timer, .top-timer, .call-time { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.room-timer .clock, .top-timer .clock { display: inline-flex; }
.room-timer svg { width: 11px; height: 11px; fill: currentColor; }
.top-timer svg { width: 12px; height: 12px; fill: currentColor; opacity: .8; }
.room-count.live { color: var(--mint); background: rgba(var(--mint-rgb), .12); }
.top-timer { color: var(--text); font-weight: 700; }
.call-time { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.call-time:not(:empty)::before { content: '⏱ '; font-weight: 400; }
.call-time:not(:empty)::after { content: ' · '; font-weight: 400; color: var(--muted); }

/* ---------- voltar para a sala depois de uma queda ---------- */
.rejoin-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(var(--accent-rgb), .45); box-shadow: 0 18px 50px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); font-weight: 700; animation: askPop .2s ease-out; }
.rejoin-bar .round-btn { width: 30px; height: 30px; font-size: 13px; }

/* ---------- Só câmeras: barrinha de quem está sem câmera ---------- */
.nv-bar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(var(--panel-rgb), .82); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(var(--shadow-rgb), calc(.4 * var(--shadow-k))); overflow-x: auto; scrollbar-width: none; }
.nv-label { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; margin-right: 2px; }
.nv-face { position: relative; flex: none; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; }
.nv-face .avatar { width: 28px; height: 28px; font-size: 12px; border-radius: 50%; }
.nv-face.speaking { box-shadow: 0 0 0 2.5px var(--mint), 0 0 12px rgba(var(--mint-rgb), .6); }
.nv-muted { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--danger); display: grid; place-items: center; }
.nv-muted svg { width: 9px; height: 9px; fill: #fff; }
.nv-show { flex: none; border: 0; background: rgba(var(--ink-rgb), .08); color: var(--text); font: inherit; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.nv-show:hover { background: rgba(var(--accent-rgb), .2); }
.stage.has-nv .stage-grid { padding-top: 60px; }
.stage.cinema .nv-bar { display: none; }
.stage.cinema.has-nv .stage-grid { padding-top: 10px; }
#btn-novideo.active { background: var(--elev-2); color: var(--accent); }
.temp-pass { font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 800; letter-spacing: .06em; text-align: center; padding: 14px; border-radius: 12px; background: var(--elev); border: 1px dashed rgba(var(--accent-rgb), .6); color: var(--accent); user-select: all; }
.member-row .btn { flex: none; }

/* ---------- espaço no servidor ---------- */
.storage-panel, .backup-panel, .push-panel { display: grid; gap: 10px; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-bar { height: 10px; border-radius: 6px; background: rgba(var(--ink-rgb), .08); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--grad); }
.st-bar.warn i { background: var(--danger); }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-row { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--elev); border: 1px solid var(--line); }
.st-row span { font-size: 12px; color: var(--muted); font-weight: 700; }
.st-row b { font-size: 17px; }
.st-row small { font-size: 11.5px; color: var(--faint); }
.file-card.removed { opacity: .65; border-style: dashed; }
@media (max-width: 760px) { .st-grid { grid-template-columns: 1fr; } }

/* ---------- Agenda da mesa ---------- */
.ag-rail .nm { display: flex; flex-direction: column; line-height: 1.2; }
.ag-rail-sub { font-size: 11px; color: var(--faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-rail.soon .ag-rail-sub { color: var(--accent); }
.ag-rail.live .ag-rail-sub { color: var(--mint); }
.ag-rail.live svg { fill: var(--mint); }
.modal.agenda-modal { max-width: 720px; }
.agenda { display: grid; gap: 12px; align-content: start; }
.ag-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.ag-top .btn { flex: none; }
.ag-empty { padding: 30px 10px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: 16px; }
.ag-card { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: var(--elev); border: 1px solid var(--line); }
.ag-card.live { border-color: rgba(var(--mint-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .12); }
.ag-date { flex: none; width: 58px; height: 66px; border-radius: 14px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; align-content: center; gap: 0; text-transform: uppercase; }
.ag-date .wd, .ag-date .mo { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; opacity: .85; }
.ag-date b { font-size: 24px; line-height: 1; }
.ag-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ag-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-tag { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(var(--accent-rgb), .15); color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.ag-meta { font-size: 13px; color: var(--muted); }
.ag-note { font-size: 13px; white-space: pre-wrap; padding: 8px 10px; border-radius: 10px; background: rgba(var(--ink-rgb), .04); }
.ag-rsvp { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ag-btn { border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ag-btn .n { font-size: 11.5px; color: var(--muted); }
.ag-btn:hover { border-color: rgba(var(--accent-rgb), .5); }
.ag-btn.yes.on { background: rgba(var(--mint-rgb), .18); border-color: var(--mint); color: var(--mint); }
.ag-btn.maybe.on { background: rgba(var(--accent-rgb), .18); border-color: var(--accent); color: var(--accent); }
.ag-btn.no.on { background: rgba(242, 96, 124, .14); border-color: var(--danger); color: var(--danger); }
.ag-btn.on .n { color: inherit; }
.ag-who { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ag-who > span { display: inline-flex; align-items: center; gap: 6px; }
.ag-who small { color: var(--faint); font-size: 11.5px; font-weight: 700; }
.ag-faces { display: inline-flex; padding-left: 6px; }
.ag-faces .avatar { width: 22px; height: 22px; font-size: 10px; border-radius: 50%; margin-left: -6px; box-shadow: 0 0 0 2px var(--elev); }
.ag-more { font-size: 11px; color: var(--muted); margin-left: 4px; }
.ag-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-actions:empty { display: none; }
.danger-text { color: var(--danger) !important; }
.ag-form { display: grid; gap: 12px; }
.ag-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ag-form label.check { display: flex; gap: 10px; align-items: flex-start; }
.ag-form label.check small { display: block; color: var(--muted); font-weight: 400; }
.ag-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ev-bar { bottom: 84px; }
@media (max-width: 760px) { .ag-row { grid-template-columns: 1fr; } .ag-top { flex-direction: column; align-items: stretch; } .ag-card { gap: 10px; padding: 12px; } }

/* ---------- celular: área segura (barra de status em cima, botões/gestos do Android embaixo, notch) ----------
   O app Android (Capacitor) desenha a página até a borda da tela; o WebView informa o tamanho das barras em
   env(safe-area-inset-*) e o Capacitor também em --safe-area-inset-*. No PC tudo isso vale 0. */
:root {
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sar: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
}
.app { padding: calc(var(--gap) + var(--sat)) calc(var(--gap) + var(--sar)) calc(var(--gap) + var(--sab)) calc(var(--gap) + var(--sal)); }
.auth, .modal-bg, .ask-bg { padding: calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); }
.toast { bottom: calc(26px + var(--sab)); }
.rejoin-bar { bottom: calc(24px + var(--sab)); }
.ev-bar { bottom: calc(84px + var(--sab)); }
.user-card { max-height: calc(100vh - 16px - var(--sat) - var(--sab)); }
.lightbox { padding: var(--sat) var(--sar) var(--sab) var(--sal); }
@media (max-width: 760px) {
  /* no celular a faixa da barra de status fica da cor do topo do app */
  .app { background: var(--panel); }
  .rail { top: calc(8px + var(--sat)); bottom: calc(8px + var(--sab)); left: calc(8px + var(--sal)); }
  .presence.force { top: calc(70px + var(--sat)); bottom: calc(8px + var(--sab)); right: calc(8px + var(--sar)); }
}
.modal { max-height: min(90vh, calc(100dvh - 32px - var(--sat) - var(--sab))); }

/* agenda: tipo do evento (RPG, gameplay, resenha, filme, outro) */
.ag-kind { font-size: 18px; line-height: 1; }
.ag-field { display: grid; gap: 6px; }
.ag-field-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.ag-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-kind-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), .12);
  background: rgba(var(--ink-rgb), .04); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.ag-kind-btn:hover { background: rgba(var(--ink-rgb), .08); }
.ag-kind-btn.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .16); color: var(--accent); }
.ag-kind-btn span { font-size: 15px; }

/* Segurança: força da senha e aparelhos conectados */
.pass-meter { height: 4px; border-radius: 4px; background: rgba(var(--ink-rgb), .08); overflow: hidden; margin-top: 6px; }
.pass-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pass-meter[data-s="1"] i { width: 25%; background: var(--danger); }
.pass-meter[data-s="2"] i { width: 50%; background: var(--warn); }
.pass-meter[data-s="3"] i { width: 75%; background: var(--accent); }
.pass-meter[data-s="4"] i { width: 100%; background: var(--mint); }
.sess-list { display: grid; gap: 8px; }
.sess { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--ink-rgb), .04); border: 1px solid rgba(var(--ink-rgb), .06); }
.sess.current { border-color: rgba(var(--accent-rgb), .45); }
.sess-ico { font-size: 22px; }
.sess-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sess-info small { color: var(--muted); }
.sess-list > .btn.danger { justify-self: start; margin-top: 4px; }

/* mensagens fixadas */
#btn-pins { position: relative; }
.pin-count { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.msg.pinned .bubble { box-shadow: 0 0 0 1.5px rgba(var(--accent-rgb), .55); }
.pin-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--accent); }
.pin-tag span { display: inline-flex; }
.pin-tag svg, .msg .actions button.on svg { width: 13px; height: 13px; fill: currentColor; }
.msg .actions button.on { color: var(--accent); }
.pins-modal { width: min(620px, 100%); }
.pins-list { display: grid; gap: 10px; }
.pin-item { padding: 12px 14px; border-radius: 14px; background: rgba(var(--ink-rgb), .04); border: 1px solid rgba(var(--ink-rgb), .07); display: grid; gap: 8px; }
.pin-head { display: flex; align-items: center; gap: 10px; }
.pin-head .avatar { width: 32px; height: 32px; font-size: 13px; }
.pin-who { display: grid; }
.pin-who small, .pin-by { color: var(--muted); font-size: 12px; }
.pin-body .text { white-space: pre-wrap; word-break: break-word; }
.pins-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px 10px; }
.pins-big svg { width: 34px; height: 34px; fill: rgba(var(--accent-rgb), .7); }
.btn.small { padding: 5px 10px; font-size: 12px; }

/* transmitir tela: escolha de qualidade */
.screen-picker { width: min(560px, 100%); }
.sp-body { display: grid; gap: 8px; }
.sp-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.sp-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp-preset { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid rgba(var(--ink-rgb), .1);
  background: rgba(var(--ink-rgb), .03); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.sp-preset:hover { background: rgba(var(--ink-rgb), .06); transform: translateY(-1px); }
.sp-preset.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.sp-preset .sp-ico { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.sp-preset b { font-size: 13.5px; }
.sp-preset small { color: var(--muted); font-size: 11.5px; }
.sp-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(var(--ink-rgb), .05); }
.sp-seg button { flex: 1; display: grid; justify-items: center; align-content: center; gap: 1px; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .15s, color .15s; }
.sp-seg button small { font-size: 10.5px; font-weight: 600; opacity: .8; }
.sp-seg button:hover { color: var(--text); }
.sp-seg button.on { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm, none); }
.sp-est { margin-top: 4px; }
.sp-est.warn { color: var(--warn); }
@media (max-width: 520px) { .sp-presets { grid-template-columns: 1fr; } .sp-preset { grid-template-columns: auto 1fr; column-gap: 10px; } .sp-preset .sp-ico { grid-row: span 2; } }
.sp-audio { align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(var(--ink-rgb), .04); }
.sp-audio > div { display: grid; gap: 2px; }
.sp-audio small { color: var(--muted); font-size: 12px; line-height: 1.4; }
/* notificações por aparelho / app Android: segurar para falar e aviso de APK novo */
.notif-here { display: grid; gap: 10px; }
.notif-off { display: grid; gap: 8px; justify-items: start; }
.ptt-chip.touch { position: fixed; z-index: 30; pointer-events: auto; cursor: pointer; font-size: 15px; padding: 14px 26px; border-radius: 999px; bottom: calc(104px + var(--sab));
  background: rgba(var(--accent-rgb), .16); color: var(--text); border: 1.5px solid rgba(var(--accent-rgb), .55);
  user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none; }
.ptt-chip.touch.live { background: var(--mint); color: var(--on-accent); border-color: transparent; transform: translateX(-50%) scale(1.04); }
.apk-bar { top: calc(14px + var(--sat)); bottom: auto; width: max-content; max-width: calc(100vw - 24px); }
@media (max-width: 600px) { .apk-bar { width: calc(100vw - 24px); } .apk-bar span { flex: 1; } }
.apk-bar span { font-size: 13px; }
.check:has(> div > small) { align-items: flex-start; }
.check > div > small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }

/* lista de membros escondida pelo botão (PC grande) */
@media (min-width: 1181px) { .presence.collapsed, .rz.collapsed { display: none; } }
#btn-members.active { background: var(--elev-2); color: var(--accent); }

/* botões do quadro (tela cheia, volume da tela, menu): bem visíveis sobre qualquer imagem */
.tile .tools { left: 12px; top: 12px; gap: 8px; }
.tile.screen .tools { opacity: .92; }
.tile:hover .tools, .tile:fullscreen .tools, .tile:focus-within .tools { opacity: 1; }
.tile .tools button, .tile .tools .tile-vol { height: 36px; border-radius: 11px; background: rgba(12, 10, 8, .78); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.tile .tools button { padding: 0 11px; font-size: 12.5px; }
.tile .tools .tile-vol button { border: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
.tile .tools button:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tile .tools svg { width: 18px; height: 18px; }
.tile .tools .fs-ico { display: inline-flex; }
.tile .tools .tile-vol input { accent-color: var(--accent); }
.tile:fullscreen { border-radius: 0; background: #000; }
.tile:fullscreen video { object-fit: contain; width: 100%; height: 100%; }
@media (hover: none) { .tile .tools { opacity: 1; } }

/* a sua própria tela compartilhada: cartão "Você está transmitindo" no lugar da imagem (evita o espelho infinito) */
.tile .own-card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .16), transparent 65%), #14110d; color: #f4ecdf; }
.tile .own-card b { font-size: 15px; }
.tile .own-card small { color: rgba(244, 236, 223, .7); font-size: 12px; }
.own-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #fff;
  background: #e5484d; padding: 4px 9px; border-radius: 999px; }
.own-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: ownBlink 1.4s infinite; }
@keyframes ownBlink { 50% { opacity: .25; } }
.own-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.own-actions .btn { padding: 6px 12px; font-size: 12.5px; }
.tile.own-screen { cursor: default; }

/* salas e chats privados */
.priv-ico { display: inline-flex; margin-left: 6px; vertical-align: -2px; color: var(--accent); }
.priv-ico svg, .priv-chat svg { width: 13px; height: 13px; fill: currentColor; }
.chat-item .priv-chat { color: var(--accent); }
.priv-box { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(var(--ink-rgb), .04); border: 1px solid rgba(var(--ink-rgb), .07); }
.priv-who { display: grid; gap: 8px; }
.priv-label { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.priv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; }
.priv-opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: rgba(var(--ink-rgb), .04); cursor: pointer; font-size: 13px; font-weight: 600; }
.priv-opt .avatar { width: 22px; height: 22px; font-size: 10px; border-radius: 7px; }
.priv-opt small { margin-left: auto; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.priv-opt.always { opacity: .75; cursor: default; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* quadro aberto em outra janela (popout) */
.tile .pop-card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: #f4ecdf;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 20px), #14110d; }
.tile .pop-card > span svg { width: 26px; height: 26px; fill: rgba(var(--accent-rgb), .9); }
.tile.popped .tools .pop-btn, .tile.popped .tools .fs-btn { display: none; }
.priv-opt small { white-space: nowrap; }

/* grade encaixada (fitGrid em app.js): colunas e tamanho calculados para caber sem sobrepor */
.stage-grid.fit:not(.has-focus) { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; }
.stage-grid.fit:not(.has-focus) > .tile { width: var(--tile-w); height: var(--tile-h); flex: none; aspect-ratio: auto; }

/* a sala de voz inteira em outra janela (popout da chamada, popOutCall em app.js) */
body.call-pop { display: flex; flex-direction: column; background: var(--stage-bg, #0f0d0a); }
body.call-pop::before { display: none; }
body.call-pop #stage-view, body.call-pop #stage-view.hidden { display: flex !important; flex: 1; min-height: 0; }
.cp-head { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 10px 0 14px; flex: none; position: relative; z-index: 5;
  background: var(--stage-bg); color: var(--text); border-bottom: 1px solid rgba(var(--ink-rgb), .08); }
.cp-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .16); color: var(--accent); flex: none; }
.cp-ico svg { width: 17px; height: 17px; fill: currentColor; }
.cp-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.cp-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.cp-sub .top-timer { display: inline-flex; align-items: center; gap: 3px; }
.cp-sub .clock svg { width: 12px; height: 12px; fill: currentColor; display: block; }
.cp-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(var(--ink-rgb), .12);
  background: rgba(var(--ink-rgb), .05); color: var(--text); font-weight: 700; font-size: 13px; transition: background .15s, border-color .15s; }
.cp-btn:hover { background: rgba(var(--ink-rgb), .1); border-color: rgba(var(--ink-rgb), .2); }
.cp-btn svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.cp-btn.cp-novideo { width: 34px; padding: 0; justify-content: center; }
.cp-btn.active { background: rgba(var(--accent-rgb), .2); border-color: rgba(var(--accent-rgb), .5); color: var(--accent); }
.cp-back .cp-back-ico { display: inline-flex; }
@media (max-width: 560px) { .cp-sub { display: none; } .cp-back span:last-child { display: none; } .cp-back { width: 34px; padding: 0; justify-content: center; } }
.call-away { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; min-width: 0; }
.call-away h2 { margin: 0; font-size: 22px; font-weight: 800; }
.call-away p { margin: 0; max-width: 440px; }
.call-away .ca-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }

/* avisos de mensagem dentro do app (inAppNotify): cartões no canto de cima, à direita */
.notif-stack { position: fixed; z-index: 90; top: calc(76px + var(--sat, 0px)); right: calc(16px + var(--sar, 0px)); width: min(360px, calc(100vw - 24px)); display: grid; gap: 8px; pointer-events: none; }
.notif-card { pointer-events: auto; display: flex; gap: 11px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 16px; cursor: pointer;
  background: var(--panel); border: 1px solid rgba(var(--accent-rgb), .45); border-left: 4px solid var(--accent);
  box-shadow: 0 18px 50px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k))), 0 0 0 1px rgba(var(--ink-rgb), .04); animation: nc-in .32s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .2s, transform .2s; }
.notif-card:hover { border-color: var(--accent); transform: translateX(-2px); }
.notif-card.dm { border-left-color: var(--mint); border-color: rgba(var(--mint-rgb, 70, 215, 160), .5); }
.notif-card.mention { border-left-color: var(--danger); border-color: rgba(255, 85, 119, .5); }
.notif-card.out { opacity: 0; transform: translateX(30px); }
@keyframes nc-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
.notif-card .nc-av { width: 40px; height: 40px; flex: none; font-size: 16px; }
.nc-body { flex: 1; min-width: 0; }
.nc-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.nc-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.nc-where { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.notif-card.dm .nc-where { color: var(--mint); font-weight: 700; }
.notif-card.mention .nc-where { color: var(--danger); font-weight: 700; }
.nc-n { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 9px; background: rgba(var(--accent-rgb), .18); color: var(--accent); flex: none; }
.nc-text { font-size: 13.5px; margin-top: 3px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.nc-x { border: 0; background: transparent; color: var(--faint); font-size: 20px; line-height: 1; width: 26px; height: 26px; border-radius: 8px; flex: none; margin: -4px -4px 0 0; }
.nc-x:hover { background: var(--hover); color: var(--text); }
@media (max-width: 760px) { .notif-stack { top: calc(64px + var(--sat, 0px)); right: calc(12px + var(--sar, 0px)); left: calc(12px + var(--sal, 0px)); width: auto; } }
#btn-menu { position: relative; }
#btn-menu.has-unread::after { content: ''; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--panel); }
.notif-vol { display: grid; gap: 6px; padding: 4px 0; }
.notif-vol small { display: block; color: var(--muted); font-size: 12px; }
.notif-vol .nv-row { display: flex; align-items: center; gap: 10px; }
.notif-vol input[type=range] { flex: 1; max-width: 320px; accent-color: var(--accent); }
.notif-vol .nv-val { width: 44px; font-variant-numeric: tabular-nums; }
/* botões de salvar que acompanham a rolagem (cargos, campanha do Escriba) */
.sticky-actions { position: sticky; bottom: -22px; z-index: 4; margin: 4px -4px -22px; padding: 12px 4px 16px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -12px 18px -8px rgba(var(--shadow-rgb), calc(.35 * var(--shadow-k))); }
.modal:not(.settings-modal) .sticky-actions { bottom: -18px; margin-bottom: -18px; }
@media (max-width: 760px) { .settings-modal .sticky-actions { bottom: -14px; margin-bottom: -14px; } }

/* responder mensagem */
.reply-ref { display: flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 4px 3px; padding: 2px 8px 2px 4px; border: 0; background: transparent; color: var(--muted); font-size: 12px; border-radius: 8px; cursor: pointer; min-width: 0; }
.reply-ref:hover { background: var(--hover); color: var(--text); }
.reply-ref .rr-ico svg { width: 13px; height: 13px; fill: currentColor; display: block; transform: scaleX(-1); opacity: .8; }
.reply-ref b { font-size: 12px; white-space: nowrap; }
.reply-ref .rr-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg.mine .reply-ref { flex-direction: row-reverse; }
.msg.flash .bubble, .msg.flash .attachments .media { animation: msg-flash 1.6s ease; }
@keyframes msg-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.reply-bar { display: flex; align-items: center; gap: 6px; margin: 0 6px 6px; padding: 7px 8px 7px 12px; border-radius: 12px; background: var(--elev); border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); min-width: 0; }
.reply-bar b { color: var(--text); white-space: nowrap; }
.reply-bar .rb-ico svg { width: 15px; height: 15px; fill: var(--accent); display: block; }
.reply-bar .rb-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.reply-bar .rb-x { border: 0; background: transparent; color: var(--faint); width: 26px; height: 26px; border-radius: 8px; flex: none; }
.reply-bar .rb-x:hover { background: var(--hover); color: var(--text); }
/* reações */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 2px 0; }
.msg.mine .reactions { justify-content: flex-end; }
.rx { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--elev); color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .12s, border-color .12s, transform .12s; }
.rx:hover { border-color: rgba(var(--accent-rgb), .5); transform: translateY(-1px); }
.rx.mine { background: rgba(var(--accent-rgb), .16); border-color: rgba(var(--accent-rgb), .6); color: var(--text); }
.rx-e { font-size: 15px; line-height: 1; }
.rx-add { opacity: 0; padding: 0 6px; }
.rx-add svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.msg:hover .rx-add, .rx-add:focus { opacity: 1; }
.react-pick { position: fixed; z-index: 120; display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k))); animation: nc-in .16s ease; }
.react-pick button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 9px; font-size: 19px; display: grid; place-items: center; cursor: pointer; transition: transform .1s, background .1s; }
.react-pick button:hover { background: var(--hover); transform: scale(1.18); }
@media (max-width: 760px) { .react-pick { grid-template-columns: repeat(6, 38px); } .react-pick button { width: 38px; height: 38px; } }
/* "Novas mensagens" */
.new-sep { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--danger); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.new-sep::before, .new-sep::after { content: ''; flex: 1; height: 1px; background: rgba(255, 85, 119, .55); }
/* Ctrl+K */
.modal.qs-modal { max-width: 560px; align-self: flex-start; margin-top: 12vh; }
.qs-body { padding: 14px; gap: 8px; }
.qs-input { width: 100%; font-size: 17px; padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg); outline: none; }
.qs-input:focus { border-color: var(--accent); }
.qs-list { display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; }
.qs-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0; background: transparent; border-radius: 11px; text-align: left; color: var(--text); cursor: pointer; }
.qs-item.sel { background: rgba(var(--accent-rgb), .14); }
.qs-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--elev-2); display: grid; place-items: center; color: var(--accent); flex: none; }
.qs-ico svg { width: 17px; height: 17px; fill: currentColor; }
.qs-item .qs-av { width: 32px; height: 32px; flex: none; }
.qs-txt { flex: 1; min-width: 0; }
.qs-txt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-txt small { color: var(--muted); font-size: 12px; }
.qs-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.qs-empty { color: var(--muted); padding: 16px; text-align: center; }
.qs-hint { color: var(--faint); font-size: 11.5px; text-align: center; }
/* celular: os botões da mensagem aparecem ao tocar nela (antes ficavam sempre à mostra e poluíam a conversa) */
@media (max-width: 760px) {
  .msg .actions { display: none; }
  .msg.acts-open .actions { display: flex; opacity: 1; }
  .msg.acts-open .bubble { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .45); }
  .msg .actions button { width: 34px; height: 34px; }
  .rx-add { opacity: 1; }
}
/* auditoria: aviso (toast) não fica espremido em tela estreita; menu lateral do celular mais largo (não corta o tempo da sala) */
.toast { width: max-content; max-width: min(560px, calc(100vw - 32px)); text-align: center; }
@media (max-width: 760px) { .rail { width: min(330px, calc(100vw - 48px)); } }
/* na sala de voz o aviso sobe para não cobrir os botões da chamada */
body:has(#stage-view:not(.hidden)) .toast { bottom: calc(128px + var(--sab, 0px)); }
/* cartão da pessoa: sem barra de rolagem aparecendo (ela saía pela borda arredondada); continua rolando com a roda/dedo */
.user-card { scrollbar-width: none; overscroll-behavior: contain; }
.user-card::-webkit-scrollbar { display: none; }

/* Bardo = só som: nenhuma moldura/miniatura. Os players oficiais (YouTube, Spotify, SoundCloud, áudio) ficam vivos
   num cantinho de 2 px invisível dentro da caixinha — nunca sair do DOM (o iframe recarregaria e a música pararia) */
.bd-stage { position: absolute !important; left: 0; top: 0; width: 2px !important; height: 2px !important; overflow: hidden; opacity: 0; pointer-events: none; border-radius: 0; background: transparent; }
.bd-player { width: 300px; height: 220px; }
.bd-main { padding: 2px 10px 4px; }
/* fechada no X: a caixinha some, mas continua no lugar (2 px invisíveis) para o player seguir tocando */
.bardo.closed { position: fixed !important; left: 0; bottom: 0; width: 2px !important; height: 2px !important; max-height: none; overflow: hidden; opacity: 0; pointer-events: none; border: 0; margin: 0; padding: 0; box-shadow: none !important; }
@media (min-width: 1181px) { .presence.collapsed.has-bardo.bardo-closed { position: fixed; width: 0; height: 0; overflow: visible; } }
@media (max-width: 1180px) { .presence.has-bardo.bardo-closed:not(.force) { width: 0; height: 0; overflow: visible; box-shadow: none; } }
.bd-player .yt-audio-only { position: absolute; left: 0; top: 0; width: 220px; height: 220px; opacity: 0; pointer-events: none; overflow: hidden; }
.bd-player .yt-audio-only iframe, .bd-player .yt-audio-only > div { width: 220px !important; height: 220px !important; }

/* status da pessoa (bolinha) */
.dot-on.p-idle { background: #f0b232; }
.dot-on.p-idle::after { content: ''; position: absolute; left: -2px; top: -2px; width: 55%; height: 55%; border-radius: 50%; background: var(--panel); }
.dot-on.p-dnd { background: #f23f43; }
.dot-on.p-dnd::after { content: ''; position: absolute; left: 20%; right: 20%; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--panel); }
.dot-on.p-invisible, .dot-on.p-offline { background: var(--panel); box-shadow: inset 0 0 0 2.5px var(--faint); }
.dot-on { overflow: hidden; }
.me-avatar { position: relative; cursor: pointer; }
.me-avatar .me-dot { pointer-events: none; }
.member .st.custom { color: var(--text); opacity: .8; }
.uc-status { font-size: 13px; color: var(--text); padding: 6px 10px; border-radius: 10px; background: rgba(var(--ink-rgb), .05); }
.uc-status-btn { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.uc-status-btn .dot-on, .st-opt .dot-on { position: relative; right: auto; bottom: auto; flex: none; border-color: var(--elev); }
.st-opts { display: grid; gap: 4px; margin-bottom: 10px; }
.st-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.st-opt:hover { background: var(--hover); }
.st-opt.sel { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .45); }
.st-opt b { display: block; font-size: 14px; }
.st-opt small { color: var(--muted); font-size: 12px; }
/* busca nas mensagens */
.modal.sr-modal { max-width: 680px; }
.sr-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sr-filters select { flex: 1; min-width: 140px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.sr-list { display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; align-content: start; }
.sr-count { font-size: 11.5px; color: var(--faint); padding: 4px 6px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.sr-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 0; background: transparent; border-radius: 12px; text-align: left; color: var(--text); cursor: pointer; }
.sr-item:hover { background: var(--hover); }
.sr-item .sr-av { width: 34px; height: 34px; flex: none; }
.sr-body { flex: 1; min-width: 0; }
.sr-top { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.sr-top b { font-size: 13.5px; }
.sr-text { font-size: 13.5px; line-height: 1.4; margin-top: 2px; word-break: break-word; }
.sr-text mark, .sr-files mark { background: rgba(var(--accent-rgb), .35); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-files { font-size: 12px; color: var(--muted); margin-top: 3px; }
.qs-search .qs-ico { color: var(--muted); }
/* efeitos sonoros (no Bardo) */
#bd-sfx.on { background: rgba(var(--accent-rgb), .18); color: var(--accent); }
.bardo.sfx-open .bd-body { display: none !important; }
.bardo.sfx-open:not(.has-cur) .bd-main, .bardo.sfx-open:not(.has-cur) .bd-progress, .bardo.sfx-open:not(.has-cur) .bd-ctrls { display: none; }
.bd-sfx-box { border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 8px; min-height: 0; overflow: hidden; }
.bd-sfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 230px; overflow-y: auto; }
.sfx-pad { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--elev); color: var(--text); cursor: pointer; transition: transform .1s, border-color .12s, background .12s; min-width: 0; }
.sfx-pad:hover { border-color: rgba(var(--accent-rgb), .55); transform: translateY(-1px); }
.sfx-pad:active { transform: scale(.95); }
.sfx-pad.hit { animation: sfx-hit .6s ease; }
@keyframes sfx-hit { 0% { background: rgba(var(--accent-rgb), .45); } 100% { background: var(--elev); } }
.sfx-e { font-size: 22px; line-height: 1; }
.sfx-n { font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfx-add { border-style: dashed; color: var(--muted); }
.sfx-add .sfx-e { font-size: 20px; font-weight: 800; }
.bd-sfx-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.bd-sfx-foot input { flex: 1; accent-color: var(--accent); }
.bd-q-sfx { opacity: .7; }
.sfx-quick { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 6px; }
.sfx-quick button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--elev); font-size: 18px; cursor: pointer; }
.sfx-quick button:hover { border-color: var(--accent); }
.sfx-emoji-in { width: 80px; font-size: 20px; text-align: center; }
.sfx-chip { position: absolute; z-index: 8; left: 50%; top: 14px; transform: translateX(-50%); padding: 7px 14px; border-radius: 20px; background: rgba(12, 10, 8, .85); border: 1px solid rgba(var(--accent-rgb), .5); color: #f4ecdf; font-weight: 800; font-size: 14px; pointer-events: none; animation: sfx-chip 2.6s ease forwards; }
.sfx-chip small { font-weight: 600; opacity: .7; }
@keyframes sfx-chip { 0% { opacity: 0; transform: translate(-50%, -8px) scale(.9); } 10%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; } }
/* mensagem de voz */
.composer.recording #input, .composer.recording #btn-attach { display: none; }
.composer.recording #btn-voice { color: var(--danger); }
.composer.recording .send-btn { opacity: 1 !important; }
.rec-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 4px; height: 40px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; animation: rec-blink 1s infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; color: var(--danger); flex: none; }
.rec-wave { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 2px; overflow: hidden; justify-content: flex-end; }
.rec-wave i, .vm-wave i { display: block; width: 3px; flex: none; border-radius: 2px; background: var(--danger); }
.rec-hint { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
@media (max-width: 760px) { .rec-hint { display: none; } }
.voice-msg { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 18px; background: var(--elev); border: 1px solid var(--line-2); width: min(320px, 100%); }
.msg.mine .voice-msg { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .35); }
.vm-play { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; }
.vm-play svg { width: 18px; height: 18px; fill: currentColor; }
.vm-wave { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.vm-wave i { background: rgba(var(--ink-rgb), .3); flex: 1; max-width: 4px; }
.vm-wave i.on { background: var(--accent); }
.vm-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; min-width: 34px; text-align: right; }

/* tópicos */
.thread-item { padding-left: 22px; font-size: 13px; position: relative; }
.thread-item .th-branch { position: absolute; left: 16px; top: -6px; width: 9px; height: 20px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); border-bottom-left-radius: 8px; }
.thread-item > span:nth-child(2) svg { width: 15px; height: 15px; }
.thread-chip { display: inline-flex; align-items: center; gap: 7px; margin: 5px 2px 0; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--elev); color: var(--muted); font-size: 12.5px; cursor: pointer; width: max-content; max-width: 100%; }
.thread-chip:hover { border-color: rgba(var(--accent-rgb), .5); color: var(--text); }
.thread-chip svg { width: 16px; height: 16px; fill: var(--accent); flex: none; }
.thread-chip b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.msg.mine .thread-chip { align-self: flex-end; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.th-starter { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 10px auto 0; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--elev); color: var(--text); max-width: 520px; cursor: pointer; }
.th-starter:hover { border-color: rgba(var(--accent-rgb), .5); }
.th-starter .th-av { width: 32px; height: 32px; flex: none; }
.th-ex { font-size: 13.5px; opacity: .9; margin-top: 2px; }
/* emojis da galera */
.cemoji { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin: 0 1px; }
.text.jumbo .cemoji { width: 64px; height: 64px; vertical-align: middle; }
.msg .bubble:has(.text.jumbo) { background: transparent !important; box-shadow: none !important; padding-left: 0; padding-right: 0; }
.rx-img { width: 18px; height: 18px; object-fit: contain; }
.react-pick .rp-custom img { width: 24px; height: 24px; object-fit: contain; }
.emoji-pick { display: block; width: 330px; max-height: 360px; overflow-y: auto; padding: 8px 10px; }
.ep-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 2px 6px; }
.ep-title small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 8px; }
.ep-grid button { height: 36px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; display: grid; place-items: center; font-size: 20px; transition: transform .1s, background .1s; }
.ep-grid button:hover { background: var(--hover); transform: scale(1.15); }
.ep-grid .ep-c img { width: 28px; height: 28px; object-fit: contain; }
.ep-add { border: 1px dashed var(--line-2) !important; color: var(--muted); font-weight: 800; }
.ec-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ec-canvas { width: 200px; height: 200px; border-radius: 18px; background: repeating-conic-gradient(rgba(var(--ink-rgb), .08) 0 25%, transparent 0 50%) 0 0 / 20px 20px; border: 1px solid var(--line-2); cursor: grab; touch-action: none; }
.ec-side { flex: 1; min-width: 180px; display: grid; gap: 10px; align-content: start; }
.ec-side input[type=range] { width: 100%; accent-color: var(--accent); }
.tile .snap-btn { font-size: 15px; }
.tile:not(:has(video)) .snap-btn { display: none; }
