.ess {
	--ess-blue: #293D9B;
	--ess-red: #DB1F26;
	--ess-ink: #231F20;
	max-width: 480px;
	margin: 0 auto;
	font-family: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
	color: var(--ess-ink);
	background: var(--ess-blue);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(35, 31, 32, .25);
	-webkit-user-select: none;
	user-select: none;
	box-sizing: border-box;
}
.ess *, .ess *::before, .ess *::after { box-sizing: border-box; }
.ess-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: var(--ess-ink);
	color: #fff;
	border-bottom: 4px solid var(--ess-red);
}
.ess-logo { height: 14px; width: auto; display: block; }
.ess-title {
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.ess-hud {
	padding: 8px 14px 10px;
	background: #1d2d78;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	display: none;
}
.ess-playing .ess-hud { display: block; }
.ess-hud-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ess-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ess-bar { height: 6px; background: rgba(255, 255, 255, .18); border-radius: 3px; overflow: hidden; }
.ess-bar i { display: block; height: 100%; width: 100%; background: #fff; border-radius: 3px; transition: width .1s linear; }
.ess-bar i.ess-low { background: var(--ess-red); }
.ess-stage { position: relative; }
.ess-canvas {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	touch-action: none;
}
.ess-playing .ess-canvas { cursor: none; }
.ess-stage.ess-flow .ess-canvas { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-fit: cover; }
.ess-stage.ess-flow .ess-overlay { position: relative; overflow: visible; }
.ess-stage.ess-flow .ess-card { margin: 0 auto; }
.ess-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	z-index: 2;
	background: rgba(29, 45, 120, .55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}
.ess-overlay[hidden] { display: none; }
.ess-overlay.ess-clear { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.ess-overlay.ess-clear .ess-card { pointer-events: auto; }
.ess-overlay.ess-menu { align-items: flex-start; }
.ess-card {
	background: #fff;
	border-radius: 14px;
	padding: 20px 18px;
	width: 100%;
	max-width: 380px;
	margin: auto;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	border-top: 6px solid var(--ess-red);
}
.ess-card.ess-small { max-width: 300px; }
.ess .ess-card h2 { margin: 0 0 8px; font-family: inherit; font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ess-blue); }
.ess .ess-card h3 { margin: 16px 0 6px; font-family: inherit; letter-spacing: 0; text-transform: none; font-size: 16px; font-weight: 800; color: var(--ess-blue); }
.ess-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.ess-red { color: var(--ess-red); font-weight: 700; }
.ess-muted { color: #5d5a5b; font-size: 13px !important; }
.ess-prize {
	background: #fdf0f0;
	border: 1px dashed var(--ess-red);
	border-radius: 10px;
	padding: 8px 10px;
}
.ess-big { font-size: 48px; font-weight: 900; line-height: 1; color: var(--ess-red); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.ess-btn {
	display: block;
	width: 100%;
	margin: 8px 0 0;
	padding: 13px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ess-red);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .02em;
	cursor: pointer;
	transition: transform .1s ease, background .15s ease;
}
.ess-btn:hover { background: #b9161c; }
.ess-btn:active { transform: scale(.98); }
.ess-btn:disabled { opacity: .6; cursor: wait; }
.ess-btn.ess-alt { background: var(--ess-blue); }
.ess-btn.ess-alt:hover { background: #1f2f7c; }
.ess-btn:focus-visible, .ess-link:focus-visible, .ess-done:focus-visible { outline: 3px solid #ffd34d; outline-offset: 2px; }
.ess-fb { background: #1877F2; }
.ess-fb:hover { background: #0f63d1; }
.ess-share { display: flex; gap: 8px; }
.ess-share .ess-btn { flex: 1; font-size: 13px; padding: 12px 8px; white-space: nowrap; }
.ess-link {
	display: inline-block;
	margin-top: 12px;
	background: none;
	border: 0;
	color: var(--ess-blue);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}
.ess-done, .ess-mute {
	position: absolute;
	top: 10px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}
.ess-done {
	right: 10px;
	padding: 8px 14px;
	background: #fff;
	color: var(--ess-red);
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	display: none;
}
.ess-playing .ess-done, .ess-playing .ess-mute { display: block; }
.ess-mute { top: auto; bottom: 10px; left: 10px; display: none; width: 36px; height: 36px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 16px; }
.ess-intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: #fff;
	text-align: center;
	background: rgba(35, 31, 32, .82);
	padding: 16px 22px;
	border-radius: 14px;
	animation: ess-pop .35s ease-out;
}
.ess-intro small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
.ess-intro strong { font-size: 24px; font-weight: 900; }
.ess-intro span { font-size: 13px; color: #ffb3b5; font-weight: 600; }
@keyframes ess-pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ess-form { text-align: left; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6e6ea; }
.ess-form label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.ess-form input[type="text"], .ess-form input:not([type]), .ess-form input[type="email"] {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 10px 12px;
	border: 2px solid #d5d7e3;
	border-radius: 10px;
	font: inherit;
	font-size: 16px;
	color: var(--ess-ink);
	background: #fff;
	-webkit-user-select: text;
	user-select: text;
}
.ess-form input:focus { outline: none; border-color: var(--ess-blue); }
.ess-check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 500 !important; line-height: 1.35; }
.ess-check input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--ess-red); }
.ess .ess-check a { color: var(--ess-blue); }
.ess-error { color: var(--ess-red); font-weight: 700; }
.ess-ok { margin-top: 12px !important; background: #eef1fb; border-radius: 10px; padding: 10px; font-weight: 700; color: var(--ess-blue); }
.ess-board { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 6px; }
.ess-board th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5d5a5b; text-align: left; padding: 4px 6px; border-bottom: 2px solid var(--ess-ink); }
.ess-board td { padding: 7px 6px; border-bottom: 1px solid #ececf1; text-align: left; }
.ess-board td:first-child, .ess-board th:first-child { width: 32px; text-align: center; }
.ess-board td:last-child, .ess-board th:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.ess-board tr.ess-me td { background: #fdf0f0; color: var(--ess-red); font-weight: 800; }
.ess-foot { padding: 10px 16px 14px; color: rgba(255, 255, 255, .85); font-size: 12px; text-align: center; }
.ess-foot:empty { display: none; }
.ess .ess-foot a { color: #fff; }

/* ---------- full-screen mode ---------- */
.ess.ess-fs {
	position: fixed;
	inset: 0;
	z-index: 99999;
	max-width: none;
	width: 100%;
	height: 100%;
	height: 100dvh;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	background: var(--ess-ink);
	padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
	overscroll-behavior: none;
}
.ess-fs .ess-head { flex: none; padding: 10px 16px; }
.ess-fs .ess-home { display: block; line-height: 0; }
.ess-fs .ess-logo { height: 15px; }
.ess-fs .ess-title { flex: 1; text-align: right; }
.ess-fsbtn {
	flex: none;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.ess-fsbtn:hover { background: rgba(255, 255, 255, .12); }
.ess-fs .ess-hud { flex: none; }
.ess-fs .ess-hud-inner, .ess-fs .ess-hud > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.ess-fs .ess-stage {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: linear-gradient(180deg, #1d2d78 0%, var(--ess-blue) 100%);
}
.ess-fs .ess-canvas { flex: none; aspect-ratio: auto; max-width: 100%; }
.ess-fs .ess-overlay { align-items: flex-start; }
.ess-fs .ess-overlay.ess-clear { align-items: center; }
.ess-fs .ess-foot { flex: none; padding: 6px 16px 8px; background: var(--ess-ink); }
@media (min-width: 700px) {
	.ess-fs .ess-head { padding: 14px 28px; }
	.ess-fs .ess-logo { height: 18px; }
	.ess-fs .ess-title { font-size: 17px; }
	.ess-fs .ess-done { right: 24px; top: 20px; font-size: 16px; padding: 10px 18px; }
	.ess-fs .ess-mute { left: 24px; bottom: 20px; }
}
/* Short landscape phones: give every pixel to the game. */
@media (max-height: 520px) {
	.ess-fs .ess-head, .ess-fs .ess-foot { display: none; }
	.ess-fs .ess-hud { padding: 6px 12px; }
}
html.ess-fs-lock, html.ess-fs-lock body { overflow: hidden; height: 100%; overscroll-behavior: none; }

/* ---------- booking call-out & site link ---------- */
.ess-book {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin: 6px 0 14px;
	padding: 14px;
	border-radius: 12px;
	background: var(--ess-ink);
	color: #fff;
	text-align: left;
	box-shadow: inset 0 -4px 0 var(--ess-red);
}
.ess-book-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.ess-book-text strong { font-size: 20px; font-weight: 900; line-height: 1.15; }
.ess-book-text span { font-size: 12.5px; line-height: 1.35; opacity: .85; }
.ess .ess-book-btn {
	display: block;
	text-align: center;
	padding: 14px 16px;
	border-radius: 999px;
	background: var(--ess-red);
	color: #fff;
	font-weight: 900;
	font-size: 17px;
	text-decoration: none;
	animation: ess-pulse 1.8s ease-in-out infinite;
}
.ess .ess-book-btn:hover { background: #b9161c; color: #fff; }
@keyframes ess-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .ess .ess-book-btn { animation: none; } }
.ess-actions { display: flex; gap: 8px; margin-top: 6px; }
.ess-actions .ess-btn { flex: 1; font-size: 14px; padding: 12px 8px; }
.ess-btn.ess-ghost { background: transparent; color: var(--ess-blue); box-shadow: inset 0 0 0 2px var(--ess-blue); }
.ess-btn.ess-ghost:hover { background: #eef1fb; }
.ess .ess-btn.ess-site {
	display: block;
	text-decoration: none;
	text-align: center;
	background: var(--ess-ink);
	color: #fff;
	margin-top: 10px;
}
.ess .ess-btn.ess-site:hover { background: #000; color: #fff; }

/* ---------- prize small print & built-in terms ---------- */
.ess-small-print { display: block; margin-top: 4px; font-size: 12px; color: #5d5a5b; }
.ess .ess-small-print a { color: var(--ess-blue); }
.ess-overlay.ess-terms { z-index: 4; position: absolute; inset: 0; background: rgba(35, 31, 32, .7); align-items: flex-start; }
.ess-terms-card { text-align: left; }
.ess-terms-card h2 { text-align: center; }
.ess-terms-card ol { margin: 6px 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.ess-terms-card li { margin-bottom: 6px; }

/* "Your friend scored..." on a shared score link */
.ess-challenge{margin:.6em auto;padding:.55em .9em;max-width:22em;background:#fff3f3;border:2px dashed #DB1F26;border-radius:12px;color:#231F20;font-weight:700}
.ess-challenge strong{color:#DB1F26;font-weight:900}
