:root {
    --bg: #f6f3ee;
    --surface: #ffffff;
    --surface-alt: #fbf8f2;
    --surface-soft: #f0ebe3;
    --line: #e6ddd2;
    --text: #2d241f;
    --muted: #7d6e63;
    --accent: #c92a2a;
    --accent-dark: #151515;
    --accent-soft: #fff0f0;
    --gold: #9a6b2f;
    --shadow: 0 18px 45px rgba(43, 31, 21, 0.08);
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1220px;
    --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-serif: Georgia, "Times New Roman", "Songti SC", serif;
    --reader-font: Georgia, "Times New Roman", "Songti SC", serif;
    --reader-bg: #f6f1e7;
    --reader-text: #3d342d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(201, 42, 42, 0.08), transparent 24%),
        linear-gradient(180deg, #fbf8f2 0%, #f3eee7 100%);
    font: 15px/1.7 var(--font-sans);
}

body.menu-open,
body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.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;
}

.site-shell {
    min-height: 100vh;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.topbar {
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(155, 132, 115, 0.15);
    font-size: 12px;
    color: var(--muted);
    backdrop-filter: blur(12px);
}

.topbar-inner,
.site-header-inner,
.footer-links,
.footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-inner {
    min-height: 36px;
}

.topbar-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.site-header {
    padding: 20px 0 0;
}

.site-header-inner {
    gap: 24px;
    align-items: flex-end;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
}

.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.brand-mark strong {
    font: 800 40px/1 var(--font-serif);
    color: var(--accent);
    letter-spacing: 1px;
    text-shadow: 0 4px 12px rgba(201, 42, 42, 0.18);
}

.brand-mark span {
    font-size: 13px;
    letter-spacing: 0.5em;
    color: var(--gold);
    text-transform: uppercase;
}

.brand-note {
    color: var(--muted);
    font-size: 13px;
}

.header-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.search-form {
    width: min(100%, 420px);
}

.search-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    border: 1px solid #3a3029;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-shell input {
    width: 100%;
    border: 0;
    padding: 13px 16px;
    color: var(--text);
    background: transparent;
}

.search-shell button {
    border: 0;
    min-width: 56px;
    background: #2a2726;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
}

.lang-switch a {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--muted);
}

.lang-switch a.active {
    background: var(--accent);
    color: #fff;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    cursor: pointer;
}

.main-nav {
    margin-top: 16px;
    background: linear-gradient(90deg, #171313, #26201d 42%, #c92a2a 42%, #b61e1e 100%);
    box-shadow: var(--shadow);
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.main-nav li.is-accent a,
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav li.active a {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    padding: 28px 22px;
    background: #fffdf9;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 40;
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-backdrop,
.reader-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 14, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 35;
}

.drawer-backdrop.show,
.reader-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.drawer-title {
    margin: 0 0 14px;
    font: 700 28px/1.1 var(--font-serif);
    color: var(--accent);
}

.drawer-nav,
.drawer-secondary {
    display: grid;
    gap: 8px;
}

.drawer-nav a,
.drawer-secondary a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-dark);
    color: #fff;
    cursor: pointer;
}

.page-main {
    padding: 26px 0 40px;
}

.hero-grid,
.content-grid,
.detail-grid,
.catalog-grid,
.reader-grid,
.history-grid,
.list-grid {
    display: grid;
    gap: 24px;
}

.hero-grid,
.content-grid,
.detail-grid,
.catalog-grid,
.list-grid,
.history-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.reader-grid {
    grid-template-columns: minmax(0, 1fr);
}

.hero-grid.hero-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.detail-grid {
    align-items: start;
}

.panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(170, 146, 126, 0.18);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-inner {
    padding: 22px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h1,
.section-head h2,
.section-head h3,
.section-title {
    margin: 0;
    font: 700 28px/1.15 var(--font-serif);
    color: #2e221d;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
}

.section-kicker::before {
    content: "";
    width: 38px;
    height: 2px;
    background: currentColor;
}

.section-more,
.text-button {
    color: var(--accent);
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.eyebrow-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.eyebrow-nav a,
.eyebrow-nav button,
.chips a,
.chips button,
.pager a,
.pager span,
.reader-actions a,
.reader-actions button,
.book-actions a,
.book-actions button,
.settings-group button,
.settings-pills button,
.tag-link,
.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
}

.eyebrow-nav a.active,
.eyebrow-nav button.active,
.chips a.active,
.chips button.active,
.pager a.current,
.settings-group button.active,
.settings-pills button.active,
.primary-btn,
.book-actions .primary-btn,
.reader-actions .primary-btn {
    background: var(--accent);
    color: #fff;
}

.secondary-btn {
    background: #1e1917;
    color: #fff;
}

.cover-portrait,
.book-cover,
.history-cover,
.rank-cover,
.card-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #f1eae0, #ddd0c2);
}

.cover-portrait img,
.book-cover img,
.history-cover img,
.rank-cover img,
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card {
    position: relative;
    background:
        linear-gradient(115deg, rgba(201, 42, 42, 0.96), rgba(121, 18, 18, 0.94)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    color: #fff;
}

.hero-card .panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    padding: 30px 34px;
}

.home-hero-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: stretch;
    min-height: 420px;
}

.hero-copy-block,
.hero-side-stack {
    display: grid;
    gap: 18px;
}

.hero-copy-block {
    align-content: center;
    max-width: 620px;
}

.hero-side-stack {
    align-content: center;
}

.hero-title {
    margin: 0;
    font: 800 clamp(38px, 4.5vw, 58px)/1.08 var(--font-serif);
}

.hero-desc {
    max-width: 46ch;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
}

.hero-inline-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.hero-inline-note a {
    color: #fff3d8;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 6px;
}

.metric {
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.metric strong {
    display: block;
    font: 700 22px/1.2 var(--font-serif);
}

.hero-focus-card {
    display: grid;
    gap: 14px;
}

.hero-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    max-height: 250px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(45, 12, 12, 0.24);
}

.hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-focus-meta {
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-focus-meta strong,
.hero-focus-meta p,
.hero-focus-meta span {
    display: block;
}

.hero-focus-meta p {
    margin: 8px 0 4px;
    font-weight: 700;
    color: #fff;
    font-size: 18px;
}

.hero-focus-meta span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-top: 2px;
}


.notice-card,
.ad-card,
.stat-card,
.surface-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.notice-card strong,
.ad-card strong,
.stat-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.shelf-grid-featured {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shelf-grid.shelf-grid-catalog-side .novel-card h3 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shelf-grid.shelf-grid-home-featured .novel-card h3 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-recommend-grid.channel-recommend-grid-featured .novel-card h3 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.novel-card {
    display: grid;
    gap: 10px;
}

.novel-card h3,
.mini-list h3,
.list-item-title,
.rank-list h3,
.table-list .book-name,
.chapter-list a,
.history-item-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
}

.novel-card h3,
.list-item-title,
.table-list .book-name,
.chapter-list a,
.history-item-title,
.rank-list h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-card p,
.mini-list p,
.table-list td,
.book-meta dd,
.summary,
.rank-list p,
.history-item p {
    margin: 0;
    color: var(--muted);
}

.row-stack {
    display: grid;
    gap: 24px;
}

.split-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
}

.channel-hero-layout,
.rank-hero-layout {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 22px;
}

.channel-hero-layout {
    align-items: start;
}

.channel-toolbar-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.channel-toolbar-copy {
    display: grid;
    gap: 10px;
}

.channel-filter-toolbar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.channel-filter-box,
.rank-filter-box,
.channel-recommend-box,
.rank-highlight-box {
    display: grid;
    gap: 18px;
}

.channel-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.channel-filter-grid a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--surface-soft);
    color: #41332a;
    font-weight: 700;
}

.channel-filter-grid a.active {
    background: linear-gradient(135deg, #cb3830, #a61e1a);
    color: #fff;
}

.channel-recommend-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.channel-recommend-grid-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-card h3 {
    font-size: 14px;
}

.compact-card p {
    font-size: 12px;
}

.channel-side-panel {
    position: sticky;
    top: 16px;
}

.rank-toolbar-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.rank-toolbar-copy {
    display: grid;
    gap: 10px;
}

.rank-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rank-toolbar-panel,
.rank-feature-panel {
    overflow: visible;
}

.editor-grid {
    display: grid;
    gap: 18px;
}

.editor-lead {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
}

.editor-copy h2 {
    margin: 0 0 8px;
    font: 700 26px/1.15 var(--font-serif);
}

.book-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 18px;
}

.book-meta div {
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.book-meta dt {
    font-weight: 700;
    color: #483b32;
}

.book-meta dd {
    margin: 4px 0 0;
}

.book-actions,
.reader-actions,
.settings-pills,
.settings-group,
.chips,
.pager {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.summary.long {
    -webkit-line-clamp: unset;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.info-table th {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    background: rgba(232, 223, 212, 0.38);
}

.table-list tbody tr:hover {
    background: rgba(201, 42, 42, 0.035);
}

.table-list .book-name {
    color: #251d19;
    font-weight: 700;
}

.table-list .book-update,
.table-list .book-author,
.table-list .book-count,
.table-list .book-status,
.table-list .book-category,
.table-list .book-date {
    white-space: nowrap;
}

.catalog-intro,
.list-item,
.rank-list li,
.history-item,
.recent-list li,
.chapter-list li,
.simple-list li,
.meta-strip li {
    border-bottom: 1px dashed var(--line);
}

.list-item,
.history-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 18px;
    padding: 18px 0;
}

.list-item-content,
.history-item-content {
    display: grid;
    gap: 10px;
}

.list-item-meta,
.meta-strip {
    display: flex;
    gap: 8px 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.meta-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(201, 42, 42, 0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.list-item-actions,
.history-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
}

.simple-list li,
.recent-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 11px 0;
}

.simple-list.compact li {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.simple-list.compact a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simple-list.compact li > span:last-child {
    white-space: nowrap;
}

.simple-list .index {
    color: var(--accent);
    font-weight: 800;
    min-width: 24px;
}

.rank-list li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
}

.rank-list li.featured {
    grid-template-columns: 28px minmax(0, 1fr) 76px;
    align-items: center;
}

.rank-list.rank-list-compact h3 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-highlight-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(201, 42, 42, 0.08), rgba(201, 42, 42, 0.02));
}

.rank-highlight-copy {
    display: grid;
    gap: 10px;
}

.rank-card-list {
    display: grid;
    gap: 14px;
}

.rank-card-item {
    display: grid;
    grid-template-columns: 44px 88px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}

.rank-card-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(201, 42, 42, 0.08);
    color: var(--accent);
    font: 700 18px/1 var(--font-serif);
}

.rank-card-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
}

.rank-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-card-body {
    display: grid;
    gap: 10px;
}

.rank-card-actions {
    display: flex;
    align-items: center;
}

.pager {
    justify-content: center;
    align-items: center;
}

.pager a,
.pager span {
    min-width: 42px;
    padding: 0 16px;
}

.rank-list .rank-num {
    font: 700 18px/1 var(--font-serif);
    color: var(--accent);
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumbs span {
    color: #b1a496;
}

.chapter-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 18px;
}

.chapter-list li {
    padding: 12px 0;
}

.chapter-list a {
    display: block;
}

.chapter-list.chapter-list-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
}

.chapter-list.chapter-list-catalog li {
    padding: 12px 0;
}

.chapter-list.chapter-list-catalog a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chapter-list.chapter-list-single {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.chapter-list.chapter-list-single li {
    padding: 0;
    border-bottom: 1px solid rgba(170, 146, 126, 0.2);
}

.chapter-list.chapter-list-single a {
    padding: 14px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chapter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.reader-shell {
    background: var(--reader-bg);
    color: var(--reader-text);
    border-radius: 22px;
    border: 1px solid rgba(127, 101, 82, 0.18);
    box-shadow: var(--shadow);
}

.reader-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(127, 101, 82, 0.15);
}

.reader-head h1 {
    margin: 0;
    font: 700 clamp(28px, 4vw, 38px)/1.15 var(--font-serif);
}

.reader-subtitle {
    color: rgba(61, 52, 45, 0.66);
    font-size: 13px;
}

.reader-body {
    padding: clamp(24px, 4vw, 48px);
    font-family: var(--reader-font);
    font-size: var(--reader-size, 22px);
    line-height: 2;
    letter-spacing: 0.02em;
}

.reader-body p {
    margin: 0 0 1.2em;
    text-indent: 2em;
}

.reader-footer {
    padding: 0 24px 24px;
}

.reader-sticky-actions {
    position: sticky;
    bottom: 12px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.reader-sticky-actions .reader-actions {
    pointer-events: auto;
    padding: 12px;
    border-radius: 18px;
    background: rgba(23, 21, 20, 0.88);
    box-shadow: var(--shadow);
}

.reader-sticky-actions .reader-actions a,
.reader-sticky-actions .reader-actions button {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.reader-recommend-strip {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    cursor: grab;
}

.reader-recommend-strip:active {
    cursor: grabbing;
}

.reader-recommend-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    width: max-content;
    min-width: 100%;
}

.reader-recommend-grid .novel-card {
    width: 132px;
    flex: 0 0 132px;
}

.reader-recommend-grid .novel-card h3,
.reader-recommend-grid .novel-card p {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-settings {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(calc(100% - 24px), 620px);
    background: #f6efdf;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(21, 16, 13, 0.28);
    z-index: 45;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.reader-settings.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.reader-settings header {
    padding: 22px 24px 14px;
    border-bottom: 1px solid rgba(117, 90, 68, 0.16);
}

.reader-settings h2 {
    margin: 0;
    font: 700 28px/1.15 var(--font-serif);
}

.settings-body {
    padding: 20px 24px 24px;
    display: grid;
    gap: 20px;
}

.settings-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.settings-item strong {
    color: var(--accent);
    padding-top: 6px;
}

.reader-note {
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--muted);
}

.history-empty,
.search-empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--muted);
}

.footer {
    margin-top: 40px;
    background: #1d1a19;
    color: rgba(255, 255, 255, 0.78);
    padding: 24px 0 34px;
}

.footer-links {
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-links nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-meta {
    padding-top: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.58);
}

.footer-brand {
    font: 700 20px/1 var(--font-serif);
    color: #fff;
}

.fade-up {
    animation: fadeUp 0.6s ease both;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-2 {
    animation-delay: 0.16s;
}

.delay-3 {
    animation-delay: 0.24s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .shelf-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-hero-layout,
    .channel-hero-layout,
    .rank-hero-layout,
    .rank-toolbar-layout,
    .channel-toolbar-layout,
    .hero-card .panel-inner,
    .split-panel,
    .editor-lead {
        grid-template-columns: 1fr;
    }

    .channel-filter-grid,
    .channel-recommend-grid,
    .rank-filter-grid,
    .channel-filter-toolbar,
    .channel-recommend-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chapter-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .site-header-inner {
        align-items: center;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .hero-grid,
    .content-grid,
    .detail-grid,
    .catalog-grid,
    .list-grid,
    .history-grid {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .main-nav a {
        white-space: nowrap;
    }

    .shelf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shelf-grid-featured,
    .channel-filter-grid,
    .channel-recommend-grid,
    .rank-filter-grid,
    .channel-filter-toolbar,
    .channel-recommend-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-hero-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .chapter-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .shelf-grid-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chapter-list.chapter-list-catalog {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .channel-filter-grid.channel-filter-toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .channel-filter-grid.rank-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .channel-filter-grid.channel-filter-toolbar a,
    .channel-filter-grid.rank-filter-grid a {
        justify-content: center;
        min-height: 42px;
        padding: 0 8px;
        font-size: 13px;
        text-align: center;
    }

    .channel-feature-panel {
        display: none;
    }

    .container {
        width: min(calc(100% - 20px), var(--container));
    }

    .topbar {
        display: none;
    }

    .topbar-inner,
    .site-header-inner,
    .footer-links,
    .footer-meta,
    .section-head,
    .chapter-toolbar,
    .reader-head,
    .topbar-links {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        min-width: 0;
    }

    .brand-note {
        display: none;
    }

    .brand-mark strong {
        font-size: 30px;
    }

    .header-actions {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: stretch;
        align-items: center;
        width: 100%;
    }

    .search-form {
        width: 100%;
        grid-column: 1 / -1;
    }

    .lang-switch {
        width: fit-content;
    }

    .menu-toggle {
        justify-self: end;
    }

    .main-nav {
        display: none;
    }

    .panel-inner {
        padding: 18px;
    }

    .section-head h1,
    .section-head h2,
    .section-head h3,
    .section-title,
    .reader-settings h2 {
        font-size: 24px;
    }

    .hero-title {
        font-size: 30px;
    }

    .home-hero-layout {
        gap: 18px;
    }

    .hero-copy-block,
    .hero-side-stack {
        align-content: start;
        max-width: none;
    }

    .hero-metrics,
    .book-meta,
    .rank-highlight-card {
        grid-template-columns: 1fr;
    }

    .shelf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-item,
    .history-item,
    .rank-card-item {
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
    }

    .list-item {
        grid-template-areas:
            "cover content"
            "cover actions";
        row-gap: 12px;
    }

    .list-item > .card-cover {
        grid-area: cover;
        align-self: start;
    }

    .list-item > .list-item-content {
        grid-area: content;
        align-self: start;
    }

    .list-item > .list-item-actions {
        grid-area: actions;
        grid-column: 2;
        justify-self: start;
        align-self: start;
        margin-top: -2px;
    }

    .rank-card-index {
        width: 38px;
        height: 38px;
    }

    .rank-card-item .rank-card-index {
        grid-column: 1;
        grid-row: 1;
    }

    .rank-card-item .rank-card-cover {
        grid-column: 1;
        grid-row: 1 / span 2;
        margin-top: 0;
        align-self: start;
    }

    .rank-card-item .rank-card-body {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    .rank-card-actions,
    .list-item-actions,
    .history-item-actions {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .rank-card-actions {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        margin-top: -2px;
    }

    .history-item-actions {
        grid-column: 1 / -1;
    }

    .channel-filter-grid,
    .channel-recommend-grid,
    .channel-recommend-grid-wide {
        grid-template-columns: 1fr;
    }

    .info-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .recent-update-table {
        display: table;
        width: 100%;
        table-layout: fixed;
        overflow-x: hidden;
        white-space: normal;
    }

    .recent-update-table th,
    .recent-update-table td {
        padding: 12px 6px;
    }

    .recent-update-table th:nth-child(2),
    .recent-update-table td:nth-child(2) {
        display: none;
    }

    .recent-update-table th:first-child,
    .recent-update-table td:first-child {
        width: calc(100% - 64px);
        padding-left: 0;
    }

    .recent-update-table th:last-child,
    .recent-update-table td:last-child {
        width: 64px;
        text-align: right;
        padding-right: 0;
        white-space: nowrap;
    }

    .chapter-list,
    .settings-item {
        grid-template-columns: 1fr;
    }

    .reader-body {
        padding: 22px 18px;
        --reader-size: 20px;
    }

    .reader-recommend-strip {
        overflow: visible;
        padding-bottom: 0;
        cursor: auto;
    }

    .reader-recommend-grid {
        display: grid;
        width: auto;
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .reader-recommend-grid .novel-card {
        width: auto;
        flex: initial;
    }

    .reader-recommend-grid .novel-card h3,
    .reader-recommend-grid .novel-card p {
        display: -webkit-box;
        white-space: normal;
        overflow: hidden;
        text-overflow: clip;
    }

    .reader-recommend-grid .novel-card h3 {
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .reader-recommend-grid .novel-card p {
        display: block;
    }
}

@media (max-width: 520px) {
    .page-main {
        padding-top: 18px;
    }

    .shelf-grid-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .channel-filter-grid.channel-filter-toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .channel-filter-grid.rank-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .channel-filter-grid.channel-filter-toolbar a,
    .channel-filter-grid.rank-filter-grid a {
        min-height: 40px;
        padding: 0 6px;
        font-size: 12px;
    }

    .shelf-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .header-actions {
        grid-template-columns: 1fr auto auto;
    }

    .novel-card h3,
    .table-list .book-name,
    .chapter-list a {
        font-size: 15px;
    }

    .reader-sticky-actions .reader-actions {
        width: 100%;
        justify-content: center;
    }

    .channel-filter-grid,
    .channel-recommend-grid,
    .channel-recommend-grid-wide {
        grid-template-columns: 1fr;
    }
}