:root {
	--bg: #07080d;
	--ink: #e8eef6;
	--muted: #8a96a8;
	--ice: #9bd7ff;
	--amber: #f0c36a;
	--danger: #ff8b6b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
	height: 100%;
	background: var(--bg);
	color: var(--ink);
	font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
	overflow: hidden;
	-webkit-user-select: none;
	user-select: none;
	touch-action: none;
}

#sky {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

#ui {
	position: fixed;
	inset: 0;
	pointer-events: none;
	display: flex;
	flex-direction: column;
}

#ui button, #ui .pad {
	pointer-events: auto;
	font-family: inherit;
}

.overlay {
	margin: auto;
	text-align: center;
	padding: 24px 20px 32px;
	max-width: 420px;
}

.brand {
	letter-spacing: 0.42em;
	font-size: 13px;
	color: var(--ice);
	text-transform: uppercase;
}

h1 {
	font-weight: 400;
	font-size: clamp(42px, 8vw, 72px);
	letter-spacing: 0.18em;
	margin: 10px 0 8px;
}

.lede {
	color: var(--muted);
	font-size: 16px;
	line-height: 1.45;
	margin-bottom: 28px;
}

.row {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

button {
	appearance: none;
	border: 1px solid rgba(155, 215, 255, 0.35);
	background: rgba(9, 14, 24, 0.72);
	color: var(--ink);
	padding: 12px 22px;
	font-size: 16px;
	letter-spacing: 0.08em;
	cursor: pointer;
	border-radius: 2px;
}

button:hover, button:focus-visible {
	border-color: var(--ice);
	color: var(--ice);
	outline: none;
}

button.ghost {
	border-color: rgba(232, 238, 246, 0.18);
	color: var(--muted);
}

.hud {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 14px 18px;
	font-variant-numeric: tabular-nums;
	font-size: 14px;
	color: var(--muted);
	text-shadow: 0 1px 8px #07080d;
}
.hud > div:last-child { text-align: right; white-space: nowrap; }

.hud b { color: var(--ink); font-weight: 400; }
.hud .ok { color: var(--ice); }
.hud .warn { color: var(--amber); }
.hud .bad { color: var(--danger); }

.hint {
	margin-top: auto;
	padding: 12px 18px 20px;
	text-align: center;
	color: var(--muted);
	font-size: 14px;
}

.controls {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0 16px 22px;
	gap: 16px;
}

.stick-wrap {
	width: 118px;
	height: 118px;
	pointer-events: auto;
}

.stick-base {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px solid rgba(155, 215, 255, 0.25);
	background: rgba(7, 8, 13, 0.35);
	position: relative;
}

.stick-knob {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(155, 215, 255, 0.85);
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.btn-col {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 112px;
}

.win {
	margin: auto;
	text-align: center;
	padding: 24px;
}

.win h2 {
	font-weight: 400;
	letter-spacing: 0.14em;
	font-size: 28px;
	margin-bottom: 8px;
}

@media (min-width: 720px) {
	.controls.touch-only { display: none; }
}
