*,
*::before,
*::after {
	box-sizing: border-box;
}

@media (prefers-reduced-motion) {
	::view-transition-group(*),
	::view-transition-old(*),
	::view-transition-new(*) {
		animation: none !important;
	}
}

#output-page {
	color-scheme: dark;
	background-color: #000000;
	position: fixed;
	inset: 0;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
}

#output-page {
	display: grid;
	justify-items: center;
	align-items: center;
}

#output {
	aspect-ratio: 16 / 9;
	width: min(100%, calc(16 / 9 * 100svh));
	animation: fadeIn 0.2s;
}

#output,
#preview {
	view-transition-name: slide;
}

body {
	font-family: sans-serif;
	display: grid;
}

.main {
	max-width: 80ex;
	margin: 2em auto 8em;
}

label,
button {
	display: block;
	cursor: pointer;
}

label + label {
	margin-top: 1.5em;
}

label {
	display: grid;
	row-gap: 0.3em;
}

textarea,
input:not([type='checkbox']),
button {
	width: 100%;
	font-size: 2em;
	font-family: 'Open Sans', sans-serif;
}

textarea {
	resize: vertical;
	min-height: 3em;
	font-size: 3em;
}

button {
	margin-top: 1em;
	padding: 0.1em 1em;
}

h1 {
	text-align: center;
}

.preview {
	position: relative;
	margin-bottom: 2em;
	overflow: hidden;
}

.preview::before {
	content: '';
	display: block;
	padding-top: calc(100% / (16 / 9));
}

.preview-in {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.actions {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 0.5em;
}

.actions a {
	text-decoration: none;
}
