body.history-page-body,
body.bookcase-page-body {
	background:
		radial-gradient(circle at top, rgba(74, 155, 110, 0.12) 0%, rgba(248, 251, 255, 0.96) 34%, #f6f8fb 100%),
		linear-gradient(180deg, rgba(74, 155, 110, 0.03) 0%, rgba(255, 255, 255, 0) 26%);
}

.history-page,
.bookcase-page {
	padding: 28px 0 44px;
}

.history-shell,
.bookcase-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 24px;
	align-items: start;
}

.history-side,
.bookcase-side {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
}

.history-main,
.history-side-card,
.bookcase-main,
.bookcase-side-card {
	border: 1px solid rgba(201, 228, 210, 0.88);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 24px 54px rgba(15, 23, 42, 0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.history-main,
.bookcase-main,
.history-side-card,
.bookcase-side-card {
	position: relative;
}

.history-main,
.bookcase-main {
	padding: 24px 22px 22px;
}

.history-main::before,
.history-side-card::before,
.bookcase-main::before,
.bookcase-side-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 24px;
	padding: 1px;
	background: linear-gradient(135deg, rgba(74, 155, 110, 0.28), rgba(74, 155, 110, 0.02));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.history-main::after,
.history-side-card::after,
.bookcase-main::after,
.bookcase-side-card::after {
	content: "";
	position: absolute;
	left: 22px;
	right: 22px;
	top: 0;
	height: 4px;
	border-radius: 0 0 999px 999px;
	background: linear-gradient(90deg, rgba(74, 155, 110, 0.92) 0%, rgba(91, 178, 126, 0.65) 55%, rgba(74, 155, 110, 0.12) 100%);
}

.history-hero-mark,
.bookcase-hero-mark {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(74, 155, 110, 0.16) 0%, rgba(74, 155, 110, 0.05) 100%);
	border: 1px solid rgba(74, 155, 110, 0.18);
	box-shadow: 0 14px 28px rgba(74, 155, 110, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
	color: #4a9b6e;
	font-size: 28px;
}

.history-badge,
.bookcase-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(74, 155, 110, 0.09);
	border: 1px solid rgba(74, 155, 110, 0.12);
	color: #2f6f4b;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.history-title,
.bookcase-title {
	margin: 14px 0 8px;
	font-size: 30px;
	line-height: 1.25;
	color: #1f2937;
}

.history-subtitle,
.bookcase-subtitle {
	margin: 0 auto;
	max-width: 620px;
	font-size: 14px;
	line-height: 1.8;
	color: #64748b;
}

.history-points,
.bookcase-points {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.history-point,
.bookcase-point {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(201, 228, 210, 0.9);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
	font-size: 12px;
	color: #38654b;
}

.history-point i,
.bookcase-point i,
.history-hero-toggle i,
.bookcase-filter-btn i {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(74, 155, 110, 0.12);
	color: #4a9b6e;
	font-size: 12px;
}

.history-panel,
.bookcase-panel {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.history-panel-head,
.bookcase-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.history-panel-title,
.bookcase-panel-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #1f2937;
}

.history-panel-subtitle,
.bookcase-panel-subtitle {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #64748b;
}

.history-actions,
.bookcase-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.history-stat,
.bookcase-stat,
.history-filter,
.bookcase-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border-radius: 999px;
	background: #f5faf7;
	border: 1px solid rgba(184, 220, 197, 0.85);
	font-size: 13px;
	color: #38654b;
}

.history-stat strong,
.bookcase-stat strong {
	font-size: 14px;
	color: #1f2937;
}

.history-filter,
.bookcase-filter {
	padding: 4px;
	gap: 4px;
}

.history-filter-btn,
.bookcase-filter-btn {
	border: 0;
	background: transparent;
	color: #38654b;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 12px;
	border-radius: 999px;
	cursor: pointer;
}

.history-filter-btn.active,
.bookcase-filter-btn.active {
	background: linear-gradient(135deg, #4a9b6e 0%, #3f8a60 100%);
	color: #fff;
	box-shadow: 0 8px 16px rgba(74, 155, 110, 0.14);
}

.history-group,
.bookcase-group,
.history-grid,
.bookcase-grid {
	display: grid;
	gap: 14px;
}

.history-group + .history-group,
.bookcase-group + .bookcase-group {
	margin-top: 16px;
}

.history-group-head,
.bookcase-group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 2px;
}

.history-group-title,
.bookcase-group-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1f2937;
}

.history-group-subtitle,
.bookcase-group-subtitle {
	font-size: 12px;
	color: #64748b;
}

.history-card,
.bookcase-card {
	display: grid;
	grid-template-columns: 108px minmax(0, 1fr);
	gap: 16px;
	padding: 16px;
	position: relative;
	border-radius: 20px;
	background: linear-gradient(180deg, rgba(250, 252, 253, 0.96) 0%, rgba(244, 248, 251, 0.98) 100%);
	border: 1px solid rgba(226, 232, 240, 0.85);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px rgba(15, 23, 42, 0.025);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover,
.bookcase-card:hover {
	border-color: rgba(74, 155, 110, 0.20);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 18px rgba(15, 23, 42, 0.035);
	transform: translateY(-1px);
}

.history-card-primary,
.history-card.latest,
.bookcase-card-primary,
.bookcase-card.favorite {
	border-color: rgba(74, 155, 110, 0.28);
	background: linear-gradient(180deg, rgba(244, 252, 247, 0.98) 0%, rgba(246, 250, 252, 0.98) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 16px 26px rgba(74, 155, 110, 0.08);
}

.history-card-primary:hover,
.history-card.latest:hover,
.bookcase-card-primary:hover,
.bookcase-card.favorite:hover {
	border-color: rgba(74, 155, 110, 0.32);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 18px 28px rgba(74, 155, 110, 0.11);
}

.history-cover-wrap,
.bookcase-cover-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.history-cover,
.bookcase-cover {
	position: relative;
	width: 108px;
	height: 144px;
	border-radius: 16px;
	overflow: hidden;
	background: #eef3f7;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.history-cover img,
.bookcase-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.history-rank,
.bookcase-rank {
	position: absolute;
	top: 10px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.history-rank-primary,
.history-rank.latest,
.bookcase-rank-primary,
.bookcase-rank.favorite {
	background: linear-gradient(135deg, #4a9b6e 0%, #3f8a60 100%);
	box-shadow: 0 8px 16px rgba(74, 155, 110, 0.24);
}

.history-current-badge,
.bookcase-current-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.78);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
}

.history-info,
.bookcase-info {
	min-width: 0;
}

.history-topline,
.bookcase-topline {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.history-book-title,
.bookcase-book-title {
	margin: 0;
	font-size: 20px;
	line-height: 1.4;
	font-weight: 700;
	min-width: 0;
}

.history-book-title a,
.bookcase-book-title a {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: #1f2937;
	text-decoration: none;
}

.history-remove-btn,
.bookcase-remove-btn {
	flex: 0 0 auto;
	border: 0;
	background: rgba(244, 114, 62, 0.08);
	color: #c2410c;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.history-meta,
.bookcase-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.history-type-tag,
.bookcase-type-tag,
.history-chip,
.bookcase-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.history-chip,
.bookcase-chip {
	background: #f5faf7;
	border: 1px solid rgba(184, 220, 197, 0.85);
	color: #38654b;
}

.history-readline,
.history-latestline,
.bookcase-readline,
.bookcase-latestline {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.85);
	font-size: 14px;
	line-height: 1.7;
	color: #475569;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.history-readline strong,
.history-latestline strong,
.bookcase-readline strong,
.bookcase-latestline strong {
	color: #1f2937;
}

.history-progress-box,
.bookcase-progress-box {
	margin-top: 14px;
	padding: 14px;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 252, 0.98) 100%);
	border: 1px solid rgba(226, 232, 240, 0.85);
}

.history-progress-head,
.bookcase-progress-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	color: #475569;
}

.history-progress-head strong,
.bookcase-progress-head strong {
	font-size: 14px;
	color: #1f2937;
}

.history-progress-bar,
.bookcase-progress-bar {
	margin-top: 10px;
	height: 8px;
	border-radius: 999px;
	background: #e6edf1;
	overflow: hidden;
}

.history-progress-fill,
.bookcase-progress-fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #4a9b6e 0%, #67bc88 100%);
}

.history-progress-note,
.bookcase-progress-note {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.7;
	color: #64748b;
}

.history-card-actions,
.bookcase-card-actions {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.history-action-btn,
.bookcase-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.history-action-btn.primary,
.bookcase-action-btn.primary {
	background: linear-gradient(135deg, #4a9b6e 0%, #3f8a60 100%);
	color: #fff;
	box-shadow: 0 10px 20px rgba(74, 155, 110, 0.16);
}

.history-action-btn.secondary,
.bookcase-action-btn.secondary {
	background: #edf6f0;
	color: #27563d;
	border: 1px solid #c9e4d2;
}

.history-empty,
.bookcase-empty {
	padding: 34px 20px;
	border-radius: 20px;
	text-align: center;
	background: linear-gradient(180deg, rgba(250, 252, 253, 0.96) 0%, rgba(244, 248, 251, 0.98) 100%);
	border: 1px solid rgba(226, 232, 240, 0.85);
}

.history-empty-icon,
.bookcase-empty-icon {
	width: 68px;
	height: 68px;
	margin: 0 auto 14px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(74, 155, 110, 0.14) 0%, rgba(74, 155, 110, 0.04) 100%);
	color: #4a9b6e;
	font-size: 28px;
}

.history-empty-title,
.bookcase-empty-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #1f2937;
}

.history-empty-text,
.bookcase-empty-text {
	margin: 10px auto 0;
	max-width: 460px;
	font-size: 14px;
	line-height: 1.8;
	color: #64748b;
}

.history-empty-actions,
.bookcase-empty-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 18px;
}

.history-side-card,
.bookcase-side-card {
	padding: 20px 18px 18px;
}

.history-side-title,
.bookcase-side-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #1f2937;
}

.history-side-subtitle,
.bookcase-side-subtitle {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #64748b;
}

.history-side-list,
.bookcase-side-list {
	list-style: none;
	padding: 0;
	margin: 18px 0 0;
	display: grid;
	gap: 12px;
}

.history-side-item,
.bookcase-side-item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	padding: 12px 12px 10px;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(250, 252, 253, 0.96) 0%, rgba(244, 248, 251, 0.98) 100%);
	border: 1px solid rgba(226, 232, 240, 0.85);
}

.history-side-cover,
.bookcase-side-cover {
	width: 64px;
	height: 84px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef3f7;
	box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.history-side-cover img,
.bookcase-side-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.history-side-info,
.bookcase-side-info {
	min-width: 0;
}

.history-side-item a,
.bookcase-side-item a {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-decoration: none;
	color: #1f2937;
	font-size: 14px;
	line-height: 1.7;
	font-weight: 700;
}

.history-side-author,
.bookcase-side-author {
	display: block;
	margin-top: 6px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	color: #64748b;
	text-decoration: none;
}

.history-side-tags,
.bookcase-side-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.history-side-tag,
.bookcase-side-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.history-side-tag.type,
.bookcase-side-tag.type {
	background: rgba(74, 155, 110, 0.10);
	color: #2f8f53;
}

.history-side-tag.status,
.bookcase-side-tag.status {
	background: rgba(59, 130, 246, 0.10);
	color: #2563eb;
}

.bookcase-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.bookcase-pagination a,
.bookcase-pagination strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.bookcase-pagination a {
	background: #fff;
	color: #475569;
	border: 1px solid #e3e8ee;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.bookcase-pagination strong {
	background: linear-gradient(135deg, #5bb27e 0%, #4a9b6e 100%);
	color: #fff;
	box-shadow: 0 10px 22px rgba(91, 178, 126, 0.24);
}

@media (max-width: 980px) {
	.history-shell,
	.bookcase-shell {
		grid-template-columns: 1fr;
	}

	.history-side,
	.bookcase-side {
		order: 2;
	}
}

@media (max-width: 700px) {
	.history-page,
	.bookcase-page {
		padding: 20px 0 34px;
	}

	.history-main,
	.history-side-card,
	.bookcase-main,
	.bookcase-side-card {
		border-radius: 20px;
	}

	.history-main,
	.bookcase-main {
		padding: 20px 16px 18px;
	}

	.history-main::after,
	.history-side-card::after,
	.bookcase-main::after,
	.bookcase-side-card::after {
		left: 16px;
		right: 16px;
	}

	.history-title,
	.bookcase-title {
		font-size: 24px;
	}

	.history-card,
	.bookcase-card {
		grid-template-columns: 1fr;
	}

	.history-cover-wrap,
	.bookcase-cover-wrap {
		flex-direction: row;
		justify-content: center;
		align-items: flex-start;
	}

	.history-current-badge,
	.bookcase-current-badge {
		position: absolute;
		left: 12px;
		top: 18px;
		margin-top: 0;
		z-index: 2;
	}

	.history-cover,
	.bookcase-cover {
		width: 96px;
		height: 128px;
		margin: 0;
	}

	.history-topline,
	.bookcase-topline {
		flex-direction: column;
		align-items: center;
		padding-top: 6px;
	}

	.history-info,
	.bookcase-info {
		text-align: center;
	}

	.history-meta,
	.history-card-actions,
	.bookcase-meta,
	.bookcase-card-actions {
		justify-content: center;
	}

	.history-card-actions,
	.bookcase-card-actions {
		width: 100%;
		display: flex;
		justify-content: center !important;
		align-items: center;
	}

	.history-book-title,
	.bookcase-book-title {
		width: 100%;
	}

	.history-remove-btn,
	.bookcase-remove-btn {
		position: absolute;
		top: 12px;
		right: 12px;
	}

	.history-panel-head,
	.history-card-actions,
	.history-empty-actions,
	.bookcase-panel-head,
	.bookcase-card-actions,
	.bookcase-empty-actions {
		justify-content: flex-start;
	}

	.history-filter,
	.bookcase-filter {
		justify-content: center;
	}

	.history-side-item,
	.bookcase-side-item {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.history-side-cover,
	.bookcase-side-cover {
		width: 56px;
		height: 76px;
	}
}
