html,
body {
	height: 100%;
}

.epub_viewer_header {
	align-items: center;
	display: flex;
	gap: 0.75rem;
}

.epub_viewer_header .title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.epub_viewer_actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 0.5rem;
}

.epub_viewer_button {
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 3px;
	color: #333;
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
	padding: 0.45rem 0.7rem;
}

.epub_viewer_button:hover,
.epub_viewer_button:focus {
	background: #f2f2f2;
}

.epub_viewer {
	background: #f5f5f5;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	overflow: hidden;
	padding: 1rem;
}

.epub_viewer_stage {
	background: #fff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
	height: auto;
	margin: 0 auto;
	max-width: 980px;
	min-height: 0;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.epub_viewer_stage .epub-container,
.epub_viewer_stage .epub-view,
.epub_viewer_stage iframe {
	box-sizing: border-box;
}

.epub_viewer_stage iframe {
	border: 0;
	padding: 0 !important;
}

.epub_viewer_status {
	background: #fff;
	border: 1px solid #ddd;
	box-sizing: border-box;
	margin: 0 auto 1rem;
	max-width: 980px;
	padding: 0.75rem 1rem;
	width: 100%;
}

@media (max-width: 640px) {
	.epub_viewer_header {
		flex-wrap: wrap;
	}

	.epub_viewer_header .title {
		flex-basis: 100%;
		order: 3;
	}

	.epub_viewer_actions {
		margin-left: auto;
	}

	.epub_viewer {
		padding: 0.5rem;
	}

	.epub_viewer_stage {
		min-height: 0;
	}
}
