/* Demfilz Flipbook viewer. */
.dflb-wrap {
	--dflb-bg: #2b2f33;
	--dflb-bar: #1f2327;
	--dflb-fg: #eef1f5;
	--dflb-muted: #cfd4d9;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto 1.5em;
	line-height: 1.4;
	container-type: inline-size;
}
.dflb-wrap *,
.dflb-wrap *::before,
.dflb-wrap *::after {
	box-sizing: border-box;
}
.alignwide > .dflb-wrap,
.alignfull > .dflb-wrap {
	max-width: none;
}
.dflb-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--dflb-h, 420px);
	padding: 22px 16px;
	overflow: hidden;
	background: var(--dflb-bg);
	border-radius: 10px 10px 0 0;
}
.dflb-stage:focus-visible {
	outline: 2px solid #8ab4ff;
	outline-offset: -4px;
}
.dflb-book {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}
.dflb-book .stf__parent {
	margin: 0 auto;
}
.dflb-loading {
	position: absolute;
	color: var(--dflb-muted);
	font-size: 14px;
	letter-spacing: 0.04em;
}
.dflb-page {
	background: #fff;
	overflow: hidden;
}
.dflb-page img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

/* Toolbar. */
.dflb-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 12px;
	background: var(--dflb-bar);
	border-radius: 0 0 10px 10px;
}
.dflb-wrap .dflb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.08);
	box-shadow: none;
	color: var(--dflb-fg);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s;
}
.dflb-wrap .dflb-btn:hover,
.dflb-wrap .dflb-btn:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}
.dflb-wrap .dflb-btn:focus-visible {
	outline: 2px solid #8ab4ff;
	outline-offset: 1px;
}
.dflb-wrap .dflb-btn[hidden] {
	display: none;
}
.dflb-ico {
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--dflb-icon) center / contain no-repeat;
	mask: var(--dflb-icon) center / contain no-repeat;
}
.dflb-first { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 5v14M18 6l-7 6 7 6'/%3E%3C/svg%3E"); }
.dflb-prev { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"); }
.dflb-next { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); }
.dflb-last { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 5v14M6 6l7 6-7 6'/%3E%3C/svg%3E"); }
.dflb-zoom { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E"); }
.dflb-zoom[aria-pressed="true"] { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M7.5 10.5h6'/%3E%3C/svg%3E"); }
.dflb-full { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E"); }
.is-full .dflb-full { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5'/%3E%3C/svg%3E"); }
.dflb-dl { --dflb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.dflb-pageno {
	min-width: 96px;
	color: var(--dflb-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}
.dflb-sp {
	flex: 1 1 10px;
	max-width: 40px;
}
.dflb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Zoom. */
.dflb-wrap.is-zoom .dflb-stage {
	overflow: auto;
	cursor: grab;
}
.dflb-wrap.is-zoom .dflb-book {
	transform: scale(1.8);
	transform-origin: 0 0;
}

/* Fullscreen. */
.dflb-wrap.is-full {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	background: var(--dflb-bg);
}
.dflb-wrap.is-full .dflb-stage {
	flex: 1 1 auto;
	min-height: 0;
	border-radius: 0;
}
.dflb-wrap.is-full .dflb-bar {
	border-radius: 0;
}
.dflb-wrap:fullscreen {
	background: var(--dflb-bg);
}

.dflb-notice {
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
}

@media (max-width: 815px) {
	.dflb-stage {
		padding: 14px 8px;
	}
	.dflb-wrap .dflb-btn {
		width: 40px;
		height: 40px;
	}
}

/* Narrow flipbooks (phones, sidebars): one toolbar row. */
@container (max-width: 480px) {
	.dflb-wrap .dflb-first,
	.dflb-wrap .dflb-last,
	.dflb-sp {
		display: none;
	}
	.dflb-bar {
		gap: 4px;
		padding: 8px;
	}
	.dflb-pageno {
		min-width: 0;
		padding: 0 4px;
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dflb-wrap .dflb-btn {
		transition: none;
	}
}

/* Standalone preview page. */
body.dflb-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	margin: 0;
	padding: 20px;
	box-sizing: border-box;
	background: #3a3f44;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.dflb-preview-main {
	width: 100%;
}
.dflb-preview .dflb-wrap {
	margin-bottom: 0;
}
