:root {
	--novel-primary: #8b4513;
	--novel-primary-light: #c17f3a;
	--novel-primary-soft: #fdf6ec;
	--novel-bg: #f7f2ea;
	--novel-card: #ffffff;
	--novel-text: #2c2416;
	--novel-subtext: #7a6a58;
	--novel-line: #e8dfd0;
	--novel-shadow: 0 12px 30px rgba(44, 36, 22, 0.08);
	--novel-radius: 16px;
	--novel-primary-focus-shadow: 0 0 0 3px rgba(139, 69, 19, 0.15);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Microsoft YaHei", "PingFang SC", "Noto Serif SC", serif;
	background: linear-gradient(180deg, #fffaf3 0%, var(--novel-bg) 240px);
	color: var(--novel-text);
}

a {
	color: inherit;
	text-decoration: none;
}

.page {
	width: 100%;
	min-height: 100vh;
	padding: 24px;
}

.shell {
	max-width: 1200px;
	margin: 0 auto;
}

.topbar {
	height: 68px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 20px;
	box-shadow: var(--novel-shadow);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 22px;
	margin-bottom: 20px;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 20px;
}

.brand-badge {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--novel-primary), var(--novel-primary-light));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
}

.search {
	flex: 1;
	max-width: 420px;
	height: 42px;
	background: #fff;
	border: 1px solid var(--novel-line);
	border-radius: 999px;
	display: flex;
	align-items: center;
	padding: 0 6px 0 16px;
}

.search input {
	flex: 1;
	border: 0;
	background: transparent;
	font-size: 14px;
	outline: none;
}

.search button {
	height: 34px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--novel-primary);
	color: #fff;
	cursor: pointer;
	font-size: 13px;
}

.actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.action-pill {
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--novel-primary-soft);
	color: var(--novel-primary);
	font-size: 13px;
	font-weight: 600;
}

.action-pill:hover {
	background: #f5ead8;
}

.breadcrumb-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: -4px 0 18px;
	color: var(--novel-subtext);
	font-size: 13px;
}

.breadcrumb-bar a {
	color: var(--novel-primary);
	font-weight: 600;
}

.breadcrumb-bar a:hover {
	color: var(--novel-primary-light);
}

.breadcrumb-separator {
	color: #b8a995;
}

.breadcrumb-current {
	color: var(--novel-text);
	font-weight: 700;
}

.action-pill-author {
	background: linear-gradient(135deg, #8b4513, #c17f3a);
	color: #fff;
}

.action-pill-author:hover {
	background: linear-gradient(135deg, #7a3c11, #b07233);
	color: #fff;
}

.card {
	background: var(--novel-card);
	border: 1px solid var(--novel-line);
	border-radius: var(--novel-radius);
	box-shadow: var(--novel-shadow);
}

.section-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 14px;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.section-head .more {
	color: var(--novel-primary);
	font-size: 13px;
}

.tag {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	background: var(--novel-primary-soft);
	color: var(--novel-primary);
}

.tag.vip {
	background: #fff3d6;
	color: #a66b00;
}

.tag.free {
	background: #eef8ef;
	color: #2f7a3e;
}

.book-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}

.book-card {
	display: block;
	padding: 12px;
	border-radius: 14px;
	border: 1px solid var(--novel-line);
	background: #fff;
	transition: transform .2s ease, box-shadow .2s ease;
}

.book-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--novel-shadow);
}

.book-cover {
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	object-fit: cover;
	background: linear-gradient(145deg, #eadfce, #d8c4aa);
	margin-bottom: 10px;
}

.book-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.book-meta {
	font-size: 12px;
	color: var(--novel-subtext);
	line-height: 1.5;
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.page-btn,
.page-num {
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid var(--novel-line);
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
}

.page-num.active {
	background: var(--novel-primary);
	border-color: var(--novel-primary);
	color: #fff;
}

.page-btn.disabled {
	opacity: 0.45;
	pointer-events: none;
}

.web-dialog.hidden,
.web-dialog-cancel.hidden {
	display: none !important;
}

.web-dialog {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.web-dialog-mask {
	position: absolute;
	inset: 0;
	background: rgba(44, 36, 22, 0.48);
	backdrop-filter: blur(2px);
}

.web-dialog-panel {
	position: relative;
	width: min(420px, 100%);
	padding: 28px 26px 24px;
	border-radius: 18px;
	border: 1px solid rgba(232, 223, 208, 0.9);
	background: #fff;
	box-shadow: 0 24px 60px rgba(44, 36, 22, 0.22);
	text-align: center;
}

.web-dialog-icon {
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--novel-primary), var(--novel-primary-light));
	color: #fff;
	font-size: 22px;
	font-weight: 700;
}

.web-dialog-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--novel-text);
}

.web-dialog-message {
	margin-top: 10px;
	color: var(--novel-subtext);
	font-size: 15px;
	line-height: 1.7;
	word-break: break-word;
}

.web-dialog-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 22px;
}

.web-dialog-btn {
	min-width: 96px;
	height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.web-dialog-cancel {
	background: var(--novel-primary-soft);
	color: var(--novel-primary);
}

.web-dialog-ok {
	background: linear-gradient(135deg, var(--novel-primary), var(--novel-primary-light));
	color: #fff;
}

.web-dialog-btn:hover {
	opacity: 0.92;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
textarea,
select {
	transition: border-color .2s ease, box-shadow .2s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--novel-primary) !important;
	box-shadow: var(--novel-primary-focus-shadow);
}

.search input {
	border: 0 !important;
	box-shadow: none !important;
}

.search:focus-within {
	border-color: var(--novel-primary) !important;
	box-shadow: var(--novel-primary-focus-shadow);
}

@media (max-width: 768px) {
	.page {
		padding: 14px;
	}

	.topbar {
		height: auto;
		flex-wrap: wrap;
		padding: 14px;
	}

	.search {
		order: 3;
		max-width: 100%;
		width: 100%;
	}
}
