		:root {
			--bg-app: #0e131f;
			--bg-surface: #182032;
			--bg-cell-covered: #283a52;
			--bg-cell-hover: #354a6b;
			--bg-cell-revealed: #121a28;
			--bg-board: #070b13;
			--text-main: #f8fafc;
			--text-muted: #94a3b8;
			--accent: #38bdf8;
			--accent-glow: rgba(56, 189, 248, 0.35);
			--danger: #ef4444;
			--success: #10b981;
			--gold: #f59e0b;
			/* Modern Clean pastel numbers - high outdoor OLED legibility */
			--num-1: #38bdf8;
			--num-2: #34d399;
			--num-3: #f87171;
			--num-4: #c084fc;
			--num-5: #fb923c;
			--num-6: #22d3ee;
			--num-7: #f472b6;
			--num-8: #cbd5e1;
		}

		* { box-sizing: border-box; margin: 0; padding: 0; }

		html, body {
			width: 100%;
			height: 100%;
			background: var(--bg-app);
			color: var(--text-main);
			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
			user-select: none;
			-webkit-user-select: none;
			touch-action: none;
			overflow: hidden;
		}

		body {
			display: flex;
			align-items: center;
			justify-content: center;
			background-image:
				radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
				radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
		}

		/* Main App Container: Clean full-viewport minimal canvas */
		.app-container {
			width: 100%;
			max-width: 900px;
			height: 100vh;
			max-height: 100vh;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			padding: 12px 14px;
			box-sizing: border-box;
			overflow: hidden;
		}

		/* Clean Minimalist Header (HUD) */
		.hud-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			background: rgba(24, 32, 50, 0.7);
			border: 1px solid rgba(255, 255, 255, 0.06);
			border-radius: 14px;
			padding: 8px 16px;
			backdrop-filter: blur(8px);
			-webkit-backdrop-filter: blur(8px);
			flex-shrink: 0;
			box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
		}

		.hud-item {
			display: flex;
			align-items: center;
			gap: 6px;
			font-size: 0.95rem;
			font-weight: 800;
			letter-spacing: 0.2px;
		}

		.hud-item.mines { color: var(--gold); }
		.hud-item.timer { color: var(--text-main); font-variant-numeric: tabular-nums; }
		.hud-item.score { color: var(--accent); font-variant-numeric: tabular-nums; }

		.hud-level-pill {
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 3px;
		}

		.level-badge {
			font-size: 0.75rem;
			font-weight: 900;
			letter-spacing: 0.8px;
			color: var(--accent);
			text-transform: uppercase;
		}

		.level-progress-bar {
			width: 60px;
			height: 4px;
			background: rgba(10, 14, 23, 0.8);
			border-radius: 999px;
			overflow: hidden;
		}

		.level-progress-fill {
			height: 100%;
			width: 6.6%;
			background: linear-gradient(90deg, var(--accent), #34d399);
			border-radius: 999px;
			transition: width 0.3s ease;
		}

		/* Board Arena: Pan & Pinch-to-Zoom Viewport Container */
		.board-arena {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: center;
			overflow: hidden;
			position: relative;
			padding: 0;
			width: 100%;
			min-height: 0;
			touch-action: none;
			user-select: none;
			-webkit-user-select: none;
		}

		.board-viewport {
			width: 100%;
			height: 100%;
			position: relative;
			overflow: hidden;
			display: flex;
			align-items: center;
			justify-content: center;
			touch-action: none;
		}

		.board-layer {
			position: absolute;
			transform-origin: 0 0;
			will-change: transform;
			left: 0;
			top: 0;
		}

		.board-layer.smooth-animate {
			transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
		}

		.board {
			display: inline-grid;
			gap: 3px;
			background: var(--bg-board);
			border-radius: 14px;
			padding: 6px;
			border: 1px solid rgba(255, 255, 255, 0.05);
			box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 2px 6px rgba(0, 0, 0, 0.6);
			transition: transform 0.25s ease;
		}

		.board.flipping { transform: rotateX(90deg); }

		/* "The Clean One" Signature Squircle Tile - Enhanced OLED Outdoor Contrast */
		.cell {
			width: 32px;
			height: 32px;
			touch-action: none;
			background: var(--bg-cell-covered);
			border: 1px solid rgba(255, 255, 255, 0.08);
			border-radius: 4px;
			cursor: pointer;
			font-size: 1.05rem;
			font-weight: 900;
			display: flex;
			align-items: center;
			justify-content: center;
			transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
			color: var(--text-main);
			font-family: inherit;
			position: relative;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
		}

		.cell:hover:not(.revealed):not(.flagged):not(.game-over) {
			background: var(--bg-cell-hover);
			border-color: rgba(255, 255, 255, 0.15);
			transform: translateY(-1px);
			box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
		}

		.cell:active:not(.revealed) {
			transform: scale(0.94);
		}

		/* Clean revealed state: flat, sunken, clean */
		.cell.revealed {
			background: var(--bg-cell-revealed);
			border: 1px solid rgba(255, 255, 255, 0.08);
			box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
			cursor: default;
			animation: cell-ripple-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
		}

		.cell.revealed.has-number {
			cursor: pointer;
			background: #172437;
			border-color: rgba(56, 189, 248, 0.12);
			box-shadow: inset 0 0 4px rgba(56, 189, 248, 0.06), 0 1px 2px rgba(0,0,0,0.3);
		}

		.cell.revealed.has-number:hover {
			background: #1e3048;
			border-color: rgba(56, 189, 248, 0.25);
		}

		body.didactic-mode .board {
			gap: 3px;
		}

		body.didactic-mode .cell {
			border-radius: 4px;
		}

		body.didactic-mode .cell.revealed:not(.has-number) {
			background: #111827;
			border: 1px solid rgba(255, 255, 255, 0.12);
			box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
			opacity: 1;
		}

		body.didactic-mode .cell.revealed.has-number {
			background: #111a28;
			border: 1px solid rgba(56, 189, 248, 0.22);
			box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 0 6px rgba(56, 189, 248, 0.08);
		}

		body.didactic-mode .cell:not(.revealed):not(.flagged) {
			background: #2b3d55;
			border: 1px solid rgba(255, 255, 255, 0.2);
			box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
		}

		.cell.cell-hint {
			background: #334e68 !important;
			transform: scale(0.91);
			transition: transform 0.1s ease;
		}

		.cell.flagged {
			background: var(--bg-cell-covered);
			animation: flag-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
		}

		.cell.mine-hit {
			background: var(--danger) !important;
			box-shadow: 0 0 20px rgba(239, 68, 68, 0.9);
			animation: explode 0.35s ease;
		}

		.cell.mine-shown { background: var(--bg-cell-revealed); }
		.cell.wrong-flag { background: #f87171 !important; color: #fff; }

		.num-1 { color: var(--num-1); }
		.num-2 { color: var(--num-2); }
		.num-3 { color: var(--num-3); }
		.num-4 { color: var(--num-4); }
		.num-5 { color: var(--num-5); }
		.num-6 { color: var(--num-6); }
		.num-7 { color: var(--num-7); }
		.num-8 { color: var(--num-8); }

		@keyframes cell-ripple-in {
			0% { transform: scale(0.75); opacity: 0.6; }
			100% { transform: scale(1); opacity: 1; }
		}

		@keyframes flag-pop {
			0% { transform: scale(0.4) rotate(-15deg); }
			65% { transform: scale(1.15) rotate(4deg); }
			100% { transform: scale(1) rotate(0deg); }
		}

		@keyframes explode {
			0% { background: #fff; transform: scale(1.35); }
			40% { background: var(--danger); transform: scale(0.9); }
			100% { background: var(--danger); transform: scale(1); }
		}

		/* Floating Bottom Controller Bar */
		.bottom-bar {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 12px;
			flex-shrink: 0;
			padding-top: 4px;
		}

		/* Sliding Segmented Pill (Dig vs Flag) */
		.mode-pill-selector {
			background: var(--bg-surface);
			border: 1px solid rgba(255, 255, 255, 0.08);
			border-radius: 999px;
			padding: 4px;
			display: inline-flex;
			gap: 4px;
			box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
		}

		.pill-btn {
			background: transparent;
			border: none;
			color: var(--text-muted);
			font-family: inherit;
			font-size: 0.88rem;
			font-weight: 800;
			padding: 8px 18px;
			border-radius: 999px;
			cursor: pointer;
			display: inline-flex;
			align-items: center;
			gap: 6px;
			transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
		}

		.pill-btn.active {
			background: var(--accent);
			color: #0b1120;
			box-shadow: 0 3px 12px var(--accent-glow);
		}

		.pill-btn.flag-btn.active {
			background: var(--gold);
			color: #0b1120;
			box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
		}

		/* Global Flag Mode Indication: Ambient Glow on Board & HUD */
		body.mode-flag-active .board {
			border-color: rgba(245, 158, 11, 0.35);
			box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 158, 11, 0.18), inset 0 2px 6px rgba(0, 0, 0, 0.6);
		}

		body.mode-flag-active .hud-item.mines {
			text-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
			animation: flagPulse 1.6s ease-in-out infinite;
		}

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

		/* Floating Mode Switch HUD Badge */
		.mode-toast-hud {
			position: absolute;
			top: 20px;
			left: 50%;
			transform: translateX(-50%) translateY(-12px) scale(0.9);
			background: rgba(14, 19, 31, 0.88);
			border: 1px solid rgba(255, 255, 255, 0.16);
			color: #ffffff;
			font-size: 0.95rem;
			font-weight: 800;
			padding: 8px 18px;
			border-radius: 999px;
			display: flex;
			align-items: center;
			gap: 8px;
			pointer-events: none;
			opacity: 0;
			z-index: 50;
			backdrop-filter: blur(8px);
			-webkit-backdrop-filter: blur(8px);
			box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
			transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
		}

		.mode-toast-hud.show {
			opacity: 1;
			transform: translateX(-50%) translateY(0) scale(1);
		}

		.mode-toast-hud.toast-flag {
			border-color: rgba(245, 158, 11, 0.5);
			box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 158, 11, 0.25);
			color: #fbbf24;
		}

		.mode-toast-hud.toast-dig {
			border-color: rgba(56, 189, 248, 0.5);
			box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(56, 189, 248, 0.25);
			color: #38bdf8;
		}

		.action-buttons-row {
			display: flex;
			align-items: center;
			gap: 6px;
		}

		.icon-action-btn {
			width: 38px;
			height: 38px;
			border-radius: 50%;
			background: var(--bg-surface);
			border: 1px solid rgba(255, 255, 255, 0.08);
			color: var(--text-main);
			font-size: 1rem;
			cursor: pointer;
			display: inline-flex;
			align-items: center;
			justify-content: center;
			transition: all 0.18s ease;
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
			user-select: none;
		}

		.icon-action-btn:hover {
			background: var(--bg-cell-hover);
			transform: translateY(-1px);
			border-color: var(--accent);
		}

		/* Particles */
		.particle {
			position: absolute;
			pointer-events: none;
			border-radius: 50%;
			animation: particle-fly 0.65s ease-out forwards;
			z-index: 10;
		}

		@keyframes particle-fly {
			to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
		}

		/* Confetti */
		.confetti {
			position: fixed;
			width: 8px;
			height: 8px;
			pointer-events: none;
			z-index: 200;
			animation: confetti-fall 2.8s ease-out forwards;
		}

		@keyframes confetti-fall {
			0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
			100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
		}

		/* Modals */
		.overlay {
			position: fixed;
			inset: 0;
			display: none;
			align-items: center;
			justify-content: center;
			background: rgba(10, 14, 23, 0.8);
			backdrop-filter: blur(6px);
			-webkit-backdrop-filter: blur(6px);
			z-index: 100;
			animation: fade-in 0.25s ease;
		}

		.overlay.show { display: flex; }

		.modal {
			background: #162032;
			border-radius: 20px;
			padding: 30px 24px;
			text-align: center;
			max-width: 380px;
			width: 90%;
			box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
			animation: modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
		}

		.modal-emoji { font-size: 3.5rem; margin-bottom: 8px; animation: bounce 0.6s ease; }
		.modal-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; }
		.modal-score { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 8px; }
		.modal-position { color: var(--gold); font-weight: 700; font-size: 1rem; margin-bottom: 20px; min-height: 24px; line-height: 1.4; }
		.modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

		.btn {
			padding: 10px 22px;
			border-radius: 999px;
			border: none;
			font-size: 0.92rem;
			font-weight: 800;
			cursor: pointer;
			transition: all 0.18s ease;
			font-family: inherit;
			display: inline-flex;
			align-items: center;
			justify-content: center;
			text-align: center;
			gap: 6px;
			user-select: none;
			-webkit-user-select: none;
			touch-action: manipulation;
		}

		.btn-primary { background: linear-gradient(135deg, var(--accent), #0284c7); color: #0b1120; }
		.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--accent-glow); }
		.btn-secondary { background: var(--bg-surface); color: var(--text-main); }
		.btn-secondary:hover { background: var(--bg-cell-hover); }

		@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
		@keyframes modal-in { from { transform: scale(0.8) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
		@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

		/* Splash screen */
		#splash {
			position: fixed;
			inset: 0;
			z-index: 900;
			background:
				radial-gradient(circle at 50% 25%, rgba(56, 189, 248, 0.16) 0%, transparent 60%),
				radial-gradient(circle at 50% 85%, rgba(245, 158, 11, 0.10) 0%, transparent 60%),
				var(--bg-app);
			display: flex;
			align-items: center;
			justify-content: center;
			transition: opacity 0.3s ease, visibility 0.3s ease;
		}

		#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

		.splash-inner {
			text-align: center;
			padding: 20px 16px;
			max-width: 440px;
			width: 92%;
			max-height: 94vh;
			overflow-y: auto;
			scrollbar-width: thin;
			box-sizing: border-box;
			display: flex;
			flex-direction: column;
			align-items: center;
		}

		.splash-emoji { font-size: 3.5rem; margin-bottom: 4px; animation: bounce 1.4s ease infinite; line-height: 1; }
		.splash-title {
			font-size: 2.1rem;
			font-weight: 900;
			background: linear-gradient(135deg, #f8fafc, #94a3b8);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			background-clip: text;
			margin-bottom: 6px;
			line-height: 1.2;
		}

		.splash-version {
			font-size: 0.45em;
			font-weight: 700;
			vertical-align: super;
			margin-left: 4px;
			color: var(--accent);
			-webkit-text-fill-color: var(--accent);
		}

		.splash-player-status {
			margin-bottom: 12px;
			font-size: 0.82rem;
			color: var(--text-muted);
			background: rgba(24, 32, 50, 0.8);
			padding: 5px 14px;
			border-radius: 999px;
			border: 1px solid rgba(255, 255, 255, 0.08);
			display: inline-flex;
			align-items: center;
			gap: 6px;
		}

		/* Splash Mode Switcher Tabs */
		.splash-mode-tabs {
			display: flex;
			gap: 8px;
			width: 100%;
			margin-bottom: 12px;
		}

		.splash-tab-btn {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			padding: 9px 8px;
			background: rgba(15, 23, 42, 0.65);
			border: 1.5px solid rgba(255, 255, 255, 0.12);
			border-radius: 12px;
			color: var(--text-muted);
			cursor: pointer;
			transition: all 0.2s ease;
			font-family: inherit;
		}

		.splash-tab-btn:hover {
			background: rgba(30, 41, 59, 0.85);
			border-color: rgba(255, 255, 255, 0.25);
			color: #fff;
		}

		.splash-tab-btn.active {
			background: rgba(37, 99, 235, 0.22);
			border-color: var(--accent);
			color: #fff;
			box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
		}

		.splash-tab-title {
			font-size: 0.88rem;
			font-weight: 800;
			letter-spacing: 0.3px;
			display: flex;
			align-items: center;
			gap: 4px;
		}

		.splash-tab-sub {
			font-size: 0.68rem;
			opacity: 0.75;
			margin-top: 2px;
		}

		.splash-mode-panel {
			display: none;
			width: 100%;
			animation: fadeInTab 0.2s ease;
		}

		.splash-mode-panel.active {
			display: block;
		}

		@keyframes fadeInTab {
			from { opacity: 0; transform: translateY(4px); }
			to { opacity: 1; transform: translateY(0); }
		}

		.splash-mode-section {
			width: 100%;
			background: rgba(22, 32, 50, 0.7);
			border: 1px solid rgba(255, 255, 255, 0.08);
			border-radius: 16px;
			padding: 14px 14px 16px;
			margin-bottom: 10px;
			text-align: center;
			box-sizing: border-box;
		}

		.splash-section-title {
			font-size: 0.85rem;
			font-weight: 800;
			color: var(--accent);
			text-transform: uppercase;
			letter-spacing: 0.6px;
			margin-bottom: 8px;
		}

		.splash-section-desc {
			color: var(--text-muted);
			font-size: 0.82rem;
			margin-bottom: 14px;
			line-height: 1.4;
		}

		.classic-presets-grid {
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			gap: 8px;
			width: 100%;
		}

		.btn-preset {
			background: var(--bg-surface);
			color: var(--text-main);
			border: 1px solid rgba(255, 255, 255, 0.08);
			border-radius: 12px;
			padding: 8px 6px;
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 3px;
			cursor: pointer;
			transition: all 0.18s ease;
			font-family: inherit;
		}

		.btn-preset:hover {
			background: var(--bg-cell-hover);
			border-color: var(--accent);
			transform: translateY(-2px);
			box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
		}

		.preset-name {
			font-weight: 800;
			font-size: 0.85rem;
		}

		.preset-details {
			font-size: 0.72rem;
			color: var(--text-muted);
		}

		/* Academy Mode Section & Cards */
		.academy-section {
			max-height: 52vh;
			overflow-y: auto;
			padding-right: 6px;
			-webkit-overflow-scrolling: touch;
		}

		.academy-main-play {
			width: 100%;
			margin-bottom: 12px;
			font-size: 0.95rem;
			padding: 10px 18px;
			display: flex;
			align-items: center;
			justify-content: center;
			text-align: center;
			box-sizing: border-box;
			cursor: pointer;
			position: relative;
			z-index: 5;
		}

		.academy-lessons-list {
			display: flex;
			flex-direction: column;
			gap: 8px;
			width: 100%;
			margin-top: 6px;
		}

		.academy-card {
			background: rgba(15, 23, 42, 0.75);
			border: 1.5px solid rgba(255, 255, 255, 0.1);
			border-radius: 12px;
			padding: 10px 12px;
			text-align: left;
			cursor: pointer;
			transition: all 0.2s ease;
			display: flex;
			flex-direction: column;
			gap: 4px;
			position: relative;
			font-family: inherit;
		}

		.academy-card:hover:not(.locked) {
			background: rgba(30, 41, 59, 0.9);
			border-color: var(--accent);
			transform: translateY(-2px);
			box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
		}

		.academy-card.locked {
			opacity: 0.45;
			cursor: not-allowed;
			filter: grayscale(0.8);
		}

		.academy-card.completed {
			border-color: rgba(52, 211, 153, 0.5);
			background: rgba(6, 95, 70, 0.2);
		}

		.academy-card-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
		}

		.academy-card-title {
			font-size: 0.88rem;
			font-weight: 800;
			color: #fff;
			display: flex;
			align-items: center;
			gap: 6px;
		}

		.academy-card-badge {
			font-size: 0.68rem;
			font-weight: 800;
			padding: 2px 7px;
			border-radius: 999px;
			background: rgba(56, 189, 248, 0.18);
			color: #38bdf8;
			border: 1px solid rgba(56, 189, 248, 0.3);
		}

		.academy-card.completed .academy-card-badge {
			background: rgba(52, 211, 153, 0.2);
			color: #34d399;
			border-color: rgba(52, 211, 153, 0.4);
		}

		.academy-card-desc {
			font-size: 0.74rem;
			color: var(--text-muted);
			line-height: 1.35;
		}

		.academy-card-footer {
			margin-top: 4px;
			display: flex;
			align-items: center;
			justify-content: space-between;
		}

		.academy-status-tag {
			font-size: 0.72rem;
			font-weight: 700;
		}

		.academy-card.completed .academy-status-tag { color: #34d399; }
		.academy-card.locked .academy-status-tag { color: var(--text-muted); }
		.academy-card:not(.completed):not(.locked) .academy-status-tag { color: #fbbf24; }

		.splash-play { font-size: 1.05rem; padding: 10px 32px; box-shadow: 0 8px 24px var(--accent-glow); animation: pulse-glow 2s ease-in-out infinite; }
		.splash-hint { margin-top: 8px; color: var(--text-muted); font-size: 0.74rem; line-height: 1.3; }
		.splash-author { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(148, 163, 184, 0.15); color: var(--text-muted); font-size: 0.72rem; width: 100%; }

		@keyframes pulse-glow {
			0%, 100% { box-shadow: 0 8px 24px var(--accent-glow); }
			50% { box-shadow: 0 8px 38px rgba(56, 189, 248, 0.7); }
		}

		/* Fullscreen exit button in action buttons row */
		.fs-close {
			display: none;
			color: #fca5a5;
			border-color: rgba(239, 68, 68, 0.35);
			background: rgba(239, 68, 68, 0.18);
		}

		.fs-close:hover {
			background: rgba(239, 68, 68, 0.85);
			color: #fff;
			border-color: #ef4444;
		}

		body.pointnet-games-fs .fs-close {
			display: inline-flex;
		}

		/* ============================================================
		   LANDSCAPE MODE — DOCKING HUD TO SIDE (Clean One Mobile Style)
		   ============================================================ */
		@media (orientation: landscape) and (max-height: 600px) {
			.app-container {
				max-width: 100%;
				height: 100vh;
				flex-direction: row;
				padding: 8px 14px;
				gap: 16px;
			}
			.hud-sidebar {
				width: 170px;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				flex-shrink: 0;
				height: 100%;
			}
			.hud-header {
				flex-direction: column;
				align-items: stretch;
				padding: 10px 12px;
				gap: 8px;
			}
			.hud-item {
				justify-content: space-between;
				font-size: 0.88rem;
			}
			.hud-level-pill {
				flex-direction: row;
				justify-content: space-between;
				padding-top: 4px;
				border-top: 1px solid rgba(255, 255, 255, 0.06);
			}
			.board-arena {
				flex: 1;
				height: 100%;
				padding: 0;
			}
			.board { gap: 2px; padding: 4px; border-radius: 10px; }
			.bottom-bar {
				flex-direction: column;
				align-items: stretch;
				gap: 8px;
				padding-top: 0;
			}
			.mode-pill-selector {
				width: 100%;
				display: flex;
			}
			.pill-btn {
				flex: 1;
				justify-content: center;
				padding: 6px 8px;
				font-size: 0.8rem;
			}
			.action-buttons-row {
				display: flex;
				flex-wrap: wrap;
				gap: 5px;
				justify-content: center;
			}
			.icon-action-btn {
				width: 32px;
				height: 32px;
				font-size: 0.88rem;
			}

			.splash-inner {
				max-width: 560px;
				flex-direction: column;
				gap: 6px;
				padding: 10px;
			}
			.splash-emoji { font-size: 2rem; margin-bottom: 0; }
			.splash-title { font-size: 1.4rem !important; margin-bottom: 0; }
			.splash-player-status { margin-bottom: 4px; font-size: 0.72rem; padding: 3px 10px; }
			.splash-mode-section { padding: 8px 10px; margin-bottom: 6px; }
			.splash-section-title { font-size: 0.78rem; margin-bottom: 4px; }
			.splash-section-desc { font-size: 0.72rem; margin-bottom: 6px; }
			.classic-presets-grid { gap: 6px; }
			.btn-preset { padding: 6px 4px; }
			.preset-name { font-size: 0.78rem; }
			.preset-details { font-size: 0.68rem; }
			.splash-play { font-size: 0.88rem; padding: 6px 20px; }
			.splash-hint { display: none; }
			.splash-author { display: none; }
		}

		/* ============================================================
		   MOBILE RESPONSIVE — ADAPT HUD, BOTTOM BAR & CONTROLS
		   ============================================================ */
		@media (max-width: 600px) {
			.app-container {
				padding: 8px 10px;
			}

			.hud-header {
				padding: 6px 10px;
			}

			.hud-item {
				gap: 4px;
				font-size: 0.86rem;
			}

			.hud-level-pill .level-badge {
				font-size: 0.7rem;
			}

			.level-progress-bar {
				width: 45px;
			}

			/* Bottom Controller Bar responsive wrapping */
			.bottom-bar {
				gap: 8px;
				flex-wrap: wrap;
				justify-content: center;
			}

			.mode-pill-selector {
				padding: 3px;
				gap: 2px;
			}

			.pill-btn {
				padding: 6px 12px;
				font-size: 0.8rem;
				gap: 4px;
			}

			.action-buttons-row {
				gap: 5px;
			}

			.icon-action-btn {
				width: 34px;
				height: 34px;
				font-size: 0.92rem;
			}
		}

		@media (max-width: 440px) {
			.app-container {
				padding: 6px 8px;
			}

			.hud-header {
				padding: 5px 8px;
			}

			.hud-item {
				font-size: 0.8rem;
				gap: 3px;
			}

			.hud-item span:first-child {
				font-size: 0.85rem;
			}

			.hud-level-pill .level-badge {
				font-size: 0.65rem;
			}

			.level-progress-bar {
				width: 36px;
				height: 3px;
			}

			.bottom-bar {
				flex-direction: column;
				align-items: center;
				gap: 6px;
			}

			.mode-pill-selector {
				width: 100%;
				display: flex;
				justify-content: stretch;
			}

			.pill-btn {
				flex: 1;
				justify-content: center;
				padding: 6px 8px;
				font-size: 0.78rem;
			}

			.action-buttons-row {
				width: 100%;
				justify-content: center;
				gap: 8px;
			}

			.icon-action-btn {
				width: 36px;
				height: 36px;
				font-size: 0.95rem;
			}
		}

		/* No-Guess Toggle in Classic Mode Splash Panel */
		.classic-mode-toggle-group {
			margin-top: 14px;
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 6px;
		}

		.toggle-group-label {
			font-size: 0.78rem;
			font-weight: 700;
			text-transform: uppercase;
			letter-spacing: 0.8px;
			color: rgba(255, 255, 255, 0.6);
		}

		.toggle-segmented-pill {
			display: inline-flex;
			background: rgba(10, 14, 23, 0.7);
			border: 1px solid rgba(255, 255, 255, 0.12);
			border-radius: 999px;
			padding: 3px;
			gap: 3px;
			max-width: 100%;
		}

		.segmented-btn {
			background: transparent;
			border: none;
			color: rgba(255, 255, 255, 0.65);
			font-size: 0.82rem;
			font-weight: 700;
			padding: 6px 12px;
			border-radius: 999px;
			cursor: pointer;
			transition: all 0.18s ease;
			font-family: inherit;
			white-space: nowrap;
		}

		.segmented-btn:hover:not(.active) {
			color: #fff;
			background: rgba(255, 255, 255, 0.05);
		}

		.segmented-btn.active {
			background: linear-gradient(135deg, #10b981, #059669);
			color: #fff;
			box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
		}

		/* HUD No-Guess Certification Badge */
		.hud-badge-noguess {
			background: rgba(16, 185, 129, 0.14);
			border: 1px solid rgba(16, 185, 129, 0.35);
			color: #34d399;
			font-size: 0.75rem;
			font-weight: 800;
			letter-spacing: 0.3px;
			padding: 4px 8px;
			border-radius: 999px;
			cursor: pointer;
			display: inline-flex;
			align-items: center;
			gap: 4px;
			font-family: inherit;
			transition: all 0.18s ease;
		}

		.hud-badge-noguess:hover {
			background: rgba(16, 185, 129, 0.25);
			border-color: rgba(16, 185, 129, 0.6);
			transform: scale(1.04);
		}

		.hud-badge-noguess.hidden {
			display: none !important;
		}


