/* Screen + @media print styles for Verso printable Bible cryptograms.
 * Monochrome, zero-background-ink layout sized cleanly for US Letter & A4. */

.print-only {
	display: none;
}

.print-sheet {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	padding: 1.5rem;
}

.print-alphabet {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	color: #374151;
	border-top: 1px solid #d1d5db;
	border-bottom: 1px solid #d1d5db;
	padding: 0.45rem 0;
	margin: 0.75rem 0 1rem;
}

.print-puzzle-card {
	border-bottom: 1px dashed #d1d5db;
	padding: 0.75rem 0;
	break-inside: avoid;
	page-break-inside: avoid;
}

.print-puzzle-card:last-of-type {
	border-bottom: none;
}

.print-puzzle-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 0.85rem;
	font-weight: 600;
	color: #111827;
	margin-bottom: 0.5rem;
}

.print-words {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
	align-items: flex-start;
}

.print-word {
	display: inline-flex;
	gap: 0.2rem;
}

.print-cell {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	min-width: 1.05rem;
}

.print-char {
	height: 1.25rem;
	width: 1.05rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 600;
	color: #111827;
}

.print-blank {
	border-bottom: 1.5px solid #111827;
}

.print-code {
	font-size: 0.68rem;
	line-height: 1.15;
	color: #374151;
	margin-top: 0.1rem;
}

.print-code-hidden {
	visibility: hidden;
}

.print-footer {
	margin-top: 1.25rem;
	padding-top: 0.75rem;
	border-top: 1px solid #111827;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.78rem;
	color: #374151;
}

.print-answer-key {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 2px solid #d1d5db;
}

.print-hide-answers .print-answer-key {
	display: none;
}

@page {
	size: letter;
	margin: 0.4in 0.45in;
}

@media print {
	header,
	.modal-overlay,
	.no-print {
		display: none !important;
	}

	.print-only {
		display: block !important;
	}

	body,
	main,
	.container {
		background: #ffffff !important;
		max-width: none !important;
		width: 100% !important;
		min-height: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		color: #111827 !important;
	}

	.print-sheet {
		border: none !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		padding: 0 !important;
	}

	.print-sheet h2 {
		font-size: 1.05rem;
		line-height: 1.2;
	}

	.print-alphabet {
		margin: 0.35rem 0 0.45rem;
		padding: 0.25rem 0;
		font-size: 0.78rem;
	}

	.print-puzzle-card {
		padding: 0.35rem 0;
	}

	.print-puzzle-head {
		font-size: 0.78rem;
		margin-bottom: 0.25rem;
	}

	.print-words {
		gap: 0.28rem 0.65rem;
	}

	.print-word {
		gap: 0.14rem;
	}

	.print-cell {
		min-width: 0.9rem;
	}

	.print-char {
		height: 1.05rem;
		width: 0.9rem;
		font-size: 0.82rem;
	}

	.print-code {
		font-size: 0.62rem;
		line-height: 1.05;
		margin-top: 0.05rem;
	}

	.print-footer {
		margin-top: 0.5rem;
		padding-top: 0.4rem;
		font-size: 0.72rem;
	}

	.print-footer svg {
		width: 58px;
		height: 58px;
	}

	.print-answer-key {
		break-before: page;
		page-break-before: always;
		border-top: none;
		margin-top: 0;
		padding-top: 0;
	}

	.print-hide-answers .print-answer-key {
		display: none !important;
	}
}
