body {
	margin: 0;
	padding: 0 0 2rem;
	background: #f6f5f1;
	color: #23211d;
	font: 14px/1.6 ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
}

header,
main {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

h1 {
	font-size: 20px;
	font-weight: 500;
	margin: 1.5rem 0 1rem;
}

h1 .sub {
	font-size: 13px;
	font-weight: 400;
	color: #7a746a;
	margin-left: .5rem;
}

.drop {
	border: 1.5px dashed #c7c1b4;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	background: #fffef9;
	transition: border-color .15s, background .15s;
}

.drop.over {
	border-color: #8a7f5c;
	background: #fbf7e6;
}

.drop p {
	margin: .35rem 0;
}

.hint {
	font-size: 12px;
	color: #7a746a;
}

.controls,
.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1.25rem;
	margin-top: 1rem;
}

.controls label {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-size: 13px;
}

.controls input[type=number] {
	width: 4.5rem;
	padding: .25rem .4rem;
	border: 1px solid #c7c1b4;
	border-radius: 4px;
	background: #fff;
	font: inherit;
}

.unit {
	color: #7a746a;
	font-size: 12px;
}

button,
select {
	padding: .3rem .7rem;
	border: 1px solid #c7c1b4;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	cursor: pointer;
}

button:hover:not(:disabled),
select:hover {
	background: #f0ece0;
}

button:disabled {
	opacity: .45;
	cursor: default;
}

#generate {
	border-color: #8a7f5c;
	background: #efe7c8;
	font-weight: 500;
}

.status {
	font-size: 12px;
	color: #7a746a;
}

.report {
	margin-top: 1rem;
	font-size: 13px;
}

.report:empty {
	display: none;
}

.report .block {
	background: #fffef9;
	border: 1px solid #e2ddd0;
	border-radius: 6px;
	padding: .6rem .8rem;
	margin-bottom: .5rem;
}

.report .block.warn {
	border-color: #d8b98a;
	background: #fdf6e7;
}

.report .block.bad {
	border-color: #d9a3a3;
	background: #fdeeee;
}

.report h3 {
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 .3rem;
}

.report table {
	border-collapse: collapse;
	font-size: 12px;
}

.report td {
	padding: .1rem .8rem .1rem 0;
	vertical-align: top;
}

.report .muted {
	color: #7a746a;
}

.report ul {
	margin: .3rem 0 0;
	padding-left: 1.2rem;
}

.report li {
	font-size: 12px;
}

.sheets {
	margin: 1.5rem auto 0;
	text-align: center;
}

.sheet {
	position: relative;
	display: block;
	width: 210mm;
	margin: 0 auto 1.5rem;
}

.sheets canvas.paper {
	display: block;
	width: 100%;
	border: 1px solid #ccc;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* Screen-only playback indicator, sitting on top of the printable sheet. */
.sheets canvas.overlay {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/*
 * Printing is the whole point: one sheet per physical page, nothing else on it,
 * and no scaling that would throw the millimetre geometry off.
 */
@page {
	size: A4 portrait;
	margin: 0;
}

@media print {
	body {
		background: #fff;
		padding: 0;
	}

	.no-print {
		display: none !important;
	}

	.sheets {
		margin: 0;
	}

	.sheet {
		margin: 0;
		page-break-after: always;
		break-after: page;
	}

	.sheet:last-child {
		page-break-after: auto;
		break-after: auto;
	}

	.sheets canvas.paper {
		border: 0;
		box-shadow: none;
	}

	/* The playhead is a screen aid; it must never reach the paper. */
	.sheets canvas.overlay {
		display: none;
	}
}
