/*
 * dbi services · Neve Child Theme
 * eggs/snake/snake.css — Snake, the Nokia 3310 way (eggs/snake/snake.php,
 * eggs/snake/snake.js, enhancements #53).
 *
 * The console's black glass holds a phone: a dark grey body with
 * rounded corners, the pale green-grey backlit screen with dark
 * pixels, the score line on top in a bold mono, a brand line under
 * the screen. The canvas is 84×48 and scales with crisp pixels. The
 * message card (ready, paused, game over) sits over the field in the
 * screen's own colours. Above every egg toast and the status card.
 *
 * Under prefers-reduced-motion nothing here animates (the game's own
 * tick is slowed in the script).
 *
 * Removing snake.php's require in eggs/eggs.php unloads this file.
 */

html.dbi-snake-open {
	overflow: hidden;
}

.dbi-snake {
	--snake-glass: #0a0d0b;
	--snake-body:  #2b2f33;
	--snake-edge:  #3d4349;
	--snake-lcd:   #b7cc9b;
	--snake-ink:   #1c2a1c;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var( --snake-glass );
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
	outline: none;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
}

.dbi-snake-esc {
	position: absolute;
	top: 16px;
	right: 16px;
	margin: 0;
	padding: 4px 10px;
	border: 1px solid rgba( 125, 255, 143, .32 );
	border-radius: 4px;
	background: transparent;
	color: var( --teal, #00AAA0 );
	font: 13px/1.4 inherit;
	font-family: inherit;
	cursor: pointer;
}
.dbi-snake-esc:hover {
	border-color: var( --teal, #00AAA0 );
}
.dbi-snake-esc:focus-visible,
.dbi-snake:focus-visible {
	outline: 2px solid var( --teal, #00AAA0 );
	outline-offset: 2px;
}

.dbi-snake-phone {
	width: min( 100%, 640px );
	padding: 22px 22px 18px;
	border-radius: 28px;
	background: var( --snake-body );
	box-shadow: inset 0 0 0 2px var( --snake-edge ), 0 30px 60px rgba( 0, 0, 0, .6 );
}

.dbi-snake-screen {
	position: relative;
	padding: 10px 12px 12px;
	border-radius: 6px;
	background: var( --snake-lcd );
	color: var( --snake-ink );
	box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, .25 ), inset 0 6px 18px rgba( 0, 0, 0, .18 );
}

.dbi-snake-hud {
	display: flex;
	justify-content: space-between;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.dbi-snake-canvas {
	display: block;
	width: 100%;
	aspect-ratio: 7 / 4;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.dbi-snake-msg {
	position: absolute;
	top: 32px;
	right: 12px;
	bottom: 12px;
	left: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	margin: 0;
	background: rgba( 183, 204, 155, .92 );
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
}
.dbi-snake-msg[hidden] {
	display: none;
}
.dbi-snake-msg p {
	margin: 0;
}
.dbi-snake-msg .dbi-snake-title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .04em;
	margin-bottom: 4px;
}

.dbi-snake-brand {
	margin-top: 12px;
	text-align: center;
	font-size: 12px;
	letter-spacing: .3em;
	color: #9aa3ab;
}

.dbi-snake-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	clip-path: inset( 50% );
	white-space: nowrap;
}

@media ( max-width: 480px ) {
	.dbi-snake-phone {
		padding: 14px 12px 12px;
		border-radius: 20px;
	}
	.dbi-snake-msg {
		font-size: 13px;
	}
	.dbi-snake-msg .dbi-snake-title {
		font-size: 18px;
	}
}
