/* 版权所有 (C) 2026 易界开发团队
   保留所有权利。

   该文件是 易界开发团队 的专有财产。
   未经 易界开发团队 事先明确书面许可，
   不得复制、分发或传输本文件的任何部分，无论以任何形式或任何方式，
   包括影印、录制或其他电子或机械方法。

   桌面端极简风格首页样式表。
*/

:root {
  --container-width: 1200px;
  --header-height: 72px;
  --page-bg: #f5f7f2;
  --section-bg: #fafbf8;
  --surface-muted: #eef2eb;
  --surface-hover: #e8ede4;
  --surface-soft: #dce5d6;
  --line-color: rgba(74, 124, 89, 0.1);
  --line-strong: rgba(74, 124, 89, 0.18);
  --text-primary: #2d3a2e;
  --text-secondary: #4a5d4c;
  --text-muted: #7a8d7c;
  --accent-color: #4a7c59;
  --accent-alt: #6b8e23;
  --accent-light: #8fbc8f;
  --shadow-soft: 0 4px 20px rgba(74, 124, 89, 0.06);
  --shadow-hover: 0 12px 32px rgba(74, 124, 89, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 80px;
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;
  --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

button,
input {
  font: inherit;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(245, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(74, 124, 89, 0.08);
  box-shadow: 0 2px 10px rgba(74, 124, 89, 0.04);
  transition: var(--transition-base);
}

.header-content,
.main-content,
.footer-content {
  width: 100%;
  max-width: calc(var(--container-width) + 64px);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.header-content {
  height: 100%;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  background: transparent;
}

.menu-toggle img,
.search-button img {
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--text-primary);
  font-size: var(--font-sm);
  font-weight: 600;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-color);
}

.search-form {
  justify-self: end;
  width: 100%;
  max-width: 360px;
}

.search-field {
  position: relative;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 46px 0 20px;
  border: 1px solid rgba(74, 124, 89, 0.15);
  border-radius: 20px;
  background: var(--surface-muted);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-base);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  background: var(--page-bg);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.12);
}

.search-button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
}

.search-button:hover {
  background: rgba(74, 124, 89, 0.1);
}

.user-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.action-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.action-link:hover {
  color: var(--text-primary);
}

.action-link--primary {
  min-width: 80px;
  height: 38px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
}

.action-link--primary:hover {
  background: #3d6b4a;
  border-color: #3d6b4a;
  color: #ffffff;
}

.main-content {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 88px;
}

.page-section + .page-section {
  margin-top: var(--spacing-3xl);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: stretch;
}

.hero-grid--single {
  grid-template-columns: 1fr;
}

.hero-card,
.feature-panel,
.list-panel,
.updates-panel {
  background: transparent;
}

.hero-card {
  padding: 0;
}

.hero-carousel {
  position: relative;
}

.hero-slides {
  position: relative;
  min-height: 1px;
}

.hero-slide {
  display: none;
  animation: heroFade 0.4s ease;
}

.hero-slide.is-active {
  display: block;
}

.hero-link {
  display: block;
  transition: var(--transition-base);
}

.hero-link:hover {
  transform: translateY(-2px);
}

.hero-cover-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-muted);
  box-shadow: 0 10px 30px rgba(74, 124, 89, 0.12);
  position: relative;
}

.hero-cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(74, 124, 89, 0.08);
  pointer-events: none;
}

.hero-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  padding-top: 18px;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.hero-heading-row {
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.hero-meta {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.hero-summary {
  margin-top: 14px;
  max-width: 52em;
  font-size: var(--font-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  overflow: hidden;
  height: calc(1.7em * 3);
}

.hero-dots {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 22px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(74, 124, 89, 0.2);
  cursor: pointer;
  transition: var(--transition-base);
}

.hero-dot:hover,
.hero-dot.is-active {
  background: var(--accent-color);
}

@keyframes heroFade {
  from {
    opacity: 0.45;
  }

  to {
    opacity: 1;
  }
}

.curation-panel {
  height: 100%;
  padding: 32px;
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: var(--page-bg);
  box-shadow: 0 4px 20px rgba(74, 124, 89, 0.04);
}

.panel-title-row,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.panel-title,
.section-title {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.panel-subtitle,
.section-subtitle {
  margin-top: 8px;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.curation-list {
  list-style: none;
  margin-top: 26px;
}

.curation-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-color);
}

.curation-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.curation-rank,
.panel-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.curation-rank.is-top-1,
.panel-rank.is-top-1 {
  color: #ffffff;
  background: #2e7d32;
}

.curation-rank.is-top-2,
.panel-rank.is-top-2 {
  color: #ffffff;
  background: #388e3c;
}

.curation-rank.is-top-3,
.panel-rank.is-top-3 {
  color: #ffffff;
  background: #43a047;
}

.curation-link,
.panel-link,
.update-title,
.book-card-link {
  color: var(--text-primary);
}

.curation-link:hover,
.panel-link:hover,
.update-title:hover,
.footer-links a:hover {
  color: var(--accent-color);
}

.curation-link {
  display: inline-block;
  font-size: var(--font-lg);
  font-weight: 500;
  line-height: 1.35;
}

.curation-meta,
.panel-meta {
  margin-top: 6px;
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.category-strip {
  display: flex;
  align-items: center;
  gap: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-tag {
  flex-shrink: 0;
  position: relative;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition-base);
}

.category-tag::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transition: var(--transition-base);
}

.category-tag:hover,
.category-tag.active {
  color: var(--text-primary);
}

.category-tag:hover::after,
.category-tag.active::after {
  background: var(--accent-color);
}

.section-heading {
  margin-bottom: 24px;
}

.section-link {
  min-width: 118px;
  height: 40px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.section-link:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--page-bg);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 24px;
}

.book-card {
  border-radius: 12px;
  transition: var(--transition-base);
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-card-link {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  height: 100%;
}

.book-card:hover .book-card-link {
  background: var(--surface-hover);
  box-shadow: 0 8px 24px rgba(74, 124, 89, 0.08);
}

.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.08);
}

.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(74, 124, 89, 0.08);
  pointer-events: none;
}

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

.book-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 58, 46, 0.5);
  opacity: 0;
  transition: var(--transition-base);
  backdrop-filter: blur(2px);
}

.book-card:hover .book-overlay {
  opacity: 1;
}

.book-action {
  min-width: 96px;
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: 4px;
  background: rgba(250, 251, 248, 0.95);
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.15);
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.book-card:hover .book-action {
  transform: translateY(0);
}

.book-content {
  padding: 14px 2px 2px;
  text-align: left;
}

.book-title {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  max-height: calc(1.3em * 2);
}

.book-author {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.book-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow: hidden;
  max-height: calc(1.5em * 2);
  min-height: 39px;
}

.friend-links-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: center;
}

.friend-link-item {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
  transition: var(--transition-base);
}

.friend-link-item:hover {
  color: var(--accent-color);
}

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

.list-panel {
  padding: 32px;
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: var(--page-bg);
  box-shadow: 0 4px 20px rgba(74, 124, 89, 0.04);
}

.panel-list {
  list-style: none;
  margin-top: 24px;
}

.panel-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-color);
}

.panel-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.panel-link {
  font-size: var(--font-lg);
  font-weight: 500;
  line-height: 1.35;
}

.updates-panel {
  padding: 40px;
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: var(--page-bg);
  box-shadow: 0 4px 20px rgba(74, 124, 89, 0.04);
}

.update-list {
  list-style: none;
}

.update-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1.1fr) minmax(0, 0.9fr) 156px;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-color);
}

.update-item:last-child {
  border-bottom: none;
}

.update-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-light);
}

.update-title,
.update-chapter {
  font-size: var(--font-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-title {
  font-weight: 500;
}

.update-chapter,
.update-time {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.update-time {
  width: 156px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.footer {
  margin-top: auto;
  background: var(--surface-muted);
  border-top: 1px solid var(--line-color);
}

.footer-content {
  padding-top: 32px;
  padding-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links a,
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-copy {
  text-align: center;
}

/* -------------------------------------
   详情页 (View) 样式
------------------------------------- */

.book-detail-hero {
  padding: var(--spacing-3xl) 0;
  background: var(--page-bg);
  border-bottom: 1px solid var(--line-color);
}

.book-detail-grid {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: var(--spacing-2xl);
  align-items: start;
}

.book-detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  position: relative;
}

.book-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(74, 124, 89, 0.1);
  border-radius: var(--radius-md);
  pointer-events: none;
}

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

.book-detail-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-detail-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.book-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-lg);
}

.tag-badge {
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid rgba(74, 124, 89, 0.25);
  color: var(--text-secondary);
}

.tag-badge.vip {
  color: #2e7d32;
  border-color: #a5d6a7;
  background: #e8f5e9;
}

.tag-badge.status {
  color: var(--accent-color);
  border-color: rgba(74, 124, 89, 0.25);
  background: rgba(74, 124, 89, 0.08);
}

.book-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px dashed var(--line-color);
}

.book-detail-meta span {
  display: inline-flex;
  align-items: center;
}

.book-detail-meta strong {
  color: var(--text-primary);
  font-weight: 500;
  margin-left: 4px;
}

.book-detail-intro {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
  white-space: pre-wrap;
}

.book-detail-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: auto;
}

.btn-read,
.btn-outline {
  height: 44px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-read {
  background: var(--accent-color);
  color: #ffffff;
  border: 1px solid var(--accent-color);
}

.btn-read:hover {
  background: #3d6b4a;
  border-color: #3d6b4a;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(74, 124, 89, 0.3);
}

.btn-outline:hover {
  background: var(--surface-muted);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.book-detail-side {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.side-data-block {
  margin-bottom: var(--spacing-xl);
}

.side-data-block:last-child {
  margin-bottom: 0;
}

.side-data-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.side-data-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.side-data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.side-data-label {
  color: var(--text-muted);
}

.side-data-value {
  color: var(--text-primary);
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.side-score {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 4px;
}

.side-score-text {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-section {
  padding: var(--spacing-3xl) 0;
}

.detail-section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-xl);
  color: var(--text-primary);
}

.chapter-update-card {
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
  border: 1px solid var(--line-color);
}

.chapter-update-info h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.chapter-update-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.chapter-update-time {
  min-width: 240px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

.chapter-update-count {
  color: #dd2f31;
  margin-top: 4px;
  display: inline-block;
}

.chapter-page-hero {
  padding: var(--spacing-3xl) 0;
  background: var(--page-bg);
}

.chapter-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-2xl);
  align-items: start;
}

.chapter-book-card {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  padding: 24px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  background: var(--section-bg);
  box-shadow: var(--shadow-soft);
}

.chapter-book-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
}

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

.chapter-book-title {
  margin-top: 18px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
}

.chapter-book-author {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.chapter-book-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chapter-book-stats {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-color);
  display: grid;
  gap: 12px;
}

.chapter-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.chapter-stat-label {
  color: var(--text-muted);
}

.chapter-stat-value {
  color: var(--text-primary);
  font-weight: 600;
}

.chapter-book-link {
  margin-top: 24px;
  width: 100%;
  text-decoration: none;
}

.chapter-main {
  min-width: 0;
}

.chapter-main-header {
  margin-bottom: 24px;
}

.chapter-main-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.chapter-volume-list {
  display: grid;
  gap: 24px;
}

.chapter-volume-card {
  padding: 24px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  background: var(--section-bg);
  box-shadow: var(--shadow-soft);
}

.chapter-volume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.chapter-volume-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.chapter-volume-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.chapter-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.chapter-link-item {
  padding: 14px 16px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-base);
}

.chapter-link-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.chapter-link-title {
  min-width: 0;
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-link-words {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.chapter-empty {
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-muted);
}

.library-page {
  padding: 32px 0 72px;
}

.library-hero-card,
.library-filter-panel,
.library-sort-panel,
.library-main-panel {
  border: 1px solid var(--line-color);
  border-radius: var(--radius-xl);
  background: var(--section-bg);
  box-shadow: var(--shadow-soft);
}

.library-hero-card {
  padding: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.library-hero-kicker {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.library-hero-title {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.2;
}

.library-hero-summary {
  margin-top: 16px;
  max-width: 760px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.library-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.library-hero-pill {
  padding: 10px 14px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface-muted);
}

.library-filter-panel,
.library-sort-panel,
.library-main-panel {
  margin-top: 24px;
  padding: 28px 30px;
}

.library-filter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.library-filter-title,
.library-main-title {
  font-size: 24px;
  line-height: 1.3;
}

.library-filter-subtitle,
.library-main-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.library-filter-grid {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.library-filter-row,
.library-sort-group {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
}

.library-filter-label {
  padding-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.library-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.library-filter-stack {
  display: grid;
  gap: 12px;
}

.library-filter-options-collapsible .is-collapsed-tag {
  display: none;
}

.library-filter-options-collapsible[data-expanded="true"] .is-collapsed-tag {
  display: inline-flex;
}

.library-filter-chip {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-muted);
  transition: var(--transition-base);
}

.library-filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.library-filter-chip.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.library-filter-toggle {
  width: fit-content;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
}

.library-filter-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.library-sort-panel {
  display: grid;
  gap: 16px;
}

.library-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.library-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.library-main-panel-full {
  margin-top: 24px;
}

.library-result-list {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.library-result-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.library-result-cover {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f0ede7;
  aspect-ratio: 3 / 4;
}

.library-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-result-body {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.library-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.library-result-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.library-result-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ece5d8;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.library-result-title-row h3 {
  font-size: 22px;
  line-height: 1.3;
}

.library-result-title-row a {
  color: var(--text-primary);
  text-decoration: none;
}

.library-result-meta,
.library-result-meta a,
.library-result-meta-right {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
}

.library-result-meta {
  margin-top: 8px;
}

.library-result-stat {
  min-width: 86px;
  padding: 10px 12px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  text-align: center;
}

.library-result-stat span {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.library-result-stat small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}

.library-result-summary {
  color: var(--text-secondary);
  line-height: 1.9;
}

.library-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-color);
}

.library-result-update {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.library-result-update-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.library-result-update a {
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-table-wrap {
  margin-top: 24px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.library-table-head,
.library-table-row {
  display: grid;
  grid-template-columns: 70px 90px minmax(0, 1.8fr) 120px 120px 140px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
}

.library-table-head {
  background: #f6f3ee;
  color: var(--text-secondary);
  font-size: 13px;
}

.library-table-row {
  border-top: 1px solid var(--line-color);
  color: var(--text-secondary);
  background: #ffffff;
}

.library-table-row .is-title {
  display: grid;
  gap: 6px;
}

.library-table-row .is-title a {
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-pagination {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.library-pagination a,
.library-pagination-total {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  background: var(--surface-muted);
  text-decoration: none;
}

.library-pagination a.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.library-empty {
  margin-top: 24px;
  padding: 54px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  background: var(--surface-muted);
}

.top-page {
  padding: 32px 0 72px;
}

.top-hero-card,
.top-sidebar-card,
.top-rank-card,
.top-detail-card {
  border: 1px solid var(--line-color);
  border-radius: var(--radius-xl);
  background: var(--section-bg);
  box-shadow: var(--shadow-soft);
}

.top-hero-card {
  padding: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.top-hero-kicker,
.top-detail-kicker,
.top-rank-kicker {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.top-hero-title {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.2;
}

.top-hero-summary {
  margin-top: 16px;
  max-width: 760px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.top-hero-meta,
.top-detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.top-hero-pill,
.top-detail-meta-pill {
  padding: 10px 14px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface-muted);
}

.top-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.top-sidebar {
  display: grid;
  gap: 18px;
}

.top-sidebar-card {
  padding: 24px;
}

.top-sidebar-head {
  display: grid;
  gap: 8px;
}

.top-sidebar-title,
.top-detail-title,
.top-rank-title {
  font-size: 24px;
  line-height: 1.3;
  color: var(--text-primary);
}

.top-sidebar-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.top-sidebar-links {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.top-sidebar-link {
  padding: 12px 14px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-muted);
  transition: var(--transition-base);
}

.top-sidebar-link:hover {
  color: var(--text-primary);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.top-sidebar-link.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.top-content {
  min-width: 0;
}

.top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.top-rank-card,
.top-detail-card {
  padding: 26px;
}

.top-rank-head,
.top-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.top-rank-head-static {
  align-items: center;
}

.top-rank-tabs,
.top-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-rank-tab,
.top-detail-tab,
.top-rank-refresh,
.top-rank-more {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--surface-muted);
  text-decoration: none;
  transition: var(--transition-base);
}

.top-rank-tab {
  cursor: pointer;
}

.top-rank-tab:hover,
.top-detail-tab:hover,
.top-rank-more:hover {
  color: var(--text-primary);
  border-color: var(--line-strong);
}

.top-rank-tab.is-active,
.top-detail-tab.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.top-rank-panel {
  display: none;
}

.top-rank-panel.is-active {
  display: block;
}

.top-rank-feature {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  text-decoration: none;
}

.top-rank-feature-cover {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f0ede7;
  aspect-ratio: 3 / 4;
}

.top-rank-feature-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-rank-feature-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.top-rank-feature-mark {
  color: var(--text-muted);
  font-size: 12px;
}

.top-rank-feature-title {
  font-size: 20px;
  line-height: 1.35;
  color: var(--text-primary);
}

.top-rank-feature-meta {
  color: var(--text-muted);
  font-size: 13px;
}

.top-rank-feature-summary {
  color: var(--text-secondary);
  line-height: 1.75;
  max-height: calc(1.75em * 3);
  overflow: hidden;
}

.top-rank-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.top-rank-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
}

.top-rank-item-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.top-rank-item-body strong {
  color: var(--text-primary);
  line-height: 1.45;
}

.top-rank-item-body span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.top-rank-more {
  margin-top: 18px;
}

.top-detail-card {
  display: grid;
  gap: 20px;
}

.top-detail-title-wrap {
  display: grid;
  gap: 10px;
}

.top-detail-toolbar {
  padding-top: 4px;
  border-top: 1px solid var(--line-color);
}

.top-detail-toolbar-sub {
  margin-top: -8px;
}

.top-table-wrap {
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.top-table-head,
.top-table-row {
  display: grid;
  grid-template-columns: 72px 110px minmax(0, 1.3fr) minmax(0, 1.5fr) 110px 130px;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.top-table-head {
  background: #f6f3ee;
  color: var(--text-secondary);
  font-size: 13px;
}

.top-table-row {
  border-top: 1px solid var(--line-color);
  color: var(--text-secondary);
  background: #ffffff;
}

.top-table-link,
.top-table-title a,
.top-table-chapter a {
  color: var(--text-primary);
  text-decoration: none;
}

.top-table-title,
.top-table-chapter {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.top-table-title a,
.top-table-chapter a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-table-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-table-tags em {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-style: normal;
}


.read-page-hero {
  --reader-page-bg: #f7f3ea;
  --reader-panel-bg: rgba(255, 252, 246, 0.9);
  --reader-content-bg: rgba(255, 251, 242, 0.96);
  --reader-text-color: #2f261b;
  --reader-muted-color: #746758;
  --reader-border-color: rgba(95, 74, 48, 0.12);
  --reader-shadow: 0 22px 60px rgba(66, 46, 18, 0.08);
  --reader-accent: #231f1a;
  --reader-font-size: 18px;
  --reader-line-height: 2.1;
  --read-flip-width: 760px;
  --read-flip-height: 68vh;
  padding-top: var(--spacing-3xl);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.8), transparent 42%), var(--reader-page-bg);
  transition: background 0.25s ease, color 0.25s ease;
}

.read-page-hero[data-reader-bg="paper"] {
  --reader-page-bg: #f7f3ea;
  --reader-panel-bg: rgba(255, 252, 246, 0.92);
  --reader-content-bg: rgba(255, 251, 242, 0.97);
  --reader-text-color: #2f261b;
  --reader-muted-color: #746758;
  --reader-border-color: rgba(95, 74, 48, 0.12);
  --reader-shadow: 0 22px 60px rgba(66, 46, 18, 0.08);
}

.read-page-hero[data-reader-bg="sepia"] {
  --reader-page-bg: #efe2c7;
  --reader-panel-bg: rgba(251, 241, 221, 0.9);
  --reader-content-bg: rgba(247, 236, 212, 0.96);
  --reader-text-color: #43362a;
  --reader-muted-color: #7f6b55;
  --reader-border-color: rgba(104, 78, 38, 0.16);
  --reader-shadow: 0 24px 60px rgba(98, 73, 38, 0.1);
}

.read-page-hero[data-reader-bg="green"] {
  --reader-page-bg: #dcebd9;
  --reader-panel-bg: rgba(238, 247, 235, 0.92);
  --reader-content-bg: rgba(233, 244, 228, 0.97);
  --reader-text-color: #213128;
  --reader-muted-color: #5f7767;
  --reader-border-color: rgba(73, 113, 85, 0.14);
  --reader-shadow: 0 24px 60px rgba(44, 90, 62, 0.08);
}

.read-page-hero[data-reader-bg="book"] {
  --reader-page-bg: #e9dcc2;
  --reader-panel-bg: rgba(248, 239, 220, 0.9);
  --reader-content-bg: rgba(244, 233, 209, 0.96);
  --reader-text-color: #382b1c;
  --reader-muted-color: #7a6549;
  --reader-border-color: rgba(109, 79, 35, 0.16);
  --reader-shadow: 0 26px 62px rgba(104, 72, 28, 0.1);
}

.read-page-hero[data-reader-theme="night"] {
  --reader-page-bg: #11161d;
  --reader-panel-bg: rgba(21, 28, 38, 0.92);
  --reader-content-bg: rgba(16, 22, 31, 0.96);
  --reader-text-color: #d6deea;
  --reader-muted-color: #8c97ab;
  --reader-border-color: rgba(157, 174, 199, 0.12);
  --reader-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --reader-accent: #f2f5fb;
}

.read-page-hero .chapter-book-card,
.read-page-hero .read-content-card,
.read-page-hero .read-settings-card {
  border-color: var(--reader-border-color);
  background: var(--reader-panel-bg);
  box-shadow: var(--reader-shadow);
}

.read-page-hero .chapter-book-title,
.read-page-hero .chapter-stat-value,
.read-page-hero .read-content,
.read-page-hero .read-status-pill,
.read-page-hero .read-setting-value {
  color: var(--reader-text-color);
}

.read-page-hero .chapter-book-author,
.read-page-hero .chapter-stat-label,
.read-page-hero .read-settings-label,
.read-page-hero .reader-overlay-book {
  color: var(--reader-muted-color);
}

.read-page-hero .chapter-book-stats {
  border-top-color: var(--reader-border-color);
}

.read-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  justify-items: stretch;
}

.read-main {
  display: grid;
  gap: 24px;
  width: min(100%, 980px);
}

.read-resume-link {
  border-style: dashed;
}

.read-content-card {
  padding: 28px;
  border: 1px solid var(--reader-border-color);
  border-radius: var(--radius-lg);
}

.read-status-pill {
  padding: 8px 12px;
  border: 1px solid var(--reader-border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.read-settings-card {
  margin-top: 24px;
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--reader-border-color);
  border-radius: var(--radius-lg);
}

.read-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.read-settings-label {
  min-width: 72px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.read-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.read-setting-chip {
  min-width: 60px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--reader-border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--reader-text-color);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-base);
}

.read-setting-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.3);
}

.read-setting-chip.is-active {
  background: var(--reader-accent);
  border-color: var(--reader-accent);
  color: #ffffff;
}

.read-page-hero[data-reader-theme="night"] .read-setting-chip.is-active {
  color: #11161d;
}

.read-setting-value {
  min-width: 56px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.read-content-card {
  position: relative;
  background: var(--reader-content-bg);
}

.read-content-card.is-empty {
  padding: 28px;
}

.read-content-viewport {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
}

.read-content {
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  white-space: pre-wrap;
  word-break: break-word;
  text-indent: 2em;
}

.read-page-hero[data-reader-mode="flip"] .read-content-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  height: var(--read-flip-height);
}

.read-page-hero[data-reader-mode="flip"] .read-content-viewport::-webkit-scrollbar {
  display: none;
}

.read-page-hero[data-reader-mode="flip"] .read-content {
  height: var(--read-flip-height);
  column-width: var(--read-flip-width);
  column-gap: 48px;
}

.read-page-hero[data-reader-mode="scroll"] .read-content {
  min-height: 360px;
}

.read-flip-zones {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.read-page-hero[data-reader-mode="flip"] .read-flip-zones {
  display: flex;
}

.read-flip-zone {
  flex: 1;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.read-flip-zone.prev:hover {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 75%);
}

.read-flip-zone.next:hover {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.08), transparent 75%);
}

.reader-sidebar {
  width: 280px;
}

.reader-header-card,
.reader-footer-card {
  padding: 18px 20px;
  border: 1px solid var(--reader-border-color);
  border-radius: 22px;
  background: color-mix(in srgb, var(--reader-panel-bg) 88%, rgba(255, 255, 255, 0.12));
  box-shadow: var(--reader-shadow);
  backdrop-filter: blur(18px);
}

.reader-header-card {
  display: grid;
  gap: 14px;
}

.reader-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.reader-header-aside {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.reader-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.reader-overlay-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.reader-overlay-book {
  font-size: 13px;
  color: var(--reader-muted-color);
}

.reader-overlay-chapter {
  min-width: 0;
  font-size: 18px;
  color: var(--reader-text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--reader-border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--reader-content-bg) 92%, rgba(255, 255, 255, 0.08));
  box-shadow: var(--reader-shadow);
  backdrop-filter: blur(18px);
}

.reader-toolbar-inline {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.reader-icon-button,
.reader-mini-button,
.reader-drawer-close {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--reader-border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--reader-text-color);
  cursor: pointer;
  transition: var(--transition-base);
}

.reader-icon-button:hover,
.reader-mini-button:hover,
.reader-drawer-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.3);
}

.reader-overlay-sub {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reader-overlay-meta-grid {
  margin-top: 0;
  padding-top: 2px;
}

.reader-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: end;
}

.reader-progress-panel {
  display: grid;
  gap: 12px;
}

.reader-bottom-progress {
  min-width: 0;
}

.reader-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--reader-text-color);
  font-size: 14px;
}

#readerProgressTarget {
  color: var(--reader-muted-color);
  font-size: 13px;
}

#readerProgressRange {
  width: 100%;
  accent-color: var(--reader-accent);
}

.reader-bottom-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reader-bottom-nav-group {
  align-self: stretch;
}

.reader-bottom-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--reader-border-color);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--reader-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-base);
}

.reader-bottom-button:hover {
  transform: translateY(-1px);
}

.reader-bottom-primary {
  background: var(--reader-accent);
  border-color: var(--reader-accent);
  color: #ffffff;
}

.read-page-hero[data-reader-theme="night"] .reader-bottom-primary,
.read-page-hero[data-reader-theme="night"] .read-setting-chip.is-active {
  color: #11161d;
}

.reader-bottom-button.is-disabled {
  pointer-events: none;
  opacity: 0.56;
}

.reader-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 65;
  width: min(420px, 92vw);
  height: 100vh;
  padding: 24px;
  border-left: 1px solid var(--reader-border-color);
  background: color-mix(in srgb, var(--reader-content-bg) 95%, rgba(255, 255, 255, 0.08));
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.16);
  transform: translateX(105%);
  transition: transform 0.26s ease;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.reader-drawer.is-open {
  transform: translateX(0);
}

.reader-drawer-head,
.reader-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reader-drawer-tabs {
  display: flex;
  gap: 10px;
}

.reader-drawer-tab {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--reader-border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--reader-text-color);
  cursor: pointer;
}

.reader-drawer-tab.is-active {
  background: var(--reader-accent);
  border-color: var(--reader-accent);
  color: #ffffff;
}

.read-page-hero[data-reader-theme="night"] .reader-drawer-tab.is-active {
  color: #11161d;
}

.reader-drawer-body {
  min-height: 0;
  margin-top: 18px;
}

.reader-drawer-panel {
  display: none;
  height: 100%;
}

.reader-drawer-panel.is-active {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.reader-catalog-summary,
.reader-bookmark-head {
  padding: 14px 16px;
  border: 1px solid var(--reader-border-color);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--reader-text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.reader-catalog-summary p {
  margin-top: 6px;
  color: var(--reader-muted-color);
  font-size: 13px;
}

.reader-catalog-list,
.reader-bookmark-list {
  overflow: auto;
  display: grid;
  gap: 16px;
  padding-right: 4px;
}

.reader-catalog-volume {
  display: grid;
  gap: 12px;
}

.reader-catalog-volume-title {
  font-size: 16px;
  color: var(--reader-text-color);
}

.reader-catalog-links {
  display: grid;
  gap: 8px;
}

.reader-catalog-link,
.reader-bookmark-item {
  padding: 12px 14px;
  border: 1px solid var(--reader-border-color);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--reader-text-color);
  text-decoration: none;
  display: grid;
  gap: 6px;
  transition: var(--transition-base);
}

.reader-catalog-link:hover,
.reader-bookmark-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.reader-catalog-link.is-current {
  border-color: var(--reader-accent);
  box-shadow: inset 0 0 0 1px var(--reader-accent);
}

.reader-catalog-link-title,
.reader-bookmark-item strong {
  color: var(--reader-text-color);
  font-size: 14px;
}

.reader-catalog-link-meta,
.reader-bookmark-item span {
  color: var(--reader-muted-color);
  font-size: 12px;
}

.reader-settings-sheet {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 66;
  width: min(720px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--reader-border-color);
  border-radius: 24px;
  background: color-mix(in srgb, var(--reader-content-bg) 96%, rgba(255, 255, 255, 0.06));
  box-shadow: var(--reader-shadow);
  transform: translateX(-50%) translateY(calc(100% + 40px));
  transition: transform 0.26s ease;
}

.reader-settings-sheet.is-open {
  transform: translateX(-50%) translateY(0);
}

.reader-settings-head {
  margin-bottom: 14px;
  color: var(--reader-text-color);
}

.reader-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.reader-mask.is-active {
  opacity: 1;
  visibility: visible;
}

.reader-empty {
  border-color: var(--reader-border-color);
  color: var(--reader-text-color);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 960px) {
  .book-detail-grid {
    grid-template-columns: 200px 1fr;
  }

  .chapter-layout {
    grid-template-columns: 1fr;
  }

  .chapter-book-card {
    position: static;
  }

  .chapter-link-grid {
    grid-template-columns: 1fr;
  }

  .read-layout,
  .reader-page-body.reader-ui-visible .read-layout {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .read-main {
    width: 100%;
  }

  .reader-bottom-actions {
    grid-template-columns: 1fr;
  }

  .reader-bottom-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .reader-header-main,
  .reader-progress-head,
  .reader-catalog-summary,
  .reader-bookmark-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-header-aside,
  .reader-header-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .reader-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .read-settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .read-settings-options {
    justify-content: flex-start;
  }

  .book-detail-side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .book-detail-grid {
    grid-template-columns: 140px 1fr;
  }

  .chapter-book-title {
    font-size: 22px;
  }

  .chapter-volume-card,
  .chapter-book-card {
    padding: 18px;
  }

  .book-detail-title {
    font-size: 24px;
  }
  .book-detail-side {
    grid-template-columns: 1fr;
  }
  .book-detail-actions {
    flex-direction: column;
  }
  .btn-read, .btn-outline {
    width: 100%;
  }
  .chapter-update-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  .chapter-update-time {
    text-align: left;
  }
  .read-content-card {
    padding: 20px;
  }

  .read-content-card.is-empty {
    padding: 20px;
  }

  .reader-drawer {
    width: 100vw;
    padding: 18px;
  }

  .reader-settings-sheet {
    width: calc(100vw - 20px);
    padding: 18px;
  }

  .read-content {
    font-size: 16px;
    line-height: 1.95;
    text-indent: 2em;
  }

}

.skeleton {
  background: linear-gradient(90deg, #f3f3f3 25%, #ececec 50%, #f3f3f3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1180px) {
  .header-content,
  .main-content,
  .footer-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header-content {
    grid-template-columns: auto auto minmax(220px, 1fr) auto;
    gap: 20px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

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

  .top-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 960px) {
  .header {
    height: auto;
  }

  .header-content {
    grid-template-columns: auto auto 1fr auto;
    row-gap: 14px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .search-form {
    grid-column: 1 / -1;
    max-width: none;
  }

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

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .update-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .update-chapter,
  .update-time {
    margin-left: 28px;
  }

  .update-time {
    text-align: left;
  }

  .library-hero-card,
  .library-filter-head,
  .library-result-header,
  .library-result-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .library-filter-row,
  .library-sort-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .library-filter-label {
    padding-top: 0;
  }

  .library-table-head,
  .library-table-row {
    grid-template-columns: 56px 78px minmax(0, 1.6fr) 100px 100px 110px;
    gap: 10px;
    font-size: 13px;
  }

  .top-hero-card,
  .top-rank-head,
  .top-detail-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-grid {
    grid-template-columns: 1fr;
  }

  .top-table-head,
  .top-table-row {
    grid-template-columns: 60px 88px minmax(0, 1.2fr) minmax(0, 1.3fr) 96px 110px;
    gap: 10px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .header-content,
  .main-content,
  .footer-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .user-actions .action-link {
    display: none;
  }

  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .hero-title {
    font-size: 26px;
  }

  .curation-panel,
  .list-panel,
  .updates-panel {
    padding: 22px 18px;
  }

  .section-heading,
  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-page {
    padding: 20px 0 48px;
  }

  .library-hero-card,
  .library-filter-panel,
  .library-sort-panel,
  .library-main-panel {
    padding: 22px 18px;
  }

  .library-hero-title {
    font-size: 28px;
  }

  .library-result-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .library-result-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .library-result-title-row h3 {
    font-size: 18px;
  }

  .library-table-wrap {
    overflow-x: auto;
  }

  .library-table-head,
  .library-table-row {
    width: 760px;
  }

  .top-page {
    padding: 20px 0 48px;
  }

  .top-hero-card,
  .top-sidebar-card,
  .top-rank-card,
  .top-detail-card {
    padding: 22px 18px;
  }

  .top-hero-title {
    font-size: 28px;
  }

  .top-rank-feature {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .top-table-wrap {
    overflow-x: auto;
  }

  .top-table-head,
  .top-table-row {
    width: 860px;
  }
}
