/**
 * Table Tennis — top toolbar + playfield (Game Anything embed)
 */
.ga-casual-scope#tt-app {
	box-sizing: border-box;
	font-family: 'DM Sans', system-ui, sans-serif;
	padding: 0;
}

.ga-casual-scope#tt-app .tt-gamebox#gamebox,
.ga-casual-scope#tt-app #gamebox.tt-gamebox {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	position: relative;
	font-size: 14px;
	color: #e2e8f0;
	background: linear-gradient(165deg, #0f172a 0%, #020617 48%, #0c1222 100%);
	border-radius: 0;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		0 0 0 1px rgba(15, 23, 42, 0.8),
		0 24px 48px rgba(0, 0, 0, 0.45);
	/* Match Wall Smash / Sky Shooter stack (~549px = 768×5/7 play target + toolbar pattern) */
	min-height: 549px;
}

/* ----- Top toolbar ----- */
.ga-casual-scope#tt-app .tt-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 14px 16px;
	background: rgba(2, 6, 23, 0.65);
	border-bottom: 1px solid rgba(52, 211, 153, 0.12);
	backdrop-filter: blur(8px);
}

.ga-casual-scope#tt-app .tt-toolbar__block {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.ga-casual-scope#tt-app .tt-toolbar__difficulty {
	flex: 1 1 auto;
	min-width: min(100%, 220px);
}

.ga-casual-scope#tt-app .tt-toolbar__mid {
	flex: 1 1 auto;
	justify-content: center;
	min-width: min(100%, 200px);
}

.ga-casual-scope#tt-app .tt-toolbar__score {
	flex: 0 0 auto;
	justify-content: flex-end;
}

.ga-casual-scope#tt-app .tt-toolbar__label {
	display: block;
	width: 100%;
	flex-basis: 100%;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 2px;
}

@media (min-width: 640px) {
	.ga-casual-scope#tt-app .tt-toolbar__difficulty .tt-toolbar__label {
		display: none;
	}

	.ga-casual-scope#tt-app .tt-toolbar__difficulty::before {
		content: 'Difficulty';
		font-size: 10px;
		font-weight: 700;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: #64748b;
		align-self: center;
		margin-right: 4px;
	}
}

.ga-casual-scope#tt-app .tt-difficulty.grade {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	height: auto;
	margin: 0;
	padding: 4px;
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.12);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ga-casual-scope#tt-app .grade .newGrade {
	float: none;
	width: auto;
	min-width: 4.5rem;
	padding: 8px 14px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	border-radius: 10px;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.12s ease;
	user-select: none;
}

.ga-casual-scope#tt-app .grade .easy,
.ga-casual-scope#tt-app .grade .medium,
.ga-casual-scope#tt-app .grade .hard {
	float: none;
	margin: 0;
}

.ga-casual-scope#tt-app .newGrade.bgDefault {
	color: #94a3b8;
	background: rgba(30, 41, 59, 0.5);
	border: 1px solid rgba(148, 163, 184, 0.14);
	box-shadow: none;
}

.ga-casual-scope#tt-app .newGrade.bgDefault:hover {
	color: #e2e8f0;
	background: rgba(51, 65, 85, 0.55);
	border-color: rgba(148, 163, 184, 0.28);
}

.ga-casual-scope#tt-app .newGrade.bgClick {
	color: #022c22;
	background: linear-gradient(165deg, #34d399 0%, #10b981 55%, #059669 100%);
	border: 1px solid rgba(52, 211, 153, 0.5);
	box-shadow:
		0 0 0 1px rgba(16, 185, 129, 0.25),
		0 4px 14px rgba(16, 185, 129, 0.28);
}

/* ----- Actions ----- */
.ga-casual-scope#tt-app .tt-voice#voiceImg,
.ga-casual-scope#tt-app #voiceImg.tt-voice {
	position: relative;
	left: auto;
	top: auto;
	display: block;
	width: 40px;
	height: 40px;
	padding: 4px;
	border-radius: 12px;
	cursor: pointer;
	z-index: 2;
	background: rgba(30, 41, 59, 0.65);
	border: 1px solid rgba(148, 163, 184, 0.14);
	box-sizing: border-box;
	transition:
		border-color 0.18s ease,
		background 0.18s ease,
		transform 0.12s ease;
	object-fit: contain;
}

.ga-casual-scope#tt-app #voiceImg:hover {
	border-color: rgba(52, 211, 153, 0.35);
	background: rgba(51, 65, 85, 0.75);
	transform: scale(1.04);
}

.ga-casual-scope#tt-app .pauseAndNew.tt-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	height: auto;
}

.ga-casual-scope#tt-app .pauseAndNew > span {
	float: none;
	width: auto;
	min-width: 5.5rem;
	padding: 9px 16px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	border-radius: 10px;
	text-align: center;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.12s ease;
	user-select: none;
	box-sizing: border-box;
}

.ga-casual-scope#tt-app .pauseAndNew > span:first-child,
.ga-casual-scope#tt-app .pauseAndNew > span:last-child {
	float: none;
}

/* Pause / Continue — matches toolbar accent */
.ga-casual-scope#tt-app #go.pause,
.ga-casual-scope#tt-app span.pause {
	color: #022c22;
	background: linear-gradient(165deg, #5eead4 0%, #14b8a6 50%, #0d9488 100%);
	border: 1px solid rgba(45, 212, 191, 0.45);
	box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28);
}

.ga-casual-scope#tt-app #go.pause:hover,
.ga-casual-scope#tt-app span.pause:hover {
	filter: brightness(1.06);
}

.ga-casual-scope#tt-app #go.play,
.ga-casual-scope#tt-app span.play {
	color: #f8fafc;
	background: rgba(51, 65, 85, 0.85);
	border: 1px solid rgba(148, 163, 184, 0.28);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ga-casual-scope#tt-app #go.play:hover {
	background: rgba(71, 85, 105, 0.95);
	border-color: rgba(148, 163, 184, 0.38);
}

/* Until the player taps Start, the pause control is inactive (was styled like Pause but did nothing). */
.ga-casual-scope#tt-app #go.tt-go--before-start {
	pointer-events: none;
	cursor: default;
	opacity: 0.72;
}

.ga-casual-scope#tt-app #restart {
	color: #e2e8f0;
	background: rgba(30, 41, 59, 0.65);
	border: 1px solid rgba(148, 163, 184, 0.18);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ga-casual-scope#tt-app #restart:hover {
	border-color: rgba(148, 163, 184, 0.35);
	background: rgba(51, 65, 85, 0.75);
}

/* ----- Best score ----- */
.ga-casual-scope#tt-app .score {
	width: auto;
	height: auto;
	float: none;
	margin: 0;
	text-align: right;
	font-size: inherit;
}

.ga-casual-scope#tt-app .score .best {
	width: auto;
	min-width: 0;
	float: none;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 8px 14px;
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(52, 211, 153, 0.14);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ga-casual-scope#tt-app .score label {
	display: inline;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.16em;
	color: #64748b;
	line-height: 1.2;
	margin: 0;
	white-space: nowrap;
}

.ga-casual-scope#tt-app #bestScore {
	font-size: 17px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: #ecfdf5;
	letter-spacing: 0.02em;
}

/* ----- Playfield ----- */
.ga-casual-scope#tt-app .tt-playfield {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 0 16px;
	min-height: 0;
	position: relative;
	background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(30, 58, 138, 0.12), transparent 62%),
		linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.ga-casual-scope#tt-app .tt-start-overlay {
	display: flex;
	position: absolute;
	inset: 0;
	z-index: 6;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	pointer-events: none;
}

.ga-casual-scope#tt-app .tt-start-overlay[hidden] {
	display: none;
}

.ga-casual-scope#tt-app .tt-start-panel {
	pointer-events: auto;
	width: min(100%, 300px);
	margin-top: 2rem;
	padding: 22px 20px;
	text-align: center;
	border-radius: 16px;
	border: 1px solid rgba(56, 189, 248, 0.28);
	background: rgba(15, 23, 42, 0.82);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow:
		0 20px 48px rgba(2, 6, 23, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ga-casual-scope#tt-app .tt-start-title {
	margin: 0 0 16px;
	font-size: 1.15rem;
	font-weight: 700;
	color: #f1f5f9;
	letter-spacing: -0.02em;
}

.ga-casual-scope#tt-app .tt-start-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 200px;
	margin: 0 auto;
	padding: 11px 18px;
	border: none;
	border-radius: 12px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: #0f172a;
	cursor: pointer;
	background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 45%, #0ea5e9 100%);
	box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
}

.ga-casual-scope#tt-app .tt-start-btn:hover {
	filter: brightness(1.05);
}

.ga-casual-scope#tt-app .tt-start-btn:focus-visible {
	outline: 2px solid #38bdf8;
	outline-offset: 2px;
}

.ga-casual-scope#tt-app #canvas {
	display: block;
	margin: 0;
	max-width: 100%;
	height: auto !important;
	border-radius: 10px;
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.85),
		0 18px 40px rgba(0, 0, 0, 0.35);
}

.ga-casual-scope#tt-app ::-webkit-scrollbar {
	width: 0;
	height: 0;
}

@media (max-width: 639px) {
	.ga-casual-scope#tt-app .tt-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.ga-casual-scope#tt-app .tt-toolbar__mid {
		justify-content: flex-start;
	}

	.ga-casual-scope#tt-app .tt-toolbar__score {
		justify-content: stretch;
	}

	.ga-casual-scope#tt-app .score .best {
		justify-content: center;
	}

	.ga-casual-scope#tt-app .pauseAndNew.tt-actions {
		flex: 1;
		justify-content: flex-start;
	}

	.ga-casual-scope#tt-app .tt-playfield {
		padding: 10px 0 12px;
	}
}
