:root {
    --paper: #f7f4ed;
    --paper-strong: #fffdf8;
    --ink: #24211d;
    --muted: #777068;
    --line: #ded8ce;
    --brand: #b72f2a;
    --brand-dark: #8e211d;
    --brand-soft: #f5e5df;
    --pine: #243b35;
    --shadow: 0 18px 46px rgba(60, 48, 37, .08);
    --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.web-page { min-width: 0; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.web-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.top-nav { min-height: 38px; color: #625d55; background: #eee9df; border-bottom: 1px solid #e2dcd1; }
.top-nav__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.home-channel-links, .sign-in, .signed-in { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--brand); }
.top-op-box { display: none; }
.site-header { background: var(--paper-strong); border-bottom: 1px solid var(--line); }
.site-header__main { min-height: 118px; display: grid; grid-template-columns: 260px minmax(280px, 1fr) 150px; align-items: center; gap: 36px; }
.site-brand, .pin-brand { display: inline-flex; align-items: center; gap: 12px; }
.site-brand img, .pin-brand img { border-radius: 12px; box-shadow: 0 7px 20px rgba(127, 37, 31, .16); }
.site-brand__copy { display: grid; gap: 1px; }
.site-brand__copy strong { font-family: var(--serif); font-size: 28px; letter-spacing: .08em; }
.site-brand__copy small { font-size: 9px; color: var(--muted); letter-spacing: .24em; }
.site-search { height: 48px; display: grid; grid-template-columns: 1fr 86px; border: 2px solid var(--brand); background: #fff; }
.site-search input, .pin-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.site-search input { padding: 0 18px; }
.site-search button { border: 0; color: #fff; background: var(--brand); cursor: pointer; font-weight: 650; }
.site-search button:hover { background: var(--brand-dark); }
.bookshelf-link { justify-self: end; padding: 12px 20px; border: 1px solid var(--line); background: #fff; font-weight: 650; }
.bookshelf-link:hover { color: var(--brand); border-color: var(--brand); }
.main-nav-wrap { color: #fff; background: #34343a; }
.main-nav > ul { list-style: none; display: grid; grid-template-columns: 170px repeat(7, minmax(90px, 1fr)); margin: 0; padding: 0; }
.main-nav li { min-width: 0; }
.main-nav a, .main-nav li > span { display: flex; height: 54px; align-items: center; justify-content: center; padding: 0 10px; }
.main-nav .first { background: var(--brand); font-weight: 700; }
.main-nav a:hover, .main-nav a:focus-visible { background: rgba(255, 255, 255, .09); color: #fff; }
.pin-header { position: relative; z-index: 20; color: var(--ink); background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); }
.pin-header__inner { min-height: 68px; display: grid; grid-template-columns: auto 1fr minmax(180px, 260px) auto; align-items: center; gap: 28px; }
.pin-brand strong { font-family: var(--serif); font-size: 19px; letter-spacing: .06em; }
.pin-header nav, .pin-account { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.pin-header nav a:hover, .pin-account a:hover { color: var(--brand); }
.pin-search { height: 38px; padding: 0 13px; border: 1px solid var(--line); background: #fff; }
.pin-search input { width: 100%; height: 100%; }
.pin-account { gap: 12px; justify-content: flex-end; white-space: nowrap; }
.web-main { padding: 54px 0 76px; }
.page-kicker { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.page-title { margin: 0; font: 700 clamp(30px, 4vw, 48px)/1.16 var(--serif); letter-spacing: .03em; }
.page-lead { max-width: 680px; margin: 14px 0 0; color: var(--muted); line-height: 1.8; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 42px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font: 700 26px/1.2 var(--serif); }
.section-heading span { color: var(--muted); font-size: 13px; }
.filter-panel { margin-top: 30px; padding: 22px; background: var(--paper-strong); border: 1px solid var(--line); box-shadow: var(--shadow); }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.search-filter-grid { grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto; }
.filter-field { display: grid; gap: 7px; }
.filter-field label { color: var(--muted); font-size: 12px; }
.filter-field select, .filter-field input { width: 100%; min-height: 42px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line); background: #fff; outline: none; }
.filter-field select:focus, .filter-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border: 1px solid transparent; cursor: pointer; font-weight: 700; }
.primary-button { color: #fff; background: var(--brand); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { color: var(--brand); border-color: var(--brand); background: transparent; }
.danger-button { color: #99423c; border-color: #e6c6c1; background: #fff8f6; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; }
.book-card { min-width: 0; background: var(--paper-strong); border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-card__cover { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #e7e0d5; }
.book-card__cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.book-card:hover .book-card__cover img { transform: scale(1.025); }
.book-card__body { padding: 18px; }
.book-card__eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; color: var(--brand); font-size: 12px; }
.book-card h2, .book-card h3 { margin: 0; font: 700 19px/1.35 var(--serif); }
.book-card h2 a:hover, .book-card h3 a:hover { color: var(--brand); }
.book-card__meta { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.book-card__brief { display: -webkit-box; min-height: 4.9em; margin: 13px 0 0; overflow: hidden; color: #655f57; line-height: 1.65; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.book-card__action { margin-top: 16px; color: var(--brand); font-size: 13px; font-weight: 700; }
.book-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.book-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px; background: var(--paper-strong); }
.book-row__cover { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; background: #e7e0d5; }
.book-row h2 { margin: 0; font: 700 21px/1.35 var(--serif); }
.book-row h2 a:hover { color: var(--brand); }
.book-row__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.book-row__brief { display: -webkit-box; margin: 10px 0 0; overflow: hidden; color: #655f57; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.book-row__actions { display: grid; gap: 9px; min-width: 108px; }
.empty-state { padding: 68px 24px; text-align: center; color: var(--muted); background: var(--paper-strong); border: 1px solid var(--line); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font: 700 22px/1.3 var(--serif); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 34px; }
.pagination a, .pagination span { min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); background: var(--paper-strong); }
.pagination a:hover { color: #fff; border-color: var(--brand); background: var(--brand); }
.pagination .is-disabled { opacity: .45; pointer-events: none; }
.category-hero { position: relative; min-height: 300px; margin-top: 30px; overflow: hidden; color: #fff; background: var(--pine); }
.category-hero::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(90deg, transparent 49px, rgba(255,255,255,.22) 50px), linear-gradient(transparent 49px, rgba(255,255,255,.18) 50px); background-size: 50px 50px; }
.category-hero__content { position: relative; z-index: 1; width: min(650px, 72%); padding: 54px; }
.category-hero__content h2 { margin: 0; font: 700 clamp(30px, 5vw, 52px)/1.15 var(--serif); }
.category-hero__content p { margin: 18px 0 26px; color: rgba(255,255,255,.75); line-height: 1.8; }
.category-hero__cover { position: absolute; right: 7%; bottom: -34px; width: 180px; transform: rotate(5deg); box-shadow: 0 24px 48px rgba(0,0,0,.32); }
.category-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 32px; }
.rank-list { counter-reset: rank; display: grid; background: var(--paper-strong); border-top: 2px solid var(--ink); }
.rank-list a { counter-increment: rank; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.rank-list a::before { content: counter(rank, decimal-leading-zero); color: var(--brand); font: 700 14px/1 var(--serif); }
.rank-list small { color: var(--muted); }
.author-hero { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 38px; align-items: center; margin-top: 30px; padding: 40px; color: #fff; background: var(--pine); }
.author-avatar { width: 168px; height: 168px; object-fit: cover; border: 6px solid rgba(255,255,255,.18); border-radius: 50%; }
.author-hero h1 { margin: 0; font: 700 46px/1.15 var(--serif); }
.author-hero__level { display: inline-flex; margin-top: 13px; padding: 5px 10px; color: #f2d8a6; border: 1px solid rgba(242,216,166,.42); font-size: 12px; }
.author-hero p { max-width: 700px; margin: 18px 0 0; color: rgba(255,255,255,.76); line-height: 1.8; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1px; background: var(--paper-strong); border: 1px solid var(--line); }
.stat-strip div { padding: 24px; text-align: center; border-right: 1px solid var(--line); }
.stat-strip div:last-child { border-right: 0; }
.stat-strip strong { display: block; font: 700 24px/1 var(--serif); }
.stat-strip span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.shelf-summary { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.shelf-summary strong { color: var(--brand); }
.shelf-card { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px; background: var(--paper-strong); border-bottom: 1px solid var(--line); }
.shelf-card:first-child { border-top: 1px solid var(--line); }
.shelf-card img { width: 78px; aspect-ratio: 3 / 4; object-fit: cover; background: #e7e0d5; }
.shelf-card h2 { margin: 0; font: 700 20px/1.3 var(--serif); }
.shelf-card__meta { margin-top: 7px; color: var(--muted); font-size: 13px; }
.shelf-card__progress { margin-top: 10px; color: #554f47; font-size: 13px; }
.shelf-card__actions { display: flex; align-items: center; gap: 9px; }
.site-footer { color: #777068; background: #ebe5da; border-top: 1px solid #ddd5c8; }
.site-footer__inner { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-footer__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-weight: 700; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a:hover { color: var(--brand); }
.site-footer--compact .site-footer__inner { min-height: 94px; }
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: rgba(36,33,29,.9); box-shadow: 0 10px 28px rgba(0,0,0,.16); font-weight: 800; }
.back-to-top span { display: none; }
@media (max-width: 980px) {
    .site-header__main { grid-template-columns: auto 1fr; gap: 20px; }
    .site-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 22px; }
    .bookshelf-link { grid-column: 2; grid-row: 1; }
    .main-nav > ul { grid-template-columns: repeat(4, 1fr); }
    .main-nav .first { grid-column: span 4; }
    .pin-header__inner { grid-template-columns: auto 1fr auto; }
    .pin-search { display: none; }
    .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .web-container { width: min(100% - 28px, 1180px); }
    .top-nav__inner, .site-footer__inner { align-items: flex-start; flex-direction: column; padding-block: 14px; }
    .site-header__main { min-height: 0; padding-block: 18px; grid-template-columns: 1fr auto; }
    .site-brand img { width: 44px; height: 44px; }
    .site-brand__copy strong { font-size: 23px; }
    .bookshelf-link { padding: 10px 12px; }
    .main-nav { overflow-x: auto; }
    .main-nav > ul { display: flex; min-width: max-content; }
    .main-nav li > a, .main-nav li > span { height: 46px; min-width: 96px; }
    .main-nav .first { display: none; }
    .pin-header__inner { min-height: 62px; grid-template-columns: auto 1fr; gap: 14px; }
    .pin-header nav { grid-column: 1 / -1; order: 3; overflow-x: auto; padding-bottom: 12px; gap: 18px; }
    .pin-account { font-size: 13px; }
    .web-main { padding: 36px 0 58px; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .search-filter-grid { grid-template-columns: 1fr; }
    .book-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .book-card__body { padding: 14px; }
    .book-card__brief { display: none; }
    .book-row { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .book-row__cover { width: 72px; }
    .book-row__actions { grid-column: 1 / -1; display: flex; }
    .category-columns { grid-template-columns: 1fr; }
    .category-hero { min-height: 260px; }
    .category-hero__content { width: 74%; padding: 34px 24px; }
    .category-hero__cover { right: -5%; width: 145px; }
    .author-hero { grid-template-columns: 96px 1fr; gap: 20px; padding: 24px; }
    .author-avatar { width: 96px; height: 96px; }
    .author-hero h1 { font-size: 32px; }
    .author-hero p { grid-column: 1 / -1; }
    .stat-strip div { padding: 18px 8px; }
    .shelf-card { grid-template-columns: 64px 1fr; gap: 14px; }
    .shelf-card img { width: 64px; }
    .shelf-card__actions { grid-column: 1 / -1; }
    .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}
@media (max-width: 480px) {
    .site-brand__copy small, .signed-in > span { display: none; }
    .filter-grid { grid-template-columns: 1fr; }
    .book-grid { grid-template-columns: 1fr 1fr; }
    .book-card h2, .book-card h3 { font-size: 17px; }
    .book-card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .author-hero { grid-template-columns: 76px 1fr; }
    .author-avatar { width: 76px; height: 76px; }
    .stat-strip strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
