:root {
	--bg: #000;
	--fg: #ccc;
	--dim: #999;
	--accent: #ddd;
	--key: #161616;
	--key-border: #333;
	--font: "IBM Plex Mono", Menlo, monospace;
	color-scheme: dark;
}
/* Nothing may scroll: a scrolling page makes the mobile URL bar toggle, which resizes the viewport, which repaints the terminal. */
html, body {
	margin: 0;
	padding: 0;
	position: fixed;
	inset: 0;
	overflow: hidden;
	overscroll-behavior: none;
	background: var(--bg);
	color: var(--fg);
	font: 14px/1.4 var(--font);
}
#app {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--vvh, 100dvh);
	display: flex;
	flex-direction: column;
}
header, footer { flex: none; }
footer { padding: 8px 12px; }
footer {
	color: var(--dim);
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}
footer code {
	color: var(--fg);
	user-select: all;
}
a {
	color: var(--accent);
}
#terminal {
	flex: 1;
	min-height: 0;
	padding: 0 4px;
	/* The page's 1.4 line height leaks into xterm's rows and opens dark gaps between block characters. */
	line-height: normal;
}
#keys {
	flex: none;
	display: none;
	gap: 6px;
	padding: 6px;
	overflow-x: auto;
}
#keys button {
	flex: 1 0 auto;
	min-width: 44px;
	min-height: 40px;
	background: var(--key);
	color: var(--fg);
	border: 1px solid var(--key-border);
	border-radius: 6px;
	font: inherit;
	touch-action: manipulation;
}
#keys button:active {
	background: var(--key-border);
}
@media (pointer: coarse) {
	#keys { display: flex; }
	footer { font-size: 12px; padding: 6px 10px; }
}
/* With the keyboard open every row counts; the intro and ssh line wait until it closes. */
.keyboard header, .keyboard footer { display: none; }
/* Fonts draw ▀ ▄ | a pixel short of the row, so block art shows dark lines between rows.
   Stretching each glyph 8% closes the gap; plain text looks the same. */
.xterm-rows span {
	display: inline-block;
	transform: scaleY(1.08);
}
