/* Theme and type */
:root {
  color-scheme:light;
  --bg:#fcfcfc;
  --surface:#fff;
  --soft:#f2f3f6;
  --ink:#191a21;
  --muted:#626570;
  --line:#dedfe5;
  --primary:#1b1c24;
  --on-primary:#fff;
  --blue:#285cc6;
  --success:#12644d;
  --success-bg:#e9f5ef;
  --danger:#a72c30;
  --danger-bg:#fff0ef;
  --radius:12px;
  --reader-bg:#f4f3ef;
  --reader-ink:#292929;
  --reader-size:18px;
  --reader-line-height:1.85;
  --reader-width:700px;
  --reader-font:"Songti SC",SimSun,serif;
}
:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#111217;
  --surface:#1a1b23;
  --soft:#242630;
  --ink:#f3f3f6;
  --muted:#b1b3bf;
  --line:#373944;
  --primary:#f3f3f6;
  --on-primary:#171820;
  --blue:#91b5ff;
  --success:#83d5b4;
  --success-bg:#19392e;
  --danger:#ffaca9;
  --danger-bg:#43252a;
  --reader-bg:#1c1d23;
  --reader-ink:#e5e3df;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]) {
    color-scheme:dark;
    --bg:#111217;
    --surface:#1a1b23;
    --soft:#242630;
    --ink:#f3f3f6;
    --muted:#b1b3bf;
    --line:#373944;
    --primary:#f3f3f6;
    --on-primary:#171820;
    --blue:#91b5ff;
    --success:#83d5b4;
    --success-bg:#19392e;
    --danger:#ffaca9;
    --danger-bg:#43252a;
    --reader-bg:#1c1d23;
    --reader-ink:#e5e3df;
  }
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:88px; }
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:15px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:#377df720;
}
body.modal-open { overflow:hidden; }
a { color:inherit; text-decoration:none; }
button,input,select { font:inherit; }
button,a,input,select,summary { touch-action:manipulation; }
button,summary { cursor:pointer; }
button { color:inherit; }
button:disabled,.disabled { opacity:.55; cursor:default; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:4px;
}
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { line-height:1.4; overflow-wrap:anywhere; text-wrap:balance; }
h1 { font-size:32px; letter-spacing:-.025em; }
h2 { font-size:24px; letter-spacing:-.02em; }
h3 { font-size:16px; }
img { max-width:100%; height:auto; display:block; }
svg { width:22px; height:22px; flex-shrink:0; }
[hidden] { display:none!important; }
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
}
.muted { color:var(--muted); }
.skip { position:fixed; top:-100px; left:16px; z-index:300; background:var(--primary); color:var(--on-primary); padding:12px; border-radius:8px; }
.skip:focus { top:8px; }
.main { min-height:calc(100svh - 290px); }
.main:focus { outline:0; }
.wide-shell,.detail-shell { max-width:1360px; margin-inline:auto; padding-inline:32px; }
.detail-shell { position:relative; isolation:isolate; max-width:1240px; padding-block:20px 48px; }
.no-script-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; padding:12px 16px; border-bottom:1px solid var(--line); }
.no-script-nav a { min-height:44px; display:flex; align-items:center; }

/* Global navigation */
.header { height:72px; position:sticky; top:0; z-index:50; background:color-mix(in srgb,var(--bg) 94%,transparent); backdrop-filter:blur(16px); border-bottom:1px solid var(--line); }
.header-inner { height:100%; display:flex; align-items:center; gap:32px; padding:0 32px; max-width:1360px; margin:auto; }
.brand { display:inline-flex; align-items:center; gap:10px; font-weight:650; white-space:nowrap; }
.logo { display:block; width:30px; height:30px; flex-shrink:0; object-fit:contain; border-radius:22%; }
.desktop-nav { display:flex; gap:24px; color:var(--muted); }
.desktop-nav a { display:flex; align-items:center; min-height:44px; border-bottom:2px solid transparent; }
.desktop-nav a:hover,.desktop-nav a[aria-current=page] { color:var(--ink); border-bottom-color:var(--blue); }
.header-actions { margin-left:auto; display:flex; gap:8px; align-items:center; }
.header-search { display:flex; gap:10px; align-items:center; width:280px; height:44px; border:1px solid var(--line); border-radius:100px; padding:0 14px; color:var(--muted); background:var(--surface); }
.header-search:focus-within { border-color:var(--blue); }
.header-search svg { width:18px; }
.header-search input { background:none; border:0; padding:0; color:var(--ink); width:100%; min-width:0; min-height:42px; font-size:14px; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; border:0; background:transparent; width:44px; height:44px; flex-shrink:0; border-radius:8px; font-size:24px; }
.icon-button:hover { background:var(--soft); }
.mobile-menu,.mobile-search { display:none; }
.theme-menu,.user-menu { position:relative; }
.theme-menu summary,.user-menu summary { list-style:none; }
.theme-menu summary::-webkit-details-marker,.user-menu summary::-webkit-details-marker { display:none; }
.theme-options,.user-menu-items { position:absolute; right:0; top:52px; z-index:60; min-width:154px; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 28px #0002; }
.theme-options button,.user-menu-items a { display:flex; align-items:center; text-align:left; background:none; border:0; border-radius:6px; min-height:44px; width:100%; padding:8px 12px; white-space:nowrap; }
.theme-options button:hover,.theme-options button[aria-pressed=true],.user-menu-items a:hover { background:var(--soft); }
.user-menu summary svg { width:16px; height:16px; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:10px 20px; border:1px solid transparent; border-radius:8px; background:var(--primary); color:var(--on-primary); font-weight:600; line-height:1.5; transition:background-color .18s,border-color .18s; }
.button:hover { background:color-mix(in srgb,var(--primary) 85%,var(--bg)); }
.button.secondary { background:var(--surface); border-color:var(--line); color:var(--ink); }
.button.secondary:hover { background:var(--soft); border-color:var(--muted); }
.button.compact { padding:8px 14px; }
.button.full { width:100%; }
.text-link { color:var(--blue); text-underline-offset:4px; }
.text-link:hover { text-decoration:underline; }

/* Featured stories */
.featured { position:relative; margin-block:24px 32px; padding:40px 48px; border:1px solid color-mix(in srgb,var(--line) 70%,transparent); border-radius:20px; background:linear-gradient(135deg,color-mix(in srgb,var(--soft) 92%,var(--surface)),var(--soft)); overflow:hidden; }
.featured-slides { min-height:450px; }
.hero-slide { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:64px; align-items:center; min-height:450px; }
.hero-copy { position:relative; max-width:640px; min-width:0; }
.hero-heading { margin-bottom:28px; }
.hero-author { color:var(--muted); font-size:16px; margin:0; }
.hero-copy h2 { font-size:48px; line-height:1.25; margin:0 0 18px; letter-spacing:-.025em; }
.hero-description { color:var(--muted); font-size:18px; line-height:1.85; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:20px; }
.hero-tags { display:flex; gap:10px; flex-wrap:wrap; }
.hero-tags a { display:inline-flex; align-items:center; justify-content:center; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:8px; padding:8px 14px; min-height:44px; font-size:14px; transition:background-color .18s,border-color .18s; }
.hero-tags a:hover { background:color-mix(in srgb,var(--surface) 85%,var(--soft)); border-color:var(--muted); }
.hero-status { display:flex; align-items:center; gap:18px; color:var(--muted); font-size:14px; margin-block:22px 28px; flex-wrap:wrap; }
.hero-status>span { color:var(--blue); }
.hero-status time { padding-left:18px; border-left:1px solid var(--muted); white-space:nowrap; }
.hero-cta { min-height:52px; gap:24px; padding:12px 26px; border-radius:10px; font-size:16px; }
.hero-cta svg { width:22px; height:22px; }
.hero-book { position:relative; width:300px; justify-self:center; transform:perspective(1000px) rotateY(-8deg) rotateZ(-1.5deg); isolation:isolate; box-shadow:14px 20px 28px #0003; border-radius:6px; transition:transform .25s; }
.hero-book img { aspect-ratio:2/3; object-fit:cover; width:100%; height:auto; border-radius:6px 3px 3px 6px; border-left:5px solid #ffffff16; }
.hero-book:after { content:""; position:absolute; width:12px; right:-10px; top:5px; bottom:5px; z-index:-1; border-radius:0 4px 4px 0; background:repeating-linear-gradient(0deg,#ddd6c9 0 1px,#faf8f1 1px 3px); box-shadow:inset 4px 0 5px #0002; }
.home-empty { padding:64px 32px; margin-block:24px 32px; border-radius:16px; background:var(--soft); }
.home-empty h2 { font-size:clamp(28px,4vw,44px); }
.home-empty p { color:var(--muted); }
.eyebrow { display:block; font-size:13px; letter-spacing:.08em; color:var(--muted); margin-bottom:12px; }

/* Categories and book cards */
.category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.category-card { --category-accent:#3667bd; position:relative; isolation:isolate; overflow:hidden; min-height:150px; border-radius:12px; border:1px solid var(--line); border-top:3px solid var(--category-accent); background:var(--surface); padding:20px; color:var(--ink); transition:transform .18s,border-color .18s; }
.category-card[data-category=fantasy] { --category-accent:#8560cf; }
.category-card[data-category=healing] { --category-accent:#c56a9a; }
.category-card[data-category=science-fiction] { --category-accent:#bd7937; }
.category-card[data-category=city-life] { --category-accent:#378971; }
.category-card[data-category=youth] { --category-accent:#378fa5; }
.category-card:hover { transform:translateY(-2px); border-color:var(--category-accent); }
.category-watermark { position:absolute; z-index:-1; right:4px; top:-8px; font-size:106px; font-weight:800; color:var(--category-accent); opacity:.07; line-height:1.4; }
.category-card h3 { font-size:20px; margin:0 0 6px; }
.category-card p { color:var(--muted); font-size:13px; line-height:1.7; margin:0 0 14px; max-width:28em; }
.category-count { font-size:13px; color:var(--muted); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.home-section { margin-block:40px 48px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.section-heading h2 { margin:0; }
.section-heading>a:not(:has(h2)) { font-size:14px; color:var(--blue); min-height:44px; display:flex; align-items:center; flex-shrink:0; }
.book-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:28px 20px; }
.book-card { min-width:0; }
.cover-wrap { position:relative; aspect-ratio:2/3; border-radius:8px; overflow:hidden; border:1px solid var(--line); background:var(--soft); }
.cover-wrap img { width:100%; height:100%; object-fit:cover; transition:transform .25s; }
.book-link:hover img { transform:scale(1.03); }
.cover-state { position:absolute; top:8px; left:8px; font-size:12px; padding:3px 7px; border-radius:4px; background:#214f9c; color:#fff; }
.cover-state.completed { background:#28674e; }
.book-card h3 { font-size:16px; font-weight:600; line-height:1.4; margin:8px 0 2px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card-author { display:block; color:var(--muted); font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.card-author:hover { color:var(--blue); }
.card-meta { display:flex; gap:4px 8px; justify-content:space-between; flex-wrap:wrap; margin:4px 0 0; font-size:12px; line-height:1.5; color:var(--muted); font-variant-numeric:tabular-nums; }
.card-tags { display:flex; align-items:flex-start; flex-wrap:wrap; gap:4px 8px; color:var(--muted); font-size:12px; line-height:1.5; }
.card-tags>a,.tag-more summary { min-height:36px; display:inline-flex; align-items:center; color:var(--blue); }
.book-card .card-tags>a,.book-card .tag-more summary { min-height:32px; }
.tag-more { position:relative; }
.tag-more summary { padding-inline:5px; list-style:none; }
.tag-more summary::-webkit-details-marker { display:none; }
.tag-more>div { position:absolute; top:100%; right:0; z-index:20; min-width:144px; max-width:240px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 8px 24px #0002; }
.tag-more>div a { display:flex; align-items:center; min-height:44px; padding:6px 10px; overflow-wrap:anywhere; }
.tag-more>div a:hover { background:var(--soft); }

/* Rankings and discovery lists */
.home-rankings { margin-bottom:56px; }
.rankings-heading { text-align:center; margin-bottom:28px; }
.rankings-heading h2 { font-size:30px; margin-bottom:8px; }
.rankings-heading p { display:flex; align-items:center; justify-content:center; gap:16px; color:var(--muted); font-size:14px; letter-spacing:.12em; margin:0; }
.rankings-heading p::before,.rankings-heading p::after { content:""; width:28px; height:1px; background:var(--line); }
.rank-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.ranking { min-width:0; display:flex; flex-direction:column; padding:16px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--surface) 65%,var(--bg)); }
.rank-heading { display:flex; align-items:center; gap:14px; min-height:72px; margin-bottom:16px; padding:4px 8px; border-radius:6px; }
.rank-icon { display:flex; color:var(--blue); }
.rank-icon svg { width:28px; height:28px; }
.rank-icon-popular { color:var(--danger); }
.rank-icon-newest { color:var(--success); }
.rank-heading-copy { flex:1; min-width:0; }
.rank-heading h3 { font-size:22px; margin:0 0 3px; }
.rank-caption { font-size:13px; color:var(--muted); margin:0; }
.rank-heading-arrow,.rank-book-arrow { color:var(--muted); font-size:24px; font-weight:300; }
.ranking ol { list-style:none; padding:0; margin:0; flex:1; }
.ranking li+li { border-bottom:1px solid color-mix(in srgb,var(--line) 65%,transparent); }
.rank-book { display:flex; align-items:center; gap:12px; min-height:76px; padding:10px 8px; border-radius:6px; transition:background-color .18s ease; }
.rank-book:hover,.rank-heading:hover { background:var(--soft); }
.rank-number { font-variant-numeric:tabular-nums; color:var(--muted); font-size:22px; font-style:italic; width:20px; flex-shrink:0; }
.ranking li:nth-child(-n+3) .rank-number { color:var(--blue); font-weight:650; }
.rank-book img { width:36px; height:54px; object-fit:cover; flex-shrink:0; border-radius:4px; border:1px solid var(--line); }
.rank-book-copy { min-width:0; flex:1; }
.rank-book h4 { font-size:15px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rank-first .rank-book { min-height:132px; padding:14px 10px; margin-bottom:4px; border:1px solid color-mix(in srgb,var(--blue) 28%,var(--line)); border-radius:8px; background:color-mix(in srgb,var(--blue) 9%,var(--surface)); }
.rank-first .rank-book:hover { background:color-mix(in srgb,var(--blue) 15%,var(--surface)); }
.rank-first h4 { font-size:17px; font-weight:650; }
.rank-first p { font-size:13px; line-height:1.7; color:var(--muted); margin:6px 0 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.rank-first img { width:64px; height:96px; }
.rank-empty { padding:32px 8px; }
.rank-more { display:flex; align-items:center; gap:10px; min-height:44px; margin-top:12px; padding:8px; color:var(--blue); font-size:14px; border-radius:6px; }
.rank-more:hover { background:var(--soft); }
.listing-page { padding-top:32px; padding-bottom:64px; }
.page-heading { margin-bottom:28px; }
.page-heading h1 { margin-bottom:8px; font-size:30px; }
.page-heading p { color:var(--muted); max-width:52em; margin-bottom:0; overflow-wrap:anywhere; }
.filters { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; padding:20px; border:1px solid var(--line); background:var(--surface); border-radius:12px; margin:0 0 16px; }
.filters label { margin:0; min-width:120px; }
.filters label>span { display:block; margin-bottom:6px; color:var(--muted); font-size:13px; }
.filters input,.filters select { min-height:44px; width:100%; }
.filter-search { flex:1; min-width:220px!important; }
.filters .button { min-height:46px; }
.filter-reset { display:inline-flex; min-height:44px; align-items:center; color:var(--blue); padding:8px; }
.filter-year { min-width:110px; }
.active-filters { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; align-items:center; }
.active-filters a { display:inline-flex; gap:10px; align-items:center; min-height:40px; padding:6px 12px; border:1px solid var(--line); border-radius:24px; color:var(--ink); background:var(--soft); font-size:13px; }
.active-filters a:hover { border-color:var(--blue); }
.results-summary { color:var(--muted); font-size:14px; margin-block:16px 24px; }
.result-list,.ranking-list { display:grid; gap:16px; padding:0; list-style:none; }
.result-card,.ranking-card { display:flex; align-items:flex-start; gap:24px; padding:24px; border:1px solid var(--line); background:var(--surface); border-radius:12px; min-width:0; }
.result-cover { width:104px; flex-shrink:0; }
.result-cover img { width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:6px; }
.result-copy { min-width:0; flex:1; }
.result-copy h2 { font-size:20px; margin:0 0 8px; }
.result-author { color:var(--muted); font-size:14px; margin-bottom:0; }
.result-open { display:flex; align-items:center; align-self:center; gap:10px; min-height:44px; font-size:14px; color:var(--blue); white-space:nowrap; }
.result-rank { width:36px; flex-shrink:0; font-size:24px; color:var(--blue); font-weight:650; font-variant-numeric:tabular-nums; }
.result-info { min-width:0; flex:1; }
.result-info h2 { font-size:20px; margin:0 0 8px; }
.result-info p { color:var(--muted); font-size:14px; }
.result-summary { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.8; margin:12px 0; }
.result-meta { display:flex; flex-wrap:wrap; gap:8px 16px; color:var(--muted); font-size:13px; }
.rank-position { font-size:24px; font-weight:650; font-variant-numeric:tabular-nums; color:var(--blue); width:40px; flex-shrink:0; }
.taxonomy-group { margin-block:36px 48px; }
.taxonomy-group .book-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.taxonomy-group .section-heading p { color:var(--muted); font-size:14px; margin:8px 0 0; }
.tag-cloud { display:flex; flex-wrap:wrap; gap:12px; }
.tag-cloud a { display:flex; align-items:center; gap:14px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:10px 18px; min-height:46px; }
.tag-cloud a:hover { border-color:var(--blue); background:var(--soft); }
.tag-cloud span { color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
.taxonomy-note { margin-top:28px; max-width:52em; color:var(--muted); }
.empty { text-align:center; background:var(--soft); border:1px solid var(--line); padding:44px 24px; border-radius:12px; color:var(--muted); }
.empty h2,.empty h3 { color:var(--ink); }
.empty p { max-width:38em; margin-inline:auto; }
.empty .button { margin-top:12px; }
.pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:20px; margin-top:32px; font-variant-numeric:tabular-nums; }

/* Novel overview and chapter directory */
body[data-page=novel] .main { overflow:clip; }
.detail-atmosphere { position:absolute; z-index:-1; inset:0; left:50%; width:100vw; transform:translateX(-50%); pointer-events:none; opacity:.12; mask-image:linear-gradient(#000 0%,#0009 45%,transparent 90%); }
.detail-atmosphere img { width:100%; height:100%; object-fit:cover; object-position:center 42%; filter:blur(6px); }
:root[data-theme=dark] .detail-atmosphere { opacity:.3; }
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]) .detail-atmosphere { opacity:.3; }
}
.breadcrumb { display:flex; gap:10px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:13px; margin:0 0 16px; min-height:44px; }
.detail-shell .breadcrumb { margin-bottom:20px; }
.detail-shell .breadcrumb>[aria-current] { overflow-wrap:anywhere; }
.breadcrumb a { min-height:32px; display:inline-flex; align-items:center; }
.breadcrumb a:hover { color:var(--blue); }
.novel-overview { padding:0 24px 4px; display:grid; grid-template-columns:300px minmax(0,1fr); grid-template-rows:auto auto 1fr auto; gap:24px 52px; align-items:start; }
.detail-cover { min-width:0; grid-column:1; grid-row:1 / span 4; }
.detail-cover img { display:block; width:100%; height:auto; aspect-ratio:2/3; object-fit:cover; border:1px solid color-mix(in srgb,var(--ink) 16%,transparent); border-radius:12px; box-shadow:0 16px 40px #0003; }
.novel-info { min-width:0; grid-column:2; }
.detail-heading { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.detail-heading h1 { margin:0; font-family:"Songti SC","Noto Serif CJK SC",SimSun,serif; font-size:44px; line-height:1.3; min-width:0; overflow-wrap:anywhere; letter-spacing:.04em; }
.detail-author { display:inline-flex; align-items:center; min-height:44px; margin-top:8px; font-size:16px; }
.detail-author:hover { color:var(--blue); }
.badge { display:inline-flex; align-items:center; background:color-mix(in srgb,var(--blue) 10%,var(--surface)); color:var(--blue); padding:5px 10px; white-space:nowrap; border-radius:20px; font-size:12px; }
.novel-facts { display:flex; flex-wrap:wrap; gap:8px 16px; color:var(--muted); font-size:14px; margin:8px 0 0; }
.detail-tags { grid-column:2; grid-row:2; display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.detail-tags a { padding:8px 14px; background:color-mix(in srgb,var(--surface) 75%,transparent); border:1px solid var(--line); border-radius:8px; font-size:13px; min-height:44px; display:flex; align-items:center; }
.detail-tags a:hover { color:var(--blue); }
.small-heading { font-size:16px; margin:24px 0 10px; }
.synopsis { white-space:pre-line; color:var(--muted); line-height:1.9; overflow-wrap:anywhere; max-width:48em; margin-bottom:0; }
.detail-directory { display:inline-flex; align-items:center; min-height:44px; padding:8px; color:var(--blue); font-size:14px; }
.synopsis-expand { grid-column:2; grid-row:3; min-width:0; }
.synopsis-expand>summary { list-style:none; cursor:pointer; }
.synopsis-expand>summary::-webkit-details-marker { display:none; }
.synopsis-expand .small-heading { display:flex; align-items:center; gap:16px; margin:0 0 12px; font-size:18px; font-weight:600; }
.synopsis-expand .small-heading:after { content:""; height:1px; background:var(--line); flex:1; }
.synopsis-preview { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; color:var(--muted); white-space:pre-line; line-height:1.9; font-size:16px; }
.synopsis-toggle { color:var(--blue); font-size:14px; min-height:44px; display:flex; align-items:center; }
.synopsis-expand .when-open { display:none; }
.synopsis-expand[open] .when-open { display:inline; }
.synopsis-expand[open] .when-closed,.synopsis-expand[open] .synopsis-preview { display:none; }
.synopsis-details summary { min-height:44px; display:flex; align-items:center; color:var(--blue); font-size:14px; }
.detail-actions { grid-column:2; grid-row:4; display:flex; flex-wrap:wrap; gap:12px; }
.detail-actions .button { min-height:54px; padding-inline:24px; }
.detail-actions>.button:not(.secondary) { background:linear-gradient(120deg,#7569ef,#4858df); color:#fff; box-shadow:0 6px 20px #4f52d526; }
.detail-actions>.button:not(.secondary):hover { background:linear-gradient(120deg,#6557df,#3949cd); }
.detail-actions .secondary,.detail-directory { background:color-mix(in srgb,var(--surface) 70%,transparent); }
.detail-directory { min-height:54px; gap:10px; padding:10px 24px; border:1px solid var(--line); border-radius:8px; color:var(--ink); }
.detail-directory svg { width:20px; height:20px; }
.detail-directory:hover { border-color:var(--blue); color:var(--blue); }
.chapter-ad { display:block; margin-top:24px; border-radius:12px; }
.chapter-ad img { width:100%; border-radius:inherit; }
.chapter-section { margin-top:32px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--surface) 92%,transparent); padding:8px 32px 24px; scroll-margin-top:88px; }
.chapter-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; padding:20px 0; border-bottom:1px solid var(--line); }
.chapter-heading-label { display:flex; align-items:center; gap:16px; min-width:0; }
.chapter-heading-icon { display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:10px; background:var(--soft); color:var(--blue); flex-shrink:0; }
.chapter-heading-icon svg { width:24px; height:24px; }
.chapter-heading h2 { font-size:22px; margin:0; }
.chapter-heading h2 span { font-size:14px; color:var(--muted); margin-left:8px; }
.order-switch { display:flex; background:var(--soft); border-radius:8px; padding:3px; }
.order-switch a { display:flex; align-items:center; padding:8px 14px; min-height:44px; font-size:14px; border-radius:6px; }
.order-switch a[aria-current=true] { background:color-mix(in srgb,var(--blue) 10%,var(--surface)); color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue); }
.chapter-tools { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; padding:8px 0 0; color:var(--muted); font-size:14px; }
.chapter-tools:not(:has(.chapter-jump)):has(.chapter-resume[hidden]) { display:none; }
.chapter-jump { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.chapter-jump input { width:110px; }
.chapter-jump label { display:flex; align-items:center; gap:8px; }
.chapter-range { font-size:13px; margin:8px 0 0; }
.chapter-resume { color:var(--blue); display:inline-flex; align-items:center; min-height:44px; }
.chapter-tools:empty { display:none; }
.chapter-read-marker { display:inline-flex; color:var(--blue); font-size:12px; border:1px solid color-mix(in srgb,var(--blue) 55%,transparent); border-radius:4px; padding:1px 7px; margin-left:12px; white-space:nowrap; vertical-align:middle; }
.chapter-grid>a:target { background:var(--soft); outline:2px solid var(--blue); outline-offset:4px; }
.chapter-progress { display:inline-flex; min-height:44px; align-items:center; color:var(--blue); }
.chapter-grid { display:grid; grid-template-columns:1fr; padding:8px 0 0; gap:0; }
.chapter-grid>a { display:grid; grid-template-columns:minmax(36px,max-content) minmax(0,1fr) auto; align-items:center; gap:24px; min-height:64px; padding:14px 20px; border-bottom:1px solid var(--line); font-size:16px; scroll-margin-top:100px; border-radius:5px; }
.chapter-grid>a:hover { color:var(--blue); }
.chapter-grid>a[aria-current],.chapter-grid>a.is-current { color:var(--blue); background:color-mix(in srgb,var(--blue) 10%,var(--surface)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--blue) 38%,transparent); border-bottom-color:transparent; }
.chapter-number { color:var(--muted); font-size:15px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.chapter-grid>a.is-current .chapter-number { color:var(--blue); }
.chapter-title { flex:1; min-width:0; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chapter-grid time { margin-left:auto; color:var(--muted); font-size:13px; white-space:nowrap; }
.chapter-marker { color:var(--blue); font-size:12px; }
.chapter-grid .empty { grid-column:1/-1; }

/* Immersive reader */
body[data-page=reader] .header { display:none; }
body[data-page=reader] .footer { padding-block:24px; }
body[data-page=reader] .footer>p,body[data-page=reader] .footer>.muted { display:none; }
body[data-page=reader] .back-top { display:none; }
.reader-layout { --reader-accent:#8b75f5; }
.reader-shell { max-width:calc(var(--reader-width) + 144px); margin:auto; padding:28px 24px 48px; }
.reader-toolbar { position:sticky; top:0; z-index:45; background:color-mix(in srgb,var(--bg) 96%,transparent); backdrop-filter:blur(16px); border-bottom:1px solid var(--line); }
.reader-top { max-width:1280px; margin:auto; padding:10px 32px; display:flex; align-items:center; flex-wrap:wrap; gap:16px 24px; }
.reader-location { display:flex; align-items:center; gap:24px; min-width:0; flex:1; }
.reader-brand { padding-right:24px; border-right:1px solid var(--line); }
.reader-book-link { display:flex; align-items:center; gap:10px; min-height:44px; min-width:0; font-size:14px; }
.reader-book-link svg { width:18px; height:18px; flex-shrink:0; }
.reader-book-link span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-tools { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.reader-tools .button { padding:8px 12px; font-size:13px; font-weight:400; }
.reader-tools svg { width:22px; height:22px; flex-shrink:0; }
.reader-toolbar-state { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px 20px; }
.reader-toolbar-state>.reader-progress { width:200px; flex-shrink:0; }
.reader-progress { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); margin:0; font-variant-numeric:tabular-nums; }
.reader-progress progress { display:block; appearance:none; flex:1; width:100%; min-width:0; height:4px; border:0; border-radius:4px; overflow:hidden; background:var(--soft); accent-color:var(--reader-accent); }
.reader-progress progress::-webkit-progress-bar { background:var(--soft); border-radius:4px; }
.reader-progress progress::-webkit-progress-value { background:var(--reader-accent); border-radius:4px; }
.reader-progress progress::-moz-progress-bar { background:var(--reader-accent); border-radius:4px; }
.reader-progress span { white-space:nowrap; font-variant-numeric:tabular-nums; }
.reader-sync { display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; }
.reader-toolbar .reader-sync { max-width:360px; }
.reader-article { scroll-margin-top:100px; }
.reader-feedback { font-size:13px; }
.reader-feedback:has(.reader-restore:not([hidden])),.reader-feedback:has(noscript .help) { margin-bottom:16px; }
.sync-status { color:var(--muted); font-size:12px; margin:6px 0; min-height:20px; }
.sync-status.failed { color:var(--danger); }
.reader-feedback a,.reader-feedback button,.reader-sync a,.reader-sync button { color:var(--blue); }
.reader-restore { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:10px 12px; background:var(--soft); border-radius:8px; }
.reader-restore p { margin:0; }
.reader-article,.reader-preview { background:var(--reader-bg); color:var(--reader-ink); font-family:var(--reader-font); font-size:var(--reader-size); }
.reader-article { border:1px solid color-mix(in srgb,var(--reader-ink) 12%,transparent); border-radius:12px; padding:36px 47px 24px; }
.reader-heading { text-align:center; border-bottom:1px solid color-mix(in srgb,currentColor 16%,transparent); padding-bottom:24px; margin-bottom:28px; }
.reader-heading h1 { font-family:"Songti SC",SimSun,serif; font-size:36px; line-height:1.4; font-weight:600; margin:12px 0; overflow-wrap:anywhere; }
.reader-heading p,.reader-heading span { font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; font-size:13px; color:inherit; opacity:.8; }
.reader-heading p { margin:0; }
.reader-body p { text-indent:2em; line-height:var(--reader-line-height); margin:1.25em 0; overflow-wrap:anywhere; scroll-margin-top:100px; }
.reader-end { text-align:center; opacity:.75; font-size:13px; margin:32px 0; }
.reader-reading-state { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; border-top:1px solid color-mix(in srgb,currentColor 16%,transparent); padding-top:16px; font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; }
.reader-reading-state>.sync-status { color:inherit; opacity:.75; }
.reader-reading-state>.sync-status.failed { color:var(--danger); opacity:1; }
.reader-reading-state>.reader-progress { flex:1; min-width:140px; color:inherit; opacity:.8; }
.reader-bottom-start { display:none; color:var(--blue); min-height:44px; align-items:center; }
@media(min-width:768px) {
  .reader-reading-state:has([data-sync-summary][hidden]) { display:none; }
}
.reader-finish { text-align:center; padding:28px 16px 20px; }
.reader-finish h2 { font-size:18px; }
.reader-finish p { color:var(--muted); font-size:14px; margin-bottom:0; }
.reader-pagination { display:flex; justify-content:center; gap:12px; margin-top:24px; }
.reader-pagination .button { flex:1; max-width:220px; min-height:52px; }
.reader-pagination>.button:not(.secondary) { background:linear-gradient(120deg,#7569ef,#4858df); color:#fff; }
.reader-pagination>.button:not(.secondary):hover { background:linear-gradient(120deg,#6557df,#3949cd); }
@media(min-width:1200px) {
  .reader-tools { position:absolute; top:calc(100% + 28px); right:calc(50% - var(--reader-width)/2 - 128px); flex-direction:column; }
  .reader-tools .button { flex-direction:column; gap:6px; width:64px; min-height:72px; padding:10px 8px; }
}
@media(min-width:768px) and (max-width:1199px) {
  .reader-toolbar-state { flex-basis:100%; justify-content:flex-end; }
  .reader-toolbar .reader-sync:not(:has(.failed)) { display:none; }
  .reader-top { padding-block:8px; row-gap:4px; }
  .reader-toolbar-state>.reader-progress { width:100%; }
}
.settings-dialog { width:min(500px,calc(100% - 32px)); }
.settings-dialog fieldset { border:0; padding:0; margin:20px 0; min-width:0; }
.settings-dialog legend { font-size:14px; font-weight:600; margin-bottom:10px; }
.setting-options { display:flex; flex-wrap:wrap; gap:8px; }
.setting-options button,.color-option { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 13px; background:var(--soft); border:1px solid transparent; border-radius:7px; font-size:14px; }
.setting-options button[aria-pressed=true] { border-color:var(--blue); background:color-mix(in srgb,var(--blue) 9%,var(--surface)); color:var(--blue); }
.color-option input { width:26px; min-height:26px; height:26px; padding:0; border:0; margin:0 0 0 8px; background:none; }
.reader-preview { padding:16px; border-radius:10px; border:1px solid var(--line); line-height:var(--reader-line-height); margin:16px 0; }
.reader-preview p { margin:0; }
.reader-contrast-warning { color:var(--danger); background:var(--danger-bg); border-radius:8px; padding:12px; font-size:13px; }
.reader-advanced { border-top:1px solid var(--line); padding-top:8px; }
.reader-advanced>summary { min-height:44px; padding-block:10px; font-size:14px; color:var(--muted); }
.settings-actions { position:sticky; bottom:-28px; display:flex; align-items:center; gap:12px; padding:16px 0; background:var(--surface); border-top:1px solid var(--line); margin-top:20px; }
.settings-actions .button:last-child { flex:1; }
.settings-actions [data-reader-reset] { border:0; background:none; color:var(--muted); padding:8px; }

/* Forms, account and personal library */
input,select { min-height:46px; background:var(--surface); border:1px solid var(--line); border-radius:8px; color:var(--ink); padding:10px 12px; font-size:16px; max-width:100%; }
input::placeholder { color:var(--muted); }
label { display:block; font-size:14px; }
label input { display:block; width:100%; margin-top:8px; }
.form { display:grid; gap:20px; margin-top:24px; }
.form input:not([type=hidden]) { width:100%; }
.form label { margin-bottom:8px; font-weight:550; }
.auth { width:min(460px,calc(100% - 32px)); margin:48px auto; padding:32px; border:1px solid var(--line); background:var(--surface); border-radius:16px; }
.auth h1,.auth-dialog h1 { font-size:26px; margin-bottom:10px; }
.auth-form-content>.muted { font-size:14px; margin-bottom:24px; }
.auth .eyebrow { display:none; }
.password-field { position:relative; display:flex; flex-wrap:wrap; gap:4px; }
.password-field input { flex:1; min-width:0; }
.password-field.has-password-toggle input { padding-right:52px; }
.password-toggle { position:absolute; right:1px; top:1px; width:44px; height:44px; display:grid; place-items:center; border:0; background:transparent; color:var(--muted); border-radius:7px; padding:0; }
.password-toggle:hover { color:var(--ink); background:var(--soft); }
.password-eye-slash { display:none; }
.password-toggle[aria-pressed=true] .password-eye-slash { display:block; }
.providers { text-align:center; padding-top:24px; font-size:13px; }
.providers>div { display:flex; justify-content:center; gap:10px; margin-top:14px; }
.providers form { flex:1; }
.providers .button { width:100%; font-size:14px; }
.auth-footer { text-align:center; font-size:14px; color:var(--muted); margin:24px 0 0; }
.auth-footer a { color:var(--blue); text-decoration:underline; text-underline-offset:4px; }
.help { font-size:13px; color:var(--muted); margin:8px 0 0; }
.notice,.error { padding:14px 16px; border:1px solid var(--line); border-radius:9px; margin:16px 0; font-size:14px; overflow-wrap:anywhere; }
.notice { background:var(--success-bg); color:var(--success); }
.error { background:var(--danger-bg); color:var(--danger); }
.error p { margin:4px 0 0; }
.field-error { color:var(--danger); font-size:13px; margin:8px 0 0; }
[aria-invalid=true] { border-color:var(--danger); }
.email-step { padding-bottom:20px; border-bottom:1px solid var(--line); }
.email-summary { padding:14px; background:var(--soft); border-radius:8px; margin:16px 0; overflow-wrap:anywhere; }
.email-summary p { margin:0; }
.email-summary a,.email-summary button { color:var(--blue); }
.registration-steps { display:flex; gap:16px; padding:0; margin:20px 0; list-style:none; font-size:13px; color:var(--muted); }
.registration-steps [aria-current=step] { color:var(--ink); font-weight:650; }
.success-icon { display:grid; place-items:center; width:52px; height:52px; border-radius:50%; background:var(--success-bg); color:var(--success); font-size:26px; margin-bottom:20px; }
.account-page { max-width:864px; }
.history-page { max-width:1024px; }
.account-panel { margin:32px 0 64px; }
.account-identity { display:flex; gap:20px; align-items:center; padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.account-identity>div { min-width:0; }
.account-avatar { width:56px; height:56px; border-radius:16px; background:#355da3; color:white; display:grid; place-items:center; font-size:24px; flex-shrink:0; }
.account-panel h1 { margin-bottom:6px; font-size:28px; }
.account-panel p { overflow-wrap:anywhere; }
.account-links { margin:28px 0; }
.account-links a { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.account-links a:hover { color:var(--blue); }
.account-details { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px 24px; font-size:14px; padding:24px; background:var(--soft); border-radius:12px; }
.account-details dt { color:var(--muted); }
.account-details dd { margin:0; overflow-wrap:anywhere; }
.library-tabs { display:flex; flex-wrap:wrap; gap:28px; border-bottom:1px solid var(--line); margin:24px 0 28px; }
.library-tabs a { display:flex; align-items:center; padding:12px 0; min-height:48px; color:var(--muted); font-size:15px; }
.library-tabs a[aria-current=page] { color:var(--ink); border-bottom:2px solid var(--blue); }
.library-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; }
.library-card { min-width:0; }
.library-card h2 { font-size:17px; margin:12px 0 4px; }
.library-progress { color:var(--muted); font-size:14px; margin:8px 0 12px; }
.continue-link { display:flex; align-items:center; justify-content:center; min-height:44px; color:var(--on-primary); background:var(--primary); border-radius:7px; font-size:14px; padding:8px 12px; }
.bookmark-management { margin-top:8px; }
.bookmark-management summary { min-height:44px; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:13px; }
.remove-bookmark button { border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--danger); padding:8px 12px; width:100%; min-height:44px; font-size:13px; }
.library-notice { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.history-list { display:grid; gap:16px; }
.history-item { display:flex; align-items:center; gap:20px; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.history-cover { width:72px; flex-shrink:0; }
.history-cover img { width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:5px; }
.history-info { min-width:0; flex:1; }
.history-info h2 { font-size:18px; margin:0 0 6px; }
.history-info p { color:var(--muted); font-size:14px; margin:4px 0; }
.history-info time { font-size:13px; }
.error-page { max-width:700px; margin:48px auto; padding:32px; }
.error-page h1 { font-size:30px; }
.error-actions { display:flex; gap:12px; flex-wrap:wrap; margin-block:24px; }
.request-id { font-size:12px; color:var(--muted); overflow-wrap:anywhere; margin-top:24px; }

/* Dialogs and footer */
.footer { border-top:1px solid var(--line); padding:32px 16px 24px; text-align:center; color:var(--muted); font-size:13px; }
.footer .brand { justify-content:center; color:var(--ink); margin-bottom:12px; font-size:15px; }
.footer p { margin:6px 0; }
.footer nav { display:flex; justify-content:center; flex-wrap:wrap; gap:24px; margin-top:12px; }
.footer nav a { min-height:44px; display:flex; align-items:center; }
.footer nav a:hover { color:var(--blue); }
.footer-friend-links { max-width:1080px; margin:16px auto 0; padding-top:16px; border-top:1px solid var(--line); }
.footer .friend-links { margin-top:4px; gap:0 24px; }
.footer .friend-links a { max-width:100%; overflow-wrap:anywhere; text-align:left; }
.back-top { position:fixed; bottom:calc(24px + env(safe-area-inset-bottom)); right:24px; z-index:40; border:1px solid var(--line); background:var(--surface); box-shadow:0 4px 20px #0001; }
dialog { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:28px; width:min(460px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; box-shadow:0 20px 80px #0004; }
dialog::backdrop { background:#0008; backdrop-filter:blur(3px); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dialog-heading h2 { font-size:22px; margin:0; }
.dialog-close { position:absolute; right:8px; top:8px; }
.auth-dialog { width:min(460px,calc(100% - 32px)); padding:40px 28px 28px; border-radius:14px; }
.auth-dialog::backdrop { background:#0007; backdrop-filter:none; }
.auth-dialog h1 { margin:0 36px 8px 0; font-family:inherit; font-size:26px; line-height:1.4; font-weight:650; }
.auth-dialog p.muted { font-size:14px; margin:0 0 28px; }
.auth-dialog .form { gap:22px; margin-top:28px; }
.auth-dialog .form>.button { margin-top:6px; min-height:46px; }
.auth-dialog .auth-footer { margin-top:28px; }
.auth-dialog .auth-footer a { text-decoration:none; }
.auth-dialog .auth-footer a:hover { text-decoration:underline; }
.auth-dialog .dialog-close { right:12px; top:12px; border:0; background:transparent; color:var(--muted); }
.auth-dialog .dialog-close:hover { background:var(--soft); color:var(--ink); }
.nav-drawer { height:100dvh; max-height:100dvh; width:min(300px,85vw); margin:0; border-radius:0; padding:12px; border-width:0 1px 0 0; background:var(--bg); }
.drawer-heading { display:flex; align-items:center; justify-content:space-between; padding:4px 0 16px; }
.drawer-heading .brand { gap:8px; font-size:16px; }
.nav-drawer nav { display:grid; gap:5px; }
.nav-drawer nav a { display:flex; align-items:center; gap:14px; padding:11px 12px; min-height:48px; border-radius:8px; font-size:15px; color:var(--muted); }
.nav-drawer nav a[aria-current=page] { background:var(--soft); color:var(--blue); }
.nav-drawer nav a:hover { background:var(--soft); }
.nav-drawer hr { border:0; border-top:1px solid var(--line); width:100%; margin:12px 0; }
.drawer-note { font-size:13px; line-height:1.9; margin:28px 12px; color:var(--muted); }
.search-row { display:flex; gap:8px; margin-top:10px; }
.search-row input { flex:1; min-width:0; width:auto; }
.search-dialog .search { margin-top:24px; }

/* Page-specific components */
.home-categories .category-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.home-categories .category-card { min-height:106px; padding:16px; }
.home-categories .category-card h3 { font-size:18px; margin-bottom:14px; }
.home-categories .category-card p { display:none; }
.ranking-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); margin-bottom:24px; }
.ranking-tabs a { display:flex; align-items:center; min-height:48px; padding-block:10px; color:var(--muted); }
.ranking-tabs a[aria-current=page] { color:var(--blue); border-bottom:2px solid var(--blue); }
.filter-field { min-width:150px; }
.filter-field>span { display:block; margin-bottom:6px; color:var(--muted); font-size:13px; }
.filter-select { position:relative; }
.filter-select>summary { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:46px; padding:10px 14px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); cursor:pointer; list-style:none; }
.filter-select>summary::-webkit-details-marker { display:none; }
.filter-select>summary:after { content:""; width:8px; height:8px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); flex-shrink:0; }
.filter-select[open]>summary { border-color:var(--blue); }
.filter-select[open]>summary:after { transform:translateY(2px) rotate(225deg); }
.filter-options { position:absolute; top:calc(100% + 8px); left:0; width:100%; min-width:150px; max-height:280px; max-height:min(280px,50dvh); overflow-y:auto; overscroll-behavior:contain; padding:6px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:0 8px 24px #0002; z-index:25; }
.filters .filter-options label { display:block; position:relative; min-width:0; cursor:pointer; }
.filters .filter-options input { position:absolute; width:1px; height:1px; min-height:0; padding:0; opacity:0; }
.filters .filter-options label>span { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; margin:0; padding:10px; border-radius:6px; color:var(--ink); font-size:15px; overflow-wrap:anywhere; }
.filter-options label:hover>span { background:var(--soft); }
.filters .filter-options input:checked+span { color:var(--blue); background:var(--soft); }
.filter-options input:checked+span:after { content:"✓"; flex-shrink:0; }
.filter-options input:focus-visible+span { outline:2px solid var(--blue); outline-offset:-2px; }
.filter-actions { display:flex; align-items:center; gap:8px; }
.results-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; margin-bottom:24px; }
.result-count { font-size:13px; color:var(--muted); margin:8px 0; white-space:nowrap; }
.results-bar .active-filters { margin:0; }
/* Compact library layout from the approved UI preview. */
.novel-listing .page-heading { margin-bottom:16px; }
.novel-listing .filters { display:grid; grid-template-columns:minmax(220px,1fr) minmax(460px,1.2fr); align-items:center; gap:12px; padding:0; border:0; border-radius:0; background:transparent; margin-bottom:12px; }
.novel-listing .filter-search { position:relative; min-width:0!important; }
.novel-listing .filter-search>svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:var(--muted); pointer-events:none; }
.novel-listing .filter-search input { padding-left:44px; min-height:46px; background:var(--surface); }
.filter-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) auto; align-items:center; gap:12px; min-width:0; }
.filter-controls.category-filters { grid-template-columns:minmax(0,1fr) auto; }
.novel-listing .filter-field { min-width:0; }
.novel-listing .filter-select>summary { gap:8px; }
.novel-listing [data-filter-value] { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.novel-listing .filter-submit { background:#285cc6; border-color:#285cc6; color:#fff; }
.novel-listing .filter-submit:hover { background:#214f9c; border-color:#214f9c; }
.novel-listing .filter-reset { color:var(--muted); background:var(--soft); }
.novel-listing .results-bar { margin-bottom:12px; }
.cover-card .card-cover { position:relative; }
.cover-link:hover img { transform:scale(1.03); }
.cover-badges { position:absolute; top:8px; left:8px; right:8px; display:flex; justify-content:space-between; align-items:flex-start; gap:4px; pointer-events:none; }
.cover-card .cover-state { position:static; flex-shrink:0; font-size:11px; line-height:18px; padding:3px 5px; white-space:nowrap; }
.cover-meta { display:flex; align-items:center; gap:4px; min-width:0; padding:3px 5px; border-radius:4px; background:#111217cc; color:#fff; font-size:11px; line-height:18px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cover-chapters { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.cover-meta time { flex-shrink:0; }
.cover-card .card-tags { position:absolute; left:8px; right:8px; bottom:8px; flex-wrap:nowrap; gap:4px; margin:0; }
.cover-card .card-tags>a,.cover-card .tag-more summary { min-height:26px; min-width:26px; padding:3px 6px; border-radius:4px; background:#111217cc; color:#fff; line-height:20px; }
.cover-card .card-tags>a { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cover-card .card-tags>a:hover,.cover-card .tag-more summary:hover { background:#111217ee; }
.cover-card .tag-more { position:static; flex-shrink:0; }
.cover-card .tag-more>div { top:auto; bottom:calc(100% + 6px); left:0; right:auto; width:max-content; min-width:0; max-width:100%; }
.empty-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:12px; }
.taxonomy-preview { margin-block:40px; padding-top:32px; border-top:1px solid var(--line); }
.taxonomy-preview .section-heading p { font-size:14px; margin:8px 0 0; }
.taxonomy-books { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.taxonomy-book { display:flex; gap:16px; padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.taxonomy-cover { width:76px; flex-shrink:0; }
.taxonomy-cover img { width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:5px; }
.taxonomy-book>div { min-width:0; }
.taxonomy-book h3 { margin:0 0 6px; font-size:16px; }
.taxonomy-book p { font-size:13px; margin:6px 0; }
.taxonomy-book>div>span { font-size:12px; }
.taxonomy-summary { color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tag-cloud .tag-name { color:var(--ink); font-size:15px; font-weight:600; }
.taxonomy-hint { margin-top:20px; font-size:14px; }
.personal-page { padding-top:32px; }
.account-facts { margin:24px 0; padding:20px 24px; background:var(--soft); border-radius:12px; }
.account-facts>div { display:grid; grid-template-columns:88px minmax(0,1fr); gap:16px; padding-block:8px; font-size:14px; }
.account-facts dt { color:var(--muted); }
.account-facts dd { margin:0; overflow-wrap:anywhere; }
.account-identity h2 { font-size:24px; margin-bottom:4px; }
.account-identity p { margin:0; font-size:14px; }
.verified-label { display:inline-block; color:var(--success); font-size:12px; margin-left:10px; }
.library-book { min-width:0; }
.library-book h2 { font-size:17px; margin:12px 0 6px; line-height:1.5; min-height:3em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.book-author { color:var(--muted); font-size:14px; margin:6px 0; overflow-wrap:anywhere; }
.reading-progress { color:var(--ink); font-size:14px; margin:12px 0; }
.book-manage { margin-top:8px; }
.book-manage summary { min-height:44px; display:flex; align-items:center; justify-content:center; font-size:13px; color:var(--muted); cursor:pointer; }
.undo-notice { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.undo-notice p { margin:0; }
.text-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; border:0; padding:8px 4px; background:none; color:var(--blue); font-size:14px; text-underline-offset:4px; }
.text-button:hover { text-decoration:underline; }
.auth-steps { list-style:none; padding:0; margin:24px 0; display:flex; gap:20px; color:var(--muted); font-size:13px; }
.auth-steps li { display:flex; align-items:center; gap:8px; }
.auth-steps li>span { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; border:1px solid var(--line); font-variant-numeric:tabular-nums; }
.auth-steps [aria-current=step] { color:var(--ink); font-weight:600; }
.auth-steps [aria-current=step]>span { color:var(--on-primary); background:var(--primary); border-color:var(--primary); }
.auth-steps .complete>span { color:var(--success); background:var(--success-bg); }
.email-summary { display:flex; flex-wrap:wrap; gap:4px 12px; }
.email-summary .help,.email-summary strong { flex-basis:100%; margin:0; }
.email-summary a { min-height:44px; display:inline-flex; align-items:center; font-size:13px; }
.code-help-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.code-help-row .help { margin:0; min-width:0; }
.code-help-row .text-button { flex-shrink:0; white-space:nowrap; }
.status-symbol { width:56px; height:56px; display:grid; place-items:center; border:1px solid var(--line); background:var(--soft); border-radius:16px; margin-bottom:24px; color:var(--muted); }
.status-symbol svg { width:32px; height:32px; }
.success-symbol { background:var(--success-bg); color:var(--success); border:0; }
.success-panel .button { margin-top:12px; }
.request-details { margin-top:32px; font-size:13px; color:var(--muted); }
.request-details summary { min-height:44px; padding-block:10px; }
[data-reader-font=song] { font-family:"Songti SC",SimSun,serif; }
[data-reader-font=kai] { font-family:"Kaiti SC",KaiTi,serif; }
[data-reader-font=fang] { font-family:FangSong,"STFangsong",serif; }
[data-reader-font=hei] { font-family:SimHei,"Heiti SC",sans-serif; }
[data-reader-font=yahei] { font-family:"Microsoft YaHei","PingFang SC",sans-serif; }
[data-reader-font=serif] { font-family:Georgia,"Songti SC",serif; }

/* Responsive layout */
@media(max-width:1279px) {
  .header-inner { gap:24px; }
  .header-search { width:230px; }
  .book-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .featured { padding:36px; }
  .featured-slides,.hero-slide { min-height:390px; }
  .hero-slide { gap:36px; grid-template-columns:minmax(0,1fr) 280px; }
  .hero-book { width:260px; }
  .hero-copy h2 { font-size:40px; }
}
@media(max-width:1023px) {
  .home-categories .category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .taxonomy-books { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wide-shell,.detail-shell,.header-inner { padding-inline:24px; }
  .desktop-nav { display:none; }
  .mobile-menu { display:inline-flex; }
  .header-inner { gap:12px; }
  .book-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .featured { padding:32px 28px; }
  .featured-slides,.hero-slide { min-height:330px; }
  .hero-slide { grid-template-columns:minmax(0,1fr) 220px; gap:28px; }
  .hero-book { width:204px; }
  .hero-heading { margin-bottom:22px; }
  .hero-copy h2 { font-size:34px; }
  .hero-author { font-size:14px; }
  .hero-description { font-size:16px; }
  .category-card { padding:18px; }
  .rank-grid { grid-template-columns:1fr; gap:20px; }
  .novel-overview { grid-template-columns:220px minmax(0,1fr); gap:20px 32px; padding:0 0 4px; }
  .detail-heading h1 { font-size:36px; }
  .library-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:767px) {
  .home-categories .category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  .home-categories .category-card { min-height:94px; padding:14px 10px; }
  .home-categories .category-card h3 { font-size:15px; margin-bottom:10px; }
  .home-categories .category-count { font-size:12px; gap:4px; }
  .taxonomy-books { grid-template-columns:1fr; }
  .taxonomy-book { padding:16px; }
  .taxonomy-preview { margin-block:28px; padding-top:24px; }
  .taxonomy-preview .section-heading { align-items:flex-start; }
  .taxonomy-preview .section-heading h2 { font-size:20px; }
  .result-card { flex-wrap:wrap; }
  .result-copy { flex-basis:calc(100% - 110px); }
  .result-rank { width:20px; font-size:20px; }
  .result-rank~.result-copy { flex-basis:calc(100% - 152px); }
  .result-copy h2 { font-size:18px; }
  .result-author { font-size:13px; }
  .result-open { margin-left:auto; }
  .personal-page { padding-top:24px; }
  .account-facts { padding:16px; }
  .account-facts>div { grid-template-columns:64px minmax(0,1fr); gap:12px; }
  .library-book h2 { font-size:16px; }
  .reader-sync { gap:0 8px; }
  html { scroll-padding-top:72px; }
  .header { height:60px; }
  .header-inner { padding-inline:12px; gap:4px; }
  .header-inner>.brand { font-size:14px; gap:6px; }
  .header-inner>.brand .logo { width:24px; height:24px; }
  .header-actions { gap:0; }
  .header-search { display:none; }
  .mobile-search { display:inline-flex; }
  .button.compact { padding:8px 10px; font-size:13px; }
  .wide-shell,.detail-shell { padding-inline:16px; }
  .detail-shell { padding:12px 20px 32px; }
  .featured { margin-block:16px 24px; padding:24px 22px; border-radius:20px; }
  .featured-slides,.hero-slide { min-height:0; }
  .hero-slide { grid-template-columns:minmax(0,1fr) 124px; gap:20px 18px; align-items:start; }
  .hero-copy { display:contents; }
  .hero-heading { grid-column:1; grid-row:1; margin:0; }
  .hero-copy h2 { font-size:28px; line-height:1.35; margin:0 0 14px; }
  .hero-book { width:116px; grid-column:2; grid-row:1 / span 2; margin:0 8px 4px 0; }
  .hero-description { grid-column:1/-1; grid-row:3; font-size:16px; line-height:1.8; -webkit-line-clamp:2; margin:0; }
  .hero-author { font-size:13px; margin:0; }
  .hero-tags { grid-column:1/-1; grid-row:4; gap:8px; }
  .hero-tags a { padding:8px 12px; font-size:14px; }
  .hero-status { grid-column:1; grid-row:2; display:grid; align-self:end; gap:6px; margin:0 0 12px; font-size:13px; }
  .hero-status time { padding:0; border:0; }
  .hero-cta { grid-column:1/-1; grid-row:5; min-height:50px; font-size:16px; width:100%; }
  .home-section { margin-block:28px 36px; }
  .section-heading { margin-bottom:18px; gap:12px; }
  .section-heading h2 { font-size:22px; }
  .section-heading>a:not(:has(h2)) { font-size:13px; }
  .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .category-card { padding:16px 14px; min-height:142px; }
  .category-card h3 { font-size:18px; }
  .category-card p { font-size:12px; margin-bottom:10px; }
  .category-count { font-size:12px; }
  .category-watermark { font-size:90px; }
  .book-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; }
  .book-card h3 { font-size:15px; }
  .card-author { font-size:13px; }
  .card-meta { gap:4px; }
  .card-tags>a,.tag-more summary { min-height:44px; }
  .home-rankings { margin-bottom:36px; }
  .rankings-heading { margin-bottom:20px; }
  .rankings-heading h2 { font-size:26px; }
  .ranking { padding:12px; }
  .rank-heading { margin-bottom:12px; }
  .listing-page { padding-top:24px; padding-bottom:40px; }
  .page-heading { margin-bottom:24px; }
  .page-heading h1 { font-size:26px; }
  .page-heading p { font-size:14px; }
  .filters { padding:16px; gap:12px; }
  .filters label { flex:1; min-width:110px; }
  .filters .filter-field { flex:1; min-width:0; }
  .filters .filter-actions { flex-basis:100%; }
  .filters .filter-search { flex-basis:100%; min-width:0!important; }
  .filters input,.filters select { font-size:16px; }
  .filters .button { padding-inline:20px; }
  .novel-listing .filters { grid-template-columns:minmax(0,1fr); gap:10px; }
  .novel-listing .filter-controls { gap:8px; }
  .novel-listing .filter-select>summary { min-height:44px; padding:8px; gap:6px; font-size:13px; }
  .novel-listing .filter-actions { gap:8px; }
  .novel-listing .filters .button { min-height:44px; padding:8px 10px; font-size:13px; }
  .novel-listing .book-grid,.home-updates .book-grid { gap:20px 16px; }
  .active-filters a { min-height:44px; }
  .results-summary { font-size:13px; }
  .result-card,.ranking-card { gap:14px; padding:16px; }
  .result-cover { width:80px; }
  .result-info h2 { font-size:18px; }
  .result-summary { font-size:13px; }
  .rank-position { width:24px; font-size:20px; }
  .taxonomy-group .book-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tag-cloud { gap:10px; }
  .tag-cloud a { padding:9px 14px; }
  .breadcrumb { margin-bottom:12px; }
  .detail-shell .breadcrumb { margin-bottom:20px; font-size:12px; gap:8px; }
  .detail-atmosphere { height:660px; opacity:.08; }
  .novel-overview { grid-template-columns:110px minmax(0,1fr); grid-template-rows:auto; gap:20px; padding:0; }
  .detail-cover { grid-column:1; grid-row:1; width:110px; }
  .novel-info { display:block; grid-column:2; grid-row:1; }
  .detail-heading { grid-column:2; gap:8px; display:block; }
  .detail-heading h1 { font-size:27px; margin-bottom:8px; letter-spacing:.02em; }
  .detail-heading .badge { font-size:12px; }
  .detail-author { font-size:14px; min-height:32px; margin-top:4px; }
  .novel-facts { grid-column:2; display:flex; gap:4px 12px; margin:4px 0 0; font-size:12px; }
  .novel-facts>span:last-child { flex-basis:100%; }
  .detail-actions { grid-column:1/-1; grid-row:4; margin-top:0; gap:10px; }
  .detail-actions>.button,.detail-actions>form { flex:1; }
  .detail-actions>.button:not(.secondary) { flex-basis:100%; font-size:16px; }
  .detail-actions .button { width:100%; font-size:14px; }
  .detail-directory { flex:1; justify-content:center; min-height:44px; padding-inline:16px; }
  .detail-tags { grid-column:1/-1; grid-row:2; margin:0; gap:8px; }
  .detail-tags a { min-height:44px; font-size:12px; padding:8px 10px; }
  .small-heading,.synopsis,.synopsis-details,.detail-summary,.synopsis-expand { grid-column:1/-1; }
  .synopsis-expand { grid-row:3; }
  .small-heading { margin:8px 0 0; }
  .synopsis,.synopsis-preview { font-size:16px; }
  .chapter-section { margin-top:24px; padding:4px 16px 16px; }
  .chapter-heading { padding:16px 0; gap:12px; }
  .chapter-heading-label { gap:10px; }
  .chapter-heading-icon { width:32px; height:32px; }
  .chapter-heading-icon svg { width:20px; height:20px; }
  .chapter-heading h2 { font-size:20px; }
  .chapter-heading h2 span { font-size:12px; margin-left:4px; }
  .order-switch a { padding:8px 10px; }
  .chapter-tools { padding:8px 0 0; gap:10px; }
  .chapter-grid { padding:8px 0 0; }
  .chapter-grid>a { min-height:72px; grid-template-columns:minmax(24px,max-content) minmax(0,1fr) auto; gap:12px; padding:14px 8px; font-size:15px; }
  .chapter-number { font-size:13px; }
  .chapter-grid time { font-size:12px; }
  .chapter-read-marker { display:table; margin:4px 0 0; padding:0 5px; font-size:11px; }
  .reader-layout { background:var(--reader-bg); }
  .reader-shell { padding:0 0 calc(28px + env(safe-area-inset-bottom)); }
  .reader-toolbar { background:color-mix(in srgb,var(--reader-bg) 96%,transparent); color:var(--reader-ink); }
  .reader-top { padding:6px 16px; gap:8px; }
  .reader-location { gap:0; }
  .reader-brand { display:none; }
  .reader-book-link { font-size:14px; }
  .reader-tools { gap:8px; }
  .reader-tools .button { flex-direction:column; gap:2px; min-width:44px; padding:2px 4px; font-size:12px; background:none; color:var(--reader-ink); border-color:transparent; }
  .reader-tools svg { width:20px; height:20px; }
  .reader-tools .reader-start-tool { display:none; }
  .reader-toolbar-state { display:contents; }
  .reader-toolbar .reader-sync:not(:has(.failed)) { display:none; }
  .reader-toolbar .reader-sync { flex-basis:100%; }
  .reader-toolbar-state>.reader-progress { position:absolute; left:0; bottom:-1px; width:100%; }
  .reader-toolbar-state>.reader-progress span { display:none; }
  .reader-toolbar-state progress { border-radius:0; height:3px; }
  .reader-toolbar-state progress::-webkit-progress-bar,.reader-toolbar-state progress::-webkit-progress-value { border-radius:0; }
  .reader-feedback { padding-inline:22px; }
  .reader-feedback:has(.reader-restore:not([hidden])),.reader-feedback:has(noscript .help) { padding-top:16px; }
  .reader-article { padding:36px 22px 12px; border:0; border-radius:0; }
  .reader-heading { padding-bottom:20px; margin-bottom:24px; }
  .reader-heading h1 { font-size:28px; }
  .reader-reading-state { justify-content:center; gap:4px 12px; border:0; padding-top:0; }
  .reader-reading-state>.reader-progress { flex:0 0 auto; min-width:0; font-size:12px; }
  .reader-reading-state progress { display:none; }
  .reader-bottom-start { display:inline-flex; font-size:12px; }
  .reader-pagination { gap:8px; margin:12px 22px 0; }
  .reader-pagination .button { font-size:13px; padding:10px 8px; }
  .reader-feedback { font-size:12px; }
  .reader-finish { padding:24px 8px 8px; }
  .settings-dialog { padding:20px; }
  .settings-dialog fieldset { margin:18px 0; }
  .setting-options button { padding:8px 11px; }
  .settings-actions { bottom:-20px; }
  .auth { margin:28px auto 40px; padding:26px 22px; }
  .auth h1,.auth-dialog h1 { font-size:24px; }
  .account-panel { margin:24px 0 40px; }
  .account-identity { padding:20px; gap:16px; }
  .account-panel h1 { font-size:24px; }
  .account-details { padding:18px; gap:12px 16px; }
  .library-tabs { gap:24px; }
  .library-tabs a { font-size:14px; }
  .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; }
  .library-card h2 { font-size:16px; }
  .library-progress { font-size:13px; }
  .history-item { gap:14px; padding:16px; flex-wrap:wrap; }
  .history-item>.button { width:100%; }
  .history-cover { width:64px; }
  .history-info h2 { font-size:17px; }
  .history-info p { font-size:13px; }
  .error-page { margin:28px auto; padding:24px; }
  .error-page h1 { font-size:26px; }
  .footer { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
  .back-top { right:12px; width:44px; height:44px; }
  .pagination { gap:12px; }
  .pagination .button { padding:10px 14px; }
}
@media(max-width:374px) {
  .header-inner>.brand span { display:none; }
  .featured { padding:22px 18px; }
  .hero-slide { grid-template-columns:minmax(0,1fr) 108px; column-gap:14px; }
  .hero-book { width:100px; }
  .hero-copy h2 { font-size:24px; }
  .category-card h3 { font-size:17px; }
  .novel-overview { padding:0; grid-template-columns:96px minmax(0,1fr); gap:16px; }
  .detail-cover { width:96px; }
  .detail-heading h1 { font-size:24px; }
  .chapter-heading-icon { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*:before,*:after { transition:none!important; animation:none!important; }
}

/* About: reuse the site palette, type and controls. */
.about-page { padding-block:20px 56px; }
.about-intro { padding:40px; border:1px solid var(--line); border-radius:20px; background:var(--soft); }
.about-intro>.brand { margin-bottom:24px; }
.about-intro h2 { font-size:clamp(26px,3vw,36px); margin-bottom:20px; }
.about-intro>p { max-width:48em; color:var(--muted); font-size:16px; line-height:1.85; }
.about-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
.about-section { margin-top:40px; }
.about-features { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.about-feature { display:flex; flex-direction:column; align-items:flex-start; padding:24px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); min-width:0; }
.about-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:10px; background:var(--soft); color:var(--blue); margin-bottom:20px; }
.about-feature h3 { font-size:20px; margin-bottom:12px; }
.about-feature p { color:var(--muted); margin-bottom:16px; }
.about-feature .text-link,.about-feature-note { margin-top:auto; min-height:44px; display:inline-flex; align-items:center; gap:8px; }
.about-feature-note { font-size:13px; }
.about-faq details { border-bottom:1px solid var(--line); }
.about-faq summary { padding:20px 4px; font-weight:600; }
.about-faq details p { max-width:56em; padding:0 4px 8px; color:var(--muted); }
.footer nav a[aria-current=page] { color:var(--blue); }
@media(max-width:767px) {
  .about-page { padding-block:16px 32px; }
  .about-intro { padding:24px; border-radius:14px; }
  .about-intro>p { font-size:15px; }
  .about-features { grid-template-columns:minmax(0,1fr); gap:16px; }
  .about-feature { padding:20px; }
  .about-section { margin-top:32px; }
}

/* Discovery and reading history keep the existing page and theme tokens. */
.home-intro { padding-top:28px; }
.home-intro h1 { font-size:clamp(23px,2.4vw,30px); line-height:1.4; margin:0 0 8px; }
.home-intro p { color:var(--muted); margin:0; max-width:60em; }
.catalog-discovery { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 24px; }
.catalog-discovery a { display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border:1px solid var(--line); border-radius:8px; font-size:14px; background:var(--surface); }
.catalog-discovery a:hover,.catalog-discovery a[aria-current=page] { background:var(--soft); color:var(--blue); }
.recent-toolbar,.history-management { display:flex; justify-content:flex-end; margin:12px 0 20px; }
.history-actions,.recent-actions { display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:120px; max-width:260px; }
.history-manage summary,.history-clear summary { min-height:44px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--muted); font-size:14px; padding:8px 12px; }
.history-confirm { padding:16px; border:1px solid var(--line); border-radius:8px; background:var(--soft); }
.history-confirm p { margin:0 0 12px; font-size:14px; }
.history-confirm .button { width:100%; }
.history-clear { max-width:440px; }
.unread-chapters { color:var(--blue); font-size:14px; margin:8px 0 12px; }
@media(max-width:767px) {
  .home-intro { padding-top:22px; }
  .home-intro p { font-size:14px; }
  .history-actions,.recent-actions { flex-basis:100%; max-width:none; }
  .history-management { justify-content:stretch; }
  .history-clear { width:100%; max-width:none; }
  .library-tabs { column-gap:20px; row-gap:0; }
}
