:root {
	color-scheme: dark;
	--background: #0a0a0a;
	--surface: #181818;
	--text: #eeeeee;
	--muted: #999999;
}

* {
	box-sizing: border-box;
}

body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	color: var(--text);
	background: #121212;
	font-family: 'Inconsolata', monospace;
	--corner-art-size: clamp(4px, 0.7vw, 8px);
}

.app {
	width: min(100%, 680px);
	display: grid;
	gap: 12px;
	justify-items: center;
}

.ascii-logo {
	position: fixed;
	top: 17px;
	left: 24px;
	z-index: 2;
	margin: 0;
	color: #c0c0c0;
	font-size: calc(var(--corner-art-size) * 1.35);
	line-height: 0.9;
	white-space: pre;
	user-select: none;
}

.ascii-art-right {
	position: fixed;
	top: 17px;
	right: 10px;
	z-index: 2;
	width: min(32vw, 476px);
	margin: 0;
	color: #c0c0c0;
	user-select: none;
}

.ascii-social-art {
	max-width: 100%;
	margin: 0 0 10px;
	overflow: hidden;
	color: inherit;
	font-size: clamp(4px, 0.45vw, 6px);
	line-height: 0.9;
	white-space: pre;
}

.social-blocks {
	display: grid;
	justify-items: end;
	gap: 1em;
	width: min(32vw, 476px);
}

.social-blocks a {
	display: block;
	color: #c0c0c0;
	text-decoration: none;
	transition: color 160ms ease, filter 160ms ease;
}

.social-blocks a:hover,
.social-blocks a:focus-visible {
	color: #f0f0f0;
	filter: drop-shadow(0 0 6px rgba(220, 220, 220, 0.45));
	outline: none;
}

.social-blocks pre {
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	font-size: calc(var(--corner-art-size) * 0.52);
	line-height: 0.9;
	white-space: pre;
}

.ascii-art-right > .ascii-social-art,
.ascii-art-right > .social-links {
	display: none;
}

.social-links {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 5px 12px;
}

.social-links a {
	color: #909090;
	font-size: clamp(8px, 0.85vw, 11px);
	text-decoration: none;
	transition: color 160ms ease, text-shadow 160ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
	color: #f0f0f0;
	text-shadow: 0 0 8px rgba(220, 220, 220, 0.45);
	outline: none;
}

.social-links strong {
	color: #c0c0c0;
	font-weight: 400;
}

.toolbar {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

h1 {
	margin: 0;
	font-size: clamp(20px, 4vw, 32px);
	font-weight: 600;
}

.controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	color: var(--muted);
}

button,
label {
	border: 1px solid rgba(238, 238, 238, 0.35);
	border-radius: 4px;
	padding: 7px 10px;
	color: inherit;
	background: rgba(24, 24, 24, 0.8);
	font: inherit;
}

button {
	cursor: pointer;
}

button:hover,
button[aria-pressed='true'] {
	border-color: var(--text);
	color: var(--text);
}

label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

input[type='range'] {
	accent-color: #eeeeee;
	width: 90px;
}

.file-control {
	cursor: pointer;
}

.file-control input {
	width: 0;
	max-width: 0;
	opacity: 0;
}

#output {
	width: min(92vw, 680px);
	margin: 0;
	padding: clamp(12px, 3vw, 30px);
	overflow: hidden;
	border-radius: 50%;
	color: var(--text);
	background: transparent;
	filter: drop-shadow(0 0 5px rgba(210, 210, 210, 0.28))
		drop-shadow(0 0 12px rgba(210, 210, 210, 0.12));
	font-size: clamp(7px, 1.35vw, 13px);
	line-height: 0.9;
	letter-spacing: 0;
	text-align: center;
	text-rendering: optimizeSpeed;
	user-select: none;
	white-space: pre;
	cursor: grab;
	touch-action: none;
}

#output .ocean {
	color: #505050;
}

#output .continent {
	color: #c0c0c0;
}

#output:active {
	cursor: grabbing;
}

.telemetry {
	width: min(92vw, 680px);
	color: #909090;
	font-size: clamp(8px, 1.1vw, 11px);
	letter-spacing: 0.06em;
	text-align: center;
}

.telemetry-rule {
	margin: 0 0 8px;
	color: #606060;
	font-size: 0.8em;
	letter-spacing: 0.28em;
	overflow: hidden;
	white-space: nowrap;
}

.telemetry-row {
	display: flex;
	justify-content: center;
	gap: clamp(12px, 4vw, 40px);
	flex-wrap: wrap;
}

.telemetry-values {
	margin-top: 6px;
	color: #707070;
	font-size: 0.9em;
}

.hint {
	margin: 0;
	color: var(--muted);
	text-align: center;
}

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

	.toolbar {
		justify-content: center;
	}

	.controls {
		justify-content: center;
	}

	.file-control {
		display: none;
	}

	.ascii-art-right {
		top: 17px;
		right: 10px;
		width: min(32vw, 294px);
		margin: 0;
		padding: 0;
	}

	.ascii-social-art {
		font-size: clamp(3px, 1.05vw, 5px);
	}

	.social-links {
		justify-content: center;
		gap: 8px 14px;
	}

	.social-blocks {
		width: 100%;
		justify-items: center;
		padding-bottom: 2px;
	}

	.social-blocks pre {
		font-size: calc(var(--corner-art-size) * 0.52);
	}
}
