/*
 * OPSEC Tela — identidade visual do opsecteam.ac: fundo #080808, superfícies
 * #0d0d0d, verde #00e5a0 / #00b87a, Inter + JetBrains Mono, janelas de
 * terminal, prompts "opsec@tela:~$" e grade de fundo.
 *
 * Tudo é servido por este site — fontes, logo, ícones e banners são cópias
 * locais, sem nenhum pedido ao site principal nem a terceiros.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #080808;
  --bg-soft: #0b0b0b;
  --panel: #0d0d0d;
  --panel-2: #111111;
  --panel-hi: #161616;
  --line: rgba(255, 255, 255, 0.05);
  --line-2: rgba(255, 255, 255, 0.08);
  --border: #1c1c1c;
  --border-hi: #2a2a2a;
  --text: #e0e0e0;
  --text-strong: #ececec;
  --text-dim: #8a8a8a;
  --text-faint: #555555;
  --accent: #00e5a0;
  --accent-hover: #1cf0b0;
  --accent-deep: #00b87a;
  --accent-ink: #000000;
  --accent-dim: rgba(0, 229, 160, 0.06);
  --accent-soft: rgba(0, 229, 160, 0.12);
  --accent-line: rgba(0, 229, 160, 0.25);
  --glow: 0 0 24px rgba(0, 229, 160, 0.2);
  --glow-lg: 0 0 48px rgba(0, 229, 160, 0.08), 0 0 0 1px rgba(0, 229, 160, 0.18);
  --danger: #ff5470;
  --danger-dim: rgba(255, 84, 112, 0.1);
  --warn: #ffb020;
  --overlay: rgba(8, 8, 8, 0.86);
  --radius: 10px;
  --radius-lg: 14px;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
video {
  max-width: 100%;
}
button {
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection {
  background: rgba(0, 229, 160, 0.25);
  color: #fff;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
}
.mono {
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
html.anuncio-aberto,
html.anuncio-aberto body {
  overflow: hidden;
}
/* âncoras da home param abaixo do topo fixo */
html {
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pulso {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 229, 160, 0.5);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 5px rgba(0, 229, 160, 0);
  }
}
@keyframes piscar {
  50% {
    opacity: 0;
  }
}

/* ------------------------------------------------------------ ícones */

.sprite-icones {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.i {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}
.i-mini {
  width: 0.7em;
  height: 0.7em;
  stroke-width: 2.6;
}

/* ------------------------------------------------------------ peças de terminal */

.prompt {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.prompt-host {
  color: var(--accent-deep);
}
.pulso {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulso 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px 12px;
  border: 1px solid rgba(0, 229, 160, 0.2);
  background: var(--accent-dim);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
}
.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  animation: piscar 1.05s steps(1) infinite;
}

/* Card com borda em gradiente (o .card-a do site principal) */
.card-a,
.terminal {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-lg);
  isolation: isolate;
}
.card-a::before,
.terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(0, 229, 160, 0.3), rgba(0, 229, 160, 0.04) 55%, transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.card-a::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(0, 229, 160, 0.08), transparent 60%);
  filter: blur(20px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card-a:hover::after {
  opacity: 1;
}

/* Janela de terminal: três pontos, título em mono, corpo com linhas */
.terminal {
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 229, 160, 0.25);
}
.terminal-barra {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.terminal-pontos {
  display: inline-flex;
  gap: 8px;
}
.terminal-pontos i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a2a2a;
}
.terminal-pontos i:last-child {
  background: rgba(0, 229, 160, 0.6);
}
.terminal-titulo {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.terminal-corpo {
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
}
.terminal-corpo p {
  margin: 0;
}
.t-cmd {
  color: var(--text);
}
.t-ok {
  color: var(--accent);
}
.t-mudo {
  color: var(--text-faint);
}

/* ------------------------------------------------------------ botões */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:not(:disabled):hover {
  background: var(--accent-hover);
  box-shadow: var(--glow);
}
.btn-primary:not(:disabled):active {
  background: var(--accent-deep);
}
.btn-outline {
  background: transparent;
  border-color: rgba(0, 229, 160, 0.25);
  color: var(--accent);
}
/* só em quem tem mouse: no toque o hover "gruda" e o botão fica aceso */
@media (hover: hover) {
  .btn-outline:not(:disabled):hover {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--glow);
  }
}
.btn-sm,
.btn-small {
  width: auto;
  height: 32px;
  padding: 0 12px;
  font-size: 11.5px;
  border-radius: 8px;
}

/* ------------------------------------------------------------ home: estrutura */

.home-body {
  position: relative;
  min-height: 100vh;
}
.fundo-grade {
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.fundo-grade::after {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  width: 820px;
  max-width: 100vw;
  height: 520px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 229, 160, 0.07);
  filter: blur(120px);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
  padding-top: var(--safe-top);
}
.header-inner {
  max-width: 1480px;
  height: 54px;
  margin: 0 auto;
  padding: 0 max(24px, var(--safe-right)) 0 max(24px, var(--safe-left));
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo,
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo-img,
.brand-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.08));
  transition: filter 0.2s ease;
}
.logo:hover .logo-img {
  filter: drop-shadow(0 0 8px rgba(0, 229, 160, 0.45));
}
.logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-nome {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d0d0d0;
}
.logo-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
}
.main-nav {
  position: relative;
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.main-nav a {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover {
  color: #c0c0c0;
  background: rgba(255, 255, 255, 0.03);
}
.main-nav a.ativo {
  color: var(--accent);
  background: none;
}
/* destaque que desliza até o item ativo (o mesmo efeito do site principal) */
.nav-indicador {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border: 1px solid rgba(0, 229, 160, 0.18);
  border-radius: 8px;
  background: var(--accent-dim);
  box-shadow: 0 0 18px -6px rgba(0, 229, 160, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.32, 1.25, 0.5, 1), width 0.38s cubic-bezier(0.32, 1.25, 0.5, 1), opacity 0.2s ease;
}
.nav-indicador.visivel {
  opacity: 1;
}
.header-cta {
  flex-shrink: 0;
}
@media (max-width: 820px) {
  .main-nav {
    display: none;
  }
  .header-cta {
    margin-left: auto;
  }
}

.home-layout {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 max(24px, var(--safe-right)) 0 max(24px, var(--safe-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
}
.home-main {
  min-width: 0;
}

/* ------------------------------------------------------------ home: hero */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 64px 0 56px;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  animation: fade-up 0.5s ease both;
}
.hero h1 em,
.secao-titulo h2 em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 229, 160, 0.35);
}
.hero .lead {
  margin: 0 0 32px;
  max-width: 500px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 16px 36px;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stats dt {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stats dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

/* formulário dentro da janela de terminal */
.action-card {
  width: 100%;
  max-width: 480px;
  justify-self: end;
  animation: fade-up 0.6s 0.1s ease both;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  position: relative;
  padding: 8px 12px 12px;
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.16s ease;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  color: var(--accent);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: var(--glow);
}
.tab-panel {
  display: none;
  padding: 20px 18px 6px;
}
.tab-panel.active {
  display: block;
  animation: fade-in 0.2s ease both;
}
.field {
  margin-bottom: 16px;
}
.field label,
.name-gate-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.campo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.campo:focus-within {
  border-color: rgba(0, 229, 160, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.campo-prompt {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
}
.campo input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 14px;
}
.campo input::placeholder {
  color: var(--text-faint);
}
.campo input:focus-visible {
  outline: none;
}
.campo input.code-input {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.form-error {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--danger);
}
.terminal-rodape {
  margin: 0;
  padding: 10px 18px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
}

/* ------------------------------------------------------------ home: seções */

.secao {
  padding: 72px 0;
}
.secao-titulo {
  margin-bottom: 36px;
  text-align: center;
}
.secao-titulo h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.secao-titulo > p:not(.prompt) {
  margin: 12px auto 0;
  max-width: 560px;
  font-size: 14px;
  color: var(--text-dim);
}
.secao-titulo-esquerda {
  text-align: left;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  transition: transform 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
}
.icone-quadrado {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 9px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 17px;
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.feature-card h3,
.step h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-strong);
}
.feature-card p,
.step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
}
.step-num {
  align-self: flex-start;
  padding: 3px 9px;
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 6px;
  background: var(--accent-dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.privacidade-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
}
.privacidade-grid > div > p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}
.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding: 26px 0 calc(26px + var(--safe-bottom));
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 max(24px, var(--safe-right)) 0 max(24px, var(--safe-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.social-links {
  display: flex;
  gap: 18px;
}
.social-links a {
  color: var(--text-dim);
  transition: color 0.16s ease;
}
.social-links a:hover {
  color: var(--accent);
}

@media (max-width: 1180px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .trilho-anuncios {
    padding-bottom: 40px;
  }
}
@media (max-width: 1100px) {
  .hero,
  .privacidade-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .action-card {
    justify-self: stretch;
    max-width: none;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .hero {
    padding: 40px 0 36px;
  }
  .secao {
    padding: 52px 0;
  }
  .feature-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .stats dd {
    font-size: 17px;
  }
  .header-inner,
  .home-layout,
  .footer-inner {
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
  }
}

/* ------------------------------------------------------------ anúncios: faixa horizontal */

.anuncios {
  position: relative;
}
.anuncios-trilho {
  display: grid;
}
.anuncio {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 229, 160, 0.18);
  background: #050505;
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s, border-color 0.2s ease, box-shadow 0.2s ease;
}
.anuncio.ativo {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s, border-color 0.2s ease, box-shadow 0.2s ease;
}
.anuncio:hover,
.anuncio:focus-visible {
  border-color: var(--accent-line);
  box-shadow: var(--glow-lg);
}
.anuncio-fundo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}
/* o texto fica dentro da "janela" desenhada no centro do banner */
.anuncio-conteudo {
  position: absolute;
  inset: 29% 25.5% 19%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 3%;
}
.anuncio-chamada {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.anuncio-selo {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.anuncio-titulo {
  font-size: clamp(15px, 1.9cqw, 22px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #f2f2f2;
}
.anuncio-texto {
  font-size: clamp(12px, 1.2cqw, 14px);
  line-height: 1.45;
  color: #a8a8a8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.anuncio-botao {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.anuncio:hover .anuncio-botao,
.anuncio:focus-visible .anuncio-botao {
  background: var(--accent-hover);
  box-shadow: var(--glow);
}
.anuncio-seta {
  transition: transform 0.16s ease;
}
.anuncio:hover .anuncio-seta {
  transform: translateX(3px);
}
.anuncios-pontos {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.anuncios-ponto {
  width: 22px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--border-hi);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.anuncios-ponto[aria-current='true'] {
  width: 34px;
  background: var(--accent);
}
/* área de toque maior que o traço */
.anuncios-ponto::before {
  content: '';
  display: block;
  margin: -10px -4px;
  height: 24px;
}
.anuncios-largo {
  margin: 0 0 8px;
}
.anuncios-largo .anuncio {
  aspect-ratio: 1920 / 400;
  container-type: inline-size;
}
/* tela média: recorta as laterais (3:1) e o texto usa a janela inteira */
@media (max-width: 1000px) {
  .anuncios-largo .anuncio {
    aspect-ratio: 3 / 1;
  }
  .anuncios-largo .anuncio-conteudo {
    inset: 28% 10% 18%;
  }
  .anuncios-largo .anuncio-titulo {
    font-size: clamp(15px, 2.6cqw, 22px);
  }
  .anuncios-largo .anuncio-texto {
    font-size: clamp(12px, 1.7cqw, 14px);
  }
}
/* celular: recorta o banner na "janela" do meio para o texto caber */
@media (max-width: 760px) {
  .anuncios-largo .anuncio {
    aspect-ratio: 16 / 9;
  }
  .anuncios-largo .anuncio-conteudo {
    inset: 12% 7% 8%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 0 4%;
  }
  .anuncios-largo .anuncio-titulo {
    font-size: 1.15rem;
  }
  .anuncios-largo .anuncio-texto {
    font-size: 0.8rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}
@media (max-width: 480px) {
  .anuncios-largo .anuncio {
    aspect-ratio: 4 / 3;
  }
}
/* lateral da sala no celular: cartão compacto, sem o parágrafo */
.anuncios-compacto .anuncio {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
}
.anuncios-compacto .anuncio-conteudo {
  inset: 0;
  padding: 14px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 10%, rgba(5, 5, 5, 0.82) 70%);
}
.anuncios-compacto .anuncio-titulo {
  font-size: 0.95rem;
}
.anuncios-compacto .anuncio-texto {
  display: none;
}
.anuncios-compacto .anuncio-botao {
  padding: 6px 11px;
  font-size: 10.5px;
  border-radius: 8px;
}
.anuncios-compacto .anuncios-pontos {
  margin-top: 8px;
}

/* ------------------------------------------------------------ anúncios: coluna vertical */

.trilho-anuncios {
  padding-top: 64px;
}
/* um anúncio por vez, trocando (o mesmo carrossel da faixa) */
.anuncios-verticais .anuncios-trilho {
  display: grid;
}
.anuncio-vertical {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(0, 229, 160, 0.16);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: 0 30px 80px -40px rgba(0, 229, 160, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.anuncio-vertical.ativo {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.anuncio-vertical:hover,
.anuncio-vertical:focus-visible {
  border-color: rgba(0, 229, 160, 0.4);
  box-shadow: var(--glow-lg);
  transform: translateY(-2px);
}
.anuncio-vertical .terminal-barra {
  padding: 8px 12px;
}
.av-arte {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  user-select: none;
}
.av-corpo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}
.av-comando {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.av-selo {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.av-titulo {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.av-texto {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.av-lista,
.anuncio-modal-lista {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
}
.av-lista-item .i,
.anuncio-modal-lista-item .i {
  color: var(--accent);
  stroke-width: 2.6;
}
.av-botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.anuncio-vertical:hover .av-botao {
  background: var(--accent-hover);
  box-shadow: var(--glow);
}
/* na home larga, o anúncio da coluna acompanha a rolagem */
@media (min-width: 1181px) {
  .trilho-anuncios .anuncios-verticais {
    position: sticky;
    top: 72px;
  }
}
/* sem a coluna à direita (home em tela menor), o cartão fica deitado */
@media (max-width: 1180px) {
  .trilho-anuncios {
    padding-top: 0;
  }
  .trilho-anuncios .anuncios-verticais {
    max-width: 760px;
    margin: 0 auto;
  }
  .trilho-anuncios .anuncio-vertical {
    flex-direction: row;
  }
  .trilho-anuncios .anuncio-vertical .terminal-barra {
    display: none;
  }
  .trilho-anuncios .av-arte {
    width: 220px;
    border-bottom: none;
    border-right: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .trilho-anuncios .av-arte {
    width: 118px;
  }
  .trilho-anuncios .av-texto,
  .trilho-anuncios .av-lista {
    display: none;
  }
}

/* ------------------------------------------------------------ anúncio em tela (a cada 8 min) */

.anuncio-modal {
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.anuncio-modal[open] {
  animation: fade-up 0.25s ease both;
}
.anuncio-modal::backdrop {
  background: rgba(3, 6, 5, 0.84);
  backdrop-filter: blur(6px);
}
.anuncio-modal-janela {
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - 32px);
  background: var(--panel);
  border: 1px solid rgba(0, 229, 160, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 90px -20px rgba(0, 229, 160, 0.35), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
}
.anuncio-modal-fechar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.anuncio-modal-fechar:hover {
  border-color: var(--danger);
  color: var(--danger);
}
/* a arte em proporção real, para a marca cair certinho dentro da janela desenhada */
.anuncio-modal-arte {
  position: relative;
  container-type: inline-size;
  border-bottom: 1px solid var(--line);
}
.anuncio-modal-arte img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 400;
}
.anuncio-modal-marca {
  position: absolute;
  inset: 29% 25.5% 19%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 6cqw, 38px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  color: #f2f2f2;
  text-shadow: 0 0 18px rgba(0, 229, 160, 0.45);
  pointer-events: none;
  user-select: none;
}
.anuncio-modal-marca-ss {
  margin-left: 0.3em;
  color: var(--accent);
}
.anuncio-modal-corpo {
  padding: 22px 24px 24px;
}
.anuncio-modal-comando {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.anuncio-modal-selo {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.anuncio-modal h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.anuncio-modal-texto {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
}
.anuncio-modal-lista {
  margin-bottom: 22px;
  font-size: 12.5px;
}
.anuncio-modal-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.anuncio-modal-acoes .btn {
  flex: 1 1 200px;
}

/* ------------------------------------------------------------ sala: estrutura */

.call-body {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}
.call-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  flex-shrink: 0;
}
a.brand {
  border-radius: 8px;
  transition: opacity 0.16s ease;
}
a.brand:hover .brand-logo {
  filter: drop-shadow(0 0 8px rgba(0, 229, 160, 0.45));
}
a.brand:hover .brand-name {
  color: var(--accent);
}
.brand-name {
  transition: color 0.16s ease;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d0d0d0;
}
.brand-logo {
  height: 26px;
}
.brand-prompt {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.topbar-spacer {
  flex: 1;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.code-chip:hover {
  background: var(--accent-soft);
  box-shadow: var(--glow);
}
.code-chip:active {
  transform: scale(0.97);
}
.code-chip-icon {
  display: inline-flex;
  opacity: 0.85;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.chip-btn:hover {
  border-color: var(--border-hi);
  background: var(--panel-hi);
}
.chip-btn:active {
  transform: scale(0.97);
}
.chip-status {
  cursor: default;
}
.chip-status:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
}
.chip-icon-only {
  padding: 0 9px;
}
.chip-icon {
  display: inline-flex;
  font-size: 13px;
}
.chip-btn .i {
  font-size: 13px;
}
.chip-btn.chip-active {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--accent);
}
.chip-btn.chip-danger {
  color: var(--danger);
  border-color: rgba(255, 84, 112, 0.3);
  background: transparent;
}
.chip-btn.chip-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #000;
}
.host-only {
  display: none;
}
body.is-host .host-only {
  display: inline-flex;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-live {
  background: var(--accent);
  animation: pulso 1.6s ease-in-out infinite;
}
.dot-down {
  background: var(--danger);
}
@media (max-width: 1100px) {
  .brand-prompt {
    display: none;
  }
}
@media (max-width: 720px) {
  .brand-name,
  .chip-text {
    display: none;
  }
}
.call-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ------------------------------------------------------------ sala: lateral */

.call-sidebar {
  width: 296px;
  flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}
.sidebar-block {
  margin-bottom: 22px;
}
.sidebar-block h4 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease;
}
.code-box:hover {
  border-color: var(--accent-line);
}
.code-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(0, 229, 160, 0.3);
}
.code-box-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.code-box button,
.p-kick-btn,
.p-mute-btn,
.drawer-close {
  display: inline-grid;
  place-items: center;
  padding: 6px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}
.code-box button:hover {
  color: var(--accent);
  background: var(--accent-dim);
}
.participant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.participant-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.2s ease;
}
.participant-row.offline {
  opacity: 0.4;
}
.participant-row.clickable {
  cursor: pointer;
}
.participant-row.clickable:hover {
  background: var(--panel-hi);
  border-color: var(--line-2);
}
.p-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.participant-row.speaking .p-avatar,
.tile.speaking .tile-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.p-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.p-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-shrink: 0;
}
.p-icons > span {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.p-icons .muted {
  color: var(--danger);
}
.p-icons .muted.pelo-host {
  color: var(--warn);
}
.p-icons .live {
  color: var(--accent);
}
.p-icons .crown {
  color: var(--warn);
}
.p-icons .p-tela {
  color: var(--accent);
}
/* botão do host: liga/desliga SÓ o mute do host */
.p-mute-btn {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--accent);
  border: 1px solid var(--line-2);
}
.p-mute-btn:hover {
  background: var(--panel-hi);
  border-color: var(--border-hi);
}
.p-mute-btn.manual {
  color: var(--danger);
}
.p-mute-btn.pelo-host {
  color: var(--warn);
  border-color: rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.08);
}
.p-kick-btn {
  opacity: 0;
}
.participant-row:hover .p-kick-btn,
.p-kick-btn:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .p-kick-btn {
    opacity: 1;
    padding: 8px;
  }
}
.p-kick-btn:hover {
  color: var(--danger);
  background: var(--danger-dim);
}

/* controles de quem está na sala */
.sidebar-controls {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.ctrl-row {
  display: flex;
  gap: 8px;
}
.ctrl-btn {
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.ctrl-btn .icon {
  display: inline-flex;
}
.ctrl-btn:hover {
  background: var(--panel-hi);
  border-color: var(--border-hi);
}
.ctrl-btn:active {
  transform: scale(0.96);
}
.ctrl-btn-wide {
  flex: 1;
  padding: 0 14px;
}
.ctrl-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctrl-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.ctrl-btn.active:hover {
  background: var(--accent-hover);
}
.ctrl-btn.unsupported {
  opacity: 0.4;
}
.ctrl-btn.trocando .icon {
  animation: spin 0.7s linear infinite;
}
.ctrl-btn.trocando {
  opacity: 0.75;
}
.self-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
}
.self-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.self-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.mini-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}
.mini-btn:hover {
  background: var(--panel-hi);
  color: var(--text);
}
.mini-btn.is-off {
  color: var(--danger);
}
.mini-btn.is-on {
  color: var(--accent);
}
/* microfone silenciado pelo host: travado até o host liberar */
.mini-btn.is-locked {
  color: var(--warn);
  background: rgba(255, 176, 32, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.35);
}
.mini-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.voice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-dim);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.voice-bar.is-down {
  background: var(--danger-dim);
  border-color: rgba(255, 84, 112, 0.3);
}
.voice-bar.is-down .voice-status {
  color: var(--danger);
}
.voice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.wifi-icon {
  display: inline-flex;
}
.hangup-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--danger);
  border-radius: 9px;
  background: var(--danger);
  color: #000;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.16s ease, transform 0.12s ease;
  flex-shrink: 0;
}
.hangup-btn:hover {
  box-shadow: 0 0 24px rgba(255, 84, 112, 0.35);
}
.hangup-btn:active {
  transform: scale(0.94);
}
.mobile-only {
  display: none;
}
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 45;
  animation: fade-in 0.2s ease both;
}
.drawer-head {
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.drawer-close {
  font-size: 16px;
  color: var(--text-dim);
}
.drawer-close:hover {
  color: var(--text);
  background: var(--panel);
}
.drawer-extra {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.drawer-extra .mini-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  border-radius: var(--radius);
  font-size: 17px;
}
.more-sheet {
  position: fixed;
  left: max(12px, var(--safe-left));
  right: max(12px, var(--safe-right));
  bottom: calc(84px + var(--safe-bottom));
  padding: 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  z-index: 55;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.95);
  animation: fade-up 0.2s ease both;
}
.more-sheet h4 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.more-sheet-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.more-sheet-items .chip-btn {
  width: 100%;
  height: 46px;
  justify-content: flex-start;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 12px;
}
.more-sheet-items .chip-btn .chip-text {
  display: inline;
}

/* janela de pessoas do botão de membros (computador) */
#btn-people[aria-expanded='true'] {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent);
}
.pessoas-popover {
  position: fixed;
  top: calc(52px + var(--safe-top));
  right: 14px;
  z-index: 80;
  width: 320px;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 0 60px -20px rgba(0, 229, 160, 0.3), 0 24px 60px -24px rgba(0, 0, 0, 0.95);
  animation: fade-up 0.18s ease both;
}
.pessoas-popover .terminal-barra .drawer-close {
  margin-left: auto;
  padding: 4px;
}
.pessoas-popover .participant-list {
  padding: 8px;
}
@media (max-width: 900px) {
  .pessoas-popover {
    display: none !important;
  }
}

/* coluna de anúncios à direita da sala (só em telas largas) */
.call-rail {
  display: none;
  width: 268px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  scrollbar-width: none;
}
.call-rail::-webkit-scrollbar {
  display: none;
}
.rail-titulo {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.call-rail .av-titulo {
  font-size: 16px;
}
.call-rail .av-texto {
  font-size: 12px;
}
@media (min-width: 1280px) {
  .call-rail {
    display: block;
  }
  /* com a coluna à direita, a lateral não repete o anúncio */
  .anuncio-bloco {
    display: none;
  }
}

/* ------------------------------------------------------------ sala: palco */

.call-stage-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(0, 229, 160, 0.05), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
}
.video-grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 12px;
  padding: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: minmax(140px, 1fr);
  overflow-y: auto;
}
.pinned-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  min-height: 0;
}
.stage-zoom-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  touch-action: none;
}
.pinned-area {
  width: 100%;
  height: 100%;
}
.pinned-area .tile {
  width: 100%;
  height: 100%;
}
.thumb-strip {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  transition: opacity 0.25s ease;
}
.thumb-strip:empty {
  display: none;
}
.thumb-strip .tile {
  width: 176px;
  height: 106px;
  flex-shrink: 0;
}
.tile {
  position: relative;
  background: #070707;
  border: 1px solid rgba(0, 229, 160, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  animation: fade-up 0.3s ease both;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
/* cantos de "janela capturada", como nos banners */
.tile::before,
.tile::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(0, 229, 160, 0.35);
  border-style: solid;
  pointer-events: none;
  z-index: 1;
}
.tile::before {
  top: 8px;
  left: 8px;
  border-width: 1px 0 0 1px;
}
.tile::after {
  right: 8px;
  bottom: 8px;
  border-width: 0 1px 1px 0;
}
.thumb-strip .tile::before,
.thumb-strip .tile::after {
  display: none;
}
.tile.offline {
  opacity: 0.55;
}
.tile.clickable {
  cursor: pointer;
}
.tile.clickable:hover {
  border-color: rgba(0, 229, 160, 0.4);
  transform: translateY(-2px);
}
.tile.speaking {
  border-color: rgba(0, 229, 160, 0.55);
  box-shadow: 0 0 24px -6px rgba(0, 229, 160, 0.4);
}
.tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
  display: block;
  transform-origin: center center;
}
.tile.espelhado video {
  scale: -1 1;
}
.stage-zoom-wrap.zoomed .tile video {
  will-change: transform;
}
.tile-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-avatar {
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #121a17, var(--panel) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-hi);
  box-shadow: 0 0 24px rgba(0, 229, 160, 0.08);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.tile:not(.pinned) .tile-avatar {
  width: 68px;
  height: 68px;
}
.tile.pinned .tile-avatar {
  width: 148px;
  height: 148px;
}
.thumb-strip .tile .tile-avatar {
  width: 44px;
  height: 44px;
}
.avatar-logo {
  display: block;
  width: 66%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.tile-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--overlay);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}
.tile-label::before {
  content: '>';
  color: var(--accent);
  font-weight: 700;
}
.tile-label .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-label .mic-muted {
  display: inline-flex;
  color: var(--danger);
}
.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tile-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
  animation: piscar 1.2s steps(1) infinite;
}
.thumb-strip .tile-badge,
.thumb-strip .tile-label {
  font-size: 9.5px;
}
.thumb-strip .tile-label {
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
}
.thumb-strip .tile-badge {
  top: 6px;
  left: 6px;
  padding: 2px 6px;
}
/* volume só do som da tela compartilhada */
.tile-volume {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--overlay);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  transition: opacity 0.25s ease, border-color 0.16s ease;
}
.tile-volume:hover,
.tile-volume:focus-within {
  border-color: var(--accent-line);
}
.tile-volume-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
}
.tile-volume-btn:hover {
  background: var(--accent-dim);
}
.tile-volume-range {
  --nivel: 100%;
  width: 96px;
  height: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) var(--nivel), var(--border-hi) var(--nivel));
  cursor: pointer;
}
.tile-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.2);
}
.tile-volume-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}
.tile-volume-valor {
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.thumb-strip .tile-volume {
  display: none;
}
.tile-self-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.tile-self-share p {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
}
.tile-self-share .tile-self-share-hint {
  max-width: 320px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11.5px;
  color: var(--text-dim);
}
.tile-self-share-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  background: var(--accent-dim);
}
.tile-self-share-icon .avatar-logo {
  width: 60%;
}
.thumb-strip .tile-self-share p,
.thumb-strip .tile-self-share .btn,
.video-grid .tile-self-share .tile-self-share-hint {
  display: none;
}
.thumb-strip .tile-self-share-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0;
}
.tile-hide-preview {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--overlay);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.tile-aviso {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  background: rgba(6, 6, 6, 0.85);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.tile-aviso p {
  margin: 0;
}
.tile-parada {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 176, 32, 0.4);
  border-radius: 8px;
  background: var(--overlay);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.tile-parada .i {
  color: var(--warn);
}
.thumb-strip .tile-parada {
  font-size: 9px;
  padding: 2px 6px;
  top: 4px;
}
.aviso-captura {
  position: fixed;
  top: calc(64px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  width: min(520px, calc(100vw - 24px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95);
  animation: fade-up 0.2s ease both;
}
.aviso-captura p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}
.aviso-captura .aviso-captura-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 14px;
}
.aviso-captura-titulo .i {
  color: var(--warn);
}
.aviso-captura-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.tile-tocar {
  position: absolute;
  inset: auto auto 50% 50%;
  transform: translate(-50%, 50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--glow);
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}
.tile-aviso .spinner {
  width: 26px;
  height: 26px;
}
.zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--overlay);
  transition: opacity 0.25s ease;
}
.zoom-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.zoom-controls button:hover {
  background: var(--panel-hi);
  border-color: var(--accent-line);
}
.zoom-controls .zoom-reset {
  width: auto;
  padding: 0 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}
#zoom-level {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
}
/* HUD sobre a tela em destaque: some enquanto há zoom (para limpar a imagem)
   e some de vez com o olhinho desligado. Os controles de zoom ficam com
   zoom aplicado — é por eles que se volta. */
.pinned-area .tile-label,
.pinned-area .tile-badge,
.pinned-area .tile-volume,
.pinned-area .tile-hide-preview,
.unpin-chip,
.zoom-hint,
.zoom-controls {
  transition: opacity 0.2s ease;
}
.stage-zoom-wrap.zoomed .pinned-area .tile-label,
.stage-zoom-wrap.zoomed .pinned-area .tile-badge,
.stage-zoom-wrap.zoomed .pinned-area .tile-volume,
.stage-zoom-wrap.zoomed .pinned-area .tile-hide-preview,
.stage-zoom-wrap.zoomed .unpin-chip,
.stage-zoom-wrap.zoomed .pinned-area .tile::before,
.stage-zoom-wrap.zoomed .pinned-area .tile::after,
body.hud-desligado .pinned-area .tile-label,
body.hud-desligado .pinned-area .tile-badge,
body.hud-desligado .pinned-area .tile-volume,
body.hud-desligado .pinned-area .tile-hide-preview,
body.hud-desligado .unpin-chip,
body.hud-desligado .zoom-hint,
body.hud-desligado .pinned-area .tile::before,
body.hud-desligado .pinned-area .tile::after,
body.hud-desligado .stage-zoom-wrap:not(.zoomed) .zoom-controls {
  opacity: 0;
  pointer-events: none;
}
#btn-hud[aria-pressed='false'] {
  color: var(--warn);
  border-color: rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.08);
}

/* com alguém compartilhando, o zoom sobe para não cobrir o volume da tela */
.stage-zoom-wrap:has(.pinned-area .tile-volume:not([hidden])) .zoom-controls {
  bottom: 58px;
}
.zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 32px);
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--overlay);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.zoom-hint:hover {
  color: var(--text);
  border-color: var(--border-hi);
}
.zoom-hint.fade {
  opacity: 0;
  pointer-events: none;
}
.stage-zoom-wrap.zoomed {
  cursor: grab;
}
.stage-zoom-wrap.grabbing {
  cursor: grabbing;
}
.unpin-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(60vw, 260px);
  padding: 6px 11px 6px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--overlay);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  animation: fade-up 0.2s ease both;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.25s ease;
}
.unpin-chip:hover {
  background: rgba(20, 20, 20, 0.95);
  border-color: var(--accent);
}
.unpin-chip #unpin-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unpin-x {
  display: inline-flex;
  color: var(--accent);
}
.stage-empty {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  background: var(--bg);
}
.stage-empty p {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.55;
}
.stage-empty .stage-empty-prompt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.stage-empty-back {
  width: auto;
}

/* ------------------------------------------------------------ sala: avisos e janelas */

.toast-stack {
  position: fixed;
  top: calc(64px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.97);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.9);
  animation: toast-in 0.24s ease both;
  transition: opacity 0.3s ease;
}
.toast::before {
  content: '>';
  color: var(--accent);
  font-weight: 700;
}
.toast.saindo {
  opacity: 0;
}
.toast-danger {
  border-left-color: var(--danger);
  color: var(--danger);
}
.toast-danger::before {
  content: '!';
  color: var(--danger);
}
.settings-popover {
  position: fixed;
  bottom: 190px;
  left: 14px;
  z-index: 70;
  width: 290px;
  max-height: calc(100dvh - 230px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.95);
  animation: fade-up 0.2s ease both;
}
.settings-popover h4 {
  margin: 0 0 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.settings-popover select {
  width: 100%;
  margin-bottom: 14px;
  padding: 9px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0a0a0a;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.settings-popover select:hover {
  border-color: var(--border-hi);
}
.settings-popover select:focus-visible {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
/* navegador sem lista personalizável: ao menos as opções no tema escuro */
.settings-popover option {
  background: #0d0d0d;
  color: var(--text);
}
/* lista de opções personalizada (Chrome/Edge atuais): janela de terminal,
   opção marcada em verde com ">" no lugar do tique */
@supports (appearance: base-select) {
  .settings-popover select,
  .settings-popover ::picker(select) {
    appearance: base-select;
  }
  .settings-popover select {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .settings-popover select::picker-icon {
    color: var(--accent);
    transition: rotate 0.2s ease;
  }
  .settings-popover select:open {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }
  .settings-popover select:open::picker-icon {
    rotate: 180deg;
  }
  .settings-popover ::picker(select) {
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--accent-line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 0 40px -14px rgba(0, 229, 160, 0.35), 0 24px 50px -20px rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.15s ease, overlay 0.15s allow-discrete, display 0.15s allow-discrete;
  }
  .settings-popover ::picker(select):popover-open {
    opacity: 1;
  }
  @starting-style {
    .settings-popover ::picker(select):popover-open {
      opacity: 0;
    }
  }
  .settings-popover option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
  }
  .settings-popover option:hover,
  .settings-popover option:focus-visible {
    background: var(--panel-hi);
    color: var(--text-strong);
    outline: none;
  }
  .settings-popover option:checked {
    color: var(--accent);
    background: var(--accent-dim);
  }
  .settings-popover option::checkmark {
    content: '>';
    order: -1;
    font-weight: 700;
    color: var(--accent);
  }
}
.settings-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-faint);
}
.name-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 8, 8, 0.96);
  animation: fade-in 0.22s ease both;
}
.name-gate-card {
  width: 100%;
  max-width: 400px;
  animation: fade-up 0.28s ease both;
}
.name-gate-corpo {
  padding: 22px 22px 22px;
}
.name-gate-logo {
  display: block;
  height: 40px;
  width: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 160, 0.3));
}
.name-gate-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.name-gate-lead {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.name-gate .form-error {
  margin: 8px 0 0;
}
#name-gate-btn {
  margin-top: 12px;
}
@media (max-width: 520px) {
  .name-gate-corpo {
    padding: 18px 16px 18px;
  }
}

/* ------------------------------------------------------------ tela cheia (computador) */

body.immersive .call-topbar,
body.immersive .more-sheet,
body.immersive .scrim,
body.immersive .thumb-strip,
body.immersive .call-rail,
body.immersive .pessoas-popover {
  display: none !important;
}
body.immersive .call-sidebar {
  width: 0;
  min-width: 0;
  border: none;
  background: none;
  box-shadow: none;
  overflow: visible;
}
body.immersive .drawer-head,
body.immersive .sidebar-scroll {
  display: none !important;
}
body.immersive .pinned-layout {
  padding: 0;
  gap: 0;
}
body.immersive .stage-zoom-wrap {
  border-radius: 0;
}
body.immersive .pinned-area .tile {
  border: none;
  border-radius: 0;
}
body.immersive .video-grid {
  padding: 4px;
  gap: 4px;
}
body.immersive .sidebar-controls {
  position: fixed;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: calc(14px + var(--safe-bottom));
  z-index: 70;
  width: auto;
  flex-direction: row;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--overlay);
  transition: opacity 0.25s ease;
}
body.immersive .self-row,
body.immersive .voice-bar {
  background: none;
  border: none;
  padding: 0;
  gap: 0;
}
body.immersive .ctrl-label,
body.immersive .self-row .p-avatar,
body.immersive .self-row .self-name,
body.immersive .voice-bar .voice-status {
  display: none;
}
body.immersive .ctrl-btn-wide {
  flex: 0 0 auto;
  padding: 0;
  min-width: 42px;
}
body.immersive .self-actions .mini-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel-2);
}
body.controles-ocultos .sidebar-controls,
body.controles-ocultos .zoom-controls,
body.controles-ocultos .unpin-chip,
body.controles-ocultos .zoom-hint,
body.controles-ocultos .tile-volume {
  opacity: 0;
  pointer-events: none;
}
body.controles-ocultos .call-stage-area {
  cursor: none;
}

/* ------------------------------------------------------------ celular: palco em tela inteira */

@media (max-width: 900px) {
  .mobile-only {
    display: flex;
  }
  .sidebar-block.mobile-only {
    display: block;
  }
  .call-body {
    position: fixed;
    inset: 0;
    height: auto;
    display: block;
    touch-action: manipulation;
  }

  /* barras por cima do vídeo, com degradê, que somem sozinhas */
  .call-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    flex-wrap: nowrap;
    gap: 6px;
    padding: calc(8px + var(--safe-top)) calc(10px + var(--safe-right)) 20px calc(10px + var(--safe-left));
    background: linear-gradient(to bottom, rgba(8, 8, 8, 0.94) 0, rgba(8, 8, 8, 0.7) 55%, rgba(8, 8, 8, 0) 100%);
    border-bottom: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .topbar-actions {
    display: none;
  }
  .code-chip {
    padding: 0 10px;
    font-size: 11.5px;
    min-width: 0;
  }
  .code-chip .mono {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chip-btn {
    padding: 0 10px;
  }
  .chip-status .chip-text {
    display: none;
  }

  .call-main {
    position: absolute;
    inset: 0;
    display: block;
  }
  .call-stage-area {
    position: absolute;
    inset: 0;
  }
  .video-grid {
    padding: calc(64px + var(--safe-top)) calc(8px + var(--safe-right)) calc(92px + var(--safe-bottom))
      calc(8px + var(--safe-left));
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: minmax(130px, 1fr);
  }
  .video-grid[data-quantidade='1'],
  .video-grid[data-quantidade='2'] {
    grid-template-columns: 1fr;
  }
  .pinned-layout,
  body.immersive .pinned-layout {
    padding: 0;
    gap: 0;
  }
  .stage-zoom-wrap {
    border-radius: 0;
  }
  .pinned-area .tile {
    border: none;
    border-radius: 0;
  }
  .pinned-area .tile::before,
  .pinned-area .tile::after {
    display: none;
  }
  .thumb-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(80px + var(--safe-bottom));
    z-index: 35;
    padding: 0 calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));
    gap: 8px;
  }
  .thumb-strip .tile {
    width: 104px;
    height: 64px;
  }
  .thumb-strip .tile .tile-avatar {
    width: 28px;
    height: 28px;
    margin-bottom: 18px;
  }
  .thumb-strip .tile-label {
    max-width: calc(100% - 12px);
  }
  /* o que fica sobre o vídeo em destaque desce para baixo da barra de cima,
     senão some atrás dela */
  .pinned-area .tile-label {
    top: calc(64px + var(--safe-top));
    bottom: auto;
    left: calc(10px + var(--safe-left));
    transition: opacity 0.25s ease;
  }
  .pinned-area .tile-badge {
    display: none;
  }
  .pinned-area .tile-parada {
    top: calc(102px + var(--safe-top));
  }
  .pinned-area .tile-hide-preview {
    top: calc(64px + var(--safe-top));
    right: calc(10px + var(--safe-right));
  }
  .pinned-area .tile-volume {
    top: calc(102px + var(--safe-top));
    bottom: auto;
    right: calc(10px + var(--safe-right));
  }
  .tile-volume-range {
    width: 72px;
  }
  .unpin-chip {
    top: calc(102px + var(--safe-top));
    left: calc(10px + var(--safe-left));
    max-width: 60vw;
    font-size: 10.5px;
    padding: 5px 9px 5px 8px;
  }
  /* no celular o zoom é de pinça: os botões só aparecem com zoom aplicado */
  .zoom-controls {
    top: calc(64px + var(--safe-top));
    bottom: auto;
    right: calc(10px + var(--safe-right));
    padding: 4px 6px;
  }
  .stage-zoom-wrap:not(.zoomed) .zoom-controls {
    display: none;
  }
  body.controles-ocultos .pinned-area .tile-label {
    opacity: 0;
  }
  /* celular não compartilha tela: o botão só ocuparia espaço */
  .ctrl-btn.unsupported {
    display: none;
  }
  .zoom-controls .zoom-reset {
    display: none;
  }
  .zoom-hint {
    font-size: 10.5px;
    bottom: calc(160px + var(--safe-bottom));
  }

  /* gaveta de pessoas */
  .call-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100%;
    width: min(82vw, 320px);
    z-index: 50;
    padding-top: var(--safe-top);
    border-right: 1px solid var(--accent-line);
    transition: left 0.25s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
  }
  body.panel-open .call-sidebar {
    left: 0;
  }
  .sidebar-scroll {
    padding-bottom: calc(96px + var(--safe-bottom));
  }

  /* barra de controles embaixo */
  .sidebar-controls,
  body.immersive .sidebar-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    z-index: 60;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
    border: none;
    border-radius: 0;
    background: linear-gradient(to top, rgba(8, 8, 8, 0.96) 0, rgba(8, 8, 8, 0.78) 60%, rgba(8, 8, 8, 0) 100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .sidebar-controls .ctrl-row {
    gap: 10px;
  }
  .ctrl-btn,
  .ctrl-btn-wide {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 12px;
    font-size: 18px;
  }
  .ctrl-label {
    display: none;
  }
  .self-row {
    background: none;
    border: none;
    padding: 0;
    gap: 0;
  }
  .self-row .p-avatar,
  .self-row .self-name {
    display: none;
  }
  .self-actions .mini-btn,
  body.immersive .self-actions .mini-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: var(--panel-2);
    font-size: 18px;
  }
  .voice-bar {
    background: none;
    border: none;
    padding: 0;
  }
  .voice-bar .voice-status {
    display: none;
  }
  .hangup-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 18px;
  }

  body.controles-ocultos .call-topbar {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
  }
  body.controles-ocultos .sidebar-controls {
    transform: translateY(100%);
  }
  body.controles-ocultos .thumb-strip {
    opacity: 0;
    pointer-events: none;
  }

  .settings-popover {
    bottom: calc(92px + var(--safe-bottom));
    left: max(10px, var(--safe-left));
    right: max(10px, var(--safe-right));
    width: auto;
    max-height: calc(100dvh - 130px - var(--safe-bottom));
  }
  .toast-stack {
    top: calc(64px + var(--safe-top));
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .call-topbar {
    padding-top: calc(4px + var(--safe-top));
    padding-bottom: 14px;
  }
  .sidebar-controls,
  body.immersive .sidebar-controls {
    padding-top: 14px;
    padding-bottom: calc(6px + var(--safe-bottom));
  }
  .ctrl-btn,
  .ctrl-btn-wide,
  .self-actions .mini-btn,
  .hangup-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .thumb-strip {
    bottom: calc(64px + var(--safe-bottom));
  }
  .video-grid {
    padding-top: calc(52px + var(--safe-top));
    padding-bottom: calc(70px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spinner {
    animation: spin 1.6s linear infinite !important;
  }
  .anuncio,
  .anuncio.ativo {
    transition: none;
  }
}
