.sender {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.cam {
  position: relative;
  flex: 1;
  background: #0a0f1c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0f1c;
}

/* Pill de estado */
.status-pill {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 7, 13, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-pill[data-state="waiting"] .dot { background: var(--action); }
.status-pill[data-state="live"] .dot {
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
}
.status-pill[data-state="error"] .dot { background: var(--error); }

/* Botón cambiar cámara */
.cam-toggle {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--action);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.6);
  transition: transform 0.15s ease;
}

.cam-toggle:active { transform: scale(0.94); }
.cam-toggle svg { width: 26px; height: 26px; }

/* Caja de error */
.error-box {
  position: absolute;
  inset: auto 20px 20px;
  background: var(--surface);
  border: 1px solid var(--error);
  border-radius: 12px;
  padding: 16px;
}

.error-box p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Panel inferior */
.panel {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 18px 20px max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.room-block {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.room-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.room-code {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .cam-toggle { transition: none; }
}
