/* Chapter menu — theme burgundy #5d0000 */

.df-chapter-fab {
	position: absolute;
	left: 16px;
	bottom: 72px;
	z-index: 99999;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 18px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: linear-gradient(180deg, #7a1010 0%, #5d0000 55%, #450000 100%);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(93, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
	pointer-events: auto;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.df-chapter-fab:hover,
.df-chapter-fab:focus {
	background: linear-gradient(180deg, #921515 0%, #6d0000 55%, #520000 100%);
	transform: translateY(-1px);
	box-shadow: 0 10px 32px rgba(93, 0, 0, 0.55), 0 3px 10px rgba(0, 0, 0, 0.28);
	outline: 2px solid rgba(255, 255, 255, 0.35);
	outline-offset: 2px;
}

.df-chapter-fab-icon {
	font-size: 15px;
	line-height: 1;
	opacity: 0.95;
}

.df-chapter-panel {
	position: absolute;
	left: 12px;
	bottom: 124px;
	z-index: 99998;
	width: min(92%, 380px);
	max-height: min(58vh, 440px);
	display: flex;
	flex-direction: column;
	border-radius: 14px;
	background: linear-gradient(165deg, #3a0808 0%, #2a0505 100%);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
	pointer-events: auto;
	overflow: hidden;
}

.df-chapter-panel--closed {
	display: none;
}

.df-chapter-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.df-chapter-panel-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

.df-chapter-panel-title .fa-book-open {
	color: #e8b4b4;
	font-size: 14px;
}

.df-chapter-panel-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.df-chapter-panel-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.df-chapter-panel-hint {
	margin: 0 16px 10px;
	color: rgba(255, 230, 230, 0.72);
	font-size: 12px;
	line-height: 1.4;
}

.df-chapter-panel-list {
	overflow-y: auto;
	padding: 4px 10px 12px;
	flex: 1;
	scrollbar-width: thin;
	scrollbar-color: #5d0000 transparent;
}

.df-chapter-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0 0 6px;
	padding: 11px 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.df-chapter-item:hover,
.df-chapter-item:focus {
	background: rgba(93, 0, 0, 0.55);
	border-color: rgba(255, 200, 200, 0.22);
	outline: none;
}

.df-chapter-item-title {
	flex: 1;
	font-weight: 600;
}

.df-chapter-item-page {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(93, 0, 0, 0.65);
	color: #ffe8e8;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.df-chapter-item-page .fa-file-lines {
	font-size: 10px;
	opacity: 0.85;
}

.df-chapter-loading,
.df-chapter-empty {
	color: rgba(255, 230, 230, 0.88);
	font-size: 13px;
	padding: 14px 16px;
}

@media (max-width: 767px) {
	.df-chapter-fab {
		left: 10px;
		bottom: 64px;
		padding: 9px 14px;
		font-size: 12px;
	}

	.df-chapter-panel {
		left: 8px;
		bottom: 112px;
		width: min(94%, 340px);
	}
}
