html {
	width: 100%;
	height: 100%;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	background: linear-gradient(165deg, #e8ffe8 0%, #ffffff 45%, #f3fff3 100%);
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;

	font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	color: #444;
}

button {
	background: #0f7a32;
	color: #fff;
	border: 0;
	padding: 10px 30px;
	border-radius: 10px;
	box-shadow: 0 4px 0 #0a5c25;

	font-size: 1.5em;
	font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-weight: 700;
	cursor: pointer;
}
	.button:hover,
	button:hover {
		background: #0a5c25;
		color: #fff;
	}

a {
	color: #333;
	text-decoration: none;
}
	a:hover {
		color: #444;
	}
.clear {
	clear: both;
}

.container {
	position: relative;
	z-index: 100;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.container #start,
.container #controls,
.container .footer,
.container #tip {
	pointer-events: auto;
}

#stage {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	display: block;
}

#tip {
	position: absolute;
	left: 0;
	right: 0;
	top: 100px;
	margin: 0;

	color: #999;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 2px;
}

#start {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -55%);
	width: min(92vw, 560px);
	max-height: 90vh;
	overflow: auto;
	margin: 0;
	padding: 8px 12px;
	text-align: center;
	box-sizing: border-box;
	z-index: 120;
}
	#start h2 {
		font-size: clamp(1.1rem, 3.5vw, 1.8rem);
		margin: 0 0 10px 0;
		line-height: 1.25;
	}
	#start p {
		margin: 0 0 8px 0;
		font-size: clamp(0.85rem, 2.4vw, 1rem);
		line-height: 1.35;
	}
	#start br {
		display: none;
	}

#controls {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 130;
	max-width: 28vw;
}
	#controls .opt {
		padding-top: 8px;
	}
	#controls .opt label {
		margin-top: 6px;
		cursor: pointer;
	}

#score {
	font-size: clamp(28px, 6vw, 50px);
	line-height: 1;
	text-align: center;
	margin: 0;
}

#notice {
	position: absolute;
	right: 0;
	top: 18%;
	left: 0;
	z-index: 1;
	font-size: clamp(2rem, 8vw, 5em);
	text-align: center;
	color: #ccc;
	display: none;
	pointer-events: none;
}

#stats {
	text-align: center;
	list-style-type: none;
	margin: 16px 0;
	padding: 0;
}
	#stats li {
		border: 1px solid #444;
		margin-bottom: 10px;
		border-radius: 3px;
	}
	#stats h1 {
		margin: 0;
		padding: 4px 6px;
		font-size: clamp(14px, 3vw, 22px);
	}
	#stats label {
		background: #444;
		color: #fff;
		font-size: 10px;
		padding: 4px;
		display: block;
		text-transform: uppercase;
	}

#controls .pause {
	margin-top: 20px;
	font-size: 11px;
	text-align: center;
}

.footer {
	position: fixed;
	bottom: 8px;
	left: 10px;
	text-align: center;
	z-index: 130;
	font-size: 12px;
}

/* Compact landscape layout for phones */
@media (orientation: landscape) {
	#start {
		top: 50%;
		transform: translate(-50%, -50%);
		width: min(70vw, 520px);
		max-height: 88vh;
		padding: 4px 10px;
	}
	#start h2 {
		font-size: clamp(1rem, 2.8vw, 1.35rem);
		margin-bottom: 6px;
	}
	#start p {
		font-size: clamp(0.75rem, 1.8vw, 0.9rem);
		margin-bottom: 4px;
	}
	#start button,
	button {
		font-size: 1.15em;
		padding: 6px 22px;
	}

	#controls {
		top: 6px;
		right: 6px;
		max-width: 22vw;
		transform: scale(0.88);
		transform-origin: top right;
	}
	#score {
		font-size: clamp(22px, 4.5vw, 36px);
	}
	#stats {
		margin: 8px 0;
	}
	#stats li {
		margin-bottom: 6px;
	}
	#stats h1 {
		padding: 2px 4px;
		font-size: clamp(12px, 2.2vw, 18px);
	}
	#stats label {
		font-size: 9px;
		padding: 3px;
	}
	#controls .opt {
		padding-top: 4px;
	}
	#tip {
		top: 48px;
		font-size: 0.85rem;
	}
	#notice {
		top: 12%;
		font-size: clamp(1.6rem, 6vw, 3em);
	}
	.footer {
		bottom: 4px;
		font-size: 11px;
	}
}

@media (orientation: landscape) and (max-height: 420px) {
	#start {
		max-height: 96vh;
	}
	#start p:nth-of-type(3) {
		display: none;
	}
	#controls {
		transform: scale(0.78);
	}
}
