* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #a7bfd0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#main,
#reader {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

#main {
	background: #fff;
	z-index: 10;
}

#mainFrame {
	border: 0;
	width: 100%;
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
}

.page_loader {
	position: absolute;
	inset: 0;
	background: #fff;
	z-index: 20;
	display: none;
}

.loader {
	position: absolute;
	margin: auto;
	inset: 0;
	width: 120px;
	height: 120px;
	border: 16px solid #f3f3f3;
	border-top: 16px solid #3498db;
	border-radius: 50%;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

#reader {
	display: none;
	background: #eceff3;
	z-index: 5;
}

#readerViewport {
	position: absolute;
	inset: 0 0 64px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

#pageScaler {
	transform-origin: center center;
}

#pageFrame {
	border: 0;
	display: block;
	background: #fff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

#readerNav {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid #d8dee8;
	z-index: 30;
}

#readerNav button {
	border: 0;
	border-radius: 999px;
	padding: 10px 18px;
	font-size: 15px;
	cursor: pointer;
	background: #40c9a2;
	color: #fff;
}

#readerNav button:hover {
	filter: brightness(0.95);
}

#readerNav #btnHome {
	background: #5c9cf3;
}

#readerNav #btnAnswers.active {
	background: #f59e0b;
}

#bookLabel {
	font-size: 14px;
	font-weight: 600;
	color: #556;
	min-width: 110px;
	text-align: center;
}

#pageNum {
	min-width: 90px;
	text-align: center;
	font-weight: 600;
	color: #334;
}