/* ---- brand ---- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-sm { gap: 9px; }

.brand-mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  position: relative;
}
.brand-mark span {
  position: absolute; inset: 4px 4px 8px 4px;
  background: var(--accent);
}
.brand-mark-sm { width: 18px; height: 18px; }
.brand-mark-sm span { inset: 3px 3px 6px 3px; }

.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  padding-left: 8px;
  border-left: 1px solid var(--border-tile);
}

.status-pill {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}

/* ---- typography blocks ---- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.gate-page .kicker, .join-page .kicker { color: var(--text-dim); margin-bottom: 14px; }

.home-copy h1 {
  font-size: 40px; line-height: 1.1; font-weight: 600;
  letter-spacing: -0.025em; margin: 0 0 16px;
}
.home-copy p {
  margin: 0 0 32px; color: var(--text-muted); line-height: 1.6; max-width: 46ch;
}

.join-card h2, .gate-card h2 {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px;
}
.join-card > p { margin: 0 0 24px; line-height: 1.55; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 12px 20px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary.is-danger { background: var(--danger-strong); }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--bg-raised); }

.btn-outline {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 11px 16px;
}
.btn-outline:hover { color: var(--text); border-color: var(--border-hover); }
.btn-danger-hover:hover { border-color: var(--danger-border-strong); color: var(--danger-text); }

.btn-flex { flex: 1; }
.btn-block { width: 100%; margin-top: 22px; padding: 12px; }
.btn-link {
  width: 100%; margin-top: 8px; background: transparent; color: var(--text-dim);
  padding: 8px; font-size: 12px; border: none;
}
.btn-link:hover { color: var(--text); }

.btn-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 13px 15px;
  color: var(--text-cool);
  font-size: 12px;
}
.btn-chip:hover { border-color: var(--border-hover); color: #fff; }

.link-accent { color: var(--accent-soft); }

.btn-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--text-cool);
  font-size: 12px;
}
.btn-toggle.is-on-mute { background: var(--danger-bg); border-color: var(--danger-border-strong); color: var(--danger-text); }
.btn-toggle.is-on-hand { background: var(--amber-bg); border-color: var(--amber-border); color: var(--amber); }

.row-actions { display: flex; gap: 10px; margin-top: 20px; }
.row-actions .btn-outline { flex: 0 0 auto; }

/* ---- inputs ---- */
.input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 11px 13px;
  color: var(--text);
}
.input:focus { border-color: var(--accent); }
.input:disabled { opacity: .6; cursor: not-allowed; }
.input-flex { flex: 1; min-width: 0; }

.input-code {
  background: var(--bg-raised);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}
.input-mono { font-family: var(--font-mono); letter-spacing: 0.1em; }

.field-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 7px; }
.field-error { margin-top: 10px; color: var(--danger); font-family: var(--font-mono); font-size: 11px; }
.gate-page .field-error { font-family: var(--font-sans); font-size: 12px; }

.gate-pass-wrap { margin-top: 16px; }
.gate-maxsources-wrap { margin-top: 16px; }
.field-warning { margin-top: 8px; color: var(--amber); font-size: 12px; line-height: 1.5; }
#picker-brave-warning { padding: 0 20px; margin-top: 4px; }

/* ---- gate ---- */
.gate-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.gate-code { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.12em; }
.gate-aside { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-align: right; line-height: 1.6; white-space: pre-line; }

/* ---- lobby header ---- */
.lobby-code { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--danger-text);
}

/* ---- stage ---- */
.stage-empty-title { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.stage-empty-inner p { margin: 0 0 22px; color: var(--text-dim); line-height: 1.6; font-size: 13px; }

.stage-volume {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(11,13,15,.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 22px;
}

.stage-volume-mute {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-cool);
  background: none;
  border: none;
  padding: 8px;
}
.stage-volume-mute.is-on-mute { color: var(--danger-text); }

.stage-volume-slider {
  width: 90px;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.stage-volume-slider::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
}
.stage-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.stage-volume-slider::-moz-range-track {
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
}
.stage-volume-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.reaction-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(11,13,15,.78);
  color: var(--text-cool);
}
.reaction-btn:hover { border-color: var(--accent); color: #fff; }

/* ---- filmstrip tiles ---- */
.tile {
  flex: 0 0 168px;
  height: 100px;
  position: relative;
}
.tile-select {
  position: absolute; inset: 0;
  padding: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-tile);
}
.tile.is-active .tile-select { border-color: var(--accent); }
.tile-select video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.tile-label-bar {
  position: absolute; inset: auto 0 0 0;
  padding: 5px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.tile-label {
  font-family: var(--font-mono); font-size: 10px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Botão de canto, irmão do select — 44px reais de alvo de toque sem
   competir por altura com a barra de rótulo (que fica fina de novo). */
.tile-stop {
  position: absolute;
  top: 6px; right: 6px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11,13,15,.78);
  color: var(--danger-text);
}
.tile-stop:hover { border-color: var(--danger-border-strong); background: rgba(11,13,15,.92); color: #fff; }

.add-tile {
  flex: 0 0 168px; height: 100px;
  border: 1px dashed var(--border-dashed);
  border-radius: 5px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  display: grid; place-items: center; gap: 4px;
}
.add-tile:hover { border-color: var(--accent); color: var(--accent-soft-hover); }
.add-tile .label { font-family: var(--font-mono); font-size: 10px; }

.toolbar-error { font-family: var(--font-mono); font-size: 11px; color: var(--danger-text); }

/* ---- sidebar tabs ---- */
.tab-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 12px; letter-spacing: 0.02em;
  padding: 0;
}
.tab-btn.is-active { border-bottom-color: var(--accent); color: var(--text); }

/* ---- chat ---- */
.chat-msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.chat-msg-author { font-size: 12px; font-weight: 500; }
.chat-msg-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.chat-msg-text { font-size: 13px; line-height: 1.55; color: var(--text-cool); word-wrap: break-word; }

/* ---- people list ---- */
.people-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 5px;
}
.people-row:hover { background: var(--bg-raised); }
.people-avatar {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 4px;
  background: var(--bg-raised); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
}
.people-name {
  font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.people-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.people-badge { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; }
.people-badge.badge-hand { color: var(--amber); }
.people-badge.badge-source { color: var(--text-dim); }

/* ---- share picker ---- */
.picker-title { font-size: 15px; font-weight: 500; }

.picker-option {
  padding: 16px 12px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg-sunken);
  text-align: left;
}
.picker-option.is-selected { border-color: var(--accent); background: rgba(45,127,249,.09); }
.picker-option-glyph {
  height: 34px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border-strong); border-radius: 3px; background: var(--bg-sunken);
}
.picker-option.is-selected .picker-option-glyph { color: var(--accent-soft); }
.picker-option-title { font-size: 13px; color: var(--text); margin-bottom: 3px; }
.picker-option-hint { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }

.audio-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; padding: 8px 0; text-align: left;
}
.audio-toggle span:last-child { font-size: 13px; color: var(--text-cool); }

.switch {
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--border-strong);
  position: relative; flex: 0 0 auto;
  display: inline-block;
  transition: background .15s;
}
.switch.is-on { background: var(--accent); }
.switch-knob {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: left .15s;
}
.switch.is-on .switch-knob { left: 16px; }

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .floater { animation: vt-fade 2.2s ease-out forwards; }
}
