<script lang="ts">
	import '../app.css';
	import favicon from '$lib/assets/favicon.svg';
	import { ModeWatcher } from 'mode-watcher';
	import { Toaster } from 'svelte-sonner';

	let { children } = $props();
</script>

<svelte:head>
	<link rel="icon" href={favicon} />
</svelte:head>

<!--
	Mounted here rather than per layout: the reader and login use +layout@ to
	break out of (root), so anything mounted there never reaches them. The theme
	toggle in the reader did nothing because ModeWatcher was not running.
-->
<Toaster />
<ModeWatcher />

<div class="flex h-screen min-h-screen flex-col">
	<!-- Main Content Area -->
	<main class="flex-1">
		{@render children?.()}
	</main>
</div>
