body {
	background: #efefef;
	overflow: hidden;
	width: 100vw;
	height: 100vh;
}

svg {
	display: block;
	width: 100vw;
	height: 100vh;
	touch-action: none;
}

button {
	cursor: pointer;
}

#hint {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	font-size: 18px;
	letter-spacing: 0.08em;
	color: #999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
}

#flash {
	position: fixed;
	inset: 0;
	background: radial-gradient(circle at 50%,
			rgba(255, 255, 255, 1),
			rgba(255, 255, 255, 0.6),
			rgba(255, 255, 255, 0));
	opacity: 0;
	pointer-events: none;
}

.cut-line {
	animation: dash-flow 0.3s linear infinite;
}

@keyframes dash-flow {
	to {
		stroke-dashoffset: -10;
	}
}

button {
	font: 13px monospace;
	padding: 6px 10px;
	cursor: pointer;
}

#controls {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: calc(100vw - 24px);
	justify-content: flex-end;
}

#controls button {
	touch-action: manipulation;
}

@media (max-width: 480px) {
	#controls {
		top: auto;
		bottom: 12px;
		right: 8px;
		left: 8px;
		justify-content: center;
	}

	#controls button {
		flex: 1 1 calc(50% - 6px);
		font-size: 12px;
		padding: 8px 6px;
	}
}

/* Metal ------------------------- */

.metal {
	outline: none;
	text-align: center;
	color: hsla(0, 0%, 20%, 1);
	text-shadow:
		hsla(0, 0%, 40%, 0.5) 0 -1px 0,
		hsla(0, 0%, 100%, 0.6) 0 2px 1px;

	background-color: hsl(0, 0%, 90%);

	transition: color 0.2s;
}

/* Linear ------------------------- */

.metal.linear {
	background-image:
		-webkit-repeating-linear-gradient(left,
			hsla(0, 0%, 100%, 0) 0%,
			hsla(0, 0%, 100%, 0) 6%,
			hsla(0, 0%, 100%, 0.1) 7.5%),
		-webkit-repeating-linear-gradient(left,
			hsla(0, 0%, 0%, 0) 0%,
			hsla(0, 0%, 0%, 0) 4%,
			hsla(0, 0%, 0%, 0.03) 4.5%),
		-webkit-repeating-linear-gradient(left,
			hsla(0, 0%, 100%, 0) 0%,
			hsla(0, 0%, 100%, 0) 1.2%,
			hsla(0, 0%, 100%, 0.15) 2.2%),
		linear-gradient(180deg,
			hsl(0, 0%, 78%) 0%,
			hsl(0, 0%, 90%) 47%,
			hsl(0, 0%, 78%) 53%,
			hsl(0, 0%, 70%) 100%);
}