@layer page {
	#page { height: 100dvh; grid-template-rows: auto minmax(0, 1fr); padding-block-end: .5lh; }
	#stage {
		position: relative; margin: 0; justify-self: center; aspect-ratio: 9 / 16; max-width: 100%; min-height: 0; container-type: size;
		display: grid; place-items: center; overflow: hidden;
		background: light-dark(#fcf4e5, #513424); border: var(--edge); border-radius: var(--round, 0); box-shadow: none;
		touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer;
		&:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
		canvas { display: block; image-rendering: pixelated; }
		#intro { position: absolute; inset: 0; z-index: 2; background: light-dark(#fcf4e5, #513424);
			&[hidden] { display: none; }
			video { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
			#skip { position: absolute; inset-inline-end: 1.5ch; inset-block-end: calc(.75lh + env(safe-area-inset-bottom, 0px)); box-shadow: none; } }
		#note, noscript p { position: absolute; inset: auto 2ch 1lh; text-align: center; text-wrap: balance; }
	}
	#stage:fullscreen { border: 0; box-shadow: none; aspect-ratio: auto; max-width: none; width: 100vw; height: 100dvh;
		padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
	@container page (width < 48ch) { #stage { aspect-ratio: auto; justify-self: stretch; } }
}
