:root {
	color-scheme: dark;
	--bg: #03060d;
	--surface: rgba(12, 18, 30, 0.86);
	--border: rgba(140, 170, 210, 0.22);
	--text: #dfe7f2;
	--muted: #8e9cb0;
	--accent: #5fb4ff;
	--radius: 10px;
	font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	background: var(--bg);
	color: var(--text);
	overflow: hidden;
	overscroll-behavior: none;
}

#view {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	display: block;
	object-fit: contain;
	background: var(--bg);
	touch-action: none;
	outline: none;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

.bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	padding: max(10px, env(safe-area-inset-top)) 16px 10px;
	font-size: 13px;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(3, 6, 13, 0.8), rgba(3, 6, 13, 0));
}

.title { font-weight: 600; letter-spacing: 0.04em; }
.status { color: var(--accent); }
.gpu { color: var(--text); }
.gpu.warning { color: #f2c97a; }

/* Top right, clear of the HUD's time controls along the bottom edge. */
.controls {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	top: calc(max(10px, env(safe-area-inset-top)) + 40px);
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
}

button {
	font: inherit;
	font-size: 14px;
	min-height: 44px;
	min-width: 44px;
	padding: 0 14px;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	touch-action: manipulation;
}

button:hover { border-color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: 0.45; cursor: default; }

.fatal {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 24px 16px;
	max-width: 560px;
	margin: 0 auto;
	background: var(--bg);
	z-index: 10;
	overflow-wrap: anywhere;
}
.fatal h2 { margin: 0 0 8px; }
.fatal p { color: var(--muted); line-height: 1.5; }

[hidden] { display: none !important; }
