#graphite-boot-loader {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 1.5rem;
	background:
		radial-gradient(circle at 20% 15%, rgba(19, 76, 169, 0.18), transparent 0 26%),
		radial-gradient(circle at 85% 20%, rgba(52, 168, 83, 0.10), transparent 0 18%),
		linear-gradient(180deg, #f7fbff 0%, #edf3fb 48%, #e8eff8 100%);
	z-index: 2147483647;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

html.graphite-preload-dark #graphite-boot-loader {
	background:
		radial-gradient(circle at 20% 15%, rgba(31, 122, 224, 0.18), transparent 0 26%),
		radial-gradient(circle at 85% 20%, rgba(65, 180, 95, 0.12), transparent 0 18%),
		linear-gradient(180deg, #08111f 0%, #0f172a 52%, #111c31 100%);
}

#graphite-boot-loader[data-state='hidden'] {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.graphite-boot-loader-card {
	position: relative;
	width: min(30rem, 100%);
	padding: 2rem;
	border: 1px solid rgba(17, 24, 39, 0.06);
	border-radius: 1.75rem;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

html.graphite-preload-dark .graphite-boot-loader-card {
	border-color: rgba(148, 163, 184, 0.16);
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.94) 100%);
	box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

.graphite-boot-loader-card::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: 100%;
	height: 0.35rem;
	background: linear-gradient(90deg, #134ca9 0%, #1f7ae0 45%, #41b45f 100%);
}

.graphite-boot-loader-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	text-align: center;
}

.graphite-boot-loader-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 1.5rem;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(237, 243, 251, 0.92) 100%);
	box-shadow: 0 14px 34px rgba(10, 37, 77, 0.16);
}

html.graphite-preload-dark .graphite-boot-loader-logo-wrap {
	background: linear-gradient(145deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.92) 100%);
	box-shadow: 0 14px 34px rgba(2, 6, 23, 0.30);
}

.graphite-boot-loader-logo {
	width: min(10rem, 100%);
	max-width: 8.5rem;
	height: auto;
	filter: drop-shadow(0 10px 24px rgba(18, 76, 169, 0.16));
}

.graphite-boot-loader-spinner {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	border: 0.3rem solid rgba(19, 76, 169, 0.14);
	border-top-color: #134ca9;
	border-right-color: #41b45f;
	animation: graphite-boot-spin 0.9s linear infinite;
}

html.graphite-preload-dark .graphite-boot-loader-spinner {
	border-color: rgba(148, 163, 184, 0.18);
	border-top-color: #60a5fa;
	border-right-color: #4ade80;
}

.graphite-boot-loader-title {
	letter-spacing: 0.02em;
	color: #102a43;
}

html.graphite-preload-dark .graphite-boot-loader-title {
	color: #e2e8f0;
}

.graphite-boot-loader-text {
	max-width: 24rem;
	color: #52627a;
}

html.graphite-preload-dark .graphite-boot-loader-text {
	color: #94a3b8;
}

@media (max-width: 640px) {
	#graphite-boot-loader {
		padding: 1rem;
	}

	.graphite-boot-loader-card {
		padding: 1.5rem 1.25rem;
		border-radius: 1.4rem;
	}

	.graphite-boot-loader-logo-wrap {
		width: 4.75rem;
		height: 4.75rem;
	}
}

@keyframes graphite-boot-spin {
	to {
		transform: rotate(360deg);
	}
}