/*
Theme Name: Yeolreads Reader
Theme URI: https://yeolreads.com/
Author: Yeolreads
Description: A reading-first WordPress block theme for translated novels, chapter libraries, and private reading communities. Designed for Yeolreads with catalogue cards, comfortable long-form typography, responsive layouts, and reader controls.
Version: 2.3.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: yeolreads-reader
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--yeol-radius: 18px;
	--yeol-radius-small: 10px;
	--yeol-shadow: 0 18px 45px rgba(31, 24, 35, 0.08);
	--yeol-border: rgba(79, 54, 81, 0.13);
	--yeol-reader-font-size: 1.12rem;
}

html { scroll-behavior: smooth; }

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

/* Header */
.yeol-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--yeol-border);
}
.admin-bar .yeol-site-header { top: 32px; }

.yeol-header-inner { min-height: 70px; }
.yeol-header-inner .wp-block-site-title { letter-spacing: -.03em; }
.yeol-header-inner .wp-block-navigation-item__content { text-decoration: none; }
.yeol-header-inner .wp-block-navigation-item__content:hover { opacity: .72; }
.yeol-header-inner .wp-block-navigation { row-gap: .5rem; }
.yeol-header-inner .wp-block-navigation-item__label { white-space: nowrap; }
.yeol-header-inner .wp-block-navigation__container { column-gap: clamp(1rem, 2vw, 2rem); }
@media (max-width: 980px) {
	.yeol-header-inner .wp-block-navigation-item__label { white-space: normal; }
}

/* Hero */
.yeol-hero {
	position: relative;
	overflow: hidden;
	border-radius: 0 0 34px 34px;
	border-bottom: 1px solid var(--yeol-border);
}
.yeol-hero::after {
	content: "";
	position: absolute;
	inset: auto -10% -60% auto;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(155, 103, 147, .17), transparent 67%);
	pointer-events: none;
}
.yeol-eyebrow {
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

/* Layout headings */
.yeol-section-heading { margin-bottom: 1.4rem; }
.yeol-section-heading h2 { letter-spacing: -.035em; }

/* Cards / catalogue */
.yeol-card,
.yeol-card.wp-block-group {
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--yeol-border);
	border-radius: var(--yeol-radius);
	box-shadow: 0 8px 28px rgba(31, 24, 35, 0.045);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.yeol-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--yeol-shadow);
	border-color: rgba(121, 77, 116, .26);
}
.yeol-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.yeol-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform .3s ease;
}
.yeol-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
.yeol-card .wp-block-post-title a { text-decoration: none; }
.yeol-card .wp-block-post-date { opacity: .66; }
.yeol-card .wp-block-post-excerpt__excerpt { margin-bottom: 0; }

/* Article / novel / chapter */
.yeol-article-shell {
	border: 1px solid var(--yeol-border);
	border-radius: 24px;
	box-shadow: var(--yeol-shadow);
}
.yeol-article-header { text-align: center; }
.yeol-article-header .wp-block-post-title { letter-spacing: -.045em; }
.yeol-article-header .wp-block-post-date,
.yeol-article-header .wp-block-post-terms { font-size: .88rem; opacity: .7; }

.yeol-featured-cover img {
	max-height: 620px;
	width: auto;
	max-width: 100%;
	margin-inline: auto;
	border-radius: var(--yeol-radius);
	box-shadow: 0 18px 42px rgba(32, 22, 34, .12);
}

.yeol-reader-content {
	font-size: var(--yeol-reader-font-size);
	line-height: 1.92;
	color: #000000;
}
body:not(.yeol-night-reading) .yeol-article-shell,
body:not(.yeol-night-reading) .yeol-reader-content,
body:not(.yeol-night-reading) .yeol-reader-content p,
body:not(.yeol-night-reading) .yeol-reader-content li,
body:not(.yeol-night-reading) .yeol-reader-content blockquote {
	color: #000000 !important;
}
.yeol-reader-content p { margin-block: 0 1.18em; }
.yeol-reader-content h2,
.yeol-reader-content h3,
.yeol-reader-content h4 { line-height: 1.25; margin-top: 2.1em; }
.yeol-reader-content img { border-radius: var(--yeol-radius-small); }
.yeol-reader-content hr { margin-block: 2.5rem; opacity: .45; }

/* Reader controls */
.yeol-reader-tools {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .55rem;
	margin: 1.2rem auto 2rem;
	padding: .65rem;
	max-width: max-content;
	border: 1px solid var(--yeol-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, .76);
	box-shadow: 0 8px 22px rgba(31, 24, 35, .05);
	backdrop-filter: blur(12px);
}
.yeol-reader-tools span {
	padding-inline: .4rem;
	font: 700 .72rem/1 var(--wp--preset--font-family--ui, sans-serif);
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .68;
}
.yeol-reader-tools button {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: .58rem .8rem;
	background: var(--wp--preset--color--mist, #efe9ee);
	color: var(--wp--preset--color--ink, #211a23);
	font: 700 .82rem/1 var(--wp--preset--font-family--ui, sans-serif);
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease;
}
.yeol-reader-tools button:hover { transform: translateY(-1px); opacity: .84; }
.yeol-reader-tools button:focus-visible { outline: 3px solid var(--wp--preset--color--accent, #79526f); outline-offset: 2px; }

/* Reader night mode */
body.yeol-night-reading {
	background: #171319;
	color: #eee8ef;
}
body.yeol-night-reading .yeol-site-header,
body.yeol-night-reading .yeol-site-footer { background: rgba(23, 19, 25, .94) !important; }
body.yeol-night-reading .yeol-article-shell { background: #201a22 !important; border-color: rgba(255,255,255,.10); color: #eee8ef; }
body.yeol-night-reading .yeol-reader-content,
body.yeol-night-reading .yeol-reader-content p,
body.yeol-night-reading .yeol-reader-content li,
body.yeol-night-reading .yeol-reader-content blockquote { color: #eee8ef !important; }
body.yeol-night-reading .yeol-reader-tools { background: rgba(32, 26, 34, .9); border-color: rgba(255,255,255,.12); }
body.yeol-night-reading .yeol-reader-tools button { background: #342c37; color: #f6eff6; }
body.yeol-night-reading a { color: #ddb9d8; }
body.yeol-night-reading .wp-block-separator { border-color: rgba(255,255,255,.16); }

/* Previous / next */
.yeol-chapter-nav {
	border-top: 1px solid var(--yeol-border);
	padding-top: 1.4rem;
}
.yeol-chapter-nav a {
	display: inline-block;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--ui, sans-serif);
	font-size: .9rem;
	font-weight: 700;
}

/* Password / restricted content */
.post-password-form {
	padding: 1.5rem;
	border: 1px solid var(--yeol-border);
	border-radius: var(--yeol-radius);
	background: var(--wp--preset--color--soft, #faf7f9);
}
.post-password-form input[type="password"] {
	min-height: 44px;
	border: 1px solid var(--yeol-border);
	border-radius: 10px;
	padding: .65rem .8rem;
}
.post-password-form input[type="submit"] {
	min-height: 44px;
	border: 0;
	border-radius: 10px;
	padding: .65rem 1rem;
	background: var(--wp--preset--color--accent, #79526f);
	color: white;
	font-weight: 700;
	cursor: pointer;
}

/* Search */
.wp-block-search__inside-wrapper {
	border-radius: 999px !important;
	overflow: hidden;
	border-color: var(--yeol-border) !important;
}
.wp-block-search__button { border-radius: 999px !important; }

/* Pagination */
.wp-block-query-pagination { margin-top: 2.5rem; }
.wp-block-query-pagination a { text-decoration: none; font-weight: 700; }

/* Footer */
.yeol-site-footer { border-top: 1px solid var(--yeol-border); }
.yeol-site-footer a { text-decoration: none; }

/* Helpers */
.yeol-muted { opacity: .68; }
.yeol-pill {
	display: inline-block;
	border-radius: 999px;
	padding: .35rem .7rem;
	font-size: .78rem;
	font-weight: 700;
	background: var(--wp--preset--color--mist, #efe9ee);
}


/* Homepage / library grid: 4 columns x 8 rows (32 books per page) on desktop. */
.yeol-library-grid .wp-block-post-template.is-layout-grid,
.wp-block-query.yeol-library-grid .wp-block-post-template.is-layout-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.yeol-library-grid .yeol-card .wp-block-post-featured-image,
.wp-block-query.yeol-library-grid .yeol-card .wp-block-post-featured-image {
	aspect-ratio: 1 / 1;
}

.yeol-library-grid .yeol-card .wp-block-post-featured-image img,
.wp-block-query.yeol-library-grid .yeol-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}


@media (max-width: 900px) {
	.wp-block-query .wp-block-post-template.is-layout-grid,
	.wp-block-query.yeol-library-grid .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 600px) {
	.wp-block-query .wp-block-post-template.is-layout-grid,
	.wp-block-query.yeol-library-grid .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 782px) {
	.admin-bar .yeol-site-header { top: 46px; }
	.yeol-site-header { position: relative; top: auto; }
	.yeol-hero { border-radius: 0 0 24px 24px; }
	.yeol-article-shell { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
	.yeol-reader-content { line-height: 1.82; }
	.yeol-reader-tools { border-radius: 16px; }
}

@media (max-width: 480px) {
	:root { --yeol-reader-font-size: 1.05rem; }
	.yeol-reader-tools span { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}


/* ============================================================
   Yeolreads home — streaming-library inspired layout
   ============================================================ */
body.home {
	background: #efe9ee;
	color: #211a23;
}
body.home .yeol-site-header {
	background: rgba(79, 53, 75, .97) !important;
	border-bottom-color: rgba(255,255,255,.14);
	box-shadow: 0 8px 24px rgba(79,53,75,.18);
}
body.home .yeol-site-header .wp-block-site-title a,
body.home .yeol-site-header .wp-block-navigation-item__content {
	color: #f5f5f5 !important;
}
body.home .yeol-site-header .wp-block-navigation-item__content { opacity: .74; }
body.home .yeol-site-header .wp-block-navigation-item__content:hover { opacity: 1; }
body.home .yeol-site-footer {
	background: #4f354b !important;
	color: #efe9ee;
	border-top-color: rgba(255,255,255,.14);
}
body.home .yeol-site-footer a { color: #fffdfd; }
body.home main.yeol-home {
	background: #efe9ee;
	color: #211a23;
	min-height: 100vh;
}
body.home main.yeol-home h1,
body.home main.yeol-home h2,
body.home main.yeol-home h3 { color: #211a23; }
body.home main.yeol-home a { color: inherit; }
body.home main.yeol-home .yeol-muted { color: #756b76; opacity: 1; }

.yeol-home-intro { position: relative; z-index: 2; }
.yeol-home-intro h1 { margin: .15rem 0 0; letter-spacing: -.045em; }
.yeol-home-intro .yeol-eyebrow { color: #79526f; margin: 0; }
.yeol-home-search { width: min(390px, 38vw); margin: 0 !important; }
.yeol-home-search .wp-block-search__inside-wrapper {
	background: #fffdfd;
	border: 1px solid rgba(79,54,81,.16) !important;
}
.yeol-home-search input {
	background: transparent;
	color: #211a23;
	border: 0;
}
.yeol-home-search input::placeholder { color: #8b7d89; }
.yeol-home-search .wp-block-search__button {
	background: #79526f !important;
	color: #fffdfd !important;
	margin: 3px;
}

/* Top horizontal shelf */
.yeol-featured-shelf {
	position: relative;
	padding-bottom: 2.6rem;
	background:
		linear-gradient(180deg, rgba(121,82,111,.10), transparent 58%),
		#efe9ee;
	border-bottom: 1px solid rgba(79,54,81,.10);
}
.yeol-carousel { position: relative; }
.yeol-carousel-actions {
	display: flex;
	justify-content: flex-end;
	gap: .5rem;
	margin: 0 0 .8rem;
}
.yeol-scroll-button {
	width: 42px;
	height: 42px;
	border: 1px solid rgba(79,54,81,.18);
	border-radius: 50%;
	background: #fffdfd;
	color: #4f354b;
	font: 600 1.8rem/1 sans-serif;
	cursor: pointer;
	transition: background .16s ease, opacity .16s ease, transform .16s ease;
}
.yeol-scroll-button:hover { background: #e4d8e1; transform: translateY(-1px); }
.yeol-scroll-button:disabled { opacity: .25; cursor: default; transform: none; }
.yeol-scroll-track {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: #9b7893 #ddd1da;
	padding: .25rem .15rem 1.1rem;
	overscroll-behavior-inline: contain;
}
.yeol-scroll-track::-webkit-scrollbar { height: 8px; }
.yeol-scroll-track::-webkit-scrollbar-track { background: #ddd1da; border-radius: 999px; }
.yeol-scroll-track::-webkit-scrollbar-thumb { background: #9b7893; border-radius: 999px; }
.yeol-scroll-track .yeol-novel-card {
	flex: 0 0 clamp(190px, 17vw, 245px);
	scroll-snap-align: start;
}

/* Shared novel cards */
.yeol-novel-card { min-width: 0; }
.yeol-novel-cover {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e4d8e1;
	text-decoration: none;
	box-shadow: 0 12px 30px rgba(79,53,75,.16);
}
.yeol-novel-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .28s ease, filter .28s ease;
}
.yeol-novel-card:hover .yeol-novel-cover img { transform: scale(1.035); filter: brightness(1.06); }
.yeol-cover-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #d6b2cd, #79526f);
	color: #fffdfd;
	font-size: 3.5rem;
	font-weight: 800;
}
.yeol-novel-card-copy { padding-top: .72rem; }
.yeol-novel-card-copy h3 {
	margin: 0;
	font-size: .98rem;
	font-weight: 760;
	line-height: 1.3;
}
.yeol-novel-card-copy h3 a { color: #211a23; text-decoration: none; }
.yeol-novel-card-copy p {
	margin: .38rem 0 0;
	color: #756b76;
	font-size: .82rem;
	line-height: 1.35;
}

/* Latest updates + 4x8 grid */
.yeol-library-section { color: #211a23; }
.yeol-library-layout {
	display: grid;
	grid-template-columns: minmax(245px, 300px) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 4.5rem);
	align-items: start;
}
.yeol-updates-panel {
	position: sticky;
	top: 104px;
	min-width: 0;
}
.yeol-updates-panel > h2 {
	margin: 0 0 1rem;
	padding-bottom: .75rem;
	border-bottom: 2px solid #79526f;
}
.yeol-updates-list { border-top: 1px solid rgba(79,54,81,.11); }
.yeol-update-item {
	padding: .82rem 0;
	border-bottom: 1px solid rgba(79,54,81,.11);
}
.yeol-update-item > a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	color: #211a23 !important;
	text-decoration: none;
	font-size: .92rem;
	font-weight: 690;
	line-height: 1.35;
}
.yeol-update-item > a:hover { color: #79526f !important; }
.yeol-update-meta {
	display: flex;
	justify-content: space-between;
	gap: .75rem;
	margin-top: .35rem;
	color: #756b76;
	font-size: .72rem;
}
.yeol-grid-panel { min-width: 0; }
.yeol-grid-panel .yeol-section-heading { margin-top: 0; }
.yeol-novel-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1.2rem, 2vw, 2rem) clamp(.9rem, 1.5vw, 1.5rem);
}
.yeol-novel-grid .yeol-novel-card-copy h3 { font-size: .91rem; }
.yeol-novel-grid .yeol-novel-cover { border-radius: 2px; }
.yeol-grid-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 2.2rem;
	color: #756b76;
	font-size: .85rem;
}
.yeol-grid-pagination a {
	padding: .6rem .9rem;
	border: 1px solid rgba(79,54,81,.16);
	background: #fffdfd;
	color: #4f354b !important;
	text-decoration: none;
	border-radius: 6px;
}
.yeol-grid-pagination a:hover { background: #e4d8e1; }

/* Table of contents */
.yeol-toc-section {
	background: #efe9ee;
	border-top: 1px solid rgba(79,54,81,.10);
	color: #211a23;
}
.yeol-toc-table {
	border: 1px solid rgba(79,54,81,.13);
	border-radius: 8px;
	overflow: hidden;
}
.yeol-toc-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(130px, 220px) 120px;
	gap: 1rem;
	align-items: center;
	min-height: 52px;
	padding: .7rem 1rem;
	border-bottom: 1px solid rgba(79,54,81,.09);
	background: #fffdfd;
	font-size: .86rem;
}
.yeol-toc-row:nth-child(odd):not(.yeol-toc-head) { background: #faf7f9; }
.yeol-toc-row:last-child { border-bottom: 0; }
.yeol-toc-row a { color: #211a23 !important; text-decoration: none; font-weight: 660; }
.yeol-toc-row a:hover { color: #79526f !important; }
.yeol-toc-row span:nth-child(2),
.yeol-toc-row span:nth-child(3) { color: #756b76; }
.yeol-toc-head {
	min-height: 42px;
	background: #e4d8e1 !important;
	color: #4f354b;
	font-size: .71rem;
	font-weight: 760;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.yeol-empty { color: #756b76; }

@media (max-width: 1120px) {
	.yeol-library-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; }
	.yeol-novel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.yeol-home-intro > .wp-block-group { align-items: flex-start !important; flex-direction: column; }
	.yeol-home-search { width: 100%; max-width: 520px; }
	.yeol-library-layout { grid-template-columns: 1fr; }
	.yeol-updates-panel { position: static; }
	.yeol-updates-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
	.yeol-novel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.yeol-toc-row { grid-template-columns: minmax(0, 1fr) 110px; }
	.yeol-toc-row span:nth-child(2) { display: none; }
	.yeol-scroll-track .yeol-novel-card { flex-basis: 205px; }
}

@media (max-width: 640px) {
	.yeol-carousel-actions { display: none; }
	.yeol-scroll-track { gap: 1rem; }
	.yeol-scroll-track .yeol-novel-card { flex-basis: 70vw; max-width: 250px; }
	.yeol-updates-list { grid-template-columns: 1fr; }
	.yeol-novel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .8rem; }
	.yeol-novel-card-copy h3 { font-size: .86rem; }
	.yeol-toc-row { grid-template-columns: minmax(0, 1fr) 84px; padding-inline: .75rem; }
	.yeol-toc-row span:nth-child(3) { font-size: .72rem; text-align: right; }
}

/* ============================================================
   Yeolreads v1.8 — latest novels sidebar + Ko-fi chapter support
   ============================================================ */
.yeol-library-layout {
	grid-template-columns: minmax(0, 1fr) minmax(245px, 300px);
}
.yeol-latest-novels-panel {
	position: sticky;
	top: 104px;
}
.yeol-latest-novels-list {
	display: grid;
	gap: .15rem;
	border-top: 1px solid rgba(79,54,81,.11);
}
.yeol-latest-novel-item {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: .75rem;
	align-items: center;
	padding: .72rem 0;
	border-bottom: 1px solid rgba(79,54,81,.11);
}
.yeol-latest-novel-thumb {
	display: block;
	width: 58px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e4d8e1;
	text-decoration: none;
}
.yeol-latest-novel-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.yeol-latest-novel-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #d6b2cd, #79526f);
	color: #fff;
	font-weight: 800;
}
.yeol-latest-novel-copy {
	min-width: 0;
	display: grid;
	gap: .25rem;
}
.yeol-latest-novel-copy > a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	color: #211a23 !important;
	text-decoration: none;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.3;
}
.yeol-latest-novel-copy > a:hover { color: #79526f !important; }
.yeol-latest-novel-copy span {
	color: #756b76;
	font-size: .72rem;
}

.yeol-kofi-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	margin: 2.75rem auto 0;
	padding: 1.1rem 1.2rem;
	border: 1px solid rgba(121,82,111,.2);
	border-radius: 14px;
	background: #efe9ee;
	box-shadow: 0 10px 28px rgba(79,53,75,.08);
}
.yeol-kofi-copy {
	display: grid;
	gap: .2rem;
	color: #211a23;
}
.yeol-kofi-copy strong { font-size: 1rem; }
.yeol-kofi-copy span { color: #756b76; font-size: .9rem; }
.yeol-kofi-button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .72rem 1rem;
	border-radius: 999px;
	background: #79526f;
	color: #fff !important;
	font-weight: 760;
	text-decoration: none !important;
	white-space: nowrap;
}
.yeol-kofi-button:hover { background: #62445b; }

@media (max-width: 1120px) {
	.yeol-library-layout { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 860px) {
	.yeol-library-layout { grid-template-columns: 1fr; }
	.yeol-latest-novels-panel { position: static; }
	.yeol-latest-novels-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
}
@media (max-width: 640px) {
	.yeol-latest-novels-list { grid-template-columns: 1fr; }
	.yeol-kofi-box { align-items: stretch; flex-direction: column; }
	.yeol-kofi-button { width: 100%; box-sizing: border-box; }
}


/* ============================================================
   Yeolreads v1.9 — live latest-novels scroller matched to grid height
   ============================================================ */
@media (min-width: 861px) {
	.yeol-library-layout {
		align-items: start;
	}
	.yeol-latest-novels-panel {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		height: var(--yeol-library-grid-height, auto);
		max-height: var(--yeol-library-grid-height, none);
		overflow: hidden;
	}
	.yeol-latest-novels-panel > h2 {
		flex: 0 0 auto;
	}
	.yeol-latest-novels-list {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overflow-x: hidden;
		scroll-behavior: auto;
		scrollbar-width: thin;
		scrollbar-color: #9b7893 transparent;
		overscroll-behavior: contain;
	}
	.yeol-latest-novels-list::-webkit-scrollbar { width: 6px; }
	.yeol-latest-novels-list::-webkit-scrollbar-track { background: transparent; }
	.yeol-latest-novels-list::-webkit-scrollbar-thumb { background: #9b7893; border-radius: 999px; }
	.yeol-latest-novels-list:hover::-webkit-scrollbar-thumb { background: #79526f; }
}

.yeol-latest-novels-panel .yeol-live-label {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-left: .45rem;
	color: #79526f;
	font-size: .68rem;
	font-weight: 760;
	letter-spacing: .05em;
	text-transform: uppercase;
	vertical-align: middle;
}
.yeol-latest-novels-panel .yeol-live-label::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #79526f;
	box-shadow: 0 0 0 4px rgba(121,82,111,.12);
}

@media (prefers-reduced-motion: reduce) {
	.yeol-latest-novels-panel .yeol-live-label::before { box-shadow: none; }
}


/* ============================================================
   Yeolreads 2.0 — protected chapter reader + browser read aloud
   ============================================================ */
.yeol-audio-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .55rem;
	width: 100%;
	padding-top: .5rem;
	margin-top: .15rem;
	border-top: 1px solid var(--yeol-border);
}
.yeol-audio-controls label {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font: 700 .76rem/1.2 var(--wp--preset--font-family--ui, sans-serif);
	color: #3e3340;
}
.yeol-audio-controls select {
	max-width: 260px;
	min-height: 36px;
	border: 1px solid var(--yeol-border);
	border-radius: 999px;
	background: #fffdfd;
	color: #211a23;
	padding: .35rem 2rem .35rem .7rem;
	font: 600 .76rem/1.2 var(--wp--preset--font-family--ui, sans-serif);
}
.yeol-audio-controls input[type="range"] { width: 110px; accent-color: #79526f; }
.yeol-audio-status {
	width: 100%;
	text-align: center;
	font: 600 .72rem/1.35 var(--wp--preset--font-family--ui, sans-serif);
	color: #6c5c6a;
	margin: 0;
}
.yeol-audio-status strong { color: #4f354b; }
.yeol-speaking {
	outline: 2px solid rgba(121,82,111,.28);
	outline-offset: 5px;
	border-radius: 5px;
	background: rgba(239,233,238,.72);
}
body.yeol-night-reading .yeol-audio-controls { border-top-color: rgba(255,255,255,.12); }
body.yeol-night-reading .yeol-audio-controls label,
body.yeol-night-reading .yeol-audio-status,
body.yeol-night-reading .yeol-audio-status strong { color: #eee8ef; }
body.yeol-night-reading .yeol-audio-controls select { background:#342c37; color:#f6eff6; border-color:rgba(255,255,255,.16); }
body.yeol-night-reading .yeol-speaking { background:rgba(121,82,111,.22); outline-color:rgba(221,185,216,.35); }

/* Normal browser copying/selection is disabled for Chapter text. This is a deterrent,
   not DRM: screenshots and technically sophisticated extraction cannot be prevented by CSS/JS. */
body.yeolreads-chapter .yeol-reader-content {
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}
body.yeolreads-chapter .yeol-reader-content img {
	-webkit-user-drag: none;
	user-drag: none;
}
body.yeolreads-chapter .yeol-reader-content [data-yeol-speech-unit] { cursor: default; }
body.yeolreads-chapter .yeol-reader-content [data-yeol-speech-unit]:hover { background: rgba(121,82,111,.045); }

.yeol-copy-notice {
	text-align:center;
	font: 600 .72rem/1.4 var(--wp--preset--font-family--ui, sans-serif);
	color:#756b76;
	margin:.2rem auto 1.2rem;
}

@media print {
	body.yeolreads-chapter .yeol-reader-content { display:none !important; }
	body.yeolreads-chapter .yeol-article-shell::after {
		content:"Printing chapter text is disabled on Yeolreads.";
		display:block;
		padding:2rem;
		font:700 16px/1.5 sans-serif;
	}
}

@media (max-width: 700px) {
	.yeol-reader-tools { max-width: 100%; }
	.yeol-audio-controls label { width: 100%; justify-content: center; }
	.yeol-audio-controls select { max-width: min(100%, 330px); }
}


/* v2.1 — split Normal Novels and Yeolreads18+ into separate libraries. */
.yeol-home-library-switch { padding-top: 8px; padding-bottom: 22px; }
.yeol-library-switcher {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-width: 780px;
	margin: 0 auto;
	padding: 8px;
	border: 1px solid rgba(79,54,81,.13);
	border-radius: 18px;
	background: rgba(255,255,255,.58);
	box-shadow: 0 12px 34px rgba(58,37,62,.07);
}
.yeol-library-tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 18px;
	border-radius: 13px;
	color: #352837;
	text-decoration: none;
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.yeol-library-tab span { font-weight: 800; }
.yeol-library-tab small { opacity: .67; }
.yeol-library-tab:hover { transform: translateY(-1px); background: rgba(255,255,255,.78); }
.yeol-library-tab.is-active { background: #fff; box-shadow: 0 8px 22px rgba(58,37,62,.11); }
.yeol-library-tab--adult b,
.yeol-adult-card-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 24px;
	padding: 0 7px;
	border-radius: 999px;
	background: #6f3f67;
	color: #fff;
	font-size: .72rem;
	font-weight: 900;
	letter-spacing: .04em;
}
.yeol-novel-card { position: relative; }
.yeol-adult-card-badge { position: absolute; top: 8px; right: 8px; z-index: 4; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.yeol-adult-library-shell { max-width: 1480px; margin: 0 auto; padding: 34px clamp(18px,4vw,56px) 70px; }
.yeol-adult-library-head { padding: 42px 0 24px; text-align: center; }
.yeol-adult-library-head h1 { margin: 6px 0 8px; font-size: clamp(2.2rem,5vw,4.2rem); color: #4a3048; }
.yeol-adult-featured { margin: 20px 0 28px; }
.yeol-adult-featured > h2 { margin: 0 0 15px; }
.yeol-adult-section-gate {
	max-width: 720px;
	margin: 54px auto 80px;
	padding: clamp(28px,5vw,52px);
	text-align: center;
	border: 1px solid rgba(111,63,103,.2);
	border-radius: 24px;
	background: rgba(255,255,255,.72);
	box-shadow: 0 24px 70px rgba(58,37,62,.12);
}
.yeol-adult-section-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #6f3f67; color: #fff; font-weight: 900; font-size: 1.25rem; }
.yeol-adult-section-gate h1 { margin: 18px 0 10px; color: #4a3048; }
.yeol-adult-section-gate form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.yeol-adult-enter, .yeol-adult-leave { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 999px; font-weight: 800; text-decoration: none; cursor: pointer; }
.yeol-adult-enter { border: 0; background: #6f3f67; color: #fff; }
.yeol-adult-leave { border: 1px solid rgba(79,54,81,.18); background: #fff; color: #4a3048; }
@media (max-width: 680px) {
	.yeol-library-switcher { grid-template-columns: 1fr; }
	.yeol-library-tab { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* =========================================================
   Yeolreads 2.3 — true navigation + Genres/Library pages
   ========================================================= */
.yeol-true-nav { margin-left: auto; }
.yeol-true-nav-desktop { display:flex; align-items:center; justify-content:flex-end; gap:clamp(.9rem,2vw,2rem); }
.yeol-true-nav a { color:inherit; text-decoration:none; font-weight:700; }
.yeol-true-nav a:hover { opacity:.72; }
.yeol-true-nav-mobile { display:none; position:relative; }
.yeol-true-nav-mobile summary { cursor:pointer; list-style:none; font-weight:800; padding:.55rem .9rem; border:1px solid var(--yeol-border); border-radius:999px; }
.yeol-true-nav-mobile summary::-webkit-details-marker { display:none; }
.yeol-true-nav-mobile-panel { position:absolute; right:0; top:calc(100% + .6rem); z-index:100; min-width:min(310px,85vw); display:grid; gap:.25rem; padding:.65rem; border:1px solid var(--yeol-border); border-radius:14px; background:#fffdfd; box-shadow:var(--yeol-shadow); color:#211a23; }
.yeol-true-nav-mobile-panel a { display:block; padding:.75rem .85rem; border-radius:10px; }
.yeol-true-nav-mobile-panel a:hover { background:#efe9ee; opacity:1; }
@media(max-width:980px){
	.yeol-true-nav-desktop{display:none}.yeol-true-nav-mobile{display:block}.yeol-header-inner{flex-wrap:nowrap!important}
}

.yeol-directory-shell { width:min(1440px,calc(100% - 2rem)); margin:0 auto; padding:clamp(2rem,5vw,4.5rem) 0; color:#211a23; }
.yeol-directory-heading { max-width:780px; margin:0 0 2rem; }
.yeol-directory-heading h1 { margin:.25rem 0 .55rem; font-size:clamp(2rem,5vw,4rem); line-height:1; letter-spacing:-.045em; }
.yeol-directory-heading p:last-child { color:#756b76; }
.yeol-directory-tabs { display:flex; gap:.5rem; margin:0 0 2rem; padding:.45rem; width:max-content; max-width:100%; border:1px solid var(--yeol-border); border-radius:999px; background:rgba(255,255,255,.55); }
.yeol-directory-tabs a { display:flex; align-items:center; gap:.45rem; padding:.7rem 1rem; border-radius:999px; color:#4f3651; text-decoration:none; font-weight:800; }
.yeol-directory-tabs a.is-active { background:#79526f; color:#fff; }
.yeol-directory-tabs span { padding:.08rem .42rem; border-radius:999px; background:rgba(255,255,255,.2); font-size:.72rem; }

.yeol-genre-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.yeol-genre-card { display:flex; min-height:108px; flex-direction:column; justify-content:space-between; gap:.8rem; padding:1.1rem; border:1px solid var(--yeol-border); border-radius:16px; background:#fffdfd; color:#211a23!important; text-decoration:none; box-shadow:0 10px 24px rgba(31,24,35,.035); }
.yeol-genre-card:hover { transform:translateY(-2px); box-shadow:var(--yeol-shadow); opacity:1; }
.yeol-genre-card strong { font-size:1.06rem; }
.yeol-genre-card span { color:#756b76; font-size:.86rem; }
@media(max-width:900px){.yeol-genre-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.yeol-genre-grid{grid-template-columns:1fr}.yeol-directory-tabs{width:100%;border-radius:16px}.yeol-directory-tabs a{flex:1;justify-content:center;text-align:center}}

.yeol-library-filters { display:grid; grid-template-columns:minmax(220px,1.5fr) minmax(170px,.8fr) minmax(150px,.65fr) auto auto; gap:.75rem; align-items:end; margin:0 0 1.5rem; padding:1rem; border:1px solid var(--yeol-border); border-radius:16px; background:rgba(255,255,255,.5); }
.yeol-library-filters label { display:grid; gap:.35rem; }
.yeol-library-filters label>span { font-size:.76rem; font-weight:800; color:#79526f; text-transform:uppercase; letter-spacing:.06em; }
.yeol-library-filters input,.yeol-library-filters select { min-height:46px; width:100%; border:1px solid rgba(79,54,81,.18); border-radius:10px; padding:.65rem .75rem; background:#fff; color:#211a23; }
.yeol-library-filters button,.yeol-directory-primary { display:inline-flex; min-height:46px; align-items:center; justify-content:center; border:0; border-radius:999px; padding:.7rem 1.1rem; background:#79526f; color:#fff!important; text-decoration:none; font-weight:800; cursor:pointer; }
.yeol-filter-reset,.yeol-directory-secondary { display:inline-flex; min-height:46px; align-items:center; justify-content:center; border:1px solid rgba(79,54,81,.18); border-radius:999px; padding:.7rem 1rem; background:#fff; color:#4f3651!important; text-decoration:none; font-weight:800; }
.yeol-directory-novel-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media(max-width:980px){.yeol-library-filters{grid-template-columns:1fr 1fr}.yeol-directory-novel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.yeol-library-filters{grid-template-columns:1fr}.yeol-directory-novel-grid{grid-template-columns:1fr}}

.yeol-directory-gate { max-width:680px; margin:2rem auto; padding:clamp(1.5rem,5vw,3rem); text-align:center; border:1px solid var(--yeol-border); border-radius:20px; background:#fffdfd; }
.yeol-directory-age { display:grid; place-items:center; width:68px; height:68px; margin:0 auto 1rem; border-radius:50%; background:#79526f; color:#fff; font-size:1.25rem; font-weight:900; }
.yeol-directory-gate form { display:flex; justify-content:center; gap:.7rem; flex-wrap:wrap; margin-top:1.2rem; }
.yeol-directory-gate button { border:0; border-radius:999px; padding:.75rem 1.1rem; background:#79526f; color:#fff; font-weight:800; cursor:pointer; }
.yeol-directory-gate form a { align-content:center; color:#79526f; font-weight:800; }

.yeol-member-actions { display:flex; gap:.75rem; flex-wrap:wrap; margin:0 0 1.2rem; }
.yeol-tier-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.85rem; margin:1.5rem 0; }
.yeol-tier-grid>div { display:grid; gap:.2rem; padding:1.1rem; border:1px solid var(--yeol-border); border-radius:16px; background:#fffdfd; }
.yeol-tier-grid strong { font-size:1.6rem; }
.yeol-tier-grid span,.yeol-tier-grid small,.yeol-member-note { color:#756b76; }
.yeol-member-plugin-area { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin-top:2rem; }
.yeol-member-block { padding:1.15rem; border:1px solid var(--yeol-border); border-radius:16px; background:#fffdfd; overflow:hidden; }
.yeol-member-block h2 { margin-top:0; }
.yeol-member-block a { color:#79526f; font-weight:800; }
@media(max-width:900px){.yeol-tier-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.yeol-member-plugin-area{grid-template-columns:1fr}}
@media(max-width:520px){.yeol-tier-grid{grid-template-columns:1fr}}

.yeol-dmca-form { display:grid; grid-template-columns:1fr 1fr; gap:1rem; max-width:920px; padding:1.2rem; border:1px solid var(--yeol-border); border-radius:18px; background:#fffdfd; }
.yeol-dmca-form label { display:grid; gap:.4rem; font-weight:700; }
.yeol-dmca-form input,.yeol-dmca-form select,.yeol-dmca-form textarea { width:100%; border:1px solid rgba(79,54,81,.18); border-radius:10px; padding:.7rem .8rem; background:#fff; color:#211a23; }
.yeol-dmca-form .yeol-field-wide { grid-column:1/-1; }
.yeol-dmca-form button { width:max-content; border:0; border-radius:999px; padding:.75rem 1.2rem; background:#79526f; color:#fff; font-weight:800; cursor:pointer; }
.yeol-honeypot { position:absolute!important; left:-9999px!important; width:1px!important; height:1px!important; overflow:hidden!important; }
.yeol-form-notice { max-width:920px; padding:.8rem 1rem; border-radius:10px; font-weight:800; }
.yeol-form-success { background:#edf8ef; color:#265c32; }.yeol-form-error{background:#fff0f1;color:#8b1f34}
@media(max-width:680px){.yeol-dmca-form{grid-template-columns:1fr}.yeol-dmca-form .yeol-field-wide{grid-column:auto}}
