/* Asynchronous's player and its Play control, inside the canvas frame
   (public/patterns/asynchronous.js). asynchronous.js places both in window
   pixels from the canvas frame's 1280 by 720 units through the one `frameBox`
   letterbox, so the player stands in the same place on every screen, and hands
   the frame's scale in as --asynchronous-scale for the control's words. The
   layer itself has no size and covers nothing. Page content never makes room
   for it, and it never reads where a chip is. */
.asynchronous-layer {
	position: fixed;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	z-index: 3;
	overflow: visible;
}
.asynchronous-player {
	position: fixed;
	background: var(--bg);
	border: 1px solid var(--fg-soft);
	box-sizing: border-box;
}
/* An audio-only run keeps the frame playing and out of sight. */
.asynchronous-player.is-hidden {
	opacity: 0;
	pointer-events: none;
}
.asynchronous-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
.asynchronous-controls {
	position: fixed;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: calc(8px * var(--asynchronous-scale, 1));
	padding: calc(8px * var(--asynchronous-scale, 1)) 0;
	box-sizing: border-box;
	pointer-events: none;
	overflow-y: auto;
	overflow-wrap: anywhere;
}
.asynchronous-controls.is-above {
	flex-direction: column-reverse;
}
.asynchronous-play {
	pointer-events: auto;
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: calc(18px * var(--asynchronous-scale, 1));
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in oklab, var(--fg) 70%, var(--fg-soft));
	background: color-mix(in oklab, var(--bg) 60%, transparent);
	border: 1px solid var(--fg-soft);
	border-radius: 2px;
	padding: calc(8px * var(--asynchronous-scale, 1)) calc(18px * var(--asynchronous-scale, 1));
	min-width: min(100%, calc(110px * var(--asynchronous-scale, 1)));
	max-width: 100%;
	box-sizing: border-box;
}
.asynchronous-play:hover {
	color: var(--cyan);
	border-color: var(--cyan);
}
.asynchronous-error {
	pointer-events: auto;
	font-family: var(--font-sans);
	font-size: calc(18px * var(--asynchronous-scale, 1));
	line-height: 1.3;
	color: var(--fg);
}
.asynchronous-error[hidden] {
	display: none;
}
