
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const rootElement = document.getElementById('root');

// SAFETY CHECK:
// We only mount the React application if the #root element exists.
// Since we switched to a Static HTML structure (index.html has content directly in body),
// this check prevents the React code from trying to mount on a non-existent element and crashing.
if (rootElement) {
  const root = ReactDOM.createRoot(rootElement);
  root.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>
  );
} else {
  // This log confirms we are running in "Static HTML" mode, which is correct for the standalone file.
  console.log('Kiace App: Running in Static HTML Mode (React mounting skipped)');
}
