* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #0b0b0f;
  color: #e8e8ef;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

#preview {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain, not cover: the operator frames the actual square being transmitted */
  object-fit: contain;
  background: #000;
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  pointer-events: none;
}

#brand {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 20px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
#brand span { color: #ff2d78; }
#brand {
  pointer-events: auto;  /* also toggles the HUD — a second, larger tap target */
}
#build {
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: #9a9aa8;
  letter-spacing: 0;
}

#hud {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #9a9aa8;
  background: rgba(11,11,15,0.82);
  border: 1px solid #23232e;
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre;
}
#hud.hidden { display: none; }

#status {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(11,11,15,0.75);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  pointer-events: auto;  /* tap toggles the diagnostics HUD */
}
#status.idle       { color: #9a9aa8; }
#status.connecting { color: #ffc24d; }
#status.live       { color: #3dffa0; }
#status.error      { color: #ff5c5c; }

#go {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 18px 56px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: #ff2d78;
  box-shadow: 0 4px 24px rgba(255,45,120,0.45);
  cursor: pointer;
}
#go:active { transform: scale(0.97); }
#go.hidden { display: none; }
