html {
	background: #171415;
}

body {
	margin: 0;
	padding: 0;
	background-color: #171415;
	overflow: hidden;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body,
canvas,
div {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	-khtml-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.seo-hidden {
	display: none;
}

#loadingImg,
.game-loading {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	background: #14161c;
	box-sizing: border-box;
}

.game-loading-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

.game-loading-orb {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 3px solid rgba(90, 200, 160, 0.22);
	border-top-color: #5ac8a0;
	animation: gameLoadingSpin 0.75s linear infinite;
}

.game-loading-label {
	margin: 0;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(167, 176, 189, 0.9);
}

@keyframes gameLoadingSpin {
	to { transform: rotate(360deg); }
}

#share-guide {
	display: none;
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	background-image: url(../share-guide.png);
	background-repeat: no-repeat;
	background-position: 90% 20px;
	-webkit-background-size: 40px 80px;
	background-size: 40px 80px;
	color: #fff;
	z-index: 80;
}

#share-guide p {
	margin: 0;
	padding: 30px 80px 30px;
	text-align: right;
	font-size: 20px;
	line-height: 1.5;
}

#share-guide .em {
	color: #ff734d;
}

.game-html-intro {
	position: static;
	display: block;
	margin: 0;
	max-width: 100%;
	padding: 0;
	box-sizing: border-box;
	color: #a7b0bd;
	font-size: 0.92em;
	line-height: 1.55;
	text-align: center;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.game-html-intro.is-hidden {
	display: none !important;
}

.game-html-intro h1 {
	margin: 0 0 0.625em;
	font-size: clamp(1.2em, 1.35em, 1.45em);
	line-height: 1.3;
	color: #f4f7fa;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.game-html-howto {
	margin: 0;
	width: 100%;
	color: #c5ccd6;
	font-size: clamp(1em, 1.2em, 1.4em);
	line-height: 1.55;
	text-align: center;
}

.game-html-seo {
	margin: 0;
	color: #8e97a5;
	font-size: 0.82em;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.game-html-stack--start {
	width: min(21.25em, 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

#game-ui-start .game-html-start-above {
	flex: 1.08 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-height: 0;
}

#game-ui-start .game-html-start-gap {
	flex: 1 1 0;
	width: 100%;
	min-height: 0.75em;
	pointer-events: none;
}

#game-ui-start .game-html-intro {
	flex: 0 0 auto;
	width: 100%;
	padding-top: 0.125em;
}

#game-ui-start .game-html-howto {
	flex: 0 0 auto;
	max-width: 100%;
}

#game-ui-start .game-html-actions {
	flex: 0 0 auto;
	height: auto;
	width: 100%;
	padding: 0;
	margin-top: clamp(3.125em, 20%, 6.25em);
	box-sizing: border-box;
}

#game-ui-start .game-html-actions::before,
#game-ui-start .game-html-actions::after {
	display: none;
}

#game-ui-start .game-html-start-below {
	flex: 0.92 1 0;
	width: 100%;
	min-height: 0;
	pointer-events: none;
}

/* Overlays sync to #Cocos2dGameContainer (design 480×800) via --game-ui-scale */
.game-html-overlay {
	--game-ui-scale: 1;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 40;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 1em 1.25em;
	box-sizing: border-box;
	background: rgba(10, 12, 18, 0.52);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	font-size: calc(16px * var(--game-ui-scale));
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.game-html-overlay.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.game-html-stack {
	width: min(18.75em, 100%);
	height: 100%;
	display: grid;
	grid-template-rows: 1fr 1fr;
	align-items: stretch;
	justify-items: center;
	gap: 0;
	transform: translateY(0.5em);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-html-overlay.is-open .game-html-stack {
	transform: translateY(0);
}

.game-html-copy {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.625em;
	padding: 0 0 0.5em;
	box-sizing: border-box;
	text-align: center;
}

#game-ui-end .game-html-copy {
	justify-content: center;
	gap: 0.75em;
	padding: 0 0 8%;
}

.game-html-title {
	margin: 0;
	max-width: 100%;
	font-size: clamp(1.35em, 1.5em, 1.65em);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.25;
	color: #f4f7fa;
	text-align: center;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.game-html-score-label {
	margin: 0;
	font-size: clamp(0.95em, 1em, 1.05em);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(244, 247, 250, 0.72);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.game-html-score {
	margin: 0;
	position: relative;
	font-size: clamp(3.6em, 4em, 4.6em);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: #6fe3b4;
	text-shadow:
		0 0 1.5em rgba(90, 200, 160, 0.45),
		0 0.375em 1.375em rgba(90, 200, 160, 0.35),
		0 0.125em 0 rgba(16, 20, 26, 0.35);
	animation: game-score-pop 0.42s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

@keyframes game-score-pop {
	from {
		opacity: 0;
		transform: scale(0.72) translateY(0.625em);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.game-html-best,
.game-html-desc {
	margin: 0;
	max-width: 100%;
	font-size: 0.95em;
	line-height: 1.5;
	color: #a7b0bd;
	text-align: center;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.game-html-best:empty {
	display: none;
}

.game-html-actions {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 1em;
	margin-top: 0;
	padding: 0;
	box-sizing: border-box;
}

.game-html-actions::before {
	content: '';
	flex: 0.28 1 0;
	width: 100%;
	pointer-events: none;
}

.game-html-actions::after {
	content: '';
	flex: 1.72 1 0;
	width: 100%;
	pointer-events: none;
}

.game-html-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: min(12.5em, 100%);
	min-height: 3em;
	padding: 0 1.125em;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: clamp(1.2em, 1.4em, 1.6em);
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	transform: translateZ(0);
	transition:
		transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.18s ease,
		background-color 0.18s ease,
		box-shadow 0.22s ease;
}

.game-html-btn:hover {
	transform: translateY(-2px) scale(1.03);
}

.game-html-btn:active {
	transform: translateY(1px) scale(0.96);
	filter: brightness(0.96);
	transition-duration: 0.08s;
}

.game-html-btn:focus-visible {
	box-shadow: 0 0 0 0.1875em rgba(244, 247, 250, 0.35);
}

.game-html-btn.primary {
	background: #5ac8a0;
	color: #10141a;
	box-shadow: 0 0.625em 1.75em rgba(90, 200, 160, 0.3);
}

.game-html-btn.primary:hover {
	filter: brightness(1.06);
	box-shadow: 0 0.875em 2.125em rgba(90, 200, 160, 0.42);
}

.game-html-btn.primary:active {
	box-shadow: 0 0.25em 0.875em rgba(90, 200, 160, 0.28);
}

.game-html-btn.secondary {
	background: rgba(255, 255, 255, 0.14);
	color: #f4f7fa;
	box-shadow: 0 0.375em 1.125em rgba(0, 0, 0, 0.18);
}

.game-html-btn.secondary:hover {
	background: rgba(255, 255, 255, 0.22);
	box-shadow: 0 0.625em 1.5em rgba(0, 0, 0, 0.24);
}

.game-html-btn.secondary:active {
	background: rgba(255, 255, 255, 0.16);
	box-shadow: 0 0.1875em 0.625em rgba(0, 0, 0, 0.2);
}

@media (hover: none) {
	.game-html-btn:hover {
		transform: none;
		filter: none;
	}
	.game-html-btn.primary:hover {
		box-shadow: 0 0.625em 1.75em rgba(90, 200, 160, 0.3);
	}
	.game-html-btn.secondary:hover {
		background: rgba(255, 255, 255, 0.14);
		box-shadow: 0 0.375em 1.125em rgba(0, 0, 0, 0.18);
	}
}
