:root {
  --bg: #030727;
  --accent: #7cff00;
  --white: #fff;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.hidden {
  display: none !important;
}

/* Entrada na sala (condômino): overlay alinhado ao index_2.php */
.sv-room-enter-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0d1823;
  transition: opacity 0.35s ease;
}

.sv-room-enter-loading.hidden {
  display: none !important;
}

.sv-room-enter-loading__logo {
  max-width: 300px;
  width: 80%;
  height: auto;
  margin-bottom: 2rem;
  object-fit: contain;
}

.sv-room-enter-loading__gif {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80px;
  width: 20%;
  height: auto;
}

/* WhatsApp — suporte (61) 3550-7252 */
.sv-support-wa {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.05rem;
  background: #25d366;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
  transition: filter 0.15s ease, transform 0.15s ease;
  max-width: calc(100vw - 2rem);
}

.sv-support-wa:hover {
  filter: brightness(1.07);
  transform: scale(1.02);
}

.sv-support-wa:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sv-support-wa .fa-whatsapp {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Suporte só no cartão de senha do condômino (não flutua na videochamada) */
.sv-support-wa--inline {
  position: static;
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
  max-width: none;
  box-sizing: border-box;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 36px;
  width: auto;
}

/* Lobby da página da assembleia (#app): logo Smartvote maior e centralizada */
#app .topbar {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem 0.9rem;
}

#app .header-info:empty {
  display: none;
}

#app .topbar .logo-link {
  justify-content: center;
}

#app .topbar .logo {
  height: 56px;
}

@media (min-width: 480px) {
  #app .topbar .logo {
    height: 68px;
  }
}

.header-info {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: right;
}

.lobby {
  max-width: 520px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.lobby-captcha-wrap {
  padding: 1rem 1.25rem 1.25rem;
}

.lobby-captcha-wrap .g-recaptcha {
  display: flex;
  justify-content: center;
}

.lobby-captcha-hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fecaca;
}

.alert.banner-ok {
  background: rgba(124, 255, 0, 0.12);
  border: 1px solid rgba(124, 255, 0, 0.35);
  color: #bbf7d0;
}

.recaptcha-inline {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  min-height: 2px;
}

body[data-skip-recaptcha-org-cond='1'] #cap-organizador,
body[data-skip-recaptcha-org-cond='1'] #cap-condomino {
  display: none !important;
  margin: 0;
  min-height: 0;
}

.hint-tight {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.inline-link:hover {
  opacity: 0.9;
}

.card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(124, 255, 0, 0.12);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.resumo h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--accent);
}

.resumo-outro {
  margin: 0.25rem 0 0.75rem;
}

.sv-subtle-link {
  display: inline;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.resumo-outro .sv-subtle-link {
  font-size: 0.8rem;
}

.resumo-outra-assembleia {
  margin: 1.1rem 0 0;
  text-align: center;
}

.sv-btn-outra-assembleia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.35rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--accent);
  background: rgba(124, 255, 0, 0.08);
  border: 1px solid rgba(124, 255, 0, 0.38);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.sv-btn-outra-assembleia:hover {
  background: rgba(124, 255, 0, 0.15);
  border-color: rgba(124, 255, 0, 0.52);
  color: #c8ff7a;
}

.sv-btn-outra-assembleia:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sv-subtle-link:hover {
  color: var(--accent);
}

.lobby-switch-row {
  margin: 1rem 0 0;
  text-align: center;
}

.resumo-titulo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.resumo-titulo > i {
  color: var(--accent);
  font-size: 1.05em;
  opacity: 0.95;
  flex-shrink: 0;
}

.resumo .meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.resumo .meta .meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.resumo .meta .meta-item:last-child {
  margin-bottom: 0;
}

.resumo .meta .meta-item > i {
  color: var(--accent);
  width: 1.15em;
  flex-shrink: 0;
  margin-top: 0.12em;
  opacity: 0.9;
}

.resumo .meta .meta-item .fa-user-group {
  width: auto;
  margin-top: 0;
  margin-right: 0.2em;
}

.form-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.form-card-condomino h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-card-condomino h2 > i {
  opacity: 0.95;
}

.form-card-condomino .hint-with-icon {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-card-condomino .hint-with-icon > i {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.2em;
}

.form-card-condomino .label-with-icon {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.form-card-condomino .label-with-icon > i {
  color: var(--accent);
  width: 1.1em;
  flex-shrink: 0;
}

.form-card-condomino .btn-entrar-sala {
  width: 100%;
  margin-top: 1rem;
  padding: 1.05rem 1.35rem;
  font-size: 1.12rem;
  border-radius: 10px;
  gap: 0.65rem;
}

.form-card-condomino .btn-entrar-sala > i {
  font-size: 1.35rem;
  line-height: 1;
}

.form-card-condomino .sv-support-wa--inline {
  margin-top: 1rem;
}

.lobby-consent-gravacao {
  margin: 1rem 0 0.5rem;
  padding: 0.95rem 1.05rem 1.05rem;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(12, 18, 28, 0.92) 0%, rgba(0, 0, 0, 0.28) 100%);
  border: 1px solid rgba(124, 255, 0, 0.28);
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.06) inset;
}

.lobby-consent-gravacao__title {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.lobby-consent-gravacao__title-icons {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 255, 0, 0.2) 0%, rgba(124, 255, 0, 0.06) 100%);
  border: 1px solid rgba(124, 255, 0, 0.35);
  color: rgba(200, 255, 120, 0.98);
  font-size: 0.85rem;
  line-height: 1;
}

.lobby-consent-gravacao__title-text {
  flex: 1;
  min-width: 0;
}

.lobby-consent-gravacao__intro {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(244, 244, 245, 0.9);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.lobby-consent-gravacao__destino {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.lobby-consent-gravacao__destino-label {
  display: block;
  font-weight: 600;
  color: rgba(228, 228, 231, 0.88);
  margin-bottom: 0.25rem;
  text-align: left;
}

.lobby-consent-destino-text {
  display: block;
  font-weight: 700;
  color: #f4f4f5;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  word-break: break-word;
  text-align: left;
}

/* Interruptor estilo “switch” (cores Smartvote) + checkbox real para validação HTML5 */
.lobby-consent-switch-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  cursor: pointer;
  padding: 0.55rem 0.45rem 0.15rem;
  margin-left: -0.45rem;
  margin-right: -0.45rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.lobby-consent-switch-label:hover {
  background: rgba(124, 255, 0, 0.06);
}

.lobby-consent-switch-input:focus-visible + .lobby-consent-switch {
  box-shadow:
    0 0 0 3px rgba(124, 255, 0, 0.45),
    0 4px 20px rgba(0, 0, 0, 0.35);
}

.lobby-consent-switch {
  position: relative;
  flex: 0 0 auto;
  width: 3.35rem;
  height: 1.88rem;
  border-radius: 999px;
  background: rgba(30, 35, 48, 0.98);
  border: 2px solid rgba(148, 163, 184, 0.42);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) inset;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.lobby-consent-switch-input:checked + .lobby-consent-switch {
  background: linear-gradient(145deg, #4cb800 0%, var(--accent) 48%, #b8ff6a 100%);
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow:
    0 0 22px rgba(124, 255, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.25) inset;
}

.lobby-consent-switch__knob {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 1.38rem;
  height: 1.38rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #e4e4e7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.24s cubic-bezier(0.34, 1.3, 0.64, 1),
    color 0.2s ease;
}

.lobby-consent-switch-input:checked + .lobby-consent-switch .lobby-consent-switch__knob {
  transform: translateX(1.42rem);
  color: #166534;
}

.lobby-consent-switch__icon {
  position: absolute;
  line-height: 1;
}

.lobby-consent-switch__icon--on {
  display: none;
}

.lobby-consent-switch-input:checked + .lobby-consent-switch .lobby-consent-switch__icon--off {
  display: none;
}

.lobby-consent-switch-input:checked + .lobby-consent-switch .lobby-consent-switch__icon--on {
  display: block;
}

.lobby-consent-switch-label__text {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 600;
  color: rgba(244, 244, 245, 0.96);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  padding-top: 0.12rem;
}

.lobby-consent-switch-label__fa {
  margin-right: 0.35rem;
  color: rgba(124, 255, 0, 0.88);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  font-size: 0.85rem;
}

input,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn.primary {
  background: var(--accent);
  color: #000;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn.danger {
  background: #b91c1c;
  color: #fff;
}

.btn.small {
  margin-top: 0;
  padding: 0.45rem 0.65rem;
}

.btn.full {
  width: 100%;
  text-decoration: none;
}

.form-org-submit-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.form-org-submit-row .btn-org-entrar {
  margin-top: 1rem;
  min-width: min(100%, 18rem);
  padding: 0.75rem 1.35rem;
}

.form-org-submit-row .btn-org-entrar > i {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.95;
}

#selfie-preview,
#documento-preview,
.lobby-live-preview,
.lobby-captured-preview {
  width: 100%;
  max-height: 220px;
  min-height: 140px;
  background: #000;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: block;
  object-fit: cover;
  /* Evita o <video> roubar toques que deveriam ir à barra de botões em alguns Android/WebView */
  pointer-events: none;
}

.lobby-captured-preview.hidden {
  display: none !important;
}

#selfie-preview.hidden,
#documento-preview.hidden {
  display: none !important;
}

.selfie-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.selfie-toolbar .btn {
  margin-top: 0;
}

/* Senha virtual no lobby — texto visível, sem máscara */
.senha-virtual-acesso,
#in-senha-virtual {
  font-size: 26pt;
  text-align: center;
  border-radius: 4px;
  padding: 8px;
  color: #b5f5c8;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* Sala */
.sala {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: #131b28;
  z-index: 50;
}

body.sv-in-sala .topbar {
  display: none !important;
}

/* Abaixo dos painéis laterais e modais (.panel, .sv-vote-modal); acima do palco/PiP. */
.sala-logo-fixed {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 90;
  line-height: 0;
  display: block;
}

.sala-logo-fixed img {
  height: 40px;
  width: auto;
  display: block;
}

/* Abaixo dos painéis laterais (.panel z-index 100); acima do palco/PiP. */
.sala-rec-indicator {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  background: rgba(185, 28, 28, 0.96);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
}

.sala-rec-indicator .fa-circle {
  font-size: 0.5rem;
  color: #fecaca;
  animation: sv-rec-pulse 1.1s ease-in-out infinite;
}

@keyframes sv-rec-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Aviso fixo na tela (assembleia ainda não começou, etc.); abaixo dos painéis (z-index 100). */
.sv-assembly-banner {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 88;
  pointer-events: none;
  padding: 3.25rem 1rem 0.5rem;
  padding-top: max(3.25rem, env(safe-area-inset-top, 0px));
  background: linear-gradient(
    180deg,
    rgba(8, 10, 14, 0.92) 0%,
    rgba(8, 10, 14, 0.55) 70%,
    transparent 100%
  );
}

.sv-assembly-banner__inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: #f4f4f5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

/* Modo só votação: PiP local fora da vista (o filmstrip é esvaziado em JS). */
.pip-local.pip-local--voto-only-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Temporizador de fala — cor primária (verde); mensagem final com pulso discreto */
.sv-speech-timer {
  position: fixed;
  left: 50%;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 89;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 1.5rem));
}

.sv-speech-timer__card {
  padding: 0.65rem 1.1rem 0.75rem;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(20, 38, 24, 0.97) 0%, rgba(8, 26, 12, 0.95) 100%);
  border: 1px solid rgba(124, 255, 0, 0.4);
  box-shadow:
    0 0 0 1px rgba(124, 255, 0, 0.1),
    0 10px 36px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(124, 255, 0, 0.07);
}

.sv-speech-timer__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(190, 255, 140, 0.95);
  margin-bottom: 0.3rem;
}

.sv-speech-timer__label i {
  font-size: 0.85rem;
  opacity: 0.95;
}

.sv-speech-timer__label #sv-speech-timer-title-text {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sv-speech-timer__digits {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.85rem, 7vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #d4ff8a 0%, #7cff00 42%, #5fd000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(124, 255, 0, 0.32));
}

.sv-speech-timer__message {
  margin: 0.4rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.42;
  text-align: center;
  color: rgba(235, 255, 218, 0.98);
}

.sv-speech-timer--ended .sv-speech-timer__card {
  border-color: rgba(160, 255, 80, 0.55);
  box-shadow:
    0 0 0 1px rgba(124, 255, 0, 0.14),
    0 10px 36px rgba(0, 0, 0, 0.52),
    0 0 56px rgba(124, 255, 0, 0.1);
}

.sv-speech-timer--ended .sv-speech-timer__message {
  animation: sv-speech-timer-end-pulse 2.5s ease-in-out infinite;
}

@keyframes sv-speech-timer-end-pulse {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.38;
  }
}

@supports not (background-clip: text) {
  .sv-speech-timer__digits {
    color: #a8ff55;
    filter: none;
    background: none;
  }
}

@media (max-width: 768px) {
  .sv-speech-timer {
    bottom: calc(5.85rem + env(safe-area-inset-bottom, 0px));
  }
}

.config-speech-timer-block {
  margin: 0.85rem 0 0.25rem;
  padding: 0.85rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(124, 255, 0, 0.16);
  border-radius: 12px;
}

.config-speech-timer-block__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 0.35rem;
}

.config-speech-timer-block__title i {
  color: var(--accent);
}

.config-speech-timer-block__hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
}

.config-speech-timer-intro__hint {
  margin: 0 0 0.65rem;
}

.config-speech-timer-details {
  margin-top: 0.25rem;
}

.config-speech-timer-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.28);
  color: #f4f4f5;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
}

.config-speech-timer-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.config-speech-timer-icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(124, 255, 0, 0.42);
  background: linear-gradient(160deg, rgba(124, 255, 0, 0.14) 0%, rgba(20, 40, 22, 0.55) 100%);
  color: rgba(210, 255, 150, 0.98);
  font-size: 1.05rem;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.config-speech-timer-icon-btn:hover:not(:disabled) {
  background: linear-gradient(160deg, rgba(124, 255, 0, 0.26) 0%, rgba(28, 52, 30, 0.65) 100%);
  border-color: rgba(160, 255, 80, 0.65);
  color: #f4ffe8;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 0 20px rgba(124, 255, 0, 0.12);
}

.config-speech-timer-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.config-speech-timer-icon-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(180, 186, 198, 0.55);
}

.config-speech-timer-icon-btn--stop:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.12) 0%, rgba(40, 20, 22, 0.5) 100%);
  color: rgba(254, 202, 202, 0.95);
}

.config-speech-timer-icon-btn--stop:hover:not(:disabled) {
  border-color: rgba(252, 165, 165, 0.65);
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.22) 0%, rgba(55, 28, 30, 0.6) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 0 18px rgba(248, 113, 113, 0.12);
}

.config-speech-timer-icon-btn--stop:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(180, 186, 198, 0.5);
}

.config-speech-timer-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.config-speech-timer-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.95);
  min-width: 6.5rem;
}

.config-speech-timer-field input {
  width: 5.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: #f4f4f5;
  font-size: 0.95rem;
  font-weight: 600;
}

.config-speech-timer-msg-label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
  color: rgba(203, 213, 225, 0.95);
}

.config-speech-timer-textarea {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.28);
  color: #f4f4f5;
  font-size: 0.85rem;
  line-height: 1.35;
  font-family: inherit;
}

.config-speech-timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.config-speech-timer-actions .btn {
  flex: 1 1 auto;
  min-width: 7rem;
}

.config-speech-timer-actions .btn.hidden {
  display: none !important;
}

/* Mobile: logo fixa (top ~40px + ~40px altura); texto centralizado invade a esquerda — desce o aviso. */
@media (max-width: 768px) {
  .sv-assembly-banner {
    padding-top: max(6rem, calc(env(safe-area-inset-top, 0px) + 4.75rem));
  }
}

/* Linhas “aviso na tela” / “pin no chat”: interruptor + engrenagem (modal). */
.config-message-feature-row .config-message-feature-tail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}

.config-message-feature-row--static {
  cursor: default;
}

.config-message-feature-row--static:hover {
  border-color: rgba(124, 255, 0, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.config-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(124, 255, 0, 0.35);
  background: rgba(124, 255, 0, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.config-gear-btn:hover {
  background: rgba(124, 255, 0, 0.16);
  border-color: rgba(124, 255, 0, 0.5);
}

.config-gear-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.config-pin-define-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.95);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.config-pin-define-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.config-pin-define-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sv-config-msg-modal-dialog {
  max-width: min(520px, calc(100vw - 2rem));
}

.sv-config-msg-modal-body {
  padding: 1rem 1.25rem 1.25rem;
  max-height: min(72vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sv-config-msg-modal-hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}

.sv-config-msg-modal-textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #f4f4f5;
  font-size: 0.88rem;
  line-height: 1.45;
  font-family: inherit;
}

.sv-config-msg-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
}

.sv-config-field-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.78);
}

.sv-config-field-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #f4f4f5;
  font-size: 0.9rem;
  line-height: 1.4;
  font-family: inherit;
}

.sv-config-field-input:focus {
  outline: none;
  border-color: rgba(124, 255, 0, 0.55);
  box-shadow: 0 0 0 2px rgba(124, 255, 0, 0.12);
}

.sv-config-field-input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

.sv-config-target-fieldset {
  margin: 1rem 0 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.sv-config-target-fieldset > legend.sv-config-field-label,
.sv-config-target-fieldset > .sv-config-field-label {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.35rem;
  padding: 0;
}

.sv-config-radio-row {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
  margin: 0.45rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sv-config-radio-row:hover {
  border-color: rgba(124, 255, 0, 0.28);
  background: rgba(124, 255, 0, 0.05);
}

.sv-config-radio-row:has(input:checked) {
  border-color: rgba(124, 255, 0, 0.45);
  background: rgba(124, 255, 0, 0.08);
}

/* Reseta o input global (width:100% + padding) que estoura os radios. */
.sv-config-radio-row input[type='radio'] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 2px solid rgba(148, 163, 184, 0.55);
  border-radius: 50%;
  background: rgba(3, 7, 39, 0.9);
  color: transparent;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent, #7cff00);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.sv-config-radio-row input[type='radio']:hover {
  border-color: rgba(124, 255, 0, 0.45);
}

.sv-config-radio-row input[type='radio']:focus {
  outline: none;
}

.sv-config-radio-row:has(input[type='radio']:focus-visible) {
  outline: 2px solid var(--accent, #7cff00);
  outline-offset: 2px;
}

.sv-config-radio-row input[type='radio']:checked {
  border-color: var(--accent, #7cff00);
  background: radial-gradient(circle, var(--accent, #7cff00) 42%, transparent 44%);
  box-shadow: inset 0 0 0 3px rgba(3, 7, 39, 0.95);
}

.sv-config-radio-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sv-config-radio-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(244, 244, 245, 0.98);
}

.sv-config-radio-desc {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.72);
}

.sv-config-target-warn {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
  font-size: 0.8rem;
  line-height: 1.4;
}

.sv-config-target-warn.hidden {
  display: none;
}

.sv-config-target-warn i {
  margin-top: 0.1rem;
  flex-shrink: 0;
  color: #fbbf24;
}

.sv-config-msg-modal-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Palco: faixa direita (~20%) com até 3 falantes recentes + “+N”; clique abre Participantes. */
.stage-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-main {
  flex: 1 1 80%;
  min-width: 0;
  position: relative;
  background: #000;
  /* Empilhamento explícito: senão <video> compõe por cima de overlays irmãos no Chrome/Edge. */
  isolation: isolate;
}

.stage-layout--solo .stage-main {
  flex: 1 1 100%;
}

/* Só 2 pessoas (desktop, sem tela): metade palco = outro, metade = você. */
.stage-duo-local-pane {
  display: none;
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.stage-layout.stage-layout--duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.stage-layout.stage-layout--duo .stage-main {
  flex: none;
  width: auto;
  min-width: 0;
}

.stage-layout.stage-layout--duo .stage-duo-local-pane:not(.hidden) {
  display: block;
}

.stage-layout.stage-layout--duo #stage-filmstrip {
  display: none !important;
}

/* Só você na chamada (desktop): metade esquerda convite, metade direita = sua câmera no palco. */
.stage-solo-invite-pane {
  display: none;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #0f1419 0%, #151b24 42%, #10151c 100%);
  box-sizing: border-box;
}

.stage-layout.stage-layout--solo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.stage-layout.stage-layout--solo-split .stage-solo-invite-pane:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3cqh, 2.25rem) clamp(1rem, 3.5cqw, 2.5rem);
}

.stage-layout.stage-layout--solo-split .stage-main {
  flex: none;
  width: auto;
  min-width: 0;
}

.stage-layout.stage-layout--solo-split #stage-filmstrip {
  display: none !important;
}

.stage-solo-invite-pane__inner {
  max-width: 22rem;
  text-align: left;
}

.stage-solo-invite-pane__icon-wrap {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: linear-gradient(135deg, rgba(124, 255, 0, 0.18) 0%, rgba(124, 255, 0, 0.06) 100%);
  border: 1px solid rgba(124, 255, 0, 0.35);
  box-shadow: 0 0 32px rgba(124, 255, 0, 0.08);
}

.stage-solo-invite-pane__icon-wrap i {
  font-size: 1.45rem;
  color: rgba(190, 255, 120, 0.95);
}

.stage-solo-invite-pane__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 2.8cqh, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.stage-solo-invite-pane__lead {
  margin: 0 0 1.1rem;
  font-size: clamp(0.88rem, 2cqh, 0.98rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(228, 228, 231, 0.88);
}

.stage-solo-invite-pane__hint {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(161, 161, 170, 0.95);
}

.stage-solo-invite-pane__hint i {
  margin-top: 0.12rem;
  flex-shrink: 0;
  color: rgba(124, 255, 0, 0.75);
  font-size: 0.9rem;
}

/* Só votação: mesmo fundo e hierarquia do “único na sala”; arte à direita (escondida no mobile). */
@keyframes sv-voto-lateral-float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.stage-voto-only-pane {
  display: none;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #0f1419 0%, #151b24 42%, #10151c 100%);
  box-sizing: border-box;
}

.stage-voto-only-lateral {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: min(44%, 420px);
  min-width: 0;
  overflow: hidden;
  background: transparent;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem 0.5rem 0.25rem;
  box-sizing: border-box;
  pointer-events: none;
}

/* Painel em largura total do palco; texto à esquerda da área útil com leve recuo, arte à direita. */
.stage-layout.stage-layout--voto-only {
  display: block !important;
}

.stage-layout.stage-layout--voto-only .stage-voto-only-pane:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(1rem, 3cqh, 2.25rem) clamp(1rem, 3.5cqw, 2.5rem);
  padding-right: min(44%, 420px);
}

.stage-layout.stage-layout--voto-only .stage-voto-only-lateral:not(.hidden) {
  display: flex;
}

.stage-layout.stage-layout--voto-only .stage-main,
.stage-layout.stage-layout--voto-only #stage-filmstrip,
.stage-layout.stage-layout--voto-only #stage-solo-invite-pane,
.stage-layout.stage-layout--voto-only #stage-duo-local-pane {
  display: none !important;
}

.stage-voto-only-pane__inner {
  max-width: 22rem;
  text-align: left;
}

.stage-layout.stage-layout--voto-only .stage-voto-only-pane__inner {
  margin-left: clamp(1rem, 4.5vw, 2.75rem);
}

.stage-voto-only-pane__icon-wrap {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: linear-gradient(135deg, rgba(124, 255, 0, 0.18) 0%, rgba(124, 255, 0, 0.06) 100%);
  border: 1px solid rgba(124, 255, 0, 0.35);
  box-shadow: 0 0 32px rgba(124, 255, 0, 0.08);
}

.stage-voto-only-pane__icon-wrap i {
  font-size: 1.45rem;
  color: rgba(190, 255, 120, 0.95);
}

.stage-voto-only-pane__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 2.8cqh, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.stage-voto-only-pane__lead {
  margin: 0 0 1.1rem;
  font-size: clamp(0.88rem, 2cqh, 0.98rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(228, 228, 231, 0.88);
}

.stage-voto-only-pane__hint {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(161, 161, 170, 0.95);
}

.stage-voto-only-pane__hint i {
  margin-top: 0.12rem;
  flex-shrink: 0;
  color: rgba(124, 255, 0, 0.75);
  font-size: 0.9rem;
}

.stage-voto-only-lateral__img {
  max-width: 100%;
  max-height: min(90cqh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
  user-select: none;
  animation: sv-voto-lateral-float-y 5s ease-in-out infinite;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.5));
}

@media (max-width: 768px) {
  .stage-layout.stage-layout--voto-only .stage-voto-only-pane:not(.hidden) {
    padding-right: clamp(1rem, 3.5cqw, 2.5rem);
  }

  .stage-layout.stage-layout--voto-only .stage-voto-only-lateral {
    display: none !important;
  }
}

.stage-wrap.stage-wrap--rotated .stage-voto-only-lateral {
  display: none !important;
}

.stage-wrap.stage-wrap--rotated .stage-layout.stage-layout--voto-only .stage-voto-only-pane:not(.hidden) {
  padding-right: clamp(1rem, 3.5cqw, 2.5rem);
}

.stage-wrap.stage-wrap--rotated .stage-layout.stage-layout--solo-split {
  grid-template-columns: 1fr;
}

.stage-wrap.stage-wrap--rotated .stage-solo-invite-pane {
  display: none !important;
}

#stage-duo-local-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #333;
}

.stage-duo-local-off {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 2;
  margin: 0;
  padding: 0;
  background: #1a1a1a;
}

.stage-duo-local-off.visible {
  display: block;
}

#stage-duo-local-video:not(.hidden) ~ .stage-duo-local-off {
  display: none !important;
}

.stage-duo-local-strip {
  z-index: 4;
}

.pip-local.pip-local--hidden-duo {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 4px !important;
  height: 4px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.stage-wrap--rotated .stage-duo-local-pane {
  display: none !important;
}

.stage-filmstrip {
  flex: 0 1 20%;
  min-width: 112px;
  max-width: 280px;
  min-height: 0;
  box-sizing: border-box;
  padding: 0.45rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(90deg, rgba(5, 23, 44, 0) 0%, rgba(5, 23, 44, 0.92) 14%, #05172c 100%);
  z-index: 5;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Miniaturas de vídeo: encaixa na altura da coluna, sem scroll vertical. */
.stage-filmstrip[data-filmstrip-mode='videos'] {
  overflow-y: hidden;
  overflow-x: hidden;
}

.stage-filmstrip[data-filmstrip-mode='videos'] > .stage-filmstrip-inner--videos {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  gap: 0.28rem;
}

.stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-tile {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-video-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  aspect-ratio: unset;
}

.stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-strip {
  flex: 0 0 auto;
  margin-top: 0.12rem;
  padding: 0.16rem 0.3rem 0.2rem;
  font-size: 0.74rem;
}

.stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-strip .stage-rail-strip-sub {
  font-size: 0.64rem;
}

.stage-filmstrip[data-filmstrip-mode='videos'] .stage-filmstrip-more {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.65rem;
}

.stage-filmstrip.hidden {
  display: none !important;
}

.stage-filmstrip:focus-visible {
  outline: 2px solid rgba(126, 255, 0, 0.55);
  outline-offset: -2px;
}

.stage-filmstrip-more {
  flex: 0 0 auto;
  padding: 0.42rem 0.45rem;
  border-radius: 9px;
  background: rgba(28, 30, 36, 0.95);
  border: 1px dashed rgba(228, 228, 231, 0.28);
  color: rgba(228, 228, 231, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

/* Sem partilha de ecrã: coluna direita com miniaturas de vídeo (você + até 3). */
.stage-filmstrip-inner--videos {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  min-height: 0;
}

.stage-rail-tile {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}

.stage-rail-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(124, 255, 0, 0.28);
  background: #1a1a1a;
}

.stage-rail-tile--local .stage-rail-video-wrap {
  border-color: rgba(124, 255, 0, 0.35);
}

.stage-rail-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #333;
  display: block;
}

.stage-rail-off {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: #1a1a1a;
}

.stage-rail-off.visible {
  display: block;
}

.stage-rail-video-wrap .stage-rail-video:not(.hidden) ~ .stage-rail-off {
  display: none !important;
}

.stage-rail-strip {
  position: relative;
  margin-top: 0.2rem;
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 0.22rem 0.35rem 0.26rem;
  background: #00000087;
  color: #fff;
  line-height: 1.25;
  pointer-events: none;
}

.stage-rail-strip-name {
  display: block;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-rail-strip .stage-rail-strip-sub {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-local.pip-local--in-side-rail {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 4px !important;
  height: 4px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.stage-layout--solo .stage-filmstrip {
  display: none !important;
}

/* Mesmas proporções que .pip-local + .pip-video-tile; só muda posição (sobre o palco). */
.stage-sharer-pip {
  position: absolute;
  right: 10px;
  bottom: 44px;
  width: min(200px, 35vw);
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  z-index: 6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(124, 255, 0, 0.35);
  background: #1a1a1a;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.stage-sharer-pip.hidden {
  display: none !important;
}

.stage-sharer-pip-video {
  display: block;
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  background: #000;
}

.stage-sharer-pip-off {
  position: absolute;
  inset: 0;
  background: #262626;
}

.stage-sharer-pip-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.2rem 0.35rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
  pointer-events: none;
}

.stage-wrap--rotated .stage-filmstrip {
  display: none !important;
}

/* PIP do apresentador permanece visível mesmo com tela rotacionada (assembleia). */
.stage-wrap--rotated .stage-sharer-pip:not(.hidden) {
  display: flex !important;
  right: 8px;
  bottom: 8px;
  width: min(140px, 28vw);
  z-index: 8;
}

@media (max-width: 720px) {
  .stage-layout:not(.stage-layout--solo) {
    flex-direction: column;
  }

  .stage-filmstrip {
    flex: 0 0 auto;
    max-width: none;
    min-height: 100px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.35rem 0.45rem;
    gap: 0.4rem;
    background: rgba(5, 23, 44, 0.96);
  }

  /* A regra base [data-filmstrip-mode='videos'] fixa overflow-x: hidden com especificidade
     maior; sem esta sobrescrita o scroll horizontal do rail nunca funciona no mobile. */
  .stage-filmstrip[data-filmstrip-mode='videos'] {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .stage-layout:not(.stage-layout--solo) .stage-main {
    flex: 1 1 auto;
    min-height: 0;
  }

  .active-speaker-card {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 46vw;
  }

  .stage-filmstrip-inner--videos {
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    gap: 0.4rem;
    align-items: stretch;
  }

  .stage-filmstrip[data-filmstrip-mode='videos'] > .stage-filmstrip-inner--videos {
    flex: 0 0 auto;
    overflow: visible;
    gap: 0.4rem;
  }

  .stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-tile {
    flex: 0 0 auto;
    min-height: 0;
  }

  .stage-filmstrip[data-filmstrip-mode='videos'] .stage-rail-video-wrap {
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    height: 100px;
    width: auto;
    max-height: 100px;
  }

  .stage-filmstrip-inner--videos .stage-rail-tile {
    flex: 0 0 auto;
    min-width: 134px;
    max-width: 46vw;
    width: auto;
  }

  /* Mesma altura que os cartões de vídeo (faixa horizontal com scroll). */
  .stage-filmstrip-inner--videos .stage-filmstrip-more {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 4.5rem;
    max-width: 22vw;
    padding: 0.35rem 0.4rem;
  }

  .stage-filmstrip-more {
    flex: 0 0 auto;
    min-width: 4.5rem;
  }
}

.active-speaker-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: rgba(12, 14, 18, 0.88);
  border-radius: 10px;
  border: 1px solid rgba(126, 255, 0, 0.22);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.stage-filmstrip .active-speaker-card {
  flex-direction: column;
  align-items: stretch;
  gap: 0.32rem;
  padding: 0.38rem 0.42rem;
}

.stage-filmstrip .active-speaker-meter {
  align-self: center;
  height: 18px;
}

.stage-filmstrip .active-speaker-meta {
  align-items: flex-start;
  text-align: left;
}

.stage-filmstrip .active-speaker-name {
  font-size: 0.76rem;
}

.stage-filmstrip .active-speaker-sub {
  font-size: 0.62rem;
}

.active-speaker-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 22px;
  flex-shrink: 0;
}

.active-speaker-bar {
  width: 3px;
  min-height: 4px;
  background: #7eff00;
  border-radius: 1px;
  transform-origin: bottom center;
  animation: sv-active-speak-bar 0.42s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(126, 255, 0, 0.45);
}

.active-speaker-bar:nth-child(1) {
  animation-duration: 0.38s;
  animation-delay: 0s;
}
.active-speaker-bar:nth-child(2) {
  animation-duration: 0.44s;
  animation-delay: 0.07s;
}
.active-speaker-bar:nth-child(3) {
  animation-duration: 0.36s;
  animation-delay: 0.12s;
}
.active-speaker-bar:nth-child(4) {
  animation-duration: 0.48s;
  animation-delay: 0.05s;
}
.active-speaker-bar:nth-child(5) {
  animation-duration: 0.4s;
  animation-delay: 0.15s;
}

@keyframes sv-active-speak-bar {
  0%,
  100% {
    transform: scaleY(0.32);
    opacity: 0.55;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.active-speaker-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  min-width: 0;
  text-align: right;
}

.active-speaker-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.2;
  word-break: break-word;
}

.active-speaker-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(228, 228, 231, 0.82);
  line-height: 1.25;
  word-break: break-word;
}

.sala .topbar {
  flex: 0 0 auto;
}

.stage-wrap {
  flex: 1;
  position: relative;
  z-index: 0;
  min-height: 0;
  background: #000;
  overflow: hidden;
  /* Palco girado: dimensões em cqh/cqw (área real do palco), não 100vh/100vw — senão ignora toolbar/row-gap e corta. */
  container-type: size;
  container-name: sv-stage;
}

.stage-rotate-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.stage-wrap--rotated .stage-rotate-inner {
  inset: auto;
  /* Fallback: viewport inteiro (navegadores sem cqh; pode cortar com toolbar). */
  width: 100vh;
  height: 100vw;
  width: 100dvh;
  height: 100dvw;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

@supports (width: 1cqh) {
  .stage-wrap--rotated .stage-rotate-inner {
    width: 100cqh;
    height: 100cqw;
  }
}

/* Palco girado: esconde o PiP (vídeo local + nome) até voltar ao normal */
.stage-wrap.stage-wrap--rotated ~ .pip-local {
  visibility: hidden;
  pointer-events: none;
}

/* Palco girado: logo no canto sobre o destaque; some ao girar e volta ao desgirar */
.sala:has(.stage-wrap--rotated) .sala-logo-fixed {
  visibility: hidden;
  pointer-events: none;
}

/* Só celular / telas estreitas: girar palco (ex.: tela compartilhada horizontal). */
.stage-rotate-toolbar {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}

.stage-rotate-toolbar .stage-rotate-btn {
  pointer-events: auto;
}

/* Dica ao iniciar compartilhamento de tela (só mobile; exibida via JS). */
.stage-rotate-hint {
  flex: 1;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-14px) scale(0.94);
  filter: blur(4px);
}

.stage-rotate-hint__bubble {
  padding: 10px 12px 11px;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(34, 38, 52, 0.96) 0%, rgba(16, 18, 26, 0.98) 100%);
  border: 1px solid rgba(126, 255, 0, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 10px 36px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(126, 255, 0, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.stage-rotate-hint__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.stage-rotate-hint__icon-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(126, 255, 0, 0.12);
  color: #c8ff7a;
}

.stage-rotate-hint__icon-rotate {
  font-size: 1.05rem;
}

.stage-rotate-hint__lead {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: #f4f4f5;
}

.stage-rotate-hint__lead strong {
  font-weight: 700;
  color: #fff;
}

.stage-rotate-hint__tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(228, 228, 231, 0.82);
}

.stage-rotate-hint__tip > i {
  flex: 0 0 auto;
  margin-top: 0.12em;
  opacity: 0.85;
  color: #a1a1aa;
}

.stage-rotate-hint--play {
  visibility: visible;
  animation: sv-stage-rotate-hint-pop 9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stage-rotate-hint--play .stage-rotate-hint__bubble {
  animation: sv-stage-rotate-hint-glow 9s ease-in-out forwards;
}

.stage-rotate-hint--play .stage-rotate-hint__icon-rotate {
  animation: sv-stage-rotate-hint-wiggle 0.72s ease-in-out 0.15s 8;
}

@keyframes sv-stage-rotate-hint-pop {
  0% {
    opacity: 0;
    transform: translateX(-18px) scale(0.9);
    filter: blur(5px);
  }
  7% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
  86% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-10px) scale(0.96);
    filter: blur(3px);
  }
}

@keyframes sv-stage-rotate-hint-glow {
  0%,
  100% {
    border-color: rgba(126, 255, 0, 0.22);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06) inset,
      0 10px 36px rgba(0, 0, 0, 0.55),
      0 0 20px rgba(126, 255, 0, 0.06);
  }
  12%,
  70% {
    border-color: rgba(126, 255, 0, 0.45);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 12px 40px rgba(0, 0, 0, 0.58),
      0 0 32px rgba(126, 255, 0, 0.18);
  }
}

@keyframes sv-stage-rotate-hint-wiggle {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  35% {
    transform: rotate(22deg) scale(1.08);
  }
  70% {
    transform: rotate(-14deg) scale(1.05);
  }
}

.stage-rotate-btn {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: rgba(12, 14, 18, 0.82);
  color: #e4e4e7;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.stage-rotate-btn i {
  font-size: 1.15rem;
  pointer-events: none;
}

.stage-rotate-btn:active {
  background: rgba(30, 32, 38, 0.92);
}

.stage-rotate-btn:focus-visible {
  outline: 2px solid rgba(126, 255, 0, 0.65);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .stage-rotate-toolbar {
    display: flex;
  }
}

#stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  z-index: 0;
}

/* Mesmo placeholder do PiP quando o destaque não tem vídeo de câmera ativo */
.stage-video-off {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 2;
  margin: 0;
  padding: 0;
  background: #262626;
  align-items: center;
  justify-content: center;
}

.stage-video-off.visible {
  display: flex;
}

.stage-video-off-placeholder {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.stage-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

.stage-placeholder i {
  font-size: 3rem;
  opacity: 0.5;
}

.stage-placeholder.hidden {
  display: none;
}

/* Faixa inferior com nome / unidade (palco e PiP) */
.video-name-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.5rem 0.35rem;
  background: #00000087;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.25;
  pointer-events: none;
  z-index: 2;
}

.video-name-strip > span:first-of-type {
  display: block;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-name-strip > span:last-of-type {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-video-tile .video-name-strip {
  z-index: 4;
}

.stage-name-strip {
  z-index: 4;
}

/*
 * Falantes: canto superior direito da viewport.
 * Deve ser filho direto de #sala (não dentro de #stage-wrap z:0), senão fica preso abaixo do PiP (z:60).
 * Acima do PiP e REC (90); abaixo do portal de menus (99) e painéis (.panel 100).
 */
.stage-speaking-overlay {
  position: fixed;
  top: calc(0.45rem + env(safe-area-inset-top, 0px));
  right: calc(0.45rem + env(safe-area-inset-right, 0px));
  z-index: 96;
  max-width: min(46vw, 280px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.32rem;
  transform: translateZ(0);
}

.stage-speaking-overlay.hidden {
  display: none !important;
}

.stage-speaking-overlay .stage-speaking-card {
  max-width: 100%;
  padding: 0.32rem 0.5rem;
  gap: 0.45rem;
}

.stage-speaking-overlay .active-speaker-meter {
  height: 18px;
}

.stage-speaking-overlay .active-speaker-name {
  font-size: 0.78rem;
}

.stage-speaking-overlay .active-speaker-sub {
  font-size: 0.62rem;
}

/* Barra inferior em linha única: row-gap só afeta o espaço palco ↔ toolbar */
@media (max-width: 768px) {
  .sala {
    row-gap: 0.65rem;
  }
}

@media (max-width: 420px) {
  .sala {
    row-gap: 0.75rem;
  }
}

.pip-local {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  width: min(200px, 35vw);
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.pip-video-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(124, 255, 0, 0.35);
  background: #1a1a1a;
}

#local-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #333;
  display: block;
}

.local-off {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: #1a1a1a;
}

.local-off.visible {
  display: block;
}

.local-off-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  vertical-align: top;
}

/* Com câmera ligada: esconde placeholder; o tile mantém altura pelo aspect-ratio do .pip-video-tile */
.pip-video-tile #local-video:not(.hidden) + .local-off {
  display: none !important;
}

/* Aviso: já votou em pauta ainda aberta (cartão alinhado ao painel “único na sala”). */
.sv-vote-waiting-organizer {
  position: fixed;
  right: 1rem;
  bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 85;
  max-width: min(22rem, calc(100vw - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f1419 0%, #151b24 42%, #10151c 100%);
  border: 1px solid rgba(124, 255, 0, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(124, 255, 0, 0.06);
  pointer-events: none;
  box-sizing: border-box;
}

.sv-vote-waiting-organizer.hidden {
  display: none !important;
}

.sv-vote-waiting-organizer__icon-wrap {
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(34, 197, 94, 0.12) 100%);
  border: 1px solid rgba(74, 222, 128, 0.45);
}

.sv-vote-waiting-organizer__icon-wrap i {
  font-size: 1.2rem;
  color: rgba(187, 247, 208, 0.98);
}

.sv-vote-waiting-organizer__body {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sv-vote-waiting-organizer__head {
  position: relative;
  padding-right: 2rem;
}

.sv-vote-waiting-organizer__main-text {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.sv-vote-waiting-organizer__close {
  position: absolute;
  top: -0.1rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(228, 228, 231, 0.95);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.sv-vote-waiting-organizer__close:hover {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.sv-vote-waiting-organizer__close:focus-visible {
  outline: 2px solid rgba(124, 255, 0, 0.7);
  outline-offset: 2px;
}

.sv-vote-waiting-organizer__sub {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(161, 161, 170, 0.96);
}

/* Autoplay bloqueado: desbloquear áudio remoto com gesto do utilizador */
.sv-remote-audio-unlock {
  position: fixed;
  left: 1rem;
  bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 86;
  max-width: min(22rem, calc(100vw - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f1419 0%, #151b24 42%, #10151c 100%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(250, 204, 21, 0.07);
  pointer-events: auto;
  box-sizing: border-box;
}

.sv-remote-audio-unlock.hidden {
  display: none !important;
}

.sv-remote-audio-unlock__icon-wrap {
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.28) 0%, rgba(250, 204, 21, 0.1) 100%);
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.sv-remote-audio-unlock__icon-wrap i {
  font-size: 1.15rem;
  color: rgba(253, 224, 71, 0.98);
}

.sv-remote-audio-unlock__body {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sv-remote-audio-unlock__head {
  position: relative;
  padding-right: 2rem;
}

.sv-remote-audio-unlock__main-text {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.sv-remote-audio-unlock__close {
  position: absolute;
  top: -0.1rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(228, 228, 231, 0.95);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sv-remote-audio-unlock__close:hover {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.sv-remote-audio-unlock__close:focus-visible,
.sv-remote-audio-unlock__btn:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.75);
  outline-offset: 2px;
}

.sv-remote-audio-unlock__sub {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(161, 161, 170, 0.96);
}

.sv-remote-audio-unlock__btn {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 10px;
  background: #7eff00;
  color: #0a0a0a;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease;
}

.sv-remote-audio-unlock__btn:hover {
  filter: brightness(1.05);
}

.sv-remote-audio-unlock__btn:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .sv-remote-audio-unlock {
    left: 0.65rem;
    right: 0.65rem;
    max-width: none;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Aviso singelo de conexão (canto superior esquerdo) — sem bloquear a sala */
.sv-conn-chip {
  position: fixed;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  left: calc(0.75rem + env(safe-area-inset-left, 0px));
  z-index: 120;
  max-width: min(70vw, 16rem);
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 248, 230, 0.95);
  background: rgba(28, 22, 12, 0.78);
  border: 1px solid rgba(255, 196, 80, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.sv-conn-chip.hidden {
  display: none !important;
}

/* Notificação temporária só para organizador (troca sv1/sv2) */
.sv-org-link-toast {
  position: fixed;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  left: calc(0.75rem + env(safe-area-inset-left, 0px));
  z-index: 121;
  max-width: min(70vw, 16rem);
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(232, 255, 220, 0.96);
  background: rgba(12, 28, 16, 0.82);
  border: 1px solid rgba(126, 255, 0, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.35s ease;
}

.sv-org-link-toast.sv-org-link-toast--out {
  opacity: 0;
}

.sv-org-link-toast.hidden {
  display: none !important;
}

/* Aviso discreto quando alguém levanta a mão */
.sv-hand-toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  max-width: min(92vw, 420px);
}

.sv-hand-toast {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(18, 24, 48, 0.9);
  border: 1px solid rgba(124, 255, 0, 0.22);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.sv-hand-toast.sv-hand-toast--in {
  opacity: 1;
  transform: translateY(0);
}

.sv-hand-toast.sv-hand-toast--out {
  opacity: 0;
  transform: translateY(-8px);
  transition-duration: 0.28s;
}

/* Prévia de chat no mesmo host que o aviso de mão */
.sv-hand-toast.sv-hand-toast--chat-preview {
  border-radius: 14px;
  max-width: min(92vw, 420px);
  text-align: center;
  white-space: normal;
  line-height: 1.38;
}

.sv-hand-toast.sv-hand-toast--chat-preview .sv-hand-toast-chat-line--who {
  font-weight: 600;
  font-size: 0.9rem;
}

.sv-hand-toast.sv-hand-toast--chat-preview .sv-hand-toast-chat-line--preview {
  margin-top: 0.28rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Joinha na viewport: cartão + ícone (pointer-events none — não bloqueia a toolbar) */
.sv-thumb-reactions-host {
  position: fixed;
  inset: 0;
  z-index: 64;
  pointer-events: none;
}

.sv-thumb-reaction {
  --sv-thumb-jitter: 0px;
  position: absolute;
  left: calc(50% + var(--sv-thumb-jitter));
  top: auto;
  /* Centro em X; acima da toolbar + safe area (barra ~5rem; folga extra para o cartão) */
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(14px) scale(0.9);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: min(88vw, 300px);
  text-align: center;
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.sv-thumb-reaction--in {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.sv-thumb-reaction--out {
  opacity: 0;
  transform: translateX(-50%) translateY(-22px) scale(0.94);
  transition:
    opacity 0.55s ease,
    transform 0.65s ease;
}

.sv-thumb-reaction__icon {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  filter: drop-shadow(0 0 16px rgba(124, 255, 0, 0.55)) drop-shadow(0 6px 22px rgba(0, 0, 0, 0.5));
}

.sv-thumb-reaction--in .sv-thumb-reaction__icon {
  animation: svThumbIconPop 0.75s cubic-bezier(0.34, 1.45, 0.45, 1) forwards;
}

@keyframes svThumbIconPop {
  0% {
    transform: scale(0.55) rotate(-18deg);
    opacity: 0.65;
  }
  55% {
    transform: scale(1.12) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.sv-thumb-reaction__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.42rem 0.8rem 0.48rem;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(14, 22, 44, 0.94) 0%, rgba(5, 12, 30, 0.97) 100%);
  border: 1px solid rgba(124, 255, 0, 0.3);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.sv-thumb-reaction__name {
  font-size: 0.93rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.97);
  letter-spacing: 0.01em;
  line-height: 1.25;
  word-break: break-word;
}

.sv-thumb-reaction__hint {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(124, 255, 0, 0.9);
}

/* CTA de link externo: acima da toolbar, centrado em X, ainda na faixa inferior. */
.sv-external-link-dock {
  z-index: 71;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  justify-content: safe center;
  align-items: center;
  padding: 0 1rem 0.55rem;
  pointer-events: none;
  background: transparent;
}

.sv-external-link-dock.hidden {
  display: none;
}

.sv-external-link-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  max-width: min(92vw, 26rem);
  padding: 0.72rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(10, 18, 8, 0.12);
  background: linear-gradient(165deg, #9dff3a 0%, #7cff00 42%, #5ec700 100%);
  color: #0b1408;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 10px 28px rgba(124, 255, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
  animation: sv-external-link-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sv-external-link-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 14px 32px rgba(124, 255, 0, 0.34),
    0 3px 10px rgba(0, 0, 0, 0.38);
}

.sv-external-link-btn:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.sv-external-link-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sv-external-link-btn__icon {
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.sv-external-link-btn__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes sv-external-link-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-external-link-btn {
    animation: none;
    transition: none;
  }
}

.toolbar {
  container-type: inline-size;
  container-name: sv-toolbar;
  --sv-tool-size: 52px;
  --sv-tool-split-main: 48px;
  --sv-tool-split-caret: 22px;
  --sv-tool-font: 1.15rem;
  --sv-toolbar-gap: 0.65rem;
  --sv-tool-r: calc(var(--sv-tool-size) / 2);

  /* Acima do PiP (#pip-local z 60): menus de câmera/microfone abrem para cima e não podem ficar atrás do vídeo local. */
  z-index: 70;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  justify-content: safe center;
  align-items: center;
  gap: var(--sv-toolbar-gap);
  padding: 0.85rem;
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(124, 255, 0, 0.12);
}

.toolbar::-webkit-scrollbar {
  height: 4px;
}

.toolbar::-webkit-scrollbar-track {
  background: transparent;
}

.toolbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 99px;
}

@container sv-toolbar (max-width: 580px) {
  .toolbar {
    --sv-tool-size: 48px;
    --sv-tool-split-main: 44px;
    --sv-tool-split-caret: 21px;
    --sv-tool-font: 1.05rem;
    --sv-toolbar-gap: 0.52rem;
    padding: 0.72rem 0.65rem;
    padding-bottom: calc(0.72rem + env(safe-area-inset-bottom, 0px));
  }
}

@container sv-toolbar (max-width: 420px) {
  .toolbar {
    --sv-tool-size: 46px;
    --sv-tool-split-main: 42px;
    --sv-tool-split-caret: 20px;
    --sv-tool-font: 1rem;
    --sv-toolbar-gap: 0.45rem;
    padding: 0.65rem 0.5rem;
    padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }
}

@container sv-toolbar (max-width: 360px) {
  .toolbar {
    --sv-tool-size: 44px;
    --sv-tool-split-main: 40px;
    --sv-tool-split-caret: 19px;
    --sv-tool-font: 0.95rem;
    --sv-toolbar-gap: 0.38rem;
  }
}

.tool-split {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  border-radius: var(--sv-tool-r);
  overflow: visible;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tool-split .tool-btn.tool-split-main {
  width: var(--sv-tool-split-main);
  min-width: var(--sv-tool-split-main);
  border-radius: var(--sv-tool-r) 0 0 var(--sv-tool-r);
}

.tool-split .tool-btn.tool-split-caret {
  width: var(--sv-tool-split-caret);
  min-width: var(--sv-tool-split-caret);
  padding: 0;
  border-radius: 0 var(--sv-tool-r) var(--sv-tool-r) 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.65rem;
  color: #6a6a6a;
}

.tool-split .tool-btn.tool-split-caret i {
  color: #6a6a6a;
}

.tool-split .tool-btn.tool-split-caret:hover {
  background: #121e33;
}

.tool-split .tool-btn.tool-split-caret:hover i {
  color: #9ca3af;
}

.tool-split .tool-btn.tool-split-caret.hidden {
  display: none;
}

.tool-split--solo .tool-split-main {
  border-radius: var(--sv-tool-r);
  width: var(--sv-tool-size);
  min-width: var(--sv-tool-size);
}

.tool-split--mic-locked .tool-btn {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.toolbar-mic-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  z-index: 30;
  box-sizing: border-box;
  width: 150px;
  min-width: 150px;
  max-width: min(288px, 92vw);
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  color: #f4f4f5;
  background: rgba(24, 24, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.toolbar-mic-hint.hidden {
  display: none;
}

/* Portal no <body> (#sv-device-menu-portal): menus abertos não ficam sob flex #sala nem clip da .toolbar */
#sv-device-menu-portal {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  overflow: visible;
}

#sv-device-menu-portal .tool-device-menu {
  pointer-events: auto;
}

/* Aberto: o JS move o <ul> para o portal e usa position:fixed acima do palco/vídeos. */
.tool-device-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: min(280px, 92vw);
  max-height: min(220px, 40vh);
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #1a1d24;
  border: 1px solid rgba(124, 255, 0, 0.22);
  border-radius: 10px;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.tool-device-menu.tool-device-menu--floating {
  position: fixed;
  z-index: 98;
}

.tool-device-menu li {
  margin: 0;
}

.tool-device-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  color: #e8e8e8;
  font-size: 0.82rem;
  cursor: pointer;
  line-height: 1.3;
}

.tool-device-menu button:hover,
.tool-device-menu button:focus-visible {
  background: rgba(124, 255, 0, 0.12);
  outline: none;
}

.tool-device-menu button.is-active {
  color: var(--accent);
  font-weight: 600;
}

.tool-btn {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: var(--sv-tool-size);
  height: var(--sv-tool-size);
  border-radius: 50%;
  border: none;
  background: #0a1220;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--sv-tool-font);
  color: #6a6a6a;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.toolbar .tool-btn i {
  color: #6a6a6a;
}

.tool-btn:hover:not(.danger):not(.recording-on):not(.tool-btn--hand-up):not(.tool-btn--vote-pending):not([aria-pressed='true']) {
  transform: scale(1.05);
  background: #121e33;
}

.tool-btn:hover:not(.danger):not(.recording-on):not(.tool-btn--hand-up):not(.tool-btn--vote-pending):not([aria-pressed='true']) i {
  color: #8b8b8b;
}

.tool-btn[aria-pressed='true'] i {
  color: var(--accent);
}

.tool-btn[aria-pressed='false'] i {
  color: #6a6a6a;
}

.tool-btn.danger {
  background: #330000;
}

.tool-btn.danger i {
  color: #ff0000;
}

.tool-btn.danger:hover {
  transform: scale(1.05);
  background: #441010;
}

.tool-btn.danger:hover i {
  color: #ff3333;
}

.tool-btn.tool-btn--hand-up:hover,
#t-cam[aria-pressed='true']:hover,
#t-mic[aria-pressed='true']:hover,
#t-screen[aria-pressed='true']:hover,
#t-cam[aria-pressed='true']:hover + #t-cam-device,
#t-mic[aria-pressed='true']:hover + #t-mic-device,
#t-cam[aria-pressed='true'] + #t-cam-device:hover,
#t-mic[aria-pressed='true'] + #t-mic-device:hover {
  background: rgba(124, 255, 0, 0.28);
  transform: scale(1.05);
}

.tool-btn.tool-btn--hand-up:hover i,
#t-cam[aria-pressed='true']:hover i,
#t-mic[aria-pressed='true']:hover i,
#t-screen[aria-pressed='true']:hover i,
#t-cam[aria-pressed='true']:hover + #t-cam-device i,
#t-mic[aria-pressed='true']:hover + #t-mic-device i,
#t-cam[aria-pressed='true'] + #t-cam-device:hover i,
#t-mic[aria-pressed='true'] + #t-mic-device:hover i {
  color: var(--accent);
}

.tool-btn.tool-btn--chat-unread:hover .tool-btn-chat-inner i,
.tool-btn.tool-btn--people-hands:hover .tool-btn-people-inner i {
  color: var(--accent);
}

.tool-btn.recording-on {
  box-shadow: 0 0 0 2px #dc2626;
}

.tool-btn.recording-on i {
  color: #dc2626;
}

/* Votação pendente: chamar atenção até o condômino votar */
@keyframes sv-vote-pending-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 12px rgba(124, 255, 0, 0.45);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.25), 0 0 24px rgba(124, 255, 0, 0.65);
  }
}

#t-votacao.tool-btn--vote-pending {
  background-color: #008000;
  animation: sv-vote-pending-pulse 1.15s ease-in-out infinite;
}

#t-votacao.tool-btn--vote-pending:hover {
  background-color: #009400;
}

#t-votacao.tool-btn--vote-pending i {
  color: #fff;
}

.config-recording-wrap {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.config-rec-dual-tip {
  margin: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(232, 232, 232, 0.88);
  background: rgba(124, 255, 0, 0.06);
  border: 1px solid rgba(124, 255, 0, 0.2);
  border-radius: 10px;
}

.config-rec-dual-tip strong {
  color: var(--accent);
  font-weight: 700;
}

.config-rec-dual-tip em {
  font-style: normal;
  color: #fecaca;
  font-weight: 600;
}

.config-switch-row.config-recording-row,
.config-switch-row.config-local-recording-row {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.config-recording-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.config-rec-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.config-recording-row {
  cursor: default;
}

.config-recording-row:not(.config-recording-row--active):hover {
  background: rgba(248, 113, 113, 0.07);
  border-color: rgba(248, 113, 113, 0.22);
  cursor: default;
}

.config-recording-icon {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #f87171 !important;
}

.config-recording-row--active .config-recording-icon {
  background: rgba(220, 38, 38, 0.28) !important;
  color: #fecaca !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
  animation: config-rec-icon-pulse 1.4s ease-in-out infinite;
}

@keyframes config-rec-icon-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
  }
}

.config-recording-row--active {
  border-color: rgba(248, 113, 113, 0.32) !important;
  background: rgba(127, 29, 29, 0.12) !important;
}

.config-recording-row--active:hover {
  border-color: rgba(248, 113, 113, 0.42) !important;
  background: rgba(127, 29, 29, 0.16) !important;
}

.config-rec-status {
  font-size: 0.68rem;
  color: #fecaca;
  font-weight: 600;
  text-align: left;
  margin: 0;
  max-width: 100%;
  line-height: 1.35;
}

.config-rec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.48rem 1.05rem;
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.config-rec-btn--start {
  background: rgba(124, 255, 0, 0.18);
  color: var(--accent);
  border-color: rgba(124, 255, 0, 0.38);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.08);
}

.config-rec-btn--start:hover {
  background: rgba(124, 255, 0, 0.28);
  border-color: rgba(124, 255, 0, 0.5);
}

.config-rec-btn--stop {
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.48);
}

.config-rec-btn--stop:hover {
  background: rgba(220, 38, 38, 0.34);
  border-color: rgba(252, 165, 165, 0.65);
}

.config-rec-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.config-rec-btn--stop:focus-visible {
  outline-color: #f87171;
}

.config-rec-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.config-local-recording-row {
  cursor: default;
}

.config-local-recording-row:not(.config-local-recording-row--active):hover {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.22);
  cursor: default;
}

.config-local-recording-icon {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #7dd3fc !important;
}

.config-local-recording-row--active .config-local-recording-icon {
  background: rgba(14, 165, 233, 0.28) !important;
  color: #e0f2fe !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
  animation: config-local-rec-icon-pulse 1.4s ease-in-out infinite;
}

@keyframes config-local-rec-icon-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
  }
}

.config-local-recording-row--active {
  border-color: rgba(56, 189, 248, 0.32) !important;
  background: rgba(12, 74, 110, 0.18) !important;
}

.config-local-recording-row--active:hover {
  border-color: rgba(56, 189, 248, 0.42) !important;
  background: rgba(12, 74, 110, 0.22) !important;
}

.config-local-rec-status {
  font-size: 0.68rem;
  color: #bae6fd;
  font-weight: 600;
  text-align: left;
  margin: 0;
  max-width: 100%;
  line-height: 1.35;
}

/* Área à esquerda do painel: clique fecha participantes / chat / etc.
   z-index entre PiP (60) e toolbar (70) para não roubar cliques da barra inferior. */
.sv-room-panel-backdrop {
  position: fixed;
  z-index: 67;
  top: 0;
  left: 0;
  bottom: 0;
  width: max(0px, calc(100% - min(380px, 100%)));
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sv-room-panel-backdrop.hidden {
  display: none !important;
  pointer-events: none !important;
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100%);
  background-color: #05172c;
  border-left: 1px solid rgba(124, 255, 0, 0.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

/* Chat: cabeçalho no topo, log ocupa o restante, campo de envio colado ao rodapé */
.panel.panel-chat {
  overflow: hidden;
}

.panel.panel-chat .panel-head {
  flex-shrink: 0;
}

.panel.panel-chat .chat-readonly-banner {
  flex-shrink: 0;
  margin: 0 1rem 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 180, 50, 0.1);
  border: 1px solid rgba(255, 200, 100, 0.22);
}

.panel.panel-chat .pinned:not(.hidden) {
  flex-shrink: 0;
  margin: 0 1rem 0.5rem;
}

.panel.panel-chat .chat-log-area {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.panel.panel-chat .chat-log-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem 1.35rem;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.01em;
  pointer-events: none;
}

.panel.panel-chat .chat-log-empty.hidden {
  display: none !important;
}

.panel.panel-chat .chat-log {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
  padding: 0.25rem 1rem 0.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: rgba(150, 150, 150, 0.45) rgba(255, 255, 255, 0.06);
}

.panel.panel-chat .chat-log::-webkit-scrollbar {
  width: 12px;
}

.panel.panel-chat .chat-log::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.panel.panel-chat .chat-log::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.4);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.panel.panel-chat .chat-log::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 180, 180, 0.55);
  background-clip: padding-box;
}

.panel.panel-chat .chat-form {
  --sv-chat-composer-h: 2.65rem;
  flex-shrink: 0;
  margin-top: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(124, 255, 0, 0.14);
  background: linear-gradient(165deg, rgba(8, 22, 48, 0.92) 0%, rgba(3, 10, 28, 0.98) 55%, rgba(2, 6, 22, 0.99) 100%);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.35);
  gap: 0.65rem;
  align-items: stretch;
}

.panel.panel-chat .chat-form .chat-input {
  box-sizing: border-box;
  min-width: 0;
  height: var(--sv-chat-composer-h);
  min-height: var(--sv-chat-composer-h);
  max-height: var(--sv-chat-composer-h);
  padding: 0.38rem 0.72rem;
  font-size: 0.88rem;
  line-height: 1.35;
  border-radius: 10px;
  border: 1px solid rgba(124, 255, 0, 0.22);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  resize: none;
  overflow-y: auto;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.panel.panel-chat .chat-form .chat-input::placeholder {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(180, 190, 210, 0.72);
}

.panel.panel-chat .chat-form .chat-input:hover:not(:disabled) {
  border-color: rgba(124, 255, 0, 0.32);
}

.panel.panel-chat .chat-form .chat-input:focus {
  outline: none;
  border-color: rgba(124, 255, 0, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 2px rgba(124, 255, 0, 0.12);
}

.panel.panel-chat .chat-form .chat-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.panel.panel-chat .chat-form .chat-send-btn {
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  margin-top: 0;
  height: var(--sv-chat-composer-h);
  min-height: var(--sv-chat-composer-h);
  padding: 0 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(124, 255, 0, 0.18);
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.panel.panel-chat .chat-form .chat-send-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 6px 22px rgba(124, 255, 0, 0.26);
}

.panel.panel-chat .chat-form .chat-send-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.panel.panel-chat .chat-form .chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.panel.panel-chat .chat-form .chat-send-btn .fa-paper-plane {
  font-size: 0.88rem;
}

.panel.panel-chat .chat-form .chat-send-btn__label {
  margin-left: 0.15rem;
}

@media (max-width: 340px) {
  .panel.panel-chat .chat-form .chat-send-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .panel.panel-chat .chat-form .chat-send-btn {
    padding: 0 0.7rem;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-head h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent);
}

.icon-close {
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
}

.panel-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: auto;
  scrollbar-color: rgba(150, 150, 150, 0.45) rgba(255, 255, 255, 0.06);
}

.panel-body::-webkit-scrollbar {
  width: 12px;
}

.panel-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.panel-body::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.4);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 180, 180, 0.55);
  background-clip: padding-box;
}

.stats {
  font-size: 0.9rem;
  color: var(--muted);
}

.part-stats {
  font-size: 0.88rem;
  color: var(--muted);
}

.part-stats--simple {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.part-stats--org {
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.part-stats-section {
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.part-stats-section__title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #7cff00);
  margin-bottom: 0.55rem;
  opacity: 0.95;
}

.part-stats-metrics {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: baseline;
}

.part-stats-metric {
  display: contents;
}

.part-stats-metric__label {
  color: rgba(232, 232, 232, 0.82);
  font-size: 0.84rem;
  line-height: 1.35;
  padding-right: 0.25rem;
}

.part-stats-metric__value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white, #f1f5f9);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .part-stats-metrics {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .part-stats-metric__value {
    text-align: left;
    margin-bottom: 0.4rem;
    padding-left: 0.35rem;
    border-left: 2px solid rgba(124, 255, 0, 0.35);
  }
}

.part-org-listeners-wrap {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.part-open-listeners-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.75rem;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  color: var(--white, #f1f5f9);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.part-open-listeners-btn:hover {
  background: rgba(124, 255, 0, 0.08);
  border-color: rgba(124, 255, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.12);
}

.part-open-listeners-btn:active {
  transform: scale(0.99);
}

.part-open-listeners-btn__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  background: rgba(124, 255, 0, 0.12);
  color: var(--accent, #7cff00);
  font-size: 1rem;
}

.part-open-listeners-btn__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.part-open-listeners-btn__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.part-open-listeners-btn__hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
}

.part-open-listeners-btn__badge {
  flex: 0 0 auto;
  min-width: 1.65rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #0f172a;
  background: var(--accent, #7cff00);
  border-radius: 999px;
}

.part-open-listeners-btn__chev {
  flex: 0 0 auto;
  opacity: 0.45;
  font-size: 0.75rem;
}

.part-open-listeners-btn:hover .part-open-listeners-btn__chev {
  opacity: 0.85;
}

.sv-listeners-modal {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 0 -0.2rem;
  padding: 0 0.2rem;
}

.sv-listeners-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sv-listeners-table .sv-listeners-col-wrap {
  word-break: break-word;
  max-width: 12rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sv-listeners-table .sv-listeners-col-ip {
  max-width: 9rem;
}

.sv-listeners-table .sv-listeners-empty {
  text-align: center;
  color: rgba(228, 228, 231, 0.65);
  padding: 0.85rem 0.5rem !important;
}

.sv-listeners-table th,
.sv-listeners-table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sv-listeners-table .sv-mono {
  font-family: ui-monospace, monospace;
  color: var(--muted);
  word-break: break-all;
}

.sv-listeners-table .sv-listeners-th-actions,
.sv-listeners-table .sv-listeners-actions {
  text-align: right;
  vertical-align: middle;
  width: 1%;
  white-space: nowrap;
}

.sv-listener-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fecaca;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.42) 0%, rgba(153, 27, 27, 0.5) 100%);
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 9px;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 4px 14px rgba(0, 0, 0, 0.35);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.sv-listener-remove-btn i {
  font-size: 0.82rem;
  opacity: 0.95;
}

.sv-listener-remove-btn:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.55) 0%, rgba(185, 28, 28, 0.62) 100%);
  border-color: rgba(252, 165, 165, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 6px 20px rgba(0, 0, 0, 0.4);
}

.sv-listener-remove-btn:active {
  transform: scale(0.98);
}

.sv-listener-remove-btn:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.85);
  outline-offset: 2px;
}

.sv-listeners-hint {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.tool-btn.tool-btn--hand-up,
#t-cam[aria-pressed='true'],
#t-mic[aria-pressed='true'],
#t-cam[aria-pressed='true'] + #t-cam-device,
#t-mic[aria-pressed='true'] + #t-mic-device,
#t-screen[aria-pressed='true'] {
  background: rgba(124, 255, 0, 0.2);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.35);
}

#t-cam[aria-pressed='true'] + #t-cam-device,
#t-mic[aria-pressed='true'] + #t-mic-device {
  border-left-color: rgba(124, 255, 0, 0.32);
}

#t-cam[aria-pressed='true'] i,
#t-mic[aria-pressed='true'] i,
#t-cam[aria-pressed='true'] + #t-cam-device i,
#t-mic[aria-pressed='true'] + #t-mic-device i,
#t-screen[aria-pressed='true'] i {
  color: var(--accent);
}

#t-chat {
  position: relative;
}

.tool-btn-chat-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-btn.tool-btn--chat-unread .tool-btn-chat-inner i {
  color: var(--accent);
}

#t-people {
  position: relative;
}

.tool-btn-people-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-btn.tool-btn--people-hands .tool-btn-people-inner i {
  color: var(--accent);
}

.tool-btn.tool-btn--thumb-pulse {
  animation: svThumbToolbarPulse 0.52s ease;
}

@keyframes svThumbToolbarPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 255, 0, 0);
  }
  40% {
    box-shadow: 0 0 0 5px rgba(124, 255, 0, 0.28);
  }
}

.tool-hand-count-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid var(--white);
  pointer-events: none;
}

.part-hands-block {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.part-hands-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.part-hands-empty {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.part-hands-empty.hidden {
  display: none;
}

.part-hands-queue {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.part-hands-queue li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.part-hand-actions {
  margin-left: auto;
}

.part-hands-queue .btn-text {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.part-hands-queue .btn-text:hover {
  color: #fff;
}

.part-hands-org-bar .btn-text {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.part-hands-org-bar .btn-text:hover {
  color: #fff;
}

.part-hand-order {
  font-weight: 700;
  color: var(--accent);
  min-width: 1.25rem;
}

.part-hands-org-bar {
  margin-top: 0.25rem;
}

.part-hands-org-bar.hidden {
  display: none;
}

#part-list .part-badge--hand {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}

#part-list .part-badge--mic-individual {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

#part-list .part-badge--screen-individual {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}

.part-search-input {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.part-search-input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.part-search-input:focus {
  outline: none;
  border-color: rgba(124, 255, 0, 0.45);
  box-shadow: 0 0 0 2px rgba(124, 255, 0, 0.12);
}

#part-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#part-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

#part-list .sub {
  font-size: 0.8rem;
  color: var(--muted);
}

#part-list .part-pesos-org {
  font-size: 0.72rem;
  color: rgba(186, 198, 214, 0.92);
  margin-top: 0.3rem;
  line-height: 1.38;
  letter-spacing: 0.01em;
}

.part-filter-mic-wrap {
  margin: 0 0 0.85rem;
}

.part-filter-mic-wrap.hidden {
  display: none !important;
}

.part-mics-open-count {
  margin: 0 0 0.45rem;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.part-mics-open-count:empty {
  display: none;
}

.part-filter-mic {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.22) 100%);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.part-filter-mic:hover {
  border-color: rgba(124, 255, 0, 0.28);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.part-filter-mic-switch-wrap {
  position: relative;
  width: 2.75rem;
  height: 1.42rem;
  flex-shrink: 0;
}

.part-filter-mic-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.part-filter-mic-input:focus-visible + .part-filter-mic-track {
  box-shadow: 0 0 0 2px rgba(124, 255, 0, 0.45);
}

.part-filter-mic-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
  pointer-events: none;
}

.part-filter-mic-track::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  width: 1.06rem;
  height: 1.06rem;
  margin-top: -0.53rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.part-filter-mic-input:checked + .part-filter-mic-track {
  background: rgba(124, 255, 0, 0.2);
  border-color: rgba(124, 255, 0, 0.42);
  box-shadow: inset 0 0 12px rgba(124, 255, 0, 0.12);
}

.part-filter-mic-input:checked + .part-filter-mic-track::after {
  transform: translateX(calc(2.75rem - 6px - 1.06rem));
}

.part-filter-mic-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  line-height: 1.25;
}

.part-filter-mic-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
  letter-spacing: 0.01em;
}

.part-filter-mic-hint {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

#part-list .part-item-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

#part-list .part-item-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

#part-list .part-item-media {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

#part-list .part-item-media .part-media-on {
  color: #7eff00;
}

#part-list .part-item-media .part-media-off {
  color: rgba(255, 255, 255, 0.28);
}

#part-list .part-item-media--listener-org {
  margin-left: auto;
}

#part-list .part-org-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
}

#part-list .part-org-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 252, 0.65);
  cursor: pointer;
  padding: 0.22rem 0.4rem;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

#part-list .part-org-gear-btn:hover {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

#part-list .part-org-gear-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: rgba(126, 255, 0, 0.35);
  background: rgba(126, 255, 0, 0.08);
}

#part-list .part-org-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: min(260px, 72vw);
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

#part-list .part-org-dropdown.is-open {
  display: block;
}

#part-list .part-org-dropdown .btn-text {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.35;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--accent);
}

#part-list .part-org-dropdown .btn-text:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#part-list .part-org-dropdown .org-remove-call-btn {
  color: #f87171;
}

#part-list .part-org-dropdown .org-remove-call-btn:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
}

#part-list .part-speaking-meter {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 16px;
  flex-shrink: 0;
}

#part-list .part-speaking-meter.hidden {
  display: none !important;
}

#part-list .part-speaking-bar {
  width: 2px;
  min-height: 3px;
  background: #7eff00;
  border-radius: 1px;
  transform-origin: bottom center;
  animation: sv-active-speak-bar 0.42s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(126, 255, 0, 0.4);
}

#part-list .part-speaking-bar:nth-child(1) {
  animation-duration: 0.38s;
  animation-delay: 0s;
}
#part-list .part-speaking-bar:nth-child(2) {
  animation-duration: 0.44s;
  animation-delay: 0.07s;
}
#part-list .part-speaking-bar:nth-child(3) {
  animation-duration: 0.36s;
  animation-delay: 0.12s;
}
#part-list .part-speaking-bar:nth-child(4) {
  animation-duration: 0.48s;
  animation-delay: 0.05s;
}
#part-list .part-speaking-bar:nth-child(5) {
  animation-duration: 0.4s;
  animation-delay: 0.15s;
}

#part-list .part-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

#part-list .part-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

#part-list .part-badge--org {
  background: rgba(124, 255, 0, 0.2);
  color: var(--accent);
}

#part-list .part-badge--coorg {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

#part-list .part-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

#part-list .btn-text {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#part-list .btn-text:hover {
  color: #fff;
}

#part-list .org-remove-call-btn {
  color: #f87171;
  text-decoration-color: rgba(248, 113, 113, 0.6);
}

#part-list .org-remove-call-btn:hover {
  color: #fca5a5;
}

.pinned {
  background: rgba(124, 255, 0, 0.12);
  border: 1px solid rgba(124, 255, 0, 0.35);
  padding: 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.chat-log {
  flex: 1;
  min-height: 200px;
  max-height: 40vh;
  overflow-y: auto;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.chat-msg {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-msg-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-msg-meta {
  min-width: 0;
  flex: 1;
}

.chat-msg .who {
  color: var(--accent);
  font-weight: 600;
}

.chat-msg .chat-time {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

.chat-msg .from-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8em;
  font-weight: 500;
}

.chat-msg .chat-text {
  display: block;
  margin-top: 0.15rem;
  word-break: break-word;
}

.chat-msg.mine {
  background: rgba(124, 255, 0, 0.06);
  border-radius: 6px;
  padding: 0.25rem 0.35rem;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-form input,
.chat-form textarea {
  flex: 1;
  min-width: 0;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  cursor: pointer;
}

.config-switches {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.config-switch-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 0.85rem;
  padding: 0.85rem 1rem;
  margin: 0;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(124, 255, 0, 0.14);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.config-display-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin: 0 0 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(124, 255, 0, 0.14);
  border-radius: 12px;
}

.config-display-name-wrap.hidden {
  display: none;
}

.config-display-name-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem 0.85rem;
}

.config-display-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.config-display-name-input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: #f2f2f2;
  font: inherit;
}

.config-display-name-input:focus {
  outline: none;
  border-color: rgba(124, 255, 0, 0.45);
}

.config-display-name-save {
  flex: 0 0 auto;
  white-space: nowrap;
}

.config-display-name-hint {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.config-switch-row:hover {
  background: rgba(124, 255, 0, 0.05);
  border-color: rgba(124, 255, 0, 0.22);
}

.config-switch-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: rgba(124, 255, 0, 0.12);
  color: var(--accent);
  font-size: 1rem;
}

.config-switch-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.config-switch-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.25;
}

.config-switch-desc {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.35;
}

.config-switch {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.config-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.config-switch-slider {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-switch-slider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0.15rem;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
  transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.config-switch input:checked + .config-switch-slider {
  background: rgba(124, 255, 0, 0.35);
  border-color: rgba(124, 255, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.12);
}

.config-switch input:checked + .config-switch-slider::after {
  transform: translate(1.2rem, -50%);
}

.config-switch input:focus-visible + .config-switch-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .config-switch-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .config-switch-row .config-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .config-switch-row .config-switch-icon {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .config-switch-row .config-switch-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 0;
  }

  .config-switch-row.config-recording-row,
  .config-switch-row.config-local-recording-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .config-recording-row .config-recording-icon,
  .config-local-recording-row .config-local-recording-icon {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
  }

  .config-recording-row .config-recording-stack,
  .config-local-recording-row .config-recording-stack {
    grid-row: 2;
    grid-column: 1;
  }
}

.help-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.help-actions .btn.full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.help-actions .help-wa-icon {
  color: #25d366;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

/**
 * Gravador automático (Playwright): esconde cromo da sala para o vídeo ficar só palco/conteúdo.
 * Ativado em virtual-room.js quando o JWT tem recorderBot (token /api/internal/recorder-token).
 */
html.sv-recorder-capture #rec-indicator,
html.sv-recorder-capture .sala-rec-indicator {
  display: none !important;
  visibility: hidden !important;
}

html.sv-recorder-capture .sala-logo-fixed,
html.sv-recorder-capture nav.toolbar,
html.sv-recorder-capture #sv-external-link-dock,
html.sv-recorder-capture #pip-local,
html.sv-recorder-capture #stage-duo-local-pane,
html.sv-recorder-capture #sala aside.panel,
html.sv-recorder-capture #stage-filmstrip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Modo ouvinte (?ouvinte=1 ou .sv-is-listener): sem barra inferior, PiP local, etc. */
body[data-ouvinte="1"] #sala nav.toolbar,
body[data-ouvinte="1"] #sala .stage-rotate-toolbar,
body[data-ouvinte="1"] #sala .sv-vote-waiting-organizer,
body[data-ouvinte="1"] #pip-local,
body.sv-is-listener #pip-local {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ouvinte ainda pode ver o CTA de contingência (Meet etc.). */
body[data-ouvinte="1"] #sala .sv-external-link-dock:not(.hidden),
body.sv-is-listener #sala .sv-external-link-dock:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

/* Modal de votação (iframe votacao.php) */
.sv-vote-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sv-vote-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.sv-vote-modal-dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(2, 3, 45, 0.98) 0%, rgba(0, 9, 31, 0.98) 100%);
  border: 1px solid rgba(124, 255, 0, 0.25);
  border-radius: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.sv-vote-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(124, 255, 0, 0.12);
}

.sv-vote-modal-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.sv-vote-modal-head h2 .fa-keyboard {
  opacity: 0.9;
  font-size: 1em;
}

.sv-vote-modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  line-height: 1;
}

.sv-vote-modal-close:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.sv-vote-modal-body {
  flex: 1;
  min-height: min(70vh, 640px);
  background: #050816;
}

.sv-doc-sala-dialog {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
}

.sv-doc-sala-body {
  min-height: 0;
  max-height: min(72vh, 560px);
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}

.sv-doc-sala-lead {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.sv-doc-sala-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sv-doc-sala-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(126, 255, 0, 0.1);
}

.sv-doc-sala-row:last-child {
  border-bottom: none;
}

.sv-doc-sala-row--loading,
.sv-doc-sala-row--muted,
.sv-doc-sala-row--err {
  justify-content: center;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.sv-doc-sala-row--err {
  color: #fca5a5;
}

.sv-doc-sala-row-main {
  flex: 1 1 160px;
  min-width: 0;
}

.sv-doc-sala-row-title {
  font-weight: 600;
  color: #f4f4f5;
  word-break: break-word;
}

.sv-doc-sala-row-meta {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.sv-doc-sala-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
  vertical-align: middle;
}

.sv-doc-sala-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.sv-doc-sala-view-dialog {
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
}

.sv-doc-sala-view-body {
  min-height: min(68vh, 620px);
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: 0;
  background: #0a0c12;
}

.sv-doc-sala-frame {
  display: block;
  width: 100%;
  min-height: min(64vh, 560px);
  border: none;
  background: #000;
}

.sv-doc-sala-txt {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  font-size: 0.85rem;
  color: rgba(228, 228, 231, 0.9);
  max-height: min(70vh, 640px);
  overflow: auto;
}

.sv-doc-sala-fallback {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.sv-org-hotkeys-dialog {
  width: min(440px, 100%);
  max-height: min(90vh, 560px);
}

.sv-org-hotkeys-body {
  flex: 1;
  min-height: 0;
  max-height: min(72vh, 480px);
  overflow-y: auto;
  padding: 0.9rem 1rem 1rem;
  background: #050816;
}

.sv-hotkeys-modal-lead {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.sv-hotkeys-config-hint {
  margin-top: 0.35rem !important;
  margin-bottom: 0 !important;
  font-size: 0.78rem;
  line-height: 1.35;
}

.sv-hotkeys-section-title {
  margin: 0.65rem 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(228, 228, 231, 0.88);
}

.sv-hotkeys-section-title:first-child {
  margin-top: 0;
}

.sv-hotkeys-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.sv-hotkeys-device-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.42rem;
}

.sv-hotkeys-device-label {
  font-size: 0.8rem;
  line-height: 1.25;
  min-width: 0;
  word-break: break-word;
}

.sv-hotkeys-digit-select {
  min-width: 3.25rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: #f4f4f5;
  font-size: 0.85rem;
}

.sv-hotkeys-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(124, 255, 0, 0.1);
}

.sv-vote-iframe {
  width: 100%;
  height: min(70vh, 640px);
  border: 0;
  display: block;
  background: #0a1929;
}

.sv-vote-success {
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
}

.sv-vote-success.hidden {
  display: none !important;
}

.sv-vote-success-lead {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sv-vote-success-text {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.sv-vote-success .btn.primary {
  min-width: 8rem;
}

/* Página dedicada: gravação local (guia separada da videochamada) */
.local-recorder-body {
  min-height: 100vh;
}

.local-recorder-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.local-recorder-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.local-recorder-card {
  margin-bottom: 1rem;
}

.local-recorder-title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--white);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.35;
}

.local-recorder-title .text-rec {
  color: #ff3b30;
  font-size: 0.65rem;
  margin-top: 0.35rem;
  animation: config-rec-icon-pulse 1.4s ease-in-out infinite;
}

.local-recorder-lead {
  margin: 0 0 1rem;
  line-height: 1.5;
  font-size: 0.92rem;
}

.local-recorder-instructions {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.local-recorder-steps-title {
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.local-recorder-instructions p:last-child {
  margin: 0;
}

.local-recorder-h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--accent);
}

.local-recorder-quality {
  border: 0;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.local-recorder-quality:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.local-recorder-quality-opt {
  display: grid;
  grid-template-columns: 1.375rem minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0;
  align-items: start;
  cursor: pointer;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.local-recorder-quality-opt:hover {
  border-color: rgba(124, 255, 0, 0.22);
  background: rgba(0, 0, 0, 0.35);
}

.local-recorder-quality-opt:has(.local-recorder-quality-input:checked) {
  border-color: rgba(124, 255, 0, 0.5);
  background: rgba(124, 255, 0, 0.07);
  box-shadow: 0 0 0 1px rgba(124, 255, 0, 0.12);
}

.local-recorder-quality-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 2px solid rgba(148, 163, 184, 0.55);
  border-radius: 50%;
  background: rgba(3, 7, 39, 0.9);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  align-self: start;
  justify-self: start;
}

.local-recorder-quality-input:hover {
  border-color: rgba(124, 255, 0, 0.45);
}

.local-recorder-quality-input:focus {
  outline: none;
}

.local-recorder-quality-opt:has(.local-recorder-quality-input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.local-recorder-quality-input:checked {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 42%, transparent 44%);
  box-shadow: inset 0 0 0 3px rgba(3, 7, 39, 0.95);
}

.local-recorder-quality-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding-top: 0.02rem;
}

.local-recorder-quality-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.local-recorder-quality-opt:has(.local-recorder-quality-input:checked) .local-recorder-quality-title {
  color: var(--accent);
}

.local-recorder-quality-desc {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
}

.local-recorder-actions-card .local-recorder-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.local-recorder-btn-start,
.local-recorder-btn-stop {
  flex: 1;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.local-recorder-status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.local-recorder-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b30;
  flex-shrink: 0;
  animation: config-rec-icon-pulse 1.4s ease-in-out infinite;
}

.local-recorder-footnote {
  margin-top: 1rem;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .local-recorder-title {
    font-size: 1.05rem;
  }
  .local-recorder-btn-start,
  .local-recorder-btn-stop {
    min-width: 100%;
  }
}
