.at-flipbook {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: #111;
	color: var(--white, #fff);
	font-family: inherit;
}

.at-flipbook[hidden] {
	display: none !important;
}

.at-flipbook__stage {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.at-flipbook__book {
	position: absolute;
	inset: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
}

.at-flipbook__zoom {
	position: absolute;
	inset: 0;
	overflow: hidden;
	transform-origin: center center;
}

.at-flipbook__sheet {
	position: absolute;
	left: 50%;
	top: 50%;
	display: block;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.at-flipbook__book > canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.at-flipbook__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	border: 0;
	border-radius: 50%;
	background: var(--green, #81b92f);
	color: var(--white, #fff);
	cursor: pointer;
	line-height: 1;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.at-flipbook__nav:hover,
.at-flipbook__nav:focus-visible {
	background: var(--black-lgt, #343434);
}

.at-flipbook__nav:focus-visible {
	outline: 3px solid var(--white, #fff);
	outline-offset: 3px;
}

.at-flipbook__nav:disabled {
	opacity: 0.35;
	cursor: default;
	background: var(--black-lgt, #343434);
}

.at-flipbook__nav--prev {
	left: 6px;
}

.at-flipbook__nav--next {
	right: 6px;
}

.at-flipbook__nav i {
	font-size: 22px;
}

.at-flipbook__page {
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	font-size: 14px;
	letter-spacing: 0.04em;
}

.at-flipbook__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: var(--black-lgt, #343434);
	color: var(--white, #fff);
	cursor: pointer;
}

.at-flipbook__close:hover,
.at-flipbook__close:focus-visible {
	background: var(--green, #81b92f);
}

.at-flipbook__close:focus-visible {
	outline: 3px solid var(--white, #fff);
	outline-offset: 3px;
}

.at-flipbook__bar {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 56px;
	padding: 8px 16px max(12px, env(safe-area-inset-bottom));
	background: var(--black-lgt, #343434);
}

.at-flipbook__bar button,
.at-flipbook__bar a {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--white, #fff);
	font: inherit;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.at-flipbook__bar button:hover,
.at-flipbook__bar a:hover,
.at-flipbook__bar button:focus-visible,
.at-flipbook__bar a:focus-visible {
	background: rgba(255, 255, 255, 0.12);
}

.at-flipbook__bar button:focus-visible,
.at-flipbook__bar a:focus-visible {
	outline: 3px solid var(--white, #fff);
	outline-offset: 2px;
}

.at-flipbook__bar i {
	font-size: 18px;
}

.at-flipbook__share {
	position: relative;
}

.at-flipbook__share-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	display: none;
	min-width: 180px;
	padding: 8px;
	border-radius: 8px;
	background: #1a1a1a;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.at-flipbook__share.is-open .at-flipbook__share-menu {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.at-flipbook__share-menu a,
.at-flipbook__share-menu button {
	justify-content: flex-start;
	width: 100%;
}

.at-flipbook__status {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.at-flipbook__status[hidden] {
	display: none !important;
}

.at-flipbook__spinner {
	width: 42px;
	height: 42px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--green, #81b92f);
	border-radius: 50%;
	animation: at-flipbook-spin 0.8s linear infinite;
}

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

body.at-flipbook-open {
	overflow: hidden;
}

.flipbook[data-flip] {
	cursor: pointer;
}

.at-flipbook.is-zoomed .at-flipbook__book {
	cursor: grab;
	touch-action: none;
}

.at-flipbook.is-zoomed .at-flipbook__sheet {
	pointer-events: none;
}

.at-flipbook.is-panning .at-flipbook__book {
	cursor: grabbing;
}

@media (min-width: 1200px) {
	.at-flipbook__nav {
		width: 56px;
		height: 56px;
		margin-top: -28px;
	}

	.at-flipbook__nav--prev {
		left: 12px;
	}

	.at-flipbook__nav--next {
		right: 12px;
	}

	.at-flipbook__book {
		inset: 12px 72px;
	}
}
