/* Resenha — visual gamer (escuro com neon) */
:root {
  color-scheme: dark;
  --bg: #07090F;
  --surface: #0E1320;
  --surface-2: #141B2C;
  --surface-3: #1A2236;
  --text: #E8ECF4;
  --text-2: #C5CCDA;
  --muted: #8B96AB;
  --border: #1E2740;
  --border-2: #2A3552;
  --field: #0A0E18;
  --accent: #22D3EE;
  --accent-strong: #67E8F9;
  --accent-ink: #031218;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.45);
  --talk: #3DFF8F;
  --talk-glow: rgba(61, 255, 143, 0.45);
  --tile: #10172A;
  --neutral-btn: #161E31;
  --danger: #FF4D6D;
  --danger-soft: rgba(255, 77, 109, 0.14);
  --warn: #FFB020;
  --ok: #3DFF8F;
  --stage: #05070C;
  --painel: rgba(14, 19, 32, 0.92);
  --barra: rgba(10, 14, 24, 0.85);
  --barra-forte: rgba(10, 14, 24, 0.92);
  --grade: rgba(255, 255, 255, 0.025);
  --brilho-1: rgba(34, 211, 238, 0.10);
  --brilho-2: rgba(124, 58, 237, 0.10);
  --tile-luz: #15203A;
  --talk-ink: #031218;
  --sombra: rgba(0, 0, 0, .45);
  --display: 'Chakra Petch', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, var(--brilho-1), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, var(--brilho-2), transparent 60%),
    linear-gradient(var(--grade) 1px, transparent 1px),
    linear-gradient(90deg, var(--grade) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 18px; margin: 0; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

.logo { flex: none; width: 40px; height: 40px; border-radius: 11px; display: flex; overflow: hidden; box-shadow: 0 0 18px rgba(34, 211, 238, .25); }
.logo svg { width: 100%; height: 100%; display: block; }
.logo.big { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 0 32px rgba(34, 211, 238, .35); }

.input {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--field); font-family: inherit; font-size: 14px; color: var(--text); width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: #6B768C; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input option, .status-select option { background: var(--surface); color: var(--text); }
.field-label {
  font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
}

.btn {
  height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-family: var(--display); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn.wide { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color .12s, border-color .12s, box-shadow .12s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-soft); }

/* Entrada */
.join { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.join-card {
  position: relative; width: 100%; max-width: 400px; background: var(--painel); border: 1px solid var(--border-2);
  border-radius: 18px; padding: 34px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(34, 211, 238, 0.06);
}
.join-card::before {
  content: ''; position: absolute; left: 34px; right: 34px; top: -1px; height: 2px;
  background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); border-radius: 2px;
}
.join-card h1 {
  margin: 10px 0 0; font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.join-card p { margin: 0 0 8px; }

/* Sala */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: var(--barra); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-strong); border: 1px solid rgba(34, 211, 238, 0.25);
  font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--talk-glow); }

.main { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 20px 24px; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; overflow: auto; }

.share {
  position: relative; flex: 1; min-height: 260px; border-radius: 14px; background: var(--stage);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 20px 40px rgba(0, 0, 0, .4);
}
.share::after {
  content: ''; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 2px 18px no-repeat;
  opacity: .8;
}
.share-video { position: absolute; inset: 0; }
.share-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.share-label {
  position: absolute; left: 18px; top: 18px; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 8px; background: rgba(5, 7, 12, .8); border: 1px solid var(--border-2);
  color: var(--text); font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.share-label::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px var(--danger);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }
.icon-btn.floating { position: absolute; right: 18px; top: 18px; z-index: 1; background: rgba(5, 7, 12, .8); }
.icon-btn.floating.second { right: 70px; }

.tiles {
  flex: 1; min-height: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 1), minmax(0, 1fr));
}
/* Com tela compartilhada: os quadros viram uma faixa embaixo da tela */
.stage.with-shares .tiles { flex: none; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.stage.with-shares .tile { flex: 0 0 200px; width: 200px; aspect-ratio: 16 / 10; }
.stage.with-shares .avatar { width: 56px; height: 56px; font-size: 20px; }
.tile {
  position: relative; min-height: 0; border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, var(--tile-luz) 0%, var(--tile) 60%);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
/* Quadros sempre 16:9, o maior possível dentro da sua célula (nada de quadro "em pé") */
.stage:not(.with-shares) .tiles {
  container-type: size; place-content: center;
  grid-template-columns: repeat(var(--cols, 2), auto); grid-template-rows: repeat(var(--rows, 1), auto);
}
.stage:not(.with-shares) .tile {
  width: min(calc((100cqw - (var(--cols, 1) - 1) * 12px) / var(--cols, 1)), calc((100cqh - (var(--rows, 1) - 1) * 12px) / var(--rows, 1) * 16 / 9));
  aspect-ratio: 16 / 9;
}
.tiles .avatar { width: clamp(64px, 11vmin, 116px); height: clamp(64px, 11vmin, 116px); font-size: clamp(22px, 3.6vmin, 40px); }
.tiles[data-count="1"] .avatar { width: clamp(80px, 16vmin, 150px); height: clamp(80px, 16vmin, 150px); font-size: clamp(28px, 5vmin, 52px); }
.tile.speaking { border-color: var(--talk); box-shadow: 0 0 0 1px var(--talk), 0 0 22px var(--talk-glow); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile video.mirror { transform: scaleX(-1); }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; font-weight: 700;
  border: 2px solid var(--border-2); transition: border-color .12s, box-shadow .12s;
}
.tile.speaking .avatar { border-color: var(--talk); box-shadow: 0 0 16px var(--talk-glow); color: var(--talk); }
.tile-name {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 6px; background: rgba(5, 7, 12, .78); border: 1px solid var(--border-2);
  font-size: 13px; font-weight: 700; max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat {
  flex: 0 0 340px; min-width: 0; display: flex; flex-direction: column; background: var(--painel);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.chat-head svg { stroke: var(--accent); }
.messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.msg { display: flex; gap: 10px; }
.msg-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 12px; font-weight: 700;
}
.msg-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-name { font-size: 14px; font-weight: 800; color: var(--accent-strong); }
.msg-time { font-size: 12px; color: var(--muted); }
.msg-text { font-size: 14px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-system {
  align-self: center; font-size: 12px; color: var(--muted); text-align: center;
  padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
}
.chat-form { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--border); }
.send-btn {
  flex: none; width: 44px; height: 44px; border-radius: 10px; border: none; background: var(--accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 14px var(--accent-glow);
}
.send-btn svg { stroke: var(--accent-ink); }

.controls { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 24px 18px; }
.control-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 16px;
  background: var(--barra-forte); border: 1px solid var(--border-2); box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.ctrl {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 78px; height: 60px; border-radius: 10px; border: 1px solid transparent; background: var(--neutral-btn);
  color: var(--text-2); font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
}
.ctrl:hover { border-color: var(--border-2); color: var(--text); }
.ctrl.on { background: var(--accent-soft); color: var(--accent-strong); border-color: rgba(34, 211, 238, 0.35); box-shadow: inset 0 0 12px rgba(34, 211, 238, 0.12); }
.ctrl.off { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 77, 109, 0.35); }
.ctrl.danger { background: var(--danger); color: #fff; box-shadow: 0 0 16px rgba(255, 77, 109, 0.35); }
.ctrl.danger:hover { color: #fff; border-color: transparent; }
.divider { width: 1px; height: 36px; background: var(--border-2); }

/* Modais */
.modal {
  position: fixed; inset: 0; background: rgba(2, 4, 8, .72); backdrop-filter: blur(4px); display: flex; align-items: center;
  justify-content: center; padding: 24px; z-index: 10;
}
.modal-card {
  width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border-2); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.wide-card { max-width: 760px; }
.modal-card h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.modal-card > p { margin: -10px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mode {
  display: flex; gap: 12px; padding: 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--field); cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.mode span { display: flex; flex-direction: column; gap: 2px; }
.mode strong { font-size: 15px; }
.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 14px rgba(34, 211, 238, 0.15); }
input[type=radio], input[type=checkbox], input[type=range] { accent-color: var(--accent); }
.sens { display: flex; flex-direction: column; gap: 8px; }
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--field); border: 1px solid var(--border); overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: #4B5670; transition: width 60ms linear; }
.meter-fill.open { background: var(--talk); box-shadow: 0 0 10px var(--talk-glow); }
.meter-wrap { position: relative; padding: 6px 0; }
.meter-wrap:focus-within .meter { box-shadow: 0 0 0 2px var(--accent); }
.meter-line {
  position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text);
  box-shadow: 0 0 0 2px rgba(7, 9, 15, .8); pointer-events: none;
}
.meter-line::after { content: ''; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--text); }
.meter-wrap.auto .meter-line { background: var(--accent); }
.meter-wrap.auto .meter-line::after { background: var(--accent); }
/* a linha é o controle: o "range" fica invisível por cima da barra */
.meter-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
kbd {
  min-width: 44px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-2);
  border-bottom-width: 3px; background: var(--field); color: var(--accent-strong); display: inline-flex; align-items: center;
  justify-content: center; font-family: var(--display); font-size: 15px; font-weight: 700;
}
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.toggle-row input { flex: none; }
.sep { height: 1px; background: var(--border); }

.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-height: 50vh; overflow-y: auto; }
.source {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); cursor: pointer; text-align: left; color: var(--text); font-size: 13px; font-weight: 600;
}
.source:hover { border-color: var(--accent); }
.source img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--field); border-radius: 6px; }
.source span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 14px rgba(34, 211, 238, 0.2); }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.check-row > span { display: flex; flex-direction: column; gap: 2px; }

@media (max-width: 1000px) {
  .main { flex-direction: column; overflow-y: auto; }
  .chat { flex: 0 0 360px; }
}

/* Foto, senha, ping, qualidade */
.photo-row { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; }
.photo-preview {
  width: 68px; height: 68px; border-radius: 50%; background: var(--surface-3) center / cover no-repeat;
  color: var(--accent-strong); display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 24px; font-weight: 700; flex: none;
  border: 2px solid var(--accent); box-shadow: 0 0 16px var(--accent-glow);
}
.small-btn { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; font-size: 13px; }
.link-btn { border: none; background: none; color: var(--accent-strong); font-weight: 700; font-size: 13px; cursor: pointer; padding: 8px 4px; }
.link-btn:hover { text-decoration: underline; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 48px; }
.pass-toggle {
  position: absolute; right: 2px; top: 0; width: 44px; height: 44px; border: none; background: none;
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pass-toggle:hover { color: var(--accent); }
.pill.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border-2); }
.dot.gray { background: #5B6578; box-shadow: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(255, 176, 32, .5); }
.dot.bad { background: var(--danger); box-shadow: 0 0 8px rgba(255, 77, 109, .5); }
.modes.three { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.avatar.photo, .msg-avatar.photo { background-size: cover; background-position: center; color: transparent; }

/* Consumo */
.bar { position: relative; height: 14px; border-radius: 999px; background: var(--field); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.bar-fill.warn { background: var(--warn); box-shadow: 0 0 10px rgba(255, 176, 32, .5); }
.bar-fill.bad { background: var(--danger); box-shadow: 0 0 10px rgba(255, 77, 109, .5); }
.usage-list { display: flex; flex-direction: column; }
.usage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.usage-row:first-child { border-top: none; }
.usage-row .muted { white-space: nowrap; }

/* Imagens no chat */
.attach-btn {
  flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.attach-btn:hover { color: var(--accent); border-color: var(--accent); }
.msg-image {
  display: block; margin-top: 6px; padding: 0; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden;
  background: var(--field); cursor: zoom-in; max-width: 100%;
}
.msg-image:hover { border-color: var(--accent); }
.msg-image img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.msg-progress { font-size: 12px; color: var(--muted); }
.viewer {
  position: fixed; inset: 0; z-index: 20; background: rgba(2, 4, 8, .92);
  display: flex; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out;
}
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer-close { position: absolute; right: 20px; top: 20px; }

/* Sons */
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sound { position: relative; }
.sound-play {
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.sound-play:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(34, 211, 238, 0.2); }
.sound-play.playing { border-color: var(--talk); background: rgba(61, 255, 143, 0.1); color: var(--talk); box-shadow: 0 0 16px var(--talk-glow); }
.sound-play svg { flex: none; color: var(--accent); }
.sound-play.playing svg { color: var(--talk); }
.sound-play span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-remove {
  position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; border-radius: 6px; border: none;
  background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.sound-remove:hover { background: var(--danger-soft); color: var(--danger); }
.sound.custom .sound-play { padding-right: 36px; }

/* Status, menu de pessoa */
.status-select {
  height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2);
  font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text); cursor: pointer;
}
.status-select:hover { border-color: var(--accent); }
.tile-status {
  position: absolute; right: 10px; top: 10px; padding: 3px 9px; border-radius: 6px; background: rgba(5, 7, 12, .8);
  border: 1px solid var(--border-2); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.tile-volume-off { color: var(--muted); display: inline-flex; }
.person-menu {
  position: fixed; z-index: 30; width: 240px; padding: 14px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 10px;
}
.person-menu strong { font-family: var(--display); font-size: 16px; letter-spacing: .03em; }
.person-menu input[type=range] { width: 100%; }

.person-menu .link-btn { align-self: flex-start; padding-left: 0; }
.tile.unknown { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn), 0 0 18px rgba(255, 176, 32, .35); }
.tile-warning {
  position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 6px; background: var(--warn);
  color: #1A1200; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}

/* Várias telas compartilhadas (até 4) */
.shares { flex: 1; min-height: 260px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
.shares.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shares.n3, .shares.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.shares .share { min-height: 0; }
.shares.n3 .share, .shares.n4 .share { min-height: 180px; }

/* Saguão */
.lobby-card { max-width: 440px; gap: 14px; }
.lobby-title { margin: 0 !important; font-size: 28px !important; }
.lobby-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.lobby-person {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.lobby-person.speaking { border-color: var(--talk); box-shadow: 0 0 12px var(--talk-glow); }
.lobby-person .msg-avatar { width: 36px; height: 36px; }
.lobby-person .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lobby-person .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-person .tags { display: flex; gap: 6px; align-items: center; flex: none; }
.tag {
  padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-2);
}
.tag.live { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 77, 109, .35); }
.lobby-empty { margin: 4px 0; text-align: center; padding: 14px; border: 1px dashed var(--border-2); border-radius: 10px; }
.icon-btn.floating.is-off { color: var(--danger); border-color: rgba(255, 77, 109, .45); }

/* Versão do navegador: esconde o que só existe no programa do Windows */
.is-web .desktop-only { display: none !important; }

/* ---------- Celular ---------- */
.mobile-tabs { display: none; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 8px rgba(255, 77, 109, .6); }
.unread-dot[hidden] { display: none; }

@media (max-width: 760px) {
  html, body { height: 100%; }
  .is-web .app { height: 100vh; height: 100dvh; }
  .is-web .topbar { padding: 8px 12px; gap: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .is-web .topbar { flex-wrap: nowrap; }
  .is-web .brand-text { display: none; }
  .is-web .top-right { flex-wrap: nowrap; min-width: 0; }
  .is-web .top-right .pill.neutral:not(#watchers) { display: none; }
  .is-web .logo { width: 32px; height: 32px; }
  .is-web .top-right { gap: 6px; }
  .is-web .top-right .pill { height: 32px; padding: 0 8px; font-size: 11px; }
  .is-web .status-select { height: 32px; font-size: 11px; padding: 0 6px; }
  .is-web .icon-btn { width: 40px; height: 40px; }
  .is-web #watchers { display: none !important; }

  .is-web .main { flex-direction: column; padding: 8px 10px; gap: 8px; overflow: hidden; }
  .is-web .stage { flex: 1; min-height: 0; overflow-y: auto; gap: 10px; }
  .is-web .chat { display: none; flex: 1; min-height: 0; }
  .is-web .show-chat .stage { display: none; }
  .is-web .show-chat .chat { display: flex; }

  .is-web .stage { justify-content: flex-start; }
  .is-web .shares { flex: none; min-height: 0; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: none !important; grid-auto-rows: auto; }
  .is-web .shares .share { min-height: 0 !important; aspect-ratio: 16 / 9; }
  .is-web .tiles, .is-web .shares:not([hidden]) + .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .is-web .tiles { flex: none; grid-template-rows: none; grid-auto-rows: auto; container-type: normal !important; }
  .is-web .stage .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; place-content: start; }
  .is-web .stage .tile { width: auto; aspect-ratio: 4 / 3; }
  .is-web .tile { aspect-ratio: 4 / 3; }
  .is-web .tiles .avatar { width: 52px; height: 52px; font-size: 18px; }
  .is-web .avatar { width: 52px; height: 52px; font-size: 18px; }
  .is-web .tile-name { font-size: 12px; left: 6px; bottom: 6px; max-width: calc(100% - 12px); }
  .is-web .tile-status, .is-web .tile-warning { font-size: 10px; top: 6px; }
  .is-web .tile-status { right: 6px; }
  .is-web .tile-warning { left: 6px; }
  .is-web .icon-btn.floating { width: 36px; height: 36px; top: 10px; right: 10px; }
  .is-web .icon-btn.floating.second { right: 52px; }
  .is-web .share-label { left: 10px; top: 10px; font-size: 11px; padding: 4px 8px; }

  .is-web .mobile-tabs { display: flex; gap: 6px; padding: 0 10px 6px; }
  .is-web .tab {
    flex: 1; height: 38px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2);
    font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  }
  .is-web .tab.active { background: var(--accent-soft); color: var(--accent-strong); border-color: rgba(34, 211, 238, .35); }

  .is-web .controls { padding: 0 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .is-web .controls { padding-bottom: max(48px, calc(env(safe-area-inset-bottom) + 40px)); }
  .is-web .control-bar { width: 100%; flex-wrap: nowrap; gap: 4px; padding: 6px; border-radius: 14px; }
  .is-web .ctrl { flex: 1 1 0; min-width: 0; height: 48px; padding: 0; }
  .is-web .ctrl span { display: none; }
  .is-web .ctrl svg { width: 22px; height: 22px; }
  .is-web .divider { display: none; }
  .is-web #ptt-hint { font-size: 12px; }

  .is-web .join { padding: 14px; }
  .is-web .join-card { padding: 22px; }
  .is-web .modal { padding: 10px; align-items: flex-end; }
  .is-web .modal-card { padding: 18px; border-radius: 16px; max-height: 92dvh; }
  .is-web .modes, .is-web .modes.three { grid-template-columns: minmax(0, 1fr); }
  .is-web .sound-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-web .person-menu { left: 10px !important; right: 10px; width: auto; top: auto !important; bottom: 120px; }
  .is-web .msg-image img { max-height: 180px; }
}

.modes.four { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.confirm-card { max-width: 420px; }
.novidades-lista { margin: 4px 0 18px; padding-left: 20px; display: grid; gap: 10px; line-height: 1.45; }
.novidades-lista li::marker { color: var(--accent); }
.btn.danger-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-btn:hover { filter: brightness(1.08); border-color: var(--danger); }
@media (max-width: 760px) {
  /* Janelas abrem no meio e ficam longe do selo do Netlify, que fica no canto de baixo */
  .is-web .modal { align-items: center; }
  .is-web .modal { padding-bottom: 64px; }
  .is-web .modal-card { max-height: calc(100dvh - 90px); }
  .is-web .modal-actions { position: sticky; bottom: -18px; background: var(--surface); padding: 10px 0 2px; margin-top: -6px; }
  .is-web .modes.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-web .person-menu { bottom: 140px; }
  .is-web .tile { cursor: pointer; }
}

/* Tela cheia da câmera no quadro */
.tile-full {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border-2);
  background: rgba(5, 7, 12, .75); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: .85;
}
.tile-full:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.tile-full svg { width: 16px; height: 16px; }

/* Aviso de som pausado */
.audio-unlock {
  position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--warn); background: #2A1D05; color: #FFD58A;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  max-width: calc(100% - 24px);
}

/* Barra de atualização */
.update-bar {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), 0 12px 30px rgba(0,0,0,.5); font-size: 14px; max-width: calc(100% - 24px); flex-wrap: wrap;
}


/* Tela cheia (câmera ou tela de alguém) */
.full-view { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; }
.full-view video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.full-view-name {
  position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: 8px;
  background: rgba(5, 7, 12, .7); color: var(--text); font-weight: 700; font-size: 14px;
}
.full-view-close {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-2);
  background: rgba(5, 7, 12, .7); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.full-view-close:hover { color: var(--accent); border-color: var(--accent); }
.full-view-close svg { width: 18px; height: 18px; }

/* Menu de pessoa: ações privadas */
.pm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Call privada */
.private-pill { border-color: var(--warn); color: #FFD58A; }
.private-pill strong { color: #FFE2A8; }

/* Mensagens privadas */
.dm-launcher {
  position: fixed; right: 20px; bottom: 96px; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.dm-launcher:hover { border-color: var(--accent); color: var(--accent-strong); }
.dm-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.dm {
  position: fixed; right: 20px; bottom: 96px; z-index: 30; width: min(360px, calc(100vw - 32px)); height: min(460px, calc(100dvh - 140px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6); overflow: hidden;
}
.dm-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); }
.dm-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; min-width: 0; }
.dm-tab {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.dm-tab.active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.dm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px rgba(255, 77, 109, .6); }
.dm-x { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dm-x:hover { color: var(--text); border-color: var(--border-2); }
.dm-messages { padding: 14px; gap: 12px; }
.dm-offline { margin: 0; padding: 8px 14px; border-top: 1px solid var(--border); color: #FFD58A; }
.dm .chat-form { padding: 10px; }

/* Saguão: ações por pessoa */
.lobby-person .row-actions { display: flex; gap: 4px; flex: none; }
.mini-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mini-btn:hover { color: var(--accent); border-color: var(--accent); }
.watcher-chip {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 3px 8px; border-radius: 8px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font-family: inherit; font-size: 12px; cursor: pointer;
}
.watcher-chip:hover { color: var(--accent-strong); border-color: var(--accent); }
@media (max-width: 760px) {
  .is-web .dm, .is-web .dm-launcher { bottom: 150px; right: 12px; }
}
@media (max-width: 1000px) { .stage { min-height: 55vh; } }

/* Chaves liga/desliga no visual do app (no lugar das caixinhas do Windows) */
.toggle-row input[type=checkbox], .check-row input[type=checkbox], #sound-enabled {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0;
  width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2);
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.toggle-row input[type=checkbox]::before, .check-row input[type=checkbox]::before, #sound-enabled::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.toggle-row input[type=checkbox]:checked, .check-row input[type=checkbox]:checked, #sound-enabled:checked {
  background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
}
.toggle-row input[type=checkbox]:checked::before, .check-row input[type=checkbox]:checked::before, #sound-enabled:checked::before {
  transform: translateX(18px); background: var(--accent-ink);
}
.toggle-row input[type=checkbox]:focus-visible, .check-row input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.person-menu .toggle-row input[type=checkbox] { width: 36px; height: 20px; }
.person-menu .toggle-row input[type=checkbox]::before { width: 14px; height: 14px; }
.person-menu .toggle-row input[type=checkbox]:checked::before { transform: translateX(16px); }

/* Botões de opção (rádio) no visual do app */
.mode input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border-radius: 50%;
  border: 2px solid var(--border-2); background: var(--field); display: grid; place-content: center; cursor: pointer;
}
.mode input[type=radio]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; transform: scale(0); transition: transform .12s; background: var(--accent); }
.mode input[type=radio]:checked { border-color: var(--accent); }
.mode input[type=radio]:checked::before { transform: scale(1); }

/* Abas (configurações) */
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); margin-top: -4px; }
.tab-btn {
  flex: 1; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--accent-soft); color: var(--accent-strong); border-color: rgba(34, 211, 238, .35); }
#settings .modal-card { min-height: min(640px, 100%); }

/* Chat: abas (#geral + privados) */
.chat-head { padding: 8px 10px; }
.chat-tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: thin; }
.chat-tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
}
.chat-tab:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.chat-tab.active { color: var(--text); background: var(--accent-soft); border-color: rgba(34, 211, 238, .3); }
.chat-tab.active svg { stroke: var(--accent); }
.chat-tab .at { color: var(--accent); }
.chat-tab span:not(.at):not(.dm-dot) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; }
/* Conversa privada encaixada no painel de chat (na call, no PC) */
.dm.docked { position: static; width: auto; height: auto; flex: 1; min-height: 0; border: none; border-radius: 0; box-shadow: none; background: transparent; }
.dm.docked .dm-head { display: none; }
.chat > .messages[hidden], .chat > .chat-form[hidden] { display: none; }

/* Mensagens seguidas da mesma pessoa */
.messages .msg.cont { margin-top: -12px; }
.messages .msg.cont .msg-avatar { visibility: hidden; height: 0; }
.messages .msg.cont .msg-meta { display: none; }

@media (max-width: 760px) { .is-web .divider { display: none; } }
.novidades-lista li.novidades-versao { list-style: none; margin: 8px 0 0 -20px; font-family: var(--display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-size: 13px; }
/* X para fechar uma conversa privada */
.tab-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 5px; color: var(--muted); opacity: .7; }
.tab-x:hover, .tab-x:focus-visible { opacity: 1; color: var(--text); background: rgba(255, 255, 255, .08); outline: none; }

/* Balão da call privada */
.call-balloon {
  position: fixed; top: 76px; right: 20px; z-index: 40; width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, var(--tile-luz), var(--surface)); border: 1px solid var(--border-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(34, 211, 238, .08);
  animation: cb-in .18s ease-out;
}
.call-balloon[hidden] { display: none; }
@keyframes cb-in { from { transform: translateY(-8px); opacity: 0; } }
.call-balloon.ringing { border-color: var(--talk); box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 22px var(--talk-glow); }
.call-balloon.ringing .msg-avatar { animation: cb-pulse 1.3s ease-in-out infinite; }
@keyframes cb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 255, 143, .55); } 50% { box-shadow: 0 0 0 10px rgba(61, 255, 143, 0); } }
.cb-top { display: flex; align-items: center; gap: 12px; }
.cb-top .msg-avatar { width: 44px; height: 44px; font-size: 15px; }
.cb-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cb-text strong { font-family: var(--display); font-size: 16px; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-phone { color: var(--talk); flex: none; }
.cb-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cb-actions .btn { min-width: 88px; }
.cb-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; padding: 8px; border-radius: 10px; background: var(--field); border: 1px solid var(--border); }
.cb-person { text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-family: inherit; font-weight: 700; cursor: pointer; }
.cb-person:hover { border-color: var(--accent); color: var(--accent-strong); }
@media (max-width: 760px) { .is-web .call-balloon { top: 64px; right: 12px; left: 12px; width: auto; } }

/* ---------- Fundo da câmera ---------- */
.cambg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.cambg {
  display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; cursor: pointer;
  background: var(--field, #0A0E18); border: 1px solid var(--border, #1E2740); color: var(--text-2, #C5CCDA);
  font: inherit; font-size: 12px; font-weight: 700; text-align: center;
}
.cambg:hover { border-color: var(--border-2, #2A3552); }
.cambg.on { border-color: var(--accent, #22D3EE); color: var(--accent-strong, #67E8F9); box-shadow: 0 0 0 1px var(--accent, #22D3EE); }
.cambg-prev { aspect-ratio: 16 / 9; border-radius: 6px; background: #141B2C center / cover no-repeat; position: relative; overflow: hidden; }
.cambg-prev.none { background: repeating-linear-gradient(135deg, #141B2C 0 8px, #0E1320 8px 16px); }
.cambg-prev.blur-leve, .cambg-prev.blur-forte { background: radial-gradient(circle at 50% 70%, #8B96AB 0 22%, transparent 23%), linear-gradient(135deg, #2b3a5c, #1a5468 60%, #3a2a5c); }
.cambg-prev.blur-leve { filter: blur(1px); }
.cambg-prev.blur-forte { filter: blur(3px); }

/* ---------- Controle pelo celular ---------- */
.deck-info { display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.deck-qr { width: 148px; height: 148px; flex: none; border-radius: 10px; overflow: hidden; background: #fff; }
.deck-qr svg { width: 100%; height: 100%; display: block; }
.deck-url { font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--accent-strong, #67E8F9); user-select: all; }
.deck-pin { font-size: 24px; letter-spacing: .3em; color: var(--text, #E8ECF4); }
.deck-clients { font-size: 12px; color: var(--muted, #8B96AB); display: inline-flex; align-items: center; gap: 6px; }
.deck-clients::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.deck-clients.on { color: var(--talk, #3DFF8F); }

/* ---------- Conta (2.0): login, convite, avisos ---------- */
:root:not(.is-web) .web-only { display: none !important; }
.auth-card { max-width: 420px; }
.auth-view, .auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .field-label { margin-top: 2px; }
.auth-title { margin: 2px 0 0; font-family: var(--display); font-size: 20px; letter-spacing: .05em; text-transform: uppercase; }
.auth-note { margin: 4px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; text-align: center; line-height: 1.5; }
.auth-web { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.auth-card .check-row { align-items: center; font-size: 13px; color: var(--text-2); gap: 8px; }
.auth-card .check-row input { margin-top: 0; }
.code-input { font-family: var(--display); font-size: 26px; letter-spacing: .5em; text-align: center; height: 56px; }
.tag-pill {
  align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-strong); border: 1px solid rgba(34, 211, 238, .35); white-space: nowrap;
}
.tag-pill.ok { background: rgba(61, 255, 143, .1); color: var(--talk); border-color: rgba(61, 255, 143, .35); }
.tag-pill.warn { background: rgba(255, 176, 32, .1); color: #FFD58A; border-color: rgba(255, 176, 32, .35); }
.tag-pill.red { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 77, 109, .4); }
.tag-pill.cinza { background: var(--surface-2); color: var(--muted); border-color: var(--border-2); }
.aviso-view { align-items: center; text-align: center; }
.aviso-icone { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-top: 6px; }
.aviso-icone.alerta { background: var(--danger-soft); border: 1px solid rgba(255, 77, 109, .4); }
.aviso-icone.aparelho { background: var(--accent-soft); border: 1px solid rgba(34, 211, 238, .35); }

/* ---------- Minha conta e Membros ---------- */
.conta-card { max-width: 480px; }
.conta-card .card, .membros-card .card { display: flex; flex-direction: column; gap: 8px; }
.membros-card { max-width: 760px; width: 100%; }
.membros-lista { display: flex; flex-direction: column; max-height: 52vh; overflow: auto; }
.membro-linha {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 110px 34px; gap: 12px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--border);
}
.membro-linha:first-child { border-top: none; }
.membro-linha.banido { opacity: .65; }
.membro-linha .stack { min-width: 0; }
.membro-linha .stack strong, .membro-linha .stack span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convite-linha { grid-template-columns: minmax(0, 1fr) auto 80px; }
.membro-agora { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.dot.online { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.acoes-btn { font-size: 18px; font-weight: 900; }
.menu-acoes {
  position: absolute; right: 4px; top: calc(100% - 6px); z-index: 5; min-width: 230px; display: flex; flex-direction: column; padding: 6px;
  background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
}
.menu-acoes button { text-align: left; padding: 9px 10px; border: none; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.menu-acoes button:hover { background: var(--accent-soft); color: var(--accent-strong); }
.menu-acoes button.perigo, .link-btn.perigo { color: var(--danger); }
.convite-pronto { border-color: rgba(34, 211, 238, .4); }
.convite-link {
  display: block; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--accent-strong); background: var(--field);
  border: 1px dashed rgba(34, 211, 238, .4); border-radius: 10px; padding: 10px 12px; word-break: break-all; user-select: all;
}
@media (max-width: 640px) {
  .membro-linha { grid-template-columns: 30px minmax(0, 1fr) auto 30px; }
  .membro-linha .membro-agora { display: none; }
}

/* ---------- Saguão (casa do Resenha) ---------- */
.saguao {
  height: 100%; display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 12px; padding: 12px;
}
.saguao[hidden] { display: none !important; }
.sg-lista, .sg-perfil, .sg-centro { min-width: 0; min-height: 0; }
.sg-lista {
  display: flex; flex-direction: column; background: var(--painel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.sg-marca { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sg-marca b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 17px; }
.sg-call { margin: 12px 12px 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.sg-call.ativa { border-color: rgba(61, 255, 143, .4); background: rgba(61, 255, 143, .06); }
.sg-call-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; font-size: 13px; }
.sg-call.ativa .sg-call-topo > span:first-child { color: var(--talk); }
.sg-call-av { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.sg-call-av:empty { display: none; }
.sg-call-pessoa { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: none; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.sg-call-pessoa:hover:not(:disabled) { background: rgba(255, 255, 255, .05); }
.sg-call-pessoa:disabled { cursor: default; opacity: 1; }
.sg-call-pessoa .msg-avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.sg-call-nome { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-call-jogo { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.sg-entrar { width: 100%; height: 42px; background: var(--talk); border-color: var(--talk); color: var(--talk-ink); font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sg-entrar:hover { filter: brightness(1.06); }
.sg-entrar.sair { background: var(--danger); border-color: var(--danger); color: #fff; }
#sg-call-desde { font-variant-numeric: tabular-nums; }
.sg-estado { display: flex; justify-content: space-between; gap: 8px; padding: 2px 16px; min-height: 18px; }
.sg-pessoas { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.sg-sec { padding: 12px 16px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-grupo { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.sg-vazio { padding: 2px 10px; margin: 0; }
.sg-pessoa {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.sg-pessoa:hover { background: var(--surface-2); }
.sg-pessoa.sel { background: var(--surface-2); border-color: var(--border-2); }
.sg-pessoa.offline { opacity: .5; }
.sg-av { position: relative; width: 36px; height: 36px; overflow: visible; }
.sg-av.grande { width: 76px; height: 76px; font-size: 26px; }
.sg-who { display: flex; flex-direction: column; min-width: 0; }
.sg-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-who .small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-who .jogo { color: var(--accent-strong); }
.st-bola { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: #4B5670; }
.sg-av .st-bola { position: absolute; right: -2px; bottom: -2px; border: 3px solid var(--surface); width: 14px; height: 14px; }
.sg-av.grande .st-bola { width: 20px; height: 20px; border-width: 4px; right: 0; bottom: 0; }
.st-bola.disponivel { background: var(--talk); }
.st-bola.ausente { background: var(--warn); }
.st-bola.np { background: var(--danger); }
.st-bola.invisivel, .st-bola.offline { background: #4B5670; }
.st-txt.disponivel { color: var(--talk) !important; }
.st-txt.ausente { color: var(--warn) !important; }
.st-txt.np { color: var(--danger) !important; }
.sg-eu { display: flex; align-items: center; gap: 6px; padding: 8px; border-top: 1px solid var(--border); background: var(--surface-2); }
.sg-eu-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sg-eu-btn:hover { background: var(--surface-3); }
.sg-eu .sg-av .st-bola { border-color: var(--surface-2); }
.sg-icones { display: flex; gap: 2px; }
.sg-icones .icon-btn { width: 34px; height: 34px; }
.sg-centro { display: flex; }
.sg-centro .chat { flex: 1 1 auto; }
.sg-perfil {
  background: var(--painel); border: 1px solid var(--border); border-radius: 14px; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px; position: relative;
}
.sg-perfil-vazio { margin: auto 0; display: flex; flex-direction: column; gap: 6px; text-align: center; padding: 20px 6px; }
.sg-perfil-x { position: absolute; right: 10px; top: 10px; display: inline-flex; } /* fecha o perfil em qualquer tamanho de tela */
.sg-perfil-topo { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 6px; }
.sg-perfil-nome { font-size: 18px; }
.sg-frase { color: var(--text-2); font-size: 13px; font-style: italic; }
.sg-jogo { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); }
.sg-jogo-ic { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #031218; background: linear-gradient(135deg, var(--accent), var(--talk)); }
.sg-mini { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-acoes { display: flex; flex-direction: column; gap: 8px; }
.sg-acoes .btn { width: 100%; height: 40px; }
.sg-abas { display: none; }

/* Menu de status */
.status-menu {
  position: fixed; z-index: 60; width: 270px; padding: 6px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 2px;
}
.status-menu[hidden] { display: none !important; }
.st-op { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.st-op:hover, .st-op[aria-checked="true"] { background: var(--accent-soft); }
.st-op span { display: flex; flex-direction: column; }
.st-op small { color: var(--muted); font-size: 11.5px; }
.st-sep { border-top: 1px solid var(--border); margin: 6px 4px; }
.st-label { font-size: 12px; color: var(--muted); padding: 2px 10px 0; }
.status-menu .input { margin: 4px 8px 6px; width: auto; height: 36px; }
.st-jogo { padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.status-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1100px) {
  .saguao { grid-template-columns: 260px minmax(0, 1fr); }
  .sg-perfil { position: fixed; right: 12px; top: 12px; bottom: 12px; width: 300px; z-index: 40; display: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
  .sg-perfil.aberto { display: flex; }
  .sg-perfil-x { display: inline-flex; }
}
/* Celular: abas Grupo / Chat; perfil e status como gaveta de baixo */
@media (max-width: 760px) {
  .saguao { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); gap: 8px; }
  .saguao[data-aba="grupo"] .sg-centro { display: none; }
  .saguao[data-aba="chat"] .sg-lista { display: none; }
  .sg-abas { display: flex; gap: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .sg-abas .tab {
    flex: 1; height: 42px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2);
    font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  }
  .sg-abas .tab.active { background: var(--accent-soft); color: var(--accent-strong); border-color: rgba(34, 211, 238, .35); }
  .sg-pessoa { padding: 10px; }
  .sg-perfil { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 75vh; border-radius: 18px 18px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .status-menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border-radius: 18px 18px 0 0; padding: 10px 10px max(14px, env(safe-area-inset-bottom)); }
  .st-op { padding: 13px 12px; }
  /* no saguão o chat é a aba Chat (na call do celular ele abre pelo botão do chat) */
  .is-web .sg-centro .chat, .sg-centro .chat { display: flex; flex: 1; min-height: 0; border-radius: 14px; }
}

.sg-sair:hover { color: var(--danger); }
.st-op.st-sair { color: var(--danger); }
.st-op.st-sair:hover { background: var(--danger-soft); }
.st-sep[hidden], .st-op[hidden] { display: none; }

/* @menções */
.mencao { color: var(--accent-strong); background: var(--accent-soft); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.mencao.eu { color: #FFE2A8; background: rgba(255, 176, 32, .18); }
.msg.msg-mencao { background: rgba(255, 176, 32, .07); box-shadow: inset 3px 0 0 var(--warn); border-radius: 6px; }
.chat-form { position: relative; }
.mencao-lista {
  position: absolute; left: 14px; right: 14px; bottom: calc(100% - 6px); z-index: 20; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.mencao-lista[hidden] { display: none; }
.mencao-op { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border: none; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mencao-op small { color: var(--muted); font-size: 11.5px; }
.mencao-op.ativa, .mencao-op:hover { background: var(--accent-soft); }
.sg-voce { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* Arquivo no chat */
.msg-arquivo { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 12px; max-width: 360px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-2); }
.msg-arquivo .arq-ic { color: var(--accent); flex: none; display: inline-flex; }
.msg-arquivo .arq-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-arquivo .arq-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.msg-arquivo .arq-info small { color: var(--muted); font-size: 12px; }
.msg-arquivo .btn.small { height: 32px; padding: 0 12px; font-size: 13px; flex: none; }

/* Emojis */
.emoji-btn {
  flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.emoji-btn:hover, .emoji-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.emoji-painel {
  position: fixed; z-index: 60; width: 316px; max-height: 340px; overflow-y: auto; padding: 8px 10px 10px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.emoji-painel[hidden] { display: none; }
.emoji-titulo { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 8px 2px 4px; }
.emoji-grade { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-op { height: 34px; border: none; border-radius: 8px; background: none; font-size: 20px; line-height: 1; cursor: pointer; }
.emoji-op:hover, .emoji-op:focus-visible { background: var(--accent-soft); }
/* abas Emojis / Figurinhas e as figurinhas */
.emoji-abas { position: sticky; top: -8px; z-index: 1; display: flex; gap: 4px; padding: 2px; margin: -2px 0 4px; border-radius: 10px; background: var(--surface-2); }
.emoji-aba { flex: 1; height: 30px; border: none; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.emoji-aba.ativa { background: var(--accent-soft); color: var(--accent); }
.figurinha-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 4px; }
.figurinha-op { aspect-ratio: 1; padding: 4px; border: none; border-radius: 10px; background: none; cursor: pointer; }
.figurinha-op img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.figurinha-op:hover, .figurinha-op:focus-visible { background: var(--accent-soft); }
.msg-figurinha { display: block; width: 140px; height: 140px; margin-top: 4px; object-fit: contain; user-select: none; }
.is-web .msg-figurinha { width: 120px; height: 120px; }
@media (max-width: 760px) {
  .emoji-painel { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 50vh; border-radius: 18px 18px 0 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .emoji-grade { grid-template-columns: repeat(8, 1fr); }
  .emoji-op { height: 40px; font-size: 24px; }
}

.sg-estado { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-convidar { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--accent-strong); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.sg-convidar:hover { border-color: var(--accent); }
.sg-convidar[hidden] { display: none; }
.sg-admin { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.sg-admin .btn { height: 36px; }
.sg-admin .error { margin: 0; min-height: 0; }

/* Abertura: procurando/baixando atualização antes do login */
.abertura { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: var(--bg, #07090F); }
.abertura[hidden] { display: none; }
.abertura { transition: opacity .3s ease; }
.abertura.saindo { opacity: 0; pointer-events: none; }
.abertura-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
/* Logo animado na abertura: o arco do fone se desenha, as conchas sobem, o balão aparece e os pontinhos "digitam" */
.ab-logo { overflow: visible; filter: drop-shadow(0 0 0 rgba(61, 255, 143, 0)); animation: ab-brilho 2.4s ease-in-out 1.4s infinite; }
.ab-fundo { transform-origin: 256px 256px; animation: ab-fundo .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.ab-arco { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ab-arco .7s cubic-bezier(.6, 0, .2, 1) .25s forwards; }
.ab-concha { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); animation: ab-concha .45s cubic-bezier(.2, .9, .3, 1.4) forwards; }
.ab-esq { animation-delay: .8s; } .ab-dir { animation-delay: .9s; }
.ab-balao { transform-box: fill-box; transform-origin: 30% 100%; transform: scale(0); animation: ab-balao .5s cubic-bezier(.2, .9, .3, 1.5) 1.05s forwards; }
.ab-ponto { transform-box: fill-box; transform-origin: 50% 50%; animation: ab-digita 1.2s ease-in-out 1.6s infinite; }
.ab-ponto:nth-of-type(2) { animation-delay: 1.75s; } .ab-ponto:nth-of-type(3) { animation-delay: 1.9s; }
.ab-nome { font-family: var(--display); letter-spacing: .16em; text-transform: uppercase; font-size: 22px; opacity: 0; animation: ab-sobe .5s ease-out 1.2s forwards; }
.ab-texto { opacity: 0; animation: ab-sobe .5s ease-out 1.45s forwards; }
@keyframes ab-fundo { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ab-arco { to { stroke-dashoffset: 0; } }
@keyframes ab-concha { to { transform: scaleY(1); } }
@keyframes ab-balao { to { transform: scale(1); } }
@keyframes ab-digita { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px); } }
@keyframes ab-sobe { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ab-brilho { 0%, 100% { filter: drop-shadow(0 0 0 rgba(61, 255, 143, 0)); } 50% { filter: drop-shadow(0 0 22px rgba(61, 255, 143, .45)); } }
@media (prefers-reduced-motion: reduce) {
  .ab-logo, .ab-fundo, .ab-arco, .ab-concha, .ab-balao, .ab-ponto, .ab-nome, .ab-texto { animation: none; }
  .ab-arco { stroke-dashoffset: 0; } .ab-concha, .ab-balao { transform: none; } .ab-nome, .ab-texto { opacity: 1; }
}

/* Barra do grupo fixa à esquerda durante a call (app do Windows): a mesma do saguão, só o lado direito vira a call */
.sg-marca { position: relative; }
.sg-recolher { display: none; margin-left: auto; width: 32px; height: 32px; }
.sg-expandir { display: none; width: 36px; height: 36px; margin-right: -4px; }
.app.com-barra { display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.app.com-barra > * { grid-column: 2; }
.app.com-barra > .sg-lista { grid-column: 1; grid-row: 1 / -1; margin: 12px 0 12px 12px; min-height: 0; }
.app.com-barra > .main { grid-row: 2; }
.app.com-barra > .controls { grid-row: 3; }
.app.com-barra .sg-recolher { display: inline-flex; }
.app.com-barra .topbar .brand { display: none; } /* a marca já está na barra */
.app.com-barra.barra-recolhida { grid-template-columns: 0 minmax(0, 1fr); }
.app.com-barra.barra-recolhida > .sg-lista { display: none; }
.app.com-barra.barra-recolhida .sg-expandir { display: inline-flex; }
.app.com-barra.barra-recolhida .topbar .brand { display: flex; }
.app > .sg-perfil { position: fixed; right: 16px; top: 80px; bottom: 16px; width: 300px; z-index: 40; display: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.app > .sg-perfil.aberto { display: flex; }
.app > .sg-perfil .sg-perfil-x { display: inline-flex; }
@media (max-width: 1000px) {
  .app.com-barra { grid-template-columns: 0 minmax(0, 1fr); }
  .app.com-barra > .sg-lista { display: none; }
  .app.com-barra .topbar .brand { display: flex; }
  .app.com-barra .sg-recolher, .app.com-barra .sg-expandir { display: none; }
}
.app.com-barra .topbar { justify-content: flex-start; }
.app.com-barra .topbar .top-right { margin-left: auto; }

/* ---------- Tema claro (Configurações → Aparência) ---------- */
:root[data-tema="claro"] {
  color-scheme: light;
  --bg: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F3F6FB;
  --surface-3: #E7ECF4;
  --text: #0F1729;
  --text-2: #2B3650;
  --muted: #5B6780;
  --border: #DCE3EE;
  --border-2: #C6D0DF;
  --field: #FFFFFF;
  --accent: #0891B2;
  --accent-strong: #0E7490;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(8, 145, 178, 0.12);
  --accent-glow: rgba(8, 145, 178, 0.35);
  --talk: #16A34A;
  --talk-glow: rgba(22, 163, 74, 0.35);
  --talk-ink: #FFFFFF;
  --tile: #E6ECF5;
  --tile-luz: #F7F9FC;
  --neutral-btn: #EEF2F8;
  --danger: #E11D48;
  --danger-soft: rgba(225, 29, 72, 0.10);
  --warn: #D97706;
  --ok: #16A34A;
  --stage: #E4E9F2;
  --painel: rgba(255, 255, 255, 0.94);
  --barra: rgba(255, 255, 255, 0.88);
  --barra-forte: rgba(255, 255, 255, 0.95);
  --grade: rgba(15, 23, 41, 0.035);
  --brilho-1: rgba(8, 145, 178, 0.08);
  --brilho-2: rgba(124, 58, 237, 0.06);
  --sombra: rgba(15, 23, 41, .12);
}
:root[data-tema="claro"] .control-bar { box-shadow: 0 12px 40px var(--sombra); }
:root[data-tema="claro"] .mencao.eu { color: #92400E; background: rgba(217, 119, 6, .16); }
:root[data-tema="claro"] .msg.msg-mencao { background: rgba(217, 119, 6, .07); }
:root[data-tema="claro"] .sg-call.ativa { border-color: rgba(22, 163, 74, .4); background: rgba(22, 163, 74, .06); }
:root[data-tema="claro"] .emoji-painel, :root[data-tema="claro"] .status-menu, :root[data-tema="claro"] .mencao-lista { box-shadow: 0 16px 40px var(--sombra); }
/* escolha do tema */
.temas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tema-op { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; border: 2px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.tema-op[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tema-amostra { height: 54px; border-radius: 8px; border: 1px solid var(--border-2); display: grid; grid-template-columns: 30% 1fr; overflow: hidden; }
.tema-amostra i, .tema-amostra b { display: block; }
.tema-amostra.escuro i { background: #0E1320; } .tema-amostra.escuro b { background: #07090F; }
.tema-amostra.claro i { background: #FFFFFF; } .tema-amostra.claro b { background: #EEF2F8; }
.tema-amostra.auto i { background: linear-gradient(135deg, #FFFFFF 50%, #0E1320 50%); } .tema-amostra.auto b { background: linear-gradient(135deg, #EEF2F8 50%, #07090F 50%); }
/* escolha do pacote de sons de aviso */
.pacotes { display: flex; flex-direction: column; gap: 6px; }
.pacote-op { display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 12px; border-radius: 12px; border: 2px solid var(--border-2); background: var(--surface-2); cursor: pointer; }
.pacote-op:hover { border-color: var(--border-3, var(--accent-soft)); }
.pacote-op[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pacote-op:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pacote-marca { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; }
.pacote-op[aria-checked="true"] .pacote-marca { border: 5px solid var(--accent); background: var(--surface); }
.pacote-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pacote-txt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pacote-ouvir { flex: none; height: 32px; padding: 0 12px; font-size: 13px; }
.proprios { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px 30px; padding-left: 12px; border-left: 2px solid var(--accent-soft); }
.proprio { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.proprio-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.proprio-txt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proprio .btn { flex: none; height: 32px; padding: 0 10px; font-size: 13px; }
@media (max-width: 760px) { .proprios { margin-left: 8px; } }
/* etiquetas por cima de vídeo/tela continuam escuras com letra clara, nos dois temas */
:root[data-tema="claro"] .share-label, :root[data-tema="claro"] .icon-btn.floating, :root[data-tema="claro"] .tile-name,
:root[data-tema="claro"] .tile-status, :root[data-tema="claro"] .tile-full, :root[data-tema="claro"] .full-view-name,
:root[data-tema="claro"] .full-view-close { color: #E8ECF4; border-color: rgba(255, 255, 255, .14); }
