@font-face {
	font-family: "UNSCII Player";
	src: url("./assets/unscii-8.otf") format("opentype");
	font-weight: 400;
	font-style: normal;
	font-display: block;
}

:root {
	color-scheme: dark;
	--bg: #08090b;
	--panel: #14161a;
	--panel-2: #1d2026;
	--ink: #f4f0e8;
	--muted: #a8adb7;
	--line: #323844;
	--accent: #ffd166;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	min-height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family:
		Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
		sans-serif;
}

body {
	display: grid;
	place-items: center;
	padding: 24px;
}

.shell {
	width: min(100%, 1040px);
	display: grid;
	gap: 14px;
}

.stage {
	width: 100%;
	display: grid;
	place-items: center;
	background: #000;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

#screen {
	width: min(100%, calc(100vh * 1.333 - 150px));
	max-width: 960px;
	aspect-ratio: 4 / 3;
	height: auto;
	display: block;
	background: #000;
	image-rendering: pixelated;
}

.controls {
	display: grid;
	grid-template-columns: auto auto auto minmax(150px, 190px) minmax(160px, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 44px;
}

.mode {
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	overflow: hidden;
}

button {
	min-height: 38px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--ink);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

button:hover {
	background: var(--panel-2);
}

button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.mode-button {
	min-width: 88px;
	border-width: 0;
	border-radius: 0;
}

.mode-button + .mode-button {
	border-left: 1px solid var(--line);
}

.mode-button.active {
	background: var(--accent);
	color: #14110a;
}

.command {
	min-width: 82px;
	border-radius: 8px;
}

.volume-control {
	display: grid;
	grid-template-columns: auto minmax(80px, 1fr);
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--panel);
	color: var(--muted);
	font-size: 13px;
}

.volume-control input {
	width: 100%;
	accent-color: var(--accent);
}

.meter {
	height: 10px;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--panel);
	overflow: hidden;
}

.meter-fill {
	width: 0%;
	height: 100%;
	background: var(--accent);
}

.status {
	min-width: 140px;
	color: var(--muted);
	font-size: 13px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
	body {
		padding: 12px;
	}

	.controls {
		grid-template-columns: 1fr 1fr;
	}

	.mode,
	.volume-control,
	.meter,
	.status {
		grid-column: 1 / -1;
	}

	.status {
		text-align: left;
	}
}
