:root {
    color-scheme: light;
    --page: #f2eee4;
    --paper: #fbf8ef;
    --paper-soft: #f7f3e9;
    --ink: #18392f;
    --body: #394943;
    --muted: #606965;
    --line: #d9d2c4;
    --line-soft: #e7e0d4;
    --green: #35685a;
    --green-deep: #214d42;
    --green-soft: #e4ece6;
    --gold: #786129;
    --danger: #8a4338;
    --focus: #a05236;
    --radius: 9px;
    --shell: 1160px;
    --sans: "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
    background: var(--page);
    color: var(--body);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--green);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -3px;
}

.skip-link:focus-visible,
.shelf-track a[aria-current="page"]:focus-visible,
.shelf-track a.is-active:focus-visible,
.pager [aria-current="page"]:focus-visible,
.book-actions .primary-action:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px #f3d9b0;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.35;
    text-wrap: balance;
}

.page-shell {
    width: min(calc(100% - 24px), var(--shell));
    min-width: 0;
    margin-inline: auto;
}

.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;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    min-height: 44px;
    border-radius: 6px;
    background: var(--green-deep);
    color: var(--paper);
    padding: 9px 15px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.top-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.top-header > .page-shell,
.top-header.page-shell,
.header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding-block: 20px 18px;
}

.brand-lockup {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    overflow: hidden;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.65rem, 7vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-domain {
    overflow: hidden;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 999px;
    color: var(--green-deep);
    padding: 8px 16px;
    font-weight: 650;
    white-space: nowrap;
}

.history-action:hover {
    background: var(--green-soft);
    color: var(--green-deep);
}

.global-search {
    position: relative;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
}

.global-search input,
.index-page form input[type="search"],
.index-page form input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    border: 1px solid #aeb9b3;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--paper);
    color: var(--ink);
    padding: 11px 15px;
    font-size: 16px;
}

.global-search input::placeholder,
.index-page form input::placeholder {
    color: #66716b;
    opacity: 1;
}

.global-search button,
.index-page form button[type="submit"] {
    min-width: 82px;
    min-height: 50px;
    border: 1px solid var(--green);
    border-radius: 0 10px 10px 0;
    background: var(--green);
    color: #fffdf7;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 750;
}

.global-search input:hover,
.index-page form input:hover {
    border-color: var(--green);
}

.global-search input:focus-visible,
.index-page form input:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    box-shadow: inset 0 0 0 2px var(--focus);
}

.global-search button:focus-visible,
.index-page form button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    box-shadow: inset 0 0 0 2px #f3d9b0;
}

.global-search button:hover,
.index-page form button[type="submit"]:hover {
    background: var(--green-deep);
    color: #fffdf7;
}

.form-message,
[data-search-message] {
    position: absolute;
    top: calc(100% + 4px);
    left: 3px;
    z-index: 2;
    color: var(--danger);
    font-size: 0.78rem;
}

.shelf-nav {
    max-width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--paper-soft);
}

.shelf-track {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-block: 7px;
    scrollbar-color: #aeb5ae transparent;
    scrollbar-width: thin;
}

.shelf-track a {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 64px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #4f625a;
    padding: 8px 14px;
    font-weight: 650;
    white-space: nowrap;
}

.shelf-track a:hover,
.shelf-track a[aria-current="page"],
.shelf-track a.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fffdf7;
}

.site-main {
    min-height: 64vh;
    padding-block: 22px 58px;
}

.home-intro,
.index-hero {
    display: grid;
    min-width: 0;
    gap: 3px;
    margin-bottom: 18px;
}

.home-intro h1,
.index-hero h1 {
    margin-bottom: 5px;
    font-size: clamp(1.7rem, 7vw, 2.55rem);
    letter-spacing: 0.03em;
}

.home-intro p,
.index-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
}

.home-intro > p:first-child,
.index-kicker,
.section-kicker,
.section-head > div > p,
.index-heading > div > p {
    margin-bottom: 3px;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.1em;
}

.home-intro > span {
    color: var(--muted);
}

.breadcrumbs,
.index-crumbs {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.86rem;
}

.breadcrumbs > *,
.index-crumbs > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumbs a,
.index-crumbs a {
    color: var(--green);
}

.paper-panel,
.index-panel,
.update-panel,
.category-block,
.book-profile,
.reader-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 3px 14px rgba(37, 52, 44, 0.045);
}

.paper-panel,
.index-panel,
.update-panel,
.category-block {
    padding: 18px 16px;
}

.index-panel + .index-panel,
.index-panel + .update-panel,
.update-panel + .index-panel,
.paper-panel + .paper-panel,
.category-sections,
.related-list {
    margin-top: 18px;
}

.featured-section,
.popular-section,
.plain-head {
    margin-bottom: 18px;
}

.section-head,
.index-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-head h1,
.section-head h2,
.section-head h3,
.index-heading h1,
.index-heading h2,
.index-heading h3 {
    min-width: 0;
    margin-bottom: 0;
    font-size: clamp(1.25rem, 5.8vw, 1.7rem);
    letter-spacing: 0.04em;
}

.section-head > a,
.section-head > button,
.index-heading > a,
.index-heading > button {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 44px;
    align-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--green);
    padding: 7px 8px;
    cursor: pointer;
    font-weight: 650;
}

.section-head > span,
.section-head > time,
.index-heading > span,
.index-heading > time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
}

.featured-list,
.book-stack,
.update-list,
.title-list {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.featured-book,
.book-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    border-top: 1px solid var(--line-soft);
    padding-block: 16px;
}

.featured-book:first-child,
.book-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.featured-book:last-child,
.book-row:last-child {
    padding-bottom: 0;
}

.featured-cover,
.book-cover {
    width: 100%;
    aspect-ratio: 5 / 7;
    align-self: start;
    overflow: hidden;
    border: 1px solid #d4d7ce;
    border-radius: 6px;
    background: var(--green-soft);
    box-shadow: 0 2px 7px rgba(25, 43, 35, 0.09);
}

.featured-cover img,
.book-cover img,
img.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.book-cover {
    border-radius: 6px;
}

.featured-copy,
.book-copy {
    min-width: 0;
}

.featured-copy h2,
.featured-copy h3,
.book-copy h2,
.book-copy h3 {
    overflow-wrap: anywhere;
    margin-bottom: 6px;
    font-size: clamp(1.08rem, 4.8vw, 1.38rem);
}

.featured-copy h2 a,
.featured-copy h3 a,
.book-copy h2 a,
.book-copy h3 a {
    color: var(--ink);
}

.featured-title-row,
.book-titleline {
    display: flex;
    min-width: 0;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.featured-title-row h2,
.featured-title-row h3,
.book-titleline h2,
.book-titleline h3 {
    min-width: 0;
}

.featured-title-row > span,
.book-titleline > span {
    flex: 0 0 auto;
    border: 1px solid #ded7c7;
    border-radius: 5px;
    color: var(--muted);
    padding: 2px 7px;
    font-size: 0.74rem;
}

.book-tags,
.book-meta {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.book-tags span,
.book-tags a {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border: 1px solid #ded7c7;
    border-radius: 5px;
    color: var(--gold);
    padding: 2px 8px;
}

.book-meta a {
    color: var(--green);
}

.book-summary {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 8px;
    color: #4e5b56;
    font-size: 0.9rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.featured-copy > p:last-child,
.book-copy > p:last-child {
    margin-bottom: 0;
}

.featured-meta {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px 18px;
    color: var(--gold);
    font-size: 0.82rem;
}

.featured-meta > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.popular-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    min-width: 0;
    align-items: start;
    border-right: 1px solid var(--line-soft);
    padding: 0 8px;
}

.popular-item:nth-child(2n) {
    border-right: 0;
    padding-right: 0;
}

.popular-item:nth-child(2n + 1) {
    padding-left: 0;
}

.popular-item:nth-child(n + 3) {
    margin-top: 12px;
    border-top: 1px solid var(--line-soft);
    padding-top: 12px;
}

.popular-item > a:first-child,
.popular-item > .book-cover {
    aspect-ratio: 5 / 7;
    overflow: hidden;
    border-radius: 5px;
    background: var(--green-soft);
}

.popular-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-item > span {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--green-soft);
    color: var(--green-deep);
    font-family: Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.popular-item > div {
    min-width: 0;
}

.popular-item > div > a,
.popular-item > div > small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-item > div > a {
    color: var(--ink);
    font-weight: 650;
}

.popular-item > div > small {
    color: var(--muted);
    font-size: 0.72rem;
}

.popular-item h3,
.popular-item p {
    overflow: hidden;
    margin-bottom: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-item h3 {
    font-family: var(--sans);
    font-size: 0.92rem;
}

.popular-item p {
    color: var(--muted);
    font-size: 0.76rem;
}

.update-row {
    display: grid;
    grid-template-columns: minmax(86px, 0.8fr) minmax(0, 1.5fr) auto;
    gap: 10px;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    border-top: 1px dashed var(--line);
    font-size: 0.88rem;
}

.update-row > :first-child,
.update-row > :nth-child(4) {
    display: none;
}

.update-row:first-child {
    border-top: 0;
}

.update-row > * {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-row > a:nth-child(2),
.update-book {
    color: var(--ink);
    font-weight: 650;
}

.update-chapter,
.update-author,
.update-row time {
    color: var(--muted);
}

.update-author {
    display: none;
}

.update-row time {
    font-size: 0.78rem;
    text-align: right;
}

.category-sections {
    display: block;
}

.category-block-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.category-block .section-head,
.category-block .index-heading {
    margin-bottom: 7px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.category-block .section-head h2,
.category-block .index-heading h2 {
    font-size: 1.18rem;
}

.category-block > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.category-block > div:first-child h3 {
    margin-bottom: 0;
    font-size: 1.18rem;
}

.category-block > div:first-child a {
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 650;
}

.title-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
}

.title-list li:last-child {
    border-bottom: 0;
}

.title-list a,
.title-list span,
.title-list time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.title-list span,
.title-list time {
    color: var(--muted);
    font-size: 0.78rem;
    text-align: right;
}

.index-page {
    min-width: 0;
}

.index-page form {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
}

.index-return {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 7px;
    color: var(--green-deep);
    padding: 8px 15px;
    font-weight: 650;
}

.index-page form.index-search {
    display: block;
}

.index-search > label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-weight: 650;
}

.index-searchline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
}

.search-sheet {
    margin-bottom: 18px;
}

.index-notice {
    margin-bottom: 18px;
    border: 1px solid #d8bca5;
    border-radius: 7px;
    background: #f4e6d6;
    color: #784836;
    padding: 11px 14px;
}

.book-links {
    margin-top: 8px;
    margin-bottom: 0;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.topic-card {
    display: block;
    min-width: 0;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper-soft);
    padding: 10px 12px;
}

.topic-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 7px;
}

.topic-card-head h3 {
    margin-bottom: 0;
    font-size: 1.04rem;
}

.topic-card-head a {
    color: var(--green);
    font-size: 0.8rem;
}

.topic-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic-card li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 40px;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
}

.topic-card li:last-child {
    border-bottom: 0;
}

.topic-card li a,
.topic-card li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-card li span {
    color: var(--muted);
    font-size: 0.76rem;
}

.topic-card span,
.topic-card small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-card small {
    color: var(--muted);
}

.empty-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    padding: 34px 12px;
    text-align: center;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.pager a,
.pager span {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-soft);
    padding: 7px 11px;
}

.pager [aria-current="page"],
.pager .active {
    border-color: var(--green);
    background: var(--green);
    color: #fffdf7;
}

.book-profile {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}

.book-profile > .book-cover,
.book-profile > a:first-child {
    align-self: start;
}

.profile-cover {
    width: 92px;
    aspect-ratio: 5 / 7;
    align-self: start;
    border: 1px solid #d4d7ce;
    border-radius: 6px;
    background: var(--green-soft);
    box-shadow: 0 2px 7px rgba(25, 43, 35, 0.09);
    object-fit: cover;
}

.profile-copy {
    min-width: 0;
}

.book-profile h1 {
    overflow-wrap: anywhere;
    margin-bottom: 10px;
    font-size: clamp(1.45rem, 6.6vw, 2.35rem);
}

.book-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 12px;
}

.book-facts div {
    min-width: 0;
    border-left: 2px solid #ccd8ce;
    padding-left: 8px;
}

.book-facts dt {
    color: var(--muted);
    font-size: 0.72rem;
}

.book-facts dd {
    overflow: hidden;
    margin: 1px 0 0;
    color: var(--ink);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-profile .book-summary,
.book-profile .book-description,
.profile-intro {
    grid-column: 1 / -1;
    display: block;
    margin-bottom: 0;
    color: #475750;
    line-height: 1.85;
    -webkit-line-clamp: initial;
}

.book-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.book-actions a,
.book-actions button {
    display: inline-flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 7px;
    background: var(--green);
    color: #fffdf7;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
}

.book-actions a + a,
.book-actions button + button,
.book-actions .secondary-action {
    background: transparent;
    color: var(--green-deep);
}

.book-actions .primary-action {
    background: var(--green);
    color: #fffdf7;
}

.chapter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    min-width: 0;
    overflow: visible;
    background: transparent;
}

.chapter-grid a {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-soft);
    padding: 9px 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-grid a:hover {
    border-color: #b7c6bc;
    background: var(--green-soft);
    color: var(--green-deep);
}

.chapter-grid > .empty-note {
    grid-column: 1 / -1;
}

.catalogue-grid {
    max-height: 650px;
    overflow-y: auto;
}

.latest-grid {
    max-height: none;
}

.related-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.related-list .book-row,
.related-list .popular-item {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper-soft);
    padding: 10px;
}

.related-list > article {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper-soft);
    padding: 9px;
}

.related-list > article > a {
    aspect-ratio: 5 / 7;
    overflow: hidden;
    border-radius: 5px;
    background: var(--green-soft);
}

.related-list > article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-list > article h3,
.related-list > article p {
    overflow: hidden;
    margin-bottom: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-list > article h3 {
    font-family: var(--sans);
    font-size: 0.94rem;
}

.related-list > article p {
    color: var(--muted);
    font-size: 0.78rem;
}

.chapter-section,
.related-section {
    margin-top: 18px;
}

.keyword-links {
    margin-top: 18px;
}

.topic-section {
    margin-top: 18px;
}

.keyword-links h2 {
    margin-bottom: 9px;
    font-size: 1.05rem;
}

.keyword-links > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.keyword-links a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-soft);
    color: var(--green-deep);
    padding: 7px 12px;
    font-size: 0.82rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper-soft);
}

.site-footer > .page-shell,
.site-footer.page-shell,
.footer-inner {
    display: flex;
    min-height: 106px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.84rem;
}

.site-footer p {
    margin-bottom: 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
}

@media (min-width: 700px) {
    .page-shell {
        width: min(calc(100% - 40px), var(--shell));
    }

    .top-header > .page-shell,
    .top-header.page-shell,
    .header-grid {
        grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1.45fr) auto;
        gap: 20px;
        padding-block: 22px;
    }

    .brand-name {
        font-size: 2rem;
    }

    .global-search {
        grid-column: 2;
        grid-row: 1;
    }

    .brand-lockup {
        grid-column: 1;
        grid-row: 1;
    }

    .history-action {
        grid-column: 3;
        grid-row: 1;
    }

    .shelf-track {
        justify-content: space-between;
    }

    .shelf-track a {
        min-width: 74px;
    }

    .site-main {
        padding-block: 30px 70px;
    }

    .index-panel,
    .paper-panel,
    .update-panel,
    .category-block {
        padding: 22px 24px;
    }

    .featured-book,
    .book-row {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 20px;
        padding-block: 20px;
    }

    .popular-strip {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .popular-item {
        border-top: 0;
        border-right: 1px solid var(--line-soft);
        margin-top: 0;
        padding: 0 14px;
    }

    .popular-item:first-child {
        padding-left: 0;
    }

    .popular-item:last-child {
        border-right: 0;
        padding-right: 0;
    }

    .popular-item:nth-child(2n) {
        border-right: 1px solid var(--line-soft);
        padding-right: 14px;
    }

    .popular-item:nth-child(2n + 1) {
        padding-left: 14px;
    }

    .popular-item:nth-child(n + 3) {
        margin-top: 0;
        border-top: 0;
        padding-top: 0;
    }

    .popular-item:first-child {
        padding-left: 0;
    }

    .popular-item:last-child {
        border-right: 0;
        padding-right: 0;
    }

    .update-row {
        grid-template-columns: 68px minmax(130px, 0.9fr) minmax(180px, 1.35fr) minmax(100px, 0.7fr) 88px;
    }

    .update-row > :first-child,
    .update-row > :nth-child(4) {
        display: block;
    }

    .update-author {
        display: block;
    }

    .category-block-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .topic-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .book-profile {
        grid-template-columns: 166px minmax(0, 1fr);
        gap: 26px;
        padding: 26px;
    }

    .profile-cover {
        width: 166px;
    }

    .book-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .book-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .book-actions a,
    .book-actions button {
        min-width: 132px;
    }

    .chapter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer > .page-shell,
    .site-footer.page-shell {
        min-height: 94px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
}

@media (min-width: 960px) {
    .top-header > .page-shell,
    .top-header.page-shell,
    .header-grid {
        grid-template-columns: minmax(220px, 0.75fr) minmax(380px, 1.35fr) auto;
        gap: 32px;
        min-height: 126px;
    }

    .brand-name {
        font-size: 2.35rem;
    }

    .global-search input,
    .global-search button {
        min-height: 54px;
    }

    .featured-book,
    .book-row {
        grid-template-columns: 124px minmax(0, 1fr);
        gap: 24px;
    }

    .book-summary {
        font-size: 0.96rem;
    }

    .chapter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .related-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 390px) {
    .page-shell {
        width: min(calc(100% - 20px), var(--shell));
    }

    .brand-name {
        font-size: 1.5rem;
    }

    .brand-domain {
        font-size: 0.68rem;
    }

    .history-action {
        padding-inline: 13px;
        font-size: 0.86rem;
    }

    .global-search button {
        min-width: 76px;
        padding-inline: 14px;
    }

    .index-panel,
    .update-panel,
    .category-block {
        padding-inline: 13px;
    }

    .featured-book,
    .book-row {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
    }

    .book-summary {
        -webkit-line-clamp: 2;
    }

    .update-row {
        grid-template-columns: minmax(82px, 0.8fr) minmax(0, 1.25fr) 54px;
        gap: 7px;
        font-size: 0.82rem;
    }

    .book-profile {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 12px;
        padding: 13px;
    }

    .profile-cover {
        width: 84px;
    }

    .book-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .book-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .topic-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
