/* =========================================================
   Kenfeh — tema escuro "glass" azul + rosa
   ========================================================= */
:root {
  --bg: #080a12;
  --bg-2: #0e1120;
  --panel: rgba(16, 20, 36, 0.74);
  --panel-solid: #121628;
  --panel-2: rgba(28, 34, 58, 0.6);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #eef1fb;
  --text-2: #a9b0c8;
  --text-3: #707893;
  --pink: #ff4fa3;
  --violet: #7b5cff;
  --blue: #3d8bff;
  --cyan: #38d6ff;
  --green: #3ddc97;
  --red: #ff4d6d;
  --yellow: #ffcc4d;
  --grad: linear-gradient(135deg, #2f7bff 0%, #7b5cff 52%, #ff4fa3 100%);
  --glow: 0 8px 26px -8px rgba(61, 139, 255, .65), 0 6px 22px -10px rgba(255, 79, 163, .55);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--line);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.ic { display: inline-grid; place-items: center; line-height: 0; }
.ic-space { width: 16px; display: inline-block; }
::selection { background: rgba(61,139,255,0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.2); }

/* ---------- Fundo animado ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: 0.22; animation: float 22s ease-in-out infinite alternate; }
.bg-blobs span:nth-child(1) { background: #2f7bff; top: -20vmax; left: -10vmax; }
.bg-blobs span:nth-child(2) { background: #ff4fa3; bottom: -25vmax; right: -15vmax; animation-delay: -7s; }
.bg-blobs span:nth-child(3) { background: #38d6ff; top: 30%; left: 40%; width: 35vmax; height: 35vmax; opacity: 0.12; animation-delay: -14s; }
@keyframes float { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

.glass {
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: var(--shadow);
}

/* ---------- Botões / campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; transition: transform .15s, background .2s, box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 10px 30px -6px rgba(61,139,255,.8); }
.btn-ghost { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-danger { background: rgba(255, 77, 109, .15); color: #ff8aa0; box-shadow: inset 0 0 0 1px rgba(255, 77, 109, .35); }
.btn-danger:hover { background: rgba(255, 77, 109, .25); }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.off { color: var(--red); }
.icon-btn.danger:hover { color: var(--red); background: rgba(255, 77, 109, .12); }

.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(61,139,255,.18); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--panel-solid); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-actions { display: flex; gap: 8px; align-items: center; margin: 10px 0 16px; flex-wrap: wrap; }
.row-actions.end { justify-content: flex-end; }
.chip { padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.55); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; }

/* switch */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch-row input { display: none; }
.switch-row b { display: block; font-weight: 600; }
.switch-row small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.switch { flex: none; width: 42px; height: 24px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch-row input:checked + .switch { background: var(--grad); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row.compact { padding: 4px 0; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(61,139,255,.35); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }

/* segmented */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); margin: 6px 0 12px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button.active { background: rgba(255,255,255,.1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.big button { padding: 11px; font-size: 14px; }

/* =========================================================
   LOGIN
   ========================================================= */
.auth { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); padding: 36px 32px 30px; border-radius: 28px; animation: rise .6s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.brand { text-align: center; margin-bottom: 26px; }
.brand-logo { width: 68px; height: 68px; display: inline-block; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 10px 26px rgba(61,139,255,.55)) drop-shadow(0 6px 20px rgba(255,79,163,.35)); }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
.brand h1 { margin: 6px 0 6px; font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.brand h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 0; color: var(--text-2); }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.3); margin-bottom: 22px; }
.auth-tabs button { position: relative; z-index: 1; padding: 10px; font-weight: 600; color: var(--text-2); transition: color .2s; }
.auth-tabs button.active { color: #fff; }
.auth-tab-indicator { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); border-radius: 11px; background: var(--grad); transition: transform .35s cubic-bezier(.3,1.3,.5,1); }
.auth-tabs[data-mode=register] .auth-tab-indicator { transform: translateX(100%); }
#auth-form .register-only { display: none; }
#auth-form.register .register-only { display: flex; }
#auth-form .btn { width: 100%; margin-top: 6px; }
.auth-error { color: #ff8aa0; min-height: 20px; margin: 0 0 8px; font-size: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
.app { position: relative; z-index: 1; display: flex; height: 100%; height: 100dvh; }

.rail { width: 74px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; background: rgba(5, 7, 13, .6); border-right: 1px solid var(--line); }
.rail-brand { width: 50px; height: 50px; border-radius: 16px; display: block; box-shadow: var(--glow); }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line-2); margin: 4px 0; }
.rail-groups { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; width: 100%; align-items: center; padding: 2px 0; scrollbar-width: none; }
.rail-btn { position: relative; width: 50px; height: 50px; border-radius: 25px; background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 24px; transition: border-radius .25s, background .2s, transform .15s; flex: none; }
.rail-btn:hover { border-radius: 16px; background: rgba(255,255,255,.12); }
.rail-btn.active { border-radius: 16px; background: rgba(61,139,255,.22); box-shadow: inset 0 0 0 2px rgba(61,139,255,.6); }
.rail-btn::before { content: ''; position: absolute; left: -12px; width: 5px; height: 0; border-radius: 0 4px 4px 0; background: #fff; transition: height .2s; }
.rail-btn.unread::before { height: 10px; }
.rail-btn.active::before { height: 36px; }
.rail-btn:hover::before { height: 22px; }
.rail-call { position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #052; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.rail-add { color: var(--green); font-size: 28px; font-weight: 300; }
.rail-add:hover { background: var(--green); color: #052; }

.sidebar { width: 260px; flex: none; display: flex; flex-direction: column; background: rgba(11, 14, 26, .7); border-right: 1px solid var(--line); backdrop-filter: blur(20px); }
.sidebar-head { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 18px; border-bottom: 1px solid var(--line); }
.sidebar-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 12px 8px; }
.channel { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); cursor: pointer; font-weight: 500; transition: background .15s, color .15s; }
.channel:hover { background: rgba(255,255,255,.06); color: var(--text); }
.channel.active { background: rgba(61,220,151,.12); color: var(--green); }
.ch-ic { width: 18px; text-align: center; font-size: 18px; color: var(--text-3); }
.channel.voice .ch-ic { color: inherit; }
.call-count { margin-left: auto; font-size: 12px; background: var(--green); color: #052; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.call-count:empty { display: none; }
.voice-users { padding: 2px 0 8px 30px; display: flex; flex-direction: column; gap: 2px; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 14px; color: var(--text-2); cursor: default; }
.voice-user:hover { background: rgba(255,255,255,.05); }
.voice-user .avatar { transition: box-shadow .15s; }
.voice-user.speaking .avatar { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--green); }
.vu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-icons { display: flex; gap: 4px; align-items: center; color: var(--text-3); }
.live-pill { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 5px; letter-spacing: .3px; }
.sidebar-section { margin: 18px 12px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); }
.members { display: flex; flex-direction: column; gap: 2px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; }
.member:hover { background: rgba(255,255,255,.05); }
.member.offline { opacity: .5; }
.member-av { position: relative; }
.presence { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 3px #0f1324; }
.member.online .presence { background: var(--green); }
.member-info { min-width: 0; display: flex; flex-direction: column; }
.member-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-info small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.voice-panel { display: flex; align-items: center; justify-content: space-between; margin: 0 8px; padding: 10px 10px 10px 14px; border-radius: 12px; background: rgba(61,220,151,.1); box-shadow: inset 0 0 0 1px rgba(61,220,151,.25); cursor: pointer; }
.vp-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vp-status b { color: var(--green); font-size: 14px; display: block; }
.vp-status small { color: var(--text-2); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61,220,151,.7); animation: ping 1.6s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }

.me-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; margin-top: 8px; background: rgba(5,7,13,.55); border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 6px; border-radius: 10px; cursor: pointer; flex: 1; }
.me:hover { background: rgba(255,255,255,.06); }
.me-info { min-width: 0; display: flex; flex-direction: column; }
.me-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-info small { font-size: 12px; color: var(--text-3); }
.me-actions { display: flex; }
.me-actions .icon-btn { width: 32px; height: 32px; }

.av { position: relative; flex: none; display: inline-grid; border-radius: 50%; }
.av > .avatar { width: 100%; height: 100%; }
.avatar { flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; display: flex; position: relative; }
.welcome { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.welcome-inner { max-width: 460px; animation: rise .6s; }
.welcome-logo { width: 92px; height: 92px; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 12px 30px rgba(61,139,255,.5)) drop-shadow(0 6px 24px rgba(255,79,163,.35)); }
.welcome h2 { font-size: 34px; margin: 10px 0; }
.welcome p { color: var(--text-2); font-size: 16px; line-height: 1.5; }
.welcome-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.room { flex: 1; display: flex; min-width: 0; }
.room-resizer { width: 6px; flex: none; cursor: col-resize; background: transparent; position: relative; z-index: 3; margin: 0 -3px; }
.room-resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px; background: var(--line); transition: background .2s; }
.room-resizer:hover::after { background: var(--pink); }
body.resizing-x, body.resizing-x * { cursor: col-resize !important; user-select: none !important; }
body.resizing-y, body.resizing-y * { cursor: row-resize !important; user-select: none !important; }

/* =========================================================
   CHAT
   ========================================================= */
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: rgba(8, 10, 18, .45); position: relative; }
.room.with-stage .chat { flex: none; width: 380px; border-left: 1px solid var(--line); background: rgba(10, 13, 24, .85); }
.chat.dropping::after { content: 'Solte para enviar 📎'; position: absolute; inset: 10px; border: 2px dashed var(--pink); border-radius: 18px; display: grid; place-items: center; font-size: 20px; font-weight: 700; background: rgba(8,10,18,.85); z-index: 5; }
.chat-head { height: 58px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); background: rgba(8,10,18,.35); backdrop-filter: blur(12px); }
.chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 16px; }
.chat-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-icon { font-size: 22px; }
.chat-head-actions { display: flex; align-items: center; gap: 6px; }
.btn-call { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; background: rgba(61,220,151,.14); color: var(--green); box-shadow: inset 0 0 0 1px rgba(61,220,151,.35); transition: background .2s; white-space: nowrap; }
.btn-call:hover { background: rgba(61,220,151,.24); }
.btn-call.danger { background: rgba(255,77,109,.14); color: #ff8aa0; box-shadow: inset 0 0 0 1px rgba(255,77,109,.35); }
.btn-call.pulse { animation: callpulse 1.8s infinite; }
@keyframes callpulse { 50% { box-shadow: inset 0 0 0 1px rgba(61,220,151,.35), 0 0 0 6px rgba(61,220,151,.15); } }
.mobile-only { display: none; }

.messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; overscroll-behavior: contain; }
.loading { padding: 40px; text-align: center; color: var(--text-3); }
.chat-empty { text-align: center; padding: 60px 20px 30px; color: var(--text-2); }
.chat-empty-ic { font-size: 64px; }
.chat-empty h3 { color: var(--text); margin: 10px 0 6px; font-size: 22px; }
.msg { position: relative; display: flex; gap: 14px; padding: 6px 20px 4px; margin-top: 10px; transition: background .2s; }
.msg.cont { margin-top: 0; padding-top: 2px; }
.msg:hover { background: rgba(255,255,255,.03); }
.msg.flash { background: rgba(61,139,255,.15); }
.msg-gutter { width: 40px; flex: none; text-align: right; }
.msg-gutter time { font-size: 10.5px; color: var(--text-3); opacity: 0; line-height: 24px; }
.msg:hover .msg-gutter time { opacity: 1; }
.msg-main { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-head b { font-weight: 600; }
.msg-head time { font-size: 12px; color: var(--text-3); }
.msg-text { line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; color: #e9e3f5; }
.msg-text.jumbo { font-size: 46px; line-height: 1.15; }
.msg-text code { background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.msg-text pre { background: rgba(0,0,0,.35); padding: 10px 12px; border-radius: 10px; overflow-x: auto; margin: 4px 0; font-size: 13.5px; }
.msg-text .edited { color: var(--text-3); font-size: 11px; }
.spoiler { background: #000; color: transparent; border-radius: 4px; cursor: pointer; padding: 0 3px; }
.spoiler.shown { background: rgba(255,255,255,.1); color: inherit; }
.msg.system { color: var(--text-2); font-size: 14px; align-items: center; gap: 8px; }
.msg.system b { color: var(--text); }
.msg.system time { margin-left: 8px; font-size: 12px; color: var(--text-3); }
.sys-ic { width: 40px; text-align: center; color: var(--pink); }
.msg-reply { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-reply b { color: var(--text); }
.msg-sticker { width: 160px; height: 160px; object-fit: contain; display: block; margin: 2px 0; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.msg-gif, .msg-image { max-width: min(360px, 100%); max-height: 320px; border-radius: 12px; display: block; margin: 4px 0; cursor: zoom-in; }
.msg-gif { cursor: default; }
.msg-video { max-width: min(420px, 100%); max-height: 320px; border-radius: 12px; display: block; margin: 4px 0; background: #000; }
.msg-audio { width: min(320px, 100%); margin: 4px 0; }
.msg-file { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); text-decoration: none; margin: 4px 0; }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; transition: transform .15s; }
.reaction:hover { transform: scale(1.06); }
.reaction span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.reaction.mine { background: rgba(61,139,255,.15); box-shadow: inset 0 0 0 1px rgba(61,139,255,.5); }
.msg-tools { position: absolute; top: -14px; right: 16px; display: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-solid); box-shadow: var(--shadow); z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { width: 30px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--text-2); font-size: 15px; }
.msg-tools button:hover { background: rgba(255,255,255,.08); color: var(--text); }

.typing { height: 22px; padding: 0 20px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; }
.dots { display: inline-flex; gap: 3px; margin-right: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%,60%,100% { opacity: .4; } }
.composer-wrap { padding: 0 16px 16px; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px 14px 0 0; background: rgba(255,255,255,.05); font-size: 13px; color: var(--text-2); }
.reply-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer { display: flex; align-items: flex-end; gap: 4px; padding: 6px; border-radius: 16px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
.composer:focus-within { box-shadow: inset 0 0 0 1px rgba(61,139,255,.6), 0 0 0 4px rgba(61,139,255,.1); }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; padding: 8px 6px; max-height: 200px; line-height: 1.4; min-height: 36px; }
.composer .send { color: var(--pink); }
.upload-progress span { color: var(--pink); font-weight: 600; }

/* =========================================================
   PALCO DA CALL
   ========================================================= */
.stage-wrap { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; background: #05070d; overflow: hidden; }
.stage { flex: 1; position: relative; min-height: 0; padding: 10px 10px 86px; transition: padding .3s; }
.stage-wrap.idle .stage { padding-bottom: 10px; }
.stage-dock { position: absolute; inset: 10px 10px 86px; display: flex; gap: 0; transition: inset .3s; }
.stage-wrap.idle .stage-dock { inset: 10px; }
.stage-dock.layout-grid { display: grid; gap: 8px; grid-auto-rows: 1fr; }
.stage-side { display: flex; min-width: 0; min-height: 0; }
.stage-float { position: absolute; inset: 10px; pointer-events: none; }
.stage-float .tile { pointer-events: auto; }
.stage-hidden-bar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; }

.tile {
  position: relative; min-width: 0; min-height: 0; border-radius: 16px; overflow: hidden; background: #0d1120;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s;
  container-type: size;
}
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.mirror video { transform: scaleX(-1); }
.tile.is-avatar video { display: none; }
.tile-avatar { position: absolute; inset: 0; display: none; place-items: center; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tile-color, #a66bff) 35%, transparent), transparent 65%), #0d1120; }
.tile.is-avatar .tile-avatar { display: grid; }
.tile-avatar .av { width: clamp(48px, 28cqmin, 120px) !important; height: clamp(48px, 28cqmin, 120px) !important; --fw: clamp(3px, 1.6cqmin, 8px) !important; }
.tile-avatar .avatar { font-size: clamp(20px, 12cqmin, 52px) !important; transition: box-shadow .15s, transform .15s; }
.tile.speaking { box-shadow: 0 0 0 3px var(--green), 0 0 24px -4px rgba(61,220,151,.6); }
.tile.is-avatar.speaking .avatar { box-shadow: 0 0 0 4px #0d1120, 0 0 0 8px var(--green); transform: scale(1.04); }
.tile-label { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 9px; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; cursor: grab; transition: opacity .3s; }
.tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-badge { background: var(--red); font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 5px; letter-spacing: .3px; }
.tile-mute { color: var(--red); }
.tile-stats { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,.65); font: 12px ui-monospace, monospace; color: #9ff0c9; }
.tile-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.tile:hover .tile-actions { opacity: 1; transform: none; }
.tile-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); color: #fff; }
.tile-btn:hover { background: rgba(61,139,255,.8); }
.tile-resize { display: none; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.7) 50%, rgba(255,255,255,.7) 60%, transparent 60%, transparent 70%, rgba(255,255,255,.7) 70%, rgba(255,255,255,.7) 80%, transparent 80%); }
.tile.floating { position: absolute; box-shadow: 0 0 0 1px var(--line-2), 0 18px 50px -10px rgba(0,0,0,.8); cursor: move; touch-action: none; z-index: 4; }
.tile.floating .tile-resize { display: block; }
.tile.floating.moving { opacity: .92; }
.tile.dragging { opacity: .5; }
.tile.drop-target { box-shadow: 0 0 0 3px var(--pink); }
.stage-wrap.idle .tile-label, .stage-wrap.idle .tile-actions { opacity: 0; }
.stage-wrap.idle { cursor: none; }
.tile:fullscreen { border-radius: 0; }
.tile:fullscreen .tile-label, .tile:fullscreen .tile-actions { opacity: 0; transition: opacity .3s; }
.tile:fullscreen:hover .tile-actions { opacity: 1; }

.gutter { flex: none; position: relative; z-index: 2; touch-action: none; }
.gutter-row { width: 10px; cursor: col-resize; }
.gutter-column { height: 10px; cursor: row-resize; }
.gutter::after { content: ''; position: absolute; border-radius: 4px; background: rgba(255,255,255,.12); transition: background .2s, transform .2s; }
.gutter-row::after { top: 50%; left: 3px; width: 4px; height: 44px; transform: translateY(-50%); }
.gutter-column::after { left: 50%; top: 3px; height: 4px; width: 44px; transform: translateX(-50%); }
.gutter:hover::after, .gutter.active::after { background: var(--pink); }
.gutter-row:hover::after, .gutter-row.active::after { height: 80px; }
.gutter-column:hover::after, .gutter-column.active::after { width: 80px; }
.stage-wrap.idle .gutter::after { opacity: 0; }

.stage-overlay-top { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; display: none; }
.stage-title { display: none; }

.call-controls {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 8;
  display: flex; gap: 10px; padding: 8px; border-radius: 20px; background: rgba(12, 15, 28, .82); backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px var(--line-2), 0 20px 50px -10px rgba(0,0,0,.8); transition: opacity .3s, transform .3s; max-width: calc(100% - 20px); overflow-x: auto; scrollbar-width: none;
}
.stage-wrap.idle .call-controls { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.cc-group { display: flex; gap: 4px; align-items: center; }
.cc-group + .cc-group { padding-left: 10px; border-left: 1px solid var(--line-2); }
.cc-btn { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--text); transition: background .15s, transform .1s; flex: none; }
.cc-btn:hover { background: rgba(255,255,255,.14); }
.cc-btn:active { transform: scale(.94); }
.cc-btn.off { background: rgba(255,77,109,.2); color: #ff8aa0; }
.cc-btn.on { background: rgba(61,139,255,.25); color: #fff; box-shadow: inset 0 0 0 1px rgba(61,139,255,.6); }
.cc-btn.danger { background: var(--red); color: #fff; width: 60px; }
.cc-btn.danger:hover { background: #ff2f55; }
.cc-split { display: flex; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.07); flex: none; }
.cc-split .cc-btn { border-radius: 0; background: none; }
.cc-split .cc-btn.off { background: rgba(255,77,109,.2); }
.cc-split .cc-btn.on { background: rgba(61,139,255,.25); box-shadow: none; }
.cc-arrow { width: 22px; display: grid; place-items: center; color: var(--text-2); border-left: 1px solid var(--line); }
.cc-arrow:hover { background: rgba(255,255,255,.1); color: var(--text); }
.cc-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* Tela cheia e modo cinema: sem bordas, só os vídeos */
.stage-wrap:fullscreen { background: #000; }
.stage-wrap:fullscreen .stage, body.cinema .stage { padding: 0 !important; }
.stage-wrap:fullscreen .stage-dock, body.cinema .stage-dock { inset: 0 !important; }
.stage-wrap:fullscreen .stage-float, body.cinema .stage-float { inset: 0; }
.stage-wrap:fullscreen .tile, body.cinema .tile { border-radius: 0; box-shadow: none; }
.stage-wrap:fullscreen .tile.floating, body.cinema .tile.floating { border-radius: 14px; box-shadow: 0 18px 50px -10px rgba(0,0,0,.9); }
.stage-wrap:fullscreen .gutter-row, body.cinema .gutter-row { width: 4px; background: #000; }
.stage-wrap:fullscreen .gutter-column, body.cinema .gutter-column { height: 4px; background: #000; }
.stage-wrap:fullscreen .stage-dock.layout-grid, body.cinema .stage-dock.layout-grid { gap: 3px; }
body.cinema .rail, body.cinema .sidebar, body.cinema .chat, body.cinema .room-resizer { display: none !important; }

/* =========================================================
   MODAIS, MENUS, TOASTS
   ========================================================= */
#layer { position: relative; z-index: 100; }
.backdrop { position: fixed; inset: 0; background: rgba(3,5,10,.6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.modal { width: min(460px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: var(--radius-lg); background: rgba(16, 20, 36, .92); transform: translateY(16px) scale(.97); transition: transform .3s cubic-bezier(.2,1.2,.4,1); }
.backdrop.show .modal { transform: none; }
.modal-wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 22px; }
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 10px 22px 18px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.ctx-menu { position: fixed; z-index: 200; min-width: 230px; max-width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(16, 20, 36, .96); animation: menu .14s ease-out; }
@keyframes menu { from { opacity: 0; transform: scale(.96); } }
.ctx-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; color: var(--text); }
.ctx-item:hover:not(:disabled) { background: rgba(61,139,255,.18); }
.ctx-item.danger { color: #ff8aa0; }
.ctx-item.danger:hover { background: rgba(255,77,109,.18); }
.ctx-item .ic { color: var(--text-2); }
.ctx-label { flex: 1; }
.ctx-check { color: var(--pink); font-weight: 800; width: 14px; }
.ctx-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.ctx-title { padding: 8px 10px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-slider { padding: 8px 10px 10px; }
.ctx-slider-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 8px; }
.ctx-slider-val { color: var(--pink); font-weight: 700; }
.ctx-hint { font-size: 12px; color: var(--text-3); padding: 6px 10px 4px; margin: 0; line-height: 1.4; }
.ctx-reacts { display: flex; justify-content: space-between; padding: 4px; }
.ctx-reacts button { font-size: 22px; width: 36px; height: 36px; border-radius: 10px; transition: transform .15s, background .15s; }
.ctx-reacts button:hover { background: rgba(255,255,255,.08); transform: scale(1.15); }
.popover { padding: 8px; }
.screen-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.screen-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.screen-row-info small { color: var(--text-3); font-size: 12px; }

#toasts { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: rgba(18, 22, 40, .96); box-shadow: var(--shadow); border-left: 4px solid var(--violet); font-size: 14px; transform: translateX(120%); transition: transform .3s cubic-bezier(.2,1.2,.4,1); }
.toast.show { transform: none; }
.toast-success { border-left-color: var(--green); }
.toast-error { border-left-color: var(--red); }
.ring-toast { display: flex; align-items: center; gap: 12px; }

.lightbox { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.85); display: grid; place-items: center; cursor: zoom-out; padding: 20px; animation: menu .2s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* ---------- Emojis / figurinhas ---------- */
.emoji-pop { width: 352px; padding: 0; }
.emoji-picker { display: flex; flex-direction: column; height: 380px; }
.emoji-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.emoji-tabs button { font-size: 18px; width: 34px; height: 32px; border-radius: 8px; flex: none; }
.emoji-tabs button:hover { background: rgba(255,255,255,.08); }
.emoji-scroll { overflow-y: auto; padding: 4px 8px 8px; }
.emoji-scroll h4 { margin: 10px 4px 6px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-btn { font-size: 24px; height: 40px; border-radius: 9px; transition: transform .1s, background .1s; }
.emoji-btn:hover { background: rgba(255,255,255,.08); transform: scale(1.2); }

.sticker-pop { width: 380px; }
.sticker-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: 12px; background: rgba(0,0,0,.25); }
.sticker-tabs button { flex: 1; padding: 8px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.sticker-tabs button.active { background: rgba(255,255,255,.1); color: var(--text); }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 340px; overflow-y: auto; }
.sticker-item, .sticker-new { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.04); overflow: hidden; transition: transform .15s, background .15s; }
.sticker-item:hover { transform: scale(1.06); background: rgba(255,255,255,.1); }
.sticker-item img { width: 100%; height: 100%; object-fit: contain; }
.sticker-new { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--pink); box-shadow: inset 0 0 0 1.5px rgba(61,139,255,.4); background: rgba(61,139,255,.06); text-align: center; padding: 4px; }
.sticker-new:hover { background: rgba(61,139,255,.16); }
.sticker-empty { grid-column: 1 / -1; text-align: center; padding: 10px; }

/* ---------- Diálogos da call ---------- */
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; transition: background .15s, box-shadow .15s; }
.choice.active { background: rgba(61,139,255,.12); box-shadow: inset 0 0 0 2px var(--pink); }
.choice-emoji { font-size: 26px; }
.choice small { color: var(--text-2); font-size: 12.5px; }
.tips { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(76,201,240,.07); box-shadow: inset 0 0 0 1px rgba(76,201,240,.2); }
.tips summary { cursor: pointer; font-weight: 600; }
.tips ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.tips li { margin-bottom: 6px; }
.tips b { color: var(--text); }
.callout { margin-top: 16px; padding: 14px; border-radius: 14px; background: rgba(166,107,255,.08); box-shadow: inset 0 0 0 1px rgba(166,107,255,.25); }
.callout p { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

.mixer-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 18px; }
.mixer-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); transition: opacity .2s; }
.mixer-row.off { opacity: .55; }
.mixer-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(61,139,255,.15); color: var(--pink); flex: none; }
.mixer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mixer-name b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.mixer-name small { color: var(--text-3); font-size: 12px; }
.mixer-vol-row { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.mixer-vol { font-size: 12px; color: var(--text-2); width: 40px; text-align: right; }
.mixer-add h4 { margin: 0 0 8px; }
.mixer-cand { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--text-2); }
.mixer-cand:hover { background: rgba(255,255,255,.06); color: var(--text); }
.mixer-cand span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mixer-cand-add { color: var(--pink); font-weight: 600; font-size: 13px; }
.meter { position: relative; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #3ddc97, #ffcc4d 70%, #ff4d6d); transition: width .06s; }
.meter.big { height: 12px; overflow: visible; }
.meter.big span { opacity: .45; }
.meter.big.open span { opacity: 1; }
.gate-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--pink); }

/* ---------- Configurações ---------- */
.settings-modal { width: min(940px, 100%); height: min(680px, calc(100dvh - 32px)); }
.settings-modal .modal-body { padding: 0; display: flex; flex: 1; min-height: 0; }
.settings { display: flex; flex: 1; min-height: 0; width: 100%; }
.settings-nav { width: 210px; flex: none; padding: 10px 12px 18px 18px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.settings-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); text-align: left; font-weight: 500; }
.settings-nav button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.settings-nav button.active { background: rgba(61,139,255,.15); color: var(--text); }
.settings-nav button.danger { color: #ff8aa0; margin-top: auto; }
.settings-nav-sep { flex: 1; }
.settings-pane { flex: 1; overflow-y: auto; padding: 6px 26px 26px; }
.settings-pane h3 { margin: 6px 0 16px; font-size: 22px; }
.settings-pane h4 { margin: 22px 0 6px; color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.profile-preview { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(61,139,255,.15), rgba(124,140,255,.12)); box-shadow: inset 0 0 0 1px var(--line-2); }
.profile-preview b { font-size: 20px; display: block; }
.profile-preview small { display: block; color: var(--text-2); }
.cam-preview { width: 100%; max-width: 420px; aspect-ratio: 16/9; background: #000; border-radius: 14px; margin: 10px 0; display: block; object-fit: cover; transform: scaleX(-1); }
.key-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
kbd { min-width: 170px; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.08); box-shadow: inset 0 -2px 0 rgba(0,0,0,.4), inset 0 0 0 1px var(--line-2); font: 13px var(--font); font-weight: 600; }
.color-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); transition: transform .15s; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff; }
.color-row input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick button { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; background: rgba(255,255,255,.05); }
.icon-pick button.active { background: rgba(61,139,255,.2); box-shadow: inset 0 0 0 2px var(--pink); }
.code-input { text-transform: uppercase; letter-spacing: 4px; font-size: 20px; text-align: center; font-weight: 700; }

/* ---------- Estúdio ---------- */
.studio-modal { width: min(1040px, 100%); }
.studio-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.studio-tabs button { padding: 9px 18px; border-radius: 99px; font-weight: 600; color: var(--text-2); background: rgba(255,255,255,.05); }
.studio-tabs button.active { background: var(--grad); color: #fff; }
.studio-sticker, .studio-gif { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.studio-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.studio-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.studio-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 12px; min-width: 70px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 12px; font-weight: 600; color: var(--text-2); transition: background .15s; }
.tool-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }
.tool-btn.active { background: rgba(61,139,255,.2); color: #fff; box-shadow: inset 0 0 0 1.5px var(--pink); }
.tool-emoji { font-size: 18px; line-height: 18px; }
.canvas-wrap { display: grid; place-items: center; border-radius: 18px; padding: 12px; }
.checker { background-color: #141a2b; background-image: linear-gradient(45deg, #1b2238 25%, transparent 25%), linear-gradient(-45deg, #1b2238 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1b2238 75%), linear-gradient(-45deg, transparent 75%, #1b2238 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.sticker-canvas { width: min(100%, 460px); aspect-ratio: 1; touch-action: none; cursor: crosshair; }
.studio-props { flex: 1; overflow-y: auto; max-height: 500px; padding-right: 4px; display: flex; flex-direction: column; gap: 8px; }
.studio-props > * { flex-shrink: 0; }
.studio-props h4 { margin: 8px 0 2px; font-size: 14px; }
.studio-props textarea.input { resize: vertical; }
.prop { display: flex; flex-direction: column; gap: 6px; }
.prop-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.prop-head span:last-child { color: var(--pink); font-weight: 600; }
.prop-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-save { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.studio-save .input { flex: 1; min-width: 0; }
.gif-stage { position: relative; display: grid; place-items: center; min-height: 340px; border-radius: 18px; background: #05070d; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.gif-stage[data-count]::after { content: attr(data-count); position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 10px 40px rgba(61,139,255,.8); background: rgba(0,0,0,.35); animation: pop .5s; }
.gif-live, .gif-preview { max-width: 100%; max-height: 460px; display: block; }
.gif-live.mirror { transform: scaleX(-1); }
.gif-empty { text-align: center; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gif-empty-ic { font-size: 56px; }
.gif-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.1); }
.gif-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .1s; }
.snap { position: relative; }
.snap-video { width: 100%; border-radius: 14px; transform: scaleX(-1); background: #000; display: block; }
.snap-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 800; color: #fff; text-shadow: 0 8px 30px rgba(0,0,0,.6); pointer-events: none; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 900px) {
  .room.with-stage { flex-direction: column; }
  .room.with-stage .chat { width: 100% !important; height: 42%; border-left: 0; border-top: 1px solid var(--line); }
  .room-resizer { display: none !important; }
  .studio-sticker, .studio-gif { grid-template-columns: 1fr; }
  .studio-props { max-height: none; }
}
@media (max-width: 720px) {
  .rail, .sidebar { position: fixed; top: 0; bottom: 0; z-index: 50; transform: translateX(calc(-100% - 90px)); transition: transform .3s cubic-bezier(.2,1,.3,1); }
  .rail { left: 0; }
  .sidebar { left: 74px; width: min(280px, calc(100vw - 74px)); background: var(--panel-solid); }
  .app.nav-open .rail, .app.nav-open .sidebar { transform: none; }
  .app.nav-open .main::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
  .mobile-only { display: inline-grid; }
  .chat-head { padding-left: 6px; }
  .btn-call span:last-child { display: none; }
  .msg { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .composer-wrap { padding: 0 8px 10px; }
  .call-controls { gap: 6px; padding: 6px; bottom: 8px; border-radius: 16px; }
  .cc-btn { width: 42px; height: 42px; }
  .cc-group + .cc-group { padding-left: 6px; }
  .stage { padding-bottom: 70px; }
  .stage-dock { inset: 6px 6px 70px; }
  .grid-2, .choice-row { grid-template-columns: 1fr; }
  .settings { flex-direction: column; }
  .settings-nav { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .settings-nav button { white-space: nowrap; }
  .settings-nav-sep { display: none; }
  .settings-nav button.danger { margin-top: 0; }
  .settings-pane { padding: 6px 16px 20px; }
  .emoji-pop, .sticker-pop { width: calc(100vw - 16px); }
  .tile-actions { opacity: 1; transform: none; }
  #toasts { left: 16px; }
}


/* =========================================================
   MOLDURAS DE PERFIL
   ========================================================= */
.av.framed::before {
  content: ''; position: absolute; inset: calc(var(--fw) * -1.35); border-radius: 50%; padding: var(--fw);
  background: var(--frame-bg); pointer-events: none; z-index: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.av.framed::after { content: ''; position: absolute; inset: calc(var(--fw) * -1.35); border-radius: 50%; pointer-events: none; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ang { to { --ang: 360deg; } }
.frame-neon::before { --frame-bg: conic-gradient(from var(--ang), #2f7bff, #7b5cff, #ff4fa3, #38d6ff, #2f7bff); animation: ang 3s linear infinite; }
.frame-neon::after { box-shadow: 0 0 12px rgba(61,139,255,.55), 0 0 18px rgba(255,79,163,.35); }
.frame-fire::before { --frame-bg: conic-gradient(from var(--ang), #ff3d00, #ffb300, #ff6d00, #ff1744, #ffd600, #ff3d00); animation: ang 1.6s linear infinite; }
.frame-fire::after { box-shadow: 0 -4px 16px rgba(255,109,0,.7), 0 0 10px rgba(255,23,68,.5); animation: flicker 0.25s infinite alternate; }
@keyframes flicker { to { box-shadow: 0 -7px 20px rgba(255,160,0,.75), 0 0 14px rgba(255,23,68,.6); } }
.frame-ice::before { --frame-bg: conic-gradient(from var(--ang), #e0f7ff, #38d6ff, #ffffff, #7dd3fc, #e0f7ff); animation: ang 6s linear infinite; }
.frame-ice::after { box-shadow: 0 0 14px rgba(56,214,255,.6), inset 0 0 6px rgba(255,255,255,.6); }
.frame-gold::before { --frame-bg: linear-gradient(135deg, #8a6d1d, #ffe58a 30%, #c9a227 50%, #fff3b0 70%, #8a6d1d); }
.frame-gold::after { box-shadow: 0 0 12px rgba(255,213,79,.5); }
.frame-rainbow::before { --frame-bg: conic-gradient(from var(--ang), #ff0000, #ff9900, #ffee00, #33dd00, #00ccff, #6633ff, #ff00cc, #ff0000); animation: ang 2s linear infinite; }
.frame-toxic::before { --frame-bg: conic-gradient(from var(--ang), #39ff14, #0b3d0b, #b2ff59, #0b3d0b, #39ff14); animation: ang 2.4s linear infinite; }
.frame-toxic::after { animation: toxic 1.4s ease-in-out infinite; }
@keyframes toxic { 50% { box-shadow: 0 0 18px rgba(57,255,20,.65); } }
.frame-galaxy::before { --frame-bg: radial-gradient(circle at 30% 20%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 80%, #fff 0 1px, transparent 2px), conic-gradient(from var(--ang), #1e0b4b, #7b5cff, #ff4fa3, #0b1e4b, #38d6ff, #1e0b4b); animation: ang 8s linear infinite; }
.frame-galaxy::after { box-shadow: 0 0 16px rgba(123,92,255,.55); }
.frame-pixel::before { border-radius: 22%; --frame-bg: repeating-conic-gradient(#ff4fa3 0 25%, #3d8bff 0 50%) 0 0 / calc(var(--fw) * 2) calc(var(--fw) * 2); }
.frame-pixel::after { border-radius: 22%; }
.frame-glitch::before { --frame-bg: linear-gradient(90deg, #ff004c, #00f0ff); animation: glitch 1.2s steps(2) infinite; }
@keyframes glitch { 0%,100% { transform: translate(0); filter: hue-rotate(0); } 20% { transform: translate(-2px, 1px); } 40% { transform: translate(2px, -1px); filter: hue-rotate(90deg); } 60% { transform: translate(-1px, -2px); } 80% { transform: translate(1px, 2px); filter: hue-rotate(200deg); } }

/* =========================================================
   CARTÃO DE PERFIL
   ========================================================= */
.profile-pop { width: 330px; padding: 0; overflow: hidden; }
.profile-pop > .ctx-slider, .profile-pop > .ctx-item, .profile-pop > .ctx-sep { margin: 0 6px; }
.profile-pop > :last-child { margin-bottom: 6px; }
.profile-card { position: relative; }
.pc-banner { height: 96px; }
.pc-head { padding: 0 18px; margin-top: -46px; display: flex; align-items: flex-end; }
.pc-av { position: relative; padding: 5px; border-radius: 50%; background: var(--panel-solid); }
.pc-presence { position: absolute; right: 6px; bottom: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 4px var(--panel-solid); z-index: 2; }
.pc-presence.on { background: var(--green); }
.pc-body { padding: 10px 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.pc-name { font-size: 21px; font-weight: 800; }
.pc-user { color: var(--text-2); font-size: 13.5px; }
.pc-status { margin-top: 4px; font-size: 14px; }
.pc-activity { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(61,139,255,.16), rgba(255,79,163,.14)); box-shadow: inset 0 0 0 1px var(--line-2); }
.pc-activity small { display: block; font-size: 10.5px; letter-spacing: .6px; font-weight: 700; color: var(--text-2); }
.pc-activity b { display: block; font-size: 15px; }
.pc-act-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(0,0,0,.3); }
.pc-section { margin-top: 10px; }
.pc-section h5 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); }
.pc-section p { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; color: var(--text); }
.pc-actions { display: flex; gap: 8px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip.game-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: rgba(61,139,255,.12); box-shadow: inset 0 0 0 1px rgba(61,139,255,.3); }
.chip.game-chip button { color: var(--text-2); font-size: 15px; line-height: 1; }
.chip.game-chip button:hover { color: var(--red); }
.member-act { color: var(--green) !important; }
.msg > .av, .msg-head b { cursor: pointer; }
.member, .voice-user { cursor: pointer; }

.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.account-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-preview-wrap { border-radius: 18px; overflow: hidden; background: var(--panel-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); }
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.frame-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 8px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.frame-opt small { font-size: 11.5px; color: var(--text-2); }
.frame-opt.active { box-shadow: inset 0 0 0 2px var(--blue); background: rgba(61,139,255,.1); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 140px; }
.sticky-save { position: sticky; bottom: -26px; padding: 12px 0; background: linear-gradient(transparent, rgba(16,20,36,.95) 30%); }

/* =========================================================
   ABA JOGOS
   ========================================================= */
.panel-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(0,0,0,.3); margin-left: auto; margin-right: 6px; }
.panel-tabs button { position: relative; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.panel-tabs button.active { background: rgba(255,255,255,.1); color: var(--text); }
.tab-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--bg); }
.chat-head { gap: 6px; }
.games-view { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.hub { padding: 18px; display: flex; flex-direction: column; gap: 24px; }
.hub h3 { margin: 0 0 4px; font-size: 18px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.hub-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 16px; text-align: left; background: linear-gradient(160deg, rgba(61,139,255,.12), rgba(255,79,163,.08)); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .15s, box-shadow .15s; }
.hub-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(61,139,255,.6), 0 12px 30px -12px rgba(61,139,255,.5); }
.hub-ic { font-size: 30px; margin-bottom: 4px; }
.hub-card small { color: var(--text-2); font-size: 12.5px; line-height: 1.35; }
.hub-meta { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.hub-coop { display: flex; gap: 16px; padding: 18px; border-radius: 18px; background: radial-gradient(circle at 0 0, rgba(255,79,163,.25), transparent 60%), radial-gradient(circle at 100% 100%, rgba(61,139,255,.25), transparent 60%), rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line-2); }
.hub-coop-ic { font-size: 44px; }
.hub-coop p { margin: 6px 0 12px; }
.free-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.free-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; transition: background .15s; }
.free-card:hover { background: rgba(61,139,255,.14); }
.free-ic { font-size: 22px; width: 32px; text-align: center; }
.free-card b { display: block; font-size: 14px; }
.free-card small { color: var(--text-3); font-size: 12px; }

.game-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.2); }
.game-title b { display: block; font-size: 16px; }
.game-title small { color: var(--text-3); font-size: 12px; }
.game-players { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.gp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: 13px; }
.gp.gp-me { box-shadow: inset 0 0 0 1px var(--blue); }
.gp em { font-style: normal; font-weight: 800; color: var(--pink); }
.game-head-actions { display: flex; gap: 6px; }
.game-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; min-height: 0; }
.game-status { font-size: 18px; font-weight: 700; padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,.05); }
.game-status.turn { background: rgba(61,139,255,.2); box-shadow: 0 0 0 1px rgba(61,139,255,.6); animation: callpulse 1.8s infinite; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(320px, 80vw); aspect-ratio: 1; }
.ttt-cell { border-radius: 16px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line-2); font-size: clamp(40px, 9vw, 72px); font-weight: 800; transition: background .15s, transform .1s; }
.ttt-cell:not(:disabled):hover { background: rgba(61,139,255,.15); }
.ttt-cell:disabled { cursor: default; }
.ttt-cell.win { background: rgba(61,220,151,.22); animation: pop .4s; }
.c4-legend { display: flex; gap: 16px; font-size: 13.5px; }
.c4-legend span { display: inline-flex; align-items: center; gap: 6px; }
.c4-legend i { width: 14px; height: 14px; border-radius: 50%; }
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; border-radius: 18px; background: linear-gradient(160deg, #1d2a6b, #101845); box-shadow: 0 16px 40px -16px rgba(0,0,0,.8); width: min(460px, 92%); }
.c4-col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; padding: 4px; border-radius: 12px; }
.c4.active .c4-col:not(:disabled):hover { background: rgba(255,255,255,.08); }
.c4-col:disabled { cursor: default; }
.c4-cell { aspect-ratio: 1; border-radius: 50%; background: #070b22; box-shadow: inset 0 3px 6px rgba(0,0,0,.6); }
.c4-cell.filled { background: var(--disc); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), inset 0 3px 0 rgba(255,255,255,.25); }
.c4-cell.last { animation: drop .45s cubic-bezier(.4,1.6,.6,1); }
@keyframes drop { from { transform: translateY(calc(var(--row, 0) * -110% - 110%)); } }
.c4-cell.win { box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; }
.react-wrap { padding: 16px; }
.react-pad { width: 100%; flex: 1; min-height: 260px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px; user-select: none; touch-action: manipulation; }
.react-pad.idle { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.react-pad.wait { background: #b4233c; cursor: pointer; }
.react-pad.go { background: #18a861; cursor: pointer; animation: pop .2s; }
.react-pad.done { filter: saturate(.6); cursor: default; }
.react-big { font-size: clamp(30px, 6vw, 56px); font-weight: 800; }
.rank { width: min(340px, 100%); }
.rank-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.05); margin: 4px 0; min-width: 240px; }
.draw-wrap { justify-content: flex-start; gap: 10px; padding: 12px; }
.draw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.draw-round, .draw-timer { font-size: 13px; color: var(--text-2); min-width: 70px; }
.draw-timer { text-align: right; font-weight: 700; color: var(--text); }
.draw-timer.urgent { color: var(--red); animation: callpulse 1s infinite; }
.draw-word { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; font-size: 22px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.draw-word i { font-style: normal; min-width: 16px; text-align: center; }
.draw-word i.blank { border-bottom: 3px solid var(--text-2); height: 26px; }
.draw-main { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; width: 100%; flex: 1; min-height: 0; }
.draw-board { position: relative; display: grid; place-items: center; min-height: 0; }
.draw-canvas { width: 100%; max-height: 100%; aspect-ratio: 10 / 7; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); touch-action: none; }
.draw-canvas.can-draw { cursor: crosshair; }
.draw-overlay { position: absolute; inset: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: rgba(8,10,18,.82); backdrop-filter: blur(4px); padding: 20px; }
.draw-overlay > div { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.word-choices { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.draw-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.draw-log { flex: 1; overflow-y: auto; border-radius: 12px; background: rgba(0,0,0,.25); padding: 8px; font-size: 13px; min-height: 120px; max-height: 420px; }
.log-line { padding: 3px 4px; }
.log-line.sys { color: var(--green); font-weight: 600; }
.log-line:empty { display: none; }
.draw-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.draw-tools .swatch { width: 26px; height: 26px; }
.tool-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.size-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.size-btn i { border-radius: 50%; background: var(--text); }
.size-btn.active, .draw-tools .btn.active { box-shadow: inset 0 0 0 2px var(--blue); }

/* =========================================================
   MODO JOGO COOP
   ========================================================= */
.coop-dialog { display: flex; flex-direction: column; gap: 14px; }
.coop-dialog > p { margin: 0; }
.coop-step { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.coop-num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--grad); }
.coop-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coop-agent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-pill { padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255,77,109,.15); color: #ff8aa0; }
.status-pill.on { background: rgba(61,220,151,.15); color: var(--green); }
.status-pill.connecting { background: rgba(255,204,77,.15); color: var(--yellow); }
.code-input.sm { font-size: 16px; letter-spacing: 3px; max-width: 130px; padding: 8px; flex: 0 0 auto; min-width: 0; }
.coop-guests { display: flex; flex-direction: column; gap: 6px; }
.coop-guest { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(61,139,255,.08); }
.coop-guest span { flex: 1; font-weight: 600; }
.tile-coop { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 3; padding: 9px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; color: #fff; background: var(--grad); box-shadow: var(--glow); transition: opacity .3s, transform .15s; white-space: nowrap; }
.tile-coop:hover { transform: translateX(-50%) scale(1.04); }
.tile.controlling .tile-coop { left: 10px; right: auto; transform: none; top: 12px; padding: 6px 12px; font-size: 12.5px; background: rgba(0,0,0,.65); box-shadow: none; }
.tile.controlling { box-shadow: 0 0 0 3px var(--pink), 0 0 30px -6px rgba(255,79,163,.7); }
.tile.controlling.capturing { box-shadow: 0 0 0 3px var(--green), 0 0 30px -6px rgba(61,220,151,.7); cursor: none; }
.tile-coop-hint { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 6px 14px; border-radius: 99px; background: rgba(0,0,0,.7); font-size: 12.5px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.tile.capturing .tile-coop-hint { opacity: 0; }
.stage-wrap.idle .tile-coop:not(:hover) { opacity: .0; }
.tile-rec { display: none; position: absolute; top: 10px; left: 10px; z-index: 3; padding: 3px 9px; border-radius: 7px; background: var(--red); font-size: 11px; font-weight: 800; animation: callpulse 1.2s infinite; }
.tile.recording .tile-rec { display: block; }
.cc-emoji { font-size: 20px; line-height: 1; }

/* soundboard e ping */
.sb-pop { width: 360px; }
.sb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; }
.sb-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.05); transition: transform .1s, background .15s; }
.sb-btn span { font-size: 24px; }
.sb-btn small { font-size: 11px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-btn:hover { background: rgba(61,139,255,.18); }
.sb-btn:active { transform: scale(.94); }
.sb-btn.playing { box-shadow: inset 0 0 0 2px var(--pink); background: rgba(255,79,163,.15); }
.sb-btn.add span { color: var(--blue); }
.ping { font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.06); }
.ping.good { color: var(--green); }
.ping.ok { color: var(--yellow); }
.ping.bad { color: var(--red); }

@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-side { position: static; order: -1; }
  .draw-main { grid-template-columns: 1fr; }
  .draw-log { max-height: 160px; }
}
@media (max-width: 720px) {
  .panel-tabs span { display: none; }
  .profile-pop { width: calc(100vw - 16px); }
}

.room.with-stage .chat-title b, .room.with-stage .chat-icon { display: none; }
.room.with-stage .btn-call span:last-child { display: none; }

/* =========================================================
   TETRIS ROYALE
   ========================================================= */
.games-view.tetris-full { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 20% 0, rgba(47,123,255,.18), transparent 50%), radial-gradient(circle at 80% 100%, rgba(255,79,163,.15), transparent 50%), #05070d; }
.tetris-wrap { justify-content: flex-start; align-items: stretch; padding: 12px; gap: 10px; }
.tt-top { display: flex; align-items: center; gap: 12px; }
.tt-xp { font-weight: 700; font-size: 14px; }
.tt-xp small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.tt-phase { margin-left: auto; font-size: 13px; color: var(--text-2); }
.tt-arena { position: relative; flex: 1; display: flex; gap: 16px; min-height: 0; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.tt-main { position: relative; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.tt-side { display: flex; flex-direction: column; gap: 10px; width: 108px; }
.tt-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.tt-box small, .tt-stat small { font-size: 10.5px; letter-spacing: .8px; color: var(--text-3); font-weight: 700; }
.tt-mini { display: block; }
.tt-stats { display: flex; flex-direction: column; gap: 6px; }
.tt-stat { padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.03); }
.tt-stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.tt-board-wrap { display: flex; gap: 4px; }
.tt-meter { width: 8px; border-radius: 4px; background: rgba(255,255,255,.06); display: flex; align-items: flex-end; overflow: hidden; }
.tt-meter i { display: block; width: 100%; height: 0; background: linear-gradient(#ff4d6d, #ff9f40); transition: height .15s; }
.tt-board-inner { position: relative; }
.tt-board { display: block; border-radius: 6px; box-shadow: 0 0 0 2px rgba(61,139,255,.35), 0 20px 60px -20px rgba(61,139,255,.45), 0 0 40px -10px rgba(255,79,163,.25); }
.tt-clear { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.8); text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.tt-clear.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tt-clear b { display: block; font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 1px; }
.tt-clear small { display: block; font-weight: 800; font-size: 14px; color: #fff; }
.tt-countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; font-weight: 800; color: #fff; text-shadow: 0 8px 40px rgba(61,139,255,.9); pointer-events: none; }
.tt-dead { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; }
.tt-dead b { font-size: 48px; font-weight: 800; }
.tt-spectate { padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); color: var(--text-2); font-size: 14px; }
.tt-spectate:empty { display: none; }
.tt-opps { flex: 1; min-width: 160px; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; justify-content: center; }
.tt-opp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 6px 4px 14px; border-radius: 10px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, opacity .4s; animation: pop .3s; }
.tt-opp.hit { transform: translateX(3px); }
.tt-opp.out { opacity: .45; }
.tt-opp-board { display: block; border-radius: 4px; }
.tt-opp-meter { position: absolute; left: 5px; bottom: 26px; width: 4px; border-radius: 2px; background: linear-gradient(#ff4d6d, #ff9f40); height: 0; transition: height .15s; }
.tt-opp-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-more { align-self: center; font-size: 22px; font-weight: 800; color: var(--text-2); }
.tt-results { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; border-radius: 20px; background: rgba(12,15,28,.94); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); min-width: 300px; animation: pop .3s; }
.tt-results h3 { margin: 0 0 6px; }
.tt-results .rank-row { width: 100%; align-items: center; }
.tt-lobby { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; width: 100%; max-width: 1000px; }
.tt-lobby h3 { margin: 0 0 6px; font-size: 22px; }
.tt-lobby-main { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tt-lobby-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.tt-lobby h4 { margin: 10px 0 0; }
.tt-keys { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--text-2); }
.tt-keys kbd { min-width: 0; margin-right: 6px; padding: 2px 7px; font-size: 12px; }
.tt-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; width: 100%; }
.tt-skin { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.tt-skin canvas { image-rendering: auto; }
.tt-skin small { font-size: 11.5px; color: var(--text-2); }
.tt-skin.active { box-shadow: inset 0 0 0 2px var(--blue); background: rgba(61,139,255,.12); }
.tt-skin.locked { opacity: .45; cursor: not-allowed; }
.tt-skin.locked canvas { filter: grayscale(1) blur(.5px); }
.tt-touch { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; width: 100%; max-width: 420px; user-select: none; -webkit-user-select: none; }
.tt-touch-btn { grid-column: span 3; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 20px; line-height: 1; touch-action: none; -webkit-touch-callout: none; }
.tt-touch-btn:nth-child(n+5) { grid-column: span 4; }
.tt-touch-btn small { font-size: 9.5px; font-weight: 600; color: var(--text-3); letter-spacing: .3px; }
.tt-touch-btn.hard { background: linear-gradient(135deg, rgba(61,139,255,.35), rgba(255,79,163,.35)); }
.tt-touch-btn:active { background: rgba(61,139,255,.35); }
@media (max-width: 900px) { .tt-lobby { grid-template-columns: 1fr; } .tt-side { width: 84px; } }

/* =========================================================
   INÍCIO (amigos, conversas diretas)
   ========================================================= */
.rail-home { position: relative; border-radius: 16px; transition: transform .15s; }
.rail-home:hover { transform: scale(1.05); }
.rail-home.active .rail-brand { box-shadow: 0 0 0 3px rgba(255,255,255,.85), var(--glow); }
.rail-home::before { content: ''; position: absolute; left: -12px; top: 50%; width: 5px; height: 0; border-radius: 0 4px 4px 0; background: #fff; transform: translateY(-50%); transition: height .2s; }
.rail-home.active::before { height: 36px; }
.rail-badge { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 0 0 3px var(--bg); }
.home { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-head { height: 58px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(8,10,18,.35); backdrop-filter: blur(12px); }
.home-title { display: flex; align-items: center; gap: 8px; font-size: 16px; padding-right: 18px; border-right: 1px solid var(--line-2); }
.home-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.home-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.home-tabs button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.home-tabs button.active { background: rgba(255,255,255,.1); color: var(--text); }
.home-tabs button.add { background: rgba(61,220,151,.16); color: var(--green); }
.home-tabs button.add.active { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1px rgba(61,220,151,.5); }
.count-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.home-body { flex: 1; min-height: 0; display: flex; }
.home-main { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 26px; display: flex; flex-direction: column; gap: 18px; }
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: 20px; background: radial-gradient(circle at 0 0, rgba(47,123,255,.3), transparent 55%), radial-gradient(circle at 100% 100%, rgba(255,79,163,.25), transparent 55%), rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line-2); }
.home-hero h2 { margin: 0 0 4px; font-size: 24px; }
.home-hero p { margin: 0; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--text-3); padding: 0 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.friend-list { display: flex; flex-direction: column; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; cursor: pointer; border-top: 1px solid var(--line); }
.friend-row:first-of-type { border-top: 0; }
.friend-row:hover { background: rgba(255,255,255,.05); border-color: transparent; }
.friend-row.offline .avatar { filter: grayscale(.5); opacity: .75; }
.friend-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.friend-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-info b .muted { font-weight: 500; font-size: 13px; opacity: 0; transition: opacity .15s; }
.friend-row:hover .friend-info b .muted { opacity: 1; }
.friend-info small { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-actions { display: flex; align-items: center; gap: 8px; }
.round-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--text-2); transition: background .15s, color .15s; }
.round-btn:hover { background: rgba(255,255,255,.14); color: var(--text); }
.round-btn.ok:hover { color: var(--green); }
.round-btn.bad:hover { color: var(--red); }
.member-av .presence { box-shadow: 0 0 0 3px var(--bg-2); }
.friend-row .member-av .presence { width: 14px; height: 14px; }
.friend-row.online .presence, .dm-row.online .presence { background: var(--green); }
.home-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 50px 20px; }
.home-empty-ic { font-size: 56px; margin-bottom: 6px; }
.add-pane { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
.add-pane h3 { margin: 0; font-size: 18px; }
.add-pane p { margin: 0; }
.add-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 14px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line-2); }
.add-box:focus-within { box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 4px rgba(61,139,255,.12); }
.add-box .at { font-size: 18px; font-weight: 800; color: var(--text-3); }
.add-box .input { flex: 1; background: none; border: 0; box-shadow: none !important; padding: 10px 4px; font-size: 16px; }
.add-msg { min-height: 20px; font-size: 14px; }
.add-msg.ok { color: var(--green); }
.add-msg.bad { color: #ff8aa0; }
.my-tag { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(61,139,255,.08); font-size: 14px; }
.home-now { width: 320px; flex: none; overflow-y: auto; padding: 18px 16px; border-left: 1px solid var(--line); background: rgba(8,10,18,.3); display: flex; flex-direction: column; gap: 10px; }
.home-now h4 { margin: 8px 0 2px; font-size: 15px; }
.home-now > p { margin: 0 0 6px; }
.now-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.now-card.call { cursor: default; background: rgba(61,220,151,.06); box-shadow: inset 0 0 0 1px rgba(61,220,151,.25); }
.now-card .btn { align-self: flex-start; }
.now-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.now-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-game { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.25); }
.now-game > span { font-size: 24px; }
.now-game b { display: block; font-size: 14px; }
.now-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.now-group { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.04); }
.now-group:hover { background: rgba(61,139,255,.14); }
.now-group span { font-size: 24px; }
.now-group small { font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.side-nav { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; text-align: left; }
.side-nav:hover { background: rgba(255,255,255,.06); color: var(--text); }
.side-nav.active { background: rgba(255,255,255,.1); color: var(--text); }
.side-nav span:not(.count-badge) { flex: 1; }
.sidebar-section.with-action { display: flex; align-items: center; justify-content: space-between; }
.dm-row { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; text-align: left; }
.dm-row:hover { background: rgba(255,255,255,.05); }
.dm-row.active { background: rgba(255,255,255,.1); }
.dm-row.offline .avatar { opacity: .7; }
.dm-row .member-info { flex: 1; }
.dm-row.unread b { color: #fff; }
.dm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex: none; }
.dm-call { color: var(--green); }
.side-empty { padding: 4px 12px; line-height: 1.4; }
@media (max-width: 1100px) { .home-now { display: none; } }
@media (max-width: 720px) { .home-head { padding: 0 10px; gap: 8px; } .home-title { display: none; } .home-main { padding: 14px; } .friend-actions .round-btn { width: 34px; height: 34px; } }
.side-nav { justify-content: flex-start; }
.side-nav span:not(.count-badge) { text-align: left; }
.dm-row .member-info { text-align: left; }
.coop-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coop-intro > div { padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(61,139,255,.12), rgba(255,79,163,.1)); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.coop-intro small { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.kb-legend { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); }
.kb-legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; font-size: 12.5px; color: var(--text-2); }
.kb-legend kbd { min-width: 0; margin-right: 6px; padding: 1px 6px; font-size: 11.5px; }
@media (max-width: 720px) { .coop-intro { grid-template-columns: 1fr; } }

/* =========================================================
   CELULAR (ajustes gerais) + avisos do Modo Coop
   ========================================================= */
.side-nav > span.ic { flex: none; }
.pc-only-pill { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: rgba(255,204,77,.14); color: var(--yellow); }
.mobile-warn { margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,204,77,.1); box-shadow: inset 0 0 0 1px rgba(255,204,77,.3); color: #ffe4a3; font-size: 13.5px; }
.tile-coop.disabled { background: rgba(0,0,0,.65); box-shadow: none; }
.mobile-coop-note { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.mobile-coop-ic { font-size: 54px; }
.mobile-coop-note b { font-size: 17px; }
.mobile-coop-note p { margin: 4px 0; }
@media (max-width: 720px) {
  .home-tabs { flex-wrap: nowrap; }
  .home-tabs button { padding: 6px 9px; font-size: 13px; }
  .home-hero { padding: 16px; }
  .home-hero h2 { font-size: 20px; }
  .hero-actions .btn { flex: 1 1 auto; padding: 9px 12px; font-size: 14px; }
  .add-box { flex-wrap: wrap; padding: 8px; }
  .add-box .input { min-width: 0; }
  .add-box .btn { width: 100%; }
  .friend-row { padding: 10px 4px; gap: 10px; }
  .friend-actions { gap: 4px; }
  .call-controls { left: 6px; right: 6px; transform: none; justify-content: flex-start; }
  .stage-wrap.idle .call-controls { transform: translateY(20px); }
  .cc-group { gap: 3px; }
  .cc-group + .cc-group { padding-left: 5px; }
  .cc-btn { width: 40px; height: 40px; border-radius: 12px; }
  .cc-arrow { width: 18px; }
  .cc-btn.danger { width: 48px; }
  .tt-main { flex-wrap: nowrap; gap: 6px; }
  .tt-side { width: 62px; gap: 6px; }
  .tt-box { padding: 5px; }
  .tt-stats .tt-stat:nth-child(n+3) { display: none; }
  .tt-stat b { font-size: 14px; }
  .tt-top { flex-wrap: wrap; gap: 6px; }
  .tt-xp small { display: none; }
  .tt-arena { gap: 10px; }
  .tt-opps { min-width: 100%; }
  .game-head { padding: 10px; gap: 8px; }
  .game-players { order: 3; flex-basis: 100%; }
  .hub { padding: 14px; }
  .hub-coop { flex-direction: column; gap: 6px; }
  .modal-body { padding: 8px 16px 16px; }
  .modal-head { padding: 14px 14px 4px 16px; }
  .modal-actions { padding: 12px 16px 16px; }
  .modal-actions .btn { flex: 1 1 auto; }
  .sticker-grid { grid-template-columns: repeat(3, 1fr); }
  .emoji-grid { grid-template-columns: repeat(7, 1fr); }
  .studio-tools .tool-btn { min-width: 56px; padding: 8px; }
  .profile-pop { max-height: calc(100dvh - 16px); }
  .msg-tools { right: 6px; }
  .room.with-stage .chat { height: 45%; }
  .tile-coop { font-size: 12.5px; padding: 7px 12px; }
}

/* ---------- Tetris no celular: só o seu tabuleiro, grande ---------- */
.tt-main.mobile { flex-direction: column; align-items: center; flex-wrap: nowrap; gap: 8px; width: 100%; }
.tt-mrow { display: flex; align-items: stretch; justify-content: center; gap: 6px; width: 100%; max-width: 420px; }
.tt-mrow .tt-box { padding: 4px 6px; gap: 3px; }
.tt-mrow .tt-box.next { flex: 1; }
.tt-next-row { display: flex; gap: 6px; align-items: center; }
.tt-stats.row { flex-direction: row; gap: 4px; }
.tt-stats.row .tt-stat { display: flex; flex-direction: column; justify-content: center; padding: 4px 6px; text-align: center; }
.tt-stats.row .tt-stat:nth-child(n+3) { display: none; }
.tt-stats.row .tt-stat b { font-size: 14px; }
.tt-opp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.tt-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-chip em { font-style: normal; font-weight: 800; color: #ff7a59; }
.games-view.tetris-full { display: flex; flex-direction: column; }
.games-view.tetris-full > :last-child { flex: 1; min-height: 0; overflow: auto; }
@media (max-width: 640px) {
  .games-view.tetris-full .game-head { padding: 6px 10px; }
  .games-view.tetris-full .game-players, .games-view.tetris-full .game-title small { display: none; }
  .games-view.tetris-full .tt-top { display: none; }
  .tt-main.mobile .tt-touch { max-width: 420px; }
  .tt-main.mobile .tt-touch-btn { height: 56px; }
}

/* ---------- Painel do site (só o dono) ---------- */
.email-nudge { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.admin-main { gap: 0; }
.admin { display: flex; flex-direction: column; gap: 16px; max-width: 1280px; width: 100%; margin: 0 auto; }
.admin-loading { padding: 40px; text-align: center; }
.admin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-top h2 { margin: 0 0 2px; font-size: 22px; }
.admin-top p { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line); }
.kpi small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.kpi b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.kpi span { font-size: 12px; color: var(--text-3); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.viz-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.viz-card > p { margin: 0; }
.viz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.viz-head h3 { margin: 0; font-size: 16px; }
.viz-head .input { max-width: 300px; }
.viz-head .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--line); flex-wrap: wrap; }
.viz-head .seg button { padding: 5px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); }
.viz-head .seg button.active { background: rgba(61,139,255,.2); color: var(--text); }
/* colunas por dia */
.col-plot { position: relative; height: 200px; margin: 14px 0 0 30px; }
.grid-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgba(255,255,255,.06); }
.grid-line span { position: absolute; right: calc(100% + 6px); top: -8px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.col-slot { flex: 1; display: flex; align-items: flex-end; justify-content: center; cursor: default; border-radius: 4px; }
.col-slot.hover { background: rgba(255,255,255,.04); }
.col-slot i { display: block; width: 100%; max-width: 24px; background: var(--blue); border-radius: 4px 4px 0 0; }
.col-slot.hover i { filter: brightness(1.2); }
.col-labels { display: flex; gap: 2px; margin-left: 30px; }
.col-labels span { flex: 1; font-size: 10.5px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: visible; }
.viz-tip { position: absolute; top: -10px; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 10px; background: var(--panel-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); pointer-events: none; white-space: nowrap; z-index: 2; display: flex; flex-direction: column; }
.viz-tip small { font-size: 11px; color: var(--text-2); }
.viz-tip b { font-size: 13.5px; }
/* ranking de funções */
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 74px; align-items: center; gap: 10px; font-size: 13px; }
.hbar-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 14px; display: flex; align-items: center; }
.hbar-track i { display: block; height: 14px; background: var(--blue); border-radius: 0 4px 4px 0; }
.hbar:hover .hbar-track i { filter: brightness(1.2); }
.hbar-val { display: flex; flex-direction: column; text-align: right; line-height: 1.1; }
.hbar-val b { font-variant-numeric: tabular-nums; }
.hbar-val small { font-size: 10.5px; color: var(--text-3); }
.viz-card > .btn { align-self: flex-start; }
/* tabela de usuários */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 980px; }
.admin-table th { text-align: left; padding: 8px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; color: var(--text-3); border-bottom: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; user-select: none; }
.admin-table th.sorted { color: var(--text); }
.admin-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table td.num { font-variant-numeric: tabular-nums; }
.admin-table tbody tr:not(.detail) { cursor: pointer; }
.admin-table tbody tr:not(.detail):hover, .admin-table tr.open { background: rgba(255,255,255,.035); }
.admin-table .au { display: flex; align-items: center; gap: 8px; }
.admin-table .au div { display: flex; flex-direction: column; line-height: 1.15; }
.admin-table .au small { color: var(--text-3); font-size: 11.5px; }
.on-pill { color: var(--green); font-weight: 600; }
.feat-chip { display: inline-flex; align-items: center; gap: 5px; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 12px; }
.feat-chip em { font-style: normal; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.admin-table tr.detail td { white-space: normal; background: rgba(0,0,0,.18); }
.detail-box { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
.detail-facts { display: flex; gap: 18px; flex-wrap: wrap; }
.detail-facts span { display: flex; flex-direction: column; }
.detail-facts small { font-size: 11px; color: var(--text-3); }
.detail-feats { display: flex; flex-wrap: wrap; }
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 21px; }
  .viz-card { padding: 12px; }
  .viz-head .input { max-width: none; }
  .col-labels span:nth-child(5n+5):not(:nth-child(10n)) { visibility: hidden; }
  .hbar { grid-template-columns: minmax(0, 1fr) 64px; gap: 4px 8px; }
  .hbar-label { grid-column: 1 / -1; }
  .admin-top h2 { font-size: 19px; }
}
.home-title.keep { display: flex !important; }

/* =====================================================================
   CANAIS, CLASSES, COMANDOS E KENBEAT
   ===================================================================== */
.channel-list { display: flex; flex-direction: column; gap: 1px; }
.ch-section { margin-top: 14px; }
.ch-section:first-child { margin-top: 4px; }
.channel { position: relative; gap: 8px; padding: 7px 10px; }
.channel .ch-ic { display: grid; place-items: center; font-size: 16px; flex: none; }
.ch-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel.unread { color: var(--text); font-weight: 700; }
.channel.unread::before { content: ''; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: #fff; }
.channel.active:not(.voice) { background: rgba(61,139,255,.16); color: var(--text); }
.channel.voice.active { background: rgba(61,220,151,.1); }
.channel.voice.connected { color: var(--green); }
.channel.voice.connected .ch-name { font-weight: 700; }
.channel.no-enter { opacity: .75; }
.channel.drop { box-shadow: inset 0 0 0 2px var(--green); }
.ch-flag { display: grid; place-items: center; color: var(--text-3); flex: none; }
.ch-gear { display: none; flex: none; width: 22px; height: 22px; place-items: center; border-radius: 6px; color: var(--text-3); }
.ch-gear:hover { color: var(--text); background: rgba(255,255,255,.08); }
.channel:hover .ch-gear { display: grid; }
@media (pointer: coarse) { .ch-gear { display: grid; } }
.call-count.full { background: var(--red); color: #fff; }
.live-pill.sm { font-size: 9px; padding: 1px 5px; }
.voice-block .voice-users { padding: 2px 0 6px 26px; }
.voice-user .vu-name small { color: var(--text-3); font-size: 12px; }
.voice-user.bot { cursor: default; }
.voice-user.bot .vu-name { display: flex; gap: 4px; align-items: baseline; }
.voice-user.bot .vu-name b { color: #c7a4ff; font-weight: 700; flex: none; }
.voice-user.bot .vu-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: linear-gradient(135deg, #7b5cff, #ff4fa3); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.eq i { display: block; width: 3px; background: #c7a4ff; border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.srv-mute { color: var(--red); display: grid; }
.role-head { color: var(--rc, var(--text-3)); }
.crown { font-size: 12px; }
.chat-topic { color: var(--text-3); font-size: 13px; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chat-topic:empty { display: none; }
.chat-icon .ic { color: var(--text-3); display: grid; }
.composer.readonly { opacity: .6; }
.composer.readonly textarea { cursor: not-allowed; }
@media (max-width: 720px) { .chat-topic { display: none; } }

/* ----- lista de comandos ----- */
.composer-wrap { position: relative; }
.cmd-pop { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 8px); z-index: 20; max-height: min(360px, 50vh); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--panel-solid); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); }
.cmd-head { padding: 6px 10px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); }
.cmd-group { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.cmd-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; text-align: left; }
.cmd-row.sel, .cmd-row:hover { background: rgba(61,139,255,.16); }
.cmd-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.cmd-main { flex: 1; min-width: 0; }
.cmd-main b { font-weight: 700; }
.cmd-args { color: var(--text-3); font-family: ui-monospace, monospace; font-size: 12.5px; }
.cmd-main small { display: block; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-row kbd { min-width: 0; font-size: 11px; padding: 2px 7px; }

/* ----- mensagens do bot, ações e enquetes ----- */
.msg.bot .bot-av { width: 40px; height: 40px; font-size: 20px; }
.bot-name { color: #c7a4ff; }
.bot-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: #7b5cff; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .4px; line-height: 16px; vertical-align: 1px; }
.bot-by { font-size: 12px; color: var(--text-3); }
.only-you { font-size: 12px; color: var(--text-3); }
.msg.bot.local { background: rgba(123,92,255,.07); border-left: 3px solid #7b5cff; padding-left: 17px; }
.local-x { position: absolute; right: 12px; top: 6px; opacity: .6; }
.track-card { display: flex; gap: 12px; align-items: center; max-width: 460px; margin-top: 6px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); color: inherit; text-decoration: none; }
.track-card:hover { background: rgba(255,255,255,.07); }
.track-card img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.track-card.now { box-shadow: inset 0 0 0 1px rgba(199,164,255,.4); background: linear-gradient(135deg, rgba(123,92,255,.12), rgba(255,79,163,.08)); }
.track-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-info b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.track-info small { color: var(--text-2); font-size: 12px; }
.msg.action { color: var(--text-2); align-items: center; gap: 8px; font-size: 15px; }
.msg.action time { margin-left: 8px; font-size: 12px; color: var(--text-3); }
.poll-card { display: flex; flex-direction: column; gap: 6px; max-width: 460px; margin-top: 4px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.poll-q { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.poll-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); overflow: hidden; text-align: left; }
.poll-opt i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(61,139,255,.22); transition: width .3s; }
.poll-opt.mine { box-shadow: inset 0 0 0 2px var(--blue); }
.poll-opt span, .poll-opt b { position: relative; }
.poll-opt b { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ----- KenBeat: player escondido + bloco no palco ----- */
.yt-host { position: fixed; right: 0; bottom: 0; width: 2px; height: 2px; overflow: hidden; opacity: .01; pointer-events: none; z-index: -1; }
.tile-custom { position: absolute; inset: 0; display: none; }
.tile.is-custom video, .tile.is-custom .tile-avatar { display: none; }
.tile.is-custom .tile-custom { display: block; }
.mb-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.4) brightness(.45); }
.music-box { position: absolute; inset: 0; display: flex; align-items: center; gap: clamp(10px, 4cqmin, 26px); padding: clamp(12px, 5cqmin, 32px); padding-bottom: 48px; }
.mb-cover { position: relative; flex: none; width: clamp(64px, 34cqmin, 220px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); }
.mb-cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.mb-disc { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7b5cff, #ff4fa3); font-size: 15px; animation: spin 4s linear infinite; }
.mb-cover.paused .mb-disc { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
.mb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mb-bot { font-size: 12px; color: #e3d6ff; font-weight: 600; }
.mb-title { font-size: clamp(15px, 5.5cqmin, 26px); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mb-sub { color: rgba(255,255,255,.7); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-bar { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; cursor: pointer; }
.mb-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7b5cff, #ff4fa3); border-radius: 3px; transition: width .9s linear; }
.mb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mb-time { font-size: 12px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.mb-ctl { display: flex; gap: 4px; }
.mb-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; }
.mb-btn:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.mb-btn.on { background: rgba(199,164,255,.4); }
.mb-btn:disabled { opacity: .4; cursor: not-allowed; }
.mb-queue { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 12.5px; }
.mb-queue > small { color: rgba(255,255,255,.6); font-weight: 700; font-size: 11px; letter-spacing: .3px; text-transform: uppercase; }
.mb-q { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.mb-q > span:first-child { color: rgba(255,255,255,.5); width: 14px; flex: none; }
.mb-q-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-q small { color: rgba(255,255,255,.5); flex: none; }
.mb-empty { color: rgba(255,255,255,.55); font-size: 12px; }
@container (max-height: 260px) { .mb-queue, .mb-empty, .mb-sub { display: none; } }
@container (max-width: 340px) { .mb-cover { display: none; } }
.now-music { color: #c7a4ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----- criar/editar canal ----- */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kind-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.kind-card.active { box-shadow: inset 0 0 0 2px var(--blue); background: rgba(61,139,255,.12); }
.kind-card b { display: block; }
.kind-card small { color: var(--text-2); font-size: 12px; }
.kind-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: rgba(255,255,255,.07); }
.name-row { display: flex; gap: 8px; }
.name-row .input { flex: 1; min-width: 0; }
.emoji-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; font-size: 20px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.section-label { margin: 16px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); }
.role-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.role-picks.col { flex-direction: column; }
.role-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; }
.role-picks.col .role-pick { border-radius: 10px; padding: 9px 12px; }
.role-picks.col .role-pick .ic { margin-left: auto; }
.role-pick i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); flex: none; }
.role-pick.on { box-shadow: inset 0 0 0 2px var(--rc); background: color-mix(in srgb, var(--rc) 18%, transparent); }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 12px; }
.role-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }

/* ----- configurações do grupo ----- */
.roles-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.role-list { display: flex; flex-direction: column; gap: 3px; }
.role-list > .btn { margin-top: 8px; align-self: flex-start; }
.role-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; text-align: left; }
.role-item:hover { background: rgba(255,255,255,.05); }
.role-item.active { background: rgba(61,139,255,.15); }
.role-item i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.role-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.role-item small { color: var(--text-3); font-size: 11.5px; }
.role-editor { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.role-editor h4 { margin: 0 0 8px !important; }
.role-editor-head { display: flex; align-items: center; justify-content: space-between; }
.role-move { display: flex; gap: 4px; }
.role-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(0,0,0,.25); }
.perm-list .switch-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.perm-list .switch-row.danger b { color: #ff8aa0; }
.perm-list input:disabled + .switch { opacity: .35; }
.role-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.invite-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.invite-code { padding: 8px 14px; border-radius: 10px; background: rgba(0,0,0,.3); font-size: 18px; letter-spacing: 2px; font-weight: 700; }
.member-admin { display: flex; flex-direction: column; margin-top: 10px; }
.ma-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ma-info { display: flex; flex-direction: column; min-width: 120px; }
.ma-info small { color: var(--text-3); font-size: 12px; }
.ma-roles { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.ca-actions-top { display: flex; gap: 8px; flex-wrap: wrap; }
.ca-row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ca-row small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-actions { display: flex; gap: 4px; margin-left: auto; }
@media (max-width: 720px) {
  .roles-layout { grid-template-columns: 1fr; }
  .kind-pick { grid-template-columns: 1fr; }
  .group-settings .settings { flex-direction: column; }
  .ma-row { flex-wrap: wrap; }
  .cmd-pop { left: 8px; right: 8px; }
}
.chat-title b { flex: 0 1 auto; }
.room.with-stage .chat-topic { display: none; }
#msg-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.side-nav { text-decoration: none; } .side-nav > span.pc-only-pill { flex: none; margin-left: 0; }
a.btn { text-decoration: none; color: inherit; }

/* ----- Modo Coop: trocar teclas ----- */
.tile-coop-keys { position: absolute; left: 10px; top: 10px; z-index: 6; padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.tile-coop-keys:hover { background: rgba(61,139,255,.55); }
.tile.capturing .tile-coop-keys { opacity: .35; }
.keymap .km-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin: 10px 0 6px; }
.km-group { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.km-group h5 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); }
.km-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.km-row:first-of-type { border-top: 0; }
.km-row.capturing { background: rgba(61,139,255,.1); border-radius: 8px; }
.km-label { font-size: 13px; flex: 1; min-width: 0; }
.km-keys { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.km-key { display: inline-flex; align-items: center; gap: 4px; min-width: 30px; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.08); box-shadow: inset 0 -2px 0 rgba(0,0,0,.35), inset 0 0 0 1px var(--line-2); font-size: 12px; font-weight: 700; }
.km-key i { font-style: normal; color: var(--text-3); font-weight: 400; }
.km-key:hover { background: rgba(255,77,109,.25); }
.km-add { width: 26px; height: 24px; border-radius: 7px; background: rgba(61,139,255,.18); color: var(--blue); font-weight: 800; }
.km-capture { padding: 3px 10px; border-radius: 7px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; animation: kmPulse 1.2s infinite; }
@keyframes kmPulse { 50% { opacity: .55; } }
.km-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 8px; }
.km-opts .field { grid-column: 1 / -1; }
@media (max-width: 720px) { .km-opts { grid-template-columns: 1fr; } }
.coop-share { display: flex; flex-direction: column; gap: 10px; }
.game-share { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(61,139,255,.1), rgba(255,79,163,.08)); box-shadow: inset 0 0 0 1px var(--line-2); }
.game-share-head { display: flex; flex-direction: column; gap: 2px; }
.game-share-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-share-opts .field { margin: 0; }
.game-share > .btn { align-self: flex-start; }
@media (max-width: 720px) { .game-share-opts { grid-template-columns: 1fr; } }

/* =====================================================================
   KENFEH — IDENTIDADE PRÓPRIA ("neon arcade")
   Assinatura: canto cortado + sombra neon deslocada (ciano/rosa), títulos
   em Unbounded, rosa quente como cor principal e textura de grade no fundo.
   ===================================================================== */
:root {
  --bg: #06070d;
  --bg-2: #0b0d18;
  --panel: rgba(12, 14, 27, .84);
  --panel-solid: #0e1121;
  --ink: #0b0d1a;
  --pink: #ff3d9a;
  --pink-2: #ff6fb4;
  --cyan: #29d9ff;
  --blue: #3d7bff;
  --violet: #9b5cff;
  --grad: linear-gradient(120deg, #ff3d9a 0%, #b44dff 55%, #3d7bff 100%);
  --glow: 4px 4px 0 rgba(41, 217, 255, .9);
  --display: 'Unbounded', 'Outfit', system-ui, sans-serif;
  --cut: 9px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
::selection { background: rgba(255, 61, 154, .45); }
::-webkit-scrollbar-thumb { background: rgba(255, 61, 154, .22); }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 61, 154, .4); }

/* fundo: brilho rosa/azul + grade fininha */
.bg-blobs span:nth-child(1) { background: #3d7bff; opacity: .16; }
.bg-blobs span:nth-child(2) { background: #ff3d9a; opacity: .2; }
.bg-blobs span:nth-child(3) { background: #29d9ff; opacity: .07; }
.bg-blobs::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 75%); }

/* títulos com a fonte da marca */
.brand h1, .modal-head h3, .settings-pane h3, .home-hero h2, .chat-empty h3, .admin-top h2, .hub h3, .tt-lobby h3, .home-title b, .sidebar-title, .viz-head h3, .coop-dialog .coop-step-body > b, .game-title b, .mb-title {
  font-family: var(--display);
  letter-spacing: -.02em;
}
.sidebar-title, .home-title b { font-size: 14.5px; font-weight: 700; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.settings-pane h3 { font-size: 19px; }
.sidebar-section, .list-label, .cmd-head, .section-label, .km-group h5, .role-head { font-family: var(--display); font-size: 10.5px; letter-spacing: .08em; }

/* ----- botões ----- */
.btn { border-radius: 10px; font-weight: 700; letter-spacing: .01em; }
.btn-primary { position: relative; isolation: isolate; background: transparent; color: #fff; box-shadow: none; border-radius: 0; }
.btn-primary::before, .btn-primary::after { content: ''; position: absolute; inset: 0; clip-path: var(--chamfer); transition: transform .15s ease, filter .15s; }
.btn-primary::before { z-index: -1; background: linear-gradient(135deg, #ff5aa8, #ff2f8f); }
.btn-primary::after { z-index: -2; background: var(--cyan); transform: translate(3px, 3px); }
.btn-primary:hover { box-shadow: none; }
.btn-primary:hover::before { transform: translate(-1px, -1px); filter: brightness(1.08); }
.btn-primary:hover::after { transform: translate(4px, 4px); }
.btn-primary:active { transform: none; }
.btn-primary:active::before { transform: translate(2px, 2px); }
.btn-primary:disabled::after { opacity: .3; }
.btn-ghost { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .15s, background .15s, transform .15s; }
.btn-ghost:hover { background: rgba(41,217,255,.07); box-shadow: inset 0 0 0 1.5px rgba(41,217,255,.6), 3px 3px 0 rgba(41,217,255,.35); }
.btn-danger { background: rgba(255,77,109,.1); box-shadow: inset 0 0 0 1.5px rgba(255,77,109,.5); }
.btn-danger:hover { background: rgba(255,77,109,.18); box-shadow: inset 0 0 0 1.5px rgba(255,77,109,.8), 3px 3px 0 rgba(255,77,109,.35); }
.btn-call { border-radius: 10px; }
.icon-btn { border-radius: 9px; }
.icon-btn:hover { background: rgba(255,61,154,.12); color: #fff; }

/* ----- campos ----- */
.input { border-radius: 10px; background: rgba(6,7,13,.7); border: 1.5px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: rgba(255,255,255,.2); }
.input:focus { border-color: var(--cyan); box-shadow: 3px 3px 0 rgba(255,61,154,.55); }
.composer { border-radius: 14px; background: rgba(10,12,24,.85); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.composer:focus-within { box-shadow: inset 0 0 0 1.5px rgba(41,217,255,.55), 3px 3px 0 rgba(255,61,154,.45); }
.switch-row input:checked + .switch { background: var(--pink); box-shadow: 2px 2px 0 rgba(41,217,255,.7); }
input[type=range]::-webkit-slider-thumb { background: #fff; box-shadow: 2px 2px 0 var(--pink); }

/* ----- abas e seletores ----- */
.seg button.active, .panel-tabs button.active, .home-tabs button.active { background: rgba(255,61,154,.16); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,61,154,.55); }
.auth-tab-indicator { background: linear-gradient(135deg, #ff5aa8, #ff2f8f) !important; box-shadow: 3px 3px 0 var(--cyan) !important; border-radius: 10px !important; }
.home-tabs button.add { color: #052; background: var(--cyan); box-shadow: 2px 2px 0 rgba(255,61,154,.8); }

/* ----- login ----- */
.auth-card { border-radius: 22px; background: rgba(10,12,24,.88); box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,61,154,.0); position: relative; }
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 22px 22px 0 0; background: var(--grad); }
.brand-logo { width: 76px; height: 76px; filter: drop-shadow(0 14px 30px rgba(255,61,154,.35)); }
.brand h1 { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.brand h1 span { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--pink); }

/* ----- barra de grupos ----- */
.rail { background: rgba(4,5,10,.75); }
.rail-brand { border-radius: 0; box-shadow: none; filter: drop-shadow(0 6px 14px rgba(255,61,154,.3)); }
.rail-home.active .rail-brand { box-shadow: none; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 6px 16px rgba(255,61,154,.5)); }
.rail-btn { border-radius: 16px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.rail-btn:hover { border-radius: 12px; background: rgba(255,61,154,.12); }
.rail-btn.active { border-radius: 12px; background: rgba(255,61,154,.16); box-shadow: inset 0 0 0 2px var(--pink), 3px 3px 0 var(--cyan); }
.rail-btn::before, .rail-home::before { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.rail-add { color: var(--cyan); }
.rail-add:hover { background: var(--cyan); color: var(--ink); box-shadow: 3px 3px 0 var(--pink); }

/* ----- barra lateral ----- */
.sidebar { background: rgba(9,11,21,.8); }
.side-nav.active, .channel.active:not(.voice) { background: linear-gradient(90deg, rgba(255,61,154,.16), rgba(255,61,154,.03)); color: #fff; box-shadow: inset 3px 0 0 var(--pink); }
.channel.voice.active { background: linear-gradient(90deg, rgba(61,220,151,.14), rgba(61,220,151,.02)); box-shadow: inset 3px 0 0 var(--green); }
.channel:hover, .side-nav:hover { background: rgba(255,255,255,.05); }
.me-bar { background: rgba(4,5,10,.55); }

/* ----- cards ----- */
.hub-card, .now-card, .kpi, .viz-card, .home-hero, .km-group, .role-editor, .game-share, .coop-step, .profile-preview { transition: box-shadow .18s, transform .18s; }
.hub-card { border-radius: 14px; background: linear-gradient(160deg, rgba(255,61,154,.1), rgba(61,123,255,.07)); }
.hub-card:hover { transform: translate(-2px, -2px); box-shadow: inset 0 0 0 1.5px rgba(255,61,154,.6), 4px 4px 0 rgba(41,217,255,.55); }
.now-card:hover, .kpi:hover { box-shadow: inset 0 0 0 1px rgba(41,217,255,.4), 3px 3px 0 rgba(41,217,255,.25); }
.home-hero { border-radius: 18px; background: radial-gradient(circle at 0 0, rgba(255,61,154,.22), transparent 55%), radial-gradient(circle at 100% 100%, rgba(61,123,255,.2), transparent 55%), rgba(255,255,255,.025); }
.home-hero h2 { font-size: 22px; font-weight: 800; }

/* ----- modais e avisos ----- */
.modal { border-radius: 18px; background: rgba(12,14,27,.95); box-shadow: 0 0 0 1px var(--line-2), 0 30px 90px -30px #000; position: relative; }
.modal::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 18px 18px 0 0; background: var(--grad); pointer-events: none; }
.toast { border-radius: 10px; border-left: 0; box-shadow: inset 3px 0 0 var(--pink), 0 0 0 1px var(--line-2), 4px 4px 0 rgba(41,217,255,.25), var(--shadow); }
.toast-success { box-shadow: inset 3px 0 0 var(--green), 0 0 0 1px var(--line-2), 4px 4px 0 rgba(61,220,151,.25), var(--shadow); }
.toast-error { box-shadow: inset 3px 0 0 var(--red), 0 0 0 1px var(--line-2), 4px 4px 0 rgba(255,77,109,.25), var(--shadow); }
.ctx-menu, .popover { border-radius: 12px; }

/* ----- controles da call ----- */
.cc-btn { border-radius: 12px; }
.cc-btn:hover { background: rgba(255,61,154,.16); }
.cc-btn.on { background: rgba(255,61,154,.22); box-shadow: inset 0 0 0 1.5px var(--pink), 2px 2px 0 var(--cyan); }
.cc-btn.danger { background: var(--red); box-shadow: 3px 3px 0 rgba(255,255,255,.18); }
.tile.speaking:not(.is-screen) { box-shadow: 0 0 0 2px var(--green), 4px 4px 0 rgba(61,220,151,.35); }

/* ----- chat ----- */
.msg-head b { font-weight: 700; }
.bot-tag { background: var(--pink); }
.chat-empty-ic { filter: drop-shadow(4px 4px 0 rgba(41,217,255,.35)); }
/* volume do KenBeat (no bloco do bot) */
.mb-vol { display: flex; align-items: center; gap: 6px; }
.mb-vol .mb-btn { width: 30px; height: 30px; }
.mb-range { width: 96px; height: 5px; accent-color: var(--pink); }
.mb-vol-label { min-width: 34px; font-size: 11.5px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.mb-ios { font-size: 11px; color: rgba(255,255,255,.55); }
@container (max-width: 460px) { .mb-range { width: 64px; } .mb-ios { display: none; } }
.auth-card, .modal { overflow: hidden; }
/* itens selecionados no rosa da marca */
.kind-card.active, .choice.active, .tt-skin.active { box-shadow: inset 0 0 0 2px var(--pink), 3px 3px 0 var(--cyan); background: rgba(255,61,154,.1); }
.settings-nav button.active, .role-item.active, .cmd-row.sel, .cmd-row:hover { background: rgba(255,61,154,.14); }
.settings-nav button.active { box-shadow: inset 3px 0 0 var(--pink); }
.role-pick.on { box-shadow: inset 0 0 0 2px var(--rc), 2px 2px 0 var(--cyan); }
.poll-opt.mine { box-shadow: inset 0 0 0 2px var(--pink); }
.poll-opt i { background: rgba(255,61,154,.22); }
.status-pill.on { box-shadow: 2px 2px 0 rgba(41,217,255,.5); }
