/* Games section (December 2026). Loaded after /tom-site.css on /games/ pages. */
body.tmx.games-page {
	background: #0f0d17;
	color: #ece9f5;
}

.games-page main p,
.games-page main li {
	color: #c4bfd3;
}

.games-page main p a,
.games-page main li a {
	color: var(--banana);
}

.games-page h1,
.games-page h2,
.games-page h3 {
	color: #fff;
}

.games-page .sec-alt {
	background: #15121f;
}

.games-page .card {
	background: #1a1726;
	border-color: rgba(255, 255, 255, 0.09);
	box-shadow: none;
}

.games-page .card p {
	color: #b9b4c6;
}

.games-page .faq details {
	background: #1a1726;
	border-color: rgba(255, 255, 255, 0.09);
}

.games-page .faq summary::after {
	background: #2a2639;
	color: #fff;
}

.games-page .faq details[open] summary::after {
	background: var(--banana);
	color: var(--ink);
}

.games-page .faq .ans {
	color: #b9b4c6;
}

.games-page .facts {
	background: #1a1726;
	border-color: rgba(255, 255, 255, 0.09);
	border-inline-start-color: var(--banana);
}

.games-page .facts dt {
	color: #fff;
}

.games-page .facts dd {
	color: #b9b4c6;
}

.games-page .lead {
	color: #b9b4c6;
}

.games-page .gif-fig figcaption {
	color: #9a94a8;
}

.games-page .table-wrap {
	background: #1a1726;
	border-color: rgba(255, 255, 255, 0.09);
}

.games-page .table-wrap th {
	background: #221e30;
	color: #fff;
}

.games-page .table-wrap td,
.games-page .table-wrap th {
	border-color: rgba(255, 255, 255, 0.08);
}

.games-page .eyebrow {
	color: var(--banana);
}

.games-page .btn-line {
	color: #fff !important;
}

/* game stage shared by every game page */
.game-shell {
	width: min(1100px, 100% - 24px);
	margin: 0 auto;
}

.game-shell .game-title {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 28px 0 16px;
}

.game-shell .game-title h1 {
	font-size: clamp(2rem, 4.4vw, 3.2rem);
	margin: 0;
}

.game-shell .game-title p {
	margin: 0;
	color: #b9b4c6;
	max-width: 52ch;
}

/* Monkey Obby */
.obby {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: #8fd3ff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
}

.obby canvas {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	outline: none;
}

.obby:fullscreen {
	border-radius: 0;
}

.ob-hud {
	position: absolute;
	top: 12px;
	inset-inline: 12px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	pointer-events: none;
	font-family: var(--font);
}

.ob-hud div {
	background: rgba(19, 17, 28, 0.72);
	color: #fff;
	border-radius: 12px;
	padding: 6px 12px;
	font-size: 0.82rem;
	line-height: 1.2;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.ob-hud b {
	display: block;
	font-size: 1.05rem;
	font-family: var(--display);
}

.ob-hud small {
	opacity: 0.7;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.66rem;
}

.ob-tools {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	display: flex;
	gap: 8px;
}

.ob-tools button {
	background: rgba(19, 17, 28, 0.72);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 10px 12px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font);
}

.ob-toast {
	position: absolute;
	top: 22%;
	left: 50%;
	transform: translate(-50%, -10px);
	background: var(--banana);
	color: var(--ink);
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.4rem;
	padding: 10px 22px;
	border-radius: 999px;
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

.ob-toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.ob-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(19, 17, 28, 0.35), rgba(19, 17, 28, 0.8));
	padding: 20px;
}

.ob-overlay[hidden] {
	display: none;
}

.ob-panel {
	background: rgba(19, 17, 28, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 22px;
	padding: clamp(22px, 4vw, 38px);
	max-width: 520px;
	text-align: center;
	color: #fff;
}

.ob-panel h2 {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	margin-bottom: 8px;
}

.ob-panel p {
	color: #cfc9dc;
	margin-bottom: 20px;
}

.ob-panel .btn-row {
	justify-content: center;
}

.ob-keys {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	justify-content: center;
	font-size: 0.82rem;
	color: #b9b4c6;
	margin-top: 18px;
}

.ob-keys kbd {
	background: #2a2639;
	border: 1px solid #3b3650;
	border-bottom-width: 3px;
	border-radius: 6px;
	padding: 1px 7px;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: #fff;
}

.ob-stick {
	position: absolute;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	border: 2px solid rgba(255, 255, 255, 0.4);
	display: none;
	pointer-events: none;
}

.ob-stick i {
	position: absolute;
	left: 30px;
	top: 30px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
}

.ob-jump {
	position: absolute;
	inset-inline-end: 18px;
	bottom: 18px;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	border: 0;
	background: var(--banana);
	color: var(--ink);
	font-weight: 800;
	font-family: var(--font);
	display: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (hover: none) and (pointer: coarse) {
	.ob-jump {
		display: block;
	}

	.ob-keys .kb {
		display: none;
	}
}

@media (max-width: 640px) {
	.ob-hud div:nth-child(4) {
		display: none;
	}
}

/* classic game pages restyled with the new chrome */
body.tmx-legacy.games-legacy {
	background: #0f0d17;
}
