/* Lesbian Stories — light reading theme
 * Version synced with KIEMHIEP_VERSION (functions.php).
 */

:root {
	--bg: #f3f4f8;
	--surface: #ffffff;
	--surface-2: #eef1f6;
	--border: #d5dae3;
	--text: #1a1f28;
	--muted: #5f6775;
	--accent: #c41e3a;
	--accent-hover: #a01830;
	--gold: #b8860b;
	--gold-bright: #c9a227;
	--gold-dim: rgba(201, 162, 39, 0.18);
	--sidebar-link: #1565c0;
	--link-on-surface: #1565c0;
	--link-on-surface-hover: #0d47a1;
	--sidebar-width: 300px;
	--ink: transparent;
	--font-body: "Be Vietnam Pro", system-ui, sans-serif;
	--font-display: "Cormorant Garamond", Georgia, serif;
	--radius: 4px;
	--container: 1200px;
	--header-h: 64px;
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 32px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.15s;
}

a:hover {
	color: var(--accent-hover);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.container {
	width: min(100% - 24px, var(--container));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Header */
.site-header {
	background: var(--bg);
}

.site-header__top {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--border);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.site-branding .header-banner__link {
	display: block;
	line-height: 0;
	text-decoration: none;
	border-radius: var(--radius);
}

.site-branding .header-banner__link:focus-visible {
	outline: 2px solid var(--gold-bright);
	outline-offset: 3px;
}

.site-branding .header-banner__img {
	display: block;
	width: auto;
	max-width: min(280px, 55vw);
	height: auto;
	max-height: 56px;
	object-fit: contain;
	object-position: left center;
}

@media (max-width: 768px) {
	.site-branding .header-banner__img {
		max-width: min(220px, 50vw);
		max-height: 48px;
	}
}

.header-inner {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	min-height: var(--header-h);
	flex-wrap: wrap;
}

.site-branding {
	flex-shrink: 0;
}

.site-title,
.footer-logo {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--gold);
	text-transform: uppercase;
	text-decoration: underline;
	text-decoration-color: rgba(201, 162, 39, 0.65);
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

.site-title:hover,
.site-title:focus-visible,
.footer-logo:hover,
.footer-logo:focus-visible {
	text-decoration-thickness: 2px;
	color: var(--gold-bright);
}

.custom-logo-link {
	display: inline-block;
	text-decoration: none;
	border-radius: var(--radius);
}

.custom-logo-link:focus-visible {
	outline: 2px solid var(--gold-bright);
	outline-offset: 3px;
}

.site-tagline {
	margin: 0;
	font-size: 0.7rem;
	color: var(--muted);
}

.custom-logo-link img {
	max-height: 48px;
	width: auto;
}

.primary-nav {
	flex: 1;
}

.primary-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm) var(--space-md);
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav a {
	color: var(--text);
	font-weight: 500;
	font-size: 0.9rem;
}

.primary-nav a:hover {
	color: var(--gold);
}

.header-search {
	display: flex;
	gap: var(--space-sm);
	margin-left: auto;
}

.header-search input {
	flex: 1;
	min-width: 140px;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 7px 12px;
	border-radius: var(--radius);
	font-size: 0.875rem;
}

.header-search button {
	background: var(--accent);
	color: #fff;
	border: none;
	padding: 7px 14px;
	border-radius: var(--radius);
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
}

.header-search button:hover {
	background: var(--accent-hover);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--text);
}

@media (max-width: 900px) {
	.nav-toggle {
		display: flex;
		margin-left: auto;
	}

	.primary-nav {
		display: none;
		width: 100%;
		order: 4;
	}

	.primary-nav.is-open {
		display: block;
	}

	.header-search {
		width: 100%;
		order: 3;
		margin-left: 0;
	}
}

/* Layout */
.site-main {
	padding: var(--space-lg) 0 var(--space-xl);
	min-height: 60vh;
}

.page-title,
.section-header__title {
	font-family: var(--font-display);
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 700;
	color: var(--text);
	margin: 0;
	letter-spacing: 0.04em;
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-md);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--border);
}

.section-header__title::before {
	content: "◆ ";
	color: var(--gold);
	font-size: 0.75em;
}

.home-section {
	margin-bottom: var(--space-xl);
}

.breadcrumb {
	font-size: 0.8rem;
	color: var(--muted);
	margin-bottom: var(--space-md);
}

.breadcrumb .sep {
	margin: 0 6px;
	opacity: 0.5;
}

.breadcrumb .current {
	color: var(--text);
}

/* Top stories slider */
.top-stories {
	margin-bottom: var(--space-xl);
	padding: var(--space-md);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: inset 0 1px 0 var(--gold-dim);
}

.top-stories__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	margin-bottom: var(--space-md);
}

.top-stories__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.top-stories__icon {
	color: var(--gold);
	font-size: 1.1rem;
}

.top-stories__nav {
	display: flex;
	gap: var(--space-xs);
}

.top-stories__btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.top-stories__btn:hover {
	border-color: var(--gold);
	color: var(--gold);
}

.top-stories__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
	-webkit-overflow-scrolling: touch;
}

.top-stories__viewport::-webkit-scrollbar {
	height: 6px;
}

.top-stories__viewport::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

.top-stories__track {
	display: flex;
	gap: 12px;
	padding-bottom: var(--space-xs);
}

.top-story-card {
	position: relative;
	flex: 0 0 132px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color 0.15s, transform 0.15s;
}

.top-story-card:hover {
	border-color: var(--gold);
	transform: translateY(-2px);
}

.top-story-card__rank {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 700;
	color: #fff;
	background: var(--accent);
	border-radius: 2px;
}

.top-story-card__thumb {
	display: block;
	flex-shrink: 0;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background: var(--surface);
	line-height: 0;
}

.top-story-card__img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center top;
}

.top-story-card__img--placeholder {
	min-height: 100%;
	background: linear-gradient(145deg, var(--surface), var(--border));
}

.top-story-card__body {
	flex: 1;
	padding: 6px 8px 8px;
	min-height: 0;
}

.top-story-card__title {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.35;
}

.top-story-card__title a {
	color: var(--text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.top-story-card__title a:hover {
	color: var(--gold);
}

/* Story list cards */
.manga-update-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--space-md);
}

.manga-update-list--compact {
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Trang chủ: ảnh bìa đủ khung (contain, tỷ lệ plugin Leech) */
body.home .manga-thumb-link,
body.home .top-story-card__thumb,
body.home .widget-top-stories__thumb {
	aspect-ratio: var(--kiemhiep-thumb-aspect, 9 / 16);
}

body.home .widget-top-stories__thumb {
	height: auto;
}

body.home .manga-thumb,
body.home .top-story-card__img,
body.home .widget-top-stories__thumb img {
	object-fit: contain;
	object-position: center center;
}

/* Có thể bạn thích */
.related-manga .manga-update-list--compact {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (min-width: 768px) {
	.related-manga .manga-update-list--compact {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.related-manga .manga-rating {
	display: none;
}

.related-manga .chapter-updates li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 10px;
	min-height: 0;
	padding: 5px 0;
}

.related-manga .chapter-updates a {
	display: block;
	flex: none;
	min-width: 0;
	min-height: 40px;
	padding: 8px 0;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.related-manga .chapter-updates time {
	flex-shrink: 0;
	font-size: 0.72rem;
	line-height: 1.2;
}

@media (max-width: 420px) {
	.related-manga .chapter-updates li {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.related-manga .chapter-updates time {
		justify-self: flex-start;
		padding-bottom: 4px;
	}
}

.manga-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.15s;
}

.manga-item:hover {
	border-color: rgba(201, 162, 39, 0.45);
}

.manga-thumb-link {
	flex-shrink: 0;
	align-self: flex-start;
	display: block;
	width: 84px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 2px;
	background: var(--surface-2);
	line-height: 0;
}

.manga-thumb {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	object-fit: cover;
	object-position: center top;
	border-radius: 0;
	background: var(--surface-2);
}

.manga-thumb--placeholder {
	width: 100%;
	height: 100%;
	min-height: 100%;
	background: linear-gradient(135deg, var(--surface-2), var(--border));
}

.manga-item-body {
	flex: 1;
	min-width: 0;
}

.manga-title {
	margin: 0 0 4px;
	font-size: 0.95rem;
	line-height: 1.3;
}

.manga-title a {
	color: var(--text);
}

.manga-title a:hover {
	color: var(--gold);
}

.manga-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0 0 6px;
	font-size: 0.78rem;
	color: var(--muted);
}

.manga-card-meta .sep {
	margin: 0;
	opacity: 0.5;
}

.manga-rating {
	display: inline-flex;
	align-items: center;
	font-size: 0.8rem;
	color: var(--gold);
	margin-bottom: 4px;
}

.manga-rating::before {
	content: "★ ";
}

.chapter-updates {
	list-style: none;
	margin: 0;
	padding: 0;
}

.chapter-updates li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 4px 0;
	border-top: 1px solid var(--border);
	font-size: 0.8rem;
}

.chapter-updates li:first-child {
	border-top: none;
}

.chapter-updates a {
	display: inline-flex;
	align-items: center;
	flex: 1;
	min-width: 48px;
	min-height: 48px;
	padding: 10px 8px;
	margin: -6px 0;
	color: var(--link-on-surface);
	font-weight: 500;
}

.chapter-updates a:hover {
	color: var(--link-on-surface-hover);
}

.chapter-updates time {
	color: var(--muted);
	font-size: 0.75rem;
	white-space: nowrap;
}

.manga-author-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 10px 12px;
	margin: -6px -4px;
	color: inherit;
	box-sizing: border-box;
}

.manga-author-link:hover {
	color: var(--accent);
}

.manga-card-meta .manga-author-link {
	color: var(--muted);
}

.manga-card-meta .manga-author-link:hover {
	color: var(--link-on-surface);
}

/* Single truyen */
.manga-detail {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: var(--space-lg);
	margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
	.manga-detail {
		grid-template-columns: 1fr;
	}

	.manga-detail-cover--empty {
		display: none;
	}

	.page-manga-detail .manga-detail-cover {
		background: transparent;
		max-width: 200px;
		margin: 0 auto var(--space-md);
	}

	.page-manga-detail .manga-detail-cover img {
		object-fit: cover;
		width: 100%;
		max-width: 200px;
		max-height: 280px;
		background: transparent;
		border: 1px solid var(--border);
		border-radius: var(--radius);
	}
}

.manga-detail-cover img {
	width: 100%;
	max-width: 220px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.manga-detail-title {
	font-family: var(--font-display);
	font-size: 1.75rem;
	margin: 0 0 10px;
}

.manga-meta-list {
	margin: var(--space-md) 0;
	padding: 0;
}

.manga-meta-list dt {
	display: inline;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text);
}

.manga-meta-list dt::after {
	content: ": ";
}

.manga-meta-list dd {
	display: inline;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	color: var(--text);
}

.manga-meta-list dd::after {
	content: "";
	display: block;
	margin-bottom: 10px;
}

.manga-meta-list dd:last-of-type::after {
	margin-bottom: 0;
}

.manga-meta-list dd a.story-tag {
	color: var(--accent, #c45c8a);
	text-decoration: none;
}

.manga-meta-list dd a.story-tag:hover {
	text-decoration: underline;
}

.manga-meta-list dd .manga-author-link {
	display: inline;
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
}

.manga-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
	border: none;
	text-align: center;
}

.btn-primary {
	background: var(--accent);
	color: #fff !important;
}

.btn-primary:hover {
	background: var(--accent-hover);
	color: #fff !important;
}

.btn-secondary {
	background: var(--surface-2);
	color: var(--text) !important;
	border: 1px solid var(--border);
}

.btn-secondary:hover {
	border-color: var(--gold);
	color: var(--gold) !important;
}

.btn-nav {
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text) !important;
	font-size: 0.8rem;
	padding: 6px 12px;
}

.btn-link {
	background: none;
	border: none;
	color: var(--accent);
	cursor: pointer;
	padding: 0;
	font-size: 0.875rem;
}

.manga-summary,
.chapter-catalog,
.related-manga,
.manga-comments,
.reader-comments {
	margin-bottom: var(--space-lg);
}

.manga-summary h2,
.related-manga h2,
.reader-comments h2 {
	font-family: var(--font-display);
	font-size: 1.1rem;
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--gold-dim);
}

.summary-content.is-collapsed {
	max-height: 100px;
	overflow: hidden;
	position: relative;
}

.summary-content.is-collapsed::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: linear-gradient(transparent, var(--bg));
}

.summary-content.is-expanded {
	max-height: none;
}

.summary-content.is-expanded::after {
	display: none;
}

/* Chapter catalog */
.chapter-catalog {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.chapter-catalog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border);
}

.chapter-catalog__title {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 8px;
}

.chapter-catalog__icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: #fff;
	border-radius: 2px;
}

.chapter-catalog__icon svg {
	width: 12px;
	height: 12px;
}

.chapter-catalog__sort {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--muted);
	cursor: pointer;
}

.chapter-catalog__sort:hover {
	color: var(--text);
}

.chapter-catalog__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.chapter-catalog__item {
	border-bottom: 1px solid var(--border);
}

.chapter-catalog__item:last-child {
	border-bottom: none;
}

.chapter-catalog__item.is-hidden {
	display: none;
}

.chapter-catalog__link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 16px;
	color: var(--text);
}

.chapter-catalog__link:hover {
	background: var(--surface-2);
	color: var(--text);
}

.chapter-catalog__name {
	font-weight: 600;
	font-size: 0.875rem;
	flex: 1;
	min-width: 0;
}

.chapter-catalog__date {
	flex-shrink: 0;
	font-size: 0.78rem;
	font-style: italic;
	color: var(--muted);
}

.chapter-catalog__more-wrap {
	padding: 10px;
	text-align: center;
	border-top: 1px solid var(--border);
}

.chapter-catalog__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	color: var(--accent);
	cursor: pointer;
	font-size: 0.875rem;
}

.chapter-catalog__more-icon {
	font-size: 0.65rem;
}

.chapter-catalog__more[aria-expanded="true"] .chapter-catalog__more-icon {
	transform: rotate(180deg);
}

/* Reader */
.reader-header {
	text-align: center;
	margin-bottom: var(--space-md);
}

.reader-title {
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 3.5vw, 1.35rem);
	margin: 0;
	font-weight: 700;
	line-height: 1.45;
}

.reader-story-meta {
	margin: 10px 0 0;
	font-size: 0.85rem;
}

.reader-story-meta .reader-story-link {
	color: var(--link-on-surface);
	font-weight: 500;
}

.reader-story-meta .reader-story-link:hover {
	color: var(--gold);
}

.reader-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm);
	margin: var(--space-md) 0;
}

.reader-content {
	max-width: 720px;
	margin: 0 auto;
	background: var(--surface);
	padding: var(--space-md);
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.reader-text {
	font-size: 1.05rem;
	line-height: 1.85;
}

.reader-text p {
	margin: 0 0 1em;
}

.reader-page img {
	margin: 0 auto 8px;
}

/* Archive & misc */
.archive-count,
.taxonomy-description {
	color: var(--muted);
	margin: -8px 0 var(--space-md);
	font-size: 0.875rem;
}

.no-results {
	text-align: center;
	padding: var(--space-xl);
	color: var(--muted);
}

.pagination,
.nav-links {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: var(--space-lg);
	flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
	padding: 6px 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 0.875rem;
}

.pagination .current,
.nav-links .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* Footer */
.site-footer {
	background: var(--surface);
	border-top: 1px solid var(--border);
	padding: var(--space-lg) 0 var(--space-md);
	margin-top: auto;
}

.footer-inner {
	display: grid;
	gap: var(--space-md);
	text-align: center;
}

.footer-desc {
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: var(--muted);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.copyright {
	margin: 0;
	font-size: 0.78rem;
	color: var(--muted);
}

.copyright a {
	color: var(--link-on-surface);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.copyright a:hover,
.copyright a:focus-visible {
	color: var(--link-on-surface-hover);
	text-decoration-thickness: 2px;
}

.page-404 {
	text-align: center;
	padding: 64px 0;
}

.page-404 h1 {
	font-family: var(--font-display);
	font-size: 2.5rem;
}

/* Authors */
.author-header {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-md);
	border-bottom: 1px solid var(--border);
}

.author-avatar img {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--gold-dim);
}

.author-title {
	margin: 0 0 4px;
	font-family: var(--font-display);
	font-size: 1.75rem;
}

.author-count {
	margin: 0;
	color: var(--muted);
	font-size: 0.875rem;
}

.author-bio h2,
.author-stories h2 {
	font-family: var(--font-display);
	font-size: 1.1rem;
	margin-bottom: 12px;
}

.author-directory {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.author-directory__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
}

.author-directory__link:hover {
	border-color: var(--gold);
	color: var(--text);
}

.author-directory__thumb img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.author-directory__name {
	font-weight: 600;
	font-size: 0.9rem;
}

.author-directory__count {
	font-size: 0.75rem;
	color: var(--muted);
}

.comment-list {
	list-style: none;
	padding: 0;
}

/* Layout sidebar */
.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
	gap: var(--space-lg);
	align-items: start;
	margin-top: var(--space-md);
}

.layout-with-sidebar--home {
	margin-top: var(--space-lg);
}

.layout-with-sidebar__aside {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

@media (max-width: 1024px) {
	.layout-with-sidebar {
		grid-template-columns: 1fr;
	}

	/* Sidebar dưới nội dung chính (DOM đã đặt aside sau main). */
	.layout-with-sidebar__main {
		order: 1;
	}

	.layout-with-sidebar__aside {
		order: 2;
	}
}

/* Widget — Top truyện */
.widget-top-stories,
.widget-recent-comments {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.widget-top-stories__tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
}

.widget-top-stories__tab {
	margin: 0;
	padding: 10px 6px;
	border: none;
	background: var(--surface-2);
	color: var(--muted);
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.widget-top-stories__tab.is-active {
	background: var(--accent);
	color: #fff;
	box-shadow: inset 0 -2px 0 var(--gold-bright);
}

.widget-top-stories__panel:not(.is-active) {
	display: none;
}

.widget-top-stories__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget-top-stories__item {
	display: grid;
	grid-template-columns: 36px 48px minmax(0, 1fr) auto;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
}

.widget-top-stories__item:last-child {
	border-bottom: none;
}

.widget-top-stories__rank {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1;
	background: linear-gradient(180deg, #f5d76e 0%, #c9a227 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.widget-top-stories__thumb {
	display: block;
	width: 48px;
	height: 64px;
	border-radius: 2px;
	overflow: hidden;
	flex-shrink: 0;
}

.widget-top-stories__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.widget-top-stories__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--surface-2);
}

.widget-top-stories__body {
	min-width: 0;
}

.widget-top-stories__title {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sidebar-link);
	line-height: 1.3;
	margin-bottom: 2px;
}

.widget-top-stories__title:hover {
	color: var(--link-on-surface-hover);
}

.widget-top-stories__chapter {
	display: block;
	font-size: 0.75rem;
	color: var(--muted);
}

.widget-top-stories__chapter:hover {
	color: var(--text);
}

.widget-top-stories__views {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.7rem;
	color: var(--muted);
	white-space: nowrap;
}

.widget-top-stories__views-icon {
	font-size: 0.85rem;
	opacity: 0.85;
}

.widget-top-stories__empty {
	padding: 16px 12px;
	color: var(--muted);
	font-size: 0.8125rem;
}

/* Widget — Bình luận mới */
.widget-recent-comments__title {
	margin: 0;
	padding: 12px 14px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--text);
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
}

.widget-recent-comments__scroll {
	max-height: 420px;
	overflow-y: auto;
}

.widget-recent-comments__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget-recent-comments__item {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
}

.widget-recent-comments__item:last-child {
	border-bottom: none;
}

.widget-recent-comments__story {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 8px;
	margin-bottom: 8px;
	font-size: 0.8125rem;
}

.widget-recent-comments__story > a:first-child {
	color: var(--sidebar-link);
	font-weight: 600;
}

.widget-recent-comments__chapter {
	color: var(--muted);
	font-size: 0.75rem;
}

.widget-recent-comments__meta {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) auto;
	gap: 8px;
	align-items: start;
}

.widget-recent-comments__avatar {
	border-radius: 50%;
	width: 36px;
	height: 36px;
}

.widget-recent-comments__author {
	display: block;
	font-weight: 700;
	color: var(--gold-bright);
	font-size: 0.8125rem;
	margin-bottom: 4px;
}

.widget-recent-comments__text {
	margin: 0;
	font-size: 0.75rem;
	color: var(--muted);
	line-height: 1.45;
}

.widget-recent-comments__time {
	font-size: 0.68rem;
	color: var(--muted);
	white-space: nowrap;
	text-align: right;
}

.widget-recent-comments__empty {
	padding: 16px 14px;
	margin: 0;
	color: var(--muted);
	font-size: 0.8125rem;
}

.comment-body {
	background: var(--surface);
	padding: 12px;
	border-radius: var(--radius);
	margin-bottom: 8px;
	border: 1px solid var(--border);
}
