/* Document reader: readable screenshots and full-width mobile content. */
.tutorial-reader {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.6);
}
.tutorial-reader__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 768px;
	height: 80vh;
	height: 80dvh;
	overflow: hidden;
	border-radius: 16px;
	background: var(--bg-page);
	color: var(--text-primary);
	box-shadow: var(--shadow-xl);
}
.tutorial-reader__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
	padding: 8px 16px;
	border-bottom: 1px solid var(--border-default);
}
.tutorial-reader__header h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.tutorial-reader__close {
	flex-shrink: 0;
	min-width: 44px;
	min-height: 44px;
	color: var(--accent-primary);
	cursor: pointer;
}
.tutorial-reader__close:focus-visible,
.tutorial-reader summary:focus-visible {
	outline: 2px solid var(--accent-primary);
	outline-offset: 2px;
}
.tutorial-reader__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 32px 32px;
}
.tutorial-reader .prose {
	font-size: 16px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}
.tutorial-reader .prose strong {
	color: #1657a4;
	font-weight: 700;
}
html.dark .tutorial-reader .prose strong {
	color: #9dc5ff;
}
.tutorial-reader .prose img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 16px auto;
}
.tutorial-reader .prose summary {
	display: list-item;
	min-height: 44px;
	padding: 8px 0;
	cursor: pointer;
	color: var(--accent-primary);
}
.tutorial-reader .prose table {
	table-layout: fixed;
}
.tutorial-reader .prose th:first-child {
	width: 32%;
}
/* Keep the original screenshot intact; put instructions at the actual controls. */
.tutorial-reader .tutorial-shot {
	position: relative;
	width: 100%;
	max-width: 340px;
	margin: 16px auto;
	overflow: hidden;
	border-radius: 10px;
	container-type: inline-size;
	background: #eef2f6;
}
.tutorial-reader .prose .tutorial-shot > img {
	position: absolute;
	max-width: none;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
}
.tutorial-reader .tutorial-shot > span {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	font-size: clamp(14px, 4.6cqw, 16px);
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	white-space: nowrap;
	color: #0051ad;
	-webkit-text-stroke: 2px rgba(255, 255, 255, 0.96);
	paint-order: stroke fill;
}
.tutorial-reader .tutorial-shot > .tutorial-shot__field {
	min-height: 22px;
	justify-content: flex-start;
	padding-inline: 4px;
	background: rgba(38, 139, 255, 0.16);
	border: 1px solid #1689ff;
	border-radius: 3px;
}
.tutorial-reader .tutorial-shot__tag {
	min-height: 24px;
	background: rgba(38, 139, 255, 0.16);
	border: 2px solid #1689ff;
	border-radius: 6px;
}
.tutorial-reader .tutorial-shot__ring {
	border: 2px solid #1689ff;
	border-radius: 5px;
}
@media (max-width: 767px) {
	.tutorial-reader { padding: 0; }
	.tutorial-reader__panel {
		height: 100%;
		height: 100dvh;
		max-width: none;
		border-radius: 0;
	}
	.tutorial-reader__header {
		padding-top: max(8px, env(safe-area-inset-top));
	}
	.tutorial-reader__body {
		padding: 8px 16px max(24px, env(safe-area-inset-bottom));
	}
}
/* Platform choices stay compact; screenshots retain their actual provenance. */
.tutorial-reader .tutorial-version {
	margin: 12px 0 20px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--text-secondary);
}
.tutorial-reader .tutorial-platform {
	margin: 0;
	border-bottom: 1px solid var(--border-default);
}
.tutorial-reader .prose .tutorial-platform > summary {
	padding: 12px 4px;
	font-weight: 600;
	color: var(--text-primary);
}
.tutorial-reader .tutorial-platform[open] > summary {
	color: var(--accent-primary);
}
.tutorial-reader .tutorial-platform > p {
	margin: 8px 4px 16px;
}
