/*
Theme Name: Noveo
Description: Noveo Stories theme — light, baby blue, mobile first. Content model (series, taxonomies) comes from the noveo-core plugin; chapter locks come from myCRED + noveo plugins through the_content.
Version: 0.1.0
Author: Noveo Stories
Requires PHP: 8.0
Text Domain: noveo
*/

/* ---------- tokens ---------- */
:root {
	--bg: #ffffff;
	--card: #ffffff;
	--soft: #f0f7fc;
	--text: #13293d;
	--prose: #1e3347;
	--muted: #5e7487;
	--line: #e3eef6;
	--accent: #2470ae;
	--accent-ink: #ffffff;
	--chip: #cde8fa;
	--chip-ink: #13293d;
	--tag-bg: #e1f0fb;
	--tag-ink: #1d5c90;
	--hero: #e3f2fc;
	--cover: #bfe0f7;
	--shadow: 0 8px 28px rgba(36, 112, 174, .12);
	--radius: 22px;
	--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--read: "Literata", Georgia, serif;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #0e1822;
	--card: #16242f;
	--soft: #1c2d3b;
	--text: #e8f1f8;
	--prose: #d6e3ee;
	--muted: #93a8b9;
	--line: #22374a;
	--accent: #4fa6e0;
	--accent-ink: #ffffff;
	--chip: #8ccbf2;
	--chip-ink: #0e1822;
	--tag-bg: #24425c;
	--tag-ink: #bfe3fa;
	--hero: #16283a;
	--cover: #2a4f6e;
	--shadow: 0 8px 28px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-soft { background: var(--soft); color: var(--text); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 20px; height: 20px; }
.chip { display: inline-block; padding: 8px 15px; border-radius: 20px; background: var(--soft); color: var(--text); font-size: 13px; font-weight: 600; }
.chip:hover { text-decoration: none; background: var(--chip); color: var(--chip-ink); }
.chip.is-on { background: var(--chip); color: var(--chip-ink); }
.tag { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); font-size: 13px; font-weight: 600; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--tag-bg); color: var(--tag-ink); font-size: 11px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.logo-mark { width: 100%; height: 100%; }
.logo-mark .lm-spine { fill: #2470AE; }
.logo-mark .lm-lean { fill: #5FA8DD; }
.logo-mark .lm-shelf { stroke: #13293D; stroke-width: 5; stroke-linecap: round; fill: none; }
:root[data-theme="dark"] .logo-mark .lm-spine { fill: #8CCBF2; }
:root[data-theme="dark"] .logo-mark .lm-lean { fill: #FFFFFF; }
:root[data-theme="dark"] .logo-mark .lm-shelf { stroke: #E8F1F8; }
.brand-word { line-height: 1; }
.brand-word b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.brand-word small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
.main-nav { display: none; gap: 4px; }
.main-nav a { padding: 10px 14px; border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 600; }
.main-nav a:hover, .main-nav a.is-active { background: var(--soft); color: var(--accent); text-decoration: none; }
.search { flex: 1 1 220px; display: none; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--soft); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--text); }
.search svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (min-width: 900px) {
	.main-nav, .search { display: flex; }
	[data-mobile-only] { display: none; }
}
svg[class^="i-"] { width: 20px; height: 20px; }

/* ---------- mobile bottom nav ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a.is-active { color: var(--accent); font-weight: 700; }
.tabbar a:hover { text-decoration: none; }
.tabbar svg { width: 22px; height: 22px; }
body { padding-bottom: 84px; }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }

/* ---------- sections, cards ---------- */
.section { margin: 32px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; font-weight: 800; }
.section-head a { font-size: 13px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.card { color: var(--text); }
.card:hover { text-decoration: none; }
.card:hover .card-title { color: var(--accent); }
.cover { aspect-ratio: 5 / 7; border-radius: 16px; background: var(--cover); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.3; margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

.featured { display: flex; gap: 18px; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.featured .cover { width: 112px; flex-shrink: 0; }
.featured-body { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.featured h2 { font-size: 19px; font-weight: 800; margin-top: 8px; }
.featured p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
@media (min-width: 900px) {
	.featured { padding: 28px; gap: 28px; }
	.featured .cover { width: 200px; }
	.featured h2 { font-size: 32px; }
}
.home-top { display: grid; gap: 22px; margin-top: 24px; }
@media (min-width: 900px) { .home-top { grid-template-columns: 2fr 1fr; } }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.rank { display: flex; gap: 14px; align-items: center; padding: 9px 0; color: var(--text); }
.rank:hover { text-decoration: none; }
.rank-n { width: 26px; text-align: center; font-size: 21px; font-weight: 800; color: var(--accent); }
.rank .cover { width: 42px; border-radius: 9px; flex-shrink: 0; }
.rank-t { font-size: 14px; font-weight: 700; line-height: 1.3; }
.callout { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 22px 24px; border-radius: var(--radius); background: var(--soft); }
.callout-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.callout-body { flex: 1 1 240px; }
.callout-body b { display: block; font-size: 17px; }

/* ---------- series page ---------- */
.series-hero { background: var(--hero); border-radius: 0 0 32px 32px; padding: 24px 0 30px; }
.series-hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.series-hero .cover { width: 160px; box-shadow: var(--shadow); }
.series-hero h1 { font-size: 24px; font-weight: 800; margin-top: 14px; }
@media (min-width: 900px) {
	.series-hero .wrap { flex-direction: row; align-items: flex-end; text-align: left; gap: 28px; }
	.series-hero .cover { width: 220px; }
	.series-hero h1 { font-size: 34px; }
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 4px; border: 1px solid var(--line); border-radius: 18px; text-align: center; margin-top: 18px; }
.stats b { display: block; font-size: 16px; }
.stats span { font-size: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn:first-child { flex: 1 1 200px; }
.synopsis { font-size: 15px; line-height: 1.65; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-list a { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.ch-list a:hover { text-decoration: none; color: var(--accent); }
.ch-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.ch-date { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.ch-lock { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 9px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.ch-free { font-size: 12px; font-weight: 700; color: var(--muted); }
.two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 340px; } }

/* ---------- reader ---------- */
.reader-bar { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reader-bar .t { flex: 1; min-width: 0; text-align: center; }
.reader-bar .t small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-bar .t b { font-size: 14px; }
.reader { max-width: 720px; margin: 0 auto; padding: 28px 20px 0; }
.reader h1 { font-size: 22px; font-weight: 800; margin-bottom: 22px; }
.prose { font-family: var(--read); font-size: var(--read-size, 18px); line-height: 1.8; color: var(--prose); }
.prose p { margin: 0 0 1.1em; }
.chapter-nav { display: flex; gap: 10px; max-width: 720px; margin: 28px auto 0; padding: 0 20px; }
.chapter-nav a { flex: 1; }
.chapter-nav a:last-child { flex: 2; }

/* ---------- comments ---------- */
.comments { max-width: 720px; margin: 32px auto 0; padding: 0 20px; }
.comments h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-meta, .comment-metadata { font-size: 12px; color: var(--muted); }
.comment-author { font-size: 13px; font-weight: 800; }
.comment-author img { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.comment-form .submit { min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }

/* ---------- generic pages ---------- */
.page-body { max-width: 900px; margin: 0 auto; padding: 28px 20px; }
.page-body h1 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 28px 0; }
.pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.pagination .current { background: var(--accent); color: var(--accent-ink); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* =========================================================
   Canvas match (direction A) — header + home. Overrides above.
   ========================================================= */
.header-row { min-height: 72px; flex-wrap: nowrap; }
.search-desktop, .avatar-btn { display: none; }
.avatar-btn { background: var(--chip); color: var(--chip-ink); }
.icon-btn:hover { text-decoration: none; }
.search-mobile-row { padding-bottom: 14px; }
.search-mobile { display: flex; height: 48px; border-radius: 24px; }
.search-mobile input { font-size: 15px; }
.site-header { border-bottom-color: transparent; }
@media (min-width: 900px) {
	.site-header { border-bottom-color: var(--line); }
	.search-desktop { display: flex; }
	.avatar-btn { display: inline-flex; }
	.search-mobile-row { display: none; }
	.main-nav a.is-active { background: var(--soft); color: var(--accent); font-weight: 700; }
}

.home { display: grid; gap: 26px; padding-top: 6px; padding-bottom: 24px; }
.home .section-head h2 { font-size: 18px; }
@media (min-width: 900px) {
	.home {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		grid-template-areas: "feat trend" "picks picks" "mood mood" "discord discord";
		gap: 44px 24px;
		padding-top: 32px;
	}
	.home-feat { grid-area: feat; }
	.home-trend { grid-area: trend; }
	.home-picks { grid-area: picks; }
	.home-mood { grid-area: mood; }
	.home-discord { grid-area: discord; }
	.home .section-head h2 { font-size: 22px; }
	.home-trend .section-head h2 { font-size: 19px; }
}

/* Featured: compact card on phones, large hero on desktop */
.home-feat { display: flex; gap: 16px; padding: 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.home-feat .featured-cover { width: 92px; flex-shrink: 0; }
.home-feat .featured-cover .cover { border-radius: 14px; }
.home-feat .featured-body { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.home-feat .featured-title { font-size: 17px; font-weight: 800; line-height: 1.25; margin: 8px 0 0; }
.home-feat .featured-title a { color: var(--text); }
.home-feat .featured-meta { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.home-feat .featured-synopsis, .home-feat .featured-secondary { display: none; }
.home-feat .featured-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-feat .btn { min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
.home-feat .badge { padding: 4px 10px; border-radius: 8px; font-size: 11px; }
@media (min-width: 900px) {
	.home-feat { gap: 28px; padding: 28px; border-radius: 28px; }
	.home-feat .featured-cover { width: 200px; }
	.home-feat .featured-cover .cover { border-radius: 18px; }
	.home-feat .featured-body { padding: 6px 0; }
	.home-feat .featured-title { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin-top: 14px; }
	.home-feat .featured-meta { font-size: 15px; margin-top: 8px; }
	.home-feat .featured-synopsis { display: block; font-size: 15px; line-height: 1.6; color: var(--text); margin: 16px 0 0; max-width: 460px; }
	.home-feat .featured-secondary { display: inline-flex; }
	.home-feat .btn { min-height: 48px; padding: 0 24px; border-radius: 14px; font-size: 15px; }
	.home-feat .badge { padding: 5px 12px; border-radius: 9px; font-size: 12px; }
}

/* Picked for you: swipe row on phones, 6-up grid on desktop */
.picks { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
.picks::-webkit-scrollbar { display: none; }
.picks .card { width: 112px; flex-shrink: 0; scroll-snap-align: start; }
.picks .card-title { font-size: 13px; margin-top: 8px; }
@media (min-width: 900px) {
	.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; overflow: visible; margin: 0; padding: 0; }
	.picks .card { width: auto; }
	.picks .card-title { font-size: 14px; margin-top: 10px; }
	.picks .card-meta { font-size: 13px; }
}

/* Trending: plain list on phones, bordered panel on desktop */
.home-trend { padding: 0; border: 0; border-radius: 0; }
.home-trend .rank { padding: 10px 0; }
.home-trend .rank .cover { width: 44px; border-radius: 10px; }
.rank-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tags-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 0 10px; }
.home-trend .tag { padding: 7px 12px; }
@media (min-width: 900px) {
	.home-trend { padding: 24px; border: 1px solid var(--line); border-radius: 28px; }
	.home-trend .rank { padding: 9px 0; }
	.home-trend .rank .cover { width: 40px; border-radius: 9px; }
	.home-trend .tag { padding: 6px 11px; }
}

.moods .chip { padding: 9px 16px; }
@media (min-width: 900px) { .moods { gap: 10px; } .moods .chip { padding: 11px 20px; font-size: 14px; border-radius: 22px; } }

.home-discord { gap: 14px; padding: 16px; border-radius: 20px; }
.home-discord .callout-icon { width: 44px; height: 44px; border-radius: 14px; }
.home-discord .callout-body b { font-size: 15px; font-weight: 800; }
.home-discord .callout-body .muted { display: block; font-size: 13px; margin-top: 2px; }
@media (min-width: 900px) {
	.home-discord { gap: 20px; padding: 28px 32px; border-radius: 28px; }
	.home-discord .callout-icon { width: 56px; height: 56px; border-radius: 18px; }
	.home-discord .callout-body b { font-size: 20px; }
	.home-discord .callout-body .muted { font-size: 15px; margin-top: 4px; }
}

/* ---------- home v2: featured slider, mood tabs, latest ---------- */
.home-feat.feat-slider { display: block; padding: 0; background: none; box-shadow: none; border-radius: 0; min-width: 0; }
.feat-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 22px; }
.feat-track::-webkit-scrollbar { display: none; }
.feat-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: none; }
.feat-dots { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.feat-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.feat-dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s, background .2s; }
.feat-dot.is-on::before { width: 22px; background: var(--accent); }
.home-feat .featured-synopsis { -webkit-line-clamp: 2; display: none; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
	.feat-track { border-radius: 28px; }
	.feat-slide { gap: 24px; padding: 22px; border-radius: 28px; }
	.home-feat .featured-cover { width: 150px; }
	.home-feat .featured-title { font-size: 26px; margin-top: 10px; }
	.home-feat .featured-meta { font-size: 14px; margin-top: 6px; }
	.home-feat .featured-synopsis { display: -webkit-box; margin-top: 10px; font-size: 14px; }
	.home-feat .btn { min-height: 44px; padding: 0 20px; }
	.feat-dots { justify-content: flex-start; padding-left: 4px; }
}
@media (prefers-reduced-motion: reduce) { .feat-track { scroll-behavior: auto; } }

.moods .chip { border: 0; cursor: pointer; }
.mood-panel { margin-top: 16px; }
.see-all { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; }

.latest-ch { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 28px; }
.latest-ch a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.latest-ch a:hover { text-decoration: none; }
.latest-ch a:hover .rank-t { color: var(--accent); }
.latest-ch .cover { width: 44px; border-radius: 10px; flex-shrink: 0; }
.latest-ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.latest-ch .ch-lock svg { width: 14px; height: 14px; }
@media (min-width: 900px) {
	.latest-ch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.home {
		grid-template-areas: "feat trend" "picks picks" "mood mood" "lch lch" "lnv lnv" "discord discord";
	}
	.home-latest-ch { grid-area: lch; }
	.home-latest-nv { grid-area: lnv; }
}

/* ---------- home v3: top 10, completed ---------- */
.top10 { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.top10::-webkit-scrollbar { display: none; }
.top10 li { flex: 0 0 auto; scroll-snap-align: start; }
.top10 .card { display: grid; grid-template-columns: auto 104px; grid-template-rows: auto auto; column-gap: 0; align-items: end; width: 150px; }
.top10-n { grid-row: 1; grid-column: 1; font-size: 76px; font-weight: 800; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 2px var(--accent); margin-right: -10px; z-index: 1; }
.top10 .cover { grid-row: 1; grid-column: 2; }
.top10 .card-title { grid-row: 2; grid-column: 1 / -1; font-size: 13px; }
@media (min-width: 900px) {
	.top10 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; overflow: visible; margin-inline: 0; padding-inline: 0; }
	.top10 .card { width: auto; grid-template-columns: auto minmax(0, 1fr); }
	.top10-n { font-size: 96px; }
	.home {
		grid-template-areas: "feat trend" "picks picks" "mood mood" "lch lch" "top top" "done done" "lnv lnv" "discord discord";
	}
	.home-top10 { grid-area: top; }
	.home-completed { grid-area: done; }
}

/* fix: the cover link is inline, so its width was ignored and the old
   `.featured .cover` 200px rule pushed the image under the text */
.home-feat .featured-cover { display: block; flex-shrink: 0; }
.home-feat .featured-cover .cover { width: 100%; }
.home-feat .featured-body { flex: 1; }

/* desktop: wider page, featured fills the height next to Trending, content centred */
@media (min-width: 900px) {
	.wrap { max-width: 1320px; }
	.home-feat.feat-slider { display: flex; flex-direction: column; }
	.feat-track { flex: 1; }
	.feat-slide { align-items: center; padding: 28px 32px; gap: 32px; }
	.home-feat .featured-cover { width: 190px; }
	.home-feat .featured-title { font-size: 30px; }
	.home-feat .featured-synopsis { font-size: 15px; max-width: 560px; -webkit-line-clamp: 3; }
	.feat-dots { justify-content: center; padding-left: 0; }
}

/* fix (phone): grid items default to min-width:auto, so the swipe rows
   (picks, top 10, featured track) stretched the whole page wider than the
   screen — header, bottom nav and footer then covered only part of it. */
.home { grid-template-columns: minmax(0, 1fr); }
.home > * { min-width: 0; }

/* fix: long titles squeezed the rank number, so covers did not line up */
.rank-n, .rank .cover { flex-shrink: 0; }

/* ---------- novel page v2 (canvas match) ---------- */
.series-hero .cover { width: 150px; }
.series-hero-body { min-width: 0; }
.series-hero h1 { font-size: 23px; line-height: 1.2; margin-top: 16px; }
.series-by { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.series-by a { font-weight: 700; }
.series-date { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.series-owner { margin: 14px 0 0; }
.series-layout { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.series-layout > * { min-width: 0; }
.series-actions { display: flex; gap: 10px; margin-top: 16px; }
.series-start { flex: 1; min-height: 50px; }
.icon-btn-lg { width: 50px; height: 50px; border-radius: 14px; color: var(--accent); flex-shrink: 0; }
.icon-btn-lg svg { width: 21px; height: 21px; }
.notify-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--text); }
.notify-btn svg { width: 18px; height: 18px; }
.is-soon { opacity: .55; cursor: not-allowed; }
.series-tags { margin-top: 20px; }
.series-tags .chip { padding: 7px 12px; border-radius: 10px; font-weight: 700; }
.synopsis.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.synopsis p { margin: 0 0 .8em; }
/* PublishPress Authors appends an author box to the_content — the byline is already in the hero. */
.synopsis .pp-multiple-authors-boxes-wrapper, .synopsis .pp-author-boxes-wrapper, .synopsis [class*="ppma-"] { display: none !important; }
.see-all-btn { display: block; width: 100%; margin-top: 8px; padding: 12px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; }
.read-more { text-align: left; width: auto; padding: 6px 0; font-size: 13px; }
.ch-lock svg { width: 13px; height: 13px; }
.related .card { width: 108px; }
@media (min-width: 900px) {
	.series-hero { padding: 36px 0 40px; }
	.series-hero .cover { width: 200px; }
	.series-hero h1 { font-size: 34px; margin-top: 0; }
	.series-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
	.series-actions, .notify-btn { max-width: 520px; }
	.related { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
	.related .card { width: auto; }
}

/* fix: `.site-header .wrap { display:flex }` outranked the desktop hide, so the phone search bar showed under the desktop header */
@media (min-width: 900px) { .site-header .search-mobile-row { display: none; } }

/* fix: the phone one-column rule above also hit desktop, so Featured and Trending came out equal. Featured gets the wide column again. */
@media (min-width: 900px) { .home { grid-template-columns: minmax(0, 2.2fr) minmax(320px, 1fr); } }

/* ---------- social + reader v2 ---------- */
.like-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: var(--accent); background: var(--soft); }
.like-btn svg { width: 20px; height: 20px; }
.like-btn.is-on svg { fill: currentColor; }
.like-btn:disabled { opacity: .6; }
.like-btn .like-n:empty { display: none; }
.icon-btn-lg.like-btn { width: auto; min-width: 50px; padding: 0 14px; }
.like-sm { background: none; padding: 0; color: var(--muted); font-size: 12px; min-height: 32px; }
.like-sm svg { width: 15px; height: 15px; }
.like-sm.is-on { color: var(--accent); }
button.notify-btn { background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); }
.notify-btn.is-on { border-color: var(--accent); color: var(--accent); }

.read-progress { height: 3px; background: var(--soft); position: sticky; top: 72px; z-index: 15; }
.read-progress span { display: block; height: 3px; width: 0; background: var(--accent); }
.reader-after { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.author-note { margin-top: 30px; padding: 18px; border-radius: 20px; background: var(--soft); }
.author-note-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.author-note-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.author-note-text { font-size: 14px; line-height: 1.6; margin-top: 10px; }
.author-note-text p { margin: 0 0 .6em; }
.author-link { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); color: var(--text); }
.author-link:hover { text-decoration: none; }
.author-link svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.author-link b { display: block; font-size: 14px; }
.author-link small { display: block; font-size: 12px; color: var(--muted); }
.c-avatar { border-radius: 50%; flex-shrink: 0; }
.reader-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.reader-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 0; border-radius: 14px; background: var(--soft); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.reader-act:hover { text-decoration: none; }
.reader-act svg { width: 18px; height: 18px; }
.reader-act.is-primary { background: var(--accent); color: var(--accent-ink); }
.reader-act.is-primary.is-on svg { fill: currentColor; }
.reader-after .chapter-nav { padding: 0; margin-top: 12px; }

.comment-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.comment-form .comment-form-comment { flex: 1 1 240px; margin: 0; }
.comment-form textarea { resize: vertical; min-height: 48px; }
.comment-form .form-submit { margin: 0; }
.comment-list .c-row { display: flex; gap: 12px; }
.c-body { flex: 1; min-width: 0; }
.c-meta { font-size: 13px; color: var(--muted); }
.c-meta b { color: var(--text); }
.c-text { font-size: 14px; line-height: 1.55; margin-top: 4px; }
.c-text p { margin: 0 0 .5em; }
.c-text blockquote { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-family: var(--read); font-style: italic; color: var(--muted); }
.c-actions { display: flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 700; }
.c-actions a { color: var(--muted); }

.quote-pop { position: absolute; z-index: 40; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--text); box-shadow: var(--shadow); }
.quote-pop[hidden] { display: none; }
.quote-pop button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--bg); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; }

/* quote by tapping a paragraph */
.prose p, .prose blockquote { cursor: pointer; border-radius: 6px; transition: background .15s; }
.prose .is-quoting { background: var(--chip); color: var(--chip-ink); }

/* ---------- paragraph comments ---------- */
.prose [data-para] { position: relative; }
.para-bubble { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 2px 7px; min-height: 24px; border: 0; border-radius: 12px; background: var(--chip); color: var(--chip-ink); font: 700 11px/1 var(--font); vertical-align: middle; cursor: pointer; }
.para-bubble svg { width: 12px; height: 12px; }
.para-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 70vh; overflow-y: auto; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.para-panel[hidden] { display: none; }
.para-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.para-panel-head .icon-btn { font-size: 22px; line-height: 1; }
.para-c { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.para-c .c-text { white-space: pre-line; }
.para-c-link { font-size: 12px; font-weight: 700; }
.para-panel-add { width: 100%; margin-top: 12px; }
@media (min-width: 900px) { .para-panel { left: auto; right: 24px; bottom: 24px; width: 380px; border-radius: 22px; } }

/* fix: avatars were stretched into ovals (flex + img height:auto) */
.c-avatar { width: 36px !important; height: 36px !important; flex: 0 0 36px; align-self: flex-start; object-fit: cover; border-radius: 50%; }
.para-c .c-avatar { width: 32px !important; height: 32px !important; flex-basis: 32px; }
/* make the paragraph comment bubble easy to see */
.para-bubble { margin-left: 8px; padding: 3px 9px; min-height: 26px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 6px rgba(36,112,174,.25); }
.para-bubble svg { width: 13px; height: 13px; }

/* ---------- library ---------- */
.library { padding-top: 18px; padding-bottom: 32px; }
.library-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.library-guest { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.library-guest p { margin: 0; flex: 1 1 260px; }
.lib-tabs { margin-top: 14px; }
.lib-tabs .chip { padding: 10px 16px; }
.lib-tabs .chip.is-on { background: var(--accent); color: var(--accent-ink); }
.lib-list, .lib-lists { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 28px; }
.lib-list a { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.lib-list a:hover { text-decoration: none; }
.lib-list .cover { width: 52px; border-radius: 10px; flex-shrink: 0; }
.lib-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lib-t { font-size: 15px; font-weight: 800; line-height: 1.3; }
.badge-new { background: var(--chip); color: var(--chip-ink); font-size: 10px; padding: 2px 7px; margin-left: 4px; vertical-align: middle; }
.lib-bar { height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.lib-bar span { display: block; height: 5px; background: var(--accent); }
.lib-empty { padding: 18px 0; }
.lib-list-row { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 16px; }
.lib-stack { display: flex; flex-shrink: 0; }
.lib-stack .cover { width: 38px; border-radius: 8px; }
.lib-stack .cover + .cover { margin-left: -14px; border: 2px solid var(--bg); }
.vis-badge { padding: 6px 10px; border: 0; border-radius: 8px; background: var(--soft); color: var(--muted); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.vis-badge.is-public { background: var(--chip); color: var(--chip-ink); }
.lib-del { width: 36px; height: 36px; font-size: 20px; }
.new-list { display: grid; gap: 12px; margin-top: 14px; background: var(--soft); border: 0; }
.new-list label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.new-list input[type="text"] { height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.vis-pick { display: flex; gap: 8px; border: 0; padding: 0; margin: 0; }
.vis-pick legend { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.vis-pick label { display: flex; align-items: center; gap: 8px; flex: 1; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 600; cursor: pointer; }
.save-btn.is-on { background: var(--chip); color: var(--chip-ink); }
.save-btn.is-on svg { fill: currentColor; }
@media (min-width: 900px) {
	.lib-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lib-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
	.new-list { max-width: 520px; }
}

/* library: recommendations, 8 novels in two rows of four */
.rec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; }
.rec-grid .card-title { font-size: 12px; }
@media (min-width: 900px) { .rec-grid { gap: 24px 20px; } .rec-grid .card-title { font-size: 14px; } }

/* ---------- profile ---------- */
.profile { padding-top: 22px; padding-bottom: 32px; max-width: 900px; }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-avatar { width: 96px !important; height: 96px !important; border-radius: 50%; object-fit: cover; border: 4px solid var(--chip); }
.profile-name { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.profile-name h1 { font-size: 22px; font-weight: 800; }
.badge-author { background: var(--chip); color: var(--chip-ink); font-size: 11px; font-weight: 800; padding: 3px 8px; }
.profile-handle { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.profile-bio { margin: 10px 0 0; max-width: 420px; font-size: 14px; line-height: 1.55; }
.profile-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 14px; border-radius: 20px; background: var(--soft); font-size: 13px; font-weight: 800; }
.profile-link svg { width: 15px; height: 15px; }
.profile-stats { width: 100%; max-width: 480px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-actions { display: flex; gap: 10px; width: 100%; max-width: 480px; margin-top: 12px; }
.profile-actions .btn { flex: 1; }
.profile-tabs { display: flex; gap: 22px; margin-top: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.profile-tabs a { padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.profile-tabs a:hover { text-decoration: none; color: var(--text); }
.profile-tabs a.is-on { color: var(--text); font-weight: 800; border-bottom-color: var(--accent); }
.profile-list { margin-top: 20px; list-style: none; }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0 24px; }
.people a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.people a:hover { text-decoration: none; }
.people span { display: flex; flex-direction: column; }
.people small { color: var(--muted); }
.people .c-avatar { width: 44px !important; height: 44px !important; flex-basis: 44px; }
.avatar-btn { overflow: hidden; padding: 0; }
.avatar-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.header-auth { min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 899px) { .header-join { display: none; } }
@media (min-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* library recommendations: smaller covers on wide screens (still 2 rows of 4) */
@media (min-width: 900px) { .rec-grid { grid-template-columns: repeat(4, minmax(0, 170px)); justify-content: start; gap: 22px 28px; } }

/* chapter: drop PublishPress Authors box from the text; our writer card replaces it */
.prose .pp-multiple-authors-boxes-wrapper, .prose .pp-author-boxes-wrapper, .prose [class*="ppma-"], .prose .multiple-authors-target-the-content { display: none !important; }
.author-note-head { color: var(--text); }
.author-note-head:hover { text-decoration: none; }
.author-note-head:hover b { color: var(--accent); }
.author-note-head .c-avatar { width: 40px !important; height: 40px !important; flex-basis: 40px; }

/* library recommendations: one row of 8 (swipe on phones), "See more" underneath */
.rec-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
.rec-grid::-webkit-scrollbar { display: none; }
.rec-grid .card { flex: 0 0 104px; scroll-snap-align: start; }
@media (min-width: 900px) { .rec-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 18px; overflow: visible; margin: 0; padding: 0; } .rec-grid .card { flex: none; } .rec-grid .card-title { font-size: 13px; } }
.lib-recs .see-all-btn { margin-top: 14px; }

/* ---------- settings ---------- */
.settings { max-width: 640px; padding-top: 16px; padding-bottom: 40px; }
.settings-top { display: flex; align-items: center; gap: 10px; }
.settings-top h1 { font-size: 22px; font-weight: 800; }
.settings-group { margin-top: 26px; }
.settings-group h2 { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.settings-box { padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.settings-avatar { width: 76px !important; height: 76px !important; }
.photo-actions { display: grid; gap: 6px; }
.photo-pick { cursor: pointer; min-height: 40px; font-size: 13px; color: var(--accent); }
.photo-remove { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.field { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 14px; font-weight: 500; }
.field input:disabled { opacity: .7; }
.field .card-meta { font-weight: 500; }
.appearance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.appearance-opt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.appearance-opt svg { width: 18px; height: 18px; }
.appearance-opt.is-on { border: 2px solid var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); }
a.toggle-row:hover { text-decoration: none; color: var(--accent); }
.toggle-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.settings-actions { display: grid; gap: 10px; margin-top: 28px; }
.notice-ok, .notice-err { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.notice-ok { background: var(--chip); color: var(--chip-ink); }
.notice-err { background: #fde8e8; color: #9b1c1c; }

/* ---------- notifications ---------- */
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notes { max-width: 640px; padding-top: 16px; padding-bottom: 40px; }
.notes-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notes-top h1 { font-size: 22px; font-weight: 800; }
.notes-group { margin-top: 22px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.notes-list { list-style: none; margin: 8px 0 0; padding: 0; }
.notes-list a { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 0 -12px; border-radius: 14px; color: var(--text); }
.notes-list a:hover { text-decoration: none; background: var(--soft); }
.notes-list .is-unread a { background: var(--soft); }
.note-icon { width: 40px; height: 40px; border-radius: 20px; background: var(--chip); color: var(--chip-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.note-icon svg { width: 18px; height: 18px; }
.note-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
.note-body small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.note-new { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); flex-shrink: 0; }

.handle-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding-left: 14px; font-weight: 700; color: var(--muted); }
.handle-input input { border: 0 !important; background: transparent !important; padding-left: 4px !important; }
.handle-input:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- wallet ---------- */
.wallet { max-width: 720px; padding-top: 18px; padding-bottom: 40px; }
.wallet-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.wallet-card { padding: 18px; border: 1px solid var(--line); border-radius: 22px; }
.wallet-card.is-main { background: var(--hero); border-color: transparent; }
.wallet-card span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.wallet-card b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.wallet-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-note { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13px; line-height: 1.5; color: var(--muted); }
.wallet-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.packs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pack { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; }
.pack.is-best { border: 2px solid var(--accent); }
.pack-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--tag-bg); color: var(--tag-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pack-icon svg { width: 20px; height: 20px; }
.pack-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pack-body b { font-size: 15px; }
.pack-best { background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; }
.pack-buy { min-height: 42px; padding: 0 16px; font-size: 14px; }
.pack-buy .woocommerce-Price-amount { color: inherit; }
.wallet-history { list-style: none; margin: 8px 0 0; padding: 0; }
.wallet-history li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.wallet-history b { display: block; font-size: 14px; }
.wallet-history small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-history .amt { font-size: 14px; font-weight: 800; white-space: nowrap; color: var(--muted); }
.wallet-history .amt.is-plus { color: var(--accent); }

/* notifications: recommendations at the bottom, full page width */
.notes-recs { padding-bottom: 32px; }
.notes { min-height: 40vh; }

/* ---------- writing ---------- */
.write { max-width: 760px; padding-top: 16px; padding-bottom: 40px; }
.write-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.write-row .cover { width: 48px; border-radius: 10px; flex-shrink: 0; }
.write-novels { grid-template-columns: minmax(0, 1fr) !important; }
.cover-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.cover-preview { width: 110px; border: 2px dashed var(--line); background-size: cover; background-position: center; }
.field select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 14px; }
.field-set { margin-top: 16px; }
.chapter-head { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.editor { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.editor-bar { display: flex; align-items: center; gap: 2px; padding: 6px; background: var(--soft); border-bottom: 1px solid var(--line); }
.editor-bar button { min-width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.editor-bar button:hover { background: var(--bg); }
.editor-count { margin-left: auto; padding-right: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.editor textarea { display: block; width: 100%; min-height: 380px; padding: 16px; border: 0; background: var(--bg); color: var(--prose); font-family: var(--read); font-size: 16px; line-height: 1.75; resize: vertical; outline: none; }
.price-box { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--soft); }
.price-box[hidden] { display: none; }
.price-step { display: flex; gap: 10px; align-items: center; }
.price-step input { text-align: center; font-size: 17px !important; font-weight: 800 !important; }
.vis-pick label svg { width: 14px; height: 14px; }

/* ---------- Continue with Google / Discord ---------- */
.oauth-buttons { display: grid; gap: 10px; margin: 6px 0 16px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 14px; font-size: 15px; font-weight: 700; text-decoration: none; }
.oauth-btn:hover { text-decoration: none; filter: brightness(1.04); }
.oauth-google { border: 1px solid var(--line); background: var(--card); color: var(--text); }
.oauth-discord { background: #4752c4; color: #fff; }
.oauth-or { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.oauth-or::before, .oauth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-msg { padding: 12px 14px; border-radius: 12px; background: #fde8e8; color: #9b1c1c; font-size: 14px; font-weight: 700; }
.oauth-linked { display: block; font-weight: 500; }
a.vis-badge { text-decoration: none; }

.cover-pick .cover { width: 110px; }

/* desktop polish: writing board badge, wallet packs in two columns */
.write-row .vis-badge, .write-row .btn { flex-shrink: 0; white-space: nowrap; }
@media (min-width: 900px) {
	.wallet { max-width: 960px; }
	.packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wallet-cards { max-width: 640px; }
}

.earnings .write-row .amt { font-weight: 800; color: var(--accent); white-space: nowrap; }
.notes-top { flex-wrap: wrap; }

/* ---------- sign in / join (Theme My Login pages), canvas "Sign in" ---------- */
.auth { max-width: 460px; margin: 0 auto; padding: 0 0 40px; }
.auth-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 24px 30px; background: var(--hero); border-radius: 0 0 36px 36px; }
.auth-mark { width: 60px; height: 60px; border-radius: 18px; }
.auth-mark svg { width: 60px; height: 60px; }
.auth-word { margin-top: 12px; }
.auth-word b { font-size: 24px; }
.auth-hero h1 { font-size: 22px; font-weight: 800; margin-top: 22px; }
.auth-hero p { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 320px; }
.auth-card { padding: 24px 20px 0; }
.auth-card .tml form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .oauth-buttons { order: -1; margin: 0 0 4px; }
.auth-card .oauth-msg { order: -2; margin: 0; }
.auth-card .tml-alerts:empty { display: none; }
.auth-card .tml-errors, .auth-card .tml-messages { list-style: none; margin: 0 0 8px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.auth-card .tml-errors { background: #fde8e8; color: #9b1c1c; }
.auth-card .tml-messages { background: var(--chip); color: var(--chip-ink); }
.auth-card .tml-field-wrap { display: grid; gap: 6px; margin: 0; }
.auth-card .tml-label { font-size: 13px; font-weight: 700; color: var(--text); }
.auth-card .tml-field { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--text); font-size: 15px; outline: none; }
.auth-card .tml-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--chip); }
.auth-card .tml-rememberme-wrap { display: flex; align-items: center; gap: 8px; }
.auth-card .tml-rememberme-wrap .tml-label { font-weight: 600; color: var(--muted); }
.auth-card .tml-checkbox { width: 18px; height: 18px; accent-color: var(--accent); }
.auth-card .tml-button { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.auth-card .tml-button:hover { filter: brightness(1.05); }
.auth-card .tml-description, .auth-card .tml-indicator_hint-wrap, .auth-card .description { font-size: 12px; color: var(--muted); }
.auth-card .tml-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 18px 0 0; padding: 0; font-size: 14px; }
.auth-card .tml-links a { font-weight: 700; }
.auth-card .oauth-btn { min-height: 52px; gap: 10px; }
.auth-card .oauth-google::before { content: "G"; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 12px; background: var(--soft); font-weight: 800; font-size: 14px; }
.auth-card .oauth-discord::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20.5l1.4-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9 11h.01M15 11h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20.5l1.4-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9 11h.01M15 11h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (min-width: 900px) { .auth { padding-top: 32px; } .auth-hero { border-radius: 32px; } }

/* Vault: balance chip in the header, five-tab bottom nav when signed in */
.balance-chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 22px; background: var(--tag-bg); color: var(--tag-ink); font-size: 14px; font-weight: 800; }
.balance-chip:hover { text-decoration: none; filter: brightness(1.03); }
.balance-chip svg { width: 17px; height: 17px; }
@media (max-width: 899px) { .balance-chip { height: 40px; padding: 0 11px; font-size: 13px; } }
.tabbar:has(a:nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vault-sub { margin: 4px 0 0; }

/* guests: Sign in + Sign up in the header on phones too */
@media (max-width: 899px) { .header-join { display: inline-flex; } .header-auth { padding: 0 12px; font-size: 13px; min-height: 38px; } }
