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

html,
body {
	height: 100%;
	background: #03030c;
	overflow: hidden;
}

body {
	-webkit-font-smoothing: antialiased;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	overscroll-behavior: none;
}

canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	touch-action: none;
}

/* Scanlines over everything */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 10;
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, var(--scan, .22)) 0, rgba(0, 0, 0, var(--scan, .22)) 1px, transparent 1px, transparent 3px);
}

/* Pixel art cursors everywhere, never the system one (hidden while playing) */
*,
*::before,
*::after {
	cursor: url("../img/cursor.svg") 0 0, default !important;
}

a,
button,
.hit,
input[type="range"],
input[type="checkbox"],
input[type="color"],
label {
	cursor: url("../img/cursor-pointer.svg") 9 0, pointer !important;
}

.hit.back,
button:disabled {
	cursor: url("../img/cursor.svg") 0 0, default !important;
}

html.playing,
html.playing *,
html.playing *::before,
html.playing *::after {
	cursor: none !important;
}

/* Visually hidden, still read by screen readers */
.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Invisible hit areas over the pixel button, link, coin box, sound and info icons */
.hit {
	position: fixed;
	z-index: 5;
	display: none;
	color: transparent;
	font-size: 0;
	border: 0;
	background: none;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.hit.on {
	display: block;
}

/* Covers the whole screen while "How to play" is open, so any click closes it */
#hitInfoClose {
	z-index: 7;
}

/* Phone held sideways: nothing on the page can be tapped (the canvas shows "play in portrait") */
html.rotate .hit {
	display: none !important;
}

/* No text selection, magnifier, callout or double-tap zoom on long presses (iPhone, iPad) */
*,
*::before,
*::after {
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
}

a,
button,
.hit {
	touch-action: manipulation;
}

/* Leaderboard tag entry: a real (invisible) text field over the letter slots, so phones get a keyboard */
.tag-input {
	position: fixed;
	z-index: 9;
	display: none;
	opacity: 0;
	border: 0;
	padding: 0;
	background: transparent;
	color: transparent;
	caret-color: transparent;
	font-size: 16px; /* 16px or more: iOS doesn't zoom in on focus */
	outline: none;
	-webkit-user-select: text;
	user-select: text;
}

.tag-input.on {
	display: block;
}
