.scplugin-story,
.scplugin-story * {
	box-sizing: border-box;
}

.scplugin-story {
	position: relative;
	width: 100%;
	height: var(--scplugin-height, 100svh);
	min-height: 420px;
	overflow: hidden;
	background: #000;
	color: #fff;
	isolation: isolate;
	touch-action: pan-y;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.scplugin-story--fullscreen {
	min-height: 100vh;
	min-height: 100svh;
}

.scplugin-story--section {
	min-height: min(100svh, var(--scplugin-height, 100svh));
}

.scplugin-story--full-width {
	left: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
}

.scplugin-story:focus {
	outline: none;
}

.scplugin-loading {
	position: absolute;
	inset: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	background: #000;
	transition: opacity 0.45s ease;
	pointer-events: none;
}

.scplugin-loading.is-hidden {
	opacity: 0;
}

.scplugin-loader {
	width: min(420px, 80vw);
	height: 4px;
	overflow: hidden;
	border-radius: 999px;
	background: #202020;
}

.scplugin-progress {
	width: 0%;
	height: 100%;
	background: #fff;
	transition: width 0.15s linear;
}

.scplugin-percent {
	font-size: 15px;
	letter-spacing: 2px;
	opacity: 0.8;
}

.scplugin-stage {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	transform: translateZ(0);
	backface-visibility: hidden;
}

.scplugin-gradient {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.6),
		rgba(0, 0, 0, 0.28),
		rgba(0, 0, 0, 0)
	);
}

.scplugin-overlay {
	position: absolute;
	top: 50%;
	left: 8vw;
	z-index: 5;
	width: 460px;
	max-width: 90vw;
	transform: translateY(-50%);
	pointer-events: none;
}

.scplugin-message {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	transform: translateY(50px);
	transition: opacity 0.8s ease, transform 0.8s ease;
}

.scplugin-message.is-active {
	opacity: 1;
	transform: translateY(0);
}

.scplugin-message h1 {
	margin: 0 0 20px;
	font-size: clamp(34px, 4vw, 72px);
	font-weight: 700;
	line-height: 1.05;
}

.scplugin-message p {
	margin: 0;
	font-size: clamp(18px, 1.3vw, 24px);
	line-height: 1.7;
	opacity: 0.92;
}

@media (max-width: 900px) {
	.scplugin-story {
		touch-action: none;
	}

	.scplugin-gradient {
		background: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.15),
			rgba(0, 0, 0, 0.15),
			rgba(0, 0, 0, 0.72)
		);
	}

	.scplugin-overlay {
		top: auto;
		right: 20px;
		bottom: 8vh;
		left: 20px;
		display: grid;
		width: auto;
		max-height: none;
		overflow: visible;
		transform: none;
	}

	.scplugin-message {
		position: relative;
		top: auto;
		left: auto;
		grid-area: 1 / 1;
	}

	.scplugin-message h1 {
		font-size: clamp(26px, 8vw, 36px);
	}

	.scplugin-message p {
		font-size: clamp(15px, 4vw, 18px);
		line-height: 1.45;
	}
}

@media (max-width: 500px) {
	.scplugin-overlay {
		right: 18px;
		bottom: calc(6vh + env(safe-area-inset-bottom));
		left: 18px;
	}

	.scplugin-message h1 {
		font-size: 30px;
	}

	.scplugin-message p {
		font-size: 17px;
	}
}
