:root {
  --rail: #1e1f22; --side: #2b2d31; --main: #313338; --panel: #232428; --input: #383a40; --hover: #35373c; --active: #404249;
  --text: #f2f3f5; --text2: #dbdee1; --muted: #949ba4; --accent: #5865f2; --red: #da373c; --green: #23a55a; --live: #ed4245;
  --tile: #2b2d31;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--rail); color: var(--text);
  font: 15px/1.375 "gg sans", "Segoe UI", "Noto Sans", system-ui, sans-serif; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.grow { flex: 1; }
svg.ic { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }

/* ---------- Entrada ---------- */
.join { height: 100%; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, #404eed 0%, #2b2d84 50%, #1e1f22 100%); }
.join-card { width: 100%; max-width: 440px; background: var(--main); padding: 32px; border-radius: 8px;
  display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 40px #0007; }
.join-card h1 { margin: 0; font-size: 24px; text-align: center; }
.join-card p { margin: -8px 0 4px; text-align: center; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); position: relative; }
.logo-mark::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .02em; }
input, select { background: #1e1f22; border: 0; border-radius: 4px; padding: 10px; outline: none; text-transform: none; font-weight: 400; font-size: 15px; letter-spacing: 0; min-width: 0; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); }
.btn { border: 0; border-radius: 4px; padding: 8px 16px; background: var(--input); font-weight: 600; font-size: 14px; }
.btn:hover { filter: brightness(1.12); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.big { padding: 12px 20px; font-size: 16px; }
.btn.link { background: none; }
.btn.link:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 72px 240px 1fr; height: 100%; }

.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.server-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--main); display: grid; place-items: center; font-weight: 700; padding: 0;
  border: 0; transition: border-radius .15s, background .15s; position: relative; color: var(--text); font-size: 18px; }
.server-icon.active, .server-icon:hover { border-radius: 16px; background: var(--accent); }
.server-icon.active::before { content: ''; position: absolute; left: -16px; width: 8px; height: 40px; border-radius: 0 4px 4px 0; background: #fff; }
.server-icon.add { color: var(--green); font-size: 26px; font-weight: 400; }
.server-icon.add:hover { background: var(--green); color: #fff; }
.rail-sep { width: 32px; height: 2px; background: var(--input); border-radius: 1px; }

.channels { background: var(--side); display: flex; flex-direction: column; min-height: 0; }
.channels-head { height: 48px; padding: 0 12px 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700;
  box-shadow: 0 1px 0 #0003, 0 2px 0 #0000000d; flex: none; }
.channels-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.cat { font-size: 12px; font-weight: 700; color: var(--muted); padding: 16px 8px 4px; letter-spacing: .02em; }
.channel { width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 4px; background: none;
  color: var(--muted); font-weight: 500; text-align: left; margin: 1px 0; }
.channel span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel:hover { background: var(--hover); color: var(--text2); }
.channel.active { background: var(--active); color: #fff; }
.unread { background: var(--red); color: #fff; border-radius: 8px; font-size: 12px; padding: 0 6px; min-width: 16px; text-align: center; }

.voice-list, .online-list { list-style: none; margin: 0; padding: 0 0 0 24px; }
.online-list { padding-left: 0; }
.voice-list li, .online-list li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 4px; color: var(--muted); font-size: 14px; }
.voice-list li:hover, .online-list li:hover { background: var(--hover); color: var(--text2); }
.voice-list .nm, .online-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-list .flags { display: flex; gap: 2px; color: var(--muted); }
.voice-list .flags svg { width: 16px; height: 16px; }
.voice-list .flags .off { color: var(--red); }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; flex: none;
  font-size: 14px; position: relative; transition: box-shadow .1s; }
.avatar.sm { width: 32px; height: 32px; }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.speaking .avatar.xs, .avatar.speaking { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--green); }
.badge-live { background: var(--live); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .03em; flex: none; line-height: 16px; }
button.badge-live { border: 0; }

.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 4px; background: none; color: var(--muted); display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text2); }
.icon-btn.off { color: var(--red); }

.voice-panel { background: var(--panel); border-bottom: 1px solid #ffffff0f; padding: 8px; flex: none; }
.vp-top { display: flex; align-items: center; justify-content: space-between; padding: 0 0 8px 4px; }
.vp-status { color: var(--green); font-weight: 700; font-size: 14px; }
.vp-status.bad { color: #f0b232; }
.vp-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
#albumAoVivo { cursor: pointer; }
.vp-btn { border: 0; border-radius: 4px; background: var(--input); color: var(--text2); height: 32px; display: grid; place-items: center; }
.vp-btn:hover { background: #4e5058; }
.vp-btn.on { background: var(--green); color: #fff; }
.vp-btn.on.live { background: var(--live); }

.user-panel { background: var(--panel); height: 52px; padding: 0 8px; display: flex; align-items: center; gap: 2px; flex: none; }
.up-me { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px; border-radius: 4px; }
.up-names { min-width: 0; }
.up-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Centro ---------- */
.center { background: var(--main); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.center-head { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; font-weight: 700;
  box-shadow: 0 1px 0 #0003, 0 2px 0 #0000000d; z-index: 1; }
.center-head > i { color: var(--muted); }
.center-head .menu { display: none; }
.center-body { flex: 1; display: flex; min-height: 0; }

.voice-view { flex: 1; position: relative; background: #000; display: flex; flex-direction: column; min-width: 0; }
.view-text .voice-view { display: none; }
.view-voice .chat { width: 340px; flex: none; border-left: 1px solid #0003; }
.view-voice.chat-closed .chat { display: none; }
.view-text .center-head #btnChat { display: none; }

.voice-intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; background: var(--rail); }
.voice-intro h2 { margin: 4px 0 0; }
.vi-icon svg { width: 56px; height: 56px; color: var(--muted); }
.vi-avatars { display: flex; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; justify-content: center; }
.vi-avatars .avatar { width: 48px; height: 48px; font-size: 18px; }

.stage { flex: 1; display: grid; gap: 8px; padding: 16px; min-height: 0; overflow-y: auto; align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.stage:empty { display: none; }
.stage.focus { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.stage.focus .tile { flex: 0 0 200px; height: 112px; aspect-ratio: auto; }
.stage.focus .tile.big { flex: 1 0 100%; height: calc(100% - 128px); order: -1; }

.tile { position: relative; background: var(--tile); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; cursor: pointer; min-height: 0; }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: 8px; pointer-events: none; transition: box-shadow .1s; }
.tile.speaking::after { box-shadow: inset 0 0 0 3px var(--green); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.tile video.cam { object-fit: cover; }
.tile video.screen { object-fit: contain; }
.tile video.mirror { transform: scaleX(-1); }
.tile .t-avatar { position: absolute; inset: 0; display: grid; place-items: center; }
.tile .t-avatar .avatar { width: 80px; height: 80px; font-size: 32px; }
.stage.focus .tile:not(.big) .t-avatar .avatar { width: 44px; height: 44px; font-size: 18px; }
.tile .t-name { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; background: #000000a0; padding: 2px 8px; border-radius: 4px;
  font-size: 13px; font-weight: 600; max-width: calc(100% - 16px); }
.tile .t-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-name svg { width: 16px; height: 16px; color: var(--red); }
.tile .t-live { position: absolute; left: 8px; top: 8px; }
.tile .t-stats { position: absolute; right: 8px; top: 8px; background: #000000a0; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: #ccc; }
.tile .t-stats:empty { display: none; }
.tile .t-watch { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle, #3b3d4a 0%, #1e1f22 100%); }
.tile .t-watch .btn { background: #ffffff1f; backdrop-filter: blur(4px); }
.tile .t-watch .btn:hover { background: #ffffff33; }
.stage.focus .tile:not(.big) .t-watch .btn { padding: 4px 10px; font-size: 12px; }
.stage.focus .tile:not(.big) .t-watch .sub { display: none; }
.tile .t-bar { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .15s; }
.tile:hover .t-bar, .tile .t-bar:focus-within { opacity: 1; }
.tile .t-bar button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #000000b0; display: grid; place-items: center; color: #fff; }
.tile .t-bar button:hover { background: #000; }
.tile .t-bar svg { width: 18px; height: 18px; }
.tile .t-bar input[type=range] { width: 90px; padding: 0; accent-color: #fff; background: none; }
.tile .t-unmute { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

.call-bar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 12px; padding: 8px; border-radius: 32px;
  background: #000000b0; backdrop-filter: blur(8px); opacity: .25; transition: opacity .2s; z-index: 2; }
.voice-view:hover .call-bar, .call-bar:focus-within { opacity: 1; }
.cb { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #2b2d31; color: #fff; display: grid; place-items: center; }
.cb:hover { background: #404249; }
.cb svg { width: 24px; height: 24px; }
.cb.on { background: #fff; color: #000; }
.cb.on.live { background: var(--live); color: #fff; }
.cb.off { background: #fff; color: var(--red); }
.cb.red { background: var(--red); }
.cb.red:hover { background: #a12828; }


/* ---------- Chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; background: var(--main); min-width: 0; }
.messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; display: flex; flex-direction: column; }
.chat-welcome { padding: 16px; margin-top: auto; }
.chat-welcome h2 { margin: 8px 0 4px; font-size: 26px; }
.cw-icon { width: 64px; height: 64px; border-radius: 50%; background: #41434a; display: grid; place-items: center; }
.cw-icon svg { width: 36px; height: 36px; }
.msg { display: flex; gap: 14px; padding: 2px 16px; margin-top: 14px; }
.msg.cont { margin-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg:hover { background: #2e3035; }
.msg .avatar { width: 40px; height: 40px; font-size: 16px; margin-top: 2px; }
.msg .body { min-width: 0; }
.msg .who { font-weight: 600; }
.msg .time { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.msg .text { color: var(--text2); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg .text a { color: #00a8fc; }
.sys { color: var(--muted); font-size: 13px; padding: 6px 16px 0 70px; }
.chat-form { padding: 0 16px 20px; }
.chat-form input { width: 100%; background: var(--input); border-radius: 8px; padding: 12px 16px; }

/* ---------- Modais ---------- */
.modal { position: fixed; inset: 0; background: #000000b0; display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal-card { width: 100%; max-width: 480px; background: var(--main); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 16px;
  max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-card h2 { margin: 0; }
.modal-card p { margin: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row > *, label > select { min-width: 0; }
label > select { width: 100%; text-overflow: ellipsis; }

/* Configurações: mais larga, sem rolagem lateral, barra escura e "Pronto" sempre à vista */
#settingsModal .modal-card { max-width: 560px; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; padding-bottom: 0; }
#settingsModal .modal-actions { position: sticky; bottom: 0; margin: 0 -24px; padding: 12px 24px 16px; background: var(--main); border-top: 1px solid #ffffff10; }
@media (max-width: 520px) { #settingsModal .row { grid-template-columns: minmax(0, 1fr); } }
.live-txt { color: var(--live); }
.tip { background: #2b2d31; border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--text2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.check { flex-direction: row; align-items: center; gap: 10px; text-transform: none; font-weight: 500; font-size: 15px; color: var(--text2); letter-spacing: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.meter-wrap { display: flex; flex-direction: column; gap: 8px; }
.meter { position: relative; height: 24px; background: #1e1f22; border-radius: 4px; overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--green); transition: width .06s; }
.meter input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; padding: 0; accent-color: #f0b232; opacity: .9; }
.meter input:disabled { opacity: .35; }

.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -60px); opacity: 0; background: #111214; padding: 10px 16px;
  border-radius: 8px; transition: .25s; pointer-events: none; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 8px 24px #0008; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .channels { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 10; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px #000a; }
  .app.menu-open .channels { transform: none; }
  .center-head .menu { display: grid; }
  .view-voice .chat { position: fixed; inset: 48px 0 0 0; width: auto; z-index: 5; }
  .stage { padding: 8px; grid-template-columns: 1fr; }
  .stage.focus .tile { flex-basis: 120px; height: 68px; }
  .stage.focus .tile.big { height: calc(100% - 84px); }
  .call-bar { opacity: 1; bottom: 12px; gap: 8px; }
  .cb { width: 46px; height: 46px; }
  .row { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }
.stage { padding-bottom: 92px; }
@media (max-width: 860px) { .stage { padding-bottom: 76px; } }

/* Teste de internet na janela de transmitir */
.net { background: #2b2d31; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 6px; border-left: 4px solid #4e5058; }
.net.ok { border-left-color: var(--green); }
.net.warn { border-left-color: #f0b232; }
.net.bad { border-left-color: var(--red); }
.net-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.net-actions { display: flex; gap: 8px; align-items: center; }
.net-actions .btn { padding: 6px 12px; }

.logo-icone { width: 36px; height: 36px; }

/* Registro de conexão */
.diag { display: flex; flex-direction: column; gap: 6px; }
.diag-log { margin: 0; background: #1e1f22; border-radius: 4px; padding: 8px 10px; max-height: 180px; overflow: auto; font: 12px/1.45 Consolas, "Cascadia Mono", monospace; color: var(--text2); white-space: pre-wrap; }

.server-icon svg { width: 24px; height: 24px; }

/* ---------- Perfil (foto) ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.pf { display: flex; align-items: center; gap: 16px; background: #2b2d31; border-radius: 8px; padding: 12px; }
.pf-foto { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; flex: none; }
.pf-foto .pf-av { width: 80px; height: 80px; font-size: 32px; }
.pf-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 3px solid #2b2d31; }
.pf-cam svg { width: 15px; height: 15px; }
.pf-foto:hover .pf-av { filter: brightness(.8); }
.pf-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-acoes { display: flex; gap: 6px; margin-top: 4px; }
.pf-acoes .btn { padding: 6px 12px; }
.up-me { cursor: pointer; }
.up-me:hover { background: var(--hover); }

/* ---------- Entrada: coluna com o cartão e os downloads ---------- */
.join { overflow-y: auto; }
.join-col { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; margin: auto; }
.join-card { max-width: none; }
.dl-card { background: #2b2d31e6; border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.dl-card p { margin: 0; }
.dl-top { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.dl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-btn { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 8px; background: var(--input);
  color: var(--text); text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.dl-btn:hover, .dl-btn:focus-visible { background: #404249; border-color: var(--accent); outline: none; }
.dl-btn > span { color: var(--muted); font-size: 12px; }
.dl-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%) translateY(4px); width: 240px; padding: 10px 12px;
  background: #111214; color: var(--text2) !important; font-size: 13px !important; line-height: 1.4; border-radius: 8px; box-shadow: 0 8px 24px #000a;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; }
.dl-tip b { color: #fff; }
.dl-tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #111214; }
.dl-btn:hover .dl-tip, .dl-btn:focus-visible .dl-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) { .dl-btns { grid-template-columns: 1fr; } .dl-tip { width: 220px; } }

/* Internet fraca durante a live */
.btn.warn { background: #f0b232; color: #111; }
.fraca-acoes { flex-wrap: wrap; }

.fraca-lista { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text2); }

/* Sons de entrar/sair */
.sons { display: flex; flex-direction: column; gap: 8px; background: #2b2d31; border-radius: 8px; padding: 12px; }
.som-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.som-linha > span { width: 96px; flex: none; }
.som-linha .som-nome { flex: 1 1 80px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.som-linha .btn { padding: 5px 10px; font-size: 13px; }

/* Pessoas online (direita) */
.membros { width: 240px; flex: none; background: var(--side); overflow-y: auto; padding: 8px 8px 16px; }
.center.membros-closed .membros { display: none; }
.membros .cat { padding: 16px 8px 6px; }
.membros-lista { list-style: none; margin: 0; padding: 0; }
.membros-lista li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px; }
.membros-lista li:hover { background: var(--hover); }
.membros-lista .mb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.membros-lista .nm { font-weight: 600; font-size: 14px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membros-lista .mb-status { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membros-lista .mb-status.live { color: #ff8a8d; }
.membros-lista li.offline { opacity: .4; }
.membros-lista li.offline:hover { opacity: .7; }
.membros-lista li.speaking .avatar { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--green); }
.icon-btn.on { color: var(--text); }
@media (max-width: 860px) { .membros { position: fixed; right: 0; top: 48px; bottom: 0; z-index: 6; box-shadow: -10px 0 30px #0008; } }

/* Botões de janela separada (câmeras / transmissão) */
.btn-janela { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 4px; padding: 5px 10px; background: var(--input); color: var(--text2); font: inherit; font-size: 13px; font-weight: 600; }
.btn-janela:hover { background: #4e5058; }
.btn-janela svg { width: 16px; height: 16px; }
.btn-janela.on { background: var(--accent); color: #fff; }
@media (max-width: 860px) { .btn-janela { display: none; } }

/* ---------- Sessão de álbum ---------- */
.album-view { flex: 1; display: none; flex-direction: column; min-width: 0; min-height: 0; background: var(--main); }
.view-album .album-view { display: flex; }
/* Quadro do álbum no palco (igual câmera/transmissão) */
.tile-album { background: var(--main); }
.tile-album .album-view { display: none; position: absolute; inset: 0; }
.tile-album.big { cursor: default; }
.tile-album.big .album-view { display: flex; }
.tile-album.big .al-mini { display: none; }
.al-mini { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center;
  background: radial-gradient(circle at 50% 35%, #5865f244 0%, #1e1f22 75%); }
.al-mini-nome { font-weight: 800; font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-mini-sub { color: var(--muted); font-size: 13px; }
.stage.focus .tile-album:not(.big) .al-capa { width: 44px; height: 44px; font-size: 20px; }
.stage.focus .tile-album:not(.big) .al-mini-sub { display: none; }
.stage.focus .tile-album:not(.big) .al-mini-nome { font-size: 13px; }
.al-tbar { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; z-index: 3; }
.tile-album:hover .al-tbar, .al-tbar:focus-within { opacity: 1; }
.al-tbar button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #000000b0; color: #fff; display: grid; place-items: center; }
.al-tbar button:hover { background: #000; }
.al-tbar svg { width: 16px; height: 16px; }
.tile-album.big .al-topo { padding-right: 130px; }
.al-alca { display: none; position: absolute; right: 0; top: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 4; }
.al-alca::after { content: ''; position: absolute; right: 3px; top: 50%; height: 48px; width: 4px; margin-top: -24px; border-radius: 2px; background: #ffffff40; transition: background .15s; }
.al-alca:hover::after, .tile-album.arrastando .al-alca::after { background: var(--accent); }
.tile-album.arrastando { user-select: none; }
/* Álbum grande: ele à esquerda (largura ajustável) e os outros quadros em coluna à direita */
.stage.focus-album { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.stage.focus-album .tile.big { order: -1; flex: none; width: var(--al-w, 62%); height: 100%; }
.stage.focus-album .tile:not(.big) { flex: none; width: calc(100% - var(--al-w, 62%) - 8px); height: auto; aspect-ratio: 16 / 9; }
.stage.focus-album .tile-album.big .al-alca { display: block; }
.stage.focus-album .tile:not(.big) .t-avatar .avatar { width: 64px; height: 64px; font-size: 26px; }
.stage.focus .tile.big:only-child { height: 100%; }
.stage.focus-album .tile.big:only-child { width: 100%; }
.stage.focus-album .tile.big:only-child .al-alca { display: none; }
.al-topo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #0003; background: linear-gradient(90deg, #5865f222, transparent); }
.al-topo:empty { display: none; }
.al-capa { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #1e1f22; display: grid; place-items: center; font-size: 32px; flex: none; box-shadow: 0 4px 16px #0006; }
.al-capa.grande { width: 140px; height: 140px; font-size: 56px; }
.al-capa img { width: 100%; height: 100%; object-fit: cover; }
.al-info { flex: 1; min-width: 0; }
.al-tipo { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #c9cdfb; text-transform: uppercase; }
.al-nome { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-artista { color: var(--muted); }
.al-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.al-fase { font-weight: 700; }
.al-corpo { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.al-inicio { max-width: 560px; margin: auto; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.al-inicio h2 { margin: 0; }
.al-grande { font-size: 56px; }
.al-aviso { background: #f0b23222; border: 1px solid #f0b23266; border-radius: 8px; padding: 10px 14px; color: #f6cd6b; }
.al-linkbox { display: flex; gap: 8px; width: 100%; }
.al-linkbox input { flex: 1; }
.al-previa { display: flex; gap: 16px; align-items: center; text-align: left; background: #2b2d31; border-radius: 10px; padding: 14px; width: 100%; }
.al-tipos { display: flex; gap: 6px; margin-top: 10px; }
.al-tipos .chip, .chip { border: 0; background: var(--input); color: var(--text2); border-radius: 14px; padding: 6px 12px; font-weight: 600; }
.al-tipos .chip.on { background: var(--accent); color: #fff; }
.al-acoes { display: flex; gap: 10px; justify-content: center; }
.al-agora { background: #2b2d31; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.al-faixa { font-size: 18px; font-weight: 700; }
.al-barra { height: 6px; background: #1e1f22; border-radius: 3px; overflow: hidden; }
.al-barra-in { height: 100%; width: 0; background: var(--green); transition: width .25s linear; }
.al-letra { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 8px 4px 40vh; width: 100%; max-width: 820px; margin: 0 auto; }
.al-l { opacity: .45; transition: opacity .25s, transform .25s; transform-origin: center; }
.al-l.agora { opacity: 1; transform: scale(1.02); }
.al-l.vazia { color: var(--muted); }
.al-l .ko { font-size: 22px; font-weight: 700; }
.al-l .rom { font-size: 15px; color: #c9cdfb; font-style: italic; }
.al-l .en { font-size: 14px; color: #9ec7ff; }
.al-l .pt { font-size: 15px; color: var(--text2); }
.al-nota { max-width: 720px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.al-pausa { font-size: 15px; font-weight: 800; color: #f6cd6b; background: #f0b23222; border-radius: 20px; padding: 6px 14px; }
.al-notas { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; width: 100%; }
.al-n { border: 0; border-radius: 8px; padding: 14px 0; font: inherit; font-size: 18px; font-weight: 800; background: var(--input); color: var(--text); }
.al-n:hover { background: #4e5058; }
.al-n.on { background: var(--accent); color: #fff; transform: scale(1.08); }
.al-sua { font-size: 18px; font-weight: 700; }
.al-quem { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.al-pessoa { display: flex; align-items: center; gap: 6px; background: #2b2d31; border-radius: 16px; padding: 4px 10px 4px 4px; color: var(--muted); }
.al-pessoa.ok { color: var(--text); background: #23a55a33; }
.al-pessoa.ok b { color: var(--green); }
.al-revelar, .al-ranking, .al-resultado { max-width: 900px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.al-revelar h2, .al-ranking h2, .al-resultado h2 { margin: 0; }
.al-tabela-wrap { width: 100%; overflow-x: auto; }
.al-tabela { border-collapse: collapse; width: 100%; font-size: 14px; }
.al-tabela th, .al-tabela td { padding: 7px 10px; border-bottom: 1px solid #ffffff10; }
.al-tabela th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.al-tabela td.fx { text-align: left; font-weight: 600; }
.al-tabela td.nt { font-weight: 800; font-variant-numeric: tabular-nums; }
.al-tabela td.media { background: #ffffff08; }
.al-tabela tr.rodape td { border-top: 2px solid #ffffff22; color: var(--muted); }
.n-top { color: #57d68d; } .n-boa { color: #9ee6b8; } .n-media { color: #f6cd6b; } .n-baixa { color: #ff8a8d; }
.al-escolhidos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: 100%; }
.al-slot { background: #2b2d31; border: 2px dashed #4e5058; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.al-slot.cheio { border-style: solid; border-color: var(--accent); cursor: pointer; }
.al-slot b { color: var(--accent); }
.al-lista { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.al-item { text-align: left; border: 0; border-radius: 6px; padding: 10px 14px; font: inherit; background: #2b2d31; color: var(--text); }
.al-item:hover:not(:disabled) { background: #35373c; }
.al-item.on { background: var(--accent); color: #fff; }
.al-item:disabled { opacity: .4; }
.al-podio { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; }
.al-lugar { display: grid; grid-template-columns: 60px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; background: #2b2d31; border-radius: 10px; padding: 12px 16px;
  opacity: 0; animation: aparecer .6s ease forwards; }
.al-lugar .al-pos { grid-row: 1 / 3; font-size: 30px; }
.al-lugar.l1 { background: linear-gradient(90deg, #f0b23240, #2b2d31); transform-origin: center; }
@keyframes aparecer { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.al-cada { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; width: 100%; text-align: left; }
.al-cada-um { background: #2b2d31; border-radius: 8px; padding: 10px 14px; }
.al-cada-um ol { margin: 6px 0 0; padding-left: 20px; color: var(--text2); }
@media (max-width: 860px) { .al-notas { grid-template-columns: repeat(6, 1fr); } .al-topo { flex-wrap: wrap; } .al-lado { align-items: flex-start; } }
.al-lugar.ja { opacity: 1; animation: none; }
.al-erro-sp { display: flex; align-items: center; gap: 12px; justify-content: space-between; }

/* Preparando as letras */
.al-preparo { max-width: 560px; width: 100%; margin: auto; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.al-preparo h2 { margin: 0; }
.al-barra.grossa { width: 100%; height: 12px; border-radius: 6px; }
.al-barra.grossa .al-barra-in { background: linear-gradient(90deg, var(--accent), #8b93ff); transition: width .4s ease; }
.al-preparo-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.al-preparo-lista { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.al-preparo-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 6px; background: #2b2d31; color: var(--muted); }
.al-preparo-item.ok { color: var(--text); } .al-preparo-item.ok b { color: var(--green); }
.al-preparo-item.carregando b { animation: piscar 1s infinite; }
@keyframes piscar { 50% { opacity: .3; } }
@media (max-width: 600px) { .al-info { min-width: 160px; } .al-lado { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; } }

/* Jam do Spotify */
.btn.al-jam { background: #1db954; color: #000; font-weight: 800; text-decoration: none; display: inline-block; }
.btn.al-jam:hover { filter: brightness(1.1); }
.al-jam-campo { width: 100%; text-align: left; }
.al-jam-colar { display: flex; gap: 6px; }
.al-jam-colar input { width: 190px; padding: 6px 8px; font-size: 13px; }

/* Volume por pessoa (só para mim) */
.vol-pop { position: fixed; z-index: 40; width: 250px; background: #111214; border: 1px solid #ffffff14; border-radius: 10px; padding: 14px; box-shadow: 0 10px 30px #000c;
  display: flex; flex-direction: column; gap: 10px; }
.vol-pop-topo { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.vol-linha { display: flex; flex-direction: column; gap: 4px; }
.vol-cab { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .03em; }
.vol-num { color: var(--text); font-variant-numeric: tabular-nums; }
.vol-linha input { width: 100%; padding: 0; accent-color: var(--accent); background: none; }
.vol-mudo { font-size: 14px; }
.vol-pop .btn.link { align-self: flex-start; padding: 0; font-size: 13px; color: var(--muted); }
.vol-ind { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.membros-lista li.clicavel, .voice-list li { cursor: pointer; }
/* Volume da transmissão: aparece ao passar o mouse no quadro */
.tile .t-vol { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: #000000b0;
  padding: 4px 10px; border-radius: 16px; font-size: 13px; z-index: 1; opacity: 0; transition: opacity .15s; }
.tile:hover .t-vol, .tile .t-vol:focus-within { opacity: 1; }
.tile .t-vol input { width: 110px; padding: 0; accent-color: #fff; background: none; }
.tile .t-vol-ico { cursor: pointer; }
.tile .t-vol-num { font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.stage.focus .tile:not(.big) .t-vol { display: none; }
.tile .t-vol-aviso { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: #000c; padding: 6px 14px; border-radius: 8px; font-weight: 700; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2; }
.tile .t-vol-aviso.show { opacity: 1; }

/* Menu ao clicar em transmitir quando já está ao vivo */
.menu-tela { width: auto; gap: 6px; padding: 8px; }
.menu-tela .btn { justify-content: flex-start; text-align: left; white-space: nowrap; }
.btn.danger { background: var(--live); color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
/* Grade normal: o quadro mantém 16:9 (sem isso as linhas encolhiam e os quadros se sobrepunham) */
.stage:not(.focus) { grid-auto-rows: max-content; align-content: safe center; }
/* Letra e notas do álbum sem barra de rolagem (rola com a rodinha e anda sozinha) */
.al-corpo, .stage { scrollbar-width: none; }
.al-corpo::-webkit-scrollbar, .stage::-webkit-scrollbar { display: none; }

/* Escolher a atividade */
.at-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; width: 100%; }
.at-card { border: 1px solid #ffffff14; border-radius: 12px; background: #2b2d31; color: var(--text); padding: 20px 16px; display: flex; flex-direction: column; gap: 6px;
  align-items: center; text-align: center; font: inherit; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.at-card:hover { background: #35373c; border-color: var(--accent); transform: translateY(-2px); }
.at-ico { font-size: 40px; }
.at-tit { font-weight: 800; font-size: 17px; }
.at-txt { color: var(--muted); font-size: 13px; }
/* Ouvir junto: letra no meio, "a seguir" e "já tocou" do lado */
.rd-grade { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.rd-meio { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rd-lista { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; background: #2b2d31; border-radius: 10px; padding: 12px; }
.rd-tit { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); margin-top: 6px; }
.rd-tit:first-child { margin-top: 0; }
.rd-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rd-capa { width: 36px; height: 36px; border-radius: 4px; overflow: hidden; background: #1e1f22; display: grid; place-items: center; flex: none; color: var(--muted); }
.rd-capa img { width: 100%; height: 100%; object-fit: cover; }
.rd-txt { min-width: 0; }
.rd-nome { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-art { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 640px) { .rd-grade { grid-template-columns: 1fr; } .rd-lista { position: static; } }
.al-corpo { container-type: inline-size; }

/* Ouvir junto: controles e "adicionar música" */
.rd-ctr { display: flex; justify-content: center; align-items: center; gap: 14px; }
.rd-bt { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text2); display: grid; place-items: center; transition: color .15s, transform .1s; }
.rd-bt svg { width: 22px; height: 22px; }
.rd-bt:hover { color: #fff; transform: scale(1.08); }
.rd-bt:active { transform: scale(.95); }
.rd-bt.grande { width: 46px; height: 46px; background: #fff; color: #000; }
.rd-bt.grande svg { width: 24px; height: 24px; }
.rd-bt.grande:hover { color: #000; transform: scale(1.06); }
/* lista clicável: capa vira botão de play */
.rd-clica { cursor: pointer; border-radius: 6px; padding: 4px; margin: -4px; }
.rd-clica:hover { background: #ffffff10; }
.rd-capa { position: relative; }
.rd-play { position: absolute; inset: 0; display: grid; place-items: center; background: #000000a0; color: #fff; opacity: 0; transition: opacity .15s; }
.rd-play svg { width: 18px; height: 18px; }
.rd-clica:hover .rd-play { opacity: 1; }
.rd-busca { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.rd-busca input { width: 100%; padding: 8px 10px; font-size: 13px; }
.rd-res { display: flex; flex-direction: column; gap: 2px; }
.rd-add { cursor: pointer; border-radius: 6px; padding: 4px; }
.rd-add:hover { background: #ffffff10; }
.rd-add .rd-txt { flex: 1; }
.rd-mais { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: color .15s, background .15s, transform .1s; }
.rd-mais svg { width: 20px; height: 20px; }
.rd-add:hover .rd-mais { color: #fff; }
.rd-mais:hover { background: #ffffff1a; transform: scale(1.08); }
.rd-mais:active { transform: scale(.94); }

/* Ouvir junto: controles e barra no topo, do lado da música */
.rd-topo .al-info { flex: 1 1 160px; min-width: 120px; }
.rd-topo .al-artista { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-topo .al-lado { flex: none; }
.rd-player { flex: 1 1 240px; min-width: 180px; max-width: 420px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.rd-player .al-tempo { text-align: center; }
.al-espera { text-align: center; padding: 30px; }

/* Letra que veio só romanizada: linha em coreano romanizado (sem tradução possível) */
.al-l .ko.romz { font-style: italic; color: #c9cdfb; font-weight: 600; }

/* Salas em que você já entrou (barra da esquerda + atalhos na tela de entrada) */
.rail { position: relative; z-index: 5; }
.rail-salas { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-salas:empty, .rail-salas:empty + .rail-sep { display: none; }
.server-icon.sala { font-size: 16px; letter-spacing: -.5px; cursor: pointer; }
.server-icon.sala::after { content: attr(data-nome); position: absolute; left: 60px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: #111214; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: 0; padding: 6px 10px; border-radius: 6px;
  box-shadow: 0 4px 14px #0008; opacity: 0; pointer-events: none; transition: opacity .1s; }
.server-icon.sala:hover::after { opacity: 1; }
.server-icon.sala:not(.active):hover::before { content: ''; position: absolute; left: -16px; width: 8px; height: 20px; border-radius: 0 4px 4px 0; background: #fff; }
/* Perfil da sala: imagem na barra e nome clicável no topo dos canais */
/* Sala sem imagem: sigla em branco sobre a cor da sala (--cor, tirada do identificador) */
.server-icon.sala:not(.com-icone), .server-icon.sala:not(.com-icone):hover {
  background: var(--cor, var(--main)); background: linear-gradient(145deg, var(--cor, var(--main)), color-mix(in srgb, var(--cor, var(--main)) 70%, #000));
  color: #fff; text-shadow: 0 1px 2px #0005; }
.server-icon.sala.sigla-longa { font-size: 13px; letter-spacing: -.3px; }
.server-icon.sala:not(.active):not(:hover) { filter: saturate(.85); }
.server-icon.sala.com-icone { background: transparent; }
.server-icon.sala.com-icone img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; transition: border-radius .15s; display: block;
  box-shadow: 0 0 0 1px #ffffff10; }
.server-icon.sala:active { transform: translateY(1px); }
.pf-av.sala-av, .pf-av.sala-av img { border-radius: 26px; }
.pf-av.sala-av { text-shadow: 0 1px 2px #0005; }

/* Janela de ajustar imagem: arrastar e dar zoom dentro da moldura */
.recorte-card { max-width: 420px; }
.recorte-area { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 8px;
  background: repeating-conic-gradient(#2b2d31 0 25%, #232428 0 50%) 0 0 / 20px 20px;
  touch-action: none; user-select: none; cursor: grab; }
.recorte-area:active { cursor: grabbing; }
.recorte-area img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; }
.recorte-moldura { position: absolute; inset: 24px; border-radius: 50%; box-shadow: 0 0 0 999px #000000a8; outline: 2px solid #ffffffd0; pointer-events: none; }
#recorteModal[data-forma=sala] .recorte-moldura { border-radius: 33%; }
.recorte-zoom { display: flex; align-items: center; gap: 10px; font-size: 20px; line-height: 1; }
.recorte-zoom input { flex: 1; accent-color: var(--accent); padding: 0; background: none; }
.recorte-previa { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recorte-mini { display: flex; gap: 10px; flex: none; }
.rm { width: 48px; height: 48px; border-radius: 50%; background-color: var(--rail); background-repeat: no-repeat; box-shadow: 0 0 0 4px var(--rail); }
.rm-quadrado { border-radius: 16px; }
#recorteModal[data-forma=redondo] .rm-quadrado { display: none; }
#recorteModal .modal-actions #recorteCentralizar { margin-right: auto; }
.room-name { background: none; border: 0; color: inherit; font: inherit; padding: 4px 6px; margin-left: -6px; border-radius: 4px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; min-width: 0; }
.room-name:hover { background: var(--hover); }
.menu-titulo { font-size: 13px; color: var(--muted); padding: 2px 4px 4px; }

/* Conta: login (entrar / criar conta) */
.join-card[hidden] { display: none; }
/* cada modo (entrar, criar, esqueci, redefinir) mostra só o que é dele: .so-X aparece só no modo X, .sem-X some no modo X */
.join-card[data-modo="entrar"] :is(.so-criar, .so-esqueci, .so-redefinir):not(.so-entrar),
.join-card[data-modo="criar"] :is(.so-entrar, .so-esqueci, .so-redefinir):not(.so-criar),
.join-card[data-modo="esqueci"] :is(.so-entrar, .so-criar, .so-redefinir):not(.so-esqueci),
.join-card[data-modo="redefinir"] :is(.so-entrar, .so-criar, .so-esqueci):not(.so-redefinir),
.join-card[data-modo="esqueci"] .sem-esqueci, .join-card[data-modo="redefinir"] .sem-redefinir { display: none; }
.form-ok { margin: -4px 0 0 !important; padding: 8px 12px; border-radius: 4px; background: #23a55a22; color: #57d68d; font-size: 14px; text-align: left !important; }
.form-ok[hidden] { display: none; }
.form-erro { margin: -4px 0 0 !important; padding: 8px 12px; border-radius: 4px; background: #da373c22; color: #ff8a8d; font-size: 14px; text-align: left !important; }
.form-erro[hidden] { display: none; }
.troca-modo { margin: -4px 0 0 !important; color: var(--muted); }
.troca-modo .btn.link { padding: 0; font-size: inherit; color: #00a8fc; }
.ola { display: flex; align-items: center; gap: 14px; }
.ola .avatar { width: 56px; height: 56px; font-size: 22px; flex: none; }
.ola h1 { margin: 0; font-size: 22px; }
.danger-link { color: #ff8a8d !important; padding-left: 0; }

/* Início (depois do login): barra de salas + adicionar sala, sem sala aberta */
.inicio { display: none; }
.app.em-inicio { grid-template-columns: 72px 1fr; }
.app.em-inicio > #channels, .app.em-inicio > #center { display: none; }
.app.em-inicio > .inicio { display: grid; place-items: center; padding: 16px; background: var(--main); overflow-y: auto; }
.inicio-card { width: 100%; max-width: 460px; background: var(--side); padding: 32px; border-radius: 8px; display: flex; flex-direction: column; gap: 16px; }
.inicio-card > p { margin: 0; }
.inicio-conta { color: var(--muted); }
.inicio-conta .btn.link { padding: 0; font-size: inherit; color: #00a8fc; }

/* Barra de canais recolhida (só no computador): coluna estreita com os ícones; nome e textos aparecem ao passar o mouse (title) */
.recolher { margin-left: auto; }
@media (max-width: 860px) { .recolher { display: none; } }
@media (min-width: 861px) {
  .app.canais-recolhidos:not(.em-inicio) { grid-template-columns: 72px 48px 1fr; }
  .canais-recolhidos .channels-head { padding: 0; justify-content: center; }
  .canais-recolhidos .channels-head > :not(.recolher) { display: none; }
  .canais-recolhidos .recolher { margin: 0; }
  .canais-recolhidos .channels .cat { font-size: 0; padding: 6px 8px; }
  .canais-recolhidos .channels .cat::before { content: ''; display: block; height: 2px; background: var(--input); border-radius: 1px; }
  .canais-recolhidos .channel-scroll { padding: 4px 4px 12px; }
  .canais-recolhidos .channel { justify-content: center; padding: 8px 0; position: relative; }
  .canais-recolhidos .channel span { display: none; }
  .canais-recolhidos .channel .unread { position: absolute; top: 0; right: 2px; }
  .canais-recolhidos #albumAoVivo { position: absolute; bottom: -4px; right: -2px; font-size: 0; padding: 0 3px; }
  .canais-recolhidos #albumAoVivo::before { content: '🎵'; font-size: 10px; }
  .canais-recolhidos .voice-list { padding: 0; }
  .canais-recolhidos .voice-list li { justify-content: center; padding: 4px 0; position: relative; }
  .canais-recolhidos .voice-list li > :not(.avatar):not(.badge-live) { display: none; }
  .canais-recolhidos .voice-list .badge-live { position: absolute; bottom: 0; font-size: 8px; padding: 0 3px; line-height: 12px; }
  .canais-recolhidos .voice-panel { padding: 6px 4px; }
  .canais-recolhidos .vp-top { flex-direction: column; gap: 4px; padding: 0 0 6px; }
  .canais-recolhidos .vp-top > div { display: none; }
  .canais-recolhidos .vp-btns { grid-template-columns: 1fr; gap: 4px; }
  .canais-recolhidos .user-panel { height: auto; flex-direction: column; padding: 8px 0; gap: 4px; }
  .canais-recolhidos .up-me { flex: none; padding: 0; }
  .canais-recolhidos .up-names { display: none; }
}
