/*
Theme Name: Fiction Lumen
Description: Readmiora — 暖色文学风独立小说阅读主题；需要 Fiction Core 插件。
Version: 2.0.0
Text Domain: fiction-lumen
Author: Readmiora
*/

/* =========================================================
   Design tokens — Readmiora 暖金 · 墨夜 · 羊皮纸
   与 novel 白底品红、旧版紫星云 完全区分
   ========================================================= */
:root {
	--rm-ink: #1a1520;
	--rm-ink-soft: #3d3545;
	--rm-muted: #7a7280;
	--rm-line: #ebe4dc;
	--rm-paper: #faf6f1;
	--rm-panel: #ffffff;
	--rm-blush: #f8ece6;
	--rm-rose: #c45c4a;
	--rm-rose-deep: #a34638;
	--rm-gold: #c4a35a;
	--rm-gold-soft: #e8d5a3;
	--rm-night: #14101a;
	--rm-night-2: #221c2a;
	--rm-radius: 20px;
	--rm-radius-sm: 12px;
	--rm-shadow: 0 18px 48px rgba(26, 21, 32, 0.08);
	--rm-shadow-lg: 0 28px 70px rgba(26, 21, 32, 0.14);
	--rm-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--rm-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--rm-max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--rm-paper);
	color: var(--rm-ink);
	font-family: var(--rm-sans);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color .18s ease, opacity .18s ease; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; }
::selection { background: rgba(196, 92, 74, 0.18); color: var(--rm-ink); }

.fiction-shell {
	width: min(var(--rm-max), calc(100% - 48px));
	margin-inline: auto;
}

/* =========================================================
   Header
   ========================================================= */
.fiction-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(250, 246, 241, 0.88);
	backdrop-filter: blur(16px) saturate(1.2);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	border-bottom: 1px solid rgba(26, 21, 32, 0.06);
}

.fiction-header__inner {
	min-height: 72px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.fiction-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--rm-serif);
	font-weight: 650;
	font-size: 1.35rem;
	letter-spacing: -0.03em;
	color: var(--rm-ink);
	flex-shrink: 0;
}

.fiction-brand__mark {
	width: 34px;
	height: 34px;
	border-radius: 11px;
	background:
		radial-gradient(circle at 30% 28%, var(--rm-gold-soft) 0, transparent 42%),
		linear-gradient(145deg, #e07a68 0%, #8b3d32 100%);
	box-shadow: 0 8px 18px rgba(196, 92, 74, 0.28);
	position: relative;
	flex-shrink: 0;
}

/* 书页折角标识 */
.fiction-brand__mark::after {
	content: "";
	position: absolute;
	inset: 9px 10px 9px 11px;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
	border-radius: 3px;
	border-left-width: 2.5px;
}

.fiction-brand__text span {
	color: var(--rm-rose);
	font-style: italic;
	font-weight: 550;
}

.fiction-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.fiction-nav a {
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.92rem;
	font-weight: 550;
	color: var(--rm-ink-soft);
}

.fiction-nav a:hover,
.fiction-nav a.is-active {
	background: var(--rm-blush);
	color: var(--rm-rose-deep);
}

.fiction-header__actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.fiction-search {
	display: flex;
	align-items: center;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 999px;
	padding: 3px 6px 3px 14px;
	box-shadow: 0 2px 8px rgba(26, 21, 32, 0.03);
	transition: border-color .18s ease, box-shadow .18s ease;
}

.fiction-search:focus-within {
	border-color: rgba(196, 92, 74, 0.45);
	box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.12);
}

.fiction-search input {
	width: 160px;
	background: transparent;
	border: 0;
	outline: 0;
	padding: 8px 4px;
	font-size: 0.9rem;
	color: var(--rm-ink);
}

.fiction-search input::placeholder { color: var(--rm-muted); }

.fiction-search button {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 999px;
	background: var(--rm-ink);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 14px;
	transition: background .18s ease;
}

.fiction-search button:hover { background: var(--rm-rose); }

.fiction-account {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--rm-ink);
	color: #fff;
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	box-shadow: 0 8px 20px rgba(26, 21, 32, 0.18);
	transition: transform .15s ease, background .18s ease;
}

.fiction-account:hover {
	background: var(--rm-rose);
	transform: translateY(-1px);
}

/* =========================================================
   Hero
   ========================================================= */
.fiction-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	padding: 88px 0 96px;
	background:
		radial-gradient(ellipse 60% 80% at 85% 15%, rgba(196, 163, 90, 0.35) 0%, transparent 55%),
		radial-gradient(ellipse 50% 70% at 10% 90%, rgba(196, 92, 74, 0.45) 0%, transparent 50%),
		radial-gradient(ellipse 40% 50% at 50% 50%, rgba(60, 40, 70, 0.5) 0%, transparent 70%),
		linear-gradient(160deg, #1a1224 0%, #2a1830 40%, #1c1018 100%);
}

.fiction-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 0 1px, transparent 1.5px),
		radial-gradient(circle at 70% 60%, rgba(255,255,255,0.05) 0 1px, transparent 1.5px),
		radial-gradient(circle at 40% 80%, rgba(255,255,255,0.04) 0 1px, transparent 1.5px);
	background-size: 120px 120px, 180px 180px, 90px 90px;
	pointer-events: none;
	opacity: 0.7;
}

.fiction-hero .fiction-shell {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 48px;
	align-items: center;
}

.fiction-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--rm-gold-soft);
}

.fiction-kicker::before {
	content: "";
	width: 18px;
	height: 1.5px;
	background: var(--rm-gold);
}

.fiction-hero h1 {
	margin: 18px 0 18px;
	font-family: var(--rm-serif);
	font-weight: 550;
	font-size: clamp(2.4rem, 5.5vw, 3.85rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	max-width: 14ch;
}

.fiction-hero h1 em {
	font-style: italic;
	color: var(--rm-gold-soft);
	font-weight: 450;
}

.fiction-hero__lead {
	margin: 0 0 28px;
	max-width: 38ch;
	font-size: 1.08rem;
	line-height: 1.7;
	color: rgba(255, 248, 242, 0.78);
}

.fiction-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.fiction-hero__stats {
	display: flex;
	gap: 28px;
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fiction-hero__stat strong {
	display: block;
	font-family: var(--rm-serif);
	font-size: 1.55rem;
	font-weight: 550;
	letter-spacing: -0.02em;
}

.fiction-hero__stat span {
	font-size: 0.78rem;
	color: rgba(255, 248, 242, 0.55);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* 右侧装饰书架 */
.fiction-hero__shelf {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	perspective: 900px;
}

.fiction-hero__shelf .fiction-card {
	animation: rm-float 6s ease-in-out infinite;
}

.fiction-hero__shelf .fiction-card:nth-child(2) { animation-delay: -1.5s; margin-top: 28px; }
.fiction-hero__shelf .fiction-card:nth-child(3) { animation-delay: -3s; margin-top: 8px; }

.fiction-hero__shelf .fiction-card h3,
.fiction-hero__shelf .fiction-card p { color: #fff; }
.fiction-hero__shelf .fiction-card p { color: rgba(255,255,255,0.55); }

@keyframes rm-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

/* =========================================================
   Buttons
   ========================================================= */
.fiction-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--rm-rose);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 650;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(196, 92, 74, 0.32);
	transition: transform .15s ease, filter .18s ease, background .18s ease;
}

.fiction-button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.fiction-button:disabled {
	opacity: 0.65;
	cursor: wait;
	transform: none;
}

.fiction-button--quiet {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	box-shadow: none;
}

.fiction-button--quiet:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.55);
	filter: none;
}

.fiction-button--ghost {
	background: var(--rm-panel);
	color: var(--rm-ink);
	border: 1px solid var(--rm-line);
	box-shadow: 0 2px 8px rgba(26, 21, 32, 0.04);
}

.fiction-button--ghost:hover {
	border-color: var(--rm-rose);
	color: var(--rm-rose-deep);
	filter: none;
}

.fiction-button--ink {
	background: var(--rm-ink);
	box-shadow: 0 10px 24px rgba(26, 21, 32, 0.2);
}

/* =========================================================
   Sections
   ========================================================= */
.fiction-section {
	padding: 64px 0;
}

.fiction-section--blush {
	background: linear-gradient(180deg, var(--rm-blush) 0%, var(--rm-paper) 100%);
}

.fiction-section--panel {
	background: var(--rm-panel);
}

.fiction-section__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 28px;
}

.fiction-section__head h2 {
	margin: 0;
	font-family: var(--rm-serif);
	font-size: clamp(1.55rem, 2.5vw, 1.95rem);
	font-weight: 550;
	letter-spacing: -0.025em;
	color: var(--rm-ink);
}

.fiction-section__head p {
	margin: 6px 0 0;
	font-size: 0.92rem;
	color: var(--rm-muted);
}

.fiction-section__head a {
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--rm-rose);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.fiction-section__head a:hover { color: var(--rm-rose-deep); }
.fiction-section__head a::after { content: "→"; transition: transform .15s ease; }
.fiction-section__head a:hover::after { transform: translateX(3px); }

/* =========================================================
   Book cards
   ========================================================= */
.fiction-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 22px 18px;
}

.fiction-card {
	min-width: 0;
}

.fiction-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4.15;
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
	box-shadow: var(--rm-shadow);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease;
}

.fiction-card:hover .fiction-card__cover {
	transform: translateY(-6px) scale(1.015);
	box-shadow: var(--rm-shadow-lg);
}

.fiction-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.fiction-card:hover .fiction-card__cover img {
	transform: scale(1.04);
}

/* 无封面时的优雅占位 */
.fiction-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px;
	color: #fff;
	background:
		radial-gradient(circle at 80% 15%, rgba(255,255,255,0.22) 0, transparent 40%),
		linear-gradient(160deg, var(--c1, #c45c4a) 0%, var(--c2, #3d2548) 100%);
}

.fiction-card__placeholder strong {
	font-family: var(--rm-serif);
	font-size: 0.95rem;
	font-weight: 550;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fiction-card__placeholder em {
	margin-top: 8px;
	font-size: 0.72rem;
	font-style: normal;
	opacity: 0.7;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fiction-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--rm-rose-deep);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	backdrop-filter: blur(6px);
}

.fiction-card__body {
	padding: 12px 2px 0;
}

.fiction-card h3 {
	margin: 0 0 4px;
	font-size: 0.95rem;
	font-weight: 650;
	line-height: 1.35;
	letter-spacing: -0.01em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fiction-card h3 a:hover { color: var(--rm-rose); }

.fiction-card p {
	margin: 0;
	font-size: 0.8rem;
	color: var(--rm-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 横向特色卡（首页榜单） */
.fiction-rank-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.fiction-rank-item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 12px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 16px;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.fiction-rank-item:hover {
	border-color: rgba(196, 92, 74, 0.35);
	box-shadow: var(--rm-shadow);
	transform: translateY(-2px);
}

.fiction-rank-item__cover {
	width: 72px;
	aspect-ratio: 3/4;
	border-radius: 10px;
	overflow: hidden;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
	position: relative;
	flex-shrink: 0;
}

.fiction-rank-item__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fiction-rank-item__cover .fiction-card__placeholder {
	padding: 8px;
}

.fiction-rank-item__cover .fiction-card__placeholder strong {
	font-size: 0.65rem;
	-webkit-line-clamp: 4;
}

.fiction-rank-item h3 {
	margin: 0 0 4px;
	font-size: 0.98rem;
	font-weight: 650;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fiction-rank-item p {
	margin: 0;
	font-size: 0.8rem;
	color: var(--rm-muted);
}

.fiction-rank-item__num {
	font-family: var(--rm-serif);
	font-size: 1.4rem;
	font-weight: 550;
	color: var(--rm-gold);
	min-width: 28px;
	text-align: right;
	opacity: 0.85;
}

.fiction-rank-item:nth-child(1) .fiction-rank-item__num,
.fiction-rank-item:nth-child(2) .fiction-rank-item__num,
.fiction-rank-item:nth-child(3) .fiction-rank-item__num {
	color: var(--rm-rose);
}

/* =========================================================
   Genre chips / mood browser
   ========================================================= */
.fiction-genre-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fiction-chip {
	display: inline-flex;
	align-items: center;
	padding: 11px 18px;
	border-radius: 999px;
	border: 1px solid var(--rm-line);
	background: var(--rm-panel);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--rm-ink-soft);
	transition: all .18s ease;
}

.fiction-chip:hover {
	border-color: var(--rm-rose);
	color: var(--rm-rose-deep);
	background: var(--rm-blush);
	transform: translateY(-1px);
}

/* =========================================================
   Promo strip
   ========================================================= */
.fiction-promo {
	margin: 8px 0 0;
	padding: 36px 40px;
	border-radius: 24px;
	background:
		radial-gradient(ellipse at 90% 20%, rgba(196, 163, 90, 0.25) 0, transparent 45%),
		linear-gradient(120deg, #1a1224 0%, #3a2030 55%, #241820 100%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.fiction-promo h2 {
	margin: 0 0 8px;
	font-family: var(--rm-serif);
	font-size: 1.65rem;
	font-weight: 550;
	letter-spacing: -0.02em;
}

.fiction-promo p {
	margin: 0;
	color: rgba(255, 248, 242, 0.7);
	max-width: 42ch;
	line-height: 1.6;
}

/* =========================================================
   Page heads / archive
   ========================================================= */
.fiction-page-head {
	padding: 48px 0 12px;
}

.fiction-page-head h1 {
	margin: 0 0 10px;
	font-family: var(--rm-serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 550;
	letter-spacing: -0.03em;
}

.fiction-page-head p {
	margin: 0;
	color: var(--rm-muted);
	font-size: 1.02rem;
}

.fiction-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 28px 0 48px;
	flex-wrap: wrap;
}

.fiction-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.fiction-pagination a,
.fiction-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--rm-line);
	background: var(--rm-panel);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--rm-ink-soft);
}

.fiction-pagination .current {
	background: var(--rm-ink);
	border-color: var(--rm-ink);
	color: #fff;
}

.fiction-pagination a:hover {
	border-color: var(--rm-rose);
	color: var(--rm-rose);
}

/* =========================================================
   Book detail
   ========================================================= */
.fiction-book-wrap {
	padding: 40px 0 20px;
}

.fiction-book {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 44px;
	padding: 36px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 28px;
	box-shadow: var(--rm-shadow);
}

.fiction-book__cover {
	border-radius: 18px;
	overflow: hidden;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
	box-shadow: 0 24px 50px rgba(26, 21, 32, 0.18);
	aspect-ratio: 3/4.1;
	position: relative;
}

.fiction-book__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fiction-book h1 {
	margin: 0 0 8px;
	font-family: var(--rm-serif);
	font-size: clamp(1.85rem, 3.5vw, 2.6rem);
	font-weight: 550;
	line-height: 1.12;
	letter-spacing: -0.03em;
}

.fiction-book__byline {
	margin: 0 0 16px;
	color: var(--rm-muted);
	font-size: 1rem;
}

.fiction-book__byline strong {
	color: var(--rm-ink-soft);
	font-weight: 600;
}

.fiction-book__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.fiction-book__meta span {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--rm-blush);
	color: var(--rm-rose-deep);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.fiction-book__description {
	color: var(--rm-ink-soft);
	line-height: 1.75;
	font-size: 0.98rem;
	max-width: 62ch;
}

.fiction-book__description p { margin: 0 0 0.9em; }
.fiction-book__description p:last-child { margin-bottom: 0; }

.fiction-book__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

/* 章节列表 */
.fiction-chapters {
	padding: 36px 0 64px;
}

.fiction-chapter-list {
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: var(--rm-radius);
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(26, 21, 32, 0.04);
}

.fiction-chapter-row {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--rm-line);
	transition: background .15s ease;
}

.fiction-chapter-row:last-child { border-bottom: 0; }

.fiction-chapter-row:hover {
	background: var(--rm-blush);
}

.fiction-chapter-row__idx {
	font-family: var(--rm-serif);
	font-size: 0.95rem;
	font-weight: 550;
	color: var(--rm-gold);
	text-align: center;
}

.fiction-chapter-row a {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--rm-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fiction-chapter-row a:hover { color: var(--rm-rose); }

.fiction-chapter-row__price {
	font-size: 0.82rem;
	font-weight: 650;
	color: var(--rm-muted);
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--rm-paper);
}

.fiction-chapter-row__price.is-open {
	color: #2f7a4a;
	background: #e8f5ec;
}

/* =========================================================
   Reader
   ========================================================= */
.fiction-reader {
	width: min(740px, calc(100% - 40px));
	margin: 0 auto;
	padding: 56px 0 90px;
}

.fiction-reader__crumb {
	margin-bottom: 28px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--rm-muted);
}

.fiction-reader__crumb a:hover { color: var(--rm-rose); }

.fiction-reader h1 {
	margin: 0 0 28px;
	font-family: var(--rm-serif);
	font-size: clamp(1.85rem, 4vw, 2.45rem);
	font-weight: 550;
	line-height: 1.15;
	letter-spacing: -0.03em;
	text-align: center;
}

.fiction-reader__content {
	font-family: var(--rm-serif);
	font-size: 1.2rem;
	line-height: 1.95;
	color: #2a2430;
	letter-spacing: 0.005em;
}

.fiction-reader__content p {
	margin: 0 0 1.35em;
	text-indent: 0;
}

.fiction-reader__content p:first-of-type::first-letter {
	font-size: 3.1rem;
	font-weight: 550;
	line-height: 0.85;
	float: left;
	margin: 0.08em 0.1em 0 0;
	color: var(--rm-rose);
}

/* 付费墙 */
.fiction-paywall {
	margin: 40px 0 20px;
	padding: 40px 32px;
	border-radius: 24px;
	text-align: center;
	color: #fff;
	background:
		radial-gradient(ellipse at 80% 0%, rgba(196, 163, 90, 0.28) 0, transparent 50%),
		linear-gradient(155deg, #1a1224 0%, #2e1a28 55%, #18121c 100%);
	box-shadow: var(--rm-shadow-lg);
}

.fiction-paywall__icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	border-radius: 16px;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 1.35rem;
}

.fiction-paywall h3 {
	margin: 0 0 10px;
	font-family: var(--rm-serif);
	font-size: 1.45rem;
	font-weight: 550;
}

.fiction-paywall > p {
	margin: 0 auto;
	max-width: 36ch;
	color: rgba(255, 248, 242, 0.68);
	font-size: 0.95rem;
	line-height: 1.55;
}

.fiction-paywall__form {
	display: grid;
	gap: 10px;
	max-width: 380px;
	margin: 22px auto 0;
}

.fiction-paywall__form label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	text-align: left;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: background .15s ease;
}

.fiction-paywall__form label:hover {
	background: rgba(255, 255, 255, 0.1);
}

.fiction-paywall__form .fiction-button {
	margin-top: 6px;
}

/* toast */
.fiction-notice {
	position: fixed;
	right: 20px;
	bottom: 20px;
	/* 必须高于支付弹窗 (1000)，否则失败提示被挡住，看起来像按钮无反应 */
	z-index: 11000;
	padding: 14px 18px;
	background: var(--rm-ink);
	color: #fff;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
	font-size: 0.92rem;
	font-weight: 550;
	max-width: min(360px, calc(100vw - 40px));
	animation: rm-toast .28s ease;
}
.fiction-notice.is-error {
	background: #8b3d32;
}

@keyframes rm-toast {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Footer
   ========================================================= */
.fiction-footer {
	background: var(--rm-night);
	color: rgba(250, 246, 241, 0.55);
	padding: 48px 0 36px;
	margin-top: auto;
}

.fiction-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px;
}

.fiction-footer__brand {
	font-family: var(--rm-serif);
	font-size: 1.35rem;
	font-weight: 550;
	color: #fff;
	letter-spacing: -0.02em;
	margin-bottom: 10px;
}

.fiction-footer__brand span {
	color: var(--rm-gold-soft);
	font-style: italic;
}

.fiction-footer__tag {
	max-width: 36ch;
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 0;
}

.fiction-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 0.9rem;
	font-weight: 550;
}

.fiction-footer__links a:hover { color: #fff; }

.fiction-footer__copy {
	width: 100%;
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.8rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
}

/* 空状态 */
.fiction-empty {
	padding: 48px 24px;
	text-align: center;
	color: var(--rm-muted);
	background: var(--rm-panel);
	border: 1px dashed var(--rm-line);
	border-radius: var(--rm-radius);
}

/* 整本购买面板展开 */
[data-book-purchase]:not([hidden]) {
	display: block;
	padding: 0 0 48px;
	animation: rm-toast .3s ease;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
	.fiction-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.fiction-hero .fiction-shell { grid-template-columns: 1fr; }
	.fiction-hero__shelf { display: none; }
}

@media (max-width: 900px) {
	.fiction-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.fiction-rank-list { grid-template-columns: 1fr; }
	.fiction-book { grid-template-columns: 180px 1fr; gap: 28px; padding: 24px; }
	.fiction-nav { display: none; }
	.fiction-hero { padding: 64px 0 72px; }
	.fiction-hero h1 { max-width: none; }
}

@media (max-width: 640px) {
	.fiction-shell { width: min(100% - 28px, var(--rm-max)); }
	.fiction-search { display: none; }
	.fiction-header__inner { gap: 12px; }
	.fiction-header__actions { gap: 8px; }
	.fiction-account { padding: 9px 14px; font-size: 0.82rem; }
	.fiction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
	.fiction-book {
		grid-template-columns: 1fr;
		padding: 20px;
	}
	.fiction-book__cover {
		max-width: 200px;
		margin: 0 auto;
	}
	.fiction-book h1 { text-align: center; }
	.fiction-book__byline,
	.fiction-book__meta,
	.fiction-book__actions { justify-content: center; text-align: center; }
	.fiction-book__description { text-align: left; }
	.fiction-reader { padding-top: 36px; }
	.fiction-reader h1 { font-size: 1.7rem; }
	.fiction-reader__content { font-size: 1.08rem; }
	.fiction-promo { padding: 28px 22px; }
	.fiction-section { padding: 48px 0; }
	.fiction-chapter-row {
		grid-template-columns: 36px 1fr;
		gap: 6px 10px;
	}
	.fiction-chapter-row__price {
		grid-column: 2;
		justify-self: start;
	}
	.fiction-hero__stats { gap: 18px; }
}

/* =========================================================
   v2.1 — Auth / Top-up / Reader toolbar / Library
   Readmiora 业务对齐 novel，视觉独立
   ========================================================= */

body.rm-modal-open { overflow: hidden; }

/* Header coins + user chip */
.fiction-coins {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--rm-line);
	border-radius: 999px;
	background: var(--rm-panel);
	color: var(--rm-ink);
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.fiction-coins:hover {
	border-color: rgba(196, 92, 74, 0.45);
	box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.1);
}
.fiction-coins__icon { color: var(--rm-gold); font-size: 0.75rem; }
.fiction-coins__label { color: var(--rm-muted); font-weight: 550; font-size: 0.78rem; }

.fiction-account--user {
	gap: 8px;
	padding: 6px 14px 6px 6px;
	background: var(--rm-ink);
}
.fiction-account__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, #e07a68, #8b3d32);
	font-size: 0.78rem;
	font-weight: 700;
}
.fiction-account__name {
	max-width: 100px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.86rem;
}

.fiction-button.is-on-shelf,
.fiction-button.fiction-button--ghost.is-on-shelf {
	border-color: var(--rm-rose);
	color: var(--rm-rose-deep);
	background: var(--rm-blush);
}

.fiction-footer__links button {
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	font-weight: 550;
	cursor: pointer;
	padding: 0;
}
.fiction-footer__links button:hover { color: #fff; }

/* ---------- Auth modal ---------- */
.rm-auth {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 20px;
}
.rm-auth[hidden] { display: none !important; }
.rm-auth__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 26, 0.55);
	backdrop-filter: blur(6px);
}
.rm-auth__box {
	position: relative;
	width: min(420px, 100%);
	background: var(--rm-panel);
	border-radius: 24px;
	padding: 36px 32px 28px;
	box-shadow: 0 30px 80px rgba(20, 16, 26, 0.28);
	animation: rm-toast .28s ease;
}
.rm-auth__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--rm-paper);
	color: var(--rm-muted);
	font-size: 1.35rem;
	cursor: pointer;
	line-height: 1;
}
.rm-auth__close:hover { color: var(--rm-ink); }
.rm-auth__brand {
	font-family: var(--rm-serif);
	font-size: 1.15rem;
	font-weight: 550;
	letter-spacing: -0.02em;
	margin-bottom: 10px;
}
.rm-auth__brand span { color: var(--rm-rose); font-style: italic; }
.rm-auth__title {
	margin: 0 0 8px;
	font-family: var(--rm-serif);
	font-size: 1.65rem;
	font-weight: 550;
	letter-spacing: -0.02em;
}
.rm-auth__sub {
	margin: 0 0 22px;
	color: var(--rm-muted);
	font-size: 0.95rem;
	line-height: 1.55;
}
.rm-auth__form { display: grid; gap: 14px; }
.rm-auth__field { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 650; color: var(--rm-ink-soft); }
.rm-auth__field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--rm-line);
	border-radius: 12px;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--rm-ink);
	background: var(--rm-paper);
	outline: 0;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rm-auth__field input:focus {
	border-color: rgba(196, 92, 74, 0.5);
	box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.12);
	background: #fff;
}
.rm-auth__submit { width: 100%; margin-top: 4px; }
.rm-auth__msg {
	font-size: 0.88rem;
	font-weight: 600;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--rm-paper);
}
.rm-auth__msg.is-error { color: #a34638; background: #fceeed; }
.rm-auth__msg.is-success { color: #2f7a4a; background: #e8f5ec; }
.rm-auth__switch {
	margin: 18px 0 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--rm-muted);
}
.rm-auth__switch button {
	border: 0;
	background: none;
	color: var(--rm-rose);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

/* ---------- Generic modal (top-up) ---------- */
.rm-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 20px;
}
.rm-modal[hidden] { display: none !important; }
.rm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 26, 0.55);
	backdrop-filter: blur(6px);
}
.rm-modal__box {
	position: relative;
	width: min(440px, 100%);
	background: var(--rm-panel);
	border-radius: 24px;
	padding: 32px 28px;
	box-shadow: 0 30px 80px rgba(20, 16, 26, 0.28);
	animation: rm-toast .28s ease;
}
.rm-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--rm-paper);
	color: var(--rm-muted);
	font-size: 1.35rem;
	cursor: pointer;
}
.rm-modal__title {
	margin: 0 0 6px;
	font-family: var(--rm-serif);
	font-size: 1.45rem;
	font-weight: 550;
}
.rm-modal__sub {
	margin: 0 0 18px;
	color: var(--rm-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}
.rm-modal__summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 0;
	margin-bottom: 12px;
	border-top: 1px solid var(--rm-line);
	font-size: 0.95rem;
	color: var(--rm-muted);
}
.rm-modal__summary strong {
	font-family: var(--rm-serif);
	font-size: 1.35rem;
	color: var(--rm-rose);
	font-weight: 550;
}
.rm-modal__hint {
	margin: 12px 0 0;
	font-size: 0.88rem;
	color: var(--rm-muted);
	text-align: center;
	line-height: 1.45;
}
.rm-modal__hint.is-err { color: #a34638; font-weight: 650; }
.rm-modal__hint.is-ok { color: #2f7a4a; font-weight: 650; }
.rm-topup__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 8px;
}
.rm-topup__pkg {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 12px;
	border: 1.5px solid var(--rm-line);
	border-radius: 14px;
	background: var(--rm-paper);
	cursor: pointer;
	font: inherit;
	transition: border-color .15s ease, background .15s ease;
}
.rm-topup__pkg strong { font-size: 0.98rem; color: var(--rm-ink); }
.rm-topup__pkg span { font-size: 0.82rem; color: var(--rm-muted); }
.rm-topup__pkg:hover { border-color: rgba(196, 92, 74, 0.45); }
.rm-topup__pkg.is-selected {
	border-color: var(--rm-rose);
	background: var(--rm-blush);
}
.rm-topup__pkg.is-selected span { color: var(--rm-rose-deep); }
.rm-modal__box .fiction-button { width: 100%; }

/* paywall balance */
.fiction-paywall__balance {
	margin: 14px 0 0 !important;
	font-size: 0.9rem !important;
	color: rgba(255, 248, 242, 0.7) !important;
}
.fiction-paywall__balance strong { color: var(--rm-gold-soft); }
.fiction-paywall__form .fiction-button--ghost {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.28);
	box-shadow: none;
}
.fiction-paywall__form .fiction-button--ghost:hover {
	background: rgba(255, 255, 255, 0.08);
	filter: none;
}

/* =========================================================
   Reader page + toolbar
   ========================================================= */
.rm-reader-page { padding-bottom: 80px; }
.rm-reader__crumb {
	padding: 22px 0 0;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--rm-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.rm-reader__crumb a:hover { color: var(--rm-rose); }

.rm-reader-wrap {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 18px;
	width: min(1180px, calc(100% - 40px));
	margin: 20px auto 0;
}

.rm-reader {
	flex: 1;
	min-width: 0;
	max-width: 760px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 24px;
	padding: 40px 48px 48px;
	box-shadow: var(--rm-shadow);
}

.rm-reader__hero { text-align: center; margin-bottom: 8px; }
.rm-reader__hero-cover {
	display: inline-block;
	width: 140px;
	aspect-ratio: 3/4;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(26, 21, 32, 0.18);
	margin-bottom: 14px;
	position: relative;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
}
.rm-reader__hero-cover img,
.rm-reader__hero-cover .fiction-card__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rm-reader__hero-title {
	margin: 0 0 6px;
	font-family: var(--rm-serif);
	font-size: 1.25rem;
	font-weight: 550;
}
.rm-reader__hero-title a:hover { color: var(--rm-rose); }
.rm-reader__hero-author { margin: 0 0 16px; color: var(--rm-muted); font-size: 0.92rem; }
.rm-reader__hero-line {
	width: 48%;
	max-width: 280px;
	height: 1px;
	margin: 0 auto 28px;
	background: var(--rm-line);
}

.rm-reader__header {
	margin-bottom: 28px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--rm-line);
	text-align: center;
}
.rm-reader__title {
	margin: 0 0 10px;
	font-family: var(--rm-serif);
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 550;
	letter-spacing: -0.02em;
	line-height: 1.2;
}
.rm-reader__meta {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 0.86rem;
	color: var(--rm-muted);
}

.rm-reader__content {
	font-family: var(--rm-serif);
	font-size: 1.125rem;
	line-height: 1.95;
	color: #2a2430;
	letter-spacing: 0.01em;
}
.rm-reader__content p { margin: 0 0 1.3em; }
.rm-reader__content--preview {
	position: relative;
	max-height: 220px;
	overflow: hidden;
	pointer-events: none;
	user-select: none;
}
.rm-reader__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 110px;
	background: linear-gradient(transparent, #fff);
	pointer-events: none;
}

.rm-reader__chapnav {
	display: flex;
	gap: 12px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--rm-line);
}
.rm-reader__nav-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 16px;
	border-radius: 999px;
	background: var(--rm-blush);
	color: var(--rm-rose-deep);
	font-weight: 700;
	font-size: 0.92rem;
	transition: background .15s ease, transform .15s ease;
}
.rm-reader__nav-btn:hover { background: #f3ddd4; transform: translateY(-1px); }
.rm-reader__nav-btn.is-disabled {
	opacity: 0.4;
	pointer-events: none;
}

.rm-reader__related {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--rm-line);
}
.rm-reader__related h3 {
	margin: 0 0 20px;
	font-family: var(--rm-serif);
	font-size: 1.35rem;
	font-weight: 550;
}
.rm-reader__related .fiction-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

/* Toolbar */
.rm-toolbar {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	background: var(--rm-night);
	border-radius: 16px;
	box-shadow: 0 12px 36px rgba(20, 16, 26, 0.28);
	flex-shrink: 0;
	z-index: 15;
	margin-top: 8px;
}
.rm-toolbar__btn {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: rgba(255, 248, 242, 0.88);
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
	padding: 0;
}
.rm-toolbar__btn:hover,
.rm-toolbar__btn.is-open,
.rm-toolbar__btn.is-active {
	background: var(--rm-rose);
	color: #fff;
}
.rm-toolbar__panel {
	position: absolute;
	top: 0;
	right: calc(100% + 10px);
	width: 320px;
	max-height: 70vh;
	background: #221c2a;
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 20;
}
.rm-toolbar__panel[hidden] { display: none !important; }
.rm-toolbar__panel-head {
	padding: 16px 18px 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}
.rm-toolbar__panel-head strong {
	color: #fff;
	font-size: 0.92rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.rm-toolbar__panel-head span {
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.45);
}

.rm-toc__list {
	overflow-y: auto;
	padding: 6px 0 10px;
}
.rm-toc__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.9rem;
	font-weight: 550;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: background .12s ease, color .12s ease;
}
.rm-toc__item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.rm-toc__item.is-active { color: var(--rm-gold-soft); font-weight: 700; }
.rm-toc__item span {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rm-toc__badge {
	font-style: normal;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.rm-toc__badge.is-free { background: rgba(46, 125, 50, 0.25); color: #8fd19e; }
.rm-toc__badge.is-coin { background: rgba(196, 163, 90, 0.22); color: var(--rm-gold-soft); }

.rm-settings__body { padding: 18px; }
.rm-settings__section { margin-bottom: 22px; }
.rm-settings__label {
	display: block;
	color: #fff;
	font-size: 0.88rem;
	font-weight: 700;
	margin-bottom: 12px;
}
.rm-settings__colors { display: flex; gap: 14px; }
.rm-settings__swatch {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: var(--sw, #fff);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	position: relative;
}
.rm-settings__swatch.is-active {
	border-color: var(--rm-gold-soft);
	box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.35);
}
.rm-settings__fs {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	border-radius: 12px;
	overflow: hidden;
}
.rm-settings__fs button {
	width: 52px;
	height: 42px;
	border: 0;
	background: transparent;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}
.rm-settings__fs button:hover { background: rgba(255, 255, 255, 0.08); }
.rm-settings__fs span {
	width: 48px;
	text-align: center;
	color: #fff;
	font-weight: 800;
	border-left: 1.5px solid rgba(255, 255, 255, 0.22);
	border-right: 1.5px solid rgba(255, 255, 255, 0.22);
	line-height: 42px;
}

/* Reader themes */
body.rm-theme-warm { background: #f6e8d8 !important; }
body.rm-theme-warm .rm-reader { background: #fff4e8; border-color: #ead9c4; }
body.rm-theme-warm .rm-reader__fade { background: linear-gradient(transparent, #fff4e8); }
body.rm-theme-warm .rm-reader__header,
body.rm-theme-warm .rm-reader__chapnav,
body.rm-theme-warm .rm-reader__related { border-color: #ead9c4; }

body.rm-theme-dark { background: #0c0a10 !important; color: #e8e2da; }
body.rm-theme-dark .fiction-header {
	background: rgba(12, 10, 16, 0.9);
	border-bottom-color: rgba(255, 255, 255, 0.06);
}
body.rm-theme-dark .fiction-brand,
body.rm-theme-dark .fiction-nav a { color: #e8e2da; }
body.rm-theme-dark .rm-reader {
	background: #16121c;
	border-color: #2a2430;
	color: #e8e2da;
}
body.rm-theme-dark .rm-reader__title,
body.rm-theme-dark .rm-reader__hero-title,
body.rm-theme-dark .rm-reader__related h3 { color: #fff; }
body.rm-theme-dark .rm-reader__content { color: #d5cfc6; }
body.rm-theme-dark .rm-reader__fade { background: linear-gradient(transparent, #16121c); }
body.rm-theme-dark .rm-reader__header,
body.rm-theme-dark .rm-reader__chapnav,
body.rm-theme-dark .rm-reader__related,
body.rm-theme-dark .rm-reader__hero-line { border-color: #2a2430; }
body.rm-theme-dark .rm-reader__nav-btn { background: #2a1f2c; color: #e8a090; }
body.rm-theme-dark .rm-reader__crumb,
body.rm-theme-dark .rm-reader__crumb a { color: #9a92a0; }
body.rm-theme-dark .fiction-paywall { /* keep dark paywall */ }

/* =========================================================
   Library page
   ========================================================= */
.rm-library { padding: 36px 0 64px; }
.rm-library__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 18px;
	margin-bottom: 28px;
}
.rm-library__head h1 {
	margin: 0 0 6px;
	font-family: var(--rm-serif);
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-weight: 550;
	letter-spacing: -0.03em;
}
.rm-library__head p { margin: 0; color: var(--rm-muted); }
.rm-library__tabs {
	display: flex;
	gap: 6px;
	padding: 4px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 999px;
}
.rm-library__tab {
	border: 0;
	background: transparent;
	padding: 10px 18px;
	border-radius: 999px;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--rm-muted);
	cursor: pointer;
}
.rm-library__tab.is-active {
	background: var(--rm-ink);
	color: #fff;
}
.rm-library__actions {
	display: flex;
	gap: 10px;
	margin-bottom: 18px;
}
.rm-library__empty { margin: 20px 0; }
.rm-library__empty .fiction-button { margin-top: 14px; }

.rm-lib-card__check {
	display: none;
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: rgba(0, 0, 0, 0.25);
	z-index: 3;
}
.rm-library.is-editing .rm-lib-card__check { display: block; }
.rm-lib-card.is-selected .rm-lib-card__check {
	background: var(--rm-rose);
	border-color: var(--rm-rose);
}
.rm-lib-card.is-selected .rm-lib-card__check::after {
	content: "";
	display: block;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	position: absolute;
	top: 3px;
	left: 8px;
}
.rm-lib-card .fiction-card__cover { position: relative; }

.rm-history-list { display: flex; flex-direction: column; gap: 0; }
.rm-history-item {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 20px;
	padding: 22px 0;
	border-bottom: 1px solid var(--rm-line);
}
.rm-history-item__cover {
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 3/4;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
	position: relative;
}
.rm-history-item__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rm-history-item__title {
	display: block;
	font-family: var(--rm-serif);
	font-size: 1.2rem;
	font-weight: 550;
	margin-bottom: 4px;
}
.rm-history-item__title:hover { color: var(--rm-rose); }
.rm-history-item__body p {
	margin: 0 0 6px;
	color: var(--rm-muted);
	font-size: 0.9rem;
}
.rm-history-item__progress span { color: var(--rm-rose); font-weight: 650; }
.rm-history-item__body .fiction-button {
	margin-top: 10px;
	padding: 10px 18px;
	font-size: 0.88rem;
}

/* Reader responsive */
@media (max-width: 900px) {
	.rm-reader-wrap { width: min(100% - 24px, 1180px); gap: 0; flex-direction: column; }
	.rm-reader { padding: 28px 20px 40px; max-width: none; border-radius: 18px; }
	.rm-reader__related .fiction-grid { grid-template-columns: repeat(2, 1fr); }
	.rm-toolbar {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		flex-direction: row;
		justify-content: center;
		border-radius: 0;
		margin: 0;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
		gap: 6px;
	}
	.rm-toolbar__panel {
		position: fixed;
		top: auto;
		bottom: 60px;
		left: 0;
		right: 0;
		width: 100%;
		max-height: 55vh;
		border-radius: 18px 18px 0 0;
	}
	.fiction-coins__label { display: none; }
	.fiction-account__name { display: none; }
}
@media (max-width: 580px) {
	.rm-history-item { grid-template-columns: 80px 1fr; gap: 14px; }
	.rm-topup__grid { grid-template-columns: 1fr; }
	.rm-library__head { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   v2.2 — Account / Search suggest / Comments / Reviews / Share
   ========================================================= */

/* Search suggest */
.fiction-search { position: relative; }
.rm-search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	min-width: 320px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 16px;
	box-shadow: var(--rm-shadow-lg);
	z-index: 50;
	overflow: hidden;
	padding: 8px 0;
}
.rm-search-suggest[hidden] { display: none !important; }
.rm-search-suggest__item {
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 12px;
	align-items: center;
	padding: 10px 14px;
	transition: background .12s ease;
}
.rm-search-suggest__item:hover { background: var(--rm-blush); }
.rm-search-suggest__cover {
	width: 40px;
	aspect-ratio: 3/4;
	border-radius: 6px;
	overflow: hidden;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
}
.rm-search-suggest__cover img { width: 100%; height: 100%; object-fit: cover; }
.rm-search-suggest__ph { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, #c45c4a, #3d2548); }
.rm-search-suggest__item strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 650;
	line-height: 1.3;
}
.rm-search-suggest__item em {
	display: block;
	font-style: normal;
	font-size: 0.78rem;
	color: var(--rm-muted);
	margin-top: 2px;
}
.rm-search-suggest__empty {
	margin: 0;
	padding: 16px;
	text-align: center;
	color: var(--rm-muted);
	font-size: 0.9rem;
}
.rm-search-suggest__all {
	display: block;
	padding: 10px 14px;
	border-top: 1px solid var(--rm-line);
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--rm-rose);
	text-align: center;
}

/* Share */
.rm-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 22px;
}
.rm-share__label {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--rm-muted);
	margin-right: 4px;
}
.rm-share__btn {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid var(--rm-line);
	background: var(--rm-panel);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 650;
	color: var(--rm-ink-soft);
	cursor: pointer;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.rm-share__btn:hover {
	border-color: var(--rm-rose);
	color: var(--rm-rose-deep);
	background: var(--rm-blush);
}

/* Comments / Reviews */
.rm-comments,
.rm-reviews {
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid var(--rm-line);
}
.rm-comments__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}
.rm-comments__head h3 {
	margin: 0;
	font-family: var(--rm-serif);
	font-size: 1.25rem;
	font-weight: 550;
}
.rm-comments__form,
.rm-reviews__form {
	display: grid;
	gap: 10px;
	padding: 16px;
	margin-bottom: 18px;
	background: var(--rm-paper);
	border: 1px solid var(--rm-line);
	border-radius: 16px;
}
.rm-comments__form input,
.rm-comments__form textarea,
.rm-reviews__form input,
.rm-reviews__form textarea,
.rm-reviews__form select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--rm-line);
	border-radius: 10px;
	font: inherit;
	background: #fff;
}
.rm-comments__form textarea,
.rm-reviews__form textarea { resize: vertical; min-height: 80px; }
.rm-reviews__row {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 10px;
}
.rm-reviews__rating {
	display: grid;
	gap: 4px;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--rm-muted);
}
.rm-comments__msg { margin: 0; font-size: 0.88rem; font-weight: 600; }
.rm-comments__msg.is-ok { color: #2f7a4a; }
.rm-comments__msg.is-err { color: #a34638; }
.rm-comments__loading,
.rm-comments__empty {
	color: var(--rm-muted);
	font-size: 0.92rem;
	padding: 12px 0;
}
.rm-comment,
.rm-review {
	padding: 16px 0;
	border-bottom: 1px solid var(--rm-line);
}
.rm-comment__top,
.rm-review__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 0.86rem;
}
.rm-comment__top strong,
.rm-review__top strong { color: var(--rm-ink); font-weight: 700; }
.rm-comment__top span,
.rm-review__top span { color: var(--rm-muted); }
.rm-comment p,
.rm-review p {
	margin: 0 0 10px;
	line-height: 1.6;
	color: var(--rm-ink-soft);
	font-size: 0.95rem;
}
.rm-comment__like {
	border: 0;
	background: transparent;
	color: var(--rm-muted);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 650;
	cursor: pointer;
	padding: 0;
}
.rm-comment__like.is-liked,
.rm-comment__like:hover { color: var(--rm-rose); }
.rm-review__stars {
	display: inline-flex;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--rm-blush);
	color: var(--rm-rose-deep);
	font-size: 0.75rem;
	font-weight: 800;
}
.rm-comments__more {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 12px;
	border: 1px dashed var(--rm-line);
	border-radius: 12px;
	background: transparent;
	font: inherit;
	font-weight: 650;
	color: var(--rm-rose);
	cursor: pointer;
}
.rm-comments__more:hover { background: var(--rm-blush); }

.rm-comments-panel__add {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.35);
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
}
.rm-comments-panel__body {
	overflow-y: auto;
	max-height: 50vh;
	padding: 8px 14px 14px;
}
.rm-comments-panel .rm-comment {
	border-bottom-color: rgba(255,255,255,.08);
	color: rgba(255,255,255,.85);
}
.rm-comments-panel .rm-comment__top strong { color: #fff; }
.rm-comments-panel .rm-comment p { color: rgba(255,255,255,.75); }

/* Account page */
.rm-account { padding: 36px 0 72px; }
.rm-account__hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px 24px;
	padding: 28px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 24px;
	box-shadow: var(--rm-shadow);
	margin-bottom: 22px;
}
.rm-account__avatar {
	width: 64px;
	height: 64px;
	border-radius: 18px;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, #e07a68, #8b3d32);
	color: #fff;
	font-size: 1.4rem;
	font-weight: 700;
	flex-shrink: 0;
}
.rm-account__hero h1 {
	margin: 0 0 4px;
	font-family: var(--rm-serif);
	font-size: 1.7rem;
	font-weight: 550;
}
.rm-account__hero p { margin: 0; color: var(--rm-muted); }
.rm-account__hero-actions {
	margin-left: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.rm-account__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 28px;
}
.rm-account__stat {
	padding: 20px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 18px;
}
.rm-account__stat-label {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--rm-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}
.rm-account__stat-value {
	font-family: var(--rm-serif);
	font-size: 1.65rem;
	font-weight: 550;
	letter-spacing: -0.02em;
}
.rm-account__stat-value em {
	font-style: normal;
	font-size: 0.85rem;
	font-family: var(--rm-sans);
	font-weight: 600;
	color: var(--rm-muted);
}
.rm-account__section { margin-bottom: 36px; }
.rm-account__pkgs { max-width: 520px; }
.rm-account__list { list-style: none; margin: 0; padding: 0; }
.rm-account__row {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--rm-line);
}
.rm-account__thumb {
	width: 64px;
	aspect-ratio: 3/4;
	border-radius: 10px;
	overflow: hidden;
	background: linear-gradient(145deg, #d4a08c, #6b3a4a);
	position: relative;
}
.rm-account__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rm-account__row-title {
	font-weight: 700;
	font-size: 1rem;
	display: block;
	margin-bottom: 4px;
}
.rm-account__row-title:hover { color: var(--rm-rose); }
.rm-account__row-body p { margin: 0 0 4px; font-size: 0.88rem; color: var(--rm-muted); }
.rm-account__badge {
	display: inline-flex;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--rm-blush);
	color: var(--rm-rose-deep);
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
}
.rm-account__when { font-size: 0.8rem !important; }
.rm-account__table-wrap {
	overflow-x: auto;
	border: 1px solid var(--rm-line);
	border-radius: 16px;
	background: var(--rm-panel);
}
.rm-account__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.rm-account__table th,
.rm-account__table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--rm-line);
}
.rm-account__table th {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--rm-muted);
	background: var(--rm-paper);
}
.rm-account__table tr:last-child td { border-bottom: 0; }
.rm-account__table .is-plus { color: #2f7a4a; font-weight: 700; }
.rm-account__table .is-minus { color: #a34638; font-weight: 700; }

@media (max-width: 800px) {
	.rm-account__stats { grid-template-columns: 1fr; }
	.rm-account__hero-actions { margin-left: 0; width: 100%; }
	.rm-reviews__row { grid-template-columns: 1fr; }
	.rm-account__row { grid-template-columns: 56px 1fr; }
	.rm-account__row .fiction-button { grid-column: 2; justify-self: start; }
	.rm-search-suggest { min-width: 260px; right: auto; width: min(320px, 80vw); }
}

/* =========================================================
   v2.3 — Multi payment methods
   图标列与 novel 一致：固定 104px，Wallet/Card/PayPal/Apple/Google 同一列居中对齐
   ========================================================= */
.rm-pay-methods {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 14px;
}

/* 支付方式列表：左图标列 104px + 文案，勾选绝对定位右侧 */
.rm-pay-methods[data-rm-pay-methods] .rm-pay-method,
#rmTopUpMethods .rm-pay-method,
#rmVipMethods .rm-pay-method {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	column-gap: 14px;
	align-items: center;
	min-height: 70px;
	padding: 10px 52px 10px 16px;
	border: 1.5px solid var(--rm-line);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rm-pay-method {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	column-gap: 14px;
	align-items: center;
	min-height: 70px;
	padding: 10px 52px 10px 16px;
	border: 1.5px solid var(--rm-line);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rm-pay-method input { display: none; }
.rm-pay-method:hover {
	border-color: rgba(196, 92, 74, 0.45);
	box-shadow: 0 6px 18px rgba(196, 92, 74, 0.08);
}
.rm-pay-method.is-selected {
	border-color: var(--rm-rose);
	background: var(--rm-blush);
	box-shadow: 0 8px 22px rgba(196, 92, 74, 0.1);
}

/* 第 1 列：所有支付图标统一落在同一 104px 槽位内居中 */
.rm-pay-method__icon {
	grid-column: 1;
	grid-row: 1;
	width: 104px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	align-self: center;
	box-sizing: border-box;
}
.rm-pay-method__icon svg {
	display: block;
	width: 42px;
	height: 42px;
	padding: 9px;
	border: 1px solid #eef0f4;
	border-radius: 12px;
	background: #f7f8fb;
	color: #8b95a1;
	box-sizing: border-box;
	flex-shrink: 0;
}
.rm-pay-method.is-selected .rm-pay-method__icon svg {
	color: var(--rm-rose);
	border-color: rgba(196, 92, 74, 0.28);
	background: #fff;
}
/* 兼容旧 class：box 不再单独缩窄列宽 */
.rm-pay-method__icon--box {
	width: 104px;
	height: 54px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
}
.rm-pay-method__icon--vip {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: linear-gradient(145deg, #e07a68, #8b3d32);
	color: #fff;
	font-size: 1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Apple / Google 官方标识：同列居中，不拉伸 */
.rm-pay-method__mark {
	display: block;
	object-fit: contain;
	max-width: 100%;
	flex-shrink: 0;
}
.rm-pay-method[data-method="applepay"] .rm-pay-method__mark,
.rm-pay-method__mark--apple {
	width: auto;
	height: 30px;
}
.rm-pay-method[data-method="googlepay"] .rm-pay-method__mark,
.rm-pay-method__mark--gpay {
	width: 104px;
	height: 54px;
}

.rm-pay-method__name {
	grid-column: 2;
	grid-row: 1;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--rm-ink);
	min-width: 0;
	line-height: 1.3;
}
.rm-pay-method__name em {
	font-style: normal;
	font-weight: 500;
	color: var(--rm-muted);
	font-size: 0.82rem;
}
.rm-pay-method__price {
	font-size: 0.9rem;
	color: var(--rm-rose);
	font-weight: 700;
	white-space: nowrap;
	margin-left: auto;
}
.rm-pay-method__check {
	display: none;
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(196, 92, 74, 0.25);
	box-shadow: 0 2px 8px rgba(196, 92, 74, 0.12);
	color: var(--rm-rose);
	font-size: 0.75rem;
	font-weight: 800;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.rm-pay-method.is-selected .rm-pay-method__check { display: inline-flex; }

.rm-paypal-box { min-height: 0; margin-bottom: 10px; }
.fiction-button.is-googlepay {
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 999px !important;
	line-height: 0;
	overflow: hidden;
}
.fiction-button.is-googlepay:hover { filter: none; transform: none; }
.rm-gpay-btn-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 52px;
	object-fit: contain;
	margin: 0 auto;
	pointer-events: none;
}
.fiction-paywall__extra {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

/* VIP 套餐列表（非支付图标行）可保留略不同布局 */
#rmVipPlans .rm-pay-method {
	grid-template-columns: 48px minmax(0, 1fr) auto;
	padding-right: 48px;
	min-height: 64px;
}
#rmVipPlans .rm-pay-method__icon {
	width: 48px;
	height: 48px;
}
#rmVipPlans .rm-pay-method__name { grid-column: auto; }

@media (max-width: 480px) {
	.rm-pay-methods[data-rm-pay-methods] .rm-pay-method,
	#rmTopUpMethods .rm-pay-method,
	#rmVipMethods .rm-pay-method,
	.rm-pay-method {
		grid-template-columns: 88px minmax(0, 1fr);
		column-gap: 10px;
		padding-right: 46px;
	}
	.rm-pay-method__icon {
		width: 88px;
		height: 48px;
	}
	.rm-pay-method__icon--box {
		width: 88px;
		height: 48px;
	}
	.rm-pay-method[data-method="googlepay"] .rm-pay-method__mark,
	.rm-pay-method__mark--gpay {
		width: 88px;
		height: 48px;
	}
	.rm-pay-method[data-method="applepay"] .rm-pay-method__mark,
	.rm-pay-method__mark--apple {
		height: 26px;
	}
}
.rm-account__vip{display:inline-flex;padding:2px 8px;border-radius:999px;background:linear-gradient(145deg,#e07a68,#8b3d32);color:#fff;font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle;}

/* =========================================================
   v2.4 — Author submit / chapter editor / account stories / Google
   ========================================================= */
.rm-auth__divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0 12px;
	color: var(--rm-muted);
	font-size: 0.8rem;
}
.rm-auth__divider::before,
.rm-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rm-line);
}
.rm-auth__google { display: flex; justify-content: center; min-height: 44px; }

.rm-account__tabs {
	display: flex;
	gap: 6px;
	padding: 4px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 999px;
	width: fit-content;
	margin-bottom: 24px;
}
.rm-account__tab {
	border: 0;
	background: transparent;
	padding: 10px 18px;
	border-radius: 999px;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 650;
	color: var(--rm-muted);
	cursor: pointer;
}
.rm-account__tab.is-active { background: var(--rm-ink); color: #fff; }
.rm-account__panel[hidden] { display: none !important; }
.rm-account__vip-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
}
.rm-account__vip-card {
	padding: 18px;
	border: 1px solid var(--rm-line);
	border-radius: 16px;
	background: var(--rm-panel);
	display: grid;
	gap: 6px;
}
.rm-account__vip-card strong { font-family: var(--rm-serif); font-size: 1.1rem; }
.rm-account__vip-card span { color: var(--rm-muted); font-size: 0.86rem; }
.rm-account__vip-card em { font-style: normal; color: var(--rm-rose); font-weight: 700; }
.rm-account__stories { display: flex; flex-direction: column; }
.rm-account__story {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--rm-line);
}
.rm-account__story-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-review__actions { display: flex; gap: 14px; align-items: center; }
.rm-review__reply-form {
	display: grid;
	gap: 8px;
	margin-top: 12px;
	padding: 12px;
	background: var(--rm-paper);
	border-radius: 12px;
}

/* Submit */
.rm-submit { padding: 36px 0 72px; }
.rm-submit__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 28px;
}
.rm-submit__head h1 {
	margin: 0 0 6px;
	font-family: var(--rm-serif);
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-weight: 550;
}
.rm-submit__head p { margin: 0; color: var(--rm-muted); }
.rm-submit__grid {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 32px;
	align-items: start;
}
.rm-submit__cover {
	display: block;
	aspect-ratio: 3/4;
	border-radius: 18px;
	overflow: hidden;
	border: 2px dashed var(--rm-line);
	background: var(--rm-panel);
	cursor: pointer;
	position: relative;
}
.rm-submit__cover-ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	text-align: center;
	gap: 6px;
	color: var(--rm-muted);
	padding: 16px;
}
.rm-submit__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rm-submit__fields {
	display: grid;
	gap: 14px;
	padding: 24px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 24px;
	box-shadow: var(--rm-shadow);
}
.rm-submit__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	font-weight: 550;
	color: var(--rm-ink-soft);
}
.rm-submit__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.rm-submit__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid var(--rm-line);
	background: var(--rm-paper);
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
}
.rm-submit select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--rm-line);
	border-radius: 12px;
	font: inherit;
	background: var(--rm-paper);
}

/* Chapter editor */
.rm-ched {
	display: grid;
	grid-template-columns: 280px 1fr;
	min-height: calc(100vh - 72px);
	background: var(--rm-paper);
}
.rm-ched__side {
	background: var(--rm-night);
	color: rgba(255,248,242,.85);
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.rm-ched__side-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}
.rm-ched__back {
	display: block;
	font-size: 0.8rem;
	color: rgba(255,255,255,.55);
	margin-bottom: 4px;
}
.rm-ched__book {
	display: block;
	font-family: var(--rm-serif);
	font-size: 1rem;
	color: #fff;
	line-height: 1.3;
}
.rm-ched__list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
}
.rm-ched__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 10px;
	border-radius: 10px;
	cursor: pointer;
	border: 1px solid transparent;
}
.rm-ched__item:hover { background: rgba(255,255,255,.06); }
.rm-ched__item.is-active {
	background: rgba(196, 92, 74, 0.25);
	border-color: rgba(196, 92, 74, 0.4);
}
.rm-ched__item-title {
	flex: 1;
	font-size: 0.9rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rm-ched__badge {
	font-style: normal;
	font-size: 0.68rem;
	font-weight: 800;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	text-transform: uppercase;
}
.rm-ched__reorder { width: 100%; }
.rm-ched__main {
	padding: 28px 36px 48px;
	max-width: 900px;
}
.rm-ched__title {
	width: 100%;
	border: 0;
	border-bottom: 1px solid var(--rm-line);
	padding: 10px 0 14px;
	font-family: var(--rm-serif);
	font-size: 1.8rem;
	font-weight: 550;
	background: transparent;
	outline: 0;
	margin-bottom: 12px;
}
.rm-ched__tools {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}
.rm-ched__tools button {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid var(--rm-line);
	background: var(--rm-panel);
	cursor: pointer;
}
.rm-ched__words {
	margin-left: auto;
	font-size: 0.82rem;
	color: var(--rm-muted);
	font-weight: 600;
}
.rm-ched__content {
	min-height: 420px;
	padding: 22px;
	background: var(--rm-panel);
	border: 1px solid var(--rm-line);
	border-radius: 18px;
	font-family: var(--rm-serif);
	font-size: 1.12rem;
	line-height: 1.9;
	outline: 0;
	box-shadow: var(--rm-shadow);
}
.rm-ched__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}
.rm-ched__status {
	margin-left: auto;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--rm-muted);
	text-transform: uppercase;
}

@media (max-width: 900px) {
	.rm-submit__grid { grid-template-columns: 1fr; }
	.rm-submit__cover { max-width: 200px; }
	.rm-ched { grid-template-columns: 1fr; }
	.rm-ched__side { max-height: 280px; }
	.rm-account__story { grid-template-columns: 56px 1fr; }
	.rm-account__story-actions { grid-column: 2; }
}
