@font-face {
	font-family: 'Alice';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../game/default/fonts/Alice-Regular.ttf') format('truetype');
}

/* Word Chain 3D - Modern Clean HUD & Controls */
:root {
	--font-game-fun: 'Alice', serif;
	--font-game-display: 'Alice', serif;
	--font-game-main: 'Alice', serif;
}

*, *::before, *::after {
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	font-family: 'Alice', serif !important;
}

button, input, select, textarea, optgroup {
	font-family: 'Alice', serif !important;
}

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #141f26;
	font-family: 'Alice', serif;
	color: #ffffff;
}

#canvas-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	touch-action: none !important;
}

#canvas-container canvas {
	touch-action: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-webkit-touch-callout: none !important;
}

/* ==============================================================================
   Living Photographic Environments & In-Front-Of-Tiles Foreground FX
   ============================================================================== */
.scenery-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
	background: #0d1217;
}

.scenery-photo-plate {
	position: absolute;
	top: -5%;
	left: -5%;
	width: 110%;
	height: 110%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 1.0s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform, opacity;
	animation: sceneryKenBurns 52s infinite alternate ease-in-out;
}

.scenery-photo-plate.active {
	opacity: 1;
}

/* Live animated backdrop (WebGL shader over the portrait art). Sits above the
   static plate, which remains as the instant-load / no-WebGL fallback. */
.scenery-live-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
	transition: opacity 1.0s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.scenery-live-canvas.active {
	opacity: 1;
}

/* Real-Time Three.js 3D Alpine Ski Resort & Tropical Pier Canvases */
.scenery-peaks-3d-canvas,
.scenery-ocean-3d-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	opacity: 0;
	transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	z-index: 1;
}

.scenery-peaks-3d-canvas.active,
.scenery-ocean-3d-canvas.active {
	opacity: 1;
}

/* Background Particle Canvas — Drift BEHIND the 3D playing board (z-index: 3, board is z-index: 1 on #canvas-container with scenery-container at z-index: 0) */
.scenery-bg-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
	z-index: 3;
}

@keyframes sceneryKenBurns {
	0% {
		transform: scale(1.04) translate3d(0, 0, 0);
	}
	50% {
		transform: scale(1.09) translate3d(-1.5%, 1.2%, 0);
	}
	100% {
		transform: scale(1.05) translate3d(1.2%, -1.0%, 0);
	}
}

.scenery-vignette {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
	transition: background 1.0s ease;
}

.scenery-vignette-sakura {
	background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(20, 10, 25, 0.40) 100%);
}
.scenery-vignette-volcano {
	background: radial-gradient(circle at 50% 45%, transparent 35%, rgba(10, 4, 12, 0.65) 100%);
}
.scenery-vignette-snowtown {
	background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(8, 14, 28, 0.55) 100%);
}
.scenery-vignette-peaks {
	background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(12, 24, 45, 0.45) 100%);
}
.scenery-vignette-ocean {
	background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(26, 10, 30, 0.45) 100%);
}
.scenery-vignette-falls {
	background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(14, 28, 20, 0.45) 100%);
}

.scenery-ambient-glow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 2;
	transition: opacity 1.0s ease, background 1.0s ease;
	mix-blend-mode: normal;
}

.scenery-glow-volcano {
	background: radial-gradient(circle at 50% 28%, rgba(255, 75, 15, 0.28) 0%, rgba(200, 30, 0, 0.10) 48%, transparent 75%);
	animation: volcanoHeatPulse 4.5s infinite ease-in-out;
}
.scenery-glow-snowtown {
	background: radial-gradient(circle at 50% 65%, rgba(255, 175, 55, 0.22) 0%, rgba(100, 160, 255, 0.08) 50%, transparent 80%);
	animation: snowtownGlowPulse 6s infinite ease-in-out;
}
.scenery-glow-sakura {
	background: radial-gradient(circle at 60% 20%, rgba(255, 245, 220, 0.24) 0%, rgba(255, 180, 210, 0.10) 50%, transparent 80%);
	animation: sakuraSunlightPulse 8s infinite ease-in-out;
}
.scenery-glow-peaks {
	background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(140, 200, 255, 0.10) 50%, transparent 75%);
	animation: peaksGlintPulse 7s infinite ease-in-out;
}
.scenery-glow-ocean {
	background: radial-gradient(circle at 50% 45%, rgba(255, 120, 50, 0.24) 0%, rgba(220, 40, 100, 0.12) 40%, rgba(80, 20, 90, 0.08) 65%, transparent 80%);
	animation: oceanCausticPulse 6s infinite ease-in-out;
}
.scenery-glow-falls {
	background: radial-gradient(circle at 50% 55%, rgba(200, 240, 255, 0.20) 0%, rgba(255, 230, 180, 0.12) 45%, transparent 80%);
	animation: fallsMistPulse 6s infinite ease-in-out;
}

@keyframes volcanoHeatPulse {
	0%, 100% { opacity: 0.65; transform: scale(1.0); }
	50% { opacity: 0.95; transform: scale(1.04); }
}
@keyframes snowtownGlowPulse {
	0%, 100% { opacity: 0.70; }
	50% { opacity: 0.95; }
}
@keyframes sakuraSunlightPulse {
	0%, 100% { opacity: 0.75; transform: scale(1.0); }
	50% { opacity: 0.95; transform: scale(1.03); }
}
@keyframes peaksGlintPulse {
	0%, 100% { opacity: 0.70; }
	50% { opacity: 0.95; }
}
@keyframes oceanCausticPulse {
	0%, 100% { opacity: 0.65; transform: scale(1.0); }
	50% { opacity: 0.92; transform: scale(1.04); }
}
@keyframes fallsMistPulse {
	0%, 100% { opacity: 0.70; transform: scale(1.0); }
	50% { opacity: 0.95; transform: scale(1.03); }
}

.scenery-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 2;
	pointer-events: none;
}

/* Foreground FX Canvas — Elements pass IN FRONT of the 3D playing tiles */
.scenery-fg-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 5;
	pointer-events: none;
}

.scenery-fg-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

/* ==============================================================================
   Minimalist Premium Title Screen (Juicy Mobile Game Aesthetics)
   ============================================================================== */
body.title-screen-active #hud-header,
body.title-screen-active #hud-bottom {
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

#title-screen {
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	height: 100dvh;
	z-index: 100;
	display: flex;
	justify-content: center;
	align-items: center;
	touch-action: none;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.58) 0%, rgba(15, 23, 42, 0.44) 42%, rgba(15, 23, 42, 0.58) 100%);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	overflow: hidden;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
}

#title-screen.hide,
#title-screen.hidden {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.title-screen-container {
	position: relative;
	width: 100%;
	max-width: 396px;
	height: 100%;
	max-height: 850px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-evenly;
	padding: 20px 16px 22px 16px;
	padding-top: max(22px, env(safe-area-inset-top));
	padding-bottom: max(22px, env(safe-area-inset-bottom));
	box-sizing: border-box;
	animation: titlePopIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.title-settings-corner-btn {
	position: absolute;
	top: max(12px, env(safe-area-inset-top));
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.08);
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	z-index: 25;
	opacity: 0.78;
	transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}

.title-settings-corner-btn:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.16);
	transform: rotate(20deg) scale(1.06);
}

.title-settings-corner-btn:active {
	transform: scale(0.92);
}

.title-settings-corner-icon {
	width: 20px;
	height: 20px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

@keyframes titlePopIn {
	0% { opacity: 0; transform: scale(0.96); }
	100% { opacity: 1; transform: scale(1); }
}

/* 1. SCRUFFLE Brand Mark & Top Branding Section */
.title-brand-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	gap: 8px;
}

.title-top-mark {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 0;
}

.scruffle-mark-img {
	width: 112px;
	height: auto;
	object-fit: contain;
	display: block;
	filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
	opacity: 0.96;
}

/* 2. In-Game Mechanic Word Chain Title Board with 2 Distinct Hardwood Trays (Front & Center!) */
.title-game-board {
	position: relative;
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0 auto;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	width: auto;
}

.title-chain-canvas {
	position: absolute;
	left: -35px;
	top: -28px;
	width: 72px;
	height: calc(100% + 56px);
	pointer-events: none;
	z-index: 6;
	overflow: visible;
}

.title-chain-spark {
	position: absolute;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: radial-gradient(circle, #fffbeb 0%, #fbbf24 55%, #f59e0b 100%);
	box-shadow: 0 0 8px #fbbf24, 0 0 14px rgba(245, 158, 11, 0.85);
	pointer-events: none;
	z-index: 7;
	transform: translate(-50%, -50%) scale(1);
	animation: titleChainSparkFly 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes titleChainSparkFly {
	0% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.1);
	}
	100% {
		opacity: 0;
		transform: translate(calc(-50% + var(--sx, 0px)), calc(-50% + var(--sy, 0px))) scale(0.15);
	}
}

.title-letter-tray {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.75));
	transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.title-letter-tray:hover {
	transform: translateY(-2px);
}

.title-tray-rack {
	position: relative;
	background: linear-gradient(180deg, #3d2516 0%, #29170c 60%, #1a0e06 100%);
	border: 1.5px solid rgba(190, 120, 60, 0.5);
	border-bottom: none;
	border-radius: 12px 12px 0 0;
	padding: 8px 12px 0 12px;
	box-shadow:
		inset 0 1px 1px rgba(255, 220, 140, 0.4),
		inset 0 -2px 4px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.title-tray-lip {
	width: calc(100% + 8px);
	height: 8px;
	margin-left: -4px;
	margin-right: -4px;
	background: linear-gradient(180deg, #5c3820 0%, #3e2414 50%, #211208 100%);
	border-radius: 0 0 6px 6px;
	border-top: 1px solid rgba(255, 230, 160, 0.4);
	box-shadow:
		0 4px 10px rgba(0, 0, 0, 0.65),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	z-index: 2;
}

.title-tile-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	z-index: 1;
}

.title-tile-box {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	overflow: visible;
	background: transparent;
	transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	will-change: transform;
}

.title-tile-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

/* Pure vertical word jump animation ("WORD ... short pause ... CHAIN!") */
/* ZERO cartoon squeeze or scaling */
.title-row-top .title-tile-box:nth-child(1) { animation: tray1JumpW 2.8s infinite; }
.title-row-top .title-tile-box:nth-child(2) { animation: tray1JumpO 2.8s infinite; }
.title-row-top .title-tile-box:nth-child(3) { animation: tray1JumpR 2.8s infinite; }
.title-row-top .title-tile-box:nth-child(4) { animation: tray1JumpD 2.8s infinite; }

.title-row-bottom .title-tile-box:nth-child(1) { animation: tray2JumpC 2.8s infinite; }
.title-row-bottom .title-tile-box:nth-child(2) { animation: tray2JumpH 2.8s infinite; }
.title-row-bottom .title-tile-box:nth-child(3) { animation: tray2JumpA 2.8s infinite; }
.title-row-bottom .title-tile-box:nth-child(4) { animation: tray2JumpI 2.8s infinite; }
.title-row-bottom .title-tile-box:nth-child(5) { animation: tray2JumpN 2.8s infinite; }

@keyframes tray1JumpW {
	0% { transform: translateY(0); }
	6.5% { transform: translateY(-14px); }
	13%, 100% { transform: translateY(0); }
}
@keyframes tray1JumpO {
	0% { transform: translateY(0); }
	6.5% { transform: translateY(-20px); }
	13%, 100% { transform: translateY(0); }
}
@keyframes tray1JumpR {
	0% { transform: translateY(0); }
	6.5% { transform: translateY(-12px); }
	13%, 100% { transform: translateY(0); }
}
@keyframes tray1JumpD {
	0% { transform: translateY(0); }
	6.5% { transform: translateY(-18px); }
	13%, 100% { transform: translateY(0); }
}

@keyframes tray2JumpC {
	0%, 28% { transform: translateY(0); }
	34.5% { transform: translateY(-12px); }
	41%, 100% { transform: translateY(0); }
}
@keyframes tray2JumpH {
	0%, 28% { transform: translateY(0); }
	34.5% { transform: translateY(-20px); }
	41%, 100% { transform: translateY(0); }
}
@keyframes tray2JumpA {
	0%, 28% { transform: translateY(0); }
	34.5% { transform: translateY(-16px); }
	41%, 100% { transform: translateY(0); }
}
@keyframes tray2JumpI {
	0%, 28% { transform: translateY(0); }
	34.5% { transform: translateY(-22px); }
	41%, 100% { transform: translateY(0); }
}
@keyframes tray2JumpN {
	0%, 28% { transform: translateY(0); }
	34.5% { transform: translateY(-14px); }
	41%, 100% { transform: translateY(0); }
}

.title-tile-box.hop {
	animation: titleTileHop 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

@keyframes titleTileHop {
	0% { transform: translateY(0); }
	45% { transform: translateY(-16px); }
	100% { transform: translateY(0); }
}

/* Subtle Style Name Pill beneath WORD CHAIN board */
.title-style-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(22, 16, 28, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(245, 158, 11, 0.35);
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #fbbf24;
	text-transform: uppercase;
	margin-top: 2px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	user-select: none;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.style-tag-sparkle {
	font-size: 10px;
	animation: pulseSparkle 1.8s infinite ease-in-out;
}

@keyframes pulseSparkle {
	0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
	50% { transform: scale(1.25) rotate(15deg); opacity: 1; }
}

/* 3. Middle Hub Trio (Tiles Select | Avatar | Invite Friends) */
.title-hub-row {
	width: 100%;
	max-width: 364px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin: 4px 0 0 0;
}

.title-art-btn {
	position: relative;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: none;
	padding: 0;
	height: auto;
	cursor: pointer;
	outline: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.16s ease;
	flex-shrink: 0;
}

.title-art-btn:hover {
	transform: translateY(-2px) scale(1.04);
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.title-art-btn:active {
	transform: translateY(1px) scale(0.95);
}

.title-art-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
	filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.6));
}

.title-art-tiles {
	width: clamp(92px, 27vw, 114px);
	aspect-ratio: 211 / 87;
}

.title-art-friends {
	width: clamp(90px, 26.5vw, 110px);
	aspect-ratio: 203 / 98;
}

/* 4. Center Action Menu Buttons (Illustrated AssetsScruffle Pills) */
.title-menu-buttons {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 6px 0;
}

.title-menu-btn {
	position: relative;
	width: 100%;
	max-width: 318px;
	aspect-ratio: 430 / 90;
	height: auto;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	flex-shrink: 0;
	font-family: inherit;
	cursor: pointer;
	outline: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.14s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.14s ease;
}

.title-menu-art-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
	filter: drop-shadow(0 7px 14px rgba(0, 0, 0, 0.55));
}

.title-menu-btn:hover {
	transform: translateY(-2px) scale(1.015);
	filter: brightness(1.04) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

.title-menu-btn:active {
	transform: translateY(2px) scale(0.975);
	filter: brightness(0.97);
}

/* VS MODE dynamic avatar circles aligned inside VSModeButton.png yellow rings */
.vs-avatar-badge {
	position: absolute;
	top: 48.89%;
	width: 12.1%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #0284c7;
	border: none;
	box-shadow: none;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.vs-avatar-badge.vs-avatar-left {
	left: 12.79%;
}

.vs-avatar-badge.vs-avatar-right {
	left: 86.51%;
}

.vs-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 5. Bottom Footer Showcase (Achievements & Leaderboard Art Banners) */
.title-footer-nav {
	width: 100%;
	max-width: 348px;
	display: flex;
	align-items: flex-end;
	justify-content: space-around;
	padding: 2px 4px 0 4px;
	gap: 14px;
}

.title-art-achievements {
	width: clamp(118px, 34vw, 144px);
	aspect-ratio: 223 / 141;
}

.title-art-leaderboard {
	width: clamp(118px, 34vw, 144px);
	aspect-ratio: 221 / 128;
}

/* Compact mobile browser viewports (e.g. in-app Safari / Gemini bottom chrome) */
@media (max-height: 680px) {
	.title-screen-container {
		padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)) 14px;
	}
	.title-brand-group {
		gap: 5px;
	}
	.scruffle-mark-img {
		width: 96px;
	}
	.title-tile-box {
		width: 44px;
		height: 44px;
	}
	.title-avatar-ring {
		width: 62px;
		height: 62px;
	}
	.title-art-tiles {
		width: clamp(86px, 25vw, 102px);
	}
	.title-art-friends {
		width: clamp(84px, 24.5vw, 98px);
	}
	.title-menu-buttons {
		gap: 8px;
		margin: 2px 0;
	}
	.title-menu-btn {
		max-width: 286px;
	}
	.title-art-achievements,
	.title-art-leaderboard {
		width: clamp(104px, 30vw, 122px);
	}
}

/* ==============================================================================
   In-Game Minimal Header (Screenshot Alignment)
   ============================================================================== */
#hud-header {
	position: absolute;
	top: 14px;
	top: max(14px, env(safe-area-inset-top));
	left: 0;
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 0 16px;
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
	z-index: 10;
	pointer-events: none;
}

.hud-top-bar {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 500px;
}

.hud-left-pill {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(20, 16, 26, 0.78);
	padding: 6px 14px 6px 10px;
	border-radius: 20px;
	border: 1px solid rgba(251, 191, 36, 0.35);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.hud-level-badge {
	background: linear-gradient(135deg, #f59e0b, #b45309);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 12px;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.hud-lvl-prefix {
	opacity: 0.88;
	font-weight: 700;
	font-size: 11px;
}

.hud-lvl-sep {
	opacity: 0.6;
	font-size: 9px;
}

.hud-level-name {
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #ffffff;
}

/* Progress Dots inline */
.chain-progress {
	display: flex;
	align-items: center;
	gap: 6px;
}

.chain-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition: all 0.3s ease;
}

.chain-dot.completed {
	background: #22c55e;
	border-color: #4ade80;
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.chain-dot.active {
	background: #fbbf24;
	border-color: #f59e0b;
	box-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
	transform: scale(1.25);
}

.hud-right-actions {
	position: absolute;
	right: 0;
	top: 10px;
	transform: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	pointer-events: auto;
}

.hud-right-actions .hud-gear-btn {
	order: 1;
}

.hud-right-actions .hud-challenge-giveup-btn,
.hud-right-actions .hud-challenge-exit-btn {
	order: 2;
}

.hud-challenge-giveup-btn,
.hud-challenge-exit-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	height: 30px;
	border-radius: 10px;
	background: linear-gradient(180deg, #451515 0%, #240a0a 100%);
	border: 1.5px solid rgba(248, 113, 113, 0.7);
	color: #fee2e2;
	font-family: 'Alice', serif;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.6px;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(254, 202, 202, 0.25);
	transition: all 0.15s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
	white-space: nowrap;
}

.hud-challenge-giveup-btn:hover,
.hud-challenge-exit-btn:hover {
	border-color: #f87171;
	background: linear-gradient(180deg, #5c1d1d 0%, #300d0d 100%);
	transform: translateY(-1px);
}

.hud-challenge-giveup-btn:active,
.hud-challenge-exit-btn:active {
	transform: scale(0.95);
}

.hud-giveup-icon,
.hud-challenge-icon {
	font-size: 13px;
	line-height: 1;
}

.hud-giveup-lbl,
.hud-challenge-lbl {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hud-action-pill-btn {
	pointer-events: auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(15, 20, 30, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.20);
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hud-action-pill-btn:hover {
	transform: scale(1.1);
	background: rgba(35, 45, 60, 0.55);
	border-color: rgba(255, 255, 255, 0.45);
	box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

.hud-action-pill-btn:active {
	transform: scale(0.92);
}

.hud-action-pill-btn.active-incline {
	border-color: #f59e0b;
	box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

/* Settings Gear Button (Flat Icon on Screen) */
.hud-gear-btn {
	pointer-events: auto;
	width: 40px;
	height: 40px;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(11, 18, 32, 0.70) !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
	border-radius: 50% !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	outline: none;
	color: #ffffff;
	transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
}

.hud-gear-svg {
	width: 24px;
	height: 24px;
	display: block;
	stroke: currentColor;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hud-gear-btn:hover {
	color: #38bdf8;
}

.hud-gear-btn:hover .hud-gear-svg {
	transform: rotate(30deg) scale(1.1);
	filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.6));
}

.hud-gear-btn:active {
	transform: scale(0.92);
}

/* ==============================================================================
   In-Game HUD Speedometer Dial (Glass Tube Curve & Etched Lines Floating on HUD)
   ============================================================================== */
.hud-speedometer {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 2px 4px 4px 4px;
	box-shadow: none !important;
	transition: transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.3s ease;
	position: relative;
	cursor: pointer;
	user-select: none;
	overflow: visible;
}

/* Subtle Energy Glow radiating behind the glass gauge */
.speedo-magical-aura {
	position: absolute;
	top: -2px;
	left: 50%;
	transform: translateX(-50%);
	width: 86px;
	height: 48px;
	border-radius: 50% 50% 0 0;
	filter: blur(12px);
	opacity: 0.45;
	z-index: -1;
	pointer-events: none;
	transition: all 0.35s ease;
}

/* Tier 1: CRUISE (<15 WPM) */
.hud-speedometer.tier-cruise {
	border: none !important;
}
.speedo-magical-aura.tier-cruise {
	background: radial-gradient(circle, rgba(0, 229, 255, 0.35) 0%, transparent 70%);
}

/* Tier 2: SWIFT (15-24 WPM) - Emerald */
.hud-speedometer.tier-swift {
	border: none !important;
}
.speedo-magical-aura.tier-swift {
	background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, transparent 75%);
}

/* Tier 3: TURBO (25-34 WPM) - Amber */
.hud-speedometer.tier-turbo {
	border: none !important;
}
.speedo-magical-aura.tier-turbo {
	background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, transparent 75%);
}

/* Tier 4: LIGHTNING (35-44 WPM) - Pink */
.hud-speedometer.tier-lightning {
	border: none !important;
}
.speedo-magical-aura.tier-lightning {
	background: radial-gradient(circle, rgba(236, 72, 153, 0.55) 0%, transparent 80%);
}

/* Tier 5: GODSPEED (45+ WPM) - Gold */
.hud-speedometer.tier-godspeed {
	border: none !important;
}
.speedo-magical-aura.tier-godspeed {
	background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 80%);
}

/* Pulse on Snap/Solve */
.hud-speedometer.speedo-pulse {
	transform: scale(1.1) !important;
}

/* Hard Brake Penalty on Wrong Entry */
.hud-speedometer.speedo-brake {
	animation: speedoBrakeShudder 0.45s ease-out !important;
}

@keyframes speedoBrakeShudder {
	0% {
		transform: scale(1);
		filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.95));
	}
	20% {
		transform: translateY(3px) scale(0.90);
		filter: drop-shadow(0 0 24px rgba(239, 68, 68, 1));
	}
	45% {
		transform: translateY(-2px) scale(0.94);
		filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.9));
	}
	70% {
		transform: translateY(1px) scale(0.98);
		filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6));
	}
	100% {
		transform: scale(1);
		filter: none;
	}
}

/* Floating +1.5s Penalty Tag on Speedometer */
.speedo-penalty-float {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: #ffffff;
	font-weight: 800;
	font-size: 13px;
	padding: 2px 9px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.7);
	pointer-events: none;
	animation: speedoPenaltyFloatAnim 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	z-index: 100;
}

@keyframes speedoPenaltyFloatAnim {
	0% {
		opacity: 0;
		transform: translate(-50%, 6px) scale(0.8);
	}
	20% {
		opacity: 1;
		transform: translate(-50%, -4px) scale(1.08);
	}
	75% {
		opacity: 1;
		transform: translate(-50%, -10px) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -20px) scale(0.85);
	}
}

.speedo-dial {
	position: relative;
	width: 124px;
	height: 68px;
	display: flex;
	justify-content: center;
	overflow: visible;
	pointer-events: none;
}

.speedo-svg {
	width: 100%;
	height: 100%;
	overflow: visible;
	display: block;
	pointer-events: none;
}

.speedo-fill {
	will-change: stroke-dashoffset;
}

#speedo-needle-group {
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.speedo-center-readout {
	position: absolute;
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: baseline;
	gap: 3px;
	pointer-events: none;
	z-index: 8;
	white-space: nowrap;
}

.speedo-number {
	font-family: 'Alice', serif;
	font-size: 22px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1;
	font-variant-numeric: tabular-nums lining-nums;
	letter-spacing: 0.5px;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 229, 255, 0.35);
}

.speedo-unit {
	font-family: 'Alice', serif;
	font-size: 9.5px;
	font-weight: 700;
	color: #ffd700;
	letter-spacing: 1px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.speedo-sub-badge {
	font-family: 'Alice', serif;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1.4px;
	color: #38bdf8;
	text-transform: uppercase;
	margin-top: 2px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(11, 18, 32, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
	z-index: 8;
	height: auto;
	line-height: 1.2;
}

/* Dynamic Speed Milestone Star Gauge (Directly Below Speedometer, Above Board) */
.hud-star-track {
	position: relative;
	width: 204px;
	height: 44px;
	margin-top: 5px;
	display: block;
	pointer-events: none;
	user-select: none;
	overflow: visible;
}

.star-track-bar {
	position: absolute;
	left: 20px;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	height: 4.5px;
	pointer-events: none;
	z-index: 1;
}

.star-track-line-bg {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.star-track-line-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
	border-radius: 999px;
	box-shadow: 0 0 8px #ffb700, 0 0 14px rgba(255, 183, 0, 0.7);
	width: 0%;
	transition: width 0.15s ease-out;
}

/* 3D Three.js Star Canvas with Lighting & Glow (strictly behind star images) */
.hud-star-3d-canvas {
	position: absolute;
	left: -34px;
	top: -22px;
	width: calc(100% + 68px);
	height: calc(100% + 44px);
	pointer-events: none;
	z-index: 2;
	overflow: visible;
}

.star-track-node {
	position: absolute;
	top: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translate(-50%, -50%);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 3;
}

.hud-star-img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	display: block;
	pointer-events: none;
	user-select: none;
	transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.26s ease;
}

.star-track-node.lit .hud-star-img {
	transform: scale(1.16);
	filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.92))
	        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
}

.star-track-node.dim .hud-star-img {
	transform: scale(0.95);
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.82));
}

.star-track-node.node-star-1 {
	left: 20px;
}

.star-track-node.node-star-2 {
	left: 50%;
}

.star-track-node.node-star-3 {
	left: calc(100% - 20px);
}

.star-track-svg {
	width: 38px;
	height: 38px;
	display: block;
	overflow: visible;
}

.star-3d-group {
	transform-origin: 12px 12px;
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.star-facet {
	stroke-linejoin: round;
	stroke-linecap: round;
	transition: fill 0.25s ease, stroke 0.25s ease;
}

.star-3d-base {
	transition: fill 0.25s ease, stroke 0.25s ease;
}

.star-ridge-top,
.star-ridge-left {
	fill: none;
	stroke-linecap: round;
	stroke-width: 0.6px;
	transition: stroke 0.25s ease, opacity 0.25s ease;
}

.star-apex-glint,
.star-sun-glint {
	transition: opacity 0.25s ease, fill 0.25s ease;
}

/* ==========================================================================
   LIT STATE (Dynamic 24K Polished Gold Star with Directional Sunlight)
   ========================================================================== */
.star-track-node.lit .star-3d-group {
	transform: scale(1.18);
	filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.95))
	        drop-shadow(0 0 20px rgba(255, 149, 0, 0.70))
	        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.90));
}

.star-track-node.lit .star-3d-base {
	fill: #5c2005;
	stroke: #2e0f02;
	stroke-width: 0.7px;
}

/* Directional lighting: Key Sun at Top-Left */
.star-track-node.lit .facet-10 { fill: #ffffff; stroke: #fff9db; stroke-width: 0.35px; } /* direct specular sun */
.star-track-node.lit .facet-1  { fill: #fff1a8; stroke: #fff9db; stroke-width: 0.35px; } /* high key light */
.star-track-node.lit .facet-9  { fill: #ffd84d; stroke: #ffe066; stroke-width: 0.35px; } /* bright gold */
.star-track-node.lit .facet-2  { fill: #ffc400; stroke: #ffd700; stroke-width: 0.35px; } /* warm sunlight */
.star-track-node.lit .facet-3  { fill: #f59e0b; stroke: #fbbf24; stroke-width: 0.35px; } /* golden amber */
.star-track-node.lit .facet-8  { fill: #f59e0b; stroke: #fbbf24; stroke-width: 0.35px; } /* golden amber */
.star-track-node.lit .facet-7  { fill: #d97706; stroke: #f59e0b; stroke-width: 0.35px; } /* bounce light */
.star-track-node.lit .facet-4  { fill: #b45309; stroke: #d97706; stroke-width: 0.35px; } /* side shadow */
.star-track-node.lit .facet-6  { fill: #92400e; stroke: #b45309; stroke-width: 0.35px; } /* core shadow */
.star-track-node.lit .facet-5  { fill: #78350f; stroke: #92400e; stroke-width: 0.35px; } /* deep occlusion */

.star-track-node.lit .star-ridge-top,
.star-track-node.lit .star-ridge-left {
	stroke: rgba(255, 255, 255, 0.85);
	opacity: 1;
}

.star-track-node.lit .star-apex-glint {
	fill: #ffffff;
	opacity: 1;
	filter: drop-shadow(0 0 4px #ffffff);
}

.star-track-node.lit .star-sun-glint {
	fill: #ffffff;
	opacity: 1;
}

/* ==========================================================================
   DIM / UNLIT STATE (Beveled Gunmetal & Polished Titanium 3D Metal Setting)
   ========================================================================== */
.star-track-node.dim .star-3d-group {
	transform: scale(0.95);
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
}

.star-track-node.dim .star-3d-base {
	fill: #030712;
	stroke: rgba(255, 255, 255, 0.20);
	stroke-width: 0.7px;
}

/* Polished metallic bevels catching ambient and rim light */
.star-track-node.dim .facet-10 { fill: #64748b; stroke: rgba(255, 255, 255, 0.35); stroke-width: 0.35px; } /* rim reflection */
.star-track-node.dim .facet-1  { fill: #475569; stroke: rgba(255, 255, 255, 0.25); stroke-width: 0.35px; } /* titanium sheen */
.star-track-node.dim .facet-9  { fill: #334155; stroke: rgba(255, 255, 255, 0.20); stroke-width: 0.35px; } /* slate steel */
.star-track-node.dim .facet-2  { fill: #334155; stroke: rgba(255, 255, 255, 0.20); stroke-width: 0.35px; } /* slate steel */
.star-track-node.dim .facet-3  { fill: #1e293b; stroke: rgba(255, 255, 255, 0.15); stroke-width: 0.35px; } /* dark gunmetal */
.star-track-node.dim .facet-8  { fill: #1e293b; stroke: rgba(255, 255, 255, 0.15); stroke-width: 0.35px; } /* dark gunmetal */
.star-track-node.dim .facet-7  { fill: #182234; stroke: rgba(255, 255, 255, 0.12); stroke-width: 0.35px; } /* shaded metal */
.star-track-node.dim .facet-4  { fill: #111827; stroke: rgba(255, 255, 255, 0.10); stroke-width: 0.35px; } /* dark shadow */
.star-track-node.dim .facet-6  { fill: #0b0f19; stroke: rgba(255, 255, 255, 0.08); stroke-width: 0.35px; } /* obsidian shadow */
.star-track-node.dim .facet-5  { fill: #060911; stroke: rgba(255, 255, 255, 0.05); stroke-width: 0.35px; } /* deepest shadow */

.star-track-node.dim .star-ridge-top,
.star-track-node.dim .star-ridge-left {
	stroke: rgba(255, 255, 255, 0.35);
	opacity: 0.7;
}

.star-track-node.dim .star-apex-glint {
	fill: #94a3b8;
	opacity: 0.45;
}

.star-track-node.dim .star-sun-glint {
	fill: #cbd5e1;
	opacity: 0.35;
}

/* End-of-Level Celebration FX */
.hud-star-track.celebrate-3 .star-track-line-fill {
	box-shadow: 0 0 16px #ffd700, 0 0 30px #ff9500;
	animation: trackBlazePulse 1.2s ease-in-out infinite alternate;
}

.hud-star-track.celebrate-3 .node-star-1 .star-3d-group,
.hud-star-track.celebrate-3 .node-star-1 .hud-star-img {
	animation: grandStarBurst 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.05s;
}

.hud-star-track.celebrate-3 .node-star-2 .star-3d-group,
.hud-star-track.celebrate-3 .node-star-2 .hud-star-img {
	animation: grandStarBurst 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.22s;
}

.hud-star-track.celebrate-3 .node-star-3 .star-3d-group,
.hud-star-track.celebrate-3 .node-star-3 .hud-star-img {
	animation: grandStarBurst 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.39s;
}

.hud-star-track.celebrate-2 .node-star-1 .star-3d-group,
.hud-star-track.celebrate-2 .node-star-1 .hud-star-img {
	animation: moderateStarBurst 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.05s;
}

.hud-star-track.celebrate-2 .node-star-2 .star-3d-group,
.hud-star-track.celebrate-2 .node-star-2 .hud-star-img {
	animation: moderateStarBurst 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.22s;
}

.hud-star-track.celebrate-1 .node-star-1 .star-3d-group,
.hud-star-track.celebrate-1 .node-star-1 .hud-star-img {
	animation: gentleStarBurst 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	animation-delay: 0.05s;
}

@keyframes grandStarBurst {
	0% { transform: scale(1.16); }
	35% { transform: scale(1.48); filter: drop-shadow(0 0 16px #ffd700) drop-shadow(0 0 32px #ff9500); }
	70% { transform: scale(1.14); }
	100% { transform: scale(1.16); filter: drop-shadow(0 0 10px #ffd700) drop-shadow(0 0 22px rgba(255, 183, 0, 0.85)); }
}

@keyframes moderateStarBurst {
	0% { transform: scale(1.16); }
	40% { transform: scale(1.38); filter: drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 22px #ff9500); }
	100% { transform: scale(1.16); filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 16px rgba(255, 183, 0, 0.75)); }
}

@keyframes gentleStarBurst {
	0% { transform: scale(1.16); }
	45% { transform: scale(1.32); filter: drop-shadow(0 0 10px #ffd700); }
	100% { transform: scale(1.16); filter: drop-shadow(0 0 6px #ffd700); }
}

@keyframes trackBlazePulse {
	0% { box-shadow: 0 0 8px #ffd700, 0 0 14px rgba(255, 183, 0, 0.7); }
	100% { box-shadow: 0 0 18px #ffd700, 0 0 35px #ff9500; }
}

/* Golden Sparkles radiating from celebratory stars */
.star-sparkle-dot {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle, #ffffff 10%, #ffd700 60%, #ff9500 100%);
	box-shadow: 0 0 6px #ffd700, 0 0 10px #ffffff;
	pointer-events: none;
	animation: sparkleBurst 0.75s ease-out forwards;
	z-index: 10;
}

@keyframes sparkleBurst {
	0% {
		transform: translate(-50%, -50%) translate(0, 0) scale(1);
		opacity: 1;
	}
	80% {
		opacity: 0.85;
	}
	100% {
		transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0);
		opacity: 0;
	}
}

/* Star Fireworks Particles bursting from lit stars (strictly below modals & title screen) */
.star-firework-particle {
	position: fixed !important;
	border-radius: 50% !important;
	pointer-events: none !important;
	z-index: 25 !important;
	transform: translate(-50%, -50%) translate(0, 0) scale(1);
	box-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
	animation: starFireworkBurst 0.9s cubic-bezier(0.12, 0.85, 0.35, 1) forwards !important;
}

.star-firework-flash {
	position: fixed !important;
	width: 36px !important;
	height: 36px !important;
	border-radius: 50% !important;
	pointer-events: none !important;
	z-index: 24 !important;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 215, 0, 0.6) 45%, transparent 70%);
	transform: translate(-50%, -50%) scale(0.6);
	animation: starFlashPulse 0.45s ease-out forwards !important;
}

body.wc-modal-open .star-firework-particle,
body.wc-modal-open .star-firework-flash,
body.wc-modal-open .star-sparkle-dot,
body.custom-creator-open .star-firework-particle,
body.custom-creator-open .star-firework-flash,
body.custom-creator-open .star-sparkle-dot,
body.world-map-active .star-firework-particle,
body.world-map-active .star-firework-flash,
body.title-screen-active .star-firework-particle,
body.title-screen-active .star-firework-flash {
	display: none !important;
	opacity: 0 !important;
}

@keyframes starFireworkBurst {
	0% {
		transform: translate(-50%, -50%) translate(0, 0) scale(1.2);
		opacity: 1;
		filter: brightness(2.2);
	}
	40% {
		opacity: 1;
		filter: brightness(1.8);
	}
	100% {
		transform: translate(-50%, -50%) translate(var(--fx), var(--fy)) scale(0);
		opacity: 0;
		filter: brightness(1);
	}
}

@keyframes starFlashPulse {
	0% {
		transform: translate(-50%, -50%) scale(0.6);
		opacity: 1;
	}
	100% {
		transform: translate(-50%, -50%) scale(2.2);
		opacity: 0;
	}
}

@keyframes starFireworkPulse {
	0% {
		transform: scale(1.16);
	}
	35% {
		transform: scale(1.40);
		filter: drop-shadow(0 0 14px #ffd700) drop-shadow(0 0 28px #ff9500);
	}
	70% {
		transform: scale(1.14);
	}
	100% {
		transform: scale(1.16);
		filter: drop-shadow(0 0 8px #ffb700) drop-shadow(0 0 16px rgba(255, 183, 0, 0.85));
	}
}

@keyframes sparkleBurst {
	0% {
		transform: translate(-50%, -50%) translate(0, 0) scale(1);
		opacity: 1;
	}
	80% {
		opacity: 0.85;
	}
	100% {
		transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0);
		opacity: 0;
	}
}

/* Level Select Speed Record in Settings */
.level-display-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.level-speed-record {
	font-size: 11px;
	font-weight: 800;
	color: #ffd700;
	letter-spacing: 0.5px;
	text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

/* ==============================================================================
   Win Celebration Speed Badge Card & Replay Button
   ============================================================================== */
.win-speed-card {
	position: absolute;
	bottom: 24px;
	bottom: max(24px, env(safe-area-inset-bottom));
	left: 50%;
	transform: translateX(-50%) translateY(40px) scale(0.9);
	opacity: 0;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: rgba(18, 14, 28, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1.5px solid rgba(255, 215, 0, 0.5);
	border-radius: 20px;
	padding: 10px 18px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.35);
	z-index: 60;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.win-speed-card.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0) scale(1);
}

.win-speed-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.win-speed-bolt {
	font-size: 18px;
	animation: flickerLightning 1.5s infinite ease-in-out;
}

.win-speed-text {
	font-size: 14px;
	font-weight: 700;
	color: #fff9e6;
	letter-spacing: 0.5px;
}

.win-speed-text strong {
	color: #00e5ff;
	font-weight: 900;
	font-size: 16px;
	text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.win-record-badge {
	background: linear-gradient(135deg, #ffd700, #ff8c00);
	color: #120e1c;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	padding: 3px 8px;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
	animation: pulsePlay 1.5s infinite;
}

.win-replay-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 215, 0, 0.35);
	color: #fef08a;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.8px;
	padding: 6px 16px;
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 6px;
}

.win-replay-btn:hover {
	background: rgba(255, 215, 0, 0.2);
	border-color: #ffd700;
	transform: scale(1.05);
}

.win-replay-btn:active {
	transform: scale(0.95);
}

.hud-gear-emoji {
	font-size: 22px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}


/* ==============================================================================
   Bottom Action Controls (Simplistic Title-Screen Style)
   ============================================================================== */
#hud-bottom {
	position: absolute;
	bottom: 16px;
	bottom: max(16px, env(safe-area-inset-bottom));
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 400px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	padding-left: max(14px, env(safe-area-inset-left));
	padding-right: max(14px, env(safe-area-inset-right));
	z-index: 10;
	pointer-events: none;
	user-select: none;
	box-sizing: border-box;
}

.hud-action-btn {
	pointer-events: auto;
	height: 48px;
	flex: 1;
	max-width: 120px;
	background: #252429;
	border: 1.5px solid rgba(255, 255, 255, 0.14);
	border-bottom: 3.5px solid #141318;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 10px;
	cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	color: #ffffff;
	font-family: inherit;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
	transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.hud-action-btn:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.32);
	background: #2e2c34;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.hud-action-btn:active {
	transform: translateY(2px);
	border-bottom-width: 1.5px;
}

.hud-btn-svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	stroke: #ffffff;
	transition: transform 0.15s ease;
}

.hud-action-btn:hover .hud-btn-svg {
	transform: scale(1.1);
}

.hud-btn-label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #ffffff;
	white-space: nowrap;
}

/* HINT button - Gold accent like title screen highlights */
.hud-action-btn.btn-hint {
	border-color: rgba(245, 158, 11, 0.45);
	background: #28242a;
}

.hud-action-btn.btn-hint .hud-btn-svg {
	stroke: #fbbf24;
}

.hud-action-btn.btn-hint .hud-btn-label {
	color: #fbbf24;
}

.hud-key-badge {
	background: rgba(245, 158, 11, 0.22);
	border: 1px solid #f59e0b;
	color: #ffd700;
	font-size: 10px;
	font-weight: 900;
	padding: 1px 6px;
	border-radius: 999px;
	min-width: 18px;
	text-align: center;
	line-height: 1.2;
}

.hud-key-badge.empty {
	background: rgba(239, 68, 68, 0.22);
	border-color: #ef4444;
	color: #f87171;
}

/* RECHARGE KEYS button - Matches simplistic button size & height */
.btn-recharge-keys {
	display: none;
	pointer-events: auto;
	height: 48px;
	flex: 1;
	max-width: 120px;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: #1b2e23;
	border: 1.5px solid #10b981;
	border-bottom: 3.5px solid #064e3b;
	border-radius: 16px;
	color: #34d399;
	font-family: inherit;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
	transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.btn-recharge-keys.visible {
	display: inline-flex;
}

.btn-recharge-keys:hover {
	transform: translateY(-2px);
	border-color: #34d399;
	background: #233b2d;
}

.btn-recharge-keys:active {
	transform: translateY(2px);
	border-bottom-width: 1.5px;
}

.action-btn {
	pointer-events: auto;
	background: linear-gradient(135deg, #443422, #2c2014);
	border: 1.5px solid #bd8a43;
	color: #f7eedb;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.4px;
	padding: 10px 20px;
	border-radius: 24px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.18);
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.action-btn:hover {
	background: linear-gradient(135deg, #5b462f, #3a2b1b);
	border-color: #f7ca72;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0,0,0,0.7), 0 0 12px rgba(247, 202, 114, 0.4);
}

.action-btn:active {
	transform: translateY(1px);
	box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.action-btn.primary {
	background: linear-gradient(135deg, #d97706, #92400e);
	border: 1.5px solid #fef08a;
	color: #ffffff;
	box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 14px rgba(245, 158, 11, 0.6);
}

.action-btn.primary:hover {
	background: linear-gradient(135deg, #f59e0b, #b45309);
	border-color: #ffffff;
	box-shadow: 0 6px 20px rgba(0,0,0,0.7), 0 0 20px rgba(245, 158, 11, 0.9);
}

.btn-key-icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.btn-icon {
	font-size: 16px;
}

/* ==============================================================================
   Unified Settings Modal
   ============================================================================== */
.settings-row {
	display: flex;
	gap: 12px;
	width: 100%;
}

.setting-toggle-btn {
	flex: 1;
	background: rgba(40, 32, 24, 0.85);
	border: 1px solid rgba(251, 191, 36, 0.4);
	color: #f5eedc;
	font-size: 13px;
	font-weight: 700;
	padding: 10px 14px;
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
}

.setting-toggle-btn:hover {
	background: rgba(60, 48, 36, 0.95);
	border-color: #fbbf24;
}

.level-select-row {
	align-items: center;
	justify-content: space-between;
}

.nav-arrow-btn {
	background: rgba(50, 40, 30, 0.85);
	border: 1px solid rgba(251, 191, 36, 0.4);
	color: #f7eedb;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 16px;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.nav-arrow-btn:hover {
	background: rgba(70, 56, 42, 0.95);
	border-color: #fbbf24;
}

.level-display-label {
	font-size: 15px;
	font-weight: 800;
	color: #fbbf24;
}

.settings-modal-footer {
	margin-top: 18px;
	display: flex;
	justify-content: center;
}

.title-return-btn {
	background: linear-gradient(135deg, #475569, #1e293b);
	border: 1px solid #94a3b8;
	color: #f8fafc;
	font-size: 13px;
	font-weight: 700;
	padding: 10px 20px;
	border-radius: 18px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.4);
	transition: all 0.2s ease;
}

.title-return-btn:hover {
	background: linear-gradient(135deg, #64748b, #334155);
	transform: translateY(-1px);
}

/* Banner / Toast message - Positioned cleanly below the speedometer & star track */
#toast-banner {
	position: absolute;
	top: max(144px, calc(env(safe-area-inset-top) + 134px));
	left: 50%;
	transform: translateX(-50%) translateY(-14px);
	background: rgba(26, 17, 10, 0.95);
	border: 1.5px solid #eab308;
	color: #fef08a;
	padding: 8px 20px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.4px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.8), 0 0 16px rgba(234, 179, 8, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	max-width: 90vw;
	white-space: normal;
	text-align: center;
	line-height: 1.3;
}

#toast-banner.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ==============================================================================
   3D Tactile Floating NEXT Arrow Button (Centered Bottom Win Celebration)
   ============================================================================== */
.tactile-next-btn {
	position: absolute;
	left: 50%;
	bottom: 242px;
	bottom: max(242px, calc(env(safe-area-inset-bottom) + 220px));
	transform: translateX(-50%) scale(0);
	opacity: 0;
	pointer-events: none;
	min-width: 190px;
	height: 58px;
	padding: 0 28px;
	border-radius: 29px;
	border: 2px solid #fffbeb;
	background: linear-gradient(180deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
	box-shadow: 
		0 6px 0 #92400e,
		0 12px 28px rgba(0, 0, 0, 0.55),
		0 0 30px rgba(251, 191, 36, 0.75);
	cursor: pointer;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}

.tactile-next-btn.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) scale(1);
	animation: nextBtnPulse 1.8s ease-in-out infinite alternate;
}

@keyframes nextBtnPulse {
	0% {
		transform: translateX(-50%) scale(1);
		box-shadow: 0 6px 0 #92400e, 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 25px rgba(251, 191, 36, 0.55);
	}
	100% {
		transform: translateX(-50%) scale(1.06);
		box-shadow: 0 6px 0 #92400e, 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 42px rgba(251, 191, 36, 0.95);
	}
}

.tactile-next-btn:active {
	transform: translateX(-50%) translateY(4px) scale(0.96) !important;
	box-shadow: 0 2px 0 #92400e, 0 6px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(251, 191, 36, 0.4) !important;
	animation: none;
}

.next-btn-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 12px;
	pointer-events: none;
}

.next-arrow-icon {
	font-size: 20px;
	line-height: 1;
	color: #ffffff;
	text-shadow: 0 2px 4px rgba(146, 64, 14, 0.8), 0 0 8px rgba(255, 255, 255, 0.6);
	transform: translateX(1px);
}

.next-label {
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 2.4px;
	color: #ffffff;
	text-shadow: 0 2px 4px rgba(146, 64, 14, 0.8), 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Level Win Modal */
#win-modal {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(10, 8, 14, 0.85);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

#win-modal.show {
	opacity: 1;
	pointer-events: auto;
}

.win-card {
	background: linear-gradient(180deg, #241d33, #151120);
	border: 2px solid #eab308;
	border-radius: 20px;
	padding: 36px 48px;
	text-align: center;
	box-shadow: 0 16px 48px rgba(0,0,0,0.8), 0 0 32px rgba(234, 179, 8, 0.3);
	transform: scale(0.9);
	transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	max-width: 440px;
	width: 90%;
}

#win-modal.show .win-card {
	transform: scale(1.0);
}

.win-card h2 {
	margin: 0;
	font-size: 32px;
	color: #fef08a;
	text-shadow: 0 2px 10px rgba(234, 179, 8, 0.6);
}

.win-card p {
	color: #cbd5e1;
	font-size: 16px;
	margin: 12px 0 24px 0;
}

.win-stars {
	font-size: 38px;
	margin-bottom: 20px;
	filter: drop-shadow(0 4px 8px rgba(234, 179, 8, 0.5));
}

.win-btn {
	background: linear-gradient(135deg, #eab308, #ca8a04);
	color: #1a1500;
	font-size: 16px;
	font-weight: 800;
	padding: 12px 32px;
	border-radius: 24px;
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(234, 179, 8, 0.4);
	transition: all 0.2s ease;
}

.win-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 8px 24px rgba(234, 179, 8, 0.6);
}

/* Theme & Skins Customization Modal */
.game-modal:not(#theme-modal):not(#scenery-select-modal) {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(10, 8, 14, 0.85);
	backdrop-filter: blur(10px);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 120;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.game-modal:not(#theme-modal):not(#scenery-select-modal):not(.show),
#vs-lobby-modal:not(.show),
#vs-results-modal:not(.show),
#profile-modal:not(.show),
#leaderboard-modal:not(.show),
#settings-modal:not(.show),
#level-select-modal:not(.show),
#friends-modal:not(.show),
#pvp-outgoing-modal:not(.show) {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.game-modal:not(#theme-modal):not(#scenery-select-modal).show,
#vs-lobby-modal.show,
#vs-results-modal.show,
#profile-modal.show,
#leaderboard-modal.show,
#settings-modal.show,
#level-select-modal.show,
#friends-modal.show,
#pvp-outgoing-modal.show {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* ==============================================================================
   Preloaded In-Engine Pause Menu & Scenery Modal Overlays
   Hardware-accelerated instant GPU interpolation (Zero Webpage Reload feeling)
   ============================================================================== */
#theme-modal,
#scenery-select-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex !important;
	justify-content: center;
	align-items: center;
	z-index: 140;
	background: radial-gradient(circle at 50% 38%, rgba(16, 12, 24, 0.84) 0%, rgba(7, 5, 12, 0.94) 100%);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
	            visibility 0.22s ease;
	will-change: opacity;
}

#theme-modal.show,
#scenery-select-modal.show {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.pause-menu-card {
	background: radial-gradient(circle at 50% 12%, #351e12 0%, #201108 55%, #0a0401 100%) !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 16px !important;
	max-width: 100vw !important;
	width: 100% !important;
	box-shadow: none !important;
	box-sizing: border-box;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
}

#theme-modal.show .pause-menu-card,
#scenery-select-modal.show .pause-menu-card {
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* Authentic Handcrafted Wooden Game Cabinet */
.pause-menu-cabinet {
	width: 100%;
	max-width: 410px;
	background: linear-gradient(180deg, #442616 0%, #2e180d 50%, #1c0e06 100%);
	border: 3px solid #7c4726;
	border-top: 3.5px solid #9c5b31;
	border-bottom: 4.5px solid #140803;
	border-radius: 26px;
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.92),
		inset 0 1.5px 2px rgba(255, 215, 0, 0.28),
		inset 0 -3px 6px rgba(0, 0, 0, 0.8),
		0 0 35px rgba(0, 0, 0, 0.55);
	padding: 16px 14px 18px 14px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: auto !important;
	position: relative;
}

/* Pause / Settings Wooden Plaque Header */
.pause-menu-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	width: 100% !important;
	padding-bottom: 12px !important;
	border-bottom: 2px solid #5a321a !important;
	margin-bottom: 0 !important;
	box-sizing: border-box;
}

.pause-title-group {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.pause-badge {
	align-self: flex-start;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 1.5px;
	color: #fef08a;
	text-transform: uppercase;
	background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
	border: 1px solid #b45309;
	border-radius: 999px;
	padding: 2.5px 10px;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.45);
}

.pause-title {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: 22px;
	font-weight: 900;
	color: #fffbeb;
	letter-spacing: 1.5px;
	text-shadow: 0 2px 0 #2a1407, 0 4px 8px rgba(0, 0, 0, 0.7);
}

/* Tactile Carved Wood Roundel Close Button */
.pause-close-btn {
	position: relative;
	z-index: 20;
	background: linear-gradient(145deg, #4d2b17, #2c160a);
	border: 2px solid #844c27;
	border-radius: 50%;
	width: 42px;
	height: 42px;
	color: #fef3c7;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px 1.5px rgba(255, 215, 0, 0.35);
	transition: all 0.15s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	pointer-events: auto;
	flex-shrink: 0;
}

.pause-close-btn:hover {
	color: #ffffff;
	background: linear-gradient(145deg, #64371e, #3a1c0d);
	border-color: #f59e0b;
	transform: scale(1.08);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7), 0 0 12px rgba(245, 158, 11, 0.4);
}

.pause-close-btn:active {
	transform: scale(0.92);
}

/* Recessed Authentic Green Billiard Felt Tray */
.pause-felt-tray {
	background: radial-gradient(ellipse at 50% 25%, #184c2d 0%, #103820 65%, #082113 100%);
	border: 3px solid #4a2814;
	border-top: 3.5px solid #2e170a;
	border-bottom: 3.5px solid #66391d;
	border-radius: 20px;
	padding: 12px 10px;
	box-shadow:
		inset 0 10px 22px rgba(0, 0, 0, 0.92),
		inset 0 -6px 14px rgba(0, 0, 0, 0.72),
		0 3px 8px rgba(255, 255, 255, 0.05);
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-sizing: border-box;
}

.pause-menu-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pause-menu-section {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.pause-section-label {
	font-size: 11px;
	font-weight: 800;
	color: #f59e0b;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-left: 4px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Audio Section & Wooden Tile Buttons */
.pause-audio-row {
	display: flex;
	gap: 8px;
	width: 100%;
}

.pause-audio-btn {
	flex: 1;
	height: 48px;
	background: linear-gradient(180deg, #3d2314 0%, #28150a 100%);
	border: 2px solid #5a331c;
	border-bottom: 4px solid #140903;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 10px;
	cursor: pointer;
	outline: none;
	color: #ffffff;
	font-family: inherit;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px 1.5px rgba(255, 215, 0, 0.2);
	transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.pause-audio-btn:hover {
	transform: translateY(-2px);
	border-color: #8c522b;
	background: linear-gradient(180deg, #482a18 0%, #2f190d 100%);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 215, 0, 0.35);
}

.pause-audio-btn:active {
	transform: translateY(2px);
	border-bottom-width: 2px;
}

.pause-audio-btn .pause-btn-svg {
	width: 19px;
	height: 19px;
	stroke: #fbbf24;
	flex-shrink: 0;
	transition: transform 0.15s ease;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.pause-audio-btn:hover .pause-btn-svg {
	transform: scale(1.1);
}

.pause-audio-btn.is-off .pause-btn-svg {
	stroke: #78716c;
	filter: none;
}

.pause-audio-btn .pause-btn-label {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.8px;
	color: #fffbeb;
	text-transform: uppercase;
	margin-left: 6px;
	margin-right: auto;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.pause-audio-btn.is-off .pause-btn-label {
	color: #a8a29e;
	text-shadow: none;
}

.pause-status-pill {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.5px;
	padding: 2.5px 8px;
	border-radius: 999px;
	line-height: 1.2;
	text-transform: uppercase;
}

.pause-status-pill.on {
	background: #15803d;
	color: #f0fdf4;
	border: 1.5px solid #22c55e;
	box-shadow: 0 2px 6px rgba(34, 197, 94, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.pause-status-pill.off {
	background: rgba(40, 25, 15, 0.8);
	color: #a89f91;
	border: 1.5px solid #4a2d18;
}

.pause-menu-action-btn .pause-status-pill {
	flex-shrink: 0;
	margin-left: auto;
}

/* Handcrafted Wooden Action Tile Bars */
.pause-menu-action-btn {
	width: 100%;
	height: 50px;
	background: linear-gradient(180deg, #382012 0%, #25140a 100%);
	border: 2px solid #5a331c;
	border-bottom: 4px solid #150a04;
	border-radius: 14px;
	display: flex;
	align-items: center;
	padding: 0 12px;
	gap: 10px;
	cursor: pointer;
	outline: none;
	color: #ffffff;
	font-family: inherit;
	box-shadow: 0 5px 12px rgba(0, 0, 0, 0.55), inset 0 1px 1.5px rgba(255, 215, 0, 0.2);
	transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	text-align: left;
}

.pause-menu-action-btn:hover {
	transform: translateY(-2px);
	border-color: #92542c;
	background: linear-gradient(180deg, #4a2b1a 0%, #321c10 100%);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 215, 0, 0.35);
}

.pause-menu-action-btn:active {
	transform: translateY(2px);
	border-bottom-width: 2px;
}

/* Polished Brass Inlaid Medallion */
.pause-action-icon-box {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: radial-gradient(circle at 35% 35%, #78350f 0%, #451a03 100%);
	border: 1.5px solid #d97706;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #fbbf24;
	box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(0, 0, 0, 0.5);
	transition: transform 0.15s ease;
}

.pause-menu-action-btn:hover .pause-action-icon-box {
	transform: scale(1.08);
	border-color: #fbbf24;
}

.pause-action-icon-box.danger {
	background: radial-gradient(circle at 35% 35%, #991b1b 0%, #450a0a 100%);
	border-color: #ef4444;
	color: #fca5a5;
}

/* GSHelper Instagram Community Action Link */
.pause-menu-action-btn.btn-gshelper-link {
	border-color: #831843;
	border-bottom-color: #500724;
}

.pause-menu-action-btn.btn-gshelper-link:hover {
	border-color: #db2777;
	background: linear-gradient(180deg, #501d32 0%, #30101f 100%);
}

.gshelper-icon-box {
	background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%) !important;
	border-color: #f472b6 !important;
	color: #ffffff !important;
	box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.45), 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.gshelper-icon-box svg {
	display: block;
	filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.4));
}

.pause-action-svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

.pause-action-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1;
	min-width: 0;
}

.pause-action-title {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.8px;
	color: #fffbeb;
	text-transform: uppercase;
	text-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.6);
}

.pause-action-sub {
	font-size: 11px;
	font-weight: 600;
	color: #e2cbb0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pause-action-chevron {
	font-size: 12px;
	font-weight: 900;
	color: #f59e0b;
	transition: transform 0.15s ease, color 0.15s ease;
}

.pause-menu-action-btn:hover .pause-action-chevron {
	transform: translateX(3px);
	color: #fbbf24;
}

/* Specific styling for Quit & Reset Buttons */
.pause-menu-action-btn.btn-quit-game {
	border-color: #6b2121;
	border-bottom-color: #2b0b0b;
	margin-top: 2px;
}

.pause-menu-action-btn.btn-quit-game:hover {
	border-color: #991b1b;
	background: linear-gradient(180deg, #441818 0%, #2a0c0c 100%);
}

.pause-menu-action-btn.btn-quit-game:hover .pause-action-chevron {
	color: #f87171;
}

.pause-menu-action-btn.btn-quit-game .pause-action-title {
	color: #fee2e2;
}

.pause-menu-action-btn.btn-quit-game .pause-action-sub {
	color: #fca5a5;
	opacity: 0.85;
}

/* Dedicated Scenery Picker Modal */
.scenery-picker-card {
	max-width: 380px;
}

.scenery-picker-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}

.scenery-tile-btn {
	background: #252429;
	border: 1.5px solid rgba(255, 255, 255, 0.14);
	border-bottom: 3.5px solid #141318;
	border-radius: 16px;
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	outline: none;
	color: #ffffff;
	font-family: inherit;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
	transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	position: relative;
	box-sizing: border-box;
}

.scenery-tile-btn:nth-child(5) {
	grid-column: 1 / -1;
	flex-direction: row;
	justify-content: center;
	gap: 12px;
	padding: 10px 14px;
}

.scenery-tile-btn:hover {
	transform: translateY(-2px);
	border-color: rgba(251, 191, 36, 0.45);
	background: #2d2b33;
}

.scenery-tile-btn:active {
	transform: translateY(2px);
	border-bottom-width: 1.5px;
}

.scenery-tile-btn.active {
	border-color: #fbbf24;
	border-bottom-color: #b45309;
	background: rgba(251, 191, 36, 0.15);
	box-shadow: 0 0 16px rgba(251, 191, 36, 0.3);
}

.scenery-tile-thumb {
	width: 100%;
	height: 64px;
	border-radius: 10px;
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.5);
	margin-bottom: 4px;
	position: relative;
	overflow: hidden;
}

.scenery-tile-btn:nth-child(5) .scenery-tile-thumb {
	width: 130px;
	height: 52px;
	margin-bottom: 0;
	flex-shrink: 0;
}

.scenery-tile-btn.locked .scenery-tile-thumb {
	filter: brightness(0.72) contrast(0.95);
}

.scenery-tile-btn.active .scenery-tile-thumb {
	border-color: #fbbf24;
	box-shadow: 0 0 14px rgba(251, 191, 36, 0.5);
}

.scenery-tile-label {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: #e2e8f0;
}

.scenery-tile-btn.active .scenery-tile-label {
	color: #fef08a;
}

.scenery-tile-indicator {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 12px;
	font-weight: 900;
	color: #fbbf24;
	opacity: 0;
	transform: scale(0.6);
	transition: all 0.15s ease;
}

.scenery-tile-btn.locked {
	opacity: 0.88;
	background: #18171d;
	border-color: rgba(255, 255, 255, 0.08);
}

.scenery-tile-btn.locked .scenery-tile-icon {
	filter: grayscale(0.4);
}

.scenery-tile-btn.locked .scenery-tile-indicator {
	opacity: 1;
	transform: scale(1);
	font-size: 9px;
	letter-spacing: 0.4px;
	background: rgba(245, 158, 11, 0.16);
	border: 1px solid rgba(245, 158, 11, 0.35);
	padding: 2px 6px;
	border-radius: 6px;
	color: #fbbf24;
}

.scenery-tile-btn:not(.active):not(.locked) .scenery-tile-indicator {
	opacity: 0.75;
	transform: scale(1);
	font-size: 9px;
	letter-spacing: 0.4px;
	color: #94a3b8;
}

.scenery-tile-btn.active .scenery-tile-indicator {
	opacity: 1;
	transform: scale(1);
	font-size: 14px;
	color: #4ade80;
}

.scenery-picker-footer {
	display: flex;
	justify-content: center;
}

.scenery-back-btn {
	justify-content: center;
	text-align: center;
	height: 46px;
}

.scenery-back-btn span {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: #cbd5e1;
}

.theme-card {
	background: linear-gradient(180deg, #241d33, #151120);
	border: 1.5px solid rgba(234, 179, 8, 0.7);
	border-radius: 20px;
	padding: 24px;
	max-width: 460px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 16px 48px rgba(0,0,0,0.8), 0 0 32px rgba(234, 179, 8, 0.2);
	transform: scale(0.92);
	transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#theme-modal.show .theme-card {
	transform: scale(1.0);
}

.theme-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	padding-bottom: 10px;
}

.theme-header h3 {
	margin: 0;
	font-size: 18px;
	color: #fef08a;
	letter-spacing: 0.8px;
}

.theme-close {
	background: transparent;
	border: none;
	color: #94a3b8;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	transition: color 0.2s;
}

.theme-close:hover {
	color: #ffffff;
}

.theme-section {
	margin-bottom: 20px;
}

.theme-label {
	font-size: 12px;
	font-weight: 700;
	color: #d49a37;
	letter-spacing: 1px;
	margin-bottom: 10px;
}

.skin-selector, .scenery-selector {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 8px;
}

.cam-mode-selector {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.cam-mode-opt {
	background: rgba(30, 24, 40, 0.7);
	border: 1.5px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 12px 10px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	color: #cbd5e1;
	transition: all 0.2s ease;
}

.cam-mode-opt:hover {
	background: rgba(50, 40, 65, 0.9);
	border-color: rgba(234, 179, 8, 0.6);
	transform: translateY(-2px);
}

.cam-mode-opt.active {
	border-color: #eab308;
	background: rgba(70, 50, 20, 0.55);
	box-shadow: 0 0 14px rgba(234, 179, 8, 0.45);
	color: #fef08a;
}

.cam-mode-icon {
	font-size: 26px;
	line-height: 1;
}

.cam-mode-text strong {
	display: block;
	font-size: 13px;
	font-weight: 700;
}

.cam-mode-text small {
	display: block;
	font-size: 10px;
	opacity: 0.8;
	margin-top: 3px;
}

.skin-opt, .scenery-opt {
	background: rgba(30, 24, 40, 0.7);
	border: 1.5px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 10px 6px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #cbd5e1;
	font-size: 11px;
	font-weight: 600;
	transition: all 0.2s ease;
}

.skin-opt:hover, .scenery-opt:hover {
	background: rgba(50, 40, 65, 0.9);
	border-color: rgba(234, 179, 8, 0.6);
	transform: translateY(-2px);
}

.skin-opt.active, .scenery-opt.active {
	border-color: #eab308;
	background: rgba(70, 50, 20, 0.5);
	box-shadow: 0 0 14px rgba(234, 179, 8, 0.4);
	color: #fef08a;
}

.skin-preview {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 15px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.skin-classic { background: #fdfbf7; color: #361d0a; border: 1.5px solid #be8432; }
.skin-obsidian { background: #1a181e; color: #fbbf24; border: 1.5px solid #d97706; }
.skin-marble { background: #f3f4f6; color: #1e293b; border: 1.5px solid #94a3b8; }
.skin-jade { background: #ecfdf5; color: #064e3b; border: 1.5px solid #10b981; }
.skin-sunset { background: #fff1f2; color: #9f1239; border: 1.5px solid #fb7185; }

/* 2D tile-set image previews (selector, gift box & trial modals) */
.skin-img-preview {
	background: transparent !important;
	border: none !important;
	padding: 0;
	overflow: hidden;
}
.skin-img-preview img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}
.skin-opt .skin-preview.skin-img-preview {
	width: 40px;
	height: 40px;
}

.scenery-icon {
	font-size: 22px;
	line-height: 1;
}

/* Instructions tooltip / hint (hidden to prevent any obstruction) */
.hud-hint {
	display: none;
}

/* Responsive Mobile & Portrait Layout */
@media (max-width: 680px), (max-aspect-ratio: 1/1) {
	#hud-header {
		top: 10px;
		top: max(10px, env(safe-area-inset-top));
		left: 0;
		width: 100%;
		display: flex;
		justify-content: center;
		padding: 0 12px;
		padding-left: max(12px, env(safe-area-inset-left));
		padding-right: max(12px, env(safe-area-inset-right));
	}

	.hud-top-bar {
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		max-width: 500px;
	}

	.hud-left-pill {
		display: none !important;
	}

	.hud-gear-btn {
		width: 36px;
		height: 36px;
		flex-shrink: 0;
		background: transparent !important;
		border: none !important;
		box-shadow: none !important;
	}

	.hud-action-pill-btn {
		display: none !important;
	}

	.hud-right-actions {
		position: absolute;
		right: 0;
		top: 10px;
		transform: none;
		gap: 6px;
	}

	.hud-speedometer {
		padding: 2px 4px;
		border: none !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.speedo-dial {
		width: 114px;
		height: 62px;
	}

	.speedo-number {
		font-size: 20px;
	}

	.speedo-sub-badge {
		font-size: 9.5px;
		height: 13px;
		line-height: 13px;
	}

	.hud-star-track {
		width: 192px;
		height: 40px;
		margin-top: 4px;
	}

	.star-track-bar {
		left: 18px;
		right: 18px;
		height: 4px;
	}

	.star-track-node {
		width: 38px;
		height: 38px;
	}

	.star-track-node.node-star-1 {
		left: 18px;
	}

	.star-track-node.node-star-2 {
		left: 50%;
	}

	.star-track-node.node-star-3 {
		left: calc(100% - 18px);
	}

	.star-track-svg,
	.hud-star-img {
		width: 32px;
		height: 32px;
	}

	.chain-dot {
		width: 8px;
		height: 8px;
	}

	#hud-bottom {
		bottom: 12px;
		bottom: max(12px, env(safe-area-inset-bottom));
		gap: 8px;
		padding: 0 10px;
	}

	.hud-action-btn,
	.btn-recharge-keys {
		height: 44px;
		padding: 0 8px;
		border-radius: 14px;
	}

	.hud-btn-label {
		font-size: 10px;
	}

	.action-btn {
		font-size: 13px;
		padding: 9px 14px;
		min-height: 42px;
		border-radius: 21px;
		flex: 1;
		max-width: 125px;
		justify-content: center;
	}

	.tactile-next-btn {
		left: 50%;
		bottom: 226px;
		bottom: max(226px, calc(env(safe-area-inset-bottom) + 206px));
		min-width: 164px;
		height: 52px;
		padding: 0 22px;
		border-radius: 26px;
	}

	.next-arrow-icon {
		font-size: 18px;
	}

	.next-label {
		font-size: 16px;
		letter-spacing: 2px;
	}
}

/* ==============================================================================
   Gift Box Unlock & Reward Modals
   ============================================================================== */
.reward-card {
	background: linear-gradient(180deg, #2a180c 0%, #170d06 100%);
	border: 2.5px solid #b47a3e;
	box-shadow:
		0 18px 48px rgba(0, 0, 0, 0.95),
		0 0 28px rgba(251, 191, 36, 0.35),
		inset 0 2px 6px rgba(255, 235, 180, 0.25);
	border-radius: 22px;
	padding: 24px 20px 20px 20px;
	max-width: 320px;
	width: 86%;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	overflow: hidden;
	animation: popModal 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.reward-title {
	font-size: 21px;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #fef08a;
	margin: 0 0 16px 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
	text-transform: uppercase;
}

.reward-cubby-stage,
.reward-showcase {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 14px 0;
}

.single-reward-cubby {
	width: 200px !important;
	height: 108px !important;
	border-radius: 16px !important;
	box-shadow:
		inset 0 10px 22px rgba(0, 0, 0, 0.95),
		inset 0 -4px 10px rgba(0, 0, 0, 0.6),
		0 8px 20px rgba(0, 0, 0, 0.6) !important;
	cursor: default !important;
	pointer-events: none;
}

.single-reward-cubby .cubby-felt-floor {
	height: 100% !important;
	border-radius: 14px;
}

.single-reward-cubby .cubby-tiles-stage {
	gap: 12px !important;
}

.single-reward-cubby .cubby-tile-unit {
	width: 44px !important;
	height: 44px !important;
}

.single-reward-cubby .cubby-tile-img {
	width: 44px !important;
	height: 44px !important;
}

.reward-scenery-preview-card {
	width: 200px;
	height: 108px;
	border-radius: 16px;
	border: 2.5px solid #b47a3e;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.85),
		0 0 20px rgba(251, 191, 36, 0.35),
		inset 0 0 14px rgba(0, 0, 0, 0.7);
	position: relative;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	box-sizing: border-box;
}

.reward-scenery-vignette {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at center, transparent 35%, rgba(0, 0, 0, 0.45) 100%),
	            linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
	pointer-events: none;
}

.reward-name {
	font-size: 17px;
	font-weight: 900;
	letter-spacing: 1px;
	color: #ffd700;
	margin: 0 0 18px 0;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
	text-transform: uppercase;
}

.reward-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	position: relative;
	z-index: 100;
	touch-action: manipulation;
}

.reward-btn-trial {
	background: rgba(35, 22, 14, 0.85);
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	color: #e2e8f0;
	padding: 12px 14px;
	border-radius: 14px;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.8px;
	cursor: pointer;
	transition: all 0.15s ease;
	outline: none;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	text-transform: uppercase;
	touch-action: manipulation !important;
	-webkit-tap-highlight-color: transparent !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	pointer-events: auto !important;
	position: relative;
	z-index: 101;
}

.reward-btn-trial:hover {
	background: rgba(60, 38, 24, 0.95);
	border-color: rgba(251, 191, 36, 0.5);
	color: #fef08a;
	transform: scale(1.02);
}

.reward-btn-trial:active {
	transform: scale(0.98);
}

.reward-btn-ad {
	background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
	border: 2px solid #fef08a;
	color: #1a0a00;
	padding: 13px 14px;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 1px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
	transition: all 0.15s ease;
	outline: none;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-transform: uppercase;
	touch-action: manipulation !important;
	-webkit-tap-highlight-color: transparent !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	pointer-events: auto !important;
	position: relative;
	z-index: 101;
}

.reward-btn-ad:hover {
	transform: scale(1.02);
	background: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%);
	box-shadow: 0 8px 24px rgba(245, 158, 11, 0.65);
}

.reward-btn-ad:active {
	transform: scale(0.98);
}

@keyframes floatPreview {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

/* ==============================================================================
   Google AdMob Rewarded Video Simulation
   ============================================================================== */
.admob-overlay {
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.92);
	z-index: 100050 !important;
	display: none;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
}

.admob-overlay.show,
.admob-overlay.active {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.admob-container {
	width: 92%;
	max-width: 420px;
	background: #111418;
	border: 1.5px solid #2d3748;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
	display: flex;
	flex-direction: column;
	animation: popModal 0.35s ease;
}

.admob-header {
	background: #1a202c;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #2d3748;
}

.admob-badge {
	display: flex;
	align-items: center;
	gap: 8px;
}

.admob-logo {
	background: #3b82f6;
	color: #fff;
	font-size: 10px;
	font-weight: 900;
	padding: 2px 5px;
	border-radius: 4px;
}

.admob-brand {
	font-size: 11px;
	font-weight: 700;
	color: #94a3b8;
}

.admob-countdown {
	font-size: 12px;
	font-weight: 800;
	color: #fbbf24;
}

.admob-close-btn {
	background: none;
	border: none;
	color: #64748b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	min-width: 36px;
	min-height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
}

.admob-close-btn:not(:disabled) {
	color: #fff;
	cursor: pointer;
}

.admob-close-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.admob-video-stage {
	background: radial-gradient(circle at center, #2e1065 0%, #090314 100%);
	padding: 36px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	min-height: 220px;
}

.admob-sponsor-icon {
	font-size: 48px;
	margin-bottom: 12px;
	animation: pulsePlay 1.5s infinite ease-in-out;
}

.admob-game-title {
	font-size: 22px;
	font-weight: 900;
	color: #fff9e6;
	letter-spacing: 1px;
	margin: 0 0 6px 0;
	text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.admob-game-tagline {
	font-size: 12px;
	color: #cbd5e1;
	margin: 0 0 16px 0;
}

.admob-stars-burst {
	font-size: 24px;
	margin-bottom: 16px;
	animation: floatPreview 2s infinite ease-in-out;
}

.admob-progress-bar-container {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 12px;
}

.admob-progress-bar-fill {
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, #3b82f6, #10b981);
	border-radius: 3px;
	transition: width 0.1s linear;
}

.admob-reward-grant-notice {
	font-size: 12px;
	font-weight: 800;
	color: #10b981;
	opacity: 0;
	transform: translateY(6px);
	transition: all 0.3s ease;
}

.admob-reward-grant-notice.show {
	opacity: 1;
	transform: translateY(0);
}

.admob-footer {
	background: #1a202c;
	padding: 10px 14px;
	border-top: 1px solid #2d3748;
}

.admob-unit-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 10px;
	color: #64748b;
	font-family: 'Alice', serif;
}

.admob-status-tag {
	color: #10b981;
	font-weight: 700;
}

/* ==============================================================================
   Customization Badges in Settings
   ============================================================================== */
.item-badge-owned {
	font-size: 9px;
	font-weight: 800;
	color: #10b981;
	background: rgba(16, 185, 129, 0.18);
	border: 1px solid rgba(16, 185, 129, 0.4);
	padding: 1px 6px;
	border-radius: 6px;
	margin-top: 3px;
}

.item-badge-trial {
	font-size: 9px;
	font-weight: 800;
	color: #f59e0b;
	background: rgba(245, 158, 11, 0.18);
	border: 1px solid rgba(245, 158, 11, 0.5);
	padding: 1px 6px;
	border-radius: 6px;
	margin-top: 3px;
}

.item-badge-locked {
	font-size: 9px;
	font-weight: 800;
	color: #94a3b8;
	background: rgba(148, 163, 184, 0.15);
	border: 1px solid rgba(148, 163, 184, 0.3);
	padding: 1px 6px;
	border-radius: 6px;
	margin-top: 3px;
}

/* ==============================================================================
   Title Screen & Settings: Dedicated Level Select & Star Progress Buttons
   ============================================================================== */
.title-btn-all-levels {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(168, 85, 247, 0.28) 100%);
	border: 1.5px solid rgba(255, 215, 0, 0.55);
	border-radius: 14px;
	color: #fef08a;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.8px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	width: 100%;
	margin-top: 2px;
	margin-bottom: 4px;
}

.title-btn-all-levels:hover {
	transform: translateY(-2px);
	border-color: #ffd700;
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(168, 85, 247, 0.45) 100%);
	box-shadow: 0 6px 18px rgba(255, 215, 0, 0.35);
}

.btn-settings-all-levels {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
	border: 1.5px solid rgba(255, 215, 0, 0.4);
	border-radius: 10px;
	color: #fef08a;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	margin-top: 8px;
	width: 100%;
	transition: all 0.2s ease;
}

.btn-settings-all-levels:hover {
	border-color: #ffd700;
	background: rgba(245, 158, 11, 0.35);
	transform: translateY(-1px);
}

/* ==============================================================================
   In-World 3D Letter Trays & Concierge Bell Level Select
   ============================================================================== */

/* Live World Stage: keep live animated scenery & 3D canvas 100% crisp, hide foreground HUD */
body.world-map-active #scenery-container {
	filter: none !important;
	-webkit-filter: none !important;
}

body.world-map-active #canvas-container {
	opacity: 1 !important;
	visibility: visible !important;
}

body.world-map-active #title-screen,
body.world-map-active #hud-header,
body.world-map-active #hud-bottom,
body.world-map-active #btn-floating-next,
body.world-map-active #post-win-subactions,
body.world-map-active .hud-hint {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transition: opacity 0.22s ease;
}

#level-select-modal.world-trays-modal {
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.34) 0%, rgba(15, 23, 42, 0.08) 38%, rgba(15, 23, 42, 0.24) 100%) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	padding: 0 !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	z-index: 145;
}

.world-trays-shell {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}

.world-trays-topbar {
	position: relative;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: max(12px, calc(env(safe-area-inset-top) + 8px)) 16px 4px 16px;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	box-sizing: border-box;
	flex-shrink: 0;
}

.world-stars-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(24, 24, 27, 0.72);
	border: 2px solid #eab308;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 14px;
	font-weight: 900;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
	flex-shrink: 0;
}

.world-stars-pill .stars-icon {
	color: #facc15;
	font-size: 15px;
	filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.8));
}

.world-stars-pill .stars-icon-img {
	width: 22px;
	height: 22px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.stars-total-max {
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.88);
	font-weight: 800;
}

.world-scenery-title {
	margin: 0;
	padding: 0 4px;
	min-width: 0;
	flex: 1;
	font-size: clamp(12.5px, 3.5vw, 15px);
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffffff;
	text-align: center;
	text-transform: uppercase;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.9);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

.world-close-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.65);
	background: rgba(55, 65, 81, 0.82);
	color: #ffffff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42);
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.world-close-btn:hover {
	background: rgba(239, 68, 68, 0.88);
	border-color: #ffffff;
	transform: scale(1.06);
}

.world-close-btn:active {
	transform: scale(0.92);
}

.world-select-header-wrap {
	position: relative;
	z-index: 6;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 4px 16px 6px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	flex-shrink: 0;
}

.world-select-heading {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: clamp(22px, 6.2vw, 28px);
	font-weight: 900;
	letter-spacing: 1px;
	color: #ffffff;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.05;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.52), 0 1px 2px rgba(0, 0, 0, 0.65);
}

.world-unlock-hint {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 20;
	margin-top: 4px;
	padding: 5px 14px;
	border-radius: 999px;
	background: rgba(18, 12, 8, 0.88);
	border: 1px solid rgba(255, 215, 0, 0.65);
	color: #fef08a;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.4px;
	white-space: nowrap;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: translate(-50%, -6px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.world-unlock-hint.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Centered vertical stack of 6 Illustrated Level Buttons */
.world-rect-list-wrap {
	position: relative;
	z-index: 4;
	flex: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px 16px 4px 16px;
	box-sizing: border-box;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.world-rect-list {
	width: 100%;
	max-width: 372px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(8px, 1.55dvh, 14px);
}

.world-rect-list.is-world-locked .level-rect-btn.is-locked {
	opacity: 0.78;
}

/* Prominent World Lock Symbol Overlay (shown when scrolling to a locked World, and animated during New Area Unlock) */
.world-lock-overlay {
	position: absolute;
	inset: 0;
	z-index: 8;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
	opacity: 0;
	transform: scale(0.92);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.world-lock-overlay.show {
	opacity: 1;
	transform: scale(1);
}

.world-lock-medallion {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 16px 24px;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.95) 100%);
	border: 2px solid rgba(250, 204, 21, 0.78);
	box-shadow:
		0 12px 30px rgba(0, 0, 0, 0.65),
		0 0 22px rgba(250, 204, 21, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	text-align: center;
	max-width: 300px;
}

.world-lock-glyph {
	font-size: 38px;
	line-height: 1.05;
	filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65));
}

.world-lock-label {
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #fde047;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.world-lock-req {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	color: #e2e8f0;
	line-height: 1.3;
}

.world-lock-medallion.shaking {
	animation: levelRectLockedShake 0.34s ease;
}

@keyframes worldUnlockCeremonyBurst {
	0% {
		transform: scale(0.96);
		opacity: 1;
	}
	16% {
		transform: scale(1.12) rotate(-3deg);
		opacity: 1;
	}
	32% {
		transform: scale(1.08) rotate(2deg);
		opacity: 1;
	}
	78% {
		transform: scale(1.06);
		opacity: 1;
	}
	100% {
		transform: scale(1.22);
		opacity: 0;
	}
}

.world-lock-overlay.is-unlocking {
	opacity: 1;
	animation: worldUnlockCeremonyBurst 1.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.world-lock-overlay.is-unlocking .world-lock-medallion {
	background: linear-gradient(180deg, #fef9c3 0%, #facc15 52%, #d97706 100%);
	border-color: #ffffff;
	box-shadow:
		0 14px 34px rgba(0, 0, 0, 0.55),
		0 0 38px rgba(250, 204, 21, 0.85),
		inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

.world-lock-overlay.is-unlocking .world-lock-label {
	color: #451a03;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.world-lock-overlay.is-unlocking .world-lock-req {
	color: #78350f;
	font-weight: 900;
}

@keyframes levelBtnJustUnlockedPop {
	0% {
		transform: scale(0.94);
		filter: brightness(1.35);
		box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.9), 0 5px 0 #065f46, 0 10px 20px rgba(0, 0, 0, 0.45);
	}
	45% {
		transform: scale(1.04);
		filter: brightness(1.15);
		box-shadow: 0 0 26px 6px rgba(250, 204, 21, 0.75), 0 5px 0 #065f46, 0 12px 24px rgba(0, 0, 0, 0.5);
	}
	100% {
		transform: scale(1);
		filter: brightness(1);
		box-shadow: 0 5px 0 #065f46, 0 10px 20px rgba(0, 0, 0, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.65);
	}
}

.level-rect-btn.is-unlocked.just-unlocked {
	animation: levelBtnJustUnlockedPop 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.level-rect-btn {
	position: relative;
	width: 100%;
	max-width: 372px;
	aspect-ratio: 516 / 122;
	padding: 6px 14px;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	border-radius: 16px;
	background-color: transparent;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	cursor: pointer;
	outline: none;
	box-sizing: border-box;
	text-align: center;
	filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.36));
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.1s ease, filter 0.15s ease;
}

/* 1. Uncompleted Playable Level (Warm Golden Yellow Wood Card) */
.level-rect-btn.is-unlocked {
	background: url('../AssetsScruffle/ButtonLevelSelectYellow.png') center / 100% 100% no-repeat;
	filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.55)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.36));
}

.level-rect-btn.is-unlocked.is-current-level {
	filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.85)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.42));
}

/* 2. Completed Level (Green Illustrated Card with Gold Completion Accent) */
.level-rect-btn.is-completed {
	background: url('../AssetsScruffle/ButtonLevelSelectUnlocked.png') center / 100% 100% no-repeat;
	filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.45)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.36));
}

.level-rect-btn.is-completed.is-current-level {
	filter: drop-shadow(0 0 12px rgba(52, 211, 153, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

/* 3. Sequentially Locked Level (Charcoal Illustrated Card with Center Padlock) */
.level-rect-btn.is-locked {
	background: url('../AssetsScruffle/ButtonLevelSelectLocked.png') center / 100% 100% no-repeat;
}

.level-rect-btn.is-unlocked:hover,
.level-rect-btn.is-completed:hover {
	filter: brightness(1.05) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.42));
	transform: translateY(-1px);
}

.level-rect-btn.is-unlocked:active,
.level-rect-btn.is-unlocked.pressing,
.level-rect-btn.is-completed:active,
.level-rect-btn.is-completed.pressing {
	transform: translateY(3px) scale(0.985);
	filter: brightness(0.96) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.36));
}

@keyframes levelRectLockedShake {
	0%, 100% { transform: translateX(0); }
	22% { transform: translateX(-5px); }
	45% { transform: translateX(5px); }
	70% { transform: translateX(-3px); }
	88% { transform: translateX(3px); }
}

.level-rect-btn.is-locked.shaking {
	animation: levelRectLockedShake 0.32s ease;
}

/* Left Column: LEVEL N + STATUS */
.level-rect-left {
	width: 28%;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	text-align: center;
}

.level-rect-lvl {
	font-family: 'Alice', serif;
	font-size: clamp(12.5px, 3.4vw, 15px);
	font-weight: 900;
	letter-spacing: 0.4px;
	line-height: 1.05;
	color: #ffffff;
	text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.45);
	white-space: nowrap;
}

.level-rect-status {
	font-size: clamp(9.5px, 2.5vw, 11px);
	font-weight: 800;
	letter-spacing: 0.4px;
	line-height: 1.05;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.94);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
	white-space: nowrap;
}

.level-rect-btn.is-unlocked .level-rect-lvl {
	color: #ffffff;
	text-shadow: 0 1.5px 3px rgba(120, 53, 15, 0.95);
}

.level-rect-btn.is-unlocked .level-rect-status {
	color: #ffffff;
	text-shadow: 0 1.5px 3px rgba(120, 53, 15, 0.95);
}

.level-rect-btn.is-unlocked .level-rect-word {
	color: #ffffff;
	text-shadow: 0 2px 3px rgba(120, 53, 15, 0.8);
}

.level-rect-btn.is-completed .level-rect-status {
	color: #fef08a;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.level-rect-btn.is-locked .level-rect-status {
	color: rgba(226, 232, 240, 0.8);
}

/* Center Column: Word Title + Tap to Play (empty on Locked so baked padlock shows cleanly) */
.level-rect-center {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	overflow: visible;
}

.level-rect-word {
	font-family: 'Alice', serif;
	font-size: clamp(22px, 6vw, 28px);
	font-weight: 900;
	letter-spacing: 1.5px;
	line-height: 1.05;
	white-space: nowrap;
	overflow: visible;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	text-shadow: 0 2px 3px rgba(0, 0, 0, 0.28);
	padding: 0;
}

.level-rect-letter {
	display: inline-block;
	transform-origin: bottom center;
	will-change: transform;
}

.level-rect-btn.is-current-level .level-rect-letter {
	animation: levelLetterWaveHop 2.4s ease-in-out infinite;
}

@keyframes levelLetterWaveHop {
	0%, 20%, 100% {
		transform: translateY(0);
	}
	9% {
		transform: translateY(-6px);
	}
	14% {
		transform: translateY(1.5px);
	}
	18% {
		transform: translateY(0);
	}
}

.level-rect-sub {
	font-size: clamp(9.5px, 2.5vw, 11.5px);
	font-weight: 800;
	letter-spacing: 0.6px;
	line-height: 1.1;
	color: rgba(255, 255, 255, 0.95);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
	white-space: nowrap;
}

.level-rect-btn.is-unlocked .level-rect-sub {
	color: #ffffff;
	background: rgba(146, 64, 14, 0.48);
	padding: 1.5px 8px;
	border-radius: 999px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.level-rect-btn.is-completed .level-rect-sub {
	color: #fef08a;
	background: rgba(6, 78, 59, 0.36);
	padding: 1.5px 8px;
	border-radius: 999px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Right Column: 3-Star Podium Cluster */
.level-rect-stars {
	width: 28%;
	flex-shrink: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0;
	padding-top: 3px;
}

.level-rect-star-img {
	width: 21px;
	height: 21px;
	object-fit: contain;
	display: block;
	pointer-events: none;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
	transition: transform 0.2s ease, filter 0.2s ease;
}

.level-rect-star-img.level-rect-star-pos-1 {
	margin-right: -3px;
}

.level-rect-star-img.level-rect-star-pos-2 {
	width: 27px;
	height: 27px;
	transform: translateY(-4px);
	z-index: 2;
}

.level-rect-star-img.level-rect-star-pos-3 {
	margin-left: -3px;
}

.level-rect-star-img.earned {
	filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.55));
}

/* Illustrated Bottom Navigation Bar for Portrait Mode */
.world-trays-bottombar {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	max-width: 392px;
	margin: 0 auto;
	padding: 6px 16px max(14px, calc(env(safe-area-inset-bottom) + 8px)) 16px;
	box-sizing: border-box;
	flex-shrink: 0;
}

.world-thumb-nav-btn {
	width: 108px;
	height: auto;
	aspect-ratio: 172 / 78;
	padding: 0;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	outline: none;
	user-select: none;
	-webkit-user-select: none;
	flex-shrink: 0;
}

.world-nav-art-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
	filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.45));
}

.world-thumb-nav-btn:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.world-thumb-nav-btn:active {
	transform: translateY(2px) scale(0.96);
}

.world-thumb-nav-btn.is-disabled {
	opacity: 0.48;
	filter: saturate(0.75);
	pointer-events: none;
}

/* Sleek World Progress Dots in the Center */
.world-pips-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: rgba(15, 23, 42, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.22);
	padding: 5px 9px;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	flex-shrink: 0;
}

.world-pip {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.32);
	border: 1px solid rgba(255, 255, 255, 0.4);
	transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	cursor: pointer;
}

.world-pip.active {
	width: 18px;
	border-radius: 999px;
	background: linear-gradient(90deg, #fde047, #f59e0b);
	border-color: #ffffff;
	box-shadow: 0 0 10px rgba(250, 204, 21, 0.85);
}

.world-pip.is-locked {
	opacity: 0.45;
}

/* Post-Win Speed Replay & Levels Shortcut Pills */
.post-win-subactions {
	position: absolute;
	left: 50%;
	bottom: 180px;
	bottom: max(180px, calc(env(safe-area-inset-bottom) + 158px));
	transform: translateX(-50%) translateY(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	opacity: 0;
	pointer-events: none;
	z-index: 60;
	transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-win-subactions.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.post-win-pill-btn {
	background: rgba(24, 16, 10, 0.78);
	border: 1.5px solid rgba(255, 224, 130, 0.65);
	border-radius: 999px;
	color: #fffbeb;
	padding: 7px 15px;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.9px;
	cursor: pointer;
	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.5);
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	white-space: nowrap;
}

.post-win-pill-btn:hover {
	background: rgba(45, 28, 14, 0.92);
	border-color: #ffd700;
	transform: translateY(-2px);
}

.post-win-pill-btn:active {
	transform: translateY(1px) scale(0.96);
}

@media (max-width: 390px) {
	.world-trays-topbar {
		padding-left: 12px;
		padding-right: 12px;
		gap: 6px;
	}
	.world-scenery-title {
		font-size: 12px;
		letter-spacing: 0.4px;
	}
	.world-stars-pill {
		padding: 4px 10px;
		font-size: 12.5px;
	}
	.level-rect-btn {
		padding: 5px 12px;
	}
	.level-rect-word {
		font-size: clamp(20px, 5.5vw, 24px);
		letter-spacing: 1.2px;
	}
	.level-rect-star-img {
		width: 19px;
		height: 19px;
	}
	.level-rect-star-img.level-rect-star-pos-2 {
		width: 24px;
		height: 24px;
	}
	.world-thumb-nav-btn {
		width: 96px;
	}
}

@media (max-height: 700px) {
	.world-trays-topbar {
		padding-top: 8px;
		padding-bottom: 2px;
	}
	.world-select-header-wrap {
		padding-top: 2px;
		padding-bottom: 4px;
	}
	.world-select-heading {
		font-size: 20px;
	}
	.world-rect-list {
		gap: 7px;
	}
	.level-rect-btn {
		height: 68px;
		aspect-ratio: auto;
	}
	.world-trays-bottombar {
		padding-top: 4px;
		padding-bottom: 8px;
	}
	.world-thumb-nav-btn {
		width: 92px;
	}
}

@media (max-height: 630px) {
	.world-rect-list {
		gap: 5px;
	}
	.level-rect-btn {
		height: clamp(54px, 9.6dvh, 64px);
	}
}

/* ==============================================================================
   3D Celebratory Win Star Card (Completed Level)
   ============================================================================== */
.win-celebration-card {
	position: fixed;
	top: 14%;
	left: 50%;
	transform: translateX(-50%) translateY(-20px) scale(0.9);
	background: radial-gradient(130% 120% at 50% 10%, #2f1d44 0%, #170f24 60%, #0c0814 100%);
	border: 2px solid #ffd700;
	border-radius: 24px;
	padding: 18px 24px 20px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.9),
		0 0 40px rgba(255, 215, 0, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.5);
	z-index: 1500;
	opacity: 0;
	pointer-events: none;
	transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	user-select: none;
	min-width: 240px;
}

.win-celebration-card.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0) scale(1);
}

.win-celeb-banner {
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 1.5px;
	color: #ffd700;
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.win-celeb-level-title {
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 1px;
	color: #e2e8f0;
	text-transform: uppercase;
	margin-top: -3px;
}

.win-celeb-record-badge {
	background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
	color: #120e1c;
	font-weight: 900;
	font-size: 11px;
	padding: 2px 10px;
	border-radius: 999px;
	letter-spacing: 0.8px;
	box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
	animation: pulseRecord 1.5s infinite;
}

@keyframes pulseRecord {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.06); }
}

.win-celeb-stars {
	display: flex;
	gap: 8px;
	font-size: 34px;
	margin: 2px 0 4px 0;
}

.win-celeb-star {
	display: inline-block;
	transform: scale(0);
	animation: starPopIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.win-celeb-star.earned {
	filter: drop-shadow(0 0 8px #ffd700) drop-shadow(0 0 16px #f59e0b);
}

.win-celeb-star.empty {
	color: rgba(255, 255, 255, 0.25);
}

@keyframes starPopIn {
	0% { transform: scale(0) rotate(-45deg); opacity: 0; }
	60% { transform: scale(1.3) rotate(15deg); opacity: 1; }
	100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.win-celeb-speed {
	font-size: 20px;
	font-weight: 900;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.win-celeb-tier {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.8px;
}

.win-celeb-actions {
	display: flex;
	gap: 8px;
	margin-top: 6px;
	width: 100%;
}

.win-celeb-btn-replay, .win-celeb-btn-levels, .win-celeb-btn-next {
	flex: 1;
	padding: 9px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	white-space: nowrap;
}

.win-celeb-btn-replay {
	background: rgba(0, 229, 255, 0.16);
	color: #00e5ff;
	border: 1px solid rgba(0, 229, 255, 0.4);
}

.win-celeb-btn-replay:hover {
	background: rgba(0, 229, 255, 0.28);
	border-color: #00e5ff;
	transform: translateY(-1px);
}

.win-celeb-btn-levels {
	background: rgba(255, 255, 255, 0.12);
	color: #f8fafc;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.win-celeb-btn-levels:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: translateY(-1px);
}

.win-celeb-btn-next {
	background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
	color: #120e1c;
	box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
}

.win-celeb-btn-next:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(255, 215, 0, 0.6);
}

/* Redundant speedo banner and win celebration card report popup suppressed per user request */
.hud-win-speed-banner, #win-celebration-card, .win-celebration-card {
	display: none !important;
}

/* Settings and Home Level Name tags */
.settings-lvl-tag, .home-lvl-tag {
	opacity: 0.85;
	font-weight: 700;
	font-size: 12px;
}

.settings-lvl-name, .home-lvl-name {
	font-weight: 900;
	color: #ffd700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}

/* ==============================================================================
   Gift Box Modal Color-Coded Themes (Red for Tiles, Emerald for Environments)
   ============================================================================== */
.modal-theme-skin .reward-badge-ribbon {
	background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
	border-color: #ffd700;
	box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
}
.modal-theme-skin .reward-glow-aura {
	background: radial-gradient(circle, rgba(239, 68, 68, 0.5) 0%, rgba(245, 158, 11, 0.3) 50%, transparent 75%);
}

.modal-theme-scenery .reward-badge-ribbon {
	background: linear-gradient(135deg, #10b981 0%, #047857 100%);
	border-color: #6ee7b7;
	box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}
.modal-theme-scenery .reward-glow-aura {
	background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, rgba(6, 182, 212, 0.3) 50%, transparent 75%);
}



/* ==============================================================================
   FANCY FELT-FLOORED CUBBY HOLE TILE STORAGE SYSTEM & STORE
   ============================================================================== */

/* 1. Title Screen Entrance Bar (Prominent Tile Storage & Store) */
.title-storage-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 320px;
	background: linear-gradient(180deg, #3d2315 0%, #25130a 60%, #160a04 100%);
	border: 1.5px solid #8e582d;
	border-radius: 20px;
	padding: 6px 12px;
	margin-top: 4px;
	gap: 10px;
	box-shadow:
		0 6px 18px rgba(0, 0, 0, 0.65),
		inset 0 1px 1px rgba(255, 220, 150, 0.35),
		0 0 16px rgba(212, 175, 55, 0.15);
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: all 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.title-storage-btn:hover {
	transform: translateY(-2px) scale(1.02);
	border-color: #ffd700;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.75),
		0 0 20px rgba(255, 215, 0, 0.35);
}

.title-storage-btn:active {
	transform: translateY(1px) scale(0.98);
}

.storage-btn-felt-window {
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 35%, #184c2d 0%, #0c2516 100%);
	border: 1.5px solid #4a2817;
	border-radius: 10px;
	padding: 3px 6px;
	gap: 3px;
	box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
}

.storage-mini-tile {
	width: 20px;
	height: 20px;
	object-fit: contain;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.8));
	transition: transform 0.2s ease;
}

.storage-mini-tile.tile-a { transform: rotate(-5deg); }
.storage-mini-tile.tile-b { transform: translateY(-1px) scale(1.08); }
.storage-mini-tile.tile-c { transform: rotate(5deg); }

.storage-btn-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	gap: 1px;
}

.storage-btn-title {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #ffd700;
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.storage-btn-style-name {
	font-size: 11px;
	font-weight: 700;
	color: #f5f5f7;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.storage-btn-badge {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: #ffd700;
	background: rgba(255, 215, 0, 0.15);
	border: 1px solid rgba(255, 215, 0, 0.4);
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

/* Title Screen Footer Storage Nav Button */
.title-nav-btn.btn-storage {
	background: linear-gradient(180deg, #422616 0%, #2b170c 100%);
	border: 2px solid #8e582d;
	box-shadow:
		0 8px 24px rgba(0, 0, 0, 0.55),
		inset 0 1px 1px rgba(255, 220, 150, 0.35);
}

.title-nav-btn.btn-storage:hover {
	border-color: #ffd700;
	box-shadow:
		0 10px 28px rgba(0, 0, 0, 0.65),
		0 0 20px rgba(255, 215, 0, 0.35);
}

.title-nav-cubby-icon {
	font-size: 27px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* 2. Settings Modal Storage Portal Button */
.settings-storage-launch-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(180deg, #3a2215 0%, #231209 100%);
	border: 1.5px solid #8e582d;
	border-radius: 16px;
	padding: 10px 14px;
	gap: 12px;
	cursor: pointer;
	user-select: none;
	box-shadow:
		0 6px 16px rgba(0, 0, 0, 0.5),
		inset 0 1px 1px rgba(255, 220, 150, 0.3);
	transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.settings-storage-launch-btn:hover {
	border-color: #ffd700;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 215, 0, 0.3);
}

.settings-storage-felt-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 35%, #184c2d 0%, #0c2516 100%);
	border: 1.5px solid #4a2817;
	border-radius: 10px;
	padding: 4px 8px;
	gap: 4px;
	box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
}

.settings-mini-tile {
	width: 24px;
	height: 24px;
	object-fit: contain;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.8));
}
.settings-mini-tile.tile-a { transform: rotate(-5deg); }
.settings-mini-tile.tile-b { transform: translateY(-1px) scale(1.08); }
.settings-mini-tile.tile-c { transform: rotate(5deg); }

.settings-storage-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	gap: 2px;
}

.settings-storage-title {
	font-size: 13px;
	font-weight: 800;
	color: #ffd700;
	letter-spacing: 0.5px;
}

.settings-storage-sub {
	font-size: 11.5px;
	font-weight: 600;
	color: #e2e8f0;
	opacity: 0.85;
}

.settings-storage-badge {
	font-size: 11px;
	font-weight: 800;
	color: #ffd700;
	background: rgba(255, 215, 0, 0.16);
	border: 1px solid rgba(255, 215, 0, 0.4);
	padding: 5px 12px;
	border-radius: 999px;
	white-space: nowrap;
}

/* 3. The Felt-Floored Storage Cabinet Modal */
#tile-storage-modal {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(8, 6, 12, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 155;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
	box-sizing: border-box;
}

#tile-storage-modal.show {
	opacity: 1;
	pointer-events: auto;
}

.storage-cabinet {
	background: linear-gradient(180deg, #351e12 0%, #24130a 35%, #160a04 100%);
	border: 2.5px solid #8e582d;
	border-radius: 24px;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		inset 0 1px 2px rgba(255, 220, 150, 0.35),
		0 0 32px rgba(212, 175, 55, 0.25);
	padding: 20px 18px 22px 18px;
	max-width: 520px;
	width: 92%;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.92);
	transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

#tile-storage-modal.show .storage-cabinet {
	transform: scale(1.0);
}

/* Cabinet Header */
.cabinet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 2px solid #5a331c;
	margin-bottom: 14px;
}

.cabinet-title-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cabinet-brass-emblem {
	font-size: 32px;
	line-height: 1;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.cabinet-titles {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cabinet-main-title {
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #ffd700;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
	text-transform: uppercase;
}

.cabinet-sub-title {
	margin: 0;
	font-size: 11.5px;
	font-weight: 600;
	color: #e2e8f0;
	opacity: 0.85;
}

.cabinet-close-btn {
	background: linear-gradient(180deg, #4a2817 0%, #29140a 100%);
	border: 1.5px solid #8e582d;
	color: #f5dfa8;
	font-size: 26px;
	line-height: 1;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
	transition: all 0.2s ease;
	outline: none;
}

.cabinet-close-btn:hover {
	border-color: #ffd700;
	color: #ffffff;
	transform: scale(1.08);
}

/* Cabinet Interior Frame (Scrollable) */
.cabinet-interior-frame {
	overflow-y: auto;
	padding: 6px 4px 14px 4px;
	-webkit-overflow-scrolling: touch;
	flex: 1;
}

.cabinet-interior-frame::-webkit-scrollbar {
	width: 6px;
}
.cabinet-interior-frame::-webkit-scrollbar-track {
	background: rgba(20, 10, 5, 0.5);
	border-radius: 4px;
}
.cabinet-interior-frame::-webkit-scrollbar-thumb {
	background: #8e582d;
	border-radius: 4px;
	border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 4. The Handcrafted Cubby Grid */
.cubby-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.cubby-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* 5. Individual Wooden Cubby Compartment */
.cubby-box {
	background: #201108;
	border: 3.5px solid #4a2817;
	border-top: 4px solid #63371f;
	border-bottom: 5px solid #140903;
	border-radius: 14px;
	box-shadow:
		inset 0 8px 18px rgba(0, 0, 0, 0.85),
		inset 0 -3px 8px rgba(0, 0, 0, 0.5),
		0 6px 14px rgba(0, 0, 0, 0.45);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: all 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.cubby-box:hover {
	transform: translateY(-3px) scale(1.02);
	border-color: #a06739;
	box-shadow:
		inset 0 8px 18px rgba(0, 0, 0, 0.85),
		0 10px 24px rgba(0, 0, 0, 0.65);
}

.cubby-box:active {
	transform: translateY(1px) scale(0.98);
}

/* Equipped Active State (Gilded Glow) */
.cubby-box.active {
	border-color: #ffd700;
	box-shadow:
		0 0 24px rgba(255, 215, 0, 0.55),
		inset 0 8px 18px rgba(0, 0, 0, 0.7);
}

/* 6. The Fancy Felt Floor - Authentic Physical Shelf Floor */
.cubby-felt-floor {
	width: 100%;
	height: 104px;
	background: radial-gradient(ellipse at 50% 25%, #195230 0%, #103820 65%, #082113 100%);
	box-shadow:
		inset 0 10px 18px rgba(0, 0, 0, 0.88),
		inset 0 -6px 12px rgba(0, 0, 0, 0.65);
	position: relative;
	display: flex;
	align-items: flex-end; /* Ground tiles firmly to the felt shelf floor! */
	justify-content: center;
	overflow: hidden;
	padding-bottom: 7px;
	box-sizing: border-box;
}

/* Deep shadow cast down by wooden ceiling */
.cubby-felt-floor::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 24px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
	pointer-events: none;
	z-index: 3;
}

/* 3D Felt Shelf Floor & Wooden Front Retaining Lip */
.cubby-felt-floor::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 14px;
	background: linear-gradient(180deg, rgba(30, 85, 48, 0.3) 0%, rgba(10, 32, 18, 0.7) 40%, #201007 100%);
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	border-bottom: 2px solid #140a04;
	pointer-events: none;
	z-index: 1;
}

/* 7. The 3 Authentic Tiles: A, B, and C Resting Physically on Felt Floor */
.cubby-tiles-stage {
	display: flex;
	align-items: flex-end; /* Physically resting on the felt */
	justify-content: center;
	width: 100%;
	height: 100%;
	position: relative;
	gap: 6px;
	z-index: 2;
	padding: 0 4px 2px 4px;
	box-sizing: border-box;
}

.cubby-tile-unit {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
}

/* Flat Contact Shadow directly on the green felt */
.cubby-tile-shadow {
	position: absolute;
	bottom: 0px;
	left: 50%;
	transform: translateX(-50%);
	width: 38px;
	height: 8px;
	background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 75%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 1;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Authentic Letter Tile resting on felt */
.cubby-tile-img {
	position: relative;
	z-index: 2;
	width: 44px;
	height: 44px;
	object-fit: contain;
	user-select: none;
	pointer-events: none;
	display: block;
	transform-origin: 50% 100%;
}

/* Static resting stance with subtle natural tilt when not active */
.cubby-box:not(.active) .unit-a .cubby-tile-img {
	transform: rotate(-3deg);
}
.cubby-box:not(.active) .unit-b .cubby-tile-img {
	transform: scale(1.02);
}
.cubby-box:not(.active) .unit-c .cubby-tile-img {
	transform: rotate(3deg);
}

/* -------------------------------------------------------------------------- */
/* SEQUENTIAL A, B, C QUICK JUMP ANIMATIONS (WHEN SELECTED)                   */
/* -------------------------------------------------------------------------- */
@keyframes cubbyJumpA {
	0% {
		transform: translateY(0) scale(1, 1);
	}
	5% {
		transform: translateY(-16px) scale(0.95, 1.05);
	}
	10% {
		transform: translateY(-20px) scale(0.97, 1.03);
	}
	15% {
		transform: translateY(0) scale(1.08, 0.92); /* Crisp landing squash on felt */
	}
	20% {
		transform: translateY(-3px) scale(0.98, 1.02); /* Tiny rebound bounce */
	}
	24% {
		transform: translateY(0) scale(1, 1); /* Settle on felt */
	}
	100% {
		transform: translateY(0) scale(1, 1); /* Resting on felt until next cycle */
	}
}

@keyframes cubbyShadowA {
	0% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	10% {
		transform: translateX(-50%) scale(0.55);
		opacity: 0.25;
	}
	15% {
		transform: translateX(-50%) scale(1.15);
		opacity: 0.95;
	}
	24% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	100% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
}

@keyframes cubbyJumpB {
	0%, 14% {
		transform: translateY(0) scale(1, 1);
	}
	19% {
		transform: translateY(-16px) scale(0.95, 1.05);
	}
	24% {
		transform: translateY(-20px) scale(0.97, 1.03);
	}
	29% {
		transform: translateY(0) scale(1.08, 0.92); /* Crisp landing squash on felt */
	}
	34% {
		transform: translateY(-3px) scale(0.98, 1.02);
	}
	38% {
		transform: translateY(0) scale(1, 1);
	}
	100% {
		transform: translateY(0) scale(1, 1);
	}
}

@keyframes cubbyShadowB {
	0%, 14% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	24% {
		transform: translateX(-50%) scale(0.55);
		opacity: 0.25;
	}
	29% {
		transform: translateX(-50%) scale(1.15);
		opacity: 0.95;
	}
	38% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	100% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
}

@keyframes cubbyJumpC {
	0%, 28% {
		transform: translateY(0) scale(1, 1);
	}
	33% {
		transform: translateY(-16px) scale(0.95, 1.05);
	}
	38% {
		transform: translateY(-20px) scale(0.97, 1.03);
	}
	43% {
		transform: translateY(0) scale(1.08, 0.92); /* Crisp landing squash on felt */
	}
	48% {
		transform: translateY(-3px) scale(0.98, 1.02);
	}
	52% {
		transform: translateY(0) scale(1, 1);
	}
	100% {
		transform: translateY(0) scale(1, 1);
	}
}

@keyframes cubbyShadowC {
	0%, 28% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	38% {
		transform: translateX(-50%) scale(0.55);
		opacity: 0.25;
	}
	43% {
		transform: translateX(-50%) scale(1.15);
		opacity: 0.95;
	}
	52% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
	100% {
		transform: translateX(-50%) scale(1);
		opacity: 0.85;
	}
}

/* Active Selected Cubby: A, then B, then C Quick Sequential Bounces on Felt */
.cubby-box.active .unit-a .cubby-tile-img {
	animation: cubbyJumpA 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.cubby-box.active .unit-a .cubby-tile-shadow {
	animation: cubbyShadowA 1.8s ease-in-out infinite;
}

.cubby-box.active .unit-b .cubby-tile-img {
	animation: cubbyJumpB 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.cubby-box.active .unit-b .cubby-tile-shadow {
	animation: cubbyShadowB 1.8s ease-in-out infinite;
}

.cubby-box.active .unit-c .cubby-tile-img {
	animation: cubbyJumpC 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.cubby-box.active .unit-c .cubby-tile-shadow {
	animation: cubbyShadowC 1.8s ease-in-out infinite;
}

/* 8. Brass Plaque Nameplate */
.cubby-plaque {
	width: 100%;
	background: linear-gradient(180deg, #3a2517 0%, #22130a 100%);
	border-top: 1.5px solid #6b3e20;
	padding: 7px 6px 9px 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	box-sizing: border-box;
}

.cubby-box.active .cubby-plaque {
	background: linear-gradient(180deg, #b8860b 0%, #7d5a03 100%);
	border-top: 1.5px solid #ffd700;
}

.cubby-name {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
	color: #f5dfa8;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 95%;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cubby-box.active .cubby-name {
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* 9. Concierge Call Bell Action Buttons (Replaces Select Button) */
.cubby-bell-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	cursor: pointer;
	border: none;
	outline: none;
	text-decoration: none;
	user-select: none;
	font-family: inherit;
	transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

/* Select Bell Button (Gold Concierge Call Bell Ready to Ring) */
.cubby-bell-action.select {
	background: linear-gradient(180deg, #2a1b0e 0%, #170d06 100%);
	border: 1.5px solid #d4af37;
	box-shadow:
		0 2px 6px rgba(0, 0, 0, 0.6),
		inset 0 1px 1px rgba(255, 215, 0, 0.4);
}

.cubby-bell-action.select:hover {
	transform: translateY(-2px) scale(1.05);
	border-color: #ffd700;
	box-shadow:
		0 4px 12px rgba(255, 215, 0, 0.4),
		inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.cubby-bell-action.select:active {
	transform: translateY(1px) scale(0.96);
}

/* Equipped Bell Button (Active Golden Glow with Bell Pressed Down) */
.cubby-bell-action.equipped {
	background: linear-gradient(180deg, #ffd700 0%, #e6a800 100%);
	border: 1.5px solid #fff2a3;
	box-shadow:
		0 0 14px rgba(255, 215, 0, 0.8),
		inset 0 1px 2px rgba(255, 255, 255, 0.8);
	cursor: default;
}

.cubby-bell-action.trial {
	background: linear-gradient(180deg, #253346 0%, #131c26 100%);
	border: 1.5px solid #93c5fd;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.cubby-bell-action .bell-icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
	transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.cubby-bell-action.select:hover .bell-icon {
	transform: rotate(-10deg) scale(1.12);
}

.cubby-bell-action.equipped .bell-icon {
	transform: scale(0.95);
	animation: bellRinging 2.5s ease-in-out infinite;
}

@keyframes bellRinging {
	0%, 80%, 100% {
		transform: rotate(0deg) scale(0.95);
	}
	84% {
		transform: rotate(-8deg) scale(1.02);
	}
	88% {
		transform: rotate(8deg) scale(1.02);
	}
	92% {
		transform: rotate(-5deg) scale(1.0);
	}
	96% {
		transform: rotate(5deg) scale(1.0);
	}
}

.cubby-bell-action .bell-text {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}

.cubby-bell-action.select .bell-text {
	color: #ffd700;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.cubby-bell-action.equipped .bell-text {
	color: #2b1504;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.cubby-bell-action.trial .bell-text {
	color: #93c5fd;
}

/* Store Locked Badge */
.cubby-badge {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.6px;
	padding: 3px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	white-space: nowrap;
	box-sizing: border-box;
}

.badge-store {
	background: rgba(245, 158, 11, 0.22);
	color: #fde047;
	border: 1px solid rgba(245, 158, 11, 0.45);
}

/* ==============================================================================
   Mobile GPU Compositor & Touch Performance Optimizations
   Eliminates per-frame framebuffer blur copies over live WebGL canvases
   ============================================================================== */
@media (max-width: 768px), (pointer: coarse) {
	.hud-left-pill,
	.hud-action-pill-btn,
	.hud-gear-btn,
	.hud-btn,
	.toast-banner,
	.title-style-tag {
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
	}

	.hud-left-pill {
		background: rgba(18, 14, 24, 0.90) !important;
	}

	.hud-action-pill-btn {
		background: rgba(15, 20, 32, 0.72) !important;
	}
}

/* ==============================================================================
   Lightweight Multiplayer VS Mode UI & Avatar Matchmaking Lobby
   ============================================================================== */
body.vs-mode-active #hud-speedometer {
	display: none !important;
}

body.vs-mode-active #hud-vs-bar {
	display: flex !important;
}

body.vs-mode-active #hud-header {
	top: max(12px, env(safe-area-inset-top));
}

body.vs-mode-active .hud-right-actions {
	top: 8px;
	transform: none;
}

/* Hide solo level-select jump controls inside Settings while in a VS match */
body.vs-mode-active #theme-modal .level-select-row,
body.vs-mode-active #btn-settings-all-levels {
	display: none !important;
}

.hud-vs-bar {
	display: none;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	position: relative;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	padding-top: 2px;
}

.vs-hud-player {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.vs-hud-avatar-ring {
	position: relative;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	box-sizing: border-box;
	background: #0977b3;
	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
	flex-shrink: 0;
}

.vs-hud-avatar-ring.ring-blue {
	border: 6px solid #0e639c;
}

.vs-hud-avatar-ring.ring-red {
	border: 6px solid #9e0b0f;
}

.vs-hud-avatar-clip {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	background: #0977b3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vs-hud-avatar-clip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.07);
	display: block;
}

.vs-hud-wpm {
	position: absolute;
	bottom: -7px;
	right: -18px;
	font-family: 'Alice', serif;
	font-weight: 900;
	font-size: 13.5px;
	letter-spacing: 0.2px;
	color: #ffffff;
	text-shadow:
		0 1.5px 4px rgba(0, 0, 0, 0.85),
		0 0 2px rgba(0, 0, 0, 0.95);
	white-space: nowrap;
	z-index: 4;
}

.vs-hud-name {
	margin-top: 4px;
	max-width: 112px;
	padding: 1.5px 8px;
	border-radius: 999px;
	background: rgba(11, 18, 32, 0.58);
	border: 1px solid rgba(255, 255, 255, 0.16);
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}

.vs-p1 .vs-hud-name {
	border-color: rgba(56, 189, 248, 0.45);
}

.vs-p2 .vs-hud-name {
	border-color: rgba(248, 113, 113, 0.45);
}

.vs-hud-center {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 14px -2px 0 -2px;
	z-index: 3;
	font-family: 'Alice', serif;
	font-weight: 900;
	font-size: 56px;
	line-height: 0.9;
	color: #ffffff;
	text-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
	letter-spacing: -3px;
}

.vs-char-v {
	display: inline-block;
	transform: rotate(-4deg);
}

.vs-char-s {
	display: inline-block;
	transform: translateY(3px);
}

.vs-winner-crown {
	display: none;
	position: absolute;
	top: -27px;
	left: 50%;
	transform: translateX(-50%);
	width: 42px;
	height: 31px;
	z-index: 6;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.vs-winner-crown.show {
	display: block;
	animation: vsCrownPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes vsCrownPop {
	0% {
		opacity: 0;
		transform: translateX(-50%) translateY(10px) scale(0.4);
	}
	100% {
		opacity: 1;
		transform: translateX(-50%) translateY(0) scale(1);
	}
}

@media (max-width: 420px) {
	.vs-hud-avatar-ring {
		width: 84px;
		height: 84px;
		border-width: 5.5px;
	}
	.vs-hud-center {
		font-size: 50px;
		margin-top: 12px;
	}
	.vs-hud-wpm {
		font-size: 12.5px;
		right: -16px;
	}
	.vs-hud-name {
		max-width: 98px;
		font-size: 11px;
	}
}

/* VS Lobby Modal (Username, Avatar Select & Opponent Search) */
#vs-lobby-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 150;
	box-sizing: border-box;
	padding: 12px;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
}

.vs-lobby-card {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
	max-height: 100dvh !important;
	overflow: visible !important;
	box-sizing: border-box;
	box-shadow: none !important;
	transform: scale(0.94);
	transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	color: #ffffff;
	text-align: center;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
}

#vs-lobby-modal.show .vs-lobby-card {
	transform: scale(1);
}

.vs-lobby-cabinet {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	max-height: min(92dvh, 660px);
	background: linear-gradient(180deg, #442616 0%, #2e180d 50%, #1c0e06 100%);
	border: 3px solid #7c4726;
	border-top: 3.5px solid #9c5b31;
	border-bottom: 4.5px solid #140803;
	border-radius: 26px;
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.92),
		inset 0 1.5px 2px rgba(255, 215, 0, 0.28),
		inset 0 -3px 6px rgba(0, 0, 0, 0.8);
	overflow: hidden;
	box-sizing: border-box;
}

.vs-lobby-header {
	padding: 14px 38px 10px 38px !important;
	margin-bottom: 0 !important;
	border-bottom: 2px solid rgba(212, 163, 89, 0.25) !important;
}

.vs-lobby-felt {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 10px 12px 12px 12px;
	padding: 16px 14px 18px 14px;
	border-radius: 18px;
	border: 2px solid #4a2814;
	background: radial-gradient(ellipse at 50% 25%, #184c2d 0%, #103820 65%, #082113 100%);
	box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.88), inset 0 -4px 10px rgba(0, 0, 0, 0.65);
}

.vs-username-group {
	margin-bottom: 14px;
	text-align: left;
}

.vs-username-label {
	display: block;
	margin-bottom: 6px !important;
	text-align: center;
}

.vs-username-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1.5px solid rgba(212, 163, 89, 0.55);
	background: rgba(15, 9, 5, 0.78);
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.4px;
	text-align: center;
	outline: none;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
	user-select: text !important;
	-webkit-user-select: text !important;
}

.vs-username-input::placeholder {
	color: rgba(226, 232, 240, 0.48);
	font-weight: 700;
}

.vs-username-input:focus {
	border-color: #fbbf24;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), 0 0 0 2.5px rgba(251, 191, 36, 0.28);
}

.vs-username-input.needs-attention {
	border-color: #facc15;
	box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35);
}

.vs-lobby-subtitle {
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #fde68a;
	margin-bottom: 8px;
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Compact Horizontal Avatar Scroller */
.vs-avatar-grid {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	padding: 10px 10px 12px 10px;
	margin-bottom: 16px;
	background: rgba(11, 22, 15, 0.62);
	border: 1.5px solid rgba(212, 163, 89, 0.38);
	border-radius: 16px;
	box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.68);
}

.vs-avatar-grid::-webkit-scrollbar {
	height: 5px;
}

.vs-avatar-grid::-webkit-scrollbar-track {
	background: transparent;
}

.vs-avatar-grid::-webkit-scrollbar-thumb {
	background: rgba(212, 163, 89, 0.45);
	border-radius: 999px;
}

.vs-avatar-option {
	flex: 0 0 auto;
	scroll-snap-align: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	padding: 0;
	background: #1d5ca8;
	border: 3px solid rgba(212, 163, 89, 0.45);
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease, box-shadow 0.18s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.vs-avatar-option img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.07);
	display: block;
}

.vs-avatar-option:hover {
	transform: scale(1.06);
	border-color: rgba(254, 240, 138, 0.75);
}

.vs-avatar-option.selected {
	border-color: #fbbf24;
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35), 0 0 16px rgba(251, 191, 36, 0.8);
	transform: scale(1.1);
}

/* Exact Title-Screen Hand-Drawn Button Art (SOLO PLAY / VS MODE style in BLUE) */
.vs-title-blue-btn,
.vs-find-btn,
.vs-friends-btn {
	position: relative;
	width: 100%;
	max-width: 340px;
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 430 / 90;
	min-height: 54px;
	max-height: 66px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 22px;
	border: none !important;
	border-radius: 0 !important;
	background: transparent url('../AssetsScruffle/BlueTitleButton.png') center / 100% 100% no-repeat !important;
	color: #ffffff !important;
	font-family: 'Alice', serif;
	font-size: clamp(13px, 3.6vw, 16px);
	font-weight: 900;
	letter-spacing: 0.9px;
	text-transform: uppercase;
	text-shadow: 0 2px 0 rgba(16, 35, 74, 0.72);
	cursor: pointer;
	box-shadow: none !important;
	filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.55));
	transition: transform 0.14s ease, filter 0.14s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.vs-btn-hand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
}

.vs-btn-hand-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, 0.45));
}

.vs-btn-label {
	line-height: 1.1;
	white-space: nowrap;
}

.vs-title-blue-btn:hover,
.vs-find-btn:hover,
.vs-friends-btn:hover {
	filter: brightness(1.07) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.6));
	transform: translateY(-1px) scale(1.015);
}

.vs-title-blue-btn:active,
.vs-find-btn:active,
.vs-friends-btn:active {
	transform: scale(0.96);
	filter: brightness(0.96) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

/* VS Matchup & Results Collectible Tileset Showcase Rack */
.vs-matchup-player {
	flex: 1;
	min-width: 0;
}

.vs-tileset-showcase {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	width: 100%;
}

.vs-showcase-rack {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 4px 6px;
	border-radius: 8px;
	background: linear-gradient(180deg, #5c3318 0%, #3a1f0d 100%);
	border: 1.5px solid #9c5b31;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 215, 0, 0.25);
}

.vs-showcase-tile {
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.55);
}

.vs-showcase-tile-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.vs-tileset-name {
	font-family: 'Alice', serif;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: #fde68a;
	background: rgba(15, 9, 5, 0.72);
	border: 1px solid rgba(212, 163, 89, 0.45);
	padding: 1.5px 8px;
	border-radius: 999px;
	white-space: nowrap;
	max-width: 118px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vs-tileset-showcase-compact {
	margin-top: 4px;
	margin-bottom: 4px;
}

.vs-tileset-showcase-compact .vs-showcase-tile {
	width: 20px;
	height: 20px;
}

.vs-tileset-showcase-compact .vs-tileset-name {
	font-size: 9.5px;
	padding: 1px 6px;
}

.vs-matchup-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 0 18px 0;
}

.vs-searching-spin {
	animation: vsSearchPulse 0.38s ease-in-out infinite alternate;
}

@keyframes vsSearchPulse {
	0% { transform: scale(0.96); filter: brightness(0.92); }
	100% { transform: scale(1.03); filter: brightness(1.08); }
}

.vs-search-status {
	font-size: 14px;
	font-weight: 800;
	color: #e2e8f0;
	margin-bottom: 16px;
	min-height: 20px;
}

.vs-cancel-btn {
	background: rgba(255, 255, 255, 0.10);
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: #cbd5e1;
	border-radius: 12px;
	padding: 9px 24px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.vs-cancel-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* Pronounced Winner Glow & Pulse on main HUD avatar when a player solves a tray */
.vs-hud-avatar-ring.solve-pulse {
	animation: vsAvatarSolvePulse 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.2) !important;
	z-index: 10;
}

.vs-hud-avatar-ring.ring-blue.solve-pulse {
	box-shadow: 0 0 0 4px #93c5fd, 0 0 28px 10px rgba(59, 130, 246, 0.90), 0 0 48px 18px rgba(37, 99, 235, 0.60) !important;
	border-color: #60a5fa !important;
}

.vs-hud-avatar-ring.ring-red.solve-pulse {
	box-shadow: 0 0 0 4px #fca5a5, 0 0 28px 10px rgba(239, 68, 68, 0.90), 0 0 48px 18px rgba(220, 38, 38, 0.60) !important;
	border-color: #f87171 !important;
}

@keyframes vsAvatarSolvePulse {
	0% {
		transform: scale(1);
	}
	22% {
		transform: scale(1.18);
	}
	45% {
		transform: scale(1.08);
	}
	68% {
		transform: scale(1.14);
	}
	100% {
		transform: scale(1);
	}
}

/* Friend Room Controls inside VS Lobby Modal */
.vs-friend-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 15px 0 12px 0;
	color: #fde68a;
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.1px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.vs-friend-divider::before,
.vs-friend-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: rgba(212, 163, 89, 0.35);
}

.vs-friend-actions {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.vs-friend-create-btn {
	flex: 1;
	padding: 11px 10px;
	border-radius: 12px;
	border: 1.5px solid rgba(250, 204, 21, 0.45);
	background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(161, 98, 7, 0.28));
	color: #fef08a;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.6px;
	cursor: pointer;
	transition: transform 0.14s ease, background 0.14s ease;
	white-space: nowrap;
}

.vs-friend-create-btn:hover {
	background: linear-gradient(135deg, rgba(234, 179, 8, 0.34), rgba(161, 98, 7, 0.38));
}

.vs-friend-create-btn:active {
	transform: scale(0.97);
}

.vs-friend-join-group {
	display: flex;
	flex: 1.15;
	gap: 5px;
}

.vs-friend-code-input {
	width: 100%;
	min-width: 0;
	padding: 10px 8px;
	border-radius: 12px;
	border: 1.5px solid rgba(148, 163, 184, 0.35);
	background: rgba(15, 23, 42, 0.85);
	color: #ffffff;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 2.5px;
	text-align: center;
	text-transform: uppercase;
	outline: none;
	user-select: text !important;
	-webkit-user-select: text !important;
}

.vs-friend-code-input:focus {
	border-color: #38bdf8;
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.vs-friend-join-btn {
	padding: 10px 13px;
	border-radius: 12px;
	border: none;
	background: linear-gradient(135deg, #10b981, #059669);
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 900;
	letter-spacing: 0.6px;
	cursor: pointer;
	transition: transform 0.14s ease, filter 0.14s ease;
}

.vs-friend-join-btn:hover {
	filter: brightness(1.08);
}

.vs-friend-join-btn:active {
	transform: scale(0.96);
}

.vs-lobby-notice {
	margin-top: 12px;
	padding: 9px 12px;
	border-radius: 11px;
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(248, 113, 113, 0.40);
	color: #fecaca;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.vs-server-status-pill {
	display: none !important;
}

.vs-server-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #94a3b8;
	display: inline-block;
	box-shadow: 0 0 6px rgba(148, 163, 184, 0.5);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.vs-server-status-pill.online .vs-server-status-dot {
	background: #22c55e;
	box-shadow: 0 0 8px #22c55e;
}

.vs-server-status-pill.online {
	color: #86efac;
	border-color: rgba(34, 197, 94, 0.3);
}

.vs-server-status-pill.offline .vs-server-status-dot {
	background: #ef4444;
	box-shadow: 0 0 8px #ef4444;
}

.vs-server-status-pill.offline {
	color: #fca5a5;
	border-color: rgba(239, 68, 68, 0.3);
}

.vs-friend-room-box {
	margin: 0 0 14px 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(15, 23, 42, 0.78);
	border: 1.5px solid rgba(250, 204, 21, 0.45);
}

.vs-friend-room-label {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #fde047;
	margin-bottom: 5px;
}

.vs-friend-room-code {
	font-family: 'Alice', serif;
	font-size: 28px;
	font-weight: 900;
	letter-spacing: 6px;
	color: #ffffff;
	margin-bottom: 8px;
	user-select: text !important;
	-webkit-user-select: text !important;
}

.vs-copy-invite-btn {
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid rgba(56, 189, 248, 0.50);
	background: rgba(14, 165, 233, 0.20);
	color: #bae6fd;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.vs-copy-invite-btn:hover {
	background: rgba(14, 165, 233, 0.34);
}

/* Never show the raw floating NEXT button in VS Mode — Match Results modal handles post-match flow */
body.vs-mode-active #btn-floating-next {
	display: none !important;
}

/* ==============================================================================
   VS Post-Match Results Modal (Wooden Cubby Cabinet Aesthetic)
   ============================================================================== */
#vs-results-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	z-index: 155;
	padding: 16px 12px;
	margin: 0;
	box-sizing: border-box;
	background: radial-gradient(ellipse at 50% 35%, rgba(18, 10, 5, 0.45) 0%, rgba(6, 3, 1, 0.72) 100%);
	backdrop-filter: blur(2.5px);
	-webkit-backdrop-filter: blur(2.5px);
}

.vs-results-card {
	background: transparent;
	border: 3px solid #8e582d;
	border-radius: 26px;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		inset 0 1px 3px rgba(255, 220, 150, 0.35),
		0 0 36px rgba(212, 175, 55, 0.28);
	width: 95%;
	max-width: 480px;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	padding: 20px 18px 22px 18px;
	box-sizing: border-box;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	color: #ffffff;
	text-align: center;
	transform: scale(0.92);
	transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28), border-color 0.2s ease, box-shadow 0.2s ease;
}

#vs-results-modal.show .vs-results-card {
	transform: scale(1);
}

.vs-results-card::-webkit-scrollbar {
	width: 6px;
}
.vs-results-card::-webkit-scrollbar-track {
	background: rgba(20, 10, 5, 0.5);
	border-radius: 4px;
}
.vs-results-card::-webkit-scrollbar-thumb {
	background: #8e582d;
	border-radius: 4px;
	border: 1px solid rgba(255, 215, 0, 0.3);
}

.vs-results-card.outcome-win {
	border-color: #ffd700;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		inset 0 1px 3px rgba(255, 220, 150, 0.45),
		0 0 36px rgba(255, 215, 0, 0.40);
}

.vs-results-card.outcome-loss {
	border-color: #a84236;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		inset 0 1px 3px rgba(255, 180, 160, 0.3),
		0 0 32px rgba(185, 28, 28, 0.35);
}

.vs-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 12px;
	border-bottom: 2px solid #5a331c;
	margin-bottom: 12px;
}

.vs-results-mode-tag {
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 1.5px;
	color: #ffd700;
	text-transform: uppercase;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.vs-results-close-btn {
	background: linear-gradient(180deg, #4a2817 0%, #29140a 100%);
	border: 1.5px solid #8e582d;
	color: #f5dfa8;
	font-size: 26px;
	line-height: 1;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
	transition: all 0.2s ease;
	outline: none;
}

.vs-results-close-btn:hover {
	border-color: #ffd700;
	color: #ffffff;
	transform: scale(1.08);
}

.vs-results-outcome {
	font-family: 'Alice', serif;
	font-size: 30px;
	font-weight: 900;
	letter-spacing: 1.8px;
	margin: 2px 0 4px 0;
	color: #ffd700;
	text-shadow: 0 2px 14px rgba(250, 204, 21, 0.55), 0 0 28px rgba(234, 179, 8, 0.35);
}

.vs-results-card.outcome-loss .vs-results-outcome {
	color: #fca5a5;
	text-shadow: 0 2px 14px rgba(239, 68, 68, 0.45);
}

.vs-results-sub {
	font-size: 13px;
	font-weight: 700;
	color: #f5dfa8;
	opacity: 0.95;
	margin-bottom: 16px;
	line-height: 1.35;
}

.vs-results-duel {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 12px;
	border-radius: 18px;
	background: radial-gradient(circle at 50% 50%, #24130a 0%, #150a04 100%);
	border: 3px solid #4a2817;
	border-top: 3.5px solid #63371f;
	border-bottom: 4.5px solid #140903;
	box-shadow:
		inset 0 6px 16px rgba(0, 0, 0, 0.85),
		inset 0 -2px 6px rgba(0, 0, 0, 0.5),
		0 6px 16px rgba(0, 0, 0, 0.5);
	margin-bottom: 14px;
}

.vs-results-fighter {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.vs-res-ring {
	width: 76px !important;
	height: 76px !important;
	border-width: 4px !important;
	margin-bottom: 3px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.ring-blue {
	border-color: #38bdf8 !important;
	box-shadow: 0 0 16px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.ring-red {
	border-color: #f87171 !important;
	box-shadow: 0 0 16px rgba(248, 113, 113, 0.4), inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.vs-res-name {
	font-size: 15px;
	font-weight: 900;
	color: #ffffff;
	max-width: 132px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.vs-res-role {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #7dd3fc;
	background: rgba(14, 116, 184, 0.28);
	padding: 2px 8px;
	border-radius: 6px;
	border: 1px solid rgba(56, 189, 248, 0.35);
}

.fighter-red .vs-res-role {
	color: #fca5a5;
	background: rgba(185, 28, 28, 0.28);
	border-color: rgba(248, 113, 113, 0.35);
}

.vs-res-wpm {
	font-family: 'Alice', serif;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0.5px;
	color: #ffd700;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
	margin-top: 2px;
}

.vs-res-meta {
	font-size: 11px;
	font-weight: 700;
	color: #d6c7b2;
}

.vs-results-vs-badge {
	font-family: 'Alice', serif;
	font-size: 24px;
	font-weight: 900;
	color: #d4af37;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.4);
	padding: 0 4px;
}

.vs-results-chain-wrap {
	margin-bottom: 16px;
	padding: 12px 10px 14px 10px;
	border-radius: 16px;
	background: radial-gradient(circle at 50% 50%, #153723 0%, #0d2316 70%, #08160e 100%);
	border: 3px solid #4a2817;
	border-top: 3.5px solid #63371f;
	border-bottom: 4.5px solid #140903;
	box-shadow:
		inset 0 4px 12px rgba(0, 0, 0, 0.8),
		inset 0 -2px 6px rgba(0, 0, 0, 0.4),
		0 4px 12px rgba(0, 0, 0, 0.4);
}

.vs-results-chain-label {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #ffd700;
	text-transform: uppercase;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
	margin-bottom: 10px;
}

.vs-results-chain-pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.vs-chain-pill {
	padding: 5px 10px;
	border-radius: 8px;
	font-size: 11.5px;
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #ffffff;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

.vs-chain-pill.pill-anchor {
	background: linear-gradient(180deg, #5c3a1e 0%, #3d2310 100%);
	border: 1.5px solid #d4af37;
	color: #fff1b8;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.vs-chain-pill.pill-blue {
	background: linear-gradient(180deg, #1d6fa5 0%, #0e4870 100%);
	border: 1.5px solid #38bdf8;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.vs-chain-pill.pill-red {
	background: linear-gradient(180deg, #a82323 0%, #6b1414 100%);
	border: 1.5px solid #f87171;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* VS Post-Match Actions container & buttons (styled with Title Screen hand-drawn buttons) */
.vs-results-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 320px;
	margin: 0 auto;
	gap: 8px;
}

/* Rematch Notification & Inviting Pulse Effect */
@keyframes vsRematchPulse {
	0%, 100% {
		filter: brightness(1) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.55));
		transform: scale(1);
	}
	50% {
		filter: brightness(1.15) drop-shadow(0 0 16px rgba(251, 191, 36, 0.9));
		transform: scale(1.03);
	}
}

/* Miniature avatar face on the post-match results chain breakdown pill */
.vs-pill-avatar-img {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	object-fit: cover;
	margin-right: 5px;
	vertical-align: middle;
	border: 1.5px solid rgba(255, 255, 255, 0.90);
	background: #1e1b4b;
	display: inline-block;
}

/* ==========================================================================
   TITLE SCREEN PLAYER PROFILE WIDGET
   ========================================================================== */
.title-profile-widget {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 5;
	flex-shrink: 0;
}

.title-profile-widget:hover {
	transform: scale(1.04);
}

.title-profile-widget:active {
	transform: scale(0.96);
}

.title-avatar-ring {
	position: relative;
	width: 74px;
	height: 74px;
	border-radius: 50%;
	border: 3.5px solid #2563eb;
	background: radial-gradient(circle at 35% 35%, #1d4ed8 0%, #0f172a 100%);
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.65), 0 0 0 1.5px #0f172a;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: -8px;
	z-index: 1;
}

.title-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.title-profile-btn {
	position: relative;
	z-index: 2;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
	border: 2px solid #0f172a;
	border-radius: 999px;
	color: #ffffff;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	padding: 4px 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.title-profile-btn:hover {
	background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.title-profile-edit-dot {
	position: absolute;
	right: -5px;
	bottom: -5px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #2563eb;
	border: 1.5px solid #0f172a;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.title-profile-sub {
	font-size: 12px;
	font-weight: 800;
	color: #f8fafc;
	margin: 2px 0;
	padding: 3px 12px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.42);
	letter-spacing: 0.3px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.title-stat-sep {
	color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   IN-GAME PLAYER PROFILE BADGE (LEFT FLANK)
   ========================================================================== */
.hud-player-card {
	position: absolute;
	left: 0;
	top: 4px;
	max-width: calc(50% - 56px);
	transform: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	pointer-events: auto;
	cursor: pointer;
	z-index: 12;
	user-select: none;
	-webkit-user-select: none;
	transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
	background: transparent !important;
	border: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.hud-player-card:hover {
	transform: scale(1.06);
}

.hud-player-card:active {
	transform: scale(0.95);
}

body.vs-mode-active #hud-player-card {
	display: none !important;
}

.hud-player-avatar-ring {
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2.5px solid #38bdf8;
	background: #0f172a;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 3px;
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.hud-player-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	border-radius: 50%;
}

.hud-add-name-btn {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	border: 1px solid #38bdf8;
	border-radius: 12px;
	color: #ffffff;
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	padding: 3px 8px;
	box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.16s ease;
}

.hud-add-name-btn:hover {
	background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
	box-shadow: 0 4px 10px rgba(14, 165, 233, 0.6);
}

.hud-player-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	box-sizing: border-box;
	background: rgba(11, 18, 32, 0.80);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 10px;
	padding: 3px 6px;
	margin-top: -5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
	line-height: 1.1;
}

.hud-player-name {
	font-size: 9.5px;
	font-weight: 900;
	letter-spacing: 0.4px;
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-transform: uppercase;
}

.hud-player-stats-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
	row-gap: 2px;
	column-gap: 5px;
	white-space: normal;
}

.hud-player-stat.stat-wpm {
	font-size: 9.5px;
	font-weight: 800;
	color: #7dd3fc;
	line-height: 1.05;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

/* Solo play: NEVER show Word Crowns */
.hud-player-stat.stat-crowns {
	display: none !important;
}

/* ==========================================================================
   PVP MATCH 3, 2, 1, GO! COUNTDOWN OVERLAY
   ========================================================================== */
.vs-countdown-overlay {
	position: fixed;
	inset: 0;
	z-index: 140;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at center, rgba(15, 23, 42, 0.40) 0%, rgba(2, 6, 23, 0.72) 100%);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	pointer-events: auto;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.vs-countdown-overlay.show {
	display: flex !important;
	opacity: 1 !important;
}

.vs-countdown-overlay.fading {
	opacity: 0 !important;
	pointer-events: none !important;
	transition: opacity 0.35s ease-out !important;
}

.vs-countdown-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transform: translateY(-24px);
}

.vs-countdown-banner {
	font-size: clamp(14px, 4.4vw, 20px);
	font-weight: 900;
	letter-spacing: 3.5px;
	color: #fde047;
	text-transform: uppercase;
	text-shadow:
		0 2px 6px rgba(0, 0, 0, 0.9),
		0 0 16px rgba(250, 204, 21, 0.6);
	animation: vsCountdownBannerPulse 0.88s infinite alternate ease-in-out;
}

.vs-countdown-number {
	font-family: 'Alice', serif;
	font-size: clamp(6.5rem, 24vw, 10rem);
	font-weight: 900;
	line-height: 1;
	text-align: center;
	color: #facc15;
	background: linear-gradient(180deg, #fef08a 0%, #facc15 50%, #ca8a04 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	filter:
		drop-shadow(0 8px 18px rgba(0, 0, 0, 0.9))
		drop-shadow(0 0 32px rgba(250, 204, 21, 0.75));
	transform-origin: center center;
}

.vs-countdown-number.pop-in {
	animation: vsCountdownTick 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.vs-countdown-number.is-go {
	font-size: clamp(7.5rem, 28vw, 12rem);
	color: #4ade80;
	background: linear-gradient(180deg, #dcfce7 0%, #4ade80 45%, #15803d 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	filter:
		drop-shadow(0 8px 24px rgba(0, 0, 0, 0.95))
		drop-shadow(0 0 44px rgba(74, 222, 128, 0.95));
	animation: vsCountdownGo 0.75s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes vsCountdownTick {
	0% {
		transform: scale(2.5);
		opacity: 0;
	}
	20% {
		transform: scale(1.05);
		opacity: 1;
	}
	45% {
		transform: scale(1.0);
		opacity: 1;
	}
	80% {
		transform: scale(0.95);
		opacity: 0.92;
	}
	100% {
		transform: scale(0.75);
		opacity: 0.1;
	}
}

@keyframes vsCountdownGo {
	0% {
		transform: scale(0.4);
		opacity: 0;
	}
	30% {
		transform: scale(1.28);
		opacity: 1;
	}
	60% {
		transform: scale(1.05);
		opacity: 1;
	}
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

@keyframes vsCountdownBannerPulse {
	0% {
		transform: scale(0.96);
		opacity: 0.85;
	}
	100% {
		transform: scale(1.04);
		opacity: 1;
	}
}

/* ==========================================================================
   PVP WINS LEADERBOARD MODAL (Handcrafted Felt & Wooden Cabinet Aesthetic)
   ========================================================================== */
#leaderboard-modal {
	z-index: 155;
	align-items: center !important;
	justify-content: center !important;
	padding: max(14px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom)) 12px !important;
	box-sizing: border-box !important;
	background: rgba(14, 8, 4, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.leaderboard-card {
	background: linear-gradient(180deg, #351e12 0%, #24130a 35%, #160a04 100%);
	border: 3px solid #8e582d;
	border-top: 3.5px solid #a86c3b;
	border-bottom: 4px solid #140803;
	border-radius: 24px;
	padding: 16px 14px 14px 14px;
	max-width: 440px;
	width: 95%;
	max-height: 88dvh;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		inset 0 1px 2px rgba(255, 220, 150, 0.35),
		0 0 32px rgba(212, 175, 55, 0.22);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
	transform: scale(0.94);
	transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	overflow: hidden;
	margin: auto 0;
}

#leaderboard-modal.show .leaderboard-card {
	transform: scale(1);
}

.leaderboard-card .theme-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 2px solid #5a331c;
	margin-bottom: 2px;
}

.leaderboard-title-group {
	display: flex;
	align-items: center;
	gap: 10px;
	text-align: left;
}

.leaderboard-trophy-icon {
	font-size: 28px;
	line-height: 1;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.leaderboard-title-group h3 {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: 1.25rem;
	font-weight: 900;
	letter-spacing: 1px;
	color: #ffd700;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
	text-transform: uppercase;
}

.leaderboard-subhead {
	font-size: 11px;
	font-weight: 700;
	color: #f5dfa8;
	letter-spacing: 0.6px;
	margin-top: 1px;
	opacity: 0.9;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
	text-transform: uppercase;
}

#btn-leaderboard-close {
	background: linear-gradient(180deg, #4a2817 0%, #29140a 100%);
	border: 1.5px solid #8e582d;
	color: #f5dfa8;
	font-size: 26px;
	line-height: 1;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
	transition: all 0.2s ease;
	outline: none;
}

#btn-leaderboard-close:hover {
	border-color: #ffd700;
	color: #ffffff;
	transform: scale(1.08);
}

/* Top 3 Podium Cards with Green Felt Backing */
.leaderboard-podium {
	display: grid;
	grid-template-columns: 1fr 1.15fr 1fr;
	align-items: flex-end;
	gap: 8px;
	padding: 14px 10px 10px 10px;
	background: radial-gradient(ellipse at center, #184c2c 0%, #0c2b18 65%, #06190e 100%);
	border: 2px solid #5a331c;
	border-top: 2px solid #734224;
	border-radius: 16px;
	box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.65), 0 3px 8px rgba(0, 0, 0, 0.4);
	position: relative;
}

.podium-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: linear-gradient(180deg, #2b180d 0%, #1a0e07 100%);
	border-radius: 14px;
	padding: 12px 6px 8px 6px;
	border: 1.5px solid #5a331c;
	position: relative;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 220, 150, 0.15);
	transition: transform 0.15s ease;
}

.podium-slot.rank-1 {
	order: 2;
	padding-top: 14px;
	background: linear-gradient(180deg, #442812 0%, #201108 100%);
	border: 2px solid #ffd700;
	box-shadow: 0 0 22px rgba(255, 215, 0, 0.35), 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 240, 180, 0.4);
	transform: translateY(-4px);
}

.podium-slot.rank-2 {
	order: 1;
	border-color: #cbd5e1;
	background: linear-gradient(180deg, #2f2118 0%, #18110c 100%);
}

.podium-slot.rank-3 {
	order: 3;
	border-color: #cd7f32;
	background: linear-gradient(180deg, #331f13 0%, #1a0f08 100%);
}

.podium-medal {
	position: absolute;
	top: -12px;
	font-size: 20px;
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
}

.podium-avatar-ring {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #5a331c;
	margin-bottom: 5px;
	background: #140803;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.podium-slot.rank-1 .podium-avatar-ring {
	width: 54px;
	height: 54px;
	border-color: #ffd700;
	box-shadow: 0 0 14px rgba(255, 215, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.podium-slot.rank-2 .podium-avatar-ring {
	border-color: #e2e8f0;
}

.podium-slot.rank-3 .podium-avatar-ring {
	border-color: #cd7f32;
}

.podium-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.podium-name {
	font-family: 'Alice', serif;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	line-height: 1.2;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.podium-slot.rank-1 .podium-name {
	color: #ffd700;
	font-weight: 900;
}

.podium-wins-badge {
	margin-top: 5px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: linear-gradient(180deg, #3a2212 0%, #1e1008 100%);
	border: 1px solid #734224;
	padding: 2.5px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 900;
	color: #f5dfa8;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.podium-slot.rank-1 .podium-wins-badge {
	border-color: #ffd700;
	background: linear-gradient(180deg, #4f2e10 0%, #2c1807 100%);
	color: #ffd700;
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.podium-slot.is-open-slot {
	opacity: 0.85;
	border-style: dashed;
	border-color: #734224;
	background: rgba(30, 16, 9, 0.45);
}

.podium-avatar-ring.is-open-ring {
	border: 2px dashed #8e582d;
	background: #24130a;
	display: flex;
	align-items: center;
	justify-content: center;
}

.podium-open-icon {
	font-size: 20px;
	line-height: 1;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.podium-wins-badge.is-open-badge {
	border-color: #8e582d;
	background: rgba(74, 40, 23, 0.5);
	color: #f5dfa8;
	font-size: 9.5px;
	padding: 2px 6px;
}

.podium-slot.lb-slot-loading {
	opacity: 0.55;
}

.lb-shimmer {
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
	background-size: 200% 100%;
	animation: lbShimmer 1.5s infinite;
}

.lb-shimmer-text {
	color: #a86c3b;
	font-size: 11px;
	font-weight: 800;
}

@keyframes lbShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Scrollable Rankings List (Ranks 4+) with Wood Plaque Rows on Billiard Green Felt Backing */
.leaderboard-list-wrap {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	min-height: 120px;
	padding: 4px;
	background: radial-gradient(ellipse at center, rgba(24, 76, 44, 0.5) 0%, rgba(12, 43, 24, 0.7) 100%);
	border: 2px solid #5a331c;
	border-radius: 16px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
}

.leaderboard-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lb-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-radius: 12px;
	background: linear-gradient(180deg, #2b180d 0%, #1a0e07 100%);
	border: 1.5px solid #5a331c;
	border-top: 1.5px solid #734224;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 220, 150, 0.15);
	transition: background 0.15s ease;
}

.lb-row.is-current-user {
	background: linear-gradient(180deg, #442812 0%, #261409 100%);
	border: 1.8px solid #ffd700;
	box-shadow: 0 0 16px rgba(255, 215, 0, 0.35), inset 0 1px 2px rgba(255, 240, 180, 0.3);
}

.lb-row-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1;
}

.lb-rank-num {
	width: 28px;
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 900;
	color: #ffd700;
	text-align: center;
	flex-shrink: 0;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.lb-row-avatar-ring {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #8e582d;
	flex-shrink: 0;
	background: #140803;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.lb-row.is-current-user .lb-row-avatar-ring {
	border-color: #ffd700;
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.lb-row-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lb-row-name {
	font-family: 'Alice', serif;
	font-size: 13.5px;
	font-weight: 800;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.lb-row.is-current-user .lb-row-name {
	color: #ffd700;
}

.lb-you-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	padding: 1px 6px;
	font-family: 'Alice', serif;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #1a0800;
	background: linear-gradient(180deg, #ffe066 0%, #f5a623 100%);
	border: 1px solid #fff2a3;
	border-radius: 6px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 6px rgba(255, 215, 0, 0.6);
	vertical-align: middle;
	line-height: 1.2;
	text-shadow: none;
	transform: translateY(-1px);
	animation: lbYouPulse 2.4s ease-in-out infinite;
}

@keyframes lbYouPulse {
	0%, 100% {
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 6px rgba(255, 215, 0, 0.6);
	}
	50% {
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 220, 100, 0.95);
	}
}

.podium-slot .podium-name .lb-you-badge {
	display: inline-block;
	margin-left: 5px;
	padding: 1px 5px;
	font-size: 9.5px;
}

.lb-row-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.lb-row-wins {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 900;
	color: #ffd700;
	background: linear-gradient(180deg, #442a10 0%, #241608 100%);
	border: 1px solid #8e582d;
	padding: 3px 8px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lb-row.is-current-user .lb-row-wins {
	border-color: #ffd700;
	box-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
}

.lb-row-wpm {
	font-size: 11.5px;
	font-weight: 800;
	color: #6ee7b7;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.lb-season-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: linear-gradient(135deg, rgba(87, 46, 17, 0.6) 0%, rgba(35, 17, 8, 0.85) 100%);
	border: 1.5px dashed #8e582d;
	border-radius: 12px;
	padding: 10px 12px;
	margin-top: 6px;
	font-size: 11.5px;
	font-weight: 800;
	color: #ffd700;
	text-align: center;
	letter-spacing: 0.3px;
	box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.15);
}

.lb-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 32px 16px;
	color: #f5dfa8;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.5px;
}

.lb-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid rgba(255, 215, 0, 0.2);
	border-top-color: #ffd700;
	border-radius: 50%;
	animation: lbSpin 0.75s linear infinite;
}

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

.lb-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
	padding: 24px 16px;
	color: #f5dfa8;
}

.lb-empty-trophy {
	font-size: 28px;
	margin-bottom: 2px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.lb-empty-title {
	font-family: 'Alice', serif;
	font-size: 14px;
	font-weight: 900;
	color: #ffd700;
	letter-spacing: 0.4px;
}

.lb-empty-sub {
	font-size: 11.5px;
	font-weight: 700;
	color: #d4a373;
	line-height: 1.35;
	max-width: 240px;
}

/* Pinned "YOUR STANDING" Footer (Displayed ONLY when player rank > 10) */
.leaderboard-your-standing {
	background: linear-gradient(180deg, #422614 0%, #261309 100%);
	border: 2px solid #ffd700;
	border-radius: 14px;
	padding: 8px 12px;
	display: none; /* Controlled dynamically in JS */
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.25);
	flex-shrink: 0;
	box-sizing: border-box;
}

.lb-your-left {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.lb-your-rank-badge {
	background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 900;
	padding: 3px 6px;
	border-radius: 6px;
	border: 1px solid #ffd700;
	flex-shrink: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lb-your-avatar-ring {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #ffd700;
	flex-shrink: 0;
	background: #140803;
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.lb-your-avatar {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lb-your-info {
	display: flex;
	flex-direction: column;
	text-align: left;
	min-width: 0;
	overflow: hidden;
}

.lb-your-name {
	font-family: 'Alice', serif;
	font-size: 14px;
	font-weight: 900;
	color: #ffd700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.lb-your-sub {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: #f5dfa8;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.15;
}

.lb-your-stats {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.lb-badge-wins {
	background: linear-gradient(180deg, #1b5331 0%, #0d2f1b 100%);
	border: 1px solid #4ade80;
	color: #4ade80;
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 900;
	padding: 3px 8px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lb-badge-wpm {
	background: linear-gradient(180deg, #442a10 0%, #241608 100%);
	border: 1px solid #ffd700;
	color: #ffd700;
	font-size: 11.5px;
	font-weight: 900;
	padding: 3px 8px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lb-icon {
	line-height: 1;
}

/* ==========================================================================
   PROFILE & STATS MODAL - ROYAL BLUE LEATHER SCRUFFLE PASSPORT
   ========================================================================== */
#profile-modal {
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100% !important;
	height: 100dvh !important;
	background: #081226 !important;
	z-index: 160 !important;
	display: none;
	align-items: stretch !important;
	justify-content: flex-start !important;
	padding: 0 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
}

#profile-modal.show {
	display: flex !important;
}

.profile-card,
.profile-card.passport-cover {
	position: relative !important;
	width: 100% !important;
	max-width: 480px !important;
	min-height: 100% !important;
	margin: 0 auto !important;
	border-radius: 0 !important;
	border: none !important;
	box-shadow: inset 14px 0 22px -10px rgba(2, 6, 18, 0.78), inset -8px 0 18px -10px rgba(2, 6, 18, 0.55) !important;
	transform: none;
	transition: none;
	/* Royal blue passport exterior with pebbled leather micro-grain + weave */
	background-color: #102348 !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.2px),
		radial-gradient(rgba(3, 8, 22, 0.24) 1px, transparent 1.2px),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 2px, transparent 2px, transparent 6px),
		linear-gradient(90deg, rgba(4, 10, 26, 0.55) 0px, rgba(255, 255, 255, 0.06) 8px, transparent 18px),
		radial-gradient(circle at 50% 10%, #1d3c78 0%, #112650 52%, #091530 100%) !important;
	background-size: 6px 6px, 6px 6px, 12px 12px, 100% 100%, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0, 0 0, 0 0 !important;
	padding: max(12px, env(safe-area-inset-top)) 12px max(28px, env(safe-area-inset-bottom)) 12px !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	color: #ffffff;
	text-align: center;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	touch-action: pan-y !important;
}

#profile-modal.show .profile-card {
	transform: none;
}

.passport-inner-stitch {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	border: 1.5px dashed rgba(246, 207, 101, 0.36);
	border-radius: 20px;
	padding: 10px 11px 12px 11px;
	box-shadow: inset 0 0 0 3px rgba(9, 20, 44, 0.45), 0 0 0 1px rgba(246, 207, 101, 0.14);
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
	overflow: hidden;
}

.passport-header.page-tile-header {
	margin-bottom: 0 !important;
	padding-top: 2px !important;
	padding-left: 50px !important;
	padding-right: 50px !important;
	flex-shrink: 0 !important;
}

.passport-header.page-tile-header #profile-tile-title .creator-header-tile {
	width: clamp(13.5px, 3.6vw, 20px) !important;
	height: clamp(13.5px, 3.6vw, 20px) !important;
}

.passport-header.page-tile-header .page-tile-close-btn {
	top: 0 !important;
	right: 0 !important;
}

.passport-foil-subtitle {
	color: #f6cf65 !important;
	letter-spacing: 2px !important;
	font-size: 10.5px !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

/* Passport Section Tabs */
.passport-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 7px;
	flex-shrink: 0;
}

.passport-tab-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 6px;
	border-radius: 12px;
	border: 2px solid rgba(246, 207, 101, 0.32);
	background: rgba(8, 19, 44, 0.75);
	color: #cbd5e1;
	font-family: inherit;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.passport-tab-btn:active {
	transform: scale(0.97);
}

.passport-tab-btn.active {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 100%);
	border-color: #231409;
	color: #231409;
	box-shadow: 0 3px 0 #231409, 0 4px 10px rgba(2, 6, 18, 0.35);
}

.passport-tab-panels {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	padding-right: 1px;
}

.passport-tab-panel {
	display: none;
	flex-direction: column;
	gap: 10px;
}

.passport-tab-panel.active {
	display: flex;
}

/* ==========================================================================
   VERTICAL PASSPORT ID CARD (INTERIOR DATA PAGE)
   ========================================================================== */
.passport-id-card {
	position: relative;
	background-color: #f4ecd7;
	background-image:
		repeating-radial-gradient(circle at 82% 24%, rgba(29, 78, 216, 0.045) 0px, rgba(29, 78, 216, 0.045) 1px, transparent 1px, transparent 9px),
		repeating-linear-gradient(125deg, rgba(180, 145, 70, 0.045) 0px, rgba(180, 145, 70, 0.045) 1px, transparent 1px, transparent 8px),
		linear-gradient(170deg, #faf5e6 0%, #f1e7cc 58%, #e8d9b5 100%);
	border: 2.5px solid #231409;
	border-radius: 18px;
	padding: 12px 12px 10px 12px;
	color: #1f1710;
	box-shadow:
		0 8px 22px rgba(3, 8, 22, 0.55),
		inset 0 0 0 2px rgba(212, 168, 67, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: hidden;
	text-align: left;
}

.passport-id-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-bottom: 8px;
	border-bottom: 1.5px solid rgba(35, 20, 9, 0.16);
}

.passport-emblem-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

.passport-brand-logo {
	width: auto;
	height: 26px;
	object-fit: contain;
	flex-shrink: 0;
	display: block;
	filter: drop-shadow(0 1px 2px rgba(35, 20, 9, 0.28));
}

.passport-doc-type {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.9px;
	color: #8a641d;
	text-transform: uppercase;
	line-height: 1.1;
}

.passport-id-actions {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}

/* Vertical Portrait Photo Stage */
.passport-photo-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px 0 2px 0;
}

.passport-photo-frame.profile-avatar-large-ring {
	position: relative;
	width: 104px;
	height: 122px;
	border-radius: 14px;
	border: 3px solid #231409;
	background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
	box-shadow:
		0 5px 14px rgba(15, 23, 42, 0.28),
		0 0 0 3px #f6cf65,
		0 0 0 5px rgba(35, 20, 9, 0.18);
	overflow: hidden;
	margin: 0;
	padding: 0;
}

.profile-avatar-large-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.passport-photo-corner {
	position: absolute;
	width: 10px;
	height: 10px;
	border-color: rgba(250, 204, 21, 0.9);
	border-style: solid;
	pointer-events: none;
}

.passport-photo-corner.tl { top: 4px; left: 4px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.passport-photo-corner.tr { top: 4px; right: 4px; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }
.passport-photo-corner.bl { bottom: 4px; left: 4px; border-width: 0 0 2px 2px; border-radius: 0 0 0 2px; }
.passport-photo-corner.br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }

.passport-ink-stamp {
	position: absolute;
	right: calc(50% - 88px);
	bottom: 2px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 2.5px double rgba(185, 28, 28, 0.72);
	background: rgba(254, 242, 242, 0.72);
	color: rgba(185, 28, 28, 0.85);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: rotate(-14deg);
	pointer-events: none;
	box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.16);
}

.passport-stamp-top,
.passport-stamp-bot {
	font-size: 7px;
	font-weight: 900;
	letter-spacing: 0.7px;
	line-height: 1.1;
}

.passport-stamp-mid {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	border-top: 1px solid rgba(185, 28, 28, 0.55);
	border-bottom: 1px solid rgba(185, 28, 28, 0.55);
	padding: 1px 4px;
	margin: 1px 0;
}

/* Passport Field & Holder Name */
.passport-field-group.profile-username-group {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.passport-field-label {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 1px;
	color: #1e3a8a;
	text-transform: uppercase;
	display: block;
}

.passport-name-input,
.passport-field-group input {
	width: 100% !important;
	background: #fffdf7 !important;
	color: #1e1b16 !important;
	border: 2px solid #231409 !important;
	border-radius: 11px !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	letter-spacing: 0.4px !important;
	padding: 10px 12px !important;
	box-shadow: inset 0 2px 4px rgba(35, 20, 9, 0.08) !important;
	text-align: center !important;
	box-sizing: border-box !important;
}

.passport-name-input::placeholder {
	color: #94846a !important;
	font-weight: 600 !important;
}

.passport-name-input:focus {
	outline: none !important;
	border-color: #1d4ed8 !important;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2) !important;
}

/* Improved Avatar Selector Carousel */
.passport-avatar-selector {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.passport-avatar-selector-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.passport-avatar-counter {
	font-size: 10px;
	font-weight: 900;
	color: #7c5815;
	background: rgba(250, 204, 21, 0.25);
	border: 1px solid rgba(161, 98, 7, 0.35);
	border-radius: 999px;
	padding: 1px 8px;
}

.passport-avatar-carousel-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.passport-avatar-step-btn {
	width: 32px;
	height: 54px;
	flex-shrink: 0;
	border-radius: 10px;
	border: 2px solid #231409;
	background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
	box-shadow: 0 2px 0 #231409;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: transform 0.12s ease, filter 0.12s ease;
}

.passport-avatar-step-btn:active {
	transform: translateY(1px) scale(0.96);
}

.profile-avatar-grid.passport-avatar-strip {
	flex: 1 1 auto;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 7px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	margin: 0;
	padding: 6px 6px;
	background: rgba(30, 58, 138, 0.08);
	border-radius: 12px;
	border: 1.5px solid rgba(35, 20, 9, 0.18);
}

.profile-avatar-grid.passport-avatar-strip::-webkit-scrollbar {
	display: none;
}

.profile-avatar-option {
	flex: 0 0 auto;
	width: 46px;
	height: 54px;
	border-radius: 10px;
	border: 2px solid rgba(35, 20, 9, 0.32);
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	background: #dbeafe;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	scroll-snap-align: center;
}

.profile-avatar-option:hover {
	transform: translateY(-2px);
	border-color: #1d4ed8;
}

.profile-avatar-option.selected {
	border-color: #231409;
	box-shadow: 0 0 0 2.5px #facc15, 0 3px 8px rgba(35, 20, 9, 0.35);
	transform: scale(1.06);
}

.profile-avatar-option img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* Machine-Readable Zone (MRZ) */
.passport-mrz {
	margin-top: 2px;
	padding: 6px 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.6);
	border-top: 1px dashed rgba(35, 20, 9, 0.25);
	font-family: 'Share Tech Mono', monospace;
	font-size: 9.5px;
	line-height: 1.35;
	letter-spacing: 0.9px;
	color: rgba(30, 41, 59, 0.72);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: clip;
	user-select: none;
}

/* Gold-Foil Section Divider */
.passport-section-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 2px 0 -4px 0;
}

.passport-section-rule {
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(246, 207, 101, 0.55), transparent);
}

.profile-sub-title,
.passport-section-title {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #f6cf65;
	margin: 0;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ==========================================================================
   AWARDS & CAREER STAMPS LAYOUT (2-UP FEATURED + 3-UP SECONDARY + BANNER)
   ========================================================================== */
.passport-awards-layout {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.passport-featured-awards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
	text-align: left;
}

.profile-stat-box.passport-stamp-card {
	background: linear-gradient(160deg, rgba(20, 46, 98, 0.92) 0%, rgba(11, 27, 62, 0.95) 100%);
	border: 2px solid rgba(246, 207, 101, 0.45);
	border-radius: 14px;
	padding: 10px 10px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 9px;
	box-shadow: 0 4px 12px rgba(2, 6, 18, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.passport-stamp-icon-badge {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 11px;
	background: rgba(246, 207, 101, 0.14);
	border: 1.5px solid rgba(246, 207, 101, 0.42);
	display: flex;
	align-items: center;
	justify-content: center;
}

.passport-duck-icon {
	width: 26px !important;
	height: 26px !important;
	object-fit: contain;
}

.passport-stamp-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}

.profile-stat-label {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.7px;
	color: #cbd5e1;
	text-transform: uppercase;
}

.profile-stat-value {
	font-size: 20px;
	font-weight: 900;
	color: #ffffff;
	display: inline-flex;
	align-items: baseline;
	gap: 3px;
	line-height: 1.1;
}

.profile-stat-desc {
	font-size: 10px;
	color: rgba(191, 219, 254, 0.78);
	line-height: 1.2;
}

.passport-secondary-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.profile-stat-box.passport-mini-stat {
	background: rgba(9, 22, 50, 0.72);
	border: 1.5px solid rgba(147, 197, 253, 0.25);
	border-radius: 13px;
	padding: 9px 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	text-align: center;
}

.passport-mini-svg {
	display: block;
	margin-bottom: 1px;
}

.passport-mini-stat .profile-stat-value {
	font-size: 17px;
}

.passport-stat-unit {
	font-size: 9.5px;
	font-weight: 800;
	color: #93c5fd;
	margin-left: 2px;
}

/* Gold-Foil Achievements Passport Banner */
.passport-achieve-banner-wrap {
	margin: 0;
}

.profile-achievements-cta-btn.passport-achieve-banner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 13px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(246, 207, 101, 0.2) 0%, rgba(217, 119, 6, 0.16) 100%);
	border: 1.5px solid rgba(246, 207, 101, 0.65);
	color: #fef3c7;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(2, 6, 18, 0.35);
	transition: transform 0.14s ease, filter 0.14s ease;
}

.profile-achievements-cta-btn.passport-achieve-banner:active {
	transform: scale(0.98);
}

.passport-achieve-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	line-height: 1.2;
}

.passport-achieve-title {
	font-size: 12.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	color: #fde68a;
}

.passport-achieve-sub {
	font-size: 10px;
	font-weight: 600;
	color: rgba(254, 243, 199, 0.78);
}

/* Gold-Foil Save Passport Button */
.profile-save-btn.passport-save-btn {
	width: 100%;
	padding: 13px 18px;
	border-radius: 14px;
	font-size: 15.5px;
	font-weight: 900;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #231409;
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 60%, #d99116 100%);
	border: 2.5px solid #231409;
	box-shadow: 0 4px 0 #231409, 0 8px 18px rgba(2, 6, 18, 0.45);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: transform 0.14s ease, filter 0.14s ease;
}

.profile-save-btn.passport-save-btn:hover {
	filter: brightness(1.05);
}

.profile-save-btn.passport-save-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #231409;
}

/* Android-Specific Profile Viewport Optimization */
html.is-android #profile-modal {
	padding: 0 !important;
	margin: 0 !important;
}

html.is-android .profile-card {
	margin: 0 auto !important;
	transform: none;
}

/* ==============================================================================
   Cloud Account Sync & Social Login Section (Google OAuth + Email)
   ============================================================================== */
.profile-account-section.passport-cloud-section {
	background: rgba(9, 22, 50, 0.78);
	border: 1.5px solid rgba(246, 207, 101, 0.32);
	border-radius: 16px;
	padding: 12px 13px 14px 13px;
	margin-bottom: 2px;
	text-align: left;
	box-shadow: 0 4px 16px rgba(2, 6, 18, 0.4);
}

.profile-account-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.passport-cloud-status-wrap {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.passport-cloud-svg {
	flex-shrink: 0;
	display: block;
}

.profile-account-id-group {
	display: flex;
	align-items: center;
	gap: 5px;
}

.profile-account-status-label {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #7dd3fc;
	text-transform: uppercase;
}

.profile-account-status-label.is-synced {
	color: #4ade80;
}

.profile-account-id-badge {
	font-size: 10px;
	font-weight: 800;
	color: #1e293b;
	background: #fffbeb;
	border: 1.5px solid #231409;
	border-radius: 8px;
	padding: 4px 7px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	box-shadow: 0 2px 0 rgba(35, 20, 9, 0.85);
	transition: transform 0.12s ease, background 0.12s ease;
}

.profile-account-id-badge:hover {
	background: #fef3c7;
}

.profile-account-id-badge:active {
	transform: translateY(1px);
}

.profile-share-id-badge,
.passport-share-pill {
	background: #fde68a !important;
	border-color: #231409 !important;
	color: #231409 !important;
}

.profile-share-id-badge:hover,
.passport-share-pill:hover {
	background: #fcd34d !important;
}

.passport-inline-svg {
	flex-shrink: 0;
	display: block;
}

.profile-account-msg {
	font-size: 11.5px;
	line-height: 1.45;
	color: #cbd5e1;
	margin: 0 0 10px 0;
}

.passport-auth-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.passport-google-btn {
	width: 100%;
	padding: 11px 14px;
	border-radius: 12px;
	background: #ffffff;
	color: #1f2937;
	border: 2px solid #231409;
	box-shadow: 0 3px 0 #231409, 0 4px 12px rgba(2, 6, 18, 0.35);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.12s ease;
}

.passport-google-btn:hover {
	background: #f8fafc;
}

.passport-google-btn:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #231409;
}

.passport-google-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.passport-auth-divider {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 1px;
	color: rgba(203, 213, 225, 0.72);
	margin: 2px 0;
}

.passport-auth-divider::before,
.passport-auth-divider::after {
	content: '';
	flex: 1 1 auto;
	height: 1px;
	background: rgba(148, 163, 184, 0.25);
}

.profile-auth-input {
	width: 100%;
	background: rgba(8, 17, 38, 0.85);
	border: 1.5px solid rgba(147, 197, 253, 0.28);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13.5px;
	color: #ffffff;
	box-sizing: border-box;
	margin-bottom: 8px;
	outline: none;
	font-family: inherit;
	transition: border-color 0.15s ease;
}

.profile-auth-input:focus {
	border-color: #f6cf65;
	box-shadow: 0 0 0 2px rgba(246, 207, 101, 0.22);
}

.profile-auth-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 2px;
}

.profile-auth-action-btn {
	width: 100%;
	padding: 11px;
	border-radius: 11px;
	background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff;
	font-weight: 800;
	font-size: 12.5px;
	letter-spacing: 0.7px;
	border: 2px solid #231409;
	cursor: pointer;
	text-transform: uppercase;
	box-shadow: 0 3px 0 #231409;
	transition: transform 0.14s ease, filter 0.14s ease;
}

.profile-auth-action-btn:hover {
	filter: brightness(1.08);
}

.profile-auth-action-btn:active {
	transform: translateY(1px);
	box-shadow: 0 1px 0 #231409;
}

.profile-auth-action-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.profile-auth-secondary-btn {
	background: transparent;
	border: none;
	color: #93c5fd;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px;
	text-align: center;
}

.profile-auth-secondary-btn:hover {
	color: #fde68a;
}

/* Guarantee VS Mode HUD Bottom Visibility */
body.vs-mode-active #hud-bottom {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	z-index: 100 !important;
}

/* ==============================================================================
   Hidden Word Golden Rubber Duck Reward Modal & Profile Counters
   ============================================================================== */
#hidden-word-modal {
	z-index: 170;
}

.hidden-duck-card {
	background: linear-gradient(180deg, #3a2214 0%, #221208 40%, #150903 100%);
	border: 3px solid #ffd700;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.95),
		0 0 45px rgba(255, 215, 0, 0.45),
		inset 0 1px 3px rgba(255, 240, 180, 0.6);
	position: relative;
	overflow: hidden;
}

.hidden-duck-tag {
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 2.2px;
	color: #ffd700;
	text-transform: uppercase;
	margin-top: 4px;
	text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.hidden-word-title {
	font-family: 'Alice', serif;
	font-size: 32px;
	font-weight: 900;
	letter-spacing: 3px;
	color: #ffffff;
	margin: 6px 0 10px 0;
	text-shadow:
		0 2px 8px rgba(0, 0, 0, 0.8),
		0 0 20px rgba(255, 215, 0, 0.7);
}

.duck-stage-box {
	position: relative;
	width: 220px;
	height: 180px;
	margin: 0 auto 12px auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 20px;
	background: radial-gradient(circle at center, rgba(255, 215, 0, 0.25) 0%, rgba(255, 170, 0, 0.08) 55%, transparent 75%);
	overflow: visible;
}

.duck-stage-glow {
	position: absolute;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(255, 180, 0, 0.15) 50%, transparent 70%);
	filter: blur(12px);
	pointer-events: none;
	animation: duckGlowPulse 2.4s ease-in-out infinite alternate;
}

@keyframes duckGlowPulse {
	0% { transform: scale(0.9); opacity: 0.6; }
	100% { transform: scale(1.15); opacity: 1.0; }
}

.duck-stage-shadow {
	position: absolute;
	bottom: 12px;
	width: 110px;
	height: 22px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 75%);
	filter: blur(4px);
	pointer-events: none;
	transform-origin: center center;
}

.duck-2d-img {
	position: relative;
	width: 145px;
	height: 140px;
	object-fit: contain;
	display: block;
	pointer-events: none;
	transform-origin: 50% 88%;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.4));
	z-index: 2;
}

.duck-sparkle-container {
	position: absolute;
	bottom: 30px;
	left: 50%;
	width: 0;
	height: 0;
	pointer-events: none;
	z-index: 3;
}

.duck-pop-sparkle {
	position: absolute;
	border-radius: 2px;
	background: #ffd700;
	box-shadow: 0 0 8px #ffd700, 0 0 14px #ffffff;
	transform: translate(-50%, -50%) rotate(45deg) scale(0);
	animation: duckSparklePop 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes duckSparklePop {
	0% {
		transform: translate(-50%, -50%) rotate(45deg) scale(0.2);
		opacity: 1;
	}
	60% {
		opacity: 1;
	}
	100% {
		transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(225deg) scale(1.1);
		opacity: 0;
	}
}

.duck-badge-img {
	width: 24px;
	height: 24px;
	object-fit: contain;
	display: inline-block;
	vertical-align: middle;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.duck-mini-icon {
	width: 17px;
	height: 17px;
	object-fit: contain;
	display: inline-block;
	vertical-align: -2px;
	margin-right: 3px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.hidden-duck-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	margin: 0 auto 18px auto;
	background: linear-gradient(180deg, #2b180d 0%, #190c05 100%);
	border: 1.5px solid #ffd700;
	border-radius: 999px;
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.6),
		0 0 18px rgba(255, 215, 0, 0.35);
}

.duck-badge-icon {
	font-size: 20px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.duck-badge-text {
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #ffd700;
	text-shadow: 0 1px 8px rgba(255, 215, 0, 0.5);
}

.hidden-duck-btn {
	width: 100%;
	padding: 14px 20px;
	font-size: 15px;
	letter-spacing: 1.5px;
	background: linear-gradient(180deg, #ffd700 0%, #f59e0b 60%, #d97706 100%);
	color: #261102;
	font-weight: 900;
	border: 2px solid #fff5cc;
	box-shadow:
		0 6px 20px rgba(245, 158, 11, 0.5),
		inset 0 1px 2px #ffffff;
}
.hidden-duck-btn:hover,
.hidden-duck-btn:active {
	background: linear-gradient(180deg, #ffe566 0%, #fbbf24 60%, #eab308 100%);
	transform: scale(1.02);
}

.stat-box-ducks {
	border-color: rgba(255, 215, 0, 0.28) !important;
	background: rgba(38, 22, 12, 0.70) !important;
}

.stat-ducks {
	color: #ffffff !important;
	font-weight: 900;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

.duck-count-num {
	color: #ffffff !important;
	font-weight: 900;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   PORTRAIT ORIENTATION ENFORCEMENT OVERLAY
   Blocks gameplay and prompts the player to rotate upright when turned landscape
   ========================================================================== */
#rotate-device-overlay {
	display: none !important;
}

/* Enforce landscape mode overlay ONLY when physically oriented in landscape (aspect ratio >= 1.25 and width >= 560px)
   AND never when the keyboard is open or when any input/textarea is focused or when a modal is active with an input */
@media screen and (orientation: landscape) and (min-width: 560px) and (min-aspect-ratio: 125/100) and (max-height: 600px),
       screen and (orientation: landscape) and (pointer: coarse) and (min-width: 560px) and (min-aspect-ratio: 125/100) and (max-device-width: 1024px) {
	#rotate-device-overlay:not(.keyboard-suppressed) {
		display: flex !important;
		position: fixed !important;
		inset: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		z-index: 999999 !important;
		background: radial-gradient(circle at center, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 0.99) 100%) !important;
		backdrop-filter: blur(14px) !important;
		-webkit-backdrop-filter: blur(14px) !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 24px !important;
		box-sizing: border-box !important;
		pointer-events: auto !important;
	}

	/* Never show orientation lock if typing / input is active anywhere in body */
	body.keyboard-open #rotate-device-overlay,
	body:has(input:focus) #rotate-device-overlay,
	body:has(textarea:focus) #rotate-device-overlay {
		display: none !important;
	}

	.rotate-device-card {
		background: linear-gradient(180deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%);
		border: 2px solid rgba(250, 204, 21, 0.65);
		border-radius: 24px;
		padding: 24px 30px;
		max-width: 440px;
		width: 90%;
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 12px;
		box-shadow:
			0 20px 50px rgba(0, 0, 0, 0.85),
			0 0 35px rgba(234, 179, 8, 0.22);
	}

	.rotate-device-phone-anim {
		width: 64px;
		height: 64px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(255, 255, 255, 0.08);
		border: 1.5px solid rgba(250, 204, 21, 0.4);
		border-radius: 50%;
		font-size: 36px;
		line-height: 1;
		animation: rotateDevicePrompt 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
	}

	.rotate-phone-glyph {
		display: inline-block;
		filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
	}

	.rotate-device-title {
		margin: 0;
		font-size: 1.22rem;
		font-weight: 900;
		letter-spacing: 1.2px;
		color: #fde047;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
	}

	.rotate-device-desc {
		margin: 0;
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1.45;
		color: #cbd5e1;
		max-width: 320px;
	}
}

@keyframes rotateDevicePrompt {
	0%, 15% {
		transform: rotate(90deg) scale(1);
	}
	45%, 75% {
		transform: rotate(0deg) scale(1.08);
	}
	90%, 100% {
		transform: rotate(90deg) scale(1);
	}
}

/* --------------------------------------------------------------------------
 * Interactive Onboarding Tutorial Guide (Level 1 M-A-T-C-H + Free Hint)
 * Spacious, Elegant Glassmorphic Card (Never visible on Title Screen / World Map / VS Mode)
 * -------------------------------------------------------------------------- */
body.title-screen-active #tutorial-guide-banner,
body.title-screen-active .tutorial-guide-banner,
body.world-map-active #tutorial-guide-banner,
body.world-map-active .tutorial-guide-banner,
body.vs-mode-active #tutorial-guide-banner,
body.vs-mode-active .tutorial-guide-banner {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.tutorial-guide-banner {
	position: fixed;
	top: 96px;
	top: max(96px, calc(env(safe-area-inset-top) + 86px));
	left: 50%;
	transform: translateX(-50%) translateY(-14px) scale(0.96);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	width: calc(100% - 24px);
	max-width: 440px;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	padding: 0 !important;
	color: #0f172a;
	font-family: inherit;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.18, 0.89, 0.32, 1.25);
	box-sizing: border-box;
}

.tutorial-guide-banner.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0) scale(1);
}

.tutorial-owl-bubble-container {
	position: relative;
	width: 100%;
	aspect-ratio: 543 / 190;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.48)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
	animation: owlFloat 3.2s ease-in-out infinite;
	user-select: none;
	-webkit-user-select: none;
}

@keyframes owlFloat {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

.tutorial-owl-bubble-container.owl-cheer {
	animation: owlCheer 0.45s ease-out;
}

@keyframes owlCheer {
	0% {
		transform: scale(1) translateY(0);
	}
	40% {
		transform: scale(1.08) translateY(-9px);
	}
	100% {
		transform: scale(1) translateY(0);
	}
}

.tutorial-owl-img {
	width: 100%;
	height: auto;
	display: block;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}

.tutorial-bubble-content {
	position: absolute;
	left: 31%;
	right: 4.5%;
	top: 5.5%;
	bottom: 42.5%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 2px 24px 2px 6px;
	box-sizing: border-box;
	pointer-events: auto;
	text-align: center;
}

.tutorial-message {
	color: #0f172a;
	font-family: 'Alice', serif;
	font-size: clamp(11.5px, 3.0vw, 14.5px);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.2px;
	text-align: center;
	margin: 0;
	padding: 0;
}

.tutorial-message .owl-hl {
	color: #1d4ed8;
	font-weight: 900;
}

.tutorial-skip-btn {
	position: absolute;
	top: 5px;
	right: 6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(148, 163, 184, 0.22);
	border: none;
	color: #64748b;
	font-size: 11px;
	font-weight: 900;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	z-index: 2;
}

.tutorial-skip-btn:hover,
.tutorial-skip-btn:active {
	background: rgba(239, 68, 68, 0.18);
	color: #ef4444;
	transform: scale(1.12);
}

/* Pulsing golden ring on HINT button during hint step */
.hud-action-btn.btn-hint.tutorial-hint-pulse {
	position: relative;
	border-color: #ffd700 !important;
	background: #3b2e10 !important;
	animation: tutorialHintPulse 1.25s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
	z-index: 100;
}

@keyframes tutorialHintPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8), 0 0 22px rgba(255, 215, 0, 0.5);
		transform: translateY(-2px) scale(1.06);
	}
	50% {
		box-shadow: 0 0 0 14px rgba(255, 215, 0, 0), 0 0 35px rgba(255, 215, 0, 0.85);
		transform: translateY(-4px) scale(1.11);
	}
}

/* Inactivity Idle Pulse on HINT button after 5 seconds of no interaction */
.hud-action-btn.btn-hint.idle-hint-pulse {
	position: relative;
	border-color: #ffd700 !important;
	background: #3b2e10 !important;
	animation: idleHintPulse 1.25s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
	z-index: 90;
}

@keyframes idleHintPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8), 0 0 16px rgba(255, 215, 0, 0.45);
		transform: translateY(-1px) scale(1.04);
	}
	50% {
		box-shadow: 0 0 0 10px rgba(255, 215, 0, 0), 0 0 28px rgba(255, 215, 0, 0.90);
		transform: translateY(-3px) scale(1.08);
	}
}

.hud-action-btn.btn-hint.tutorial-hint-pulse::after {
	content: '👆 TAP HINT';
	position: absolute;
	top: -34px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #ffd700, #f59e0b);
	color: #0f172a;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.6px;
	padding: 4px 11px;
	border-radius: 999px;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
	animation: tutorialHandBounce 0.8s ease-in-out infinite alternate;
	pointer-events: none;
}

@keyframes tutorialHandBounce {
	0% {
		transform: translateX(-50%) translateY(0);
	}
	100% {
		transform: translateX(-50%) translateY(-6px);
	}
}

/* ==============================================================================
   Achievement Board & In-Game Unlock Notifications
   ============================================================================== */

/* 1. Quick CTA button in Profile Modal */
.profile-achievements-cta-container {
	margin: 8px 0 16px 0;
	width: 100%;
}

.profile-achievements-cta-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: 14px;
	background: linear-gradient(180deg, #351e12 0%, #24130a 100%);
	border: 1.5px solid #8e582d;
	border-top: 2px solid #a86c3b;
	color: #ffd700;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.6px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 220, 150, 0.25);
	transition: all 0.18s ease;
}

.profile-achievements-cta-btn:hover {
	background: linear-gradient(180deg, #442614 0%, #2a150a 100%);
	border-color: #ffd700;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 215, 0, 0.3);
}

.profile-achieve-btn-left {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.profile-achieve-icon {
	font-size: 20px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.profile-achievements-badge {
	background: #140803;
	border: 1.5px solid #8e582d;
	color: #ffd700;
	font-size: 11.5px;
	font-weight: 900;
	padding: 3px 10px;
	border-radius: 999px;
	letter-spacing: 0.5px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* 2. In-Game Animated Achievement Unlock Toast */
.achievement-toast {
	position: fixed;
	top: 18px;
	top: max(18px, calc(env(safe-area-inset-top) + 12px));
	left: 50%;
	transform: translateX(-50%) translateY(-140%) scale(0.92);
	z-index: 10001;
	width: calc(100% - 32px);
	max-width: 420px;
	pointer-events: none;
	opacity: 0;
	transition: all 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	box-sizing: border-box;
}

.achievement-toast.show {
	transform: translateX(-50%) translateY(0) scale(1);
	opacity: 1;
	pointer-events: auto;
}

.achievement-toast-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: linear-gradient(180deg, #351e12 0%, #24130a 40%, #160a04 100%);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 2px solid #8e582d;
	border-top: 2.5px solid #ffd700;
	border-radius: 18px;
	box-shadow:
		0 16px 40px rgba(0, 0, 0, 0.85),
		0 0 24px rgba(212, 175, 55, 0.3),
		inset 0 1px 1px rgba(255, 220, 150, 0.35);
}

.achievement-toast-badge-box {
	width: 48px;
	height: 48px;
	border-radius: 13px;
	background: #140904;
	border: 2px solid #ffd700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 215, 0, 0.45), inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.achievement-toast-icon {
	font-size: 26px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.achievement-toast-content {
	flex: 1;
	min-width: 0;
	text-align: left;
}

.achievement-toast-headline {
	font-size: 10px;
	font-weight: 900;
	color: #ffd700;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 2px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.achievement-toast-title {
	font-family: 'Alice', serif;
	font-size: 14px;
	font-weight: 900;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.achievement-toast-desc {
	font-size: 11px;
	font-weight: 600;
	color: #d4a373;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 1px;
}

/* 3. Achievements Board Modal (Handcrafted Felt & Wooden Cabinet Aesthetic) */
#achievements-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	background: rgba(14, 8, 4, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	display: none;
	justify-content: flex-start;
	align-items: stretch;
	z-index: 99999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

#achievements-modal.show {
	display: flex !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.achievements-card {
	background: radial-gradient(circle at 50% 12%, #351e12 0%, #201108 55%, #0a0401 100%) !important;
	border: none;
	border-radius: 0;
	padding: max(16px, env(safe-area-inset-top, 16px)) 16px max(24px, env(safe-area-inset-bottom, 24px)) 16px;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: 100vw;
	max-height: 100dvh;
	box-shadow: none;
	color: #fbf5eb;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
	transform: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0;
}

#achievements-modal.show .achievements-card {
	transform: none;
}

.achievements-card .theme-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	border-bottom: 2px solid #5a331c;
	margin-bottom: 4px;
}

.achievements-header-group {
	display: flex;
	align-items: center;
	gap: 12px;
	text-align: left;
}

.achievements-ribbon-icon {
	font-size: 32px;
	line-height: 1;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
}

.achievements-header-group h3 {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: 1.4rem;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #ffd700;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 215, 0, 0.35);
	text-transform: uppercase;
}

.achievements-sub-headline {
	font-size: 12.5px;
	font-weight: 800;
	color: #f5dfa8;
	letter-spacing: 0.5px;
	margin-top: 2px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#btn-achievements-close {
	background: linear-gradient(180deg, #4a2817 0%, #29140a 100%) !important;
	border: 1.5px solid #8e582d !important;
	color: #f5dfa8 !important;
	font-size: 26px !important;
	line-height: 1 !important;
	width: 44px !important;
	height: 44px !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 220, 150, 0.25) !important;
	transition: all 0.18s ease !important;
	outline: none !important;
	-webkit-tap-highlight-color: transparent !important;
}

#btn-achievements-close:hover {
	border-color: #ffd700 !important;
	color: #ffffff !important;
	transform: scale(1.08) !important;
	box-shadow: 0 0 14px rgba(255, 215, 0, 0.4) !important;
}

#btn-achievements-close:active {
	background: linear-gradient(180deg, #351a0d 0%, #1c0b05 100%) !important;
	transform: scale(0.92) !important;
}

/* Progress Bar (Brass Inlay Track & Amber-Gold Glow) */
.achievements-progress-container {
	width: 100%;
	margin-top: 2px;
	margin-bottom: 2px;
}

.achievements-progress-track {
	width: 100%;
	height: 12px;
	background: #140803;
	border: 1.5px solid #5a331c;
	border-top: 1.5px solid #3d1f0f;
	border-bottom: 1.5px solid #734224;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
}

.achievements-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #fde047 100%);
	border-radius: 999px;
	box-shadow: 0 0 14px rgba(245, 158, 11, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.4);
	transition: width 0.4s ease;
}

/* Category Tabs (Carved Hardwood Tray & Handcrafted Inlay Toggles) */
.achievements-tabs {
	display: flex;
	gap: 8px;
	background: #180d06;
	padding: 5px;
	border-radius: 16px;
	border: 2px solid #5a331c;
	border-top: 2px solid #734224;
	border-bottom: 2.5px solid #140803;
	box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
}

.achievement-tab-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 12px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: #c49a75;
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.6px;
	cursor: pointer;
	transition: all 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.achievement-tab-btn:hover {
	color: #f5dfa8;
}

/* Active Solo Tab: Handcrafted Billiard Green Felt Inlay */
.achievement-tab-btn#tab-achieve-solo.active,
.achievement-tab-btn.active:first-child {
	background: radial-gradient(ellipse at 50% 30%, #1e5a35 0%, #103820 70%, #0a2415 100%) !important;
	color: #ffffff !important;
	border-color: #34d399 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 0 12px rgba(16, 185, 129, 0.3) !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Active PVP Tab: Royal Crimson / Rich Warm Mahogany Wood Inlay */
.achievement-tab-btn#tab-achieve-pvp.active {
	background: radial-gradient(ellipse at 50% 30%, #7c2d12 0%, #521c0b 70%, #300f06 100%) !important;
	color: #ffffff !important;
	border-color: #fb923c !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 0 12px rgba(249, 115, 22, 0.3) !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.achievement-tab-btn .tab-icon {
	font-size: 15px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.achievement-tab-btn .tab-pill {
	background: rgba(14, 7, 3, 0.7);
	border: 1px solid #5a331c;
	color: #f5dfa8;
	font-size: 11px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
}

.achievement-tab-btn.active .tab-pill {
	background: rgba(0, 0, 0, 0.45);
	border-color: rgba(255, 215, 0, 0.4);
	color: #ffd700;
}

/* Display Case Interior: Billiard Green Felt Cabinet Floor */
.achievements-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 12px 10px;
	flex: 1 1 auto;
	max-height: none !important;
	min-height: 220px;
	background:
		radial-gradient(ellipse at 50% 15%, #195230 0%, #103820 45%, #082113 100%) !important;
	border: 3px solid #5a331c !important;
	border-top: 3.5px solid #734224 !important;
	border-bottom: 4px solid #140803 !important;
	border-radius: 20px !important;
	box-shadow:
		inset 0 12px 28px rgba(0, 0, 0, 0.92),
		inset 0 -8px 18px rgba(0, 0, 0, 0.75),
		0 8px 24px rgba(0, 0, 0, 0.6) !important;
	box-sizing: border-box;
	position: relative;
}

.achievements-list::-webkit-scrollbar {
	width: 6px;
}
.achievements-list::-webkit-scrollbar-track {
	background: rgba(6, 25, 14, 0.85);
	border-radius: 4px;
}
.achievements-list::-webkit-scrollbar-thumb {
	background: #8e582d;
	border-radius: 4px;
}

/* Achievement Card Base: Handcrafted Hardwood Plaque Resting on Felt */
.achievement-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	box-sizing: border-box;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	position: relative;
}

/* UNLOCKED: Rich Polished Mahogany Plaque Resting on Felt with Brass/Gold Bevels */
.achievement-card.unlocked {
	background: linear-gradient(180deg, #381f12 0%, #261309 45%, #180b05 100%) !important;
	border: 1.8px solid #734224 !important;
	border-top: 2px solid #a86c3b !important;
	border-bottom: 2.5px solid #140803 !important;
	border-left: 5px solid #ffd700 !important;
	box-shadow:
		0 5px 12px rgba(0, 0, 0, 0.75),
		inset 0 1px 1px rgba(255, 220, 150, 0.35) !important;
}

.achievement-card.unlocked.common {
	border-left: 5px solid #10b981 !important;
	border-color: #734224 !important;
	box-shadow: 0 5px 12px rgba(0, 0, 0, 0.75), 0 0 14px rgba(16, 185, 129, 0.22), inset 0 1px 1px rgba(255, 220, 150, 0.3) !important;
}

.achievement-card.unlocked.rare {
	border-left: 5px solid #38bdf8 !important;
	border-color: #734224 !important;
	box-shadow: 0 5px 12px rgba(0, 0, 0, 0.75), 0 0 16px rgba(56, 189, 248, 0.25), inset 0 1px 1px rgba(255, 220, 150, 0.3) !important;
}

.achievement-card.unlocked.epic {
	border-left: 5px solid #c084fc !important;
	border-color: #734224 !important;
	box-shadow: 0 5px 12px rgba(0, 0, 0, 0.75), 0 0 18px rgba(192, 132, 252, 0.28), inset 0 1px 1px rgba(255, 220, 150, 0.3) !important;
}

.achievement-card.unlocked.legendary {
	border-left: 5px solid #ffd700 !important;
	border-color: #8e582d !important;
	background: linear-gradient(180deg, #442614 0%, #2a150a 45%, #1b0c05 100%) !important;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 215, 0, 0.35), inset 0 1px 2px rgba(255, 240, 180, 0.4) !important;
}

.achievement-card.unlocked:active {
	transform: translateY(2px) scale(0.99);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

/* LOCKED: Deep Antique Walnut Plaque with Carved/Dashed Joinery */
.achievement-card.locked {
	background: linear-gradient(180deg, rgba(30, 16, 9, 0.75) 0%, rgba(16, 8, 4, 0.85) 100%) !important;
	border: 1.5px dashed #5a331c !important;
	border-left: 5px solid #4a2817 !important;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), 0 3px 6px rgba(0, 0, 0, 0.4) !important;
	opacity: 0.88;
}

/* Recessed Hardwood Letter Tile Socket */
.achievement-icon-box {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(180deg, #201007 0%, #120703 100%);
	border: 1.5px solid #5a331c;
	border-top: 1.5px solid #3d1f0f;
	border-bottom: 2px solid #734224;
	box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.85), 0 2px 5px rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Unlocked Jewels with Glowing Brass Accent Rims */
.achievement-card.unlocked .achievement-icon-box {
	border-color: #ffd700;
	box-shadow: 0 0 14px rgba(255, 215, 0, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.75);
}

.achievement-icon-box.common {
	border-color: #10b981;
	box-shadow: 0 0 10px rgba(16, 185, 129, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.75);
}

.achievement-icon-box.rare {
	border-color: #38bdf8;
	box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.75);
}

.achievement-icon-box.epic {
	border-color: #c084fc;
	box-shadow: 0 0 14px rgba(192, 132, 252, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.75);
}

.achievement-icon-box.legendary {
	border-color: #ffd700;
	box-shadow: 0 0 18px rgba(255, 215, 0, 0.55), inset 0 2px 6px rgba(0, 0, 0, 0.75);
}

/* Locked Icon Box: Dark Recessed Oak Cubby with Subtle Inset */
.achievement-card.locked .achievement-icon-box {
	background: rgba(14, 7, 3, 0.9);
	border: 1.5px solid #3d1f0f;
	box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.95);
	filter: grayscale(0.8);
	opacity: 0.7;
}

.achievement-card-icon {
	font-size: 25px;
	line-height: 1;
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
}

.achievement-card-lock {
	position: absolute;
	bottom: -4px;
	right: -4px;
	font-size: 11px;
	background: #24130a;
	border: 1px solid #734224;
	border-radius: 50%;
	line-height: 1;
	padding: 2.5px;
	color: #ffd700;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.achievement-info {
	flex: 1;
	min-width: 0;
	text-align: left;
}

.achievement-title-row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

/* Titles: Pure White & Gold on Unlocked, Warm Oak on Locked */
.achievement-title {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: 14.5px;
	font-weight: 900;
	color: #ffffff;
	letter-spacing: 0.4px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.achievement-card.unlocked .achievement-title {
	color: #ffffff !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.achievement-card.locked .achievement-title {
	color: #e2c29d !important;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Descriptions: Warm Antique Parchment / Cream */
.achievement-desc {
	margin: 3px 0 0 0;
	font-size: 12px;
	font-weight: 500;
	color: #d4a373;
	line-height: 1.35;
}

.achievement-card.unlocked .achievement-desc {
	color: #f5dfa8;
}

.achievement-card.locked .achievement-desc {
	color: #b8977e;
}

/* Mini Progress Bar for In-Progress Milestones */
.achievement-mini-progress {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.achievement-mini-track {
	flex: 1;
	height: 8px;
	background: #0f0703;
	border: 1px solid #5a331c;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

.achievement-mini-bar {
	height: 100%;
	background: linear-gradient(90deg, #b45309 0%, #f59e0b 60%, #ffd700 100%);
	border-radius: 999px;
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
	transition: width 0.3s ease;
}

.achievement-mini-label {
	font-size: 11px;
	font-weight: 900;
	color: #ffd700;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.achievement-status-box {
	flex-shrink: 0;
}

.achievement-status-pill {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.6px;
	padding: 5px 10px;
	border-radius: 999px;
	white-space: nowrap;
	display: inline-block;
}

/* UNLOCKED BADGE: Lush Vibrant Emerald Green with 3D Bevel */
.achievement-status-pill.unlocked {
	background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
	color: #ffffff !important;
	border: 1px solid #34d399 !important;
	font-weight: 900 !important;
	box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}

/* LOCKED BADGE: Warm Walnut Plaque with Burnished Brass Border */
.achievement-status-pill.locked {
	background: linear-gradient(180deg, #2b180d 0%, #170b04 100%) !important;
	border: 1.5px solid #5a331c !important;
	color: #d4a373 !important;
	font-weight: 800 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   4. Friends & Direct PVP Invite System
   ========================================================================== */

/* Title Screen Online Friends Bubble */
.title-nav-btn.btn-friends {
	position: relative;
}

.friends-online-bubble {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: #22c55e;
	color: #ffffff;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
	border: 1.5px solid #ffffff;
	z-index: 5;
}

/* Friends Modal (Handcrafted Felt & Wooden Cabinet Aesthetic) */
#friends-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 155;
	display: none;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	padding: 12px;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
}

#friends-modal.show {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.friends-card {
	background: linear-gradient(180deg, #24140b 0%, #150a04 100%);
	border: 2.5px solid #8b5a2b;
	border-radius: 24px;
	padding: 18px 18px 20px 18px;
	max-width: 390px;
	width: 94%;
	max-height: min(92vh, 640px);
	overflow-y: auto;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 220, 160, 0.25);
	color: #fbf5eb;
	text-align: center;
	transform: scale(0.94);
	transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#friends-modal.show .friends-card {
	transform: scale(1);
}

.friends-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.friends-header-left h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffd700;
}

.friends-online-count-badge {
	font-size: 11px;
	font-weight: 800;
	background: rgba(34, 197, 94, 0.18);
	border: 1px solid rgba(34, 197, 94, 0.5);
	color: #4ade80;
	padding: 3px 9px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
}

/* Player ID Card (Stumble Guys style) */
.friends-my-code-card {
	background: rgba(14, 7, 3, 0.7);
	border: 1.5px solid #5a351d;
	border-radius: 16px;
	padding: 12px 14px;
	margin-bottom: 14px;
	text-align: left;
}

.friends-my-code-label {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #ffd700;
	margin-bottom: 4px;
}

.friends-my-code-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.friends-my-code-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.friends-my-code-val {
	font-family: 'Alice', serif;
	font-size: 17px;
	font-weight: 900;
	letter-spacing: 1.5px;
	color: #ffffff;
	text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.friends-copy-code-btn {
	background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 900;
	padding: 6px 11px;
	cursor: pointer;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: transform 0.15s ease, filter 0.15s ease;
	white-space: nowrap;
}

.friends-copy-code-btn:hover {
	transform: scale(1.04);
	filter: brightness(1.1);
}

.friends-copy-code-btn:active {
	transform: scale(0.96);
}

.friends-share-code-btn {
	background: linear-gradient(180deg, #10b981 0%, #059669 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 900;
	padding: 6px 11px;
	cursor: pointer;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: transform 0.15s ease, filter 0.15s ease;
	white-space: nowrap;
}

.friends-share-code-btn:hover {
	transform: scale(1.04);
	filter: brightness(1.1);
}

.friends-share-code-btn:active {
	transform: scale(0.96);
}

.friends-my-code-hint {
	font-size: 10px;
	color: #b8977e;
	margin-top: 4px;
}

/* Add Friend Input Form */
.friends-add-form {
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.friends-add-input {
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
	background: rgba(10, 5, 2, 0.85);
	border: 1.5px solid #5a351d;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: 0.5px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.friends-add-input:focus {
	border-color: #ffd700;
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.friends-add-submit-btn {
	background: linear-gradient(180deg, #ffd700 0%, #d97706 100%);
	color: #1c0e05;
	border: none;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.5px;
	padding: 0 16px;
	cursor: pointer;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: transform 0.15s ease, filter 0.15s ease;
	touch-action: manipulation;
}

.friends-add-submit-btn:hover {
	transform: scale(1.03);
	filter: brightness(1.08);
}

.friends-add-submit-btn:active {
	transform: scale(0.97);
}

.friends-modal-notice {
	font-size: 11px;
	font-weight: 700;
	min-height: 16px;
	margin-bottom: 10px;
	text-align: center;
}

/* Friends List Container */
.friends-list-header {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #d4a373;
	text-align: left;
	margin-bottom: 8px;
}

.friends-list-container {
	max-height: 250px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-right: 4px;
}

.friends-empty-state {
	padding: 24px 16px;
	background: rgba(14, 7, 3, 0.4);
	border: 1.5px dashed #4a2817;
	border-radius: 14px;
}

.friends-empty-icon {
	font-size: 32px;
	margin-bottom: 6px;
}

.friends-empty-title {
	font-size: 13px;
	font-weight: 900;
	color: #ffd700;
	margin-bottom: 4px;
}

.friends-empty-desc {
	font-size: 11px;
	color: #b8977e;
	line-height: 1.4;
}

/* Friend Item Row */
.friend-item-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(28, 14, 7, 0.8);
	border: 1.5px solid #4a2817;
	border-radius: 14px;
	padding: 8px 10px;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.friend-item-row.status-online {
	border-color: rgba(34, 197, 94, 0.45);
}

.friend-item-row.status-ingame {
	border-color: rgba(245, 158, 11, 0.45);
}

.friend-avatar-wrap {
	position: relative;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
}

.friend-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #8b5a2b;
	background: #1c0e05;
}

.friend-presence-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #1c0e05;
}

.friend-presence-dot.status-online {
	background: #22c55e;
	box-shadow: 0 0 6px #22c55e;
}

.friend-presence-dot.status-ingame {
	background: #f59e0b;
	box-shadow: 0 0 6px #f59e0b;
}

.friend-presence-dot.status-offline {
	background: #6b7280;
}

.friend-info-col {
	flex: 1;
	text-align: left;
	min-width: 0;
}

.friend-username {
	font-size: 13px;
	font-weight: 800;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.friend-meta-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
}

.friend-player-code {
	font-family: 'Alice', serif;
	font-size: 10px;
	color: #94a3b8;
	letter-spacing: 0.5px;
}

.friend-status-badge {
	font-size: 9px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 999px;
}

.friend-status-badge.status-online {
	background: rgba(34, 197, 94, 0.2);
	color: #4ade80;
}

.friend-status-badge.status-ingame {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

.friend-status-badge.status-offline {
	background: rgba(107, 114, 128, 0.2);
	color: #9ca3af;
}

.friend-actions-col {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.friend-invite-btn {
	background: linear-gradient(180deg, #10b981 0%, #059669 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.5px;
	padding: 6px 12px;
	cursor: pointer;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
	transition: transform 0.15s ease, filter 0.15s ease;
	touch-action: manipulation;
}

.friend-invite-btn:hover {
	transform: scale(1.04);
	filter: brightness(1.1);
}

.friend-invite-btn:active {
	transform: scale(0.96);
}

.friend-invite-btn.btn-busy {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
	border: 1px solid rgba(245, 158, 11, 0.5);
	cursor: not-allowed;
	opacity: 0.85;
	box-shadow: none;
}

.friend-offline-label {
	font-size: 10px;
	font-weight: 800;
	color: #64748b;
	padding: 6px 8px;
}

.friend-delete-btn {
	background: transparent;
	color: #94a3b8;
	border: none;
	font-size: 16px;
	cursor: pointer;
	padding: 4px 6px;
	line-height: 1;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
}

.friend-delete-btn:hover {
	color: #f87171;
	background: rgba(239, 68, 68, 0.15);
}

/* VS Lobby Modal Friends Button (inherits .vs-title-blue-btn) */
.vs-friends-btn {
	width: 100%;
	font-size: 13.5px;
}

.vs-friends-btn:hover {
	transform: scale(1.02);
	filter: brightness(1.08);
}

.vs-friends-btn:active {
	transform: scale(0.98);
}

/* Incoming PVP Challenge Slide-Down Banner */
.pvp-invite-banner {
	position: fixed;
	top: max(14px, env(safe-area-inset-top, 14px));
	left: 50%;
	transform: translateX(-50%) translateY(-140px);
	max-width: 440px;
	width: 92%;
	background: linear-gradient(180deg, #24140b 0%, #150a04 100%);
	border: 2px solid #ffd700;
	border-radius: 18px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.35);
	z-index: 250;
	color: #ffffff;
	transition: transform 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	overflow: hidden;
	pointer-events: none;
	box-sizing: border-box;
}

.pvp-invite-banner.show {
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.pvp-invite-content {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px 12px 12px;
	box-sizing: border-box;
	width: 100%;
}

.pvp-invite-avatar-ring {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 2px solid #ffd700;
	overflow: hidden;
	background: #000;
	box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.pvp-invite-avatar {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pvp-invite-text {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	overflow: hidden;
}

.pvp-invite-title {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffd700;
	text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pvp-invite-desc {
	font-size: 11px;
	color: #f1f5f9;
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pvp-invite-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.pvp-invite-btn-accept {
	background: linear-gradient(180deg, #ffd700 0%, #d97706 100%);
	color: #1c0e05;
	border: none;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 900;
	padding: 6px 12px;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: transform 0.15s ease;
	touch-action: manipulation;
}

.pvp-invite-btn-accept:hover {
	transform: scale(1.05);
}

.pvp-invite-btn-accept:active {
	transform: scale(0.95);
}

.pvp-invite-btn-decline {
	background: rgba(239, 68, 68, 0.25);
	color: #fca5a5;
	border: 1.5px solid rgba(239, 68, 68, 0.5);
	border-radius: 9px;
	font-size: 10.5px;
	font-weight: 900;
	padding: 5px 9px;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.15s ease;
	touch-action: manipulation;
}

.pvp-invite-btn-decline:hover {
	transform: scale(1.05);
}

.pvp-invite-btn-decline:active {
	transform: scale(0.95);
}

.pvp-invite-timer-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, #ffd700, #38bdf8);
	width: 100%;
}

/* Outgoing PVP Challenge Modal */
#pvp-outgoing-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 160;
	display: none;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	padding: 12px;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
}

#pvp-outgoing-modal.show {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.pvp-outgoing-card {
	background: linear-gradient(180deg, #24140b 0%, #150a04 100%);
	border: 2.5px solid #8b5a2b;
	border-radius: 22px;
	padding: 22px 20px;
	max-width: 340px;
	width: 90%;
	max-height: min(92vh, 520px);
	overflow-y: auto;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
	text-align: center;
	color: #ffffff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
	transform: scale(0.94);
	transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#pvp-outgoing-modal.show .pvp-outgoing-card {
	transform: scale(1);
}

.pvp-outgoing-header {
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffd700;
}

.pvp-outgoing-avatar-wrap {
	position: relative;
	width: 84px;
	height: 84px;
	margin: 16px auto 12px auto;
}

.pvp-outgoing-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #ffd700;
	background: #000;
	position: relative;
	z-index: 2;
}

.pvp-outgoing-radar-ring {
	position: absolute;
	top: -8px;
	left: -8px;
	right: -8px;
	bottom: -8px;
	border-radius: 50%;
	border: 2px solid rgba(255, 215, 0, 0.6);
	animation: pvpRadarPulse 1.6s infinite ease-out;
	z-index: 1;
}

@keyframes pvpRadarPulse {
	0% {
		transform: scale(0.9);
		opacity: 1;
	}
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

.pvp-outgoing-name {
	font-size: 16px;
	font-weight: 900;
	color: #ffffff;
	margin-bottom: 4px;
}

.pvp-outgoing-status {
	font-size: 12px;
	color: #b8977e;
	min-height: 18px;
}

.pvp-outgoing-timer {
	font-size: 11px;
	font-weight: 800;
	color: #38bdf8;
	margin: 8px 0 16px 0;
}

.pvp-outgoing-cancel-btn {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
	border: 1.5px solid rgba(239, 68, 68, 0.5);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 900;
	padding: 10px 18px;
	cursor: pointer;
	width: 100%;
	transition: background 0.15s ease, transform 0.15s ease;
}

.pvp-outgoing-cancel-btn:hover {
	background: rgba(239, 68, 68, 0.35);
}

/* Outgoing PVP Challenge Celebration State */
.pvp-outgoing-card.accepted {
	border-color: #22c55e;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(34, 197, 94, 0.55);
}

.pvp-outgoing-card.accepted .pvp-outgoing-radar-ring {
	border-color: #22c55e;
	animation: pvpRadarPulse 0.75s infinite ease-out;
}

.pvp-outgoing-card.accepted .pvp-outgoing-avatar-img {
	border-color: #22c55e;
	box-shadow: 0 0 20px rgba(34, 197, 94, 0.75);
}

/* Real-Time Floating Friends & PVP Event Toast Banner */
.pvp-notification-banner {
	position: fixed !important;
	top: max(14px, env(safe-area-inset-top, 14px)) !important;
	left: 50% !important;
	transform: translateX(-50%) translateY(-140px);
	max-width: 440px;
	width: 92%;
	background: linear-gradient(180deg, #1e130a 0%, #100803 100%);
	border: 2px solid #ffd700;
	border-radius: 18px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 215, 0, 0.4);
	z-index: 300 !important;
	color: #ffffff;
	box-sizing: border-box;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	pointer-events: none;
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.25s ease;
}

.pvp-notification-banner.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.pvp-notification-banner.notif-accepted {
	border-color: #22c55e;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 28px rgba(34, 197, 94, 0.55);
}

.pvp-notification-banner.notif-friend_added {
	border-color: #38bdf8;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 28px rgba(56, 189, 248, 0.55);
}

.pvp-notification-banner.notif-declined {
	border-color: #ef4444;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(239, 68, 68, 0.45);
}

.pvp-notification-banner.notif-busy {
	border-color: #f59e0b;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(245, 158, 11, 0.45);
}

.pvp-notif-avatar-ring {
	position: relative;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.pvp-notif-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ffd700;
	background: #000;
}

.pvp-notif-badge-icon {
	position: absolute;
	bottom: -4px;
	right: -4px;
	font-size: 15px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.pvp-notif-content {
	flex: 1;
	text-align: left;
	min-width: 0;
}

.pvp-notif-title {
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.8px;
	color: #ffd700;
	text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.notif-accepted .pvp-notif-title {
	color: #4ade80;
	text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.notif-friend_added .pvp-notif-title {
	color: #38bdf8;
	text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.notif-declined .pvp-notif-title {
	color: #f87171;
}

.notif-busy .pvp-notif-title {
	color: #fbbf24;
}

.pvp-notif-desc {
	font-size: 12px;
	color: #f1f5f9;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ==============================================================================
   FULL-SCREEN GAME SCENES SYSTEM (Unity / GameSalad Engine Architecture)
   Zero floating popup cards, zero dialog margins, zero underlying elements bleed.
   Every menu window expands edge-to-edge as a 100% full-screen immersive game scene.
   ============================================================================== */

/* 1. Modal Overlays become Edge-to-Edge Full Screen Scenes */
.game-modal,
.achievements-modal,
#achievements-modal,
#theme-modal,
#scenery-select-modal,
#tile-storage-modal,
#level-select-modal,
#leaderboard-modal,
#profile-modal,
#friends-modal,
#pvp-outgoing-modal,
#vs-lobby-modal,
#vs-results-modal,
#win-modal,
#gift-box-modal,
#trial-ended-modal,
#hidden-word-modal,
#username-prompt-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	width: 100% !important;
	height: 100vh !important;
	height: 100dvh !important;
	max-width: 100vw !important;
	max-height: 100dvh !important;
	margin: 0 !important;
	padding: 0 !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	background: #030712 !important;
	z-index: 99999 !important;
}

/* Visibility Control: Inactive Scene */
.game-modal:not(.show),
.achievements-modal:not(.show),
#achievements-modal:not(.show),
#theme-modal:not(.show),
#scenery-select-modal:not(.show),
#tile-storage-modal:not(.show),
#level-select-modal:not(.show),
#leaderboard-modal:not(.show),
#profile-modal:not(.show),
#friends-modal:not(.show),
#pvp-outgoing-modal:not(.show),
#vs-lobby-modal:not(.show),
#vs-results-modal:not(.show),
#win-modal:not(.show),
#gift-box-modal:not(.show),
#trial-ended-modal:not(.show),
#hidden-word-modal:not(.show),
#username-prompt-modal:not(.show) {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Visibility Control: Active Scene */
.game-modal.show,
.achievements-modal.show,
#achievements-modal.show,
#theme-modal.show,
#scenery-select-modal.show,
#tile-storage-modal.show,
#level-select-modal.show,
#leaderboard-modal.show,
#profile-modal.show,
#friends-modal.show,
#pvp-outgoing-modal.show,
#vs-lobby-modal.show,
#vs-results-modal.show,
#win-modal.show,
#gift-box-modal.show,
#trial-ended-modal.show,
#hidden-word-modal.show,
#username-prompt-modal.show {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* 2. Inner Game Scene Cards: 100% Screen Filling Canvas */
.achievements-card,
.vs-lobby-card,
.friends-card,
.leaderboard-card,
.profile-card,
.theme-card,
.pause-menu-card,
.scenery-picker-card,
.storage-cabinet,
.vs-results-card,
.pvp-outgoing-card,
.cubby-reward-card,
.reward-card,
.win-card {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	width: 100% !important;
	height: 100vh !important;
	height: 100dvh !important;
	min-height: 100vh !important;
	min-height: 100dvh !important;
	max-width: 100vw !important;
	max-width: 100% !important;
	max-height: 100vh !important;
	max-height: 100dvh !important;
	border-radius: 0 !important;
	border: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	transform: none;
	display: flex !important;
	flex-direction: column !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	box-sizing: border-box !important;
	padding-top: max(18px, calc(env(safe-area-inset-top, 0px) + 12px)) !important;
	padding-bottom: max(24px, env(safe-area-inset-bottom, 24px)) !important;
	padding-left: max(16px, env(safe-area-inset-left, 16px)) !important;
	padding-right: max(16px, env(safe-area-inset-right, 16px)) !important;
	z-index: 100000 !important;
}

/* Scene Inner Content Max-Width Wrapper for Larger Screens (Tablets / Desktops) */
.achievements-card > *,
.vs-lobby-card > *,
.friends-card > *,
.leaderboard-card > *,
.profile-card > *,
.theme-card > *,
.pause-menu-card > *,
.scenery-picker-card > *,
.storage-cabinet > *,
.vs-results-card > *,
.cubby-reward-card > *,
.reward-card > * {
	max-width: 500px;
	width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

/* Distinctive Rich Full-Screen Opaque Scene Backgrounds */
.achievements-card {
	background: radial-gradient(circle at 50% 12%, #351e12 0%, #201108 55%, #0a0401 100%) !important;
}

.vs-lobby-card {
	background: radial-gradient(circle at 50% 12%, #2c170c 0%, #1a0c05 55%, #090401 100%) !important;
}

.friends-card {
	background: radial-gradient(circle at 50% 12%, #2d180c 0%, #1a0d05 55%, #090401 100%) !important;
}

.leaderboard-card {
	background: radial-gradient(circle at 50% 12%, #351e12 0%, #1f0f06 55%, #080301 100%) !important;
}

.profile-card {
	background-color: #102348 !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.2px),
		radial-gradient(rgba(3, 8, 22, 0.24) 1px, transparent 1.2px),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 2px, transparent 2px, transparent 6px),
		linear-gradient(90deg, rgba(4, 10, 26, 0.55) 0px, rgba(255, 255, 255, 0.06) 8px, transparent 18px),
		radial-gradient(circle at 50% 10%, #1d3c78 0%, #112650 52%, #091530 100%) !important;
	background-size: 6px 6px, 6px 6px, 12px 12px, 100% 100%, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0, 0 0, 0 0 !important;
}

.theme-card,
.scenery-picker-card {
	background: radial-gradient(circle at 50% 15%, #241d33 0%, #151120 55%, #08060d 100%) !important;
}

.pause-menu-card {
	background: radial-gradient(circle at 50% 12%, #2c170c 0%, #1a0c05 55%, #090401 100%) !important;
	justify-content: center !important;
	align-items: center !important;
}

.storage-cabinet {
	background: radial-gradient(circle at 50% 12%, #351e12 0%, #201108 55%, #0a0401 100%) !important;
}

.vs-results-card {
	background: transparent !important;
}

#vs-results-modal,
#vs-results-modal.show {
	background: radial-gradient(ellipse at 50% 35%, rgba(18, 10, 5, 0.45) 0%, rgba(6, 3, 1, 0.72) 100%) !important;
	backdrop-filter: blur(2.5px) !important;
	-webkit-backdrop-filter: blur(2.5px) !important;
}

/* Remove completed game board & HUD from background behind Match Results, keeping live scenery */
body.vs-results-active #canvas-container {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.vs-results-active #hud-header,
body.vs-results-active #hud-bottom,
body.vs-results-active #hud-vs-bar,
body.vs-results-active #btn-floating-next,
body.vs-results-active #post-win-subactions,
body.vs-results-active #custom-win-share-bar,
body.vs-results-active .hud-hint,
body.vs-results-active #toast-banner,
body.vs-results-active #vs-loser-notice-overlay,
body.vs-results-active .vs-flying-crown-particle,
body.vs-results-active #tutorial-guide-banner,
body.vs-results-active .tutorial-guide-banner {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.pvp-outgoing-card {
	background: radial-gradient(circle at 50% 25%, #24140b 0%, #150a04 60%, #080301 100%) !important;
	justify-content: center !important;
	align-items: center !important;
}

.cubby-reward-card,
.reward-card,
.trial-ended-card,
.hidden-duck-card {
	background: radial-gradient(circle at 50% 20%, #26160d 0%, #170a04 60%, #080301 100%) !important;
	justify-content: center !important;
	align-items: center !important;
}

/* PVP Username Required Modal & Card */
#username-prompt-modal {
	background: rgba(0, 0, 0, 0.8) !important;
	backdrop-filter: blur(8px) !important;
	-webkit-backdrop-filter: blur(8px) !important;
	justify-content: center !important;
	align-items: center !important;
	z-index: 100020 !important;
}

/* Authentic Royal-Blue Pebbled Leather Passport Snippet + Guilloché Parchment Data Page */
.username-prompt-card {
	position: relative !important;
	background-color: #102348 !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.2px),
		radial-gradient(rgba(3, 8, 22, 0.24) 1px, transparent 1.2px),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 6px),
		linear-gradient(90deg, rgba(4, 10, 26, 0.55) 0px, rgba(255, 255, 255, 0.06) 8px, transparent 18px),
		radial-gradient(circle at 50% 10%, #1d3c78 0%, #112650 56%, #091530 100%) !important;
	background-size: 6px 6px, 6px 6px, 12px 12px, 100% 100%, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0, 0 0, 0 0 !important;
	border: 2.5px solid #d4a843 !important;
	border-radius: 10px 18px 18px 10px !important;
	box-shadow:
		0 22px 54px rgba(0, 0, 0, 0.85),
		inset 10px 0 18px -8px rgba(2, 6, 18, 0.8),
		inset 0 0 0 1.5px rgba(254, 240, 138, 0.25) !important;
	width: 92% !important;
	max-width: 390px !important;
	height: auto !important;
	min-height: auto !important;
	padding: 14px 14px 16px 18px !important;
	box-sizing: border-box !important;
	text-align: left !important;
	color: #fef3c7 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
	margin: auto !important;
	animation: popInModal 0.24s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.username-prompt-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 2px;
}

.username-prompt-kicker-wrap {
	display: flex;
	flex-direction: column;
}

.username-prompt-kicker {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1.8px;
	color: #d4a843;
	text-transform: uppercase;
}

.username-prompt-header h3 {
	margin: 1px 0 0;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 1px;
	color: #fef08a;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

.username-prompt-close-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2px solid #d4a843;
	background: rgba(8, 19, 44, 0.85);
	color: #fef08a;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 3px 0 #050c1f;
}

.username-prompt-close-btn:active {
	transform: translateY(1.5px);
}

/* Inner Passport Bio-Data Guilloché Parchment Sheet */
.username-prompt-body {
	position: relative;
	background-color: #f4ecd7;
	background-image:
		repeating-radial-gradient(circle at 84% 22%, rgba(29, 78, 216, 0.05) 0px, rgba(29, 78, 216, 0.05) 1px, transparent 1px, transparent 9px),
		repeating-linear-gradient(125deg, rgba(180, 145, 70, 0.05) 0px, rgba(180, 145, 70, 0.05) 1px, transparent 1px, transparent 8px),
		linear-gradient(170deg, #faf5e6 0%, #f1e7cc 58%, #e8d9b5 100%);
	border: 2px solid #231409;
	border-radius: 8px;
	padding: 14px 14px 14px;
	color: #1f1710;
	box-shadow:
		0 6px 18px rgba(3, 8, 22, 0.5),
		inset 0 0 0 2px rgba(212, 168, 67, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.username-prompt-id-top {
	display: flex;
	align-items: center;
	gap: 12px;
}

.username-prompt-avatar-wrap {
	width: 72px;
	height: 82px;
	flex-shrink: 0;
	border-radius: 6px;
	border: 2px solid #231409;
	background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
	box-shadow: 0 3px 0 rgba(35, 20, 9, 0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.username-prompt-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.username-prompt-id-meta {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.username-prompt-id-tag {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #1e3a8a;
}

.username-prompt-heading {
	font-size: 17px;
	font-weight: 900;
	color: #231409;
	line-height: 1.15;
}

.username-prompt-desc {
	font-size: 12.5px;
	line-height: 1.32;
	color: #5c432c;
	margin-top: 2px;
}

.username-prompt-input-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.username-prompt-field-lbl {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 1.2px;
	color: #78350f;
}

.username-prompt-input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border-radius: 6px;
	border: 2px solid #231409;
	background: #fffdf7;
	color: #231409;
	font-size: 16px;
	font-weight: 800;
	outline: none;
	box-shadow: inset 0 2px 4px rgba(35, 20, 9, 0.12);
}

.username-prompt-input:focus {
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.22);
}

.username-prompt-notice {
	padding: 8px 10px;
	border-radius: 5px;
	background: #fee2e2;
	border: 1.5px solid #dc2626;
	color: #991b1b;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

.username-prompt-actions {
	width: 100%;
}

.username-prompt-submit-btn {
	width: 100%;
	min-height: 48px;
	padding: 11px 16px;
	border-radius: 6px;
	border: 2.5px solid #231409;
	background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.32);
	color: #ffffff;
	font-size: 16.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.42);
}

.username-prompt-submit-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #231409;
}

/* 3. Full-Height Scrollable Lists inside Game Scenes */
.achievements-list {
	flex: 1 1 auto !important;
	max-height: none !important;
	min-height: 220px !important;
}

#friends-modal .friends-list-container {
	flex: 1 1 auto !important;
	max-height: none !important;
	min-height: 220px !important;
}

#leaderboard-modal .leaderboard-list-wrap {
	flex: 1 1 auto !important;
	max-height: none !important;
	min-height: 220px !important;
}

#tile-storage-modal .cabinet-interior-frame {
	flex: 1 1 auto !important;
	max-height: none !important;
}

#vs-lobby-modal .vs-lobby-step {
	display: flex;
	flex-direction: column;
	flex: 1;
	justify-content: flex-start;
}

/* 4. Standardized Tactile Round Game Engine Close / Back Buttons */
.theme-close,
.cabinet-close-btn,
.vs-results-close-btn,
#btn-achievements-close,
#btn-vs-lobby-close,
#btn-friends-modal-close,
#btn-profile-close,
#btn-leaderboard-close,
#btn-storage-close {
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.14) !important;
	border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
	color: #ffffff !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 26px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
	transition: transform 0.14s ease, background 0.14s ease !important;
	-webkit-tap-highlight-color: transparent !important;
}

.theme-close:active,
.cabinet-close-btn:active,
.vs-results-close-btn:active,
#btn-achievements-close:active,
#btn-vs-lobby-close:active,
#btn-friends-modal-close:active,
#btn-profile-close:active,
#btn-leaderboard-close:active,
#btn-storage-close:active {
	transform: scale(0.92) !important;
	background: rgba(255, 255, 255, 0.28) !important;
}

/* 5. Scene Headers */
.theme-header,
.cabinet-header,
.vs-results-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	max-width: 500px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	margin-bottom: 16px !important;
	padding-bottom: 12px !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
	box-sizing: border-box !important;
}

/* Smooth hardware accelerated fade transition */
#achievements-modal,
#vs-lobby-modal,
#friends-modal,
#profile-modal,
#leaderboard-modal,
#tile-storage-modal,
#vs-results-modal,
#theme-modal,
#scenery-select-modal,
#pvp-outgoing-modal {
	transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
	            visibility 0.22s ease !important;
}

/* Explicit stacking order for Friends & PVP Challenge overlays opened above VS Lobby */
#friends-modal {
	z-index: 100002 !important;
}

#pvp-outgoing-modal {
	z-index: 100005 !important;
}

#vs-countdown-overlay {
	z-index: 100008 !important;
}

.pvp-invite-banner {
	z-index: 100010 !important;
}

.pvp-notification-banner {
	z-index: 100020 !important;
}

#admob-reward-modal,
.admob-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 100050 !important;
}

#admob-reward-modal.show,
#admob-reward-modal.active {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

#admob-reward-modal .admob-card {
	position: relative;
	z-index: 100051 !important;
}

/* ==============================================================================
   MAKE YOUR OWN LEVEL CREATOR & CUSTOM SHARE BAR (Wooden + Green Felt Theme)
   ============================================================================== */
.title-create-level-btn {
	width: 100%;
	max-width: 282px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	margin-top: 2px;
	border-radius: 16px;
	border: 2.5px solid #d4a359;
	background: linear-gradient(180deg, #1b4d32 0%, #0f3320 100%);
	color: #fef3c7;
	font-family: 'Alice', serif;
	font-size: 14.5px;
	font-weight: 800;
	letter-spacing: 0.9px;
	cursor: pointer;
	box-shadow:
		0 6px 14px rgba(0, 0, 0, 0.52),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
	transition: transform 0.14s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.14s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
}

.title-create-level-btn:hover {
	transform: translateY(-2px) scale(1.02);
	filter: brightness(1.08);
}

.title-create-level-btn:active {
	transform: translateY(1px) scale(0.97);
}

@media (max-height: 680px) {
	.title-create-level-btn {
		max-width: 256px;
		padding: 7px 14px;
		font-size: 13px;
	}
}

/* Lock background body and html when custom level creator is open */
body.custom-creator-open, html.custom-creator-open {
	overflow: hidden !important;
	touch-action: none !important;
	overscroll-behavior: none !important;
}

/* Rock-Solid Unity / GameSalad Scene Architecture for Level Creator */
.custom-level-modal {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	background: radial-gradient(circle at 50% 12%, #2c170c 0%, #1a0c05 55%, #090401 100%) !important;
	z-index: 100000 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	border-radius: 0 !important;
}

.custom-level-card {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
	border-radius: 0 !important;
}

.custom-level-cabinet {
	display: flex !important;
	flex-direction: column !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	background: linear-gradient(180deg, #442616 0%, #2e180d 50%, #1c0e06 100%) !important;
	box-sizing: border-box !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100dvh !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

@media (min-width: 560px) and (min-height: 600px) {
	.custom-level-cabinet {
		max-width: 480px !important;
		height: 100% !important;
		max-height: min(94dvh, 760px) !important;
		border: 3px solid #7c4726 !important;
		border-top: 3.5px solid #9c5b31 !important;
		border-bottom: 4.5px solid #140803 !important;
		border-radius: 26px !important;
		box-shadow:
			0 24px 60px rgba(0, 0, 0, 0.92),
			inset 0 1.5px 2px rgba(255, 215, 0, 0.28),
			inset 0 -3px 6px rgba(0, 0, 0, 0.8) !important;
	}
}

.custom-level-header {
	position: relative !important;
	flex-shrink: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	padding-top: max(18px, env(safe-area-inset-top, 18px)) !important;
	padding-left: max(12px, env(safe-area-inset-left, 12px)) !important;
	padding-right: max(12px, env(safe-area-inset-right, 12px)) !important;
	padding-bottom: 10px !important;
	border-bottom: 2px solid rgba(212, 163, 89, 0.25) !important;
	overflow: visible !important;
}

.custom-creator-header-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 5px;
}

.custom-creator-tile-title {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 7px;
	width: 100%;
	max-width: 100%;
	overflow: visible;
	padding-top: 4px;
}

.custom-creator-word {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 1.5px;
}

.creator-header-tile {
	width: clamp(19px, 5.15vw, 27px);
	height: clamp(19px, 5.15vw, 27px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 5px;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
	will-change: transform;
	animation: creatorMexicanWave 2.4s ease-in-out infinite;
	animation-delay: calc(var(--tile-idx, 0) * 0.1s);
}

.creator-tile-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

@keyframes creatorMexicanWave {
	0%, 100% {
		transform: translateY(0);
	}
	12% {
		transform: translateY(-9px);
	}
	26% {
		transform: translateY(0);
	}
}

.custom-header-subtitle {
	margin: 0;
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.4px;
	color: #fde68a;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.custom-creator-close-btn {
	position: absolute !important;
	top: max(10px, env(safe-area-inset-top, 10px)) !important;
	right: max(10px, env(safe-area-inset-right, 10px)) !important;
	width: 34px !important;
	height: 34px !important;
	font-size: 20px !important;
}

.page-tile-header {
	position: relative !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	padding-top: 10px !important;
	padding-left: 38px !important;
	padding-right: 38px !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

.page-tile-title-compact .creator-header-tile {
	width: clamp(16.5px, 4.4vw, 24px);
	height: clamp(16.5px, 4.4vw, 24px);
}

.page-tile-title-wide .creator-header-tile {
	width: clamp(15px, 4.0vw, 22px);
	height: clamp(15px, 4.0vw, 22px);
}

.page-tile-close-btn {
	position: absolute !important;
	top: 4px !important;
	right: 4px !important;
	z-index: 20 !important;
}

.pause-menu-header.page-tile-header .page-tile-close-btn {
	top: 2px !important;
	right: 0 !important;
}

.cabinet-sub-title.custom-header-subtitle {
	color: #fde68a;
	font-size: 13px;
}

.world-select-header-wrap .custom-header-subtitle {
	margin-top: 2px;
	color: #fffbeb;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.custom-level-tabs {
	flex-shrink: 0 !important;
	display: flex;
	gap: 7px;
	padding: 9px 12px 8px 12px !important;
}

.custom-tab-btn {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px 4px 7px 4px;
	border-radius: 13px;
	border: 1.5px solid rgba(212, 163, 89, 0.45);
	background: rgba(24, 13, 7, 0.72);
	color: #d6c5a9;
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.4px;
	cursor: pointer;
	transition: all 0.15s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-tab-icon-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 30px;
	flex-shrink: 0;
}

.custom-tab-icon {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
	pointer-events: none;
}

.custom-tab-title {
	display: block;
	width: 100%;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: clamp(9.5px, 2.75vw, 11.5px);
	line-height: 1.15;
	letter-spacing: 0.35px;
}

.custom-tab-btn.active {
	background: linear-gradient(180deg, #1b4d32 0%, #103522 100%);
	border-color: #fbbf24;
	color: #fef08a;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.custom-level-felt {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	height: auto !important;
	max-height: none !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain !important;
	touch-action: pan-y !important;
	margin: 0 12px 6px 12px !important;
	padding: 12px 10px !important;
	border-radius: 16px !important;
	border: 2px solid #4a2814 !important;
	background: radial-gradient(ellipse at 50% 25%, #184c2d 0%, #103820 65%, #082113 100%) !important;
	box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.88), inset 0 -4px 10px rgba(0, 0, 0, 0.65) !important;
}

.custom-level-felt::-webkit-scrollbar {
	width: 5px;
}

.custom-level-felt::-webkit-scrollbar-track {
	background: transparent;
}

.custom-level-felt::-webkit-scrollbar-thumb {
	background: rgba(212, 163, 89, 0.4);
	border-radius: 999px;
}

.custom-level-felt::-webkit-scrollbar-thumb:hover {
	background: rgba(251, 191, 36, 0.65);
}

.custom-level-footer {
	flex-shrink: 0 !important;
	display: flex;
	flex-direction: column !important;
	gap: 7px !important;
	padding: 6px 14px max(14px, env(safe-area-inset-bottom, 14px)) 14px !important;
	background: linear-gradient(180deg, rgba(28, 14, 6, 0) 0%, rgba(20, 10, 4, 0.95) 25%, #140803 100%) !important;
	border-top: 1px solid rgba(212, 163, 89, 0.18) !important;
	box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.6) !important;
	z-index: 10 !important;
}

.custom-level-footer.hidden {
	display: none !important;
}

/* Slim Mobile Keyboard Accessory Bar (Visible only when keyboard is active) */
.custom-keyboard-bar {
	flex-shrink: 0 !important;
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 4px 12px !important;
	height: 38px !important;
	box-sizing: border-box !important;
	background: linear-gradient(180deg, #381c0e 0%, #1e0e06 100%) !important;
	border-top: 1.5px solid rgba(212, 163, 89, 0.45) !important;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.6) !important;
	z-index: 20 !important;
}

.custom-keyboard-bar-left {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kb-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	height: 28px;
	border-radius: 8px;
	background: rgba(24, 13, 7, 0.85);
	border: 1px solid rgba(212, 163, 89, 0.45);
	color: #fde68a;
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.5px;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: all 0.12s ease;
}

.kb-nav-btn:active {
	background: rgba(251, 191, 36, 0.3);
	transform: scale(0.95);
}

.kb-nav-btn:disabled {
	opacity: 0.35;
	pointer-events: none;
}

.kb-field-indicator {
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 800;
	color: #d6c5a9;
	letter-spacing: 0.5px;
	margin-left: 4px;
	text-transform: uppercase;
}

.kb-done-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 14px;
	height: 28px;
	border-radius: 8px;
	background: linear-gradient(180deg, #16a34a 0%, #14532d 100%);
	border: 1.2px solid #4ade80;
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.5px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: all 0.12s ease;
}

.kb-done-btn:active {
	transform: scale(0.95);
	background: #15803d;
}

/* Keyboard-active state: Hide giant footer & compact everything so all words are crystal-clear */
body.creator-keyboard-active .custom-keyboard-bar {
	display: flex !important;
}

body.creator-keyboard-active #custom-level-footer {
	display: none !important;
}

body.creator-keyboard-active .custom-level-header {
	padding-top: max(10px, env(safe-area-inset-top, 10px)) !important;
	padding-bottom: 5px !important;
}

body.creator-keyboard-active .creator-header-tile {
	width: 17px !important;
	height: 17px !important;
}

body.creator-keyboard-active .custom-header-subtitle {
	font-size: 10.5px !important;
}

body.creator-keyboard-active .custom-level-tabs {
	padding: 5px 12px 5px 12px !important;
	gap: 6px !important;
}

body.creator-keyboard-active .custom-tab-btn {
	padding: 5px 4px !important;
	border-radius: 9px !important;
	gap: 2px !important;
}

body.creator-keyboard-active .custom-tab-icon-wrap {
	width: 22px !important;
	height: 19px !important;
}

body.creator-keyboard-active .custom-tab-title {
	font-size: 9.5px !important;
}

body.creator-keyboard-active .custom-level-felt {
	margin: 0 10px 4px 10px !important;
	padding: 10px 10px !important;
	border-radius: 12px !important;
}

body.creator-keyboard-active .custom-level-modal {
	height: var(--creator-vp-height, 100%) !important;
	max-height: var(--creator-vp-height, 100%) !important;
	top: var(--creator-vp-top, 0px) !important;
	bottom: auto !important;
}

body.creator-keyboard-active .custom-level-card {
	height: 100% !important;
	max-height: 100% !important;
}

body.creator-keyboard-active .custom-level-cabinet {
	height: 100% !important;
	max-height: 100% !important;
}

.custom-tab-panel {
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.custom-field-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 100%;
}

.custom-field-label {
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #fde68a;
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.custom-text-input,
.custom-word-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1.5px solid rgba(212, 163, 89, 0.55);
	background: rgba(15, 9, 5, 0.78);
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 16px; /* 16px prevents iOS Safari automatic viewport auto-zoom */
	font-weight: 700;
	letter-spacing: 0.6px;
	outline: none;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
	touch-action: manipulation !important;
	-webkit-user-select: text !important;
	user-select: text !important;
}

.custom-text-input:focus,
.custom-word-input:focus {
	border-color: #fbbf24;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.custom-text-input::placeholder,
.custom-word-input::placeholder {
	color: rgba(226, 232, 240, 0.42);
}

.custom-scenery-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.custom-scenery-slider {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.custom-scenery-arrow-btn {
	flex-shrink: 0;
	width: 44px;
	height: 76px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.55));
	transition: transform 0.14s ease, filter 0.14s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-scenery-arrow-btn:hover {
	transform: scale(1.05);
}

.custom-scenery-arrow-btn:active {
	transform: scale(0.93);
}

.custom-scenery-arrow-svg {
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

.custom-scenery-preview-card {
	position: relative;
	flex: 1;
	min-width: 0;
	height: 112px;
	border-radius: 14px;
	border: 2.5px solid #b4692c;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(254, 240, 138, 0.28);
	overflow: hidden;
	background: #0b160f;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.custom-scenery-preview-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 45%;
	transition: background-image 0.22s ease, transform 0.35s ease;
	z-index: 1;
}

.custom-scenery-preview-vignette {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.18) 58%, rgba(10, 6, 3, 0.86) 100%);
	z-index: 2;
	pointer-events: none;
}

.custom-scenery-mini-level {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding-top: 7px;
	pointer-events: none;
}

.mini-level-stars {
	display: flex;
	align-items: center;
	gap: 4px;
}

.mini-star-img {
	width: 13px;
	height: 13px;
	object-fit: contain;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.mini-level-board {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.mini-level-row {
	display: flex;
	align-items: center;
	gap: 2.5px;
	padding: 2.5px 4px;
	border-radius: 4px;
	background: rgba(74, 41, 18, 0.9);
	border: 1px solid #8b5026;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.mini-tile {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
	border: 1px solid #b45309;
	color: #451a03;
	font-family: 'Alice', serif;
	font-size: 9px;
	font-weight: 900;
	line-height: 13px;
	text-align: center;
}

.mini-slot {
	width: 14px;
	height: 12px;
	border-radius: 2px;
	background: rgba(28, 15, 7, 0.78);
	border: 1px solid rgba(212, 163, 89, 0.25);
}

.custom-scenery-preview-bar {
	position: relative;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 10px;
	background: rgba(18, 9, 4, 0.82);
	border-top: 1px solid rgba(251, 191, 36, 0.32);
}

.custom-scenery-preview-name {
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 800;
	color: #fef08a;
	letter-spacing: 0.4px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.custom-scenery-pips {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}

.custom-scenery-pip {
	width: 7px;
	height: 7px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(254, 240, 138, 0.55);
	background: rgba(255, 255, 255, 0.22);
	cursor: pointer;
	transition: all 0.15s ease;
	touch-action: manipulation;
}

.custom-scenery-pip.active {
	width: 16px;
	border-radius: 999px;
	background: #fbbf24;
	border-color: #fef08a;
	box-shadow: 0 0 6px rgba(251, 191, 36, 0.75);
}

.custom-words-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 2px;
}

.custom-tray-hint-tag {
	font-family: 'Alice', serif;
	font-size: 10.5px;
	font-weight: 700;
	color: #bbf7d0;
	background: rgba(16, 185, 129, 0.2);
	border: 1px solid rgba(52, 211, 153, 0.35);
	padding: 2px 8px;
	border-radius: 999px;
}

.custom-word-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.custom-word-row-item {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(11, 22, 15, 0.68);
	border: 1px solid rgba(212, 163, 89, 0.32);
	border-radius: 12px;
	padding: 6px 8px;
}

.custom-word-row-item.is-seed {
	border-color: rgba(251, 191, 36, 0.55);
	background: rgba(44, 27, 12, 0.65);
}

.custom-word-row-tag {
	min-width: 58px;
	font-family: 'Alice', serif;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: #fcd34d;
	text-align: center;
	background: rgba(0, 0, 0, 0.35);
	padding: 5px 6px;
	border-radius: 8px;
	text-transform: uppercase;
}

.custom-word-input {
	flex: 1;
	padding: 8px 10px;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 16px; /* 16px prevents iOS Safari automatic viewport auto-zoom */
}

.custom-word-count {
	min-width: 34px;
	text-align: center;
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	color: #94a3b8;
	padding: 3px 6px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.3);
}

.custom-word-count.valid {
	color: #86efac;
	background: rgba(22, 163, 74, 0.24);
}

.custom-word-count.invalid {
	color: #fca5a5;
	background: rgba(220, 38, 38, 0.25);
}

.custom-word-remove-btn {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid rgba(248, 113, 113, 0.4);
	background: rgba(127, 29, 29, 0.55);
	color: #fecaca;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: manipulation;
}

.custom-row-controls {
	display: flex;
	gap: 8px;
}

.custom-add-word-btn,
.custom-clear-words-btn {
	padding: 8px 12px;
	border-radius: 10px;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-add-word-btn {
	flex: 1;
	background: rgba(16, 185, 129, 0.2);
	border: 1.5px solid rgba(52, 211, 153, 0.55);
	color: #d1fae5;
}

.custom-add-word-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.custom-clear-words-btn {
	background: rgba(51, 65, 85, 0.45);
	border: 1.5px solid rgba(148, 163, 184, 0.35);
	color: #cbd5e1;
}

.custom-level-error {
	background: rgba(153, 27, 27, 0.78);
	border: 1px solid #f87171;
	color: #fee2e2;
	padding: 8px 12px;
	border-radius: 10px;
	font-family: 'Alice', serif;
	font-size: 12.5px;
	font-weight: 700;
	text-align: center;
}

.custom-verify-note {
	font-family: 'Alice', serif;
	font-size: 12px;
	color: #e2e8f0;
	text-align: center;
	line-height: 1.35;
	background: rgba(0, 0, 0, 0.25);
	padding: 7px 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-verify-note strong {
	color: #fde047;
}

.custom-play-verify-btn {
	position: relative;
	width: 100%;
	max-width: 340px;
	margin: 0 auto;
	aspect-ratio: 430 / 90;
	min-height: 54px;
	max-height: 66px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	border: none !important;
	border-radius: 0 !important;
	background: transparent url('../AssetsScruffle/ButtonLevelSelectYellow.png') center / 100% 100% no-repeat !important;
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: clamp(14px, 4vw, 17px);
	font-weight: 900;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-shadow: 0 2px 0 rgba(105, 56, 6, 0.9), 0 0 4px rgba(105, 56, 6, 0.5);
	cursor: pointer;
	box-shadow: none !important;
	filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.55));
	transition: transform 0.14s ease, filter 0.14s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-play-verify-btn:hover {
	filter: brightness(1.06) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.6));
	transform: translateY(-1px) scale(1.015);
}

.custom-play-verify-btn:active {
	transform: scale(0.96);
	filter: brightness(0.96) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

/* Saved Custom Levels Cards */
.custom-saved-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.custom-saved-empty {
	text-align: center;
	padding: 24px 12px;
	color: #cbd5e1;
	font-family: 'Alice', serif;
	font-size: 13.5px;
	line-height: 1.45;
}

.custom-saved-card {
	background: rgba(15, 23, 18, 0.8);
	border: 1.5px solid rgba(212, 163, 89, 0.45);
	border-radius: 14px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.custom-saved-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.custom-saved-title {
	font-family: 'Alice', serif;
	font-size: 14.5px;
	font-weight: 800;
	color: #fef08a;
}

.custom-saved-status {
	font-family: 'Alice', serif;
	font-size: 10.5px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 999px;
}

.custom-saved-status.verified {
	background: rgba(22, 163, 74, 0.28);
	border: 1px solid #4ade80;
	color: #bbf7d0;
}

.custom-saved-status.unverified {
	background: rgba(245, 158, 11, 0.22);
	border: 1px solid #fbbf24;
	color: #fde68a;
}

.custom-saved-chain {
	font-family: 'Alice', serif;
	font-size: 11.5px;
	color: #cbd5e1;
	letter-spacing: 0.4px;
	word-break: break-word;
}

.custom-saved-actions {
	display: flex;
	gap: 6px;
}

.custom-saved-btn {
	flex: 1;
	padding: 7px 8px;
	border-radius: 10px;
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-saved-btn.play {
	background: rgba(16, 185, 129, 0.25);
	border: 1px solid #34d399;
	color: #ecfdf5;
}

.custom-saved-btn.share {
	background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
	border: 1px solid #fef08a;
	color: #1a0a00;
}

.custom-saved-btn.delete {
	flex: 0 0 auto;
	padding: 7px 10px;
	background: rgba(127, 29, 29, 0.5);
	border: 1px solid rgba(248, 113, 113, 0.45);
	color: #fecaca;
}

/* Post-Win Custom Level Plaque (Player Challenge Complete vs Creator Share UI) */
.custom-win-share-bar {
	position: fixed;
	bottom: max(16px, env(safe-area-inset-bottom, 16px));
	left: 50%;
	transform: translate(-50%, 24px);
	width: calc(100% - 26px);
	max-width: 404px;
	z-index: 95;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.28), visibility 0.28s ease;
}

.custom-win-share-bar.show {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.custom-win-share-bar[data-mode="player"] .custom-win-creator-only {
	display: none !important;
}

.custom-win-share-bar[data-mode="creator"] .custom-win-player-only {
	display: none !important;
}

.custom-win-share-panel {
	background: linear-gradient(180deg, #64371d 0%, #442312 50%, #2a1409 100%);
	border: 3px solid #231409;
	border-radius: 22px;
	padding: 6px;
	box-shadow:
		0 16px 36px rgba(0, 0, 0, 0.78),
		0 0 24px rgba(251, 191, 36, 0.22),
		inset 0 2px 0 rgba(254, 240, 138, 0.34),
		inset 0 -3px 0 rgba(15, 7, 2, 0.72);
}

.custom-win-felt-tray {
	background: radial-gradient(ellipse at top, #1f5c3a 0%, #143f27 65%, #0c2618 100%);
	border: 2.5px solid #231409;
	border-radius: 16px;
	padding: 12px 12px 11px;
	box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(134, 239, 172, 0.14);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.custom-win-header-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.custom-win-emblem {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 31px;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.cw-emblem-svg {
	width: 100%;
	height: 100%;
	display: block;
}

.cw-btn-svg {
	width: 22px;
	height: 22px;
	display: block;
	flex-shrink: 0;
	filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.35));
}

.cw-pill-svg {
	width: 16px;
	height: 16px;
	display: block;
	flex-shrink: 0;
}

.cw-inline-svg {
	width: 15px;
	height: 15px;
	display: inline-block;
	vertical-align: -2px;
	flex-shrink: 0;
}

.custom-win-share-badge {
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.9px;
	color: #fffbeb;
	background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
	border: 2px solid #231409;
	box-shadow: 0 2px 0 #14532d, inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
	padding: 3px 12px;
	border-radius: 999px;
	text-transform: uppercase;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.custom-win-share-title {
	font-family: 'Alice', serif;
	font-size: 18px;
	font-weight: 900;
	color: #fef08a;
	letter-spacing: 0.7px;
	line-height: 1.15;
	text-shadow: 0 2px 0 #231409, 0 4px 8px rgba(0, 0, 0, 0.45);
}

.custom-win-player-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.custom-win-creator-by {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 800;
	color: #fef3c7;
	letter-spacing: 0.3px;
}

.custom-win-player-stats {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}

.custom-win-stat-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.56);
	border: 1.5px solid rgba(253, 224, 138, 0.48);
	color: #fffbeb;
	font-family: 'Alice', serif;
	font-size: 11.5px;
	font-weight: 800;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.custom-win-stat-pill.is-sent {
	background: rgba(180, 83, 9, 0.35);
	border-color: rgba(251, 191, 36, 0.65);
	color: #fde68a;
}

.custom-win-link-box {
	width: 100%;
	box-sizing: border-box;
	background: rgba(12, 18, 28, 0.62);
	border: 1.5px solid rgba(253, 224, 138, 0.3);
	border-radius: 10px;
	padding: 6px 10px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Alice', serif;
	font-size: 11px;
	color: #93c5fd;
}

.custom-win-link-box span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.custom-win-share-actions {
	display: flex;
	gap: 8px;
	width: 100%;
}

.custom-win-player-actions {
	display: flex;
	gap: 8px;
	width: 100%;
}

/* Clash Royale-Style Hand-Drawn Cartoon Reaction Bar */
.custom-win-reactions-box {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	background: rgba(8, 24, 15, 0.52);
	border: 2px solid #231409;
	border-radius: 14px;
	padding: 7px 6px 6px;
	box-sizing: border-box;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.custom-win-reactions-row {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 5px;
	width: 100%;
}

.cr-emote-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 5px 2px 4px;
	border-radius: 11px;
	border: 2px solid #231409;
	background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
	box-shadow: 0 3px 0 #0f172a, inset 0 1.5px 0 rgba(255, 255, 255, 0.24);
	cursor: pointer;
	transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.cr-emote-btn:hover {
	transform: translateY(-2px) scale(1.06);
}

.cr-emote-btn:active {
	transform: translateY(1px) scale(0.95);
}

.cr-emote-btn.is-selected {
	background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
	border-color: #231409;
	box-shadow: 0 3px 0 #92400e, 0 0 14px rgba(250, 204, 21, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.65);
	transform: translateY(-2px) scale(1.07);
}

.cr-emote-btn.is-selected .cr-emote-tag {
	color: #231409;
	text-shadow: none;
}

.cr-emote-svg {
	width: 28px;
	height: 28px;
	display: block;
	filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.4));
}

.cr-emote-tag {
	font-family: 'Alice', serif;
	font-size: 8.5px;
	font-weight: 900;
	letter-spacing: 0.3px;
	color: #e2e8f0;
	line-height: 1;
	white-space: nowrap;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.custom-win-reaction-caption {
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	color: #fde68a;
	letter-spacing: 0.3px;
}

.custom-win-reaction-caption strong {
	color: #ffffff;
}

/* Clash Royale-Style Beveled Royal Blue + Gold BRAG Button */
.custom-player-brag-btn {
	flex: 1.55;
	padding: 11px 12px;
	border-radius: 14px;
	border: 2.5px solid #231409;
	background: linear-gradient(180deg, #60a5fa 0%, #2563eb 52%, #1d4ed8 100%);
	color: #fffbeb;
	font-family: 'Alice', serif;
	font-size: 14.5px;
	font-weight: 900;
	letter-spacing: 0.8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	cursor: pointer;
	text-shadow: 0 2px 0 #1e3a8a, 0 0 6px rgba(0, 0, 0, 0.45);
	box-shadow:
		0 4px 0 #1e3a8a,
		0 7px 16px rgba(37, 99, 235, 0.45),
		inset 0 2.5px 0 rgba(255, 255, 255, 0.55),
		inset 0 -2px 0 rgba(29, 78, 216, 0.65);
	transition: transform 0.12s ease, filter 0.12s ease, background 0.18s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-player-brag-btn:hover {
	filter: brightness(1.07);
	transform: translateY(-1px);
}

.custom-player-brag-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #1e3a8a, 0 3px 6px rgba(0, 0, 0, 0.45);
}

.custom-player-brag-btn.is-bragged {
	background: linear-gradient(180deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
	text-shadow: 0 2px 0 #14532d;
	box-shadow:
		0 4px 0 #14532d,
		0 7px 14px rgba(22, 163, 74, 0.42),
		inset 0 2px 0 rgba(255, 255, 255, 0.48);
}

.custom-player-replay-btn {
	flex: 1;
	padding: 11px 10px;
	border-radius: 14px;
	border: 2.5px solid #231409;
	background: linear-gradient(180deg, #fde047 0%, #f59e0b 60%, #d97706 100%);
	color: #231409;
	font-family: 'Alice', serif;
	font-size: 13.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	box-shadow:
		0 4px 0 #92400e,
		0 7px 14px rgba(0, 0, 0, 0.42),
		inset 0 2px 0 rgba(255, 255, 255, 0.6);
	transition: transform 0.12s ease, filter 0.12s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-player-replay-btn:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.custom-player-replay-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #92400e;
}

/* Floating Cartoon Emote Burst on BRAG */
.custom-win-brag-burst {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
	z-index: 12;
}

.cr-burst-emote {
	position: absolute;
	left: 50%;
	bottom: 72px;
	width: 34px;
	height: 34px;
	margin-left: -17px;
	pointer-events: none;
	animation: crBragFloat 900ms cubic-bezier(0.18, 0.89, 0.32, 1.15) forwards;
	filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
}

@keyframes crBragFloat {
	0% {
		opacity: 0;
		transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg);
	}
	18% {
		opacity: 1;
		transform: translate3d(calc(var(--bx, 0px) * 0.35), -26px, 0) scale(1.25) rotate(var(--br, -8deg));
	}
	100% {
		opacity: 0;
		transform: translate3d(var(--bx, 0px), -145px, 0) scale(0.92) rotate(var(--br2, 14deg));
	}
}

.custom-share-primary-btn {
	flex: 2;
	padding: 10px 12px;
	border-radius: 13px;
	border: 2.5px solid #231409;
	background: linear-gradient(180deg, #fde047 0%, #f59e0b 65%, #d97706 100%);
	color: #231409;
	font-family: 'Alice', serif;
	font-size: 13.5px;
	font-weight: 900;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	cursor: pointer;
	box-shadow: 0 4px 0 #92400e, 0 6px 14px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.55);
	transition: transform 0.12s ease, filter 0.12s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-share-primary-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #92400e;
}

.custom-share-copy-btn {
	flex: 1;
	padding: 10px 10px;
	border-radius: 13px;
	border: 2.5px solid #231409;
	background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
	color: #fffbeb;
	font-family: 'Alice', serif;
	font-size: 12.5px;
	font-weight: 900;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
	box-shadow: 0 4px 0 #0f172a, inset 0 1.5px 0 rgba(255, 255, 255, 0.22);
	transition: transform 0.12s ease, filter 0.12s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.custom-share-copy-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #0f172a;
}

.custom-win-sub-actions {
	display: flex;
	gap: 6px;
	width: 100%;
	justify-content: center;
	flex-wrap: wrap;
}

.custom-win-pill-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 7px 11px;
	border: 2px solid #231409;
	background: linear-gradient(180deg, #3b2314 0%, #24140a 100%);
	color: #fef3c7;
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.6px;
	box-shadow: 0 3px 0 #140a04, inset 0 1.5px 0 rgba(253, 224, 138, 0.24);
}

.custom-win-pill-btn:hover {
	background: linear-gradient(180deg, #4b2d1a 0%, #2e190d 100%);
	border-color: #231409;
	transform: translateY(-1px);
}

.custom-win-pill-btn:active {
	transform: translateY(1.5px);
	box-shadow: 0 1.5px 0 #140a04;
}

.custom-win-inbox-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #ef4444;
	border: 1.5px solid #231409;
	color: #ffffff;
	font-size: 9.5px;
	font-weight: 900;
	line-height: 1;
}

.custom-loader-btn,
.giveup-confirm-btn,
.giveup-keep-btn,
.pigeon-challenge-back-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
}

.custom-tray-hint-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Shared Level Full-Screen Loading & Graceful Error Overlay */
.custom-level-loader-overlay {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	height: 100dvh;
	background: radial-gradient(circle at center, rgba(32, 19, 12, 0.96) 0%, rgba(12, 9, 6, 0.99) 100%);
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
}

.custom-level-loader-overlay.show {
	opacity: 1;
	pointer-events: auto;
}

.custom-loader-card {
	width: 100%;
	max-width: 360px;
	background: linear-gradient(180deg, #2e1a0e 0%, #1c1008 60%, #120904 100%);
	border: 2px solid #d4a359;
	border-radius: 20px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 24px rgba(212, 163, 89, 0.25);
	padding: 24px 20px;
	text-align: center;
	box-sizing: border-box;
}

.custom-loader-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.custom-loader-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
}

.custom-loader-brand-img {
	width: 148px;
	height: auto;
	object-fit: contain;
	display: block;
	filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.85));
	opacity: 0.98;
}

.custom-loader-brand-title {
	font-family: 'Alice', serif;
	font-size: 21px;
	font-weight: 900;
	letter-spacing: 3px;
	color: #fef08a;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 16px rgba(251, 191, 36, 0.35);
	text-transform: uppercase;
}

.custom-loader-divider {
	width: 82%;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 89, 0.65) 50%, transparent 100%);
	margin: 2px 0 6px 0;
}

.custom-loader-icon-wrap {
	position: relative;
	width: 68px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.custom-loader-spinner {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid rgba(212, 163, 89, 0.2);
	border-top-color: #fef08a;
	animation: customLoaderSpin 0.9s linear infinite;
}

@keyframes customLoaderSpin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.custom-loader-tile {
	font-size: 28px;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
	animation: customLoaderBounce 1.6s ease-in-out infinite;
}

@keyframes customLoaderBounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.12); }
}

.custom-loader-badge {
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #fef08a;
	background: rgba(212, 163, 89, 0.18);
	border: 1px solid rgba(212, 163, 89, 0.45);
	padding: 3px 12px;
	border-radius: 999px;
	text-transform: uppercase;
}

.custom-loader-title {
	font-family: 'Alice', serif;
	font-size: 20px;
	font-weight: 900;
	color: #ffffff;
	margin: 0;
	letter-spacing: 0.5px;
	line-height: 1.2;
}

.custom-loader-status {
	font-family: 'Alice', serif;
	font-size: 13.5px;
	color: rgba(254, 240, 138, 0.85);
	margin: 0;
	line-height: 1.4;
	min-height: 38px;
}

.custom-loader-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	margin-top: 8px;
}

.custom-loader-btn {
	width: 100%;
	padding: 12px;
	border-radius: 12px;
	font-family: 'Alice', serif;
	font-size: 14px;
	font-weight: 900;
	cursor: pointer;
	border: none;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transition: transform 0.15s ease, filter 0.15s ease;
}

.custom-loader-btn:active {
	transform: scale(0.97);
}

.custom-loader-btn.primary {
	background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
	color: #ffffff;
	border: 1.5px solid #86efac;
}

.custom-loader-btn.secondary {
	background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
	color: #ffffff;
	border: 1.5px solid #fef08a;
}

/* ==============================================================================
   PIGEON POST: REAL-TIME & OFFLINE CUSTOM LEVEL COMPLETION NOTIFICATIONS
   ============================================================================== */

/* 1. Unread Badges on Title Button & Level Creator Tabs */
.title-create-level-btn {
	position: relative !important;
}

.title-create-unread-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #ffffff;
	border: 2px solid #fff;
	border-radius: 12px;
	padding: 2px 7px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), 0 0 12px rgba(245, 158, 11, 0.6);
	animation: pigeonBadgePulse 2s infinite ease-in-out;
	pointer-events: none;
	z-index: 5;
}

@keyframes pigeonBadgePulse {
	0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.55), 0 0 12px rgba(245,158,11,0.6); }
	50% { transform: scale(1.12); box-shadow: 0 6px 14px rgba(0,0,0,0.65), 0 0 20px rgba(245,158,11,0.9); }
}

.custom-tab-unread-dot {
	position: absolute;
	top: 4px;
	right: 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f59e0b;
	color: #ffffff;
	border-radius: 10px;
	padding: 1px 5px;
	font-size: 10px;
	font-weight: 900;
	margin-left: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* 2. Pigeon Post Top Notification Banner */
.pigeon-post-banner {
	position: fixed !important;
	top: max(14px, env(safe-area-inset-top, 14px)) !important;
	left: 50% !important;
	transform: translateX(-50%) translateY(-140px);
	max-width: 440px;
	width: 92%;
	background: linear-gradient(180deg, #2a180e 0%, #150a04 100%);
	border: 2px solid #f59e0b;
	border-radius: 18px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(245, 158, 11, 0.5);
	z-index: 100030 !important;
	color: #ffffff;
	box-sizing: border-box;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	pointer-events: none;
	opacity: 0;
	transition: transform 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.25s ease;
}

.pigeon-post-banner.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.pigeon-post-avatar-ring {
	position: relative;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.pigeon-post-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #f59e0b;
	background: #111;
}

.pigeon-post-badge-icon {
	position: absolute;
	bottom: -4px;
	right: -4px;
	font-size: 16px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.pigeon-post-content {
	flex: 1;
	text-align: left;
	min-width: 0;
}

.pigeon-post-title {
	font-family: 'Alice', serif;
	font-size: 13.5px;
	font-weight: 800;
	color: #fbbf24;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.pigeon-post-desc {
	font-size: 12px;
	color: #e5e7eb;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pigeon-post-stats {
	font-size: 11px;
	color: #93c5fd;
	margin-top: 2px;
	font-weight: 600;
}

.pigeon-post-close-btn {
	background: transparent;
	border: none;
	color: #9ca3af;
	font-size: 22px;
	line-height: 1;
	padding: 4px 6px;
	cursor: pointer;
	border-radius: 8px;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

.pigeon-post-close-btn:hover {
	color: #fff;
}

/* 3. Pigeon Post Modal / Parchment Sheet */
.pigeon-post-modal {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	background: radial-gradient(circle at 50% 12%, rgba(44, 23, 12, 0.94) 0%, rgba(26, 12, 5, 0.96) 55%, rgba(9, 4, 1, 0.98) 100%) !important;
	z-index: 100060 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

.pigeon-post-card {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
	padding: 16px !important;
	box-sizing: border-box !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.pigeon-post-cabinet {
	width: 100% !important;
	max-width: 440px !important;
	max-height: min(92dvh, 640px) !important;
	display: flex !important;
	flex-direction: column !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	background: linear-gradient(180deg, #442616 0%, #2e180d 50%, #1c0e06 100%) !important;
	border: 3px solid #7c4726 !important;
	border-top: 3.5px solid #9c5b31 !important;
	border-bottom: 4.5px solid #140803 !important;
	border-radius: 26px !important;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), inset 0 1.5px 2px rgba(255, 215, 0, 0.28) !important;
}

.pigeon-post-felt {
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain !important;
	touch-action: pan-y !important;
}

.pigeon-badge {
	background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
	color: #ffffff;
}

.pigeon-parchment-sheet {
	position: relative;
	background: linear-gradient(180deg, #fefce8 0%, #fef3c7 100%);
	border-radius: 16px;
	border: 2px solid #d4a359;
	padding: 20px 18px 16px 18px;
	color: #1f2937;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(217, 119, 6, 0.08);
	box-sizing: border-box;
	text-align: center;
}

.pigeon-stamp-seal {
	position: absolute;
	top: -16px;
	right: 18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
	border: 2px solid #fecaca;
}

.pigeon-level-tag {
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.8px;
	color: #92400e;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.pigeon-solver-profile {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 14px;
}

.pigeon-solver-avatar-wrap {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 3px solid #f59e0b;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	background: #111;
}

.pigeon-solver-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pigeon-solver-info {
	text-align: left;
}

.pigeon-solver-name {
	font-family: 'Alice', serif;
	font-size: 18px;
	font-weight: 900;
	color: #111827;
	line-height: 1.2;
}

.pigeon-solver-sub {
	font-size: 12px;
	color: #78350f;
	font-weight: 600;
}

.pigeon-stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}

.pigeon-stat-box {
	background: rgba(255, 255, 255, 0.8);
	border: 1.5px solid #d4a359;
	border-radius: 12px;
	padding: 8px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.pigeon-stat-label {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.6px;
	color: #92400e;
	text-transform: uppercase;
}

.pigeon-stat-value {
	font-family: 'Alice', serif;
	font-size: 15px;
	font-weight: 900;
	color: #1f2937;
}

.pigeon-challenge-prompt {
	font-size: 12.5px;
	color: #4b5563;
	line-height: 1.4;
	margin: 0 0 16px 0;
	font-style: italic;
}

.pigeon-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pigeon-challenge-back-btn {
	width: 100%;
	padding: 12px 14px;
	border-radius: 14px;
	border: 2px solid #d4a359;
	background: linear-gradient(180deg, #1b4d32 0%, #0f3320 100%);
	color: #fef3c7;
	font-family: 'Alice', serif;
	font-size: 13.5px;
	font-weight: 900;
	letter-spacing: 0.6px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	transition: transform 0.14s ease, filter 0.14s ease;
	touch-action: manipulation;
}

.pigeon-challenge-back-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.08);
}

.pigeon-challenge-back-btn:active {
	transform: translateY(1px);
}

.pigeon-dismiss-btn {
	width: 100%;
	padding: 9px 12px;
	border-radius: 12px;
	border: 1.5px solid rgba(146, 64, 14, 0.3);
	background: transparent;
	color: #78350f;
	font-family: 'Alice', serif;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.pigeon-dismiss-btn:hover {
	background: rgba(217, 119, 6, 0.1);
}

/* 4. Solvers pill inside MY LEVELS card */
.custom-saved-solver-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	background: rgba(245, 158, 11, 0.16);
	border: 1px solid #f59e0b;
	color: #fef3c7;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease;
}

.custom-saved-solver-pill:hover {
	background: rgba(245, 158, 11, 0.28);
	transform: scale(1.02);
}

.custom-saved-solver-pill.gave-up {
	background: rgba(239, 68, 68, 0.18) !important;
	border-color: rgba(248, 113, 113, 0.65) !important;
	color: #fecaca !important;
}

.custom-saved-solver-pill.gave-up:hover {
	background: rgba(239, 68, 68, 0.3) !important;
}

/* 4. Challenge Give Up Confirmation Modal */
.challenge-giveup-modal {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	background: radial-gradient(circle at 50% 12%, rgba(44, 18, 18, 0.94) 0%, rgba(26, 8, 8, 0.96) 55%, rgba(9, 2, 2, 0.98) 100%) !important;
	z-index: 100060 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

.giveup-card {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
	padding: 16px !important;
	box-sizing: border-box !important;
}

.giveup-cabinet {
	width: 100% !important;
	max-width: 420px !important;
	max-height: min(92dvh, 560px) !important;
	display: flex !important;
	flex-direction: column !important;
	overflow: hidden !important;
	background: linear-gradient(180deg, #44201a 0%, #2e120d 50%, #1c0906 100%) !important;
	border: 3px solid #7c3126 !important;
	border-top: 3.5px solid #9c4131 !important;
	border-bottom: 4.5px solid #140403 !important;
	border-radius: 26px !important;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), inset 0 1.5px 2px rgba(254, 202, 202, 0.28) !important;
}

.giveup-badge {
	background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
	color: #fff !important;
}

.giveup-parchment-sheet {
	position: relative;
	background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
	border-radius: 16px;
	border: 2px solid #f87171;
	padding: 24px 20px 20px 20px;
	color: #1f2937;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(239, 68, 68, 0.08);
	box-sizing: border-box;
	text-align: center;
}

.giveup-flag-icon {
	font-size: 42px;
	line-height: 1;
	margin-bottom: 10px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.giveup-level-tag {
	font-family: 'Alice', serif;
	font-size: 13px;
	font-weight: 700;
	color: #991b1b;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.giveup-prompt-text {
	font-family: 'Alice', serif;
	font-size: 17px;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 6px 0;
	line-height: 1.35;
}

.giveup-prompt-sub {
	font-family: 'Alice', serif;
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 20px 0;
	line-height: 1.35;
}

.giveup-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.giveup-confirm-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 12px 16px;
	border-radius: 12px;
	background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
	border: 1.5px solid #f87171;
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(185, 28, 28, 0.4);
	transition: all 0.15s ease;
	touch-action: manipulation;
}

.giveup-confirm-btn:active {
	transform: scale(0.97);
}

.giveup-keep-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 12px 16px;
	border-radius: 12px;
	background: linear-gradient(180deg, #15803d 0%, #14532d 100%);
	border: 1.5px solid #4ade80;
	color: #ffffff;
	font-family: 'Alice', serif;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(20, 83, 45, 0.4);
	transition: all 0.15s ease;
	touch-action: manipulation;
}

.giveup-keep-btn:active {
	transform: scale(0.97);
}

/* ==============================================================================
   CANONICAL 6-TIER SCENE & MODAL Z-INDEX ARCHITECTURE (SceneManager Enforced)
   ============================================================================== */
/* Tier 0: Scenery & 3D WebGL Stage (z-index: 0 - 10) */
#scenery-container { z-index: 0 !important; }
#canvas-container { z-index: 2 !important; }
#scenery-fg-container { z-index: 5 !important; }

/* Tier 1: Active Primary Scene UI (z-index: 100, World Map slides above Title at 150) */
#title-screen {
	z-index: 100 !important;
}
#level-select-modal {
	z-index: 150 !important;
}

/* Tier 2: Exclusive Modal Sheets (z-index: 500) */
#custom-level-modal,
#friends-modal,
#profile-modal,
#vs-lobby-modal,
#theme-modal,
#tile-storage-modal,
#leaderboard-modal,
#achievements-modal,
#vs-results-modal,
#scenery-select-modal,
#admob-reward-modal {
	z-index: 500 !important;
}
#admob-reward-modal .admob-card {
	z-index: 501 !important;
}

/* Tier 3: Sub-Dialogs & Confirmations stacked above Tier 2 or Gameplay (z-index: 1000) */
#pigeon-post-modal,
#friend-remove-confirm-modal,
#custom-share-friend-modal,
#challenge-giveup-modal,
#username-prompt-modal,
#pvp-outgoing-modal,
#gift-box-modal,
#trial-ended-modal,
#hidden-word-modal {
	z-index: 1000 !important;
}

/* Tier 4: Transient System Notifications & Toasts (z-index: 2000) */
#pvp-invite-banner,
.pvp-invite-banner,
#custom-level-incoming-banner,
#pigeon-post-banner,
#pvp-notification-banner,
.pvp-notification-banner {
	z-index: 2000 !important;
}
#toast-banner,
.toast-banner {
	z-index: 2050 !important;
}

/* Tier 5: Blocking Loaders & Match Countdown (z-index: 3000) */
#custom-level-loader,
#vs-countdown-overlay {
	z-index: 3000 !important;
}

/* Strict Exclusive Layer Pointer-Events Isolation (Zero Click-Through to Background Scenes) */
body.wc-modal-open #title-screen,
body.wc-modal-open #canvas-container,
body.wc-modal-open #hud-header,
body.wc-modal-open #hud-bottom,
body.wc-modal-open #btn-floating-next,
body.wc-modal-open #post-win-subactions,
body.wc-modal-open #custom-win-share-bar,
body.wc-modal-open #level-select-modal,
body.custom-creator-open #title-screen,
body.custom-creator-open #canvas-container,
body.custom-creator-open #hud-header,
body.custom-creator-open #hud-bottom,
body.custom-creator-open #btn-floating-next,
body.custom-creator-open #post-win-subactions,
body.custom-creator-open #custom-win-share-bar,
body.custom-creator-open #level-select-modal {
	pointer-events: none !important;
}

body.wc-tier3-modal-open #custom-level-modal,
body.wc-tier3-modal-open #friends-modal,
body.wc-tier3-modal-open #profile-modal,
body.wc-tier3-modal-open #vs-lobby-modal,
body.wc-tier3-modal-open #theme-modal,
body.wc-tier3-modal-open #tile-storage-modal,
body.wc-tier3-modal-open #leaderboard-modal,
body.wc-tier3-modal-open #achievements-modal,
body.wc-tier3-modal-open #vs-results-modal,
body.wc-tier3-modal-open #scenery-select-modal {
	pointer-events: none !important;
}

body.wc-tier5-modal-open #pigeon-post-modal,
body.wc-tier5-modal-open #friend-remove-confirm-modal,
body.wc-tier5-modal-open #custom-share-friend-modal,
body.wc-tier5-modal-open #challenge-giveup-modal,
body.wc-tier5-modal-open #username-prompt-modal,
body.wc-tier5-modal-open #pvp-outgoing-modal,
body.wc-tier5-modal-open #gift-box-modal,
body.wc-tier5-modal-open #trial-ended-modal,
body.wc-tier5-modal-open #hidden-word-modal {
	pointer-events: none !important;
}

/* =====================================================================
   NATIVE GAME FEEL: ZERO-TIMER ENTRANCE ANIMATIONS & DIRECTIONAL TAB SLIDES
   ===================================================================== */
@keyframes wcNativeBackdropIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes wcSheetSlideIn {
	0% {
		opacity: 0.92;
		transform: translate3d(100%, 0, 0);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}
@keyframes wcDialogPopIn {
	0% {
		opacity: 0;
		transform: translate3d(0, 24px, 0) scale(0.88);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

/* Full-screen game screens & Tier-2 sheets: crisp Clash Royale / Royal Match horizontal slide */
#level-select-modal.show,
#friends-modal.show,
#profile-modal.show,
#achievements-modal.show,
#leaderboard-modal.show,
#vs-lobby-modal.show,
#custom-level-modal.show,
#theme-modal.show,
#scenery-select-modal.show,
#tile-storage-modal.show {
	animation: wcSheetSlideIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both !important;
	will-change: transform, opacity;
}

/* Tier-3 sub-dialogs & confirmation popups: spring card pop-in over dimmed backdrop */
#pigeon-post-modal.show,
#friend-remove-confirm-modal.show,
#custom-share-friend-modal.show,
#challenge-giveup-modal.show,
#username-prompt-modal.show,
#pvp-outgoing-modal.show,
#gift-box-modal.show,
#trial-ended-modal.show,
#hidden-word-modal.show {
	animation: wcNativeBackdropIn 180ms ease-out both !important;
}
#pigeon-post-modal.show > *,
#friend-remove-confirm-modal.show > *,
#custom-share-friend-modal.show > *,
#challenge-giveup-modal.show > *,
#username-prompt-modal.show > *,
#pvp-outgoing-modal.show > *,
#gift-box-modal.show > *,
#trial-ended-modal.show > *,
#hidden-word-modal.show > * {
	animation: wcDialogPopIn 250ms cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
	will-change: transform, opacity;
}

/* Clash Royale-style directional tab slide */
@keyframes wcTabSlideFromRight {
	0% {
		opacity: 0;
		transform: translate3d(26px, 0, 0);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}
@keyframes wcTabSlideFromLeft {
	0% {
		opacity: 0;
		transform: translate3d(-26px, 0, 0);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}
.wc-tab-enter-right {
	animation: wcTabSlideFromRight 200ms cubic-bezier(0.22, 1, 0.36, 1) both !important;
	will-change: transform, opacity;
}
.wc-tab-enter-left {
	animation: wcTabSlideFromLeft 200ms cubic-bezier(0.22, 1, 0.36, 1) both !important;
	will-change: transform, opacity;
}

/* =====================================================================
   iOS SUPER RETINA (3x DPR) UI SHARPENING & TYPOGRAPHY CRISP RENDERING
   ===================================================================== */
html:not(.is-android) body {
	-webkit-font-smoothing: antialiased;
}
html:not(.is-android) .scruffle-mark-img,
html:not(.is-android) .title-menu-art-img,
html:not(.is-android) .title-art-img,
html:not(.is-android) .world-nav-art-img,
html:not(.is-android) .level-rect-star-img,
html:not(.is-android) .stars-icon-img {
	filter: url(#wc-retina-sharpen);
}










/* PVP Loser "OH NO!" Opponent Solved Notice Overlay */
.vs-loser-notice-overlay {
	position: fixed;
	inset: 0;
	z-index: 95000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 4, 2, 0.56);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	pointer-events: auto;
}

.vs-loser-notice-overlay.show {
	display: flex;
	animation: vsLoserFadeIn 0.24s ease forwards;
}

.vs-loser-notice-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	max-width: 320px;
	width: 84%;
	padding: 20px 22px;
	border-radius: 22px;
	background: linear-gradient(180deg, #442616 0%, #241208 100%);
	border: 3px solid #ef4444;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 24px rgba(239, 68, 68, 0.45);
	text-align: center;
	animation: vsLoserPop 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.vs-loser-notice-avatar-wrap {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	border: 3px solid #ef4444;
	background: #1d2436;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.vs-loser-notice-avatar {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vs-loser-notice-title {
	font-family: 'Alice', serif;
	font-size: 28px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #fca5a5;
	text-shadow: 0 2px 0 #450a0a, 0 4px 12px rgba(0, 0, 0, 0.8);
}

.vs-loser-notice-sub {
	font-family: 'Alice', serif;
	font-size: 15px;
	font-weight: 800;
	color: #fef3c7;
	line-height: 1.3;
}

@keyframes vsLoserFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes vsLoserPop {
	0% { opacity: 0; transform: scale(0.76) translateY(14px); }
	100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Golden Duck Non-Blocking Pop-In Toast Notification (Achievement Toast Style) */
.golden-duck-toast {
	z-index: 10002;
}

.golden-duck-toast-img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	display: block;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
}

/* ==========================================================================
   VS Match Results Redesign — Tiles, Felt & Wood Showcase
   ========================================================================== */
#vs-results-modal .vs-res-outcome-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
}

.vs-res-outcome-tiles {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin: 6px auto 4px auto;
}

.vs-res-outcome-tile {
	width: clamp(34px, 10vw, 44px);
	height: clamp(34px, 10vw, 44px);
	display: inline-flex;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
	animation: vsResTileDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both, creatorMexicanWave 2.6s ease-in-out infinite;
	animation-delay: calc(var(--tile-idx, 0) * 0.07s), calc(0.8s + var(--tile-idx, 0) * 0.1s);
}

.vs-res-outcome-tile img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vs-res-outcome-tiles.is-loss .vs-res-outcome-tile {
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

@keyframes vsResTileDrop {
	0% { opacity: 0; transform: translateY(-40px) rotate(-12deg); }
	100% { opacity: 1; transform: translateY(0) rotate(0); }
}

/* Carved wood cabinet frame */
.vs-res-cabinet {
	margin: 10px 0 12px 0;
	padding: 10px;
	border-radius: 22px;
	background:
		repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 9px),
		linear-gradient(180deg, #6b3d1f 0%, #4a2814 55%, #2e180c 100%);
	border: 2px solid #8e582d;
	border-top: 3px solid #b0733c;
	border-bottom: 4px solid #1a0c05;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255, 215, 150, 0.3);
}

/* Green felt inset tray */
.vs-res-felt {
	position: relative;
	border-radius: 15px;
	padding: 14px 8px 12px 8px;
	background:
		radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 4px 4px,
		radial-gradient(ellipse at 50% 30%, #1f6139 0%, #144a2a 60%, #0a2a17 100%);
	border: 2px solid #2a160a;
	box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.85), inset 0 -4px 10px rgba(0, 0, 0, 0.6);
}

#vs-results-modal .vs-results-duel {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	align-items: center;
}

#vs-results-modal .vs-res-meta {
	display: none !important;
}

/* Winner bigger / loser smaller */
#vs-results-modal .vs-results-fighter {
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

#vs-results-modal .vs-results-fighter.is-winner .vs-res-ring {
	transform: scale(1.18);
	box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.55), 0 0 22px rgba(255, 215, 0, 0.6) !important;
}

#vs-results-modal .vs-results-fighter.is-winner .vs-res-wpm {
	color: #fde047;
	font-size: 22px;
}

#vs-results-modal .vs-results-fighter.is-loser .vs-res-ring {
	transform: scale(0.8);
	filter: saturate(0.6) brightness(0.85);
}

#vs-results-modal .vs-results-fighter.is-loser {
	opacity: 0.88;
}

#vs-results-modal .vs-results-fighter.is-loser .vs-res-wpm {
	font-size: 16px;
	color: #d6c5a9;
}

#vs-results-modal .vs-res-ring {
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
	margin-bottom: 10px;
}

/* Bigger tileset showcase racks on felt */
#vs-results-modal .vs-showcase-tile {
	width: 26px;
	height: 26px;
}

#vs-results-modal .vs-results-vs-badge {
	font-size: 26px;
	color: #fde68a;
	text-shadow: 0 2px 0 #3a1f0d, 0 0 12px rgba(253, 230, 138, 0.4);
}

/* Match Summary: head-to-head stat bars */
.vs-res-summary {
	margin-top: 10px;
	padding: 10px 10px 6px 10px;
	border-radius: 14px;
	background: rgba(20, 10, 4, 0.72);
	border: 1px solid rgba(212, 163, 89, 0.35);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.vs-res-summary-title {
	font-family: 'Alice', serif;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #fde68a;
	text-align: center;
	margin-bottom: 6px;
}

.vs-sum-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	border-top: 1px dashed rgba(212, 163, 89, 0.18);
}

.vs-sum-row:first-of-type {
	border-top: none;
}

.vs-sum-val {
	width: 52px;
	flex-shrink: 0;
	font-family: 'Alice', serif;
	font-size: 15px;
	font-weight: 900;
	color: #e7dccb;
}

.vs-sum-val.p1 { text-align: left; }
.vs-sum-val.p2 { text-align: right; }

.vs-sum-row.lead-p1 .vs-sum-val.p1 { color: #7dd3fc; }
.vs-sum-row.lead-p2 .vs-sum-val.p2 { color: #fca5a5; }

.vs-sum-mid {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-width: 0;
}

.vs-sum-label {
	font-family: 'Alice', serif;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.9px;
	color: #c9a77c;
}

.vs-sum-bar {
	display: flex;
	width: 100%;
	height: 7px;
	border-radius: 999px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.45);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
}

.vs-sum-bar i {
	display: block;
	height: 100%;
	width: 50%;
	transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.vs-sum-bar i.p1 { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.vs-sum-bar i.p2 { background: linear-gradient(90deg, #f87171, #dc2626); }

/* VS Results v2: no header, no overlap, flush non-scrolling single screen */
#vs-results-modal,
#vs-results-modal.show {
	overflow: hidden !important;
	overscroll-behavior: none !important;
	touch-action: none !important;
}

#vs-results-modal .vs-results-header {
	display: none !important;
}

#vs-results-modal .vs-results-card {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	max-width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
	margin: 0 !important;
	padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)) 12px !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	overflow-x: hidden !important;
	overflow-y: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	gap: 6px !important;
	border-radius: 0 !important;
	transform: none !important;
}

#vs-results-modal .vs-results-card > * {
	max-width: 460px;
	width: 100%;
	flex-shrink: 1;
	min-width: 0;
	box-sizing: border-box;
}

#vs-results-modal .vs-res-outcome-tiles {
	margin: 4px auto 0 auto;
	flex-shrink: 0;
}

#vs-results-modal .vs-res-outcome-tile {
	width: clamp(30px, 9.5vw, 40px);
	height: clamp(30px, 9.5vw, 40px);
}

#vs-results-modal .vs-results-sub {
	margin: 0 !important;
	font-size: 13px !important;
	line-height: 1.25 !important;
	flex-shrink: 0;
}

#vs-results-modal .vs-res-cabinet {
	margin: 0 auto !important;
	padding: 8px !important;
	min-height: 0;
	flex: 0 1 auto;
	overflow: hidden;
}

#vs-results-modal .vs-res-felt {
	padding: 16px 6px 10px 6px !important;
	overflow: hidden;
}

/* Columns stay inside the felt */
#vs-results-modal .vs-results-duel {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
	gap: 4px !important;
	width: 100% !important;
}

#vs-results-modal .vs-results-fighter {
	min-width: 0 !important;
	width: 100% !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	overflow: visible;
}

#vs-results-modal .vs-res-ring {
	width: 72px !important;
	height: 72px !important;
	margin: 6px 0 8px 0 !important;
	transform-origin: center center;
}

#vs-results-modal .vs-results-fighter.is-winner .vs-res-ring {
	transform: scale(1.12);
}

#vs-results-modal .vs-results-fighter.is-loser .vs-res-ring {
	transform: scale(0.82);
}

#vs-results-modal .vs-res-name {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px !important;
}

#vs-results-modal .vs-tileset-showcase {
	max-width: 100%;
	margin: 2px 0 !important;
}

#vs-results-modal .vs-showcase-rack {
	max-width: 100%;
	box-sizing: border-box;
	padding: 3px 4px;
	gap: 2px;
}

#vs-results-modal .vs-showcase-tile {
	width: clamp(18px, 5.4vw, 24px) !important;
	height: clamp(18px, 5.4vw, 24px) !important;
}

#vs-results-modal .vs-results-vs-badge {
	font-size: 22px !important;
	align-self: center;
}

#vs-results-modal .vs-res-wpm {
	font-size: 18px !important;
	margin: 0 !important;
}

#vs-results-modal .vs-results-fighter.is-winner .vs-res-wpm {
	font-size: 20px !important;
}

#vs-results-modal .vs-results-fighter.is-loser .vs-res-wpm {
	font-size: 15px !important;
}

#vs-results-modal .vs-res-summary {
	margin-top: 8px !important;
	padding: 8px 10px 4px 10px !important;
}

#vs-results-modal .vs-sum-row {
	padding: 3px 0 !important;
}

#vs-results-modal .vs-sum-val {
	width: 46px !important;
	font-size: 14px !important;
}

#vs-results-modal .vs-results-actions {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	max-width: 320px !important;
	margin: 0 auto !important;
	gap: 8px !important;
	flex-shrink: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
}

#vs-results-modal .vs-results-primary-btn,
#vs-results-modal .vs-results-secondary-btn {
	position: relative !important;
	width: 100% !important;
	max-width: 300px !important;
	margin: 0 auto !important;
	aspect-ratio: 430 / 90 !important;
	min-height: 48px !important;
	max-height: 58px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 16px !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.55)) !important;
	font-family: 'Alice', serif !important;
	font-size: clamp(14px, 4vw, 17px) !important;
	font-weight: 900 !important;
	letter-spacing: 1.2px !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	transition: transform 0.14s ease, filter 0.14s ease !important;
	touch-action: manipulation !important;
	-webkit-tap-highlight-color: transparent !important;
}

/* Primary Button (REMATCH / NEXT MATCH): Title Screen Golden Yellow Button Art */
#vs-results-modal .vs-results-primary-btn {
	background: transparent url('../AssetsScruffle/ButtonLevelSelectYellow.png') center / 100% 100% no-repeat !important;
	color: #ffffff !important;
	text-shadow: 0 2px 0 rgba(105, 56, 6, 0.95), 0 0 6px rgba(105, 56, 6, 0.6) !important;
}

#vs-results-modal .vs-results-primary-btn:hover {
	filter: brightness(1.08) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.65)) !important;
	transform: translateY(-1px) scale(1.02) !important;
}

#vs-results-modal .vs-results-primary-btn:active {
	transform: scale(0.96) !important;
	filter: brightness(0.96) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)) !important;
}

/* Secondary Button (VS LOBBY): Title Screen Blue Button Art */
#vs-results-modal .vs-results-secondary-btn {
	background: transparent url('../AssetsScruffle/BlueTitleButton.png') center / 100% 100% no-repeat !important;
	color: #ffffff !important;
	font-size: clamp(13px, 3.8vw, 16px) !important;
	letter-spacing: 1px !important;
	text-shadow: 0 2px 0 rgba(16, 35, 74, 0.85), 0 0 6px rgba(16, 35, 74, 0.5) !important;
}

#vs-results-modal .vs-results-secondary-btn:hover {
	filter: brightness(1.08) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.65)) !important;
	transform: translateY(-1px) scale(1.02) !important;
}

#vs-results-modal .vs-results-secondary-btn:active {
	transform: scale(0.96) !important;
	filter: brightness(0.96) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)) !important;
}

/* Discreet Add Friend Tag tucked beside Opponent's Avatar */
#vs-results-modal .vs-res-avatar-stage {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}

#vs-results-modal .vs-res-add-friend-tag {
	position: absolute !important;
	top: 6px;
	left: calc(50% + 14px);
	z-index: 8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2.5px 7px !important;
	min-height: 20px !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	aspect-ratio: auto !important;
	border-radius: 999px !important;
	border: 1px solid rgba(147, 197, 253, 0.6) !important;
	background: linear-gradient(180deg, rgba(30, 64, 175, 0.92) 0%, rgba(23, 37, 84, 0.96) 100%) !important;
	color: #eff6ff !important;
	font-family: 'Alice', serif !important;
	font-size: 9.5px !important;
	font-weight: 800 !important;
	letter-spacing: 0.35px !important;
	text-transform: none !important;
	white-space: nowrap !important;
	line-height: 1.1 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75) !important;
	filter: none !important;
	cursor: pointer !important;
	transition: transform 0.14s ease, filter 0.14s ease, background 0.18s ease, border-color 0.18s ease !important;
	touch-action: manipulation !important;
	-webkit-tap-highlight-color: transparent !important;
}

#vs-results-modal .vs-res-add-friend-tag:hover {
	transform: translateY(-1px) scale(1.04) !important;
	filter: brightness(1.12) !important;
}

#vs-results-modal .vs-res-add-friend-tag:active {
	transform: scale(0.94) !important;
}

#vs-results-modal .vs-res-add-friend-tag.is-adding {
	opacity: 0.78;
	cursor: wait !important;
}

#vs-results-modal .vs-res-add-friend-tag.is-added {
	background: linear-gradient(180deg, rgba(22, 101, 52, 0.92) 0%, rgba(14, 62, 34, 0.96) 100%) !important;
	border-color: rgba(134, 239, 172, 0.55) !important;
	color: #dcfce7 !important;
	cursor: default !important;
	opacity: 0.92;
}

/* Debossed SCRUFFLE watermark pressed into the green felt between the two avatars */
.vs-felt-watermark {
	position: absolute;
	top: 28px;
	left: 50%;
	transform: translateX(-50%);
	pointer-events: none;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.45;
	width: auto;
}

.vs-felt-watermark-img {
	width: clamp(68px, 21vw, 88px);
	height: auto;
	display: block;
	filter: brightness(0) drop-shadow(0 1px 0 rgba(190, 245, 210, 0.28)) drop-shadow(0 -1.5px 1.5px rgba(0, 0, 0, 0.95));
}

#vs-results-modal .vs-results-duel {
	position: relative;
	z-index: 2;
}

@media (max-height: 700px) {
	#vs-results-modal .vs-res-ring { width: 60px !important; height: 60px !important; }
	#vs-results-modal .vs-res-outcome-tile { width: 30px; height: 30px; }
	#vs-results-modal .vs-res-felt { padding-top: 12px !important; }
	#vs-results-modal .vs-felt-watermark { top: 22px; }
	#vs-results-modal .vs-results-primary-btn,
	#vs-results-modal .vs-results-secondary-btn { min-height: 44px !important; max-height: 52px !important; }
}

/* =====================================================================
   PVP MATCH RESULTS: CONFETTI CELEBRATION
   ===================================================================== */
.vs-results-confetti-canvas {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	pointer-events: none !important;
	z-index: 999999999 !important;
	display: block !important;
}

.vs-dom-confetti-container {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	pointer-events: none !important;
	z-index: 999999998 !important;
	overflow: hidden !important;
	display: block !important;
}

.vs-dom-confetti-piece {
	position: absolute;
	width: 10px;
	height: 16px;
	top: -24px;
	opacity: 0.95;
	border-radius: 2px;
	animation: vsDomConfettiFall 3.8s linear forwards;
}

@keyframes vsDomConfettiFall {
	0% {
		transform: translateY(0) rotate(0deg) scale(1);
		opacity: 1;
	}
	80% {
		opacity: 0.95;
	}
	100% {
		transform: translateY(105vh) rotate(720deg) scale(0.6);
		opacity: 0;
	}
}

/* ==========================================================================
   GLOBAL HAND-DRAWN CARTOON BUTTON SYSTEM (MATCHING PASSPORT SAVE BUTTON)
   Preserves each button's native color palette while unifying every button
   with crisp #231409 ink outlines, 3D ink ledges, gloss highlights, and
   tactile press physics.
   ========================================================================== */

/* 1. Title Screen Hand-Drawn Buttons (Exact Original Button Colors) */
.drawn-btn {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 9px !important;
	border: 2.5px solid #231409 !important;
	border-radius: 15px !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.34),
		0 7px 16px rgba(0, 0, 0, 0.36) !important;
	font-family: 'Alice', 'Georgia', serif !important;
	font-weight: 900 !important;
	letter-spacing: 0.9px !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
	overflow: visible !important;
}

.drawn-btn:hover {
	filter: brightness(1.05);
}

.drawn-btn:active {
	transform: translateY(2px) !important;
	box-shadow:
		0 2px 0 #231409,
		inset 0 1px 0 rgba(255, 255, 255, 0.22),
		0 3px 8px rgba(0, 0, 0, 0.3) !important;
}

.drawn-btn-icon {
	flex-shrink: 0;
	display: block;
	filter: drop-shadow(0 1px 0 rgba(35, 20, 9, 0.3));
}

.drawn-btn-text-group {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* Title Main Stack Buttons (Sleek Passport Proportions) */
.title-menu-btn.drawn-btn {
	aspect-ratio: auto !important;
	width: 100% !important;
	max-width: 286px !important;
	height: 46px !important;
	min-height: 46px !important;
	padding: 0 16px !important;
	font-size: 14.5px !important;
	line-height: 1 !important;
	border-radius: 13px !important;
}

#btn-title-vs.drawn-btn {
	padding: 0 58px !important;
}

#btn-title-vs.drawn-btn .vs-avatar-badge {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 28px !important;
	height: 28px !important;
	border: 2px solid #231409 !important;
	box-shadow: 0 0 0 1.5px #facc15, 0 2px 4px rgba(0, 0, 0, 0.32) !important;
}

#btn-title-vs.drawn-btn .vs-avatar-left {
	left: 22px !important;
	right: auto !important;
}

#btn-title-vs.drawn-btn .vs-avatar-right {
	right: 22px !important;
	left: auto !important;
}

/* Title Compact Hub & Footer Feature Buttons (Kill PNG aspect-ratio!) */
.title-art-btn.drawn-btn {
	aspect-ratio: auto !important;
	width: auto !important;
	min-width: 92px !important;
	height: 36px !important;
	min-height: 36px !important;
	padding: 0 12px !important;
	font-size: 11px !important;
	gap: 6px !important;
	border-radius: 11px !important;
	box-shadow:
		0 3px 0 #231409,
		inset 0 1.5px 0 rgba(255, 255, 255, 0.32),
		0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.title-art-btn.drawn-btn .drawn-btn-icon {
	width: 17px !important;
	height: 17px !important;
}

.title-menu-btn.drawn-btn .drawn-btn-icon {
	width: 20px !important;
	height: 20px !important;
}

.title-footer-nav .title-art-btn.drawn-btn {
	aspect-ratio: auto !important;
	flex: 1 1 0 !important;
	max-width: 152px !important;
	height: 40px !important;
	min-height: 40px !important;
	padding: 0 10px !important;
	font-size: 11.5px !important;
	border-radius: 12px !important;
}

.title-profile-btn.drawn-btn {
	aspect-ratio: auto !important;
	height: 28px !important;
	min-height: 28px !important;
	padding: 0 11px !important;
	border-radius: 999px !important;
	font-size: 11px !important;
	gap: 5px !important;
	box-shadow:
		0 3px 0 #231409,
		inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
		0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.title-profile-btn.drawn-btn:active {
	transform: translateY(1.5px) !important;
	box-shadow: 0 1.5px 0 #231409 !important;
}

/* Exact Color Palettes Matching Original Title Buttons */
.drawn-btn-red {
	background: linear-gradient(180deg, #f36347 0%, #dc3d22 58%, #b72710 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.72) !important;
}

.drawn-btn-blue {
	background: linear-gradient(180deg, #5689ec 0%, #2f60c6 58%, #1f449b 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.72) !important;
}

.drawn-btn-forest {
	background: linear-gradient(180deg, #2d7a4c 0%, #1d5934 58%, #133e23 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.72) !important;
}

.drawn-btn-sage {
	background: linear-gradient(180deg, #86cf8e 0%, #52a45f 58%, #3c8247 100%) !important;
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32) !important;
}

.drawn-btn-purple {
	background: linear-gradient(180deg, #b07ee3 0%, #864cc4 58%, #6732a1 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
}

.drawn-btn-sky {
	background: linear-gradient(180deg, #6db3fb 0%, #3b82f6 58%, #2563eb 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
}

.drawn-btn-amber,
.drawn-btn-gold {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 60%, #d99116 100%) !important;
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* 2. Unified Hand-Drawn Ink Outline, 3D Ledge & Press Physics Across All Game Screens
   (Keeps every button's existing background color!) */
.hud-action-btn,
.btn-recharge-keys,
.hud-challenge-giveup-btn,
.hud-win-replay-mini,
.hud-add-name-btn,
.pause-audio-btn,
.pause-menu-action-btn,
.scenery-tile-btn,
.world-level-node,
.level-tile-btn,
.world-thumb-nav-btn,
.vs-find-btn,
.vs-friends-btn,
.vs-cancel-btn,
.vs-results-primary-btn,
.vs-results-secondary-btn,
.vs-res-add-friend-tag,
.pvp-outgoing-cancel-btn,
.pvp-invite-btn-accept,
.pvp-invite-btn-decline,
.friends-copy-code-btn,
.friends-share-code-btn,
.friends-add-submit-btn,
.win-celeb-btn-replay,
.win-celeb-btn-levels,
.win-celeb-btn-next,
.tactile-next-btn,
.post-win-pill-btn,
.custom-share-primary-btn,
.custom-share-copy-btn,
.custom-player-brag-btn,
.custom-player-replay-btn,
.custom-tab-btn,
.custom-scenery-arrow-btn,
.custom-scenery-pill,
.custom-add-word-btn,
.custom-clear-words-btn,
.kb-nav-btn,
.kb-done-btn,
.custom-play-verify-btn,
.custom-loader-btn,
.giveup-confirm-btn,
.giveup-keep-btn,
.pigeon-challenge-back-btn,
.pigeon-dismiss-btn,
.win-btn,
.reward-btn-trial,
.reward-btn-ad,
.profile-achievements-cta-btn.passport-achieve-banner,
.title-settings-corner-btn,
.hud-gear-btn,
.page-tile-close-btn,
.pause-close-btn,
.theme-close,
.world-close-btn,
.cabinet-close-btn,
.vs-results-close-btn,
.admob-close-btn {
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.26),
		0 6px 14px rgba(0, 0, 0, 0.34) !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
}

.hud-action-btn:active,
.btn-recharge-keys:active,
.hud-challenge-giveup-btn:active,
.hud-win-replay-mini:active,
.hud-add-name-btn:active,
.pause-audio-btn:active,
.pause-menu-action-btn:active,
.scenery-tile-btn:active,
.world-level-node:active,
.level-tile-btn:active,
.world-thumb-nav-btn:active,
.vs-find-btn:active,
.vs-friends-btn:active,
.vs-cancel-btn:active,
.vs-results-primary-btn:active,
.vs-results-secondary-btn:active,
.vs-res-add-friend-tag:active,
.pvp-outgoing-cancel-btn:active,
.pvp-invite-btn-accept:active,
.pvp-invite-btn-decline:active,
.friends-copy-code-btn:active,
.friends-share-code-btn:active,
.friends-add-submit-btn:active,
.win-celeb-btn-replay:active,
.win-celeb-btn-levels:active,
.win-celeb-btn-next:active,
.tactile-next-btn:active,
.post-win-pill-btn:active,
.custom-share-primary-btn:active,
.custom-share-copy-btn:active,
.custom-player-brag-btn:active,
.custom-player-replay-btn:active,
.custom-tab-btn:active,
.custom-scenery-arrow-btn:active,
.custom-scenery-pill:active,
.custom-add-word-btn:active,
.custom-clear-words-btn:active,
.kb-nav-btn:active,
.kb-done-btn:active,
.custom-play-verify-btn:active,
.custom-loader-btn:active,
.giveup-confirm-btn:active,
.giveup-keep-btn:active,
.pigeon-challenge-back-btn:active,
.pigeon-dismiss-btn:active,
.win-btn:active,
.reward-btn-trial:active,
.reward-btn-ad:active,
.title-settings-corner-btn:active,
.hud-gear-btn:active,
.page-tile-close-btn:active,
.pause-close-btn:active,
.theme-close:active,
.world-close-btn:active,
.cabinet-close-btn:active,
.vs-results-close-btn:active,
.admob-close-btn:active {
	transform: translateY(2px) !important;
	box-shadow:
		0 2px 0 #231409,
		inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

/* Flex alignment for buttons with newly added hand-drawn inline SVGs */
.hud-win-replay-mini,
.username-prompt-submit-btn,
.friends-copy-code-btn,
.friends-share-code-btn,
.win-celeb-btn-replay,
.win-celeb-btn-levels,
.win-celeb-btn-next,
.post-win-pill-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
}

/* ==========================================================================
   PVP LEADERBOARD — SCRUFFLE LEAGUE TROPHY LEDGER (PASSPORT / WIN COHESION)
   Mahogany leather outer case + Club Felt Green stage + Metallic Parchment
   Podium (#1 Gold, #2 Silver, #3 Bronze) + Warm Ivory Ledger Rows
   ========================================================================== */
.leaderboard-card {
	background-color: #24130a !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1.2px),
		radial-gradient(rgba(0, 0, 0, 0.25) 1px, transparent 1.2px),
		radial-gradient(circle at 50% 10%, #3d2113 0%, #241209 55%, #120804 100%) !important;
	background-size: 6px 6px, 6px 6px, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0 !important;
}

#leaderboard-modal .page-tile-header {
	padding-left: 44px !important;
	padding-right: 48px !important;
}

#leaderboard-modal .page-tile-title-wide .creator-header-tile {
	width: clamp(19px, 5.2vw, 27px) !important;
	height: clamp(19px, 5.2vw, 27px) !important;
}

/* Remove ALL text drop-shadows inside Leaderboard for razor-sharp readability */
#leaderboard-modal,
#leaderboard-modal * {
	text-shadow: none !important;
}

#leaderboard-modal .leaderboard-podium {
	background: radial-gradient(circle at 50% 25%, #194d33 0%, #0f3623 65%, #092417 100%) !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 6px 18px rgba(0, 0, 0, 0.45),
		inset 0 0 0 2px rgba(246, 207, 101, 0.32) !important;
	border-radius: 18px !important;
	padding: 16px 10px 12px 10px !important;
	align-items: flex-end !important;
	gap: 8px !important;
}

#leaderboard-modal .podium-slot {
	border: 2.5px solid #231409 !important;
	border-radius: 15px !important;
	padding: 12px 6px 10px 6px !important;
	box-shadow: 0 4px 0 #231409, inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
	color: #1f1710 !important;
}

#leaderboard-modal .podium-slot.rank-1 {
	background: linear-gradient(175deg, #fff9e6 0%, #fde68a 58%, #f5c344 100%) !important;
	transform: translateY(-6px);
	box-shadow:
		0 5px 0 #231409,
		0 0 18px rgba(250, 204, 21, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

#leaderboard-modal .podium-slot.rank-2 {
	background: linear-gradient(175deg, #f8fafc 0%, #e2e8f0 60%, #cbd5e1 100%) !important;
}

#leaderboard-modal .podium-slot.rank-3 {
	background: linear-gradient(175deg, #fef3e7 0%, #f3cca0 60%, #dfa66a 100%) !important;
}

#leaderboard-modal .podium-medal {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin-bottom: 4px;
}

#leaderboard-modal .podium-avatar-ring {
	border: 2.5px solid #231409 !important;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 3px 6px rgba(0, 0, 0, 0.28) !important;
}

#leaderboard-modal .podium-name {
	color: #231409 !important;
	font-weight: 900 !important;
	text-shadow: none !important;
}

#leaderboard-modal .podium-wins-badge {
	background: #231409 !important;
	color: #fde68a !important;
	border: 1.5px solid rgba(250, 204, 21, 0.65) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px !important;
	padding: 3px 8px !important;
	border-radius: 999px !important;
	font-weight: 900 !important;
}

#leaderboard-modal .lb-inline-svg {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

/* Ledger Rows Container (Passenger Manifest Layout — Zero Name Cutoff!) */
#leaderboard-modal .leaderboard-list {
	background: linear-gradient(180deg, #faf5e6 0%, #f1e6c9 100%) !important;
	border: 2.5px solid #231409 !important;
	border-radius: 18px !important;
	padding: 0 !important;
	box-shadow: 0 5px 0 #231409, inset 0 0 0 2px rgba(212, 168, 67, 0.4) !important;
	gap: 0 !important;
	overflow-y: auto !important;
}

#leaderboard-modal .lb-row.lb-manifest-row {
	background: transparent !important;
	border: none !important;
	border-bottom: 1.5px dashed rgba(35, 20, 9, 0.22) !important;
	border-radius: 0 !important;
	padding: 10px 12px !important;
	box-shadow: none !important;
	color: #1f1710 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px !important;
}

#leaderboard-modal .lb-row.lb-manifest-row:last-child {
	border-bottom: none !important;
}

#leaderboard-modal .lb-row.lb-manifest-row.is-current-user {
	background: rgba(250, 204, 21, 0.28) !important;
	box-shadow: inset 4px 0 0 #d97706 !important;
}

#leaderboard-modal .lb-row-left {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

#leaderboard-modal .lb-rank-num {
	background: #231409 !important;
	color: #fde68a !important;
	border-radius: 8px !important;
	padding: 4px 7px !important;
	min-width: 30px !important;
	flex-shrink: 0 !important;
	text-align: center !important;
	font-family: 'Share Tech Mono', monospace !important;
	font-size: 12px !important;
	font-weight: 900 !important;
}

#leaderboard-modal .lb-row-avatar-ring {
	flex-shrink: 0 !important;
	width: 38px !important;
	height: 38px !important;
	border: 2px solid #231409 !important;
}

#leaderboard-modal .lb-manifest-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	gap: 2px;
}

#leaderboard-modal .lb-row-name {
	color: #1a120b !important;
	font-size: 14.5px !important;
	font-weight: 900 !important;
	line-height: 1.15 !important;
	max-width: none !important;
	white-space: normal !important;
	word-break: break-word !important;
	overflow: visible !important;
	text-overflow: clip !important;
}

#leaderboard-modal .lb-manifest-sub {
	font-family: 'Share Tech Mono', monospace;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #166534;
	text-transform: uppercase;
}

#leaderboard-modal .lb-you-badge {
	background: #1d4ed8 !important;
	color: #ffffff !important;
	border: 1.5px solid #231409 !important;
	font-size: 9px !important;
	padding: 1px 5px !important;
	border-radius: 6px !important;
	margin-left: 6px !important;
	vertical-align: middle;
}

#leaderboard-modal .lb-row-right {
	flex-shrink: 0 !important;
}

#leaderboard-modal .lb-row-wins {
	background: linear-gradient(180deg, #fef08a 0%, #f5b938 100%) !important;
	color: #231409 !important;
	border: 2px solid #231409 !important;
	box-shadow: 0 2.5px 0 #231409 !important;
	border-radius: 10px !important;
	padding: 4px 9px !important;
	font-size: 11.5px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 4px !important;
	font-weight: 900 !important;
	white-space: nowrap !important;
}

/* ==========================================================================
   TRAVEL COMPANIONS MODAL (#friends-modal) — VINTAGE TRAVEL JOURNAL &
   AIRMAIL BOARDING PASS (COHESIVE WITH SCRUFFLE PASSPORT)
   ========================================================================== */
.friends-card.travel-companions-card {
	background-color: #231538 !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px),
		radial-gradient(rgba(6, 2, 16, 0.28) 1px, transparent 1.2px),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.016) 0px, rgba(255, 255, 255, 0.016) 2px, transparent 2px, transparent 6px),
		radial-gradient(circle at 50% 10%, #3c2263 0%, #24143d 54%, #130924 100%) !important;
	background-size: 6px 6px, 6px 6px, 12px 12px, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0, 0 0 !important;
	padding: max(12px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom)) 12px !important;
}

.travel-inner-stitch {
	flex: 1 1 auto;
	min-height: 0;
	border: 1.5px dashed rgba(246, 207, 101, 0.36);
	border-radius: 20px;
	padding: 12px 12px 14px 12px;
	box-shadow: inset 0 0 0 3px rgba(14, 6, 28, 0.45), 0 0 0 1px rgba(246, 207, 101, 0.14);
	display: flex;
	flex-direction: column;
	gap: 11px;
	box-sizing: border-box;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.travel-header {
	padding-bottom: 8px !important;
	border-bottom: 1px solid rgba(246, 207, 101, 0.22) !important;
	margin-bottom: 0 !important;
}

.travel-header .friends-header-left {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.travel-header-svg {
	flex-shrink: 0;
	display: block;
}

.travel-header-titles {
	display: flex;
	flex-direction: column;
	text-align: left;
	line-height: 1.1;
}

.travel-header-titles h3 {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 900 !important;
	letter-spacing: 0.9px !important;
	color: #fde68a !important;
}

.travel-header-sub {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #d8b4fe;
	text-transform: uppercase;
}

/* Vintage Airmail Boarding Pass Card */
.friends-my-code-card.travel-boarding-pass {
	background: linear-gradient(170deg, #faf5e6 0%, #f1e7cc 60%, #e7d9b4 100%) !important;
	border: 2.5px solid #231409 !important;
	border-radius: 16px !important;
	padding: 0 !important;
	overflow: hidden !important;
	box-shadow: 0 5px 0 #231409, 0 8px 18px rgba(0, 0, 0, 0.38) !important;
	color: #231409 !important;
}

.travel-airmail-stripe {
	height: 8px;
	width: 100%;
	background: repeating-linear-gradient(
		-45deg,
		#dc2626 0px,
		#dc2626 10px,
		#faf5e6 10px,
		#faf5e6 16px,
		#2563eb 16px,
		#2563eb 26px,
		#faf5e6 26px,
		#faf5e6 32px
	);
	border-bottom: 2px solid #231409;
}

.travel-pass-body {
	padding: 11px 13px 12px 13px;
}

.travel-boarding-pass .friends-my-code-label {
	color: #1e3a8a !important;
	font-size: 10px !important;
	font-weight: 900 !important;
	letter-spacing: 1.1px !important;
}

.travel-boarding-pass .friends-my-code-val {
	color: #231409 !important;
	font-family: 'Share Tech Mono', monospace !important;
	font-size: 19px !important;
	font-weight: 900 !important;
	letter-spacing: 1px !important;
}

.travel-boarding-pass .friends-my-code-hint {
	color: #5c4b37 !important;
	font-size: 11px !important;
	margin-top: 6px !important;
}

/* Add Companion Ticket Input */
.travel-companions-card .friends-add-input {
	background: #fffdf6 !important;
	color: #231409 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 12px !important;
	font-weight: 800 !important;
	box-shadow: inset 0 2px 4px rgba(35, 20, 9, 0.1) !important;
}

.travel-companions-card .friends-add-input::placeholder {
	color: #8c7a62 !important;
}

.travel-companions-card .friends-list-header {
	color: #fde68a !important;
	letter-spacing: 1.3px !important;
	font-size: 11px !important;
	font-weight: 900 !important;
}

/* Empty State & Companion Luggage-Tag Cards */
.travel-companions-card .friends-empty-state {
	background: rgba(250, 245, 230, 0.08) !important;
	border: 2px dashed rgba(246, 207, 101, 0.35) !important;
	border-radius: 16px !important;
	padding: 24px 16px !important;
}

.travel-companions-card .friends-empty-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
}

.travel-companions-card .friends-empty-title {
	color: #fde68a !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
}

.travel-companions-card .friends-empty-desc {
	color: #e9d5ff !important;
}

.travel-companions-card .friend-item-row {
	background: linear-gradient(180deg, #faf4e4 0%, #efe4c7 100%) !important;
	border: 2px solid #231409 !important;
	border-radius: 14px !important;
	box-shadow: 0 3px 0 #231409, inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
	color: #231409 !important;
}

.travel-companions-card .friend-username {
	color: #231409 !important;
	font-weight: 900 !important;
}

.travel-companions-card .friend-player-code {
	color: #475569 !important;
	font-family: 'Share Tech Mono', monospace !important;
}

.travel-companions-card .friend-invite-btn {
	border: 2px solid #231409 !important;
	box-shadow: 0 3px 0 #231409 !important;
	font-weight: 900 !important;
}

/* ==========================================================================
   DESTINATIONS (LEVEL SELECT) & PASSPORT VISA STAMPS
   ========================================================================== */
.world-destination-stamp-row {
	display: flex;
	justify-content: center;
	margin-top: 5px;
}

.world-stamp-status-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(15, 34, 73, 0.86);
	border: 2px solid #231409;
	box-shadow: 0 2.5px 0 #231409, inset 0 1px 0 rgba(246, 207, 101, 0.4);
	color: #fde68a;
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.9px;
	text-transform: uppercase;
}

.world-stamp-status-pill.is-stamped {
	background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
	color: #fffbeb;
	box-shadow: 0 2.5px 0 #231409, 0 0 14px rgba(239, 68, 68, 0.5);
}

.world-stamp-status-pill.is-locked {
	background: rgba(30, 41, 59, 0.88);
	color: #cbd5e1;
}

/* Boarding-Ticket Stop Cards (Pure Hand-Drawn Cartoon Gradients — Replaces PNG Pills) */
#level-select-modal .level-rect-btn {
	aspect-ratio: auto !important;
	min-height: 62px !important;
	padding: 8px 14px !important;
	border-radius: 16px !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.34),
		0 6px 14px rgba(0, 0, 0, 0.32) !important;
	filter: none !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
}

#level-select-modal .level-rect-btn.is-unlocked {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 55%, #d99116 100%) !important;
}

#level-select-modal .level-rect-btn.is-unlocked.is-current-level {
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.45),
		0 0 16px rgba(250, 204, 21, 0.55) !important;
}

#level-select-modal .level-rect-btn.is-completed {
	background: linear-gradient(180deg, #6ee7b7 0%, #10b981 55%, #047857 100%) !important;
}

#level-select-modal .level-rect-btn.is-locked {
	background: linear-gradient(180deg, rgba(64, 68, 76, 0.94) 0%, rgba(42, 46, 54, 0.96) 58%, rgba(28, 31, 38, 0.98) 100%) !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 1.5px 0 rgba(255, 255, 255, 0.14),
		0 5px 12px rgba(0, 0, 0, 0.28) !important;
}

#level-select-modal .level-rect-btn:active {
	transform: translateY(2px) !important;
	box-shadow:
		0 2px 0 #231409,
		inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

#level-select-modal .level-rect-left {
	border-right: 1.5px dashed rgba(35, 20, 9, 0.3);
	padding-right: 10px;
}

#level-select-modal .level-rect-btn.is-unlocked .level-rect-lvl,
#level-select-modal .level-rect-btn.is-unlocked .level-rect-status,
#level-select-modal .level-rect-btn.is-unlocked .level-rect-word {
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

#level-select-modal .level-rect-btn.is-locked .level-rect-left {
	border-right-color: rgba(255, 255, 255, 0.16);
}

/* Vintage Brass Capsule Bottom Prev / Next Destination Buttons */
#level-select-modal .world-thumb-nav-btn.drawn-btn {
	aspect-ratio: auto !important;
	width: auto !important;
	min-width: 96px !important;
	height: 38px !important;
	min-height: 38px !important;
	padding: 0 16px !important;
	border-radius: 999px !important;
	background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 24%, #fde68a 52%, #d97706 85%, #b45309 100%) !important;
	border: 2px solid #78350f !important;
	box-shadow:
		0 4px 0 #451a03,
		inset 0 1px 0 rgba(255, 255, 255, 0.7),
		0 6px 14px rgba(0, 0, 0, 0.35) !important;
	color: #231409 !important;
	font-family: 'Alice', serif !important;
	font-size: 13px !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}

#level-select-modal .world-thumb-nav-btn.drawn-btn:active {
	transform: translateY(2px) !important;
	box-shadow: 0 2px 0 #451a03, inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

#level-select-modal .world-thumb-nav-btn.drawn-btn svg path {
	stroke: #451a03 !important;
	stroke-width: 3.4 !important;
}

#level-select-modal .world-thumb-nav-btn.drawn-btn.is-disabled {
	opacity: 0.42 !important;
	filter: saturate(0.6) !important;
	pointer-events: none;
}

/* Brass/Dark Capsule Housing for Destination Progress Pips */
#level-select-modal .world-pips-indicator {
	background: rgba(35, 20, 9, 0.72) !important;
	border: 1.5px solid #78350f !important;
	border-radius: 999px !important;
	padding: 5px 12px !important;
	box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Passport Visa Stamps Page (inside Profile -> STAMPS tab) */
.passport-visa-page {
	background-color: #f4ecd7;
	background-image:
		repeating-radial-gradient(circle at 18% 24%, rgba(29, 78, 216, 0.04) 0px, rgba(29, 78, 216, 0.04) 1px, transparent 1px, transparent 9px),
		linear-gradient(170deg, #faf5e6 0%, #f1e7cc 60%, #e7d9b4 100%);
	border: 2.5px solid #231409;
	border-radius: 16px;
	padding: 10px 10px 12px 10px;
	box-shadow: 0 5px 14px rgba(2, 6, 18, 0.42), inset 0 0 0 2px rgba(212, 168, 67, 0.45);
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.passport-visa-page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 6px;
	border-bottom: 1.5px solid rgba(35, 20, 9, 0.14);
}

.passport-visa-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.passport-visa-stamp {
	position: relative;
	border-radius: 14px;
	padding: 8px 4px 7px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	text-align: center;
	box-sizing: border-box;
}

.passport-visa-stamp.is-unvisited {
	background: rgba(30, 58, 138, 0.05);
	border: 2px dashed rgba(35, 20, 9, 0.28);
	color: rgba(35, 20, 9, 0.58);
}

.passport-visa-stamp.is-unvisited .passport-visa-icon {
	opacity: 0.45;
	filter: grayscale(0.7);
}

.passport-visa-stamp.is-stamped {
	background: rgba(255, 253, 245, 0.92);
	border: 2.5px double #b91c1c;
	box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.14), 0 2px 6px rgba(35, 20, 9, 0.18);
	color: #231409;
}

.passport-visa-stamp.is-stamped.tilt-left {
	transform: rotate(-2.5deg);
}

.passport-visa-stamp.is-stamped.tilt-right {
	transform: rotate(2.5deg);
}

.passport-visa-stamp.is-stamped.theme-sakura { border-color: #db2777; }
.passport-visa-stamp.is-stamped.theme-ocean { border-color: #0d9488; }
.passport-visa-stamp.is-stamped.theme-peaks { border-color: #2563eb; }
.passport-visa-stamp.is-stamped.theme-snowtown { border-color: #0284c7; }
.passport-visa-stamp.is-stamped.theme-volcano { border-color: #ea580c; }
.passport-visa-stamp.is-stamped.theme-falls { border-color: #059669; }

.passport-visa-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.passport-visa-name {
	font-size: 8.5px;
	font-weight: 900;
	letter-spacing: 0.4px;
	line-height: 1.1;
	text-transform: uppercase;
}

.passport-visa-status {
	font-size: 7.5px;
	font-weight: 900;
	letter-spacing: 0.6px;
	padding: 1px 5px;
	border-radius: 999px;
	text-transform: uppercase;
}

.passport-visa-stamp.is-stamped .passport-visa-status {
	background: #b91c1c;
	color: #fffbeb;
}

.passport-visa-stamp.is-unvisited .passport-visa-status {
	background: rgba(35, 20, 9, 0.1);
	color: rgba(35, 20, 9, 0.65);
}

/* ==========================================================================
   LEVEL CREATOR — CLEAN HAND-DRAWN TABS (GREEN / YELLOW / RED),
   SCENERY ARROWS & PLAY TEST BUTTON (ZERO PNG DOUBLE-BORDER MASHUP)
   ========================================================================== */

/* Distinct Color-Coded Tabs: Green (Create), Yellow/Gold (My Levels), Red (Challenges) */
#custom-level-modal #tab-custom-create {
	background: linear-gradient(180deg, #215c3a 0%, #164028 100%) !important;
	color: #d1fae5 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 13px !important;
	box-shadow: 0 3px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.18) !important;
}

#custom-level-modal #tab-custom-create.active {
	background: linear-gradient(180deg, #4ade80 0%, #16a34a 58%, #15803d 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 12px rgba(74, 222, 128, 0.35) !important;
}

#custom-level-modal #tab-custom-saved {
	background: linear-gradient(180deg, #7c5815 0%, #573c0d 100%) !important;
	color: #fef3c7 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 13px !important;
	box-shadow: 0 3px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.18) !important;
}

#custom-level-modal #tab-custom-saved.active {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 58%, #d99116 100%) !important;
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 0 12px rgba(250, 204, 21, 0.38) !important;
}

#custom-level-modal #tab-custom-inbox {
	background: linear-gradient(180deg, #7f231c 0%, #591612 100%) !important;
	color: #fee2e2 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 13px !important;
	box-shadow: 0 3px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.18) !important;
}

#custom-level-modal #tab-custom-inbox.active {
	background: linear-gradient(180deg, #f87171 0%, #dc2626 58%, #b91c1c 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 12px rgba(248, 113, 113, 0.38) !important;
}

/* Scenery Left/Right Arrows — Exact Passport Avatar Stepper Style */
#custom-level-modal .custom-scenery-arrow-btn {
	background-image: none !important;
	width: 34px !important;
	height: 58px !important;
	flex-shrink: 0 !important;
	border-radius: 11px !important;
	border: 2px solid #231409 !important;
	box-shadow: 0 3px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.38) !important;
	filter: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
}

#custom-level-modal .custom-scenery-arrow-btn.prev,
#custom-level-modal .custom-scenery-arrow-btn.next {
	background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%) !important;
	color: #231409 !important;
}

/* Bottom PLAY TEST CTA — Pure CSS Drawn Gold Button (Replaces PNG) */
#custom-level-modal .custom-play-verify-btn {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 58%, #d99116 100%) !important;
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
	border: 2.5px solid #231409 !important;
	border-radius: 15px !important;
	min-height: 50px !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.4),
		0 7px 16px rgba(0, 0, 0, 0.38) !important;
	filter: none !important;
	font-weight: 900 !important;
	letter-spacing: 1px !important;
}

/* ==========================================================================
   THEMED DESTINATIONS ITINERARY (PER-WORLD PALETTE + POSTCARD BANNER +
   CONNECTED ROUTE LINE + MINI VISA SEAL + THEMED PIPS)
   ========================================================================== */
#world-trays-shell {
	--dest-accent: #db2777;
	--dest-accent-soft: rgba(219, 39, 119, 0.16);
	--dest-card-top: #fff2f6;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #f5b938;
	--dest-pill-bg: rgba(88, 22, 54, 0.9);
	--dest-route: rgba(253, 230, 138, 0.55);
}

#world-trays-shell[data-world-theme="sakura"] {
	--dest-accent: #db2777;
	--dest-accent-soft: rgba(244, 114, 182, 0.22);
	--dest-card-top: #fff5f8;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #f5b938;
	--dest-pill-bg: rgba(94, 24, 58, 0.9);
}

#world-trays-shell[data-world-theme="ocean"] {
	--dest-accent: #0d9488;
	--dest-accent-soft: rgba(45, 212, 191, 0.22);
	--dest-card-top: #ecfeff;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #f59e0b;
	--dest-pill-bg: rgba(13, 68, 78, 0.92);
}

#world-trays-shell[data-world-theme="peaks"] {
	--dest-accent: #2563eb;
	--dest-accent-soft: rgba(96, 165, 250, 0.22);
	--dest-card-top: #eff6ff;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #e5a92c;
	--dest-pill-bg: rgba(23, 47, 94, 0.92);
}

#world-trays-shell[data-world-theme="snowtown"] {
	--dest-accent: #0284c7;
	--dest-accent-soft: rgba(56, 189, 248, 0.22);
	--dest-card-top: #f0f9ff;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #eab308;
	--dest-pill-bg: rgba(12, 56, 86, 0.92);
}

#world-trays-shell[data-world-theme="volcano"] {
	--dest-accent: #ea580c;
	--dest-accent-soft: rgba(251, 146, 60, 0.24);
	--dest-card-top: #fff7ed;
	--dest-card-mid: #fdba74;
	--dest-card-bot: #ea580c;
	--dest-pill-bg: rgba(82, 26, 12, 0.92);
}

#world-trays-shell[data-world-theme="falls"] {
	--dest-accent: #059669;
	--dest-accent-soft: rgba(52, 211, 153, 0.22);
	--dest-card-top: #ecfdf5;
	--dest-card-mid: #fde68a;
	--dest-card-bot: #eab308;
	--dest-pill-bg: rgba(10, 64, 48, 0.92);
}

/* Destination Postcard Header Card — Brass Plate with Corner Rivets & Red Wax Seal */
.world-postcard-banner {
	width: 100%;
	max-width: 362px;
	margin: 6px auto 0 auto;
	padding: 8px 12px;
	border-radius: 16px;
	background: linear-gradient(175deg, #fdfbf7 0%, #f6edd9 55%, #eedfc1 100%);
	border: 3px solid #78350f;
	box-shadow:
		0 4px 0 #3d1a04,
		inset 0 1px 0 rgba(255, 255, 255, 0.75),
		inset 0 0 0 1px rgba(120, 53, 15, 0.35),
		0 8px 18px rgba(0, 0, 0, 0.42);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	box-sizing: border-box;
	position: relative;
	overflow: visible;
}

/* Corner Brass Rivets on the Plaque */
.brass-plate-rivet {
	position: absolute;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fef08a 0%, #d97706 60%, #78350f 100%);
	border: 1px solid #451a03;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
	z-index: 3;
	pointer-events: none;
}

.brass-plate-rivet.rivet-tl { top: 4px; left: 4px; }
.brass-plate-rivet.rivet-tr { top: 4px; right: 4px; }
.brass-plate-rivet.rivet-bl { bottom: 4px; left: 4px; }
.brass-plate-rivet.rivet-br { bottom: 4px; right: 4px; }

.world-postcard-emblem {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 12px;
	background: var(--dest-accent-soft);
	border: 2px solid var(--dest-accent);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
}

.world-postcard-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	line-height: 1.15;
}

.world-postcard-name {
	font-size: 13.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	color: #231409;
	text-transform: uppercase;
}

.world-postcard-tagline {
	font-size: 11.5px;
	font-weight: 900;
	color: #7c2d12;
	letter-spacing: 0.4px;
	text-transform: capitalize;
}

.world-postcard-progress-sub {
	font-size: 8px;
	font-weight: 800;
	color: #92400e;
	letter-spacing: 0.8px;
	margin-top: 2px;
	text-transform: uppercase;
}

/* Authentic Scalloped Red Wax Visa Seal */
.world-stamp-preview-seal {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 32%, #ef4444 0%, #b91c1c 48%, #7f1d1d 85%, #500707 100%);
	border: 2.2px solid #450a0a;
	box-shadow:
		0 3.5px 0 #450a0a,
		inset 0 2px 2.5px rgba(255, 255, 255, 0.35),
		inset 0 -2px 3px rgba(0, 0, 0, 0.45),
		0 5px 12px rgba(0, 0, 0, 0.4);
	color: #fef2f2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: rotate(-9deg);
	line-height: 1.05;
	text-shadow: 0 1px 1.5px #3f0707;
	position: relative;
	box-sizing: border-box;
}

.world-stamp-preview-seal::before {
	content: '';
	position: absolute;
	inset: -3.5px;
	border-radius: 50%;
	border: 1.8px dashed rgba(185, 28, 28, 0.9);
	box-shadow: 0 0 0 1px rgba(69, 10, 10, 0.7);
	pointer-events: none;
}

.world-stamp-preview-seal.is-stamped {
	background: radial-gradient(circle at 35% 32%, #f87171 0%, #dc2626 48%, #991b1b 85%, #600a0a 100%);
	box-shadow:
		0 3.5px 0 #450a0a,
		inset 0 2px 3px rgba(255, 255, 255, 0.45),
		0 0 14px rgba(239, 68, 68, 0.55),
		0 5px 12px rgba(0, 0, 0, 0.4);
}

.world-stamp-preview-seal.is-locked {
	background: radial-gradient(circle at 35% 32%, #78716c 0%, #57534e 50%, #292524 100%);
	border-color: #1c1917;
	box-shadow: 0 3px 0 #1c1917, inset 0 1px 2px rgba(255, 255, 255, 0.2);
	color: #d6d3d1;
}

.world-stamp-preview-seal.is-locked::before {
	border-color: rgba(120, 113, 108, 0.6);
	box-shadow: 0 0 0 1px #1c1917;
}

.world-seal-top {
	font-size: 7.5px;
	font-weight: 900;
	letter-spacing: 1px;
	color: #fecaca;
}

.world-seal-val {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.4px;
	color: #ffffff;
}
	font-weight: 900;
	letter-spacing: 0.3px;
}

#world-trays-shell .world-stamp-status-pill {
	background: var(--dest-pill-bg);
}

/* Connected Vertical Travel Route Line Behind Stop Cards */
#level-select-grid {
	position: relative;
}

#level-select-grid::before {
	content: '';
	position: absolute;
	top: 18px;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	border-left: 3px dashed var(--dest-route);
	pointer-events: none;
	z-index: 0;
}

#level-select-modal .level-rect-btn {
	position: relative;
	z-index: 1;
	min-height: 56px !important;
	padding: 6px 13px !important;
}

#level-select-modal .level-rect-btn.is-unlocked {
	background: linear-gradient(180deg, var(--dest-card-top) 0%, var(--dest-card-mid) 52%, var(--dest-card-bot) 100%) !important;
}

#level-select-modal .stop-lock-svg {
	display: block;
	margin: 0 auto;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* Per-Destination Themed Bottom World Pips */
#world-pips-indicator .world-pip[data-world-theme="sakura"].active { background: #f472b6 !important; }
#world-pips-indicator .world-pip[data-world-theme="ocean"].active { background: #2dd4bf !important; }
#world-pips-indicator .world-pip[data-world-theme="peaks"].active { background: #60a5fa !important; }
#world-pips-indicator .world-pip[data-world-theme="snowtown"].active { background: #38bdf8 !important; }
#world-pips-indicator .world-pip[data-world-theme="volcano"].active { background: #fb923c !important; }
#world-pips-indicator .world-pip[data-world-theme="falls"].active { background: #34d399 !important; }

#world-pips-indicator .world-pip.is-stamped {
	box-shadow: 0 0 0 2px #facc15 !important;
}

/* ==========================================================================
   BIG DESTINATION TILE BANNER + WINDING SCENIC MAP TOWN LAYOUT
   ========================================================================== */
.world-map-topbar {
	position: relative !important;
	justify-content: center !important;
	padding-left: 44px !important;
	padding-right: 48px !important;
	min-height: 46px !important;
}

.world-map-topbar .world-close-btn {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
}

.world-big-tile-banner-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.world-destination-tile-title {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px 10px !important;
}

.world-destination-tile-title .creator-header-tile {
	width: clamp(22px, 5.8vw, 30px) !important;
	height: clamp(22px, 5.8vw, 30px) !important;
}

.world-map-substrip-wrap {
	margin-top: 2px !important;
	margin-bottom: 4px !important;
}

.world-map-substrip {
	max-width: 332px !important;
	padding: 5px 10px !important;
}

.world-postcard-progress-sub {
	font-size: 9px;
	font-weight: 900;
	letter-spacing: 0.7px;
	color: #475569;
	text-transform: uppercase;
}

/* Winding Scenic Map Trail Stage */
.world-map-stage-wrap {
	flex: 1 1 auto !important;
	display: flex !important;
	align-items: stretch !important;
	justify-content: center !important;
	min-height: 0 !important;
}

#level-select-grid.world-map-trail-grid {
	position: relative !important;
	width: 100% !important;
	max-width: 380px !important;
	min-height: 420px !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	gap: 8px !important;
	padding: 6px 4px 8px 4px !important;
	box-sizing: border-box !important;
}

#level-select-grid.world-map-trail-grid::before {
	display: none !important;
}

.world-map-path-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

/* ==========================================================================
   ARTISTIC TOURIST MAP PINS & POINTED WOODEN TRAIL SIGNPOSTS
   Replaces bulky rectangles with teardrop pins planted on the trail +
   handcrafted directional park signpost plaques.
   ========================================================================== */
#level-select-modal .level-rect-btn.map-town-node,
#level-select-modal .level-rect-btn.map-town-node.is-unlocked,
#level-select-modal .level-rect-btn.map-town-node.is-unlocked.is-current-level,
#level-select-modal .level-rect-btn.map-town-node.is-completed,
#level-select-modal .level-rect-btn.map-town-node.is-completed.is-current-level,
#level-select-modal .level-rect-btn.map-town-node.is-locked {
	position: relative !important;
	z-index: 2 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	filter: none !important;
	width: auto !important;
	max-width: 245px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	overflow: visible !important;
}

#level-select-modal .level-rect-btn.map-town-node:active {
	transform: translateY(2px) scale(0.97) !important;
	box-shadow: none !important;
}

#level-select-modal .level-rect-btn.map-town-node.map-side-left {
	align-self: flex-start !important;
	margin-left: 10px !important;
	flex-direction: row !important;
}

#level-select-modal .level-rect-btn.map-town-node.map-side-right {
	align-self: flex-end !important;
	margin-right: 10px !important;
	flex-direction: row-reverse !important;
}

/* Teardrop Tourist Map Pin (No Circle Box — Pure Drawn SVG Pin) */
.map-pin-medallion.tourist-pin {
	width: auto !important;
	height: auto !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
	filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.38));
}

.map-town-node.is-current-level .map-pin-medallion.tourist-pin {
	animation: touristPinBob 1.7s ease-in-out infinite;
	filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.7)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
}

@keyframes touristPinBob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

.tourist-pin-svg {
	display: block;
}

/* Vintage Railway Station Ticket Plaque (Replacing old wooden directional signposts) */
.map-town-sign.tourist-signpost-plaque.railway-ticket,
.map-town-sign.tourist-signpost-plaque {
	position: relative !important;
	min-width: 140px !important;
	max-width: 176px !important;
	padding: 7px 11px !important;
	border: 2.2px solid #231409 !important;
	border-radius: 8px !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 1px 0 rgba(255, 255, 255, 0.65),
		0 6px 14px rgba(0, 0, 0, 0.35) !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

/* Remove old signpost stake and side nail pseudo-elements */
.map-town-sign.tourist-signpost-plaque::after,
.map-town-sign.tourist-signpost-plaque::before {
	display: none !important;
}

/* Ticket Side Punch Notches (Authentic train ticket punch cutout borders) */
.ticket-notch {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 7px;
	height: 12px;
	pointer-events: none;
	z-index: 4;
}

.ticket-notch-l {
	left: -1px;
	border-top-right-radius: 12px;
	border-bottom-right-radius: 12px;
	border: 1.8px solid #231409;
	border-left: none;
	background: rgba(35, 20, 9, 0.1);
}

.ticket-notch-r {
	right: -1px;
	border-top-left-radius: 12px;
	border-bottom-left-radius: 12px;
	border: 1.8px solid #231409;
	border-right: none;
	background: rgba(35, 20, 9, 0.1);
}

/* Inner Keyline Decorative Frame */
.ticket-inner-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 7px 6px 4px 6px;
	box-sizing: border-box;
	border: 1px solid rgba(120, 53, 15, 0.42);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.22);
}

/* Destination Railway Line Header */
.ticket-railway-lbl {
	font-size: 7.5px !important;
	font-weight: 800 !important;
	letter-spacing: 1.2px !important;
	text-transform: uppercase !important;
	color: #78350f !important;
	opacity: 0.9 !important;
	margin-bottom: 2px !important;
	text-align: center !important;
	line-height: 1.1 !important;
}

/* "Current Trip 🎫" Tag perched above ticket */
.ticket-current-trip-tag {
	position: absolute;
	top: -26px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
	border: 1.5px solid #d97706;
	border-radius: 999px;
	padding: 1px 7px;
	font-size: 7.5px;
	font-weight: 900;
	color: #92400e;
	letter-spacing: 0.6px;
	white-space: nowrap;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.ticket-current-trip-icon {
	font-size: 9px;
}

/* Perforated Vertical Divider on Current Trip Ticket */
.ticket-perf-divider {
	position: absolute;
	top: 4px;
	bottom: 4px;
	right: 2px;
	width: 0;
	border-right: 1.8px dashed rgba(120, 53, 15, 0.45);
	pointer-events: none;
}

.map-side-right .ticket-perf-divider {
	right: auto;
	left: 2px;
}

/* Railway Ticket Paper States */
.map-town-node.is-completed .tourist-signpost-plaque {
	background: linear-gradient(180deg, #faf6eb 0%, #f4ead0 60%, #ecdec0 100%) !important;
	color: #231409 !important;
	border-color: #231409 !important;
}

.map-town-node.is-unlocked .tourist-signpost-plaque {
	background: linear-gradient(180deg, #fffdf7 0%, #fef3c7 60%, #fde68a 100%) !important;
	color: #231409 !important;
	border-color: #231409 !important;
}

.map-town-node.is-current-level .tourist-signpost-plaque {
	background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 35%, #fde68a 70%, #f5cb58 100%) !important;
	border-color: #78350f !important;
	box-shadow:
		0 4px 0 #451a03,
		inset 0 1px 0 rgba(255, 255, 255, 0.75),
		0 0 16px rgba(245, 158, 11, 0.65),
		0 6px 14px rgba(0, 0, 0, 0.35) !important;
}

.map-town-node.is-locked .tourist-signpost-plaque {
	background: linear-gradient(180deg, #f7f1e4 0%, #ede3cf 100%) !important;
	border: 2px solid #574636 !important;
	box-shadow: 0 4px 0 #3d3024, 0 6px 14px rgba(0, 0, 0, 0.28) !important;
	min-width: 122px !important;
}

.map-town-node.is-locked .ticket-inner-card {
	border-color: rgba(87, 70, 54, 0.35) !important;
	flex-direction: row !important;
	justify-content: space-between !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 5px 8px !important;
	background: rgba(87, 70, 54, 0.06) !important;
}

.ticket-stop-title {
	font-size: 11px !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
	color: #473a2f !important;
	text-transform: uppercase !important;
}

/* Vintage Rubber Ink Stamps on Locked Tickets */
.ticket-ink-stamp {
	display: inline-block;
	text-transform: uppercase;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 0.8px;
	user-select: none;
}

.ticket-ink-stamp.stamp-void {
	font-size: 9px !important;
	color: #b91c1c !important;
	border: 1.8px solid #b91c1c !important;
	background: rgba(185, 28, 28, 0.08) !important;
	padding: 1px 5px !important;
	transform: rotate(-5deg);
	border-radius: 3px !important;
	box-shadow: inset 0 0 2px rgba(185, 28, 28, 0.2) !important;
}

.ticket-ink-stamp.stamp-not-valid {
	font-size: 8px !important;
	color: #dc2626 !important;
	border: 2.2px double #dc2626 !important;
	background: rgba(220, 38, 38, 0.08) !important;
	padding: 1px 5px !important;
	transform: rotate(3deg);
	border-radius: 3px !important;
}

.ticket-ink-stamp.stamp-locked {
	font-size: 8px !important;
	color: #475569 !important;
	border: 1.6px solid #475569 !important;
	background: rgba(71, 85, 105, 0.1) !important;
	padding: 1px 6px !important;
	transform: rotate(-2deg);
	border-radius: 999px !important;
}

.ticket-lock-badge {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	opacity: 0.85 !important;
	margin-left: 2px !important;
}

.map-town-node.is-locked .level-rect-stars {
	display: none !important;
}

.map-town-node .level-rect-stars {
	position: absolute !important;
	top: -11px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: auto !important;
	min-width: 68px !important;
	margin: 0 !important;
	background: #231409 !important;
	border: 1.5px solid #fde68a !important;
	border-radius: 999px !important;
	padding: 2px 8px !important;
	gap: 4px !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.38) !important;
	z-index: 4 !important;
}

.map-town-node .level-rect-star-img {
	width: 15px !important;
	height: 15px !important;
	margin: 0 !important;
}

.map-town-node .level-rect-star-img.level-rect-star-pos-1,
.map-town-node .level-rect-star-img.level-rect-star-pos-3 {
	margin: 0 !important;
}

.map-town-node .level-rect-star-img.level-rect-star-pos-2 {
	width: 18px !important;
	height: 18px !important;
	transform: translateY(-1px) !important;
}

.map-town-node .level-rect-word {
	font-size: 13.5px !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
	color: #231409 !important;
	text-transform: uppercase !important;
	line-height: 1.15 !important;
	text-align: center !important;
}

.map-town-node.is-completed .level-rect-word {
	color: #231409 !important;
	text-shadow: none !important;
}

.map-town-node.is-locked .level-rect-word {
	color: #473a2f !important;
	font-size: 12px !important;
}

.map-town-node .level-rect-sub {
	font-size: 8px !important;
	font-weight: 800 !important;
	letter-spacing: 0.6px !important;
	color: #92400e !important;
	background: rgba(146, 64, 14, 0.12) !important;
	padding: 1px 6px !important;
	border-radius: 999px !important;
	margin-top: 2px !important;
}

.map-town-node.is-unlocked .level-rect-sub {
	background: rgba(146, 64, 14, 0.14) !important;
	color: #92400e !important;
}

.map-town-node.is-completed .level-rect-sub {
	background: rgba(146, 64, 14, 0.12) !important;
	color: #92400e !important;
}

.map-town-node.is-locked .level-rect-sub {
	background: rgba(0, 0, 0, 0.28) !important;
	color: #cbd5e1 !important;
}

/* Conductor Cap Badge perched on Traveler Avatar */
.traveler-cap-badge {
	position: absolute;
	top: -11px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 6;
	pointer-events: none;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

/* ==========================================================================
   TRAVELING PLAYER AVATAR PIN ON DESTINATIONS MAP
   ========================================================================== */
.map-traveler-pin-wrap {
	position: relative;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 3px solid #231409;
	background: linear-gradient(180deg, #fef08a 0%, #f59e0b 100%);
	box-shadow:
		0 0 0 2.5px #fde68a,
		0 4px 0 #231409,
		0 7px 14px rgba(0, 0, 0, 0.45);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}

.map-traveler-avatar-img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.map-traveler-you-tag {
	position: absolute;
	bottom: -9px;
	left: 50%;
	transform: translateX(-50%);
	background: #231409;
	color: #fde68a;
	border: 1.5px solid #fde68a;
	border-radius: 999px;
	padding: 0 6px;
	font-size: 7.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	line-height: 1.35;
	white-space: nowrap;
}

.map-traveler-walker {
	position: absolute;
	z-index: 25;
	pointer-events: none;
	transition: left 0.68s cubic-bezier(0.22, 1, 0.36, 1), top 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   IN-GAME HUD BUTTONS — HAND-DRAWN CARTOON STYLE (SHUFFLE, HINT, RECALL,
   +10 KEYS, SETTINGS GEAR, GIVE UP)
   ========================================================================== */
#hud-bottom .hud-action-btn {
	height: 46px !important;
	border-radius: 14px !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.34),
		0 6px 14px rgba(0, 0, 0, 0.36) !important;
	font-family: 'Alice', 'Georgia', serif !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
}

#hud-bottom .hud-action-btn:active {
	transform: translateY(2px) !important;
	box-shadow:
		0 2px 0 #231409,
		inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

#hud-bottom .hud-action-btn.btn-shuffle {
	background: linear-gradient(180deg, #5689ec 0%, #2f60c6 58%, #1f449b 100%) !important;
	color: #ffffff !important;
}

#hud-bottom .hud-action-btn.btn-shuffle .hud-btn-label {
	color: #ffffff !important;
	font-weight: 900 !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
}

#hud-bottom .hud-action-btn.btn-shuffle .hud-btn-svg {
	stroke: #ffffff !important;
	filter: drop-shadow(0 1px 0 rgba(35, 20, 9, 0.6));
}

#hud-bottom .hud-action-btn.btn-hint {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 60%, #d99116 100%) !important;
	color: #231409 !important;
}

#hud-bottom .hud-action-btn.btn-hint .hud-btn-label {
	color: #231409 !important;
	font-weight: 900 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

#hud-bottom .hud-action-btn.btn-hint .hud-btn-svg {
	stroke: #231409 !important;
}

#hud-bottom .hud-action-btn.btn-hint .hud-key-badge {
	background: #231409 !important;
	border: 1.5px solid #fef08a !important;
	color: #fde68a !important;
	font-weight: 900 !important;
}

#hud-bottom .hud-action-btn.btn-recall {
	background: linear-gradient(180deg, #64748b 0%, #475569 58%, #334155 100%) !important;
	color: #ffffff !important;
}

#hud-bottom .hud-action-btn.btn-recall .hud-btn-label {
	color: #ffffff !important;
	font-weight: 900 !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
}

#hud-bottom .hud-action-btn.btn-recall .hud-btn-svg {
	stroke: #ffffff !important;
	filter: drop-shadow(0 1px 0 rgba(35, 20, 9, 0.6));
}

#hud-bottom .btn-recharge-keys {
	height: 46px !important;
	border-radius: 14px !important;
	background: linear-gradient(180deg, #4ade80 0%, #16a34a 58%, #15803d 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.34),
		0 6px 14px rgba(0, 0, 0, 0.36) !important;
	font-weight: 900 !important;
}

#hud-header .hud-gear-btn {
	background: linear-gradient(180deg, #fffbeb 0%, #fde68a 60%, #e5a92c 100%) !important;
	color: #231409 !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 3.5px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.45),
		0 5px 12px rgba(0, 0, 0, 0.35) !important;
}

#hud-header .hud-gear-btn .hud-gear-svg {
	stroke: #231409 !important;
}

#hud-header .hud-challenge-giveup-btn {
	background: linear-gradient(180deg, #f87171 0%, #dc2626 58%, #b91c1c 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1.5px 0 rgba(35, 20, 9, 0.7) !important;
	border: 2.5px solid #231409 !important;
	box-shadow:
		0 3.5px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.3) !important;
}

/* ==========================================================================
   REORGANIZED IN-GAME BOTTOM HUD (ZERO EDGE BLEED + +10 KEYS ABOVE HINT)
   ========================================================================== */
#hud-bottom {
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	width: calc(100vw - 20px) !important;
	max-width: 372px !important;
	padding: 0 !important;
	gap: 8px !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

#hud-bottom > .hud-action-btn,
#hud-bottom > .hud-hint-stack {
	flex: 1 1 0 !important;
	min-width: 0 !important;
	max-width: 120px !important;
}

.hud-hint-stack {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}

.hud-hint-stack > .hud-action-btn.btn-hint {
	width: 100% !important;
	max-width: none !important;
	flex: 1 1 auto !important;
}

#hud-bottom .hud-action-btn {
	padding: 0 8px !important;
	gap: 5px !important;
}

#hud-bottom .hud-btn-label {
	font-size: 10.5px !important;
	letter-spacing: 0.5px !important;
}

/* +10 KEYS Ad Button Floats Cleanly ABOVE HINT ONLY When Keys < 3 */
.hud-hint-stack > #btn-recharge-keys:not(.visible) {
	display: none !important;
}

.hud-hint-stack > #btn-recharge-keys.visible {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
}

.hud-hint-stack > #btn-recharge-keys {
	position: absolute !important;
	bottom: calc(100% + 10px) !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: max-content !important;
	min-width: 110px !important;
	max-width: 150px !important;
	height: 36px !important;
	padding: 0 11px !important;
	font-size: 11px !important;
	border-radius: 999px !important;
	white-space: nowrap !important;
	z-index: 25 !important;
}

.hud-hint-stack > #btn-recharge-keys::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-top: 7px solid #231409;
}

.hud-hint-stack > #btn-recharge-keys:active {
	transform: translateX(-50%) translateY(2px) !important;
}

/* Hopping Travel Animation When Avatar Moves Between Stops */
.map-traveler-walker.is-hopping .map-traveler-pin-wrap {
	animation: travelerWalkHop 0.36s ease-in-out 2;
}

@keyframes travelerWalkHop {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-16px) scale(1.1); }
}

/* ==========================================================================
   SOLO PLAY CELEBRATORY TRAVEL POSTCARD PLAQUE + DRAWN POST-WIN BUTTONS
   ========================================================================== */
.solo-win-travel-card {
	position: fixed;
	left: 50%;
	bottom: calc(max(24px, env(safe-area-inset-bottom)) + 126px);
	transform: translateX(-50%) translateY(24px) scale(0.92);
	width: calc(100vw - 32px);
	max-width: 344px;
	background: linear-gradient(170deg, #faf5e6 0%, #f1e6c9 100%);
	border: 2.5px solid #231409;
	border-radius: 16px;
	box-shadow: 0 5px 0 #231409, 0 10px 24px rgba(0, 0, 0, 0.42);
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	z-index: 105;
	transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.solo-win-travel-card.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0) scale(1);
	pointer-events: auto;
}

.solo-win-airmail-top {
	height: 7px;
	width: 100%;
	background: repeating-linear-gradient(
		-45deg,
		#dc2626 0px,
		#dc2626 9px,
		#faf5e6 9px,
		#faf5e6 14px,
		#2563eb 14px,
		#2563eb 23px,
		#faf5e6 23px,
		#faf5e6 28px
	);
	border-bottom: 2px solid #231409;
}

.solo-win-travel-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 9px;
	padding: 9px 11px;
}

.solo-win-stamp-badge {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 10px;
	background: rgba(74, 222, 128, 0.2);
	border: 2px solid #231409;
	display: flex;
	align-items: center;
	justify-content: center;
}

.solo-win-travel-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	text-align: left;
	line-height: 1.2;
}

.solo-win-kicker {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.5px;
	color: #231409;
	text-transform: uppercase;
}

.solo-win-progress {
	font-size: 9.5px;
	font-weight: 800;
	color: #1e3a8a;
	letter-spacing: 0.4px;
}

.solo-win-wpm-pill {
	flex-shrink: 0;
	background: #231409;
	color: #fde68a;
	border: 1.5px solid #f59e0b;
	border-radius: 999px;
	padding: 4px 9px;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.4px;
}

/* Upgraded Hand-Drawn Solo Post-Win Buttons */
#btn-floating-next.tactile-next-btn {
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 58%, #d99116 100%) !important;
	color: #231409 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 16px !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.42),
		0 8px 18px rgba(0, 0, 0, 0.4) !important;
}

#btn-floating-next.tactile-next-btn .next-label {
	color: #231409 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
	font-weight: 900 !important;
}

#post-win-subactions .post-win-replay-btn {
	background: linear-gradient(180deg, #475569 0%, #334155 60%, #1e293b 100%) !important;
	color: #ffffff !important;
}

#post-win-subactions .post-win-map-btn {
	background: linear-gradient(180deg, #34d399 0%, #10b981 58%, #047857 100%) !important;
	color: #ffffff !important;
	text-shadow: 0 1px 0 rgba(35, 20, 9, 0.65) !important;
}

/* ==========================================================================
   GIFT BOX REWARD REVEAL — HIGH-POMP SUNBURST, CONFETTI & COLLECTOR STAGE
   ========================================================================== */
#gift-box-modal .cubby-reward-card.gift-reveal-stage {
	position: relative !important;
	background: radial-gradient(circle at 50% 34%, #52290f 0%, #2b1307 52%, #120602 100%) !important;
	justify-content: center !important;
	align-items: center !important;
	overflow: hidden !important;
}

/* Spinning Golden Sunburst Rays (Oversized 240vmax — Never Clips When Spinning!) */
#gift-box-modal .cubby-reward-card > .gift-sunburst-rays,
.gift-sunburst-rays {
	position: absolute !important;
	top: 42% !important;
	left: 50% !important;
	width: 240vmax !important;
	height: 240vmax !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	transform: translate(-50%, -50%);
	background: repeating-conic-gradient(
		from 0deg,
		rgba(250, 204, 21, 0.20) 0deg 12deg,
		rgba(250, 204, 21, 0.0) 12deg 24deg
	);
	mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 42%, transparent 78%);
	-webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.55) 42%, transparent 78%);
	pointer-events: none;
	z-index: 0;
	animation: giftSunburstSpin 18s linear infinite;
}

@keyframes giftSunburstSpin {
	from { transform: translate(-50%, -50%) rotate(0deg); }
	to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Confetti Explosion Layer */
.gift-confetti-burst {
	position: absolute;
	top: 38%;
	left: 50%;
	width: 0;
	height: 0;
	pointer-events: none;
	z-index: 4;
}

.gift-confetti-piece {
	position: absolute;
	top: 0;
	left: 0;
	width: 10px;
	height: 10px;
	border-radius: 2.5px;
	border: 1.5px solid #231409;
	opacity: 0;
	animation: giftConfettiPop 1.35s cubic-bezier(0.16, 0.88, 0.32, 1) forwards;
}

@keyframes giftConfettiPop {
	0%   { transform: translate(0, 0) scale(0.3) rotate(0deg); opacity: 1; }
	65%  { opacity: 1; }
	100% { transform: translate(var(--dx), var(--dy)) scale(1.05) rotate(var(--rot)); opacity: 0; }
}

.gift-reveal-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 356px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 12px 10px;
	box-sizing: border-box;
}

/* Popping Gift Box Crest */
.gift-crest-wrap {
	animation: giftStagePop 0.55s cubic-bezier(0.18, 1.35, 0.32, 1) both;
}

.gift-box-crest-svg {
	display: block;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px rgba(250, 204, 21, 0.45));
}

.gift-lid-group {
	transform-origin: 46px 32px;
	animation: giftLidPop 1.8s ease-in-out infinite;
}

@keyframes giftLidPop {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-4px) rotate(-4deg); }
}

.gift-sparkle {
	animation: giftSparklePulse 1.4s ease-in-out infinite alternate;
}
.gift-sparkle.s2 { animation-delay: 0.4s; }
.gift-sparkle.s3 { animation-delay: 0.8s; }

@keyframes giftSparklePulse {
	0%   { opacity: 0.55; transform: scale(0.88); }
	100% { opacity: 1; transform: scale(1.12); }
}

.gift-ribbon-kicker {
	background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
	color: #fffbeb;
	border: 2px solid #231409;
	box-shadow: 0 3px 0 #231409;
	border-radius: 999px;
	padding: 3px 14px;
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 1.4px;
	text-transform: uppercase;
}

#gift-box-modal .gift-reveal-title {
	margin: 0 !important;
	font-size: 26px !important;
	font-weight: 900 !important;
	letter-spacing: 1.2px !important;
	color: #fef08a !important;
	text-shadow: 0 3px 0 #231409, 0 0 22px rgba(250, 204, 21, 0.65) !important;
}

/* Collector Spotlight Showcase Pedestal */
.gift-spotlight-frame {
	position: relative;
	padding: 10px 14px;
	border-radius: 20px;
	background: linear-gradient(180deg, rgba(250, 204, 21, 0.22) 0%, rgba(217, 119, 6, 0.12) 100%);
	border: 3px solid #facc15;
	box-shadow:
		0 0 0 3px #231409,
		0 8px 0 #231409,
		0 0 36px rgba(250, 204, 21, 0.45);
	overflow: hidden;
	animation: giftStagePop 0.6s 0.08s cubic-bezier(0.18, 1.32, 0.32, 1) both;
}

.gift-spotlight-frame::after {
	content: '';
	position: absolute;
	top: -20%;
	left: -60%;
	width: 45%;
	height: 150%;
	background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
	transform: skewX(-18deg);
	animation: giftShineSweep 2.6s ease-in-out infinite;
	pointer-events: none;
}

@keyframes giftShineSweep {
	0%   { left: -65%; }
	55%, 100% { left: 135%; }
}

@keyframes giftStagePop {
	0%   { opacity: 0; transform: scale(0.72) translateY(18px); }
	100% { opacity: 1; transform: scale(1) translateY(0); }
}

#gift-box-modal .reward-cubby-stage {
	transform: scale(1.12);
	margin: 4px 0 !important;
}

/* Embossed Collector Name Plaque */
.gift-name-plaque {
	background: linear-gradient(170deg, #faf5e6 0%, #f1e6c9 100%);
	border: 2.5px solid #231409;
	border-radius: 14px;
	padding: 7px 20px;
	box-shadow: 0 4px 0 #231409;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
}

.gift-rarity-tag {
	font-size: 8.5px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #b45309;
	text-transform: uppercase;
}

#gift-box-modal .reward-name {
	margin: 0 !important;
	color: #231409 !important;
	font-size: 18px !important;
	font-weight: 900 !important;
	letter-spacing: 0.9px !important;
	text-shadow: none !important;
}

/* Action Buttons */
.gift-reveal-actions {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 6px;
}

#gift-box-modal .gift-primary-cta {
	position: relative;
	overflow: hidden;
	width: 100% !important;
	min-height: 52px !important;
	border-radius: 15px !important;
	background: linear-gradient(180deg, #fde68a 0%, #f5b938 56%, #d99116 100%) !important;
	color: #231409 !important;
	font-size: 15px !important;
	font-weight: 900 !important;
	letter-spacing: 0.9px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 9px !important;
	box-shadow:
		0 4px 0 #231409,
		inset 0 2px 0 rgba(255, 255, 255, 0.45),
		0 0 22px rgba(250, 204, 21, 0.45) !important;
}

#gift-box-modal .gift-secondary-cta {
	width: 100% !important;
	min-height: 44px !important;
	border-radius: 14px !important;
	background: linear-gradient(180deg, #475569 0%, #334155 60%, #1e293b 100%) !important;
	color: #f8fafc !important;
	font-size: 13px !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
}

/* ==========================================================================
   ACHIEVEMENTS — TRAVEL EXPLORER STAMP BOOK (COHESIVE WITH PASSPORT)
   ========================================================================== */
#achievements-modal .achievements-card {
	background-color: #0f294a !important;
	background-image:
		radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px),
		radial-gradient(rgba(3, 8, 22, 0.24) 1px, transparent 1.2px),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.016) 0px, rgba(255, 255, 255, 0.016) 2px, transparent 2px, transparent 6px),
		radial-gradient(circle at 50% 10%, #1d4a7a 0%, #102d52 54%, #08182e 100%) !important;
	background-size: 6px 6px, 6px 6px, 12px 12px, 100% 100% !important;
	background-position: 0 0, 3px 3px, 0 0, 0 0 !important;
}

#achievements-modal .page-tile-header {
	padding-left: 44px !important;
	padding-right: 48px !important;
}

#achievements-modal .achievements-sub-headline {
	color: #fde68a !important;
	font-weight: 900 !important;
	letter-spacing: 0.9px !important;
	text-shadow: none !important;
}

#achievements-modal .achievements-progress-track {
	background: rgba(6, 15, 32, 0.78) !important;
	border: 2px solid #231409 !important;
	border-radius: 999px !important;
	height: 12px !important;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

#achievements-modal .achievements-progress-bar {
	background: linear-gradient(90deg, #f59e0b 0%, #fde047 100%) !important;
	border-radius: 999px !important;
}

/* Color-Coded Hand-Drawn Tabs (Emerald SOLO vs Cobalt VERSUS) */
#achievements-modal .achievements-tabs {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	gap: 8px !important;
}

#achievements-modal .achievement-tab-btn {
	border: 2.5px solid #231409 !important;
	border-radius: 13px !important;
	box-shadow: 0 3.5px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.25) !important;
	font-weight: 900 !important;
	text-shadow: none !important;
}

#achievements-modal #tab-achieve-solo {
	background: linear-gradient(180deg, #1b4d34 0%, #113423 100%) !important;
	color: #d1fae5 !important;
}

#achievements-modal #tab-achieve-solo.active {
	background: linear-gradient(180deg, #34d399 0%, #10b981 58%, #047857 100%) !important;
	color: #ffffff !important;
}

#achievements-modal #tab-achieve-pvp {
	background: linear-gradient(180deg, #1e3a6e 0%, #13264a 100%) !important;
	color: #dbeafe !important;
}

#achievements-modal #tab-achieve-pvp.active {
	background: linear-gradient(180deg, #60a5fa 0%, #2563eb 58%, #1d4ed8 100%) !important;
	color: #ffffff !important;
}

#achievements-modal .tab-icon {
	display: inline-flex;
	align-items: center;
}

#achievements-modal .tab-pill {
	background: #231409 !important;
	color: #fde68a !important;
	border: 1.5px solid rgba(253, 230, 138, 0.5) !important;
	font-weight: 900 !important;
}

/* Parchment Explorer Badge Cards */
#achievements-modal .achievements-list {
	background: rgba(7, 19, 38, 0.62) !important;
	border: 2px dashed rgba(246, 207, 101, 0.32) !important;
	border-radius: 18px !important;
	padding: 10px !important;
	gap: 9px !important;
}

#achievements-modal .achievement-card,
#achievements-modal .achievement-card * {
	text-shadow: none !important;
}

#achievements-modal .achievement-card.unlocked {
	background: linear-gradient(175deg, #faf5e6 0%, #f1e6c9 100%) !important;
	border: 2.5px solid #231409 !important;
	border-radius: 15px !important;
	box-shadow: 0 4px 0 #231409, inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

#achievements-modal .achievement-card.locked {
	background: linear-gradient(175deg, rgba(241, 231, 204, 0.14) 0%, rgba(15, 34, 64, 0.65) 100%) !important;
	border: 2px dashed rgba(246, 207, 101, 0.32) !important;
	border-radius: 15px !important;
	box-shadow: none !important;
}

#achievements-modal .achievement-icon-box {
	background: #fffdf6 !important;
	border: 2.5px solid #231409 !important;
	border-radius: 13px !important;
	box-shadow: 0 2.5px 0 #231409 !important;
}

#achievements-modal .achievement-card.locked .achievement-icon-box {
	background: rgba(15, 23, 42, 0.75) !important;
	border-color: rgba(148, 163, 184, 0.4) !important;
	box-shadow: none !important;
}

#achievements-modal .achievement-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#achievements-modal .achieve-duck-img {
	display: block;
	object-fit: contain;
}

#achievements-modal .achievement-card.unlocked .achievement-title {
	color: #1a120b !important;
	font-weight: 900 !important;
}

#achievements-modal .achievement-card.unlocked .achievement-desc {
	color: #4b3d2d !important;
	font-weight: 600 !important;
}

#achievements-modal .achievement-card.locked .achievement-title {
	color: #e2e8f0 !important;
}

#achievements-modal .achievement-card.locked .achievement-desc {
	color: #94a3b8 !important;
}

/* Vintage Inked STAMPED Seal on Unlocked Achievements */
#achievements-modal .achievement-status-pill.unlocked {
	background: rgba(185, 28, 28, 0.1) !important;
	color: #b91c1c !important;
	border: 2px double #b91c1c !important;
	border-radius: 8px !important;
	padding: 4px 8px !important;
	font-size: 10px !important;
	font-weight: 900 !important;
	letter-spacing: 0.8px !important;
	box-shadow: none !important;
	transform: rotate(-4deg);
}

#achievements-modal .achievement-status-pill.locked {
	background: rgba(15, 23, 42, 0.72) !important;
	color: #cbd5e1 !important;
	border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
	font-weight: 800 !important;
}

/* ==========================================================================
   SETTINGS MODAL — 30% TRANSPARENT OUTER BACKDROP + FULL SCENE PAUSE
   ========================================================================== */
#theme-modal,
#theme-modal.show {
	background: transparent !important;
}

#theme-modal .theme-card.pause-menu-card {
	background: rgba(10, 6, 4, 0.30) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* Freeze underlying CSS animations while Settings is open */
body.wc-settings-paused #title-screen *,
body.wc-settings-paused #level-select-modal *,
body.wc-settings-paused #hud-header *,
body.wc-settings-paused #hud-bottom *,
body.wc-settings-paused #solo-win-travel-card * {
	animation-play-state: paused !important;
}














/* ==========================================================================
   EXOTIC LOCATIONS PVP & VIRTUAL CASH ECONOMY (8 Ball Pool Inspired)
   ========================================================================== */

/* --- 1. Prestige Avatar Circle Borders (Highest Location Won) --- */
@keyframes avatarVegasPulse {
	0%, 100% { box-shadow: 0 0 0 2.5px #231409, 0 0 12px rgba(236, 72, 153, 0.85), 0 0 20px rgba(6, 182, 212, 0.55); }
	50%      { box-shadow: 0 0 0 2.5px #231409, 0 0 16px rgba(6, 182, 212, 0.95), 0 0 24px rgba(236, 72, 153, 0.70); }
}

@keyframes avatarMonacoPrism {
	0%   { box-shadow: 0 0 0 2.5px #231409, 0 0 14px rgba(56, 189, 248, 0.95), 0 0 26px rgba(250, 204, 21, 0.65); }
	50%  { box-shadow: 0 0 0 2.5px #231409, 0 0 18px rgba(244, 63, 94, 0.90), 0 0 28px rgba(224, 242, 254, 0.90); }
	100% { box-shadow: 0 0 0 2.5px #231409, 0 0 14px rgba(56, 189, 248, 0.95), 0 0 26px rgba(250, 204, 21, 0.65); }
}

/* Pronounced, Unmistakable Jeweled Avatar Prestige Borders (Visible Everywhere!) */
.avatar-tier-brazil,
.avatar-tier-vegas,
.avatar-tier-cairo,
.avatar-tier-paris,
.avatar-tier-monaco {
	position: relative !important;
	padding: 3.5px !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

.avatar-tier-brazil > img,
.avatar-tier-vegas > img,
.avatar-tier-cairo > img,
.avatar-tier-paris > img,
.avatar-tier-monaco > img,
.avatar-tier-brazil > .vs-hud-avatar-clip,
.avatar-tier-vegas > .vs-hud-avatar-clip,
.avatar-tier-cairo > .vs-hud-avatar-clip,
.avatar-tier-paris > .vs-hud-avatar-clip,
.avatar-tier-monaco > .vs-hud-avatar-clip {
	border-radius: 50% !important;
	overflow: hidden !important;
	width: 100% !important;
	height: 100% !important;
	display: block !important;
	box-shadow: inset 0 0 0 1.5px rgba(15, 23, 42, 0.85) !important;
}

.avatar-tier-brazil {
	border: 2.5px solid #231409 !important;
	background: conic-gradient(from 0deg, #10b981, #fde047, #22c55e, #facc15, #10b981) !important;
	box-shadow: 0 0 0 2.5px #10b981, 0 0 16px rgba(16, 185, 129, 0.85) !important;
}

.avatar-tier-vegas {
	border: 2.5px solid #231409 !important;
	background: conic-gradient(from 45deg, #ec4899, #22d3ee, #a855f7, #fde047, #ec4899) !important;
	box-shadow: 0 0 0 2.5px #f472b6, 0 0 18px rgba(236, 72, 153, 0.90) !important;
	animation: avatarVegasPulse 2.2s ease-in-out infinite !important;
}

.avatar-tier-cairo {
	border: 2.5px solid #231409 !important;
	background: conic-gradient(from 0deg, #fbbf24, #1d4ed8, #fef08a, #b45309, #1d4ed8, #fbbf24) !important;
	box-shadow: 0 0 0 2.5px #f59e0b, 0 0 18px rgba(245, 158, 11, 0.92), 0 0 26px rgba(37, 99, 235, 0.45) !important;
}

.avatar-tier-paris {
	border: 2.5px solid #231409 !important;
	background: conic-gradient(from 30deg, #fda4af, #fde68a, #f472b6, #fff1f2, #c084fc, #fda4af) !important;
	box-shadow: 0 0 0 2.5px #fda4af, 0 0 18px rgba(244, 114, 182, 0.90), 0 0 26px rgba(253, 230, 138, 0.65) !important;
}

.avatar-tier-monaco {
	border: 3px solid #231409 !important;
	background: conic-gradient(from 0deg, #ffffff, #38bdf8, #facc15, #f43f5e, #e0f2fe, #38bdf8, #ffffff) !important;
	box-shadow: 0 0 0 3px #38bdf8, 0 0 22px rgba(56, 189, 248, 0.95), 0 0 30px rgba(250, 204, 21, 0.75) !important;
	animation: avatarMonacoPrism 2.6s linear infinite !important;
}

/* Integrated Bottom Arena Conquest Crest Pip on Large Avatar Rings (Profile, Title, Results) */
#title-avatar-ring[class*="avatar-tier-"]::after,
#profile-avatar-ring[class*="avatar-tier-"]::after,
.vs-res-ring[class*="avatar-tier-"]::after {
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	padding: 1.5px 7px;
	border-radius: 3px;
	border: 1.5px solid #231409;
	font-size: 8.5px;
	font-weight: 900;
	letter-spacing: 0.9px;
	line-height: 1.1;
	white-space: nowrap;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
	pointer-events: none;
	z-index: 5;
}

#title-avatar-ring.avatar-tier-brazil::after,
#profile-avatar-ring.avatar-tier-brazil::after,
.vs-res-ring.avatar-tier-brazil::after { content: 'RIO'; background: linear-gradient(180deg, #22c55e, #15803d); color: #fef08a; }

#title-avatar-ring.avatar-tier-vegas::after,
#profile-avatar-ring.avatar-tier-vegas::after,
.vs-res-ring.avatar-tier-vegas::after { content: 'VEGAS'; background: linear-gradient(180deg, #ec4899, #9d174d); color: #fef08a; }

#title-avatar-ring.avatar-tier-cairo::after,
#profile-avatar-ring.avatar-tier-cairo::after,
.vs-res-ring.avatar-tier-cairo::after { content: 'CAIRO'; background: linear-gradient(180deg, #f59e0b, #b45309); color: #fffbeb; }

#title-avatar-ring.avatar-tier-paris::after,
#profile-avatar-ring.avatar-tier-paris::after,
.vs-res-ring.avatar-tier-paris::after { content: 'PARIS'; background: linear-gradient(180deg, #f472b6, #7e22ce); color: #fff1f2; }

#title-avatar-ring.avatar-tier-monaco::after,
#profile-avatar-ring.avatar-tier-monaco::after,
.vs-res-ring.avatar-tier-monaco::after { content: 'MONACO'; background: linear-gradient(180deg, #0284c7, #be123c); color: #fef08a; }

/* --- 2. Global Virtual Cash Wallet Pill --- */
.title-wallet-row {
	display: flex;
	justify-content: center;
	margin: 4px 0 6px;
}

.cash-wallet-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px 5px 12px;
	border-radius: 999px;
	background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
	border: 2.5px solid #231409;
	box-shadow: 0 3px 0 #231409, inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
	color: #fef9c3;
	font-family: 'Fredoka', sans-serif;
	font-weight: 800;
	font-size: 14px;
	cursor: pointer;
	transition: transform 0.14s ease, filter 0.14s ease;
}

.cash-wallet-pill:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #231409;
}

.cash-wallet-icon {
	font-size: 15px;
	line-height: 1;
}

.cash-wallet-amount {
	letter-spacing: 0.3px;
	text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.45);
}

.cash-wallet-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #facc15;
	color: #231409;
	border: 1.8px solid #231409;
	font-weight: 900;
	font-size: 14px;
	line-height: 1;
}

.cash-wallet-dot {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #ef4444;
	border: 2px solid #fff;
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
}

.vs-lobby-wallet-pill {
	margin-top: 6px;
	font-size: 13px;
	padding: 4px 9px 4px 11px;
}

.hud-player-stat.stat-cash {
	margin-top: 2px;
	text-align: center;
	font-size: 9.5px;
	font-weight: 800;
	color: #86efac;
	line-height: 1.05;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

/* --- 3. VS Live HUD Location & Pot Pill --- */
.vs-hud-center-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.vs-hud-location-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.82);
	border: 1.5px solid rgba(250, 204, 21, 0.72);
	color: #fef08a;
	font-family: 'Fredoka', sans-serif;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.4px;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* --- 4. Full-Screen Immersive World Tour Destination Catalog --- */
#vs-lobby-modal {
	padding: 0 !important;
	overflow: hidden !important;
}

#vs-lobby-modal .vs-lobby-card.vs-catalog-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100dvh !important;
	max-width: 100vw !important;
	max-height: 100dvh !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
	background: #070d1a !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	transform: none !important;
}

#vs-lobby-modal .vs-lobby-card.vs-catalog-fullscreen > * {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.vs-catalog-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.vs-catalog-backdrop-img {
	position: absolute;
	inset: -20px;
	background-size: cover;
	background-position: center;
	filter: blur(8px) saturate(1.28) brightness(0.76);
	transform: scale(1.06) translateZ(0);
	transition: background-image 0.35s ease;
}

.vs-catalog-backdrop-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 14, 24, 0.42) 0%, rgba(10, 14, 24, 0.16) 42%, rgba(10, 14, 24, 0.52) 100%);
}

#vs-lobby-modal .vs-lobby-cabinet.vs-catalog-shell {
	position: relative;
	z-index: 2;
	width: 100% !important;
	max-width: 100% !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	display: flex !important;
	flex-direction: column !important;
	overflow: hidden !important;
}

/* Clean Portrait Top Bar with Equipped Player Tiles Spelling DESTINATIONS */
.vs-catalog-topbar {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	row-gap: 6px;
	column-gap: 8px;
	padding: max(10px, calc(env(safe-area-inset-top, 0px) + 6px)) 14px 4px;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	box-sizing: border-box;
}

.vs-destinations-tile-title {
	flex: 0 0 100%;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
}

.vs-destinations-tile-title .custom-creator-word {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.vs-destinations-tile-title .creator-header-tile {
	width: clamp(24px, 7.1vw, 31px) !important;
	height: clamp(24px, 7.1vw, 31px) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.58));
}

.vs-destinations-tile-title .creator-tile-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	display: block;
}

.vs-catalog-back-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2.5px solid #d4a359;
	background: linear-gradient(180deg, #4b2a17 0%, #2b160b 100%);
	color: #fef08a;
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 3px 0 #140803, 0 6px 14px rgba(0, 0, 0, 0.45);
}

.vs-catalog-back-btn:active {
	transform: translateY(2px);
}

.vs-catalog-title-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
	flex: 1;
}

.vs-catalog-kicker {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.4px;
	color: #fde047;
	text-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.75);
}

.vs-catalog-title {
	margin: 0;
	font-size: clamp(17px, 4.8vw, 22px);
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffffff;
	line-height: 1.05;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.vs-lobby-wallet-pill {
	margin-top: 0 !important;
	flex-shrink: 0;
	font-size: 15px !important;
	padding: 6px 10px 6px 12px !important;
}

/* Full-Bleed Portrait Catalog Body */
#vs-lobby-modal .vs-lobby-felt.vs-catalog-body {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
}

#vs-lobby-modal .vs-lobby-step.vs-catalog-step-select {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	width: 100% !important;
	height: 100% !important;
	overflow: hidden !important;
}

#vs-lobby-modal .vs-lobby-step.vs-catalog-step-select[style*="display: none"] {
	display: none !important;
}

/* Portrait Centerpiece Destination Stage (Fills Full Remaining Height — Zero Dead Space) */
.vs-catalog-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: stretch;
	width: 100%;
	padding: 6px 0 4px;
	box-sizing: border-box;
}

.vs-catalog-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 34px;
	height: 64px;
	border-radius: 10px;
	border: 1.5px solid rgba(255, 255, 255, 0.18);
	background: rgba(15, 23, 42, 0.12);
	color: rgba(255, 255, 255, 0.72);
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: none;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
	transition: opacity 0.2s ease, background 0.18s ease, transform 0.12s ease;
}

.vs-catalog-nav-arrow:active:not(:disabled) {
	background: rgba(15, 23, 42, 0.34);
	transform: translateY(-50%) scale(0.95);
}

.vs-catalog-nav-arrow.nav-prev { left: 6px; }
.vs-catalog-nav-arrow.nav-next { right: 6px; }
.vs-catalog-nav-arrow:disabled { opacity: 0.08; cursor: default; }

.vs-location-carousel {
	display: flex;
	align-items: stretch;
	gap: 14px;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 8px calc(50vw - min(43vw, 186px)) 12px;
	margin: 0;
	box-sizing: border-box;
	scrollbar-width: none;
}

.vs-location-carousel::-webkit-scrollbar {
	display: none;
}

/* Authentic Vintage Travel Polaroid Card (Zero Generic Rounded Rectangles!) */
.vs-loc-card {
	position: relative;
	flex: 0 0 min(86vw, 372px);
	height: 97%;
	min-height: 300px;
	margin: auto 0;
	border-radius: 3px;
	overflow: visible;
	scroll-snap-align: center;
	scroll-snap-stop: always;
	border: 1px solid rgba(255, 255, 255, 0.85);
	padding: 12px 12px 14px;
	box-sizing: border-box;
	text-align: left;
	background:
		radial-gradient(rgba(120, 88, 52, 0.04) 1px, transparent 1.2px),
		linear-gradient(180deg, #fdfbf4 0%, #f6f0e2 68%, #ede4cf 100%);
	background-size: 8px 8px, 100% 100%;
	box-shadow:
		0 16px 34px rgba(0, 0, 0, 0.52),
		0 4px 10px rgba(0, 0, 0, 0.34),
		inset 0 1px 0 rgba(255, 255, 255, 0.95);
	display: flex;
	flex-direction: column;
	opacity: 0.76;
	transform: scale(0.95) rotate(-1.6deg);
	transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.22, 1.2, 0.36, 1), box-shadow 0.25s ease;
}

.vs-loc-card:nth-child(even) {
	transform: scale(0.95) rotate(1.5deg);
}

.vs-loc-card.is-selected {
	opacity: 1;
	transform: scale(1) rotate(-0.35deg);
	box-shadow:
		0 24px 48px rgba(0, 0, 0, 0.68),
		0 6px 14px rgba(0, 0, 0, 0.42),
		inset 0 1px 0 rgba(255, 255, 255, 1);
}

.vs-loc-card.is-unaffordable .vs-loc-poster-art {
	filter: saturate(0.65) brightness(0.84);
}

/* Recessed Photographic Emulsion Print Window Inside Polaroid Frame */
.vs-loc-poster-art {
	position: relative;
	flex: 1 1 auto;
	min-height: 180px;
	overflow: hidden;
	border-radius: 2px;
	border: 1.5px solid rgba(35, 20, 9, 0.26);
	box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
	background: #141c2c;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 12px 14px 12px;
	box-sizing: border-box;
}

.vs-pvp3d-preview-canvas {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	display: block;
	z-index: 1;
	pointer-events: none;
}

/* When Three.js 3D preview is mounted inside the card, hide static JPEG fallback */
.vs-loc-poster-art:has(.vs-pvp3d-preview-canvas) .vs-loc-poster-bg {
	display: none;
}

.vs-loc-poster-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 28%;
	pointer-events: none;
}

.vs-loc-art-vignette {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(180deg, rgba(7, 13, 26, 0.46) 0%, rgba(7, 13, 26, 0.0) 32%, rgba(7, 13, 26, 0.0) 64%, rgba(12, 10, 14, 0.68) 100%);
	pointer-events: none;
}

.vs-loc-top-row {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Flat Editorial Kicker Labels (Read-Only — Zero Pill/Button Styling) */
.vs-loc-badge {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 1.3px;
	color: #fef08a;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}

.loc-brazil .vs-loc-badge { color: #86efac; }
.loc-vegas .vs-loc-badge  { color: #f9a8d4; }
.loc-cairo .vs-loc-badge  { color: #fde047; }
.loc-paris .vs-loc-badge  { color: #fda4af; }
.loc-monaco .vs-loc-badge { color: #7dd3fc; }

.vs-loc-status-pill {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.1px;
	color: rgba(241, 245, 249, 0.94);
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}

.vs-loc-status-pill.is-won {
	color: #86efac;
}

.vs-loc-poster-caption {
	position: relative;
	z-index: 3;
}

.vs-loc-name {
	font-size: 34px;
	font-weight: 900;
	line-height: 1.0;
	letter-spacing: 0.8px;
	color: #ffffff;
	text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
}

.vs-loc-city {
	font-size: 15.5px;
	font-weight: 700;
	color: #fef08a;
	margin-top: 2px;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}

/* Iconic Wide Cream Polaroid Chin (Espresso-Ink Travel Ledger — Zero Button Boxes) */
.vs-loc-info-sheet {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 12px 6px 2px;
	background: transparent;
	color: #231409;
	border-top: none;
}

.vs-loc-ledger-strip {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: center;
}

.vs-loc-ledger-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 2px 4px;
	position: relative;
}

.vs-loc-ledger-col + .vs-loc-ledger-col {
	border-left: 1.5px solid rgba(35, 20, 9, 0.16);
}

.vs-loc-cell-lbl {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #6b4c35;
}

.vs-loc-cell-val {
	font-size: clamp(20px, 5.8vw, 25px);
	font-weight: 900;
	line-height: 1.12;
	margin-top: 2px;
	color: #231409;
}

.vs-loc-ledger-col.col-prize .vs-loc-cell-val {
	color: #b45309;
}

.vs-loc-ledger-col.col-tray .vs-loc-cell-val {
	color: #15803d;
}

.vs-loc-ledger-strip.need-cash .col-entry .vs-loc-cell-val {
	color: #b91c1c;
}

.vs-loc-ledger-divider {
	height: 1px;
	background: linear-gradient(90deg, rgba(35, 20, 9, 0) 0%, rgba(35, 20, 9, 0.20) 50%, rgba(35, 20, 9, 0) 100%);
}

/* Flat Stamped Rules Row on Polaroid Chin */
.vs-loc-rules {
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: 8px;
}

.vs-loc-rule-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: clamp(12px, 3.3vw, 13.5px);
	font-weight: 800;
	white-space: nowrap;
}

.vs-rule-svg {
	flex-shrink: 0;
}

.vs-loc-rule-item.rule-friendly {
	color: #166534;
}

.vs-loc-rule-item.rule-pro {
	color: #9f1239;
}

/* Catalog Dots */
.vs-catalog-dots-row {
	flex: 0 0 auto;
	padding: 4px 0 6px;
}

.vs-location-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
}

.vs-loc-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	border: none;
	background: rgba(255, 255, 255, 0.34);
	padding: 0;
	cursor: pointer;
	transition: width 0.2s ease, background 0.2s ease;
}

.vs-loc-dot.active {
	width: 28px;
	background: #facc15;
}

/* Portrait Bottom Thumb-Friendly Action Dock */
.vs-catalog-dock {
	flex: 0 0 auto;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	padding: 4px 16px max(16px, calc(env(safe-area-inset-bottom, 0px) + 10px));
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vs-catalog-play-btn {
	width: 100%;
	min-height: 56px;
	padding: 14px 18px;
	border-radius: 18px;
	border: 3px solid #231409;
	background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
	box-shadow: 0 5px 0 #1e3a8a, 0 10px 24px rgba(37, 99, 235, 0.45);
	color: #ffffff;
	font-size: 19px;
	font-weight: 900;
	letter-spacing: 0.6px;
	cursor: pointer;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.vs-catalog-play-btn:active {
	transform: translateY(3px);
	box-shadow: 0 2px 0 #1e3a8a;
}

.vs-catalog-play-btn.is-need-cash {
	background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%) !important;
	box-shadow: 0 5px 0 #78350f, 0 10px 24px rgba(217, 119, 6, 0.45) !important;
	color: #231409 !important;
	text-shadow: none !important;
}

.vs-catalog-secondary-row {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 10px;
}

.vs-catalog-sec-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 46px;
	padding: 10px 12px;
	border-radius: 15px;
	border: 2px solid rgba(245, 208, 128, 0.35);
	background: linear-gradient(180deg, rgba(45, 24, 13, 0.90) 0%, rgba(25, 13, 7, 0.94) 100%);
	color: #fef3c7;
	font-size: 14.5px;
	font-weight: 800;
	cursor: pointer;
}

.vs-catalog-sec-btn:active {
	transform: scale(0.97);
}

.vs-sec-free-tag {
	padding: 2px 7px;
	border-radius: 999px;
	background: #16a34a;
	color: #ffffff;
	font-size: 10.5px;
	font-weight: 900;
}

.vs-friend-rule-hint {
	margin: 0;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #e2c7a4;
}

/* Step 2 Searching Stage — Informative, Balanced Full-Height Matchmaking Screen */
#vs-lobby-modal .vs-lobby-step.vs-catalog-step-search {
	--arena-accent: #10b981;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
	gap: 14px;
	padding: 8px 16px max(18px, calc(env(safe-area-inset-bottom, 0px) + 14px));
	max-width: 440px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: 'Fredoka', sans-serif;
}

/* 1. Selected Arena Banner (Destination + Stakes + Rules) */
.vs-search-arena-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 13px 14px;
	border-radius: 20px;
	background:
		linear-gradient(155deg, rgba(15, 23, 42, 0.88) 0%, rgba(11, 16, 30, 0.94) 100%);
	border: 1.5px solid color-mix(in srgb, var(--arena-accent) 48%, rgba(255, 255, 255, 0.16));
	box-shadow:
		0 10px 26px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.12),
		0 0 24px color-mix(in srgb, var(--arena-accent) 16%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.vs-search-arena-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.vs-search-arena-loc {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.vs-search-arena-flag {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	flex-shrink: 0;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.vs-search-arena-titles {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.vs-search-arena-name {
	font-size: 17px;
	font-weight: 900;
	letter-spacing: 0.6px;
	color: #ffffff;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.vs-search-arena-city {
	font-size: 12px;
	font-weight: 600;
	color: #cbd5e1;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 170px;
}

.vs-search-arena-tier {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #ffffff;
	background: color-mix(in srgb, var(--arena-accent) 28%, rgba(15, 23, 42, 0.85));
	border: 1px solid color-mix(in srgb, var(--arena-accent) 72%, #ffffff);
	white-space: nowrap;
	flex-shrink: 0;
}

.vs-search-stakes-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.vs-search-stake-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 7px 6px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.10);
}

.vs-search-stake-cell.is-prize {
	background: linear-gradient(180deg, rgba(245, 158, 11, 0.22) 0%, rgba(180, 83, 9, 0.14) 100%);
	border-color: rgba(251, 191, 36, 0.45);
}

.vs-search-stake-cell.is-bonus {
	background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 95, 70, 0.12) 100%);
	border-color: rgba(52, 211, 153, 0.35);
}

.vs-stake-lbl {
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.7px;
	color: #94a3b8;
	text-transform: uppercase;
}

.vs-stake-val {
	font-size: 14.5px;
	font-weight: 900;
	color: #f8fafc;
	line-height: 1.1;
	white-space: nowrap;
}

.vs-search-stake-cell.is-prize .vs-stake-val {
	color: #fde047;
}

.vs-search-stake-cell.is-bonus .vs-stake-val {
	color: #6ee7b7;
}

.vs-search-rules-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.vs-search-rule-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #e2e8f0;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

/* 2. Head-to-Head Matchup Card */
.vs-matchup-card {
	flex: 0 1 auto;
	margin: auto 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 18px 14px 16px;
	border-radius: 22px;
	background:
		radial-gradient(circle at 22% 45%, rgba(56, 189, 248, 0.16) 0%, transparent 54%),
		radial-gradient(circle at 78% 45%, rgba(248, 113, 113, 0.16) 0%, transparent 54%),
		linear-gradient(180deg, rgba(15, 23, 42, 0.80) 0%, rgba(9, 14, 28, 0.90) 100%);
	border: 1.5px solid rgba(255, 255, 255, 0.16);
	box-shadow:
		0 14px 34px rgba(0, 0, 0, 0.48),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.vs-matchup-kicker {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.3px;
	color: #fde047;
	text-transform: uppercase;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.vs-matchup-subhint {
	font-size: 11.5px;
	font-weight: 600;
	color: #94a3b8;
	text-align: center;
	padding-top: 8px;
	width: 100%;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#vs-step-search .vs-matchup-stage {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 0;
	width: 100%;
}

#vs-step-search .vs-matchup-player {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1 1 0;
	min-width: 0;
}

#vs-step-search .vs-hud-avatar-ring {
	width: 78px;
	height: 78px;
	margin-bottom: 12px;
	overflow: visible;
}

#vs-step-search .vs-hud-wpm {
	position: absolute;
	left: 50%;
	right: auto;
	bottom: -10px;
	transform: translateX(-50%);
	padding: 2px 8px;
	border-radius: 999px;
	background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
	border: 1.5px solid rgba(255, 255, 255, 0.28);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
	font-family: 'Fredoka', sans-serif;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.3px;
	color: #f8fafc;
	white-space: nowrap;
	line-height: 1.15;
	z-index: 4;
}

#vs-step-search .is-p1 .vs-hud-wpm {
	border-color: rgba(56, 189, 248, 0.7);
	color: #bae6fd;
}

#vs-step-search .is-p2 .vs-hud-wpm {
	border-color: rgba(248, 113, 113, 0.65);
	color: #fecaca;
}

#vs-step-search .vs-hud-name {
	margin-top: 2px;
	font-family: 'Fredoka', sans-serif;
	font-size: 14px;
	font-weight: 800;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	padding: 2.5px 12px;
	border-radius: 999px;
	max-width: 124px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

#vs-step-search .vs-tileset-showcase {
	margin-top: 10px;
	gap: 6px;
}

#vs-step-search .vs-showcase-rack {
	padding: 5px 7px;
	border-radius: 10px;
}

#vs-step-search .vs-tileset-name {
	font-family: 'Fredoka', sans-serif;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 10px;
}

/* Center VS Medallion */
#vs-step-search .vs-matchup-emblem {
	flex: 0 0 auto;
	align-self: flex-start;
	margin-top: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#vs-step-search .vs-emblem-ring {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 35% 30%, #fef08a 0%, #f59e0b 52%, #92400e 100%);
	border: 2.5px solid #fef9c3;
	box-shadow:
		0 4px 16px rgba(245, 158, 11, 0.45),
		0 0 0 4px rgba(15, 23, 42, 0.75),
		inset 0 2px 4px rgba(255, 255, 255, 0.55);
	font-family: 'Fredoka', sans-serif;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: -0.5px;
	color: #231409;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

#vs-step-search .vs-emblem-ring .vs-char-v,
#vs-step-search .vs-emblem-ring .vs-char-s {
	font-size: 20px;
	line-height: 1;
	color: #231409;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* 3. Bottom Live Status Pill & Clean Cancel Button */
.vs-search-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.vs-search-status-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 11px 16px;
	border-radius: 16px;
	background: rgba(15, 23, 42, 0.86);
	border: 1.5px solid rgba(255, 255, 255, 0.16);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

.vs-search-status-pill.is-matched {
	background: linear-gradient(180deg, rgba(20, 83, 45, 0.90) 0%, rgba(15, 23, 42, 0.92) 100%);
	border-color: rgba(74, 222, 128, 0.75);
}

.vs-search-radar {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fbbf24;
	box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
	animation: vsRadarPulse 1.4s ease-out infinite;
	flex-shrink: 0;
}

.vs-search-status-pill.is-matched .vs-search-radar {
	background: #4ade80;
	animation: none;
	box-shadow: 0 0 10px rgba(74, 222, 128, 0.9);
}

@keyframes vsRadarPulse {
	0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.75); transform: scale(1); }
	70% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); transform: scale(1.08); }
	100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); transform: scale(1); }
}

#vs-step-search .vs-search-status {
	margin: 0;
	min-height: 0;
	font-family: 'Fredoka', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #f1f5f9;
	text-align: center;
	flex: 1 1 auto;
}

.vs-search-timer {
	font-family: 'Share Tech Mono', monospace;
	font-size: 13px;
	font-weight: 700;
	color: #fde047;
	background: rgba(255, 255, 255, 0.08);
	padding: 2px 8px;
	border-radius: 8px;
	flex-shrink: 0;
}

.vs-search-status-pill.is-matched .vs-search-timer {
	display: none;
}

.vs-search-cancel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 196px;
	padding: 12px 26px;
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(51, 65, 85, 0.85) 0%, rgba(30, 41, 59, 0.92) 100%);
	border: 1.5px solid rgba(248, 113, 113, 0.45);
	color: #fecaca;
	font-family: 'Fredoka', sans-serif;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.7px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}

.vs-search-cancel-btn:hover {
	background: linear-gradient(180deg, rgba(127, 29, 29, 0.82) 0%, rgba(69, 10, 10, 0.92) 100%);
	border-color: rgba(248, 113, 113, 0.85);
	color: #ffffff;
}

.vs-search-cancel-btn:active {
	transform: scale(0.97);
}

.vs-cancel-icon {
	font-size: 13px;
	line-height: 1;
	opacity: 0.9;
}

/* --- 5. VS Results Payout Ledger --- */
.vs-res-economy-ledger {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 10px 0;
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(15, 23, 42, 0.82);
	border: 2px solid #231409;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
	font-family: 'Fredoka', sans-serif;
	color: #f8fafc;
}

.vs-res-economy-ledger.is-profit {
	border-color: #22c55e;
	background: linear-gradient(180deg, rgba(20, 83, 45, 0.88) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.vs-res-economy-ledger.is-loss {
	border-color: #f97316;
	background: linear-gradient(180deg, rgba(124, 45, 18, 0.65) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.vs-eco-rows {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vs-eco-line,
.vs-eco-total-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 700;
}

.vs-eco-total-row {
	padding-top: 6px;
	margin-top: 2px;
	border-top: 1.5px dashed rgba(255, 255, 255, 0.22);
	font-size: 15px;
}

.eco-pos { color: #86efac; }
.eco-neg { color: #fca5a5; }

.vs-eco-cushion {
	font-size: 12px;
	color: #fde68a;
	text-align: center;
	background: rgba(250, 204, 21, 0.14);
	border-radius: 10px;
	padding: 6px 10px;
}

.vs-eco-border-unlock {
	font-size: 12.5px;
	font-weight: 900;
	color: #fef08a;
	text-align: center;
	background: linear-gradient(90deg, #0284c7, #9333ea, #be123c);
	border: 1.5px solid #facc15;
	border-radius: 10px;
	padding: 7px 10px;
}

.vs-eco-friendly-note {
	font-size: 13px;
	font-weight: 700;
	color: #bae6fd;
	text-align: center;
}

/* --- 6. Solo Win Cash Pill --- */
.solo-win-pills-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	flex-shrink: 0;
}

.solo-win-cash-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
	border: 1.8px solid #231409;
	color: #fef9c3;
	font-family: 'Fredoka', sans-serif;
	font-size: 12px;
	font-weight: 900;
	white-space: nowrap;
}

/* --- 7. High-Roller Winnings-First Leaderboard Redesign (Velvet, Brass & Editorial Ledger) --- */
.lb-sort-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	padding: 4px;
	margin: 2px auto 10px;
	max-width: 460px;
	width: calc(100% - 28px);
	box-sizing: border-box;
	background: rgba(12, 6, 3, 0.65);
	border: 1.5px solid rgba(230, 190, 122, 0.35);
	border-radius: 6px;
}

.lb-sort-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 10px;
	border-radius: 4px;
	border: 1.5px solid transparent;
	background: transparent;
	color: #d6c5a3;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.7px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.lb-sort-tab.active {
	background: linear-gradient(180deg, #1f6f43 0%, #14532d 100%);
	border-color: #86efac;
	color: #fef08a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* VIP Velvet & Brass Top-3 Podium */
#leaderboard-modal .leaderboard-podium {
	background:
		radial-gradient(ellipse at 50% 0%, rgba(250, 204, 21, 0.14) 0%, rgba(12, 36, 24, 0.0) 65%),
		linear-gradient(180deg, #132c1f 0%, #0b1c14 100%) !important;
	border: 2px solid rgba(230, 190, 122, 0.55) !important;
	border-radius: 6px !important;
	padding: 16px 8px 12px !important;
	gap: 8px !important;
	align-items: flex-end !important;
}

#leaderboard-modal .podium-slot {
	background: linear-gradient(180deg, #2a180d 0%, #180d07 100%) !important;
	border: 1.5px solid rgba(230, 190, 122, 0.38) !important;
	border-radius: 4px !important;
	clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px);
	padding: 12px 6px 10px !important;
	color: #fef9c3 !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55) !important;
}

#leaderboard-modal .podium-slot.rank-1 {
	background:
		radial-gradient(ellipse at 50% 0%, rgba(250, 204, 21, 0.24) 0%, transparent 65%),
		linear-gradient(180deg, #3b240c 0%, #1c1005 100%) !important;
	border-color: #facc15 !important;
	padding: 16px 6px 12px !important;
	transform: translateY(-6px);
}

#leaderboard-modal .podium-slot.rank-2 {
	background: linear-gradient(180deg, #252b38 0%, #141822 100%) !important;
	border-color: rgba(203, 213, 225, 0.55) !important;
}

#leaderboard-modal .podium-slot.rank-3 {
	background: linear-gradient(180deg, #352014 0%, #1a0f08 100%) !important;
	border-color: rgba(217, 119, 6, 0.55) !important;
}

#leaderboard-modal .podium-name {
	color: #ffffff !important;
	font-size: 13.5px !important;
	font-weight: 800 !important;
	text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.85) !important;
}

#leaderboard-modal .podium-avatar-ring {
	width: 58px !important;
	height: 58px !important;
}

#leaderboard-modal .podium-slot.rank-1 .podium-avatar-ring {
	width: 66px !important;
	height: 66px !important;
}

.podium-winnings-hero {
	display: block;
	margin-top: 4px;
	font-size: 20px;
	font-weight: 900;
	color: #86efac;
	line-height: 1.05;
	letter-spacing: 0.3px;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

#leaderboard-modal .podium-slot.rank-1 .podium-winnings-hero {
	font-size: 24px;
	color: #fef08a;
}

.podium-winnings-hero.is-zero {
	color: rgba(214, 197, 163, 0.52) !important;
	font-size: 16px !important;
}

.podium-sub-wins {
	font-size: 11.5px;
	font-weight: 700;
	color: #d6c5a3;
	margin-top: 3px;
	display: block;
	letter-spacing: 0.3px;
}

/* Pronounced Color-Coded Arena Conquest Crests (Brazil / Vegas / Cairo / Paris / Monaco) */
.lb-arena-crest {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 7px;
	border-radius: 3px;
	border: 1.2px solid rgba(0, 0, 0, 0.65);
	font-size: 9.5px;
	font-weight: 900;
	letter-spacing: 0.9px;
	line-height: 1.15;
	white-space: nowrap;
	margin-top: 3px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.lb-arena-crest.crest-brazil { background: linear-gradient(180deg, #16a34a, #15803d); color: #fef08a; border-color: #86efac; }
.lb-arena-crest.crest-vegas  { background: linear-gradient(180deg, #db2777, #9d174d); color: #fef08a; border-color: #f9a8d4; }
.lb-arena-crest.crest-cairo  { background: linear-gradient(180deg, #d97706, #92400e); color: #fffbeb; border-color: #fde047; }
.lb-arena-crest.crest-paris  { background: linear-gradient(180deg, #9333ea, #6b21a8); color: #ffe4e6; border-color: #fda4af; }
.lb-arena-crest.crest-monaco { background: linear-gradient(180deg, #0284c7, #be123c); color: #fef08a; border-color: #7dd3fc; }

/* Editorial Dark-Walnut & Brass Ledger List (#4+) — ZERO Green Button Pills! */
#leaderboard-modal .leaderboard-list {
	background: linear-gradient(180deg, #24130a 0%, #170b06 100%) !important;
	border: 1.5px solid rgba(230, 190, 122, 0.42) !important;
	border-radius: 6px !important;
	padding: 4px 10px !important;
}

#leaderboard-modal .lb-row.lb-manifest-row {
	background: transparent !important;
	border: none !important;
	border-bottom: 1px solid rgba(230, 190, 122, 0.16) !important;
	border-radius: 0 !important;
	padding: 10px 4px !important;
	box-shadow: none !important;
}

#leaderboard-modal .lb-row.lb-manifest-row:last-child {
	border-bottom: none !important;
}

#leaderboard-modal .lb-row.lb-manifest-row.is-current-user {
	background: rgba(250, 204, 21, 0.10) !important;
	border-radius: 4px !important;
}

#leaderboard-modal .lb-rank-num {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #e6be7a !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	min-width: 30px !important;
	text-align: left !important;
	padding: 0 !important;
}

#leaderboard-modal .lb-row-avatar-ring {
	width: 44px !important;
	height: 44px !important;
}

.lb-row-name-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.lb-row-name-line .lb-arena-crest {
	margin-top: 0;
}

#leaderboard-modal .lb-row-name {
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 800 !important;
}

#leaderboard-modal .lb-manifest-sub {
	color: #cbb694 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	margin-top: 2px;
}

/* Flat Editorial Winnings Readout (NOT a button!) */
.lb-row-winnings {
	display: inline-block;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

.lb-row-winnings.has-winnings {
	color: #86efac;
	text-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.65);
}

.lb-row-winnings.is-zero {
	color: rgba(214, 197, 163, 0.42);
	font-size: 15px;
	font-weight: 700;
}

.lb-badge-winnings {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(21, 128, 61, 0.35);
	border: 1.5px solid #4ade80;
	color: #fef08a;
	font-weight: 900;
	font-size: 13px;
}

/* --- 8. Profile Passport Arena Rank Meta --- */
.passport-arena-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
}

.passport-arena-rank-pill {
	padding: 3px 10px;
	border-radius: 999px;
	background: #1e293b;
	border: 2px solid #facc15;
	color: #fef08a;
	font-family: 'Fredoka', sans-serif;
	font-size: 11.5px;
	font-weight: 800;
}

.passport-arena-cash-pill {
	font-family: 'Fredoka', sans-serif;
	font-size: 12px;
	font-weight: 700;
	color: #166534;
}

/* --- 9. Full-Screen Luxury Stitched Leather Wallet & High-Limit Credit Card Scene --- */
#cash-bankroll-modal {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100dvh !important;
	z-index: 200000 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #1a0d07 !important;
}

#admob-reward-modal {
	z-index: 250000 !important;
}

#admob-reward-modal.show,
#admob-reward-modal.active {
	pointer-events: auto !important;
}

/* Rich Pebbled Italian Espresso Leather Texture */
.bankroll-scene {
	width: 100%;
	height: 100dvh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background-color: #26140b;
	background-image:
		radial-gradient(rgba(255, 220, 175, 0.065) 1.1px, transparent 1.3px),
		radial-gradient(rgba(8, 3, 1, 0.36) 1.1px, transparent 1.3px),
		repeating-linear-gradient(135deg, rgba(255, 215, 160, 0.022) 0px, rgba(255, 215, 160, 0.022) 2px, transparent 2px, transparent 7px),
		radial-gradient(ellipse at 50% 0%, rgba(180, 110, 50, 0.34) 0%, rgba(28, 14, 7, 0) 60%),
		linear-gradient(180deg, #3b2011 0%, #26140a 48%, #150a05 100%);
	background-size: 6px 6px, 6px 6px, 14px 14px, 100% 100%, 100% 100%;
	box-sizing: border-box;
	padding: max(12px, calc(env(safe-area-inset-top, 0px) + 8px)) 12px max(16px, calc(env(safe-area-inset-bottom, 0px) + 10px));
	color: #fef3c7;
}

/* Hand-Stitched Gold Thread Inner Wallet Seam */
.bankroll-leather-stitch {
	width: 100%;
	max-width: 490px;
	min-height: calc(100dvh - 28px);
	margin: 0 auto;
	border: 2.5px dashed rgba(245, 208, 128, 0.42);
	border-radius: 26px;
	padding: 16px 16px 24px;
	box-sizing: border-box;
	box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.58);
}

.bankroll-inner {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.bankroll-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.bankroll-close-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2.5px solid #d4a359;
	background: linear-gradient(180deg, #4b2a17 0%, #2b160b 100%);
	color: #fef08a;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 0 #140803, 0 8px 16px rgba(0, 0, 0, 0.45);
}

.bankroll-close-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #140803;
}

.bankroll-topbar-spacer {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

/* Equipped Player Tile Header: W A L L E T */
.wallet-tile-title {
	flex: 1;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
}

.wallet-tile-title .custom-creator-word {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
}

.wallet-tile-title .creator-header-tile {
	width: clamp(34px, 9.6vw, 44px) !important;
	height: clamp(34px, 9.6vw, 44px) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.58));
}

.wallet-tile-title .creator-tile-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	display: block;
}

/* --- Peeking Banknotes + High-Limit Metal Card Tucked Into Curved Leather Pocket --- */
.wallet-hero-stage {
	position: relative;
	padding-top: 34px;
	padding-bottom: 18px;
}

.wallet-pocket-lip {
	position: relative;
	z-index: 4;
	margin-top: -26px;
	margin-left: -6px;
	margin-right: -6px;
	height: 42px;
	pointer-events: none;
	filter: drop-shadow(0 -6px 10px rgba(0, 0, 0, 0.55));
}

.wallet-pocket-lip-svg {
	width: 100%;
	height: 100%;
	display: block;
}

.wallet-cash-bills {
	position: absolute;
	top: 0;
	left: 16px;
	right: 16px;
	height: 68px;
	pointer-events: none;
}

.wallet-bill {
	position: absolute;
	left: 0;
	right: 0;
	height: 58px;
	border-radius: 12px;
	border: 2.5px solid #231409;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 6px 14px;
	box-sizing: border-box;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.wallet-bill.bill-back {
	top: 0;
	transform: rotate(-2.4deg) translateY(2px);
	background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
	color: #14532d;
}

.wallet-bill.bill-front {
	top: 8px;
	transform: rotate(1.6deg);
	background: linear-gradient(180deg, #86efac 0%, #22c55e 100%);
	color: #14532d;
}

.bill-corner-num {
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.4px;
}

.bill-seal {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #fef08a;
	border: 2px solid #14532d;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 900;
	color: #14532d;
}

/* Obsidian & Gold Metal Credit Card */
.wallet-metal-card {
	position: relative;
	z-index: 2;
	overflow: hidden;
	border-radius: 22px;
	padding: 20px 20px 18px;
	background:
		repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 5px),
		linear-gradient(135deg, #2b241d 0%, #12100e 45%, #241d15 78%, #3c2f1f 100%);
	border: 2.5px solid #e6be7a;
	box-shadow:
		0 14px 32px rgba(0, 0, 0, 0.72),
		0 5px 0 #140803,
		inset 0 1.5px 0 rgba(254, 240, 138, 0.45);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wallet-card-sheen {
	position: absolute;
	inset: 0;
	background: linear-gradient(125deg, rgba(254, 240, 138, 0.14) 0%, rgba(254, 240, 138, 0) 38%, rgba(255, 255, 255, 0.06) 52%, rgba(0, 0, 0, 0) 70%);
	pointer-events: none;
}

.wallet-card-top {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.wallet-card-brand {
	display: flex;
	flex-direction: column;
}

.wallet-card-tier-tag {
	font-size: 18px;
	font-weight: 900;
	letter-spacing: 1.4px;
	color: #fde047;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.wallet-card-unlimited {
	font-size: 11px;
	letter-spacing: 1.1px;
	color: #d6c5a3;
	margin-top: 2px;
}

.wallet-card-chip-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wallet-card-balance-block {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bankroll-bal-label {
	font-size: 12.5px;
	letter-spacing: 1.4px;
	color: #cbd5e1;
}

.bankroll-bal-val {
	font-size: 40px;
	line-height: 1.04;
	color: #86efac;
	text-shadow: 0 3px 0 #052e16, 0 6px 18px rgba(34, 197, 94, 0.4);
}

.wallet-card-footer {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(230, 190, 122, 0.28);
}

.wallet-card-number {
	font-size: clamp(12px, 3.3vw, 15px);
	letter-spacing: 1.2px;
	white-space: nowrap;
	color: #e6be7a;
	text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.8);
}

.wallet-card-winnings {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex-shrink: 0;
}

.bankroll-winnings-lbl {
	font-size: 11px;
	letter-spacing: 1px;
	color: #d6c5a3;
}

.bankroll-winnings-val {
	font-size: 20px;
	color: #fef08a;
	line-height: 1.1;
}

.bankroll-reason-banner {
	padding: 12px 15px;
	border-radius: 14px;
	background: rgba(185, 28, 28, 0.28);
	border: 2px solid #f87171;
	color: #fee2e2;
	font-size: 15px;
	line-height: 1.38;
}

/* Physical Wallet Artifacts (Zero Generic Rounded Rectangles) */
.bankroll-actions-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wallet-artifact {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
}

/* Shared Icon & Typography inside Artifacts */
.wallet-booklet-head,
.ticket-main-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wallet-emblem {
	width: 54px;
	height: 54px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2.5px solid #231409;
	box-shadow: 0 3px 0 #231409;
}

.wallet-emblem.emblem-ticket {
	background: #dcfce7;
	border-radius: 50%;
}

.wallet-emblem.emblem-brass {
	background: linear-gradient(180deg, #572f17 0%, #2a1408 100%);
	border-color: #e6be7a;
	clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);
	box-shadow: none;
}

.wallet-emblem.emblem-sky {
	background: #e0f2fe;
	border-radius: 50%;
}

.wallet-emblem.emblem-red {
	background: #dc2626;
	transform: rotate(-4deg);
	border-radius: 4px;
}

.bankroll-offer-body {
	flex: 1;
	min-width: 0;
}

.wallet-artifact-title {
	font-size: 21px;
	line-height: 1.12;
	font-weight: 900;
}

.wallet-artifact-title.title-ink {
	color: #231409;
}

.wallet-artifact-title.title-gold {
	color: #fef08a;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
}

.wallet-artifact-sub {
	font-size: 14.5px;
	line-height: 1.3;
	margin-top: 3px;
}

.wallet-artifact-sub.sub-ink {
	color: #523520;
}

.wallet-artifact-sub.sub-tan {
	color: #e5caa6;
}

/* 1. Vintage Perforated Cinema Ticket Stub (Watch Cash Video) */
.wallet-ticket-stub {
	padding: 14px 20px 16px;
	background:
		repeating-linear-gradient(90deg, rgba(146, 64, 14, 0.04) 0px, rgba(146, 64, 14, 0.04) 2px, transparent 2px, transparent 10px),
		linear-gradient(180deg, #fffbeb 0%, #f5e6c4 100%);
	border: 2.5px solid #231409;
	border-radius: 3px;
	box-shadow: 0 7px 0 #140803, 0 12px 24px rgba(0, 0, 0, 0.55);
	transform: rotate(-0.6deg);
}

.ticket-notch-left,
.ticket-notch-right {
	position: absolute;
	top: 56%;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #231209;
	border: 2.5px solid #231409;
	transform: translateY(-50%);
	z-index: 2;
}

.ticket-notch-left { left: -13px; }
.ticket-notch-right { right: -13px; }

.ticket-header-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 8px;
	border-bottom: 2px solid #231409;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 1.2px;
	color: #15803d;
}

.ticket-serial-num {
	color: #991b1b;
	letter-spacing: 1.6px;
}

.ticket-perf-line {
	height: 0;
	border-top: 2.5px dashed rgba(35, 20, 9, 0.38);
	margin: 2px -6px;
}

/* 2. Chamfered Brass-Riveted Leather Coin-Stamp Booklet (Daily Cash Stipend) */
.wallet-punch-booklet {
	padding: 18px 18px 18px;
	background-color: #3d2111;
	background-image:
		radial-gradient(rgba(255, 224, 178, 0.06) 1px, transparent 1.2px),
		linear-gradient(180deg, #4f2c17 0%, #2d160a 100%);
	background-size: 6px 6px, 100% 100%;
	clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
	box-shadow: inset 0 0 0 2.5px #9e6238, inset 0 0 24px rgba(0, 0, 0, 0.55);
	filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
}

.brass-rivet {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fef08a 0%, #ca8a04 60%, #713f12 100%);
	border: 1.5px solid #1a0d07;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.rivet-tl { top: 10px; left: 14px; }
.rivet-tr { top: 10px; right: 14px; }
.rivet-bl { bottom: 10px; left: 14px; }
.rivet-br { bottom: 10px; right: 14px; }

/* 3. Chamfered Maritime Emergency Rescue Tag */
.wallet-rescue-plate {
	padding: 16px 18px 16px;
	background: linear-gradient(180deg, #f0f9ff 0%, #dbeafe 100%);
	clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
	box-shadow: inset 0 0 0 2.5px #0284c7;
	filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.55));
}

.rescue-stripe-bar {
	height: 8px;
	margin: -16px -18px 2px;
	background: repeating-linear-gradient(-45deg, #ef4444 0px, #ef4444 10px, #ffffff 10px, #ffffff 20px);
	border-bottom: 2px solid #231409;
}

/* 4. Dog-Eared Vintage Airmail Boarding Pass (Farm in Solo Play) */
.wallet-boarding-pass {
	padding: 0 18px 16px;
	background:
		linear-gradient(180deg, #fdf8ec 0%, #f1e2c5 100%);
	border: 2.5px solid #231409;
	clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
	box-shadow: 0 7px 0 #140803, 0 12px 22px rgba(0, 0, 0, 0.55);
	transform: rotate(0.5deg);
}

.boarding-airmail-strip {
	height: 10px;
	margin: 0 -18px 2px;
	background: repeating-linear-gradient(
		-45deg,
		#dc2626 0px, #dc2626 11px,
		#fdf8ec 11px, #fdf8ec 18px,
		#1d4ed8 18px, #1d4ed8 29px,
		#fdf8ec 29px, #fdf8ec 36px
	);
	border-bottom: 2px solid #231409;
}

.boarding-route-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 4px;
}

.boarding-code {
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 2px;
	color: #991b1b;
}

.boarding-route-line {
	flex: 1;
	height: 0;
	border-top: 2px dotted #78350f;
}

/* Tactile Stamp & Beveled Action Buttons (No Generic Rounded Pills) */
.bankroll-action-btn {
	width: 100%;
	min-height: 48px;
	padding: 11px 16px;
	border: 2.5px solid #231409;
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.32);
	font-size: 18px;
	letter-spacing: 1px;
	color: #ffffff;
	cursor: pointer;
	white-space: nowrap;
	text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.45);
}

.wallet-stamp-btn {
	border-radius: 3px;
	border-style: double;
	border-width: 4px;
}

.wallet-bevel-btn {
	border-radius: 0;
	border: none;
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38), inset 0 -3px 0 rgba(0, 0, 0, 0.35);
}

.bankroll-action-btn:active:not(:disabled) {
	transform: translateY(2px);
}

.bankroll-action-btn:disabled {
	opacity: 0.52;
	cursor: not-allowed;
	filter: grayscale(0.45);
}

.btn-eco-green { background: linear-gradient(180deg, #22c55e 0%, #15803d 100%); }
.btn-eco-amber { background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%); }
.btn-eco-sky   { background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%); }
.btn-eco-red   { background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%); }

/* Minted Circular Coin-Stamp Grid (4-col portrait, Day 7 = Gold Octagon Medallion) */
.bankroll-daily-streak-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	justify-items: center;
	align-items: center;
	margin: 4px 0 2px;
}

.bankroll-day-chip {
	width: 66px;
	height: 66px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: radial-gradient(circle at 35% 30%, #2b150a 0%, #140904 100%);
	border: 2px dashed rgba(230, 190, 122, 0.45);
	box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.7);
	font-size: 12px;
	color: #d6c5a3;
	box-sizing: border-box;
}

.bankroll-day-chip:last-child {
	grid-column: span 2;
	width: 100%;
	height: 58px;
	border-radius: 0;
	clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
	border: none;
	background: linear-gradient(180deg, #4a2a12 0%, #261307 100%);
	box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.7);
}

.bankroll-day-chip .day-amt {
	font-size: 15.5px;
	font-weight: 900;
	color: #fef3c7;
	margin-top: 2px;
}

.bankroll-day-chip.is-done {
	background: radial-gradient(circle at 30% 30%, #4ade80 0%, #15803d 100%);
	border: 2.5px solid #231409;
	color: #dcfce7;
	box-shadow: 0 3px 0 #140803, inset 0 1.5px 0 rgba(255, 255, 255, 0.4);
}

.bankroll-day-chip.is-done .day-amt {
	color: #ffffff;
}

.bankroll-day-chip.is-today {
	background: radial-gradient(circle at 30% 28%, #fef08a 0%, #eab308 65%, #b45309 100%);
	border: 2.5px solid #231409;
	color: #451a03;
	box-shadow: 0 4px 0 #140803, 0 0 14px rgba(250, 204, 21, 0.45);
}

.bankroll-day-chip.is-today .day-amt {
	color: #231409;
}

/* --- Confirm Email Verification Popup (Airmail Passport Verification Slip) --- */
.email-confirm-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 260000 !important;
	background: rgba(10, 6, 3, 0.78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	box-sizing: border-box;
}

.email-confirm-card {
	width: 100%;
	max-width: 360px;
	background: linear-gradient(180deg, #fdf8ec 0%, #f1e2c5 100%);
	border: 3px solid #231409;
	border-radius: 6px;
	box-shadow: 0 10px 0 #140803, 0 22px 48px rgba(0, 0, 0, 0.72);
	overflow: hidden;
	color: #231409;
}

.email-confirm-airmail-top {
	height: 10px;
	background: repeating-linear-gradient(
		-45deg,
		#dc2626 0px, #dc2626 11px,
		#fdf8ec 11px, #fdf8ec 18px,
		#1d4ed8 18px, #1d4ed8 29px,
		#fdf8ec 29px, #fdf8ec 36px
	);
	border-bottom: 2px solid #231409;
}

.email-confirm-body {
	padding: 20px 18px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
}

.email-confirm-icon {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #fef9c3;
	border: 2.5px solid #231409;
	box-shadow: 0 3px 0 #231409;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.email-confirm-title {
	margin: 2px 0 0;
	font-size: 21px;
	font-weight: 900;
	letter-spacing: 0.7px;
	color: #231409;
}

.email-confirm-desc {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.35;
	color: #523520;
}

.email-confirm-input {
	width: 100%;
	padding: 12px 14px;
	box-sizing: border-box;
	border-radius: 4px;
	border: 2.5px solid #231409;
	background: #ffffff;
	color: #231409;
	font-size: 16px;
	font-weight: 700;
	outline: none;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.email-confirm-input:focus {
	border-color: #15803d;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
}

.email-confirm-error {
	width: 100%;
	padding: 8px 10px;
	box-sizing: border-box;
	border-radius: 4px;
	background: #fee2e2;
	border: 1.5px solid #dc2626;
	color: #991b1b;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.3;
}

.email-confirm-actions {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

.email-confirm-btn-primary {
	width: 100%;
	min-height: 48px;
	padding: 11px 16px;
	border: 2.5px solid #231409;
	border-radius: 4px;
	background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
	box-shadow: 0 4px 0 #231409, inset 0 2px 0 rgba(255, 255, 255, 0.35);
	color: #ffffff;
	font-size: 16.5px;
	font-weight: 900;
	letter-spacing: 0.7px;
	cursor: pointer;
	text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.4);
}

.email-confirm-btn-primary:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #231409;
}

.email-confirm-btn-secondary {
	width: 100%;
	min-height: 42px;
	padding: 9px 14px;
	border: 2px solid #78350f;
	border-radius: 4px;
	background: transparent;
	color: #523520;
	font-size: 14.5px;
	font-weight: 800;
	letter-spacing: 0.6px;
	cursor: pointer;
}

.email-confirm-btn-secondary:active {
	background: rgba(120, 53, 15, 0.1);
}

/* --- 8 Ball Pool–Style PVP Match Finish Flying Money FX --- */
.vs-cash-fx-layer {
	position: fixed !important;
	inset: 0 !important;
	z-index: 280000 !important;
	pointer-events: none !important;
	overflow: hidden !important;
}

.vs-cash-fx-sprite {
	position: fixed;
	top: 0;
	left: 0;
	will-change: transform, opacity;
	pointer-events: none;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.52));
}

.vs-hud-avatar-ring.vs-avatar-cash-hit {
	animation: vsAvatarCashPop 0.24s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes vsAvatarCashPop {
	0%   { transform: scale(1); filter: brightness(1); }
	45%  { transform: scale(1.14); filter: brightness(1.32) drop-shadow(0 0 16px rgba(250, 204, 21, 0.85)); }
	100% { transform: scale(1); filter: brightness(1); }
}

.vs-cash-impact-ring {
	position: fixed;
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	pointer-events: none;
	animation: vsCashImpactRipple 0.48s ease-out forwards;
}

.vs-cash-impact-ring.ring-gold {
	border: 3px solid #fde047;
	box-shadow: 0 0 18px rgba(250, 204, 21, 0.85);
}

.vs-cash-impact-ring.ring-green {
	border: 3px solid #4ade80;
	box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
}

@keyframes vsCashImpactRipple {
	0%   { transform: translate(-50%, -50%) scale(0.95); opacity: 0.95; }
	100% { transform: translate(-50%, -50%) scale(1.65); opacity: 0; }
}

.vs-avatar-cash-float {
	position: fixed;
	transform: translate(-50%, -100%) scale(0.85);
	padding: 5px 12px;
	border-radius: 999px;
	border: 2.5px solid #231409;
	font-size: 17px;
	font-weight: 900;
	letter-spacing: 0.5px;
	white-space: nowrap;
	box-shadow: 0 4px 0 #231409, 0 8px 20px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: transform 0.22s cubic-bezier(0.22, 1.35, 0.36, 1), opacity 0.28s ease;
}

.vs-avatar-cash-float.is-win {
	background: linear-gradient(180deg, #4ade80 0%, #15803d 100%);
	color: #fef08a;
	text-shadow: 0 1.5px 0 #14532d;
}

.vs-avatar-cash-float.is-tray {
	background: linear-gradient(180deg, #fef08a 0%, #d97706 100%);
	color: #231409;
}

.vs-avatar-cash-float.is-active {
	opacity: 1;
	transform: translate(-50%, -125%) scale(1.06);
}

.vs-avatar-cash-float.is-fadeout {
	opacity: 0;
	transform: translate(-50%, -165%) scale(1.0);
	transition: transform 0.75s ease-out, opacity 0.65s ease-out;
}

/* Attention Flash on Custom Challenge BRAG Button once a Reaction is Chosen */
.custom-player-brag-btn.is-ready-flash {
	animation: customBragReadyFlash 0.95s ease-in-out infinite !important;
	border-color: #fde047 !important;
}

@keyframes customBragReadyFlash {
	0%, 100% {
		transform: scale(1);
		filter: brightness(1);
		box-shadow: 0 5px 0 #1e3a8a, 0 0 0 0 rgba(250, 204, 21, 0.75);
	}
	50% {
		transform: scale(1.045);
		filter: brightness(1.22);
		box-shadow: 0 5px 0 #1e3a8a, 0 0 22px 5px rgba(250, 204, 21, 0.95);
	}
}

.cr-emote-btn.is-locked:not(.is-selected) {
	opacity: 0.42 !important;
	cursor: default !important;
}

.custom-player-brag-btn.is-bragged {
	opacity: 0.78;
	cursor: default;
}

/* ==========================================================================
   3D MODEL-RAILWAY LEVEL SELECT DIORAMA STAGE
   ========================================================================== */
.railway-map-stage {
	position: absolute;
	inset: 0;
	display: none;
	z-index: 1;
	border-radius: 14px;
	overflow: hidden;
}

.railway-map-stage.is-active {
	display: block;
}

#railway-map-canvas {
	width: 100%;
	height: 100%;
	display: block;
	touch-action: none;
}

.railway-tiltshift {
	position: absolute;
	inset: 0;
	pointer-events: none;
	backdrop-filter: blur(2.5px);
	-webkit-backdrop-filter: blur(2.5px);
	-webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 26%, transparent 72%, #000 100%);
	mask-image: linear-gradient(180deg, #000 0%, transparent 26%, transparent 72%, #000 100%);
}

/* Disable tilt-shift backdrop-filter on Android for consistent 30-60fps */
.railway-map-stage.is-android-perf .railway-tiltshift {
	display: none;
}

.railway-map-labels {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

#level-select-grid.railway-3d-hidden {
	opacity: 0;
	pointer-events: none;
}
