.eapt-totem-shell {
	--eapt-totem-bg: #f5f7fa;
	--eapt-totem-surface: #ffffff;
	--eapt-totem-surface-2: #eef2f6;
	--eapt-totem-text: #17202a;
	--eapt-totem-muted: #667085;
	--eapt-totem-border: rgba(23, 32, 42, 0.12);
	--eapt-totem-accent: #1f6feb;
	--eapt-totem-accent-text: #ffffff;
	--eapt-totem-danger: #b42318;
	--eapt-totem-radius: 22px;
	--eapt-totem-shadow: 0 18px 50px rgba(16, 24, 40, 0.10);

	box-sizing: border-box;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	min-height: 100svh;
	background: var(--eapt-totem-bg);
	color: var(--eapt-totem-text);
	font-family: inherit;
}

.eapt-totem-shell *,
.eapt-totem-shell *::before,
.eapt-totem-shell *::after {
	box-sizing: border-box;
}

.eapt-totem {
	width: min(100%, 1600px);
	margin: 0 auto;
	padding:
		clamp(18px, 3vw, 48px)
		clamp(14px, 3vw, 52px)
		clamp(28px, 4vw, 64px);
}

.eapt-totem button,
.eapt-totem input,
.eapt-totem select {
	font: inherit;
}

.eapt-totem button {
	min-height: 52px;
	padding: 12px 22px;
	border: 0;
	border-radius: 14px;
	background: var(--eapt-totem-accent);
	color: var(--eapt-totem-accent-text);
	font-weight: 700;
	cursor: pointer;
	touch-action: manipulation;
	transition:
		transform 160ms ease,
		opacity 160ms ease;
}

.eapt-totem button:hover {
	opacity: 0.92;
}

.eapt-totem button:active {
	transform: scale(0.985);
}

.eapt-totem button:focus-visible,
.eapt-totem input:focus-visible,
.eapt-totem a:focus-visible {
	outline: 3px solid var(--eapt-totem-accent);
	outline-offset: 3px;
}

.eapt-totem input {
	width: 100%;
	min-height: 58px;
	padding: 12px 16px;
	border: 1px solid var(--eapt-totem-border);
	border-radius: 14px;
	background: var(--eapt-totem-surface);
	color: var(--eapt-totem-text);
	font-size: clamp(18px, 2vw, 24px);
}

.eapt-totem label {
	display: grid;
	gap: 9px;
	font-weight: 700;
}

.eapt-totem h1,
.eapt-totem h2,
.eapt-totem h3,
.eapt-totem p {
	margin-top: 0;
}

.eapt-totem h1 {
	font-size: clamp(30px, 4vw, 58px);
	line-height: 1.06;
}

.eapt-totem h2 {
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1.12;
}

.eapt-totem h3 {
	font-size: clamp(19px, 2vw, 28px);
	line-height: 1.18;
}

.eapt-totem p {
	color: var(--eapt-totem-muted);
	font-size: clamp(16px, 1.4vw, 20px);
	line-height: 1.6;
}

.eapt-totem__pairing,
.eapt-totem__login {
	width: min(100%, 620px);
	margin: clamp(18px, 8vh, 100px) auto;
	padding: clamp(22px, 4vw, 44px);
	border: 1px solid var(--eapt-totem-border);
	border-radius: var(--eapt-totem-radius);
	background: var(--eapt-totem-surface);
	box-shadow: var(--eapt-totem-shadow);
}

.eapt-totem__pairing form,
.eapt-totem__login form {
	display: grid;
	gap: 18px;
	margin-top: 24px;
}

.eapt-totem__device {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 18px;
	margin-bottom: 26px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--eapt-totem-border);
}

.eapt-totem__device strong {
	font-size: clamp(18px, 2vw, 24px);
}

.eapt-totem__device span {
	color: var(--eapt-totem-muted);
}

.eapt-totem__session > header,
.eapt-totem__session > footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
}

.eapt-totem__session > header {
	margin-bottom: clamp(24px, 4vw, 52px);
}

.eapt-totem__session > footer {
	margin-top: clamp(28px, 4vw, 56px);
	padding-top: 24px;
	border-top: 1px solid var(--eapt-totem-border);
}

.eapt-totem__workout {
	display: grid;
	gap: 20px;
}

.eapt-totem__exercises {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(14px, 2vw, 24px);
}

.eapt-totem__exercise {
	min-width: 0;
	padding: clamp(18px, 2.4vw, 30px);
	border: 1px solid var(--eapt-totem-border);
	border-radius: var(--eapt-totem-radius);
	background: var(--eapt-totem-surface);
	box-shadow: 0 8px 26px rgba(16, 24, 40, 0.06);
}

.eapt-totem__exercise > p:last-child {
	margin-bottom: 0;
}

.eapt-totem__media {
	overflow: hidden;
	margin-top: 18px;
	border-radius: 16px;
	background: var(--eapt-totem-surface-2);
	aspect-ratio: 16 / 10;
}

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

.eapt-totem a {
	color: var(--eapt-totem-accent);
	font-weight: 700;
}

[data-eapt-totem-status] {
	display: grid;
	min-height: 40vh;
	place-items: center;
	color: var(--eapt-totem-muted);
	font-size: clamp(18px, 2vw, 24px);
	text-align: center;
}

@media (min-width: 760px) {
	.eapt-totem__exercises {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.eapt-totem__exercises {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.eapt-totem__pairing,
	.eapt-totem__login {
		width: min(100%, 720px);
	}
}

@media (pointer: coarse) {
	.eapt-totem button {
		min-height: 58px;
		font-size: 18px;
	}

	.eapt-totem input {
		min-height: 62px;
	}
}

@media (prefers-color-scheme: dark) {
	.eapt-totem-shell {
		--eapt-totem-bg: #0f141a;
		--eapt-totem-surface: #171d24;
		--eapt-totem-surface-2: #202833;
		--eapt-totem-text: #f5f7fa;
		--eapt-totem-muted: #aab4c0;
		--eapt-totem-border: rgba(255, 255, 255, 0.12);
		--eapt-totem-accent: #5b9cff;
		--eapt-totem-accent-text: #08111f;
		--eapt-totem-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
	}
}

@media (prefers-reduced-motion: reduce) {
	.eapt-totem button {
		transition: none;
	}
}
