:root {
	color-scheme: light dark;
	--bg: #f4efe9;
	--surface: #f7f3ee;     
	--fg: #1a1517;          
	--muted: #6b5d66;       
	--line: #e8e0d8;        
	--accent: #8b3a4a;
	--shadow: rgba(30, 18, 28, 0.12);
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	display: flex;
	flex-direction: column;
	font-family: system-ui, sans-serif;
	background: var(--bg);
	color: var(--fg);
}

header {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 10px;
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	font-weight: 600;
	text-decoration: none;
}

.brand img {
	display: block;
	width: 28px;
	height: 28px;
}

.theme-toggle,
.user-settings {
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--fg);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.theme-toggle {
	margin-left: auto;
}

.user-settings:not([hidden]) {
	margin-left: auto;
}

.user-settings:not([hidden]) + .theme-toggle {
	margin-left: 8px;
}

main {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}


:root[data-theme="light"] {
	color-scheme: light;
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #1a1218;
	--surface: #2a1f28;
	--fg: #f0e8e4;
	--muted: #9a8a94;
	--line: #3d2e3a;
	--accent: #c45c6a;
	--shadow: rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #1a1218;
		--surface: #2a1f28;
		--fg: #f0e8e4;
		--muted: #9a8a94;
		--line: #3d2e3a;
		--accent: #c45c6a;
		--shadow: rgba(0, 0, 0, 0.45);
	}
}
