:root {
  color-scheme: light;
  --bg: #faf9f6;
  --panel: #ffffff;
  --soft: #f1f0ed;
  --text: #272724;
  --muted: #81817b;
  --line: #e6e5df;
  --button: #282925;
  --button-text: #fff;
  --tab-selected-bg: #e9e6df;
  --tab-selected-text: #33322e;
  --accent: #93826b;
  --mengzhu-color: #94611b;
  --rank-gold: #b8985c;
  --rank-silver: #C0C0C0;
  --rank-bronze: #ae8165;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2381817b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1c1c;
  --panel: #222222;
  --soft: #262626;
  --text: #eeeeea;
  --muted: #999995;
  --line: #363635;
  --button: #eeeee9;
  --button-text: #242424;
  --tab-selected-bg: var(--button);
  --tab-selected-text: var(--button-text);
  --accent: #c0af95;
  --mengzhu-color: #e5b96f;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23999995' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.link-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  background-color: currentColor;
  mask: url("/static/icons/arrow-up-right.bf21f39722c5.svg") center / contain no-repeat;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
input, select { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; min-width: 0; }
/* Hide native WebKit search icons while keeping our search buttons. */
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-decoration,
input[type="search"]::-webkit-search-results-button { display: none; -webkit-appearance: none; }
select:not([multiple]) { -webkit-appearance: none; appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px; padding-right: 36px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
button { border: 0; }
img { display: block; }
svg { display: block; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.4; letter-spacing: -.7px; }
h2 { font-size: 21px; letter-spacing: -.4px; margin-bottom: 6px; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 99; background: var(--panel); padding: 10px; }
.site-header { height: 66px; border-bottom: 1px solid transparent; }
.header-inner { max-width: 1120px; height: 100%; padding: 0 24px; margin: auto; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; flex-shrink: 0; gap: 8px; font-size: 17px; font-weight: 750; letter-spacing: -.6px; }
.brand svg { width: 23px; height: 23px; stroke-width: 1.4; }
.header-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 24px; height: 37px; padding: 0 10px 0 14px; width: 380px; background: var(--soft); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.header-search:focus-within { border-color: var(--text); background: var(--panel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }
@media (hover: hover) { .header-search:hover { border-color: var(--text); background: var(--panel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); } }
.search-submit svg { width: 16px; height: 16px; }
.header-search input { width: 100%; background: transparent; border: 0; outline-offset: -2px; padding: 5px 0; font-size: 13px; }
.header-search input:focus { outline: none; }
.header-search select { background-color: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; font-size: 12px; padding: 0 32px 0 9px; width: 90px; flex-shrink: 0; color: var(--muted); }
.search-platform { position: relative; flex: none; align-self: stretch; display: flex; margin: 6px 0; border-left: 1px solid var(--line); }
.search-platform-trigger { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 10px; min-width: 96px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.search-platform-trigger::before { content: ""; position: absolute; inset: -6px 0; }
.search-platform-trigger:hover, .search-platform-trigger[aria-expanded="true"] { color: var(--text); }
.search-platform-trigger:focus-visible { outline-offset: 3px; border-radius: 12px; }
.search-platform .source-icon { width: 16px; height: 16px; font-size: 10px; border-radius: 4px; }
.search-platform-caret { width: 12px; height: 12px; margin-left: auto; color: var(--muted); transition: transform .15s ease; }
.search-platform-trigger[aria-expanded="true"] .search-platform-caret { transform: rotate(180deg); }
.search-platform-menu { position: absolute; z-index: 60; right: 0; top: calc(100% + 12px); width: 120px; max-width: calc(100vw - 36px); padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: 0 10px 32px #0002; }
.search-platform-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 7px 10px; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; line-height: 1.5; text-align: left; }
.search-platform-option:hover, .search-platform-option:focus-visible, .search-platform-option[aria-selected="true"] { background: var(--soft); }
.search-platform-option:focus-visible { outline-offset: -2px; }
.search-platform-option[aria-selected="true"] { font-weight: 600; }
.search-platform-check { width: 15px; height: 15px; margin-left: auto; color: var(--accent); }
@media (pointer: coarse) { .search-platform-option { min-height: 42px; } }
@media (prefers-reduced-motion: reduce) { .search-platform-caret { transition: none; } }
.search-submit { display: grid; place-items: center; width: 22px; height: 25px; padding: 0; flex-shrink: 0; color: var(--muted); border: 0; background: transparent; cursor: pointer; }
.search-submit:hover { color: var(--text); }
.main-nav { display: flex; align-items: center; gap: 23px; margin-left: auto; white-space: nowrap; font-size: 13px; color: var(--muted); }
.main-nav .active { color: var(--text); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; padding: 5px; background: transparent; color: var(--muted); flex-shrink: 0; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { color: var(--text); }
.more-menu { position: relative; }
.more-menu summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 8px; border-radius: 6px; line-height: 20px; cursor: pointer; list-style: none; transition: background-color .15s ease, color .15s ease; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary:hover, .more-menu summary:focus-visible, .more-menu[open] > summary { background: var(--soft); color: var(--text); }
.more-menu-caret { width: 12px; height: 12px; flex: none; }
.more-menu[open] .more-menu-caret { transform: rotate(180deg); }
.menu-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 140px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 28px #0002; z-index: 20; }
.menu-panel a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--text); }
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--soft); color: var(--text); }
.menu-panel a:focus-visible { outline-offset: -2px; }
.friend-links h2 { margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.friend-links nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; }
.friend-links a { color: var(--muted); overflow-wrap: anywhere; }
.friend-links a:hover, .friend-links a:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.devtool-notice { width: min(380px, calc(100vw - 48px)); box-sizing: border-box; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-align: center; }
.devtool-notice::backdrop { background: rgb(0 0 0 / 65%); backdrop-filter: blur(4px); }
.devtool-notice h2 { margin: 0 0 12px; font-size: 20px; }
.devtool-notice p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.devtool-notice button { padding: 9px 18px; border: 0; border-radius: 6px; background: var(--button); color: var(--button-text); cursor: pointer; }
.source-icon { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 4px; background: var(--source-color, #d55353); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; flex-shrink: 0; }
.source-icon.small { width: 14px; height: 14px; font-size: 9px; border-radius: 3px; }
.site-main { min-height: 65vh; }
.site-ad { width: calc(100% - 48px); max-width: 1152px; margin: 40px auto 0; padding-top: 12px; border-top: 1px solid var(--line); min-width: 0; text-align: center; }
.site-ad[hidden] { display: none; }
.site-ad-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.site-ad .adsbygoogle { width: 100%; min-height: 90px; }
.site-ad-preview-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; padding: 18px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--soft); color: var(--muted); }
.site-ad-preview-box strong { font-size: 13px; font-weight: 500; }
.site-ad-preview-box span { font-size: 11px; }
@media (max-width: 520px) { .site-ad { width: calc(100% - 36px); margin-top: 24px; } }
.home-hero { position: relative; padding-top: 154px; padding-bottom: 140px; margin-top: 32px; overflow: hidden; }
.hero-copy { text-align: center; position: relative; z-index: 1; }
.hero-copy h1 { margin-bottom: 14px; font-size: 28px; line-height: 1.25; letter-spacing: -.65px; }
.hero-copy > p { color: var(--muted); font-size: 13px; line-height: 1.85; margin-bottom: 18px; }
.hero-platforms { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 15px; }
.hero-platforms a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.hero-copy .hero-stat-link { font-size: 12px; margin-bottom: 0; }
.hero-stat-link a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; margin-left: 5px; }
.hero-strip { position: absolute; left: 50%; width: min(100%, 1680px); height: 112px; transform: translateX(-50%); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); opacity: .48; }
.top-strip { top: 10px; }
.bottom-strip { bottom: 9px; }
.cover-track { display: flex; width: max-content; animation: home-cover-drift 90s linear infinite; }
.cover-track.reverse { animation-direction: reverse; animation-duration: 120s; }
.cover-track-group { display: flex; flex: none; gap: 9px; padding-right: 9px; }
.cover-track-group > a { width: 73px; flex: 0 0 73px; }
.hero-strip:hover .cover-track, .hero-strip:focus-within .cover-track { animation-play-state: paused; }
@keyframes home-cover-drift { from { transform: translateX(0); } to { transform: translateX(-33.333333%); } }
@media (prefers-reduced-motion: reduce) { .cover-track { animation: none; } }
.book-cover { display: block; position: relative; aspect-ratio: 3 / 4; width: 100%; overflow: hidden; background: color-mix(in srgb, var(--source-color, #877866) 12%, var(--soft)); border-radius: 5px; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; z-index: 1; }
.cover-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); font: 500 32px/1 Georgia, "Songti SC", serif; }
.home-stats { display: flex; justify-content: center; gap: 46px; margin: 14px auto 27px; max-width: 850px; text-align: center; }
.home-stats div { min-width: 55px; }
.home-stats strong, .home-stats span { display: block; }
.home-stats strong { font-size: 19px; line-height: 1.4; }
.home-stats span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.genre-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 920px; margin: 0 auto; }
.genre-chips a { padding: 4px 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.genre-chips a:hover { border-color: var(--muted); color: var(--text); }
.genre-chips a span { display: none; }
.genre-chips.left { justify-content: flex-start; }
.content-section { max-width: 1040px; margin: 59px auto 0; padding: 0 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); padding-bottom: 17px; margin-bottom: 26px; }
.section-head p { font-size: 12px; color: var(--muted); margin-bottom: 0; }
.section-tabs { display: flex; gap: 15px; align-items: center; }
.section-tabs button { padding: 5px 0; background: transparent; display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; position: relative; white-space: nowrap; }
.section-tabs button[aria-selected="true"] { color: var(--text); }
.section-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 2px; background: var(--text); }
.home-chart { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; min-height: 290px; }
.chart-podium { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 21px; padding: 8px 0; }
.podium-cover { max-width: 115px; margin: 0 auto 13px; position: relative; }
.podium-cover .book-cover { box-shadow: 0 5px 16px #0002; }
.podium-rank { position: absolute; left: -7px; bottom: -7px; width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--rank-gold); color: #fff; font-size: 12px; box-shadow: 0 0 0 3px var(--bg); z-index: 2; }
.podium-book:nth-child(2) .podium-rank { background: var(--rank-silver); }
.podium-book:nth-child(3) .podium-rank { background: var(--rank-bronze); }
.podium-book > strong { display: block; text-align: center; font-size: 13px; line-height: 1.6; height: 42px; overflow: hidden; }
.podium-book > span { display: block; text-align: center; font-size: 11px; color: var(--muted); margin-top: 4px; }
.chart-list { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 16px 24px; padding-top: 8px; }
.chart-list > a { display: flex; align-items: center; gap: 9px; min-width: 0; }
.chart-number { color: var(--muted); font-size: 12px; width: 14px; flex-shrink: 0; }
.chart-list .book-cover { width: 48px; flex: 0 0 48px; border-radius: 3px; }
.chart-list a > span:last-child { min-width: 0; }
.chart-list strong { font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.chart-list small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.book-honors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; min-width: 0; }
.book-honors .book-honor { display: inline-block; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; white-space: nowrap; }
.book-honors .is-king { color: var(--accent); border-color: var(--accent); }
.podium-book > .book-honors { display: flex; justify-content: center; margin-top: 7px; }
.chart-note { grid-column: 1/-1; align-self: center; padding: 40px 18px; border-left: 1px solid var(--line); margin-top: 20px; }
.chart-note strong { display: block; font-size: 15px; margin: 13px 0 5px; }
.chart-note p { color: var(--muted); font-size: 12px; }
.section-more { display: block; width: fit-content; margin: 20px auto 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.text-link { font-size: 12px; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.booklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 29px 38px; }
.booklist-card { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 16px; align-items: start; }
.collection-covers { display: flex; position: relative; height: 93px; width: 88px; padding-top: 5px; }
.collection-covers .book-cover, .collection-placeholder { width: 58px; height: auto; aspect-ratio: 3 / 4; position: absolute; left: 0; top: 7px; border: 1px solid var(--line); transform: rotate(-6deg); }
.collection-covers .book-cover:nth-child(n+2), .collection-placeholder:nth-child(n+2) { left: 25px; top: 3px; transform: rotate(6deg); }
.collection-covers .book-cover:nth-child(n+3) { display: none; }
.collection-placeholder { background: var(--soft); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--muted); font: 24px Georgia, serif; }
.collection-title { display: block; font-weight: 650; font-size: 14px; line-height: 1.5; margin: 4px 0 7px; }
.booklist-card p { color: var(--muted); font-size: 12px; margin-bottom: 8px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-meta { color: var(--muted); font-size: 12px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; line-height: 1.5; }
.booklist-card .book-meta { font-size: 10px; gap: 5px; }
.book-shelf { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 21px; }
.book-shelf a { min-width: 0; }
.book-shelf strong { display: block; font-size: 12px; line-height: 1.55; margin-top: 9px; }
.book-shelf a > span:last-child:not(.book-cover) { color: var(--muted); font-size: 11px; }
.site-footer { max-width: 1040px; padding: 30px 24px 25px; margin: 75px auto 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-start; color: var(--muted); font-size: 12px; }
.footer-brand { font-weight: 650; font-size: 14px; color: var(--text); }
.site-footer p { margin: 5px 0 0; font-size: 11px; }
.site-footer nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer .footer-sources { width: 100%; line-height: 1.8; }
.footer-sources a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.footer-sources a:hover, .footer-sources a:focus-visible { color: var(--text); }
.site-footer .copyright { width: 100%; font-size: 10px; margin-top: 10px; }
.page-wrap { max-width: 1040px; margin: 32px auto 0; padding: 0 24px; }
.platform-tabs { display: flex; flex-wrap: wrap; gap: 9px 22px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.platform-tabs a { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.platform-tabs a.selected { color: var(--text); font-weight: 650; }
.catalog-platform-tabs { gap: 9px; padding-bottom: 16px; margin-bottom: 20px; align-items: center; }
.catalog-platform-title { font-size: 19px; font-weight: 650; margin-right: 12px; padding-right: 21px; border-right: 1px solid var(--line); line-height: 1.4; white-space: nowrap; }
.catalog-platform-tabs a { padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); }
.catalog-platform-tabs a:hover { background: var(--soft); color: var(--text); }
.catalog-platform-tabs a.selected { color: var(--tab-selected-text); background: var(--tab-selected-bg); border-color: var(--tab-selected-bg); font-weight: 650; }
.page-heading { margin: 37px 0 29px; }
.page-heading h1 { margin-bottom: 8px; }
.page-heading > p { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.eyebrow { font-size: 11px !important; letter-spacing: 1px; margin-bottom: 5px !important; }
.filter-panel { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: color-mix(in srgb, var(--panel) 40%, transparent); }
.filter-search { display: grid; grid-template-columns: 1fr 155px; gap: 15px; margin-bottom: 19px; }
.filter-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px 18px; }
.filter-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.filter-grid input, .filter-grid select { width: 100%; font-size: 12px; padding: 8px 10px; }
.filter-grid select { padding-right: 36px; }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 19px; }
.button { display: inline-flex; justify-content: center; align-items: center; border-radius: 7px; padding: 9px 17px; font-size: 12px; line-height: 1.5; border: 1px solid transparent; cursor: pointer; }
.button.primary { background: var(--button); color: var(--button-text); }
.button.secondary { background: var(--soft); color: var(--text); border-color: var(--line); }
.button:hover { opacity: .8; }
.button.source-read-btn { background: #e11d48; color: #fff; transition: background-color .15s ease; }
.button.source-read-btn:hover { background: #be123c; color: #fff; opacity: 1; }
.filter-note { margin: 15px 0 0; color: var(--muted); }
.results-heading { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; margin: 28px 0 3px; }
.book-row { display: flex; align-items: flex-start; gap: 19px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.row-cover-link { display: block; width: 77px; flex: 0 0 77px; position: relative; }
.row-main { flex: 1; min-width: 0; padding-top: 3px; }
.row-mengzhu { position: absolute; z-index: 2; inset: auto 0 0; padding: 3px 2px; border-radius: 0 0 5px 5px; background: rgb(23 23 20 / 78%); color: #ffe0a3; font-size: 11px; line-height: 1.5; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-title { font-size: 17px; font-weight: 650; line-height: 1.5; display: inline-block; margin-bottom: 7px; }
.row-summary { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-source { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); margin-top: 15px; }
.row-source > span:last-child:not(.source-icon) { margin-left: 6px; }
.row-actions { display: flex; flex: none; flex-direction: column; align-items: flex-end; align-self: stretch; justify-content: space-between; gap: 14px; }
.has-metrics .row-actions { width: 236px; }
.row-metrics { display: flex; justify-content: flex-end; gap: 18px; margin: 0; }
.row-metrics > div { display: flex; flex-direction: column; align-items: center; min-width: 58px; white-space: nowrap; }
.row-metrics dt { margin-top: 4px; color: var(--muted); font-size: 10px; }
.row-metrics dd { order: -1; margin: 0; font-size: 16px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; }
.row-rank.row-rank-medal { left: -7px; bottom: auto; right: auto; top: -7px; width: 28px; height: 28px; margin: 0; color: #fff; background: #81817b; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-rank.row-rank-medal[data-rank="1"] { background: var(--rank-gold); }
.row-rank.row-rank-medal[data-rank="2"] { background: var(--rank-silver); }
.row-rank.row-rank-medal[data-rank="3"] { background: var(--rank-bronze); }
.save-button { margin-top: 3px; }
.save-button.is-saved { color: var(--accent); }
.save-button.is-saved svg { fill: color-mix(in srgb, var(--accent) 20%, transparent); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 35px; font-size: 15px; color: var(--muted); }
.pagination-number, .pagination-arrow, .pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; }
.pagination-number { border: 1px solid transparent; border-radius: 9px; }
.pagination-arrow, .pagination-number.is-current { color: var(--text); border: 1px solid #d4d4d8; border-radius: 9px; background: var(--panel); }
.pagination-number.is-current { font-weight: 600; }
.pagination-arrow { margin: 0 2px; }
.pagination-arrow svg { width: 18px; height: 18px; stroke-width: 2; }
.pagination a:hover { color: var(--text); background: var(--soft); }
.pagination .is-disabled { color: #bdbdc5; border-color: #e1e1e6; background: var(--panel); opacity: .7; }
:root[data-theme="dark"] .pagination-arrow, :root[data-theme="dark"] .pagination-number.is-current { border-color: #555551; }
:root[data-theme="dark"] .pagination .is-disabled { color: #666661; border-color: var(--line); }
.empty-state { padding: 55px 15px; text-align: center; grid-column: 1/-1; width: 100%; color: var(--muted); }
.empty-state h2 { font-size: 18px; color: var(--text); font-weight: 550; }
.empty-state p { font-size: 13px; margin-bottom: 20px; }
.breadcrumbs { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; margin: 25px 0 35px; }
.book-detail-header { display: flex; gap: 35px; margin-bottom: 20px; }
.detail-cover { width: 157px; flex: 0 0 157px; }
.detail-cover .book-cover { box-shadow: 0 6px 24px #0002; }
.detail-main { flex: 1; min-width: 0; }
.detail-main h1 { font-size: 30px; margin-bottom: 5px; }
.detail-author { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.detail-author a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.book-facts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 0 0 23px; }
.book-facts dt { color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.book-facts dd { margin: 0; font-size: 12px; }
.book-facts dd a { text-decoration: underline; text-underline-offset: 3px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-badges.has-metrics { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-badge { display: flex; align-items: center; gap: 12px; max-width: 100%; margin: 0; padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.detail-badge img { width: 68px; height: 68px; object-fit: contain; }
.detail-badge figcaption { display: flex; flex-direction: column; gap: 5px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.detail-badge figcaption strong { font-size: 13px; color: var(--text); font-weight: 600; }
.book-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.book-actions .save-button { margin: 0; }
.sync-time { color: var(--muted); font-size: 10px; margin: 13px 0 0; }
.detail-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; align-items: start; }
.detail-content > * { min-width: 0; }
.detail-section { padding: 15px 0; }
.detail-section h2 { font-size: 18px; margin-bottom: 19px; }
.prose { font-size: 14px; line-height: 2; }
.prose p { margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 12px; }
.ranking-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ranking-badge { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; padding: 5px 9px; }
.ranking-badge a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ranking-badge a > span { white-space: nowrap; }
.ranking-separator { color: var(--muted); }
.ranking-badges strong { color: var(--accent); }
.ranking-position { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; background: #81817b; font-variant-numeric: tabular-nums; }
.ranking-position[data-rank="1"] { background: var(--rank-gold); }
.ranking-position[data-rank="2"] { background: var(--rank-silver); }
.ranking-position[data-rank="3"] { background: var(--rank-bronze); }
.ranking-position strong { color: #fff; font-size: 9px; line-height: 1; }
.ranking-position.is-long { width: 20px; height: 20px; }
.ranking-position.is-long strong { font-size: 8px; }
.book-carousel { --shelf-cover-width: 144px; position: relative; min-width: 0; }
.book-carousel .book-shelf { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 5px; scroll-behavior: smooth; scroll-snap-type: x proximity; scroll-padding-inline: 2px; scrollbar-width: none; overscroll-behavior-x: contain; }
.book-carousel .book-shelf::-webkit-scrollbar { display: none; }
.book-carousel .book-shelf-card { flex: 0 0 var(--shelf-cover-width); width: var(--shelf-cover-width); scroll-snap-align: start; }
.book-carousel .book-shelf-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-carousel .book-cover { transition: transform .18s ease, box-shadow .18s ease; transform-origin: center bottom; }
.book-carousel .book-shelf-card:focus-visible .book-cover { transform: translateY(-3px) scale(1.025); box-shadow: 0 5px 14px #0002; }
.book-carousel-arrow { position: absolute; top: calc(var(--shelf-cover-width) * 2 / 3 + 8px); transform: translateY(-50%); width: 32px; height: 32px; padding: 0; -webkit-appearance: none; appearance: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--button); color: var(--button-text); box-shadow: 0 2px 8px #0003; z-index: 3; cursor: pointer; }
.book-carousel-arrow svg { width: 17px; height: 17px; flex: none; }
.book-carousel-arrow.is-prev { left: 6px; }
.book-carousel-arrow.is-next { right: 6px; }
@media (hover: hover) and (pointer: fine) { .book-carousel .book-shelf-card:hover .book-cover { transform: translateY(-3px) scale(1.025); box-shadow: 0 5px 14px #0002; } }
@media (max-width: 600px) { .book-carousel { --shelf-cover-width: 112px; } }
@media (prefers-reduced-motion: reduce) { .book-carousel .book-shelf { scroll-behavior: auto; } .book-carousel .book-cover { transition: none; } .book-carousel .book-shelf-card:is(:hover,:focus-visible) .book-cover { transform: none; } }
.metric-grid { display: flex; flex-wrap: wrap; gap: 35px; }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { font-size: 22px; }
.metric-grid span { font-size: 11px; color: var(--muted); }
.metric-grid .metric-mengzhu span { color: var(--mengzhu-color); }
.board-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
.board-tabs a { border: 1px solid var(--line); padding: 7px 14px; font-size: 12px; border-radius: 7px; color: var(--muted); background: var(--panel); }
.board-tabs a:hover { color: var(--text); background: var(--soft); }
.board-tabs a.selected { color: var(--button-text); background: var(--button); border-color: var(--button); font-weight: 650; }
.ranking-filters { border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin-bottom: 24px; background: var(--panel); }
.ranking-filter-row { display: flex; align-items: flex-start; gap: 16px; }
.ranking-filter-row + .ranking-filter-row { margin-top: 16px; }
.ranking-filter-key { flex: 0 0 28px; padding-top: 7px; color: var(--muted); font-size: 12px; }
.ranking-filter-row .board-tabs { min-width: 0; margin: 0; gap: 8px; }
.ranking-results-heading { gap: 10px 20px; flex-wrap: wrap; }
.ranking-results-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.taxonomy-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.taxonomy-grid a { display: flex; justify-content: space-between; gap: 10px; padding: 19px; border: 1px solid var(--line); border-radius: 7px; }
.taxonomy-grid small { color: var(--muted); font-size: 11px; }
.stats-page { max-width: 930px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; margin-bottom: 20px; }
.stats-grid div { border-top: 1px solid var(--line); padding: 16px 0; }
.stats-grid span { display: block; color: var(--muted); font-size: 12px; }
.stats-grid strong { font-size: 30px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; padding: 12px 15px; }
td { padding: 16px 15px; border-top: 1px solid var(--line); }
td a { display: flex; gap: 8px; align-items: center; }
.data-bar { width: 120px; height: 4px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.data-bar span { display: block; height: 100%; background: var(--accent); }
.list-note { margin: 0 0 25px 96px; padding: 14px 18px; border-left: 2px solid var(--line); font-size: 12px; color: var(--muted); }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--button); color: var(--button-text); padding: 11px 20px; border-radius: 8px; box-shadow: 0 6px 24px #0003; font-size: 12px; z-index: 50; }
@media (min-width: 1024px) {
  /* 1152px of content plus 24px padding on each side. */
  .header-inner, .page-wrap, .content-section, .site-footer, .stats-page { max-width: 1200px; }
  .book-row .row-main { padding-top: 0; }
  .book-row .row-title { display: block; line-height: 1.25; }
}
@media (min-width: 1440px) { .home-hero { margin-top: 43px; } }
@media (max-width: 1050px) { .header-inner { gap: 22px; } .header-search { width: 320px; } .main-nav { gap: 17px; } .section-tabs { gap: 10px; } .home-chart { gap: 30px; } }
@media (max-width: 800px) {
  .site-header { height: auto; } .header-inner { flex-wrap: wrap; padding: 16px 20px; gap: 15px; } .brand { order: 0; } .main-nav { order: 1; gap: 17px; } .header-search { order: 2; width: 100%; height: 39px; } .hero-copy h1 { font-size: 26px; } .home-hero { margin-top: 12px; padding-top: 139px; padding-bottom: 130px; } .hero-platforms { gap: 12px; } .home-stats { gap: 30px; } .section-head { align-items: flex-start; flex-wrap: wrap; gap: 14px; } .section-tabs { gap: 21px; } .section-tabs button[aria-selected="true"]::after { bottom: -18px; } .home-chart { grid-template-columns: 1fr; gap: 22px; } .chart-podium { max-width: 520px; width: 100%; margin: 0 auto; } .chart-list { grid-template-columns: repeat(2,1fr); } .chart-note { padding: 14px 20px; margin: 0; } .book-shelf { grid-template-columns: repeat(6,1fr); } .detail-content { grid-template-columns: 1fr; gap: 0; } .detail-content aside { display: flex; gap: 35px; } .booklist-grid { gap: 28px 20px; } .collection-covers { width: 72px; } .booklist-card { grid-template-columns: 72px minmax(0,1fr); gap: 12px; } .collection-covers .book-cover, .collection-placeholder { width: 49px; } .collection-covers .book-cover:nth-child(n+2), .collection-placeholder:nth-child(n+2) { left: 20px; } .site-footer nav { margin-left: 0; width: 100%; } .taxonomy-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .book-row .row-cover-link { width: 75px; flex-basis: 75px; }
  .book-row .row-main { display: flex; flex-direction: column; gap: 6px; padding-top: 0; }
  .book-row .row-title { display: block; line-height: 1.25; margin-bottom: 0; }
  .book-row .row-summary { margin-top: 0; }
  .row-mengzhu { padding-block: 2px; font-size: 10px; }
  .header-inner { padding: 14px 17px; } .brand { font-size: 16px; } .brand svg { width: 20px; height: 20px; } .main-nav { gap: 14px; font-size: 12px; } .main-nav > .shelf-link { display: none; } .icon-button { width: 23px; } .hero-copy h1 { font-size: 24px; } .hero-copy > p { font-size: 12px; } .hero-platforms { gap: 11px; padding: 0 25px; } .hero-platforms a { gap: 4px; font-size: 11px; } .hero-strip { height: 98px; } .cover-track-group > a { width: 64px; flex-basis: 64px; } .home-hero { padding-top: 127px; padding-bottom: 115px; } .home-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px 25px; max-width: 300px; margin-top: 16px; } .home-stats strong { font-size: 18px; } .genre-chips { padding: 0 15px; gap: 6px; } .genre-chips.left { padding: 0; } .genre-chips a { font-size: 11px; padding: 3px 9px; } .content-section { margin-top: 42px; padding: 0 19px; } h2 { font-size: 19px; } .section-head p { font-size: 11px; } .section-tabs { width: 100%; justify-content: space-between; gap: 7px; } .section-tabs button { font-size: 11px; gap: 4px; } .section-tabs .source-icon { width: 12px; height: 12px; font-size: 8px; } .chart-podium { gap: 17px; } .podium-cover { max-width: 90px; } .podium-book > strong { font-size: 12px; } .chart-list { gap: 16px 17px; } .chart-list > a { gap: 6px; } .chart-list .book-cover { width: 38px; flex-basis: 38px; } .chart-list strong { font-size: 11px; } .chart-list small { font-size: 9px; } .booklist-grid { grid-template-columns: 1fr; gap: 25px; } .booklist-card { grid-template-columns: 85px minmax(0,1fr); } .collection-covers { width: 85px; } .collection-covers .book-cover, .collection-placeholder { width: 56px; } .collection-covers .book-cover:nth-child(n+2), .collection-placeholder:nth-child(n+2) { left: 25px; } .book-shelf { grid-template-columns: repeat(3,1fr); gap: 24px; } .page-wrap { padding: 0 18px; margin-top: 12px; } .platform-tabs { gap: 11px 15px; } .platform-tabs a { font-size: 11px; } .page-heading { margin-top: 28px; } .page-heading h1 { font-size: 27px; } .filter-panel { padding: 14px; } .filter-search { grid-template-columns: 1fr 110px; gap: 10px; } .filter-search input, .filter-search select { font-size: 11px; } .filter-grid { grid-template-columns: 1fr 1fr; gap: 13px; } .book-row { gap: 12px; padding: 19px 0; } .row-cover-link { width: 60px; flex-basis: 60px; } .row-title { font-size: 15px; } .book-meta { font-size: 10px; gap: 5px; } .row-summary { font-size: 11px; -webkit-line-clamp: 2; } .row-source { margin-top: 10px; font-size: 9px; flex-wrap: wrap; } .row-source > span:last-child:not(.source-icon) { margin-left: 0; } .book-detail-header { gap: 19px; } .detail-cover { width: 95px; flex-basis: 95px; } .detail-main h1 { font-size: 23px; line-height: 1.4; } .detail-author { font-size: 11px; margin-bottom: 14px; } .book-facts { gap: 10px 18px; margin-bottom: 14px; } .book-facts dd { font-size: 10px; } .book-facts dt { font-size: 9px; } .book-actions { gap: 7px; } .book-actions .button { padding: 7px 11px; font-size: 11px; } .detail-content aside { flex-direction: column; gap: 0; } .stats-grid { gap: 15px; } .stats-grid strong { font-size: 25px; } .taxonomy-grid { grid-template-columns: 1fr; } .site-footer { padding: 25px 19px; margin-top: 55px; } .site-footer nav { gap: 10px 18px; font-size: 11px; } .data-bar { width: 70px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 760px) {
  .book-row.has-metrics { display: grid; grid-template-columns: 77px minmax(0, 1fr) 23px; row-gap: 8px; }
  .has-metrics .row-cover-link { grid-column: 1; grid-row: 1 / span 2; }
  .has-metrics .row-main { grid-column: 2; grid-row: 1; }
  .has-metrics .row-actions { display: contents; }
  .row-metrics { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; gap: 5px 14px; }
  .row-metrics > div { flex-direction: row; gap: 4px; min-width: 0; }
  .row-metrics dt { margin: 0; font-size: 10px; }
  .row-metrics dd { font-size: 11px; }
  .has-metrics .save-button { grid-column: 3; grid-row: 1; align-self: start; }
}
@media (max-width: 520px) {
  .book-row.has-metrics { grid-template-columns: 75px minmax(0, 1fr) 23px; }
}
@media (forced-colors: active) { select:not([multiple]) { -webkit-appearance: auto; appearance: auto; background-image: none; } }

/* Platform category trees */
.genre-group { margin: 38px 0; }
.genre-group > h2 { font-size: 19px; margin: 0 0 20px; }
.genre-tree-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.genre-root { padding: 22px; border: 1px solid var(--line); border-radius: 10px; }
.genre-root header > a { display: flex; justify-content: space-between; gap: 12px; font-size: 18px; font-weight: 650; }
.genre-root header > a > span { color: var(--muted); font-weight: 400; }
.genre-counts { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 9px; }
.genre-children, .genre-children ul { list-style: none; padding: 0; margin: 18px 0 0; }
.genre-children { display: flex; flex-wrap: wrap; gap: 9px; }
.genre-children li > a { display: inline-flex; align-items: center; gap: 8px; border-radius: 5px; background: var(--soft); padding: 7px 9px; font-size: 13px; }
.genre-children li > a:hover { background: var(--line); }
.genre-children small { color: var(--muted); font-size: 11px; }
.genre-children ul { margin: 8px 0; padding-left: 12px; }
@media(max-width:700px) { .genre-tree-grid { grid-template-columns: 1fr; } .genre-root { padding: 18px; } }
@media(max-width:600px) {
  .pagination { gap: 4px; font-size: 14px; }
  .pagination-number, .pagination-arrow, .pagination-ellipsis { width: 32px; height: 34px; }
  .catalog-platform-tabs { gap: 6px; }
  .catalog-platform-tabs, .ranking-filter-row .board-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .catalog-platform-tabs::-webkit-scrollbar, .ranking-filter-row .board-tabs::-webkit-scrollbar { display: none; }
  .catalog-platform-tabs > *, .ranking-filter-row .board-tabs a { flex-shrink: 0; white-space: nowrap; }
  .catalog-platform-tabs a { padding: 8px 10px; }
  .catalog-platform-title { font-size: 17px; padding-right: 12px; margin-right: 4px; }
  .ranking-filters { padding: 16px; }
  .ranking-filter-row { gap: 12px; align-items: center; }
  .ranking-filter-key { padding-top: 0; }
  .ranking-filter-row .board-tabs { flex: 1; padding: 2px; }
  .ranking-filter-row + .ranking-filter-row { margin-top: 12px; }
  .ranking-results-meta { font-size: 10px; }
  .detail-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .detail-badge { min-width: 0; padding: 10px; gap: 8px; }
  .detail-badge img { width: 44px; height: 44px; flex: none; }
  .detail-badge figcaption { min-width: 0; font-size: 10px; overflow-wrap: anywhere; }
}
