/* ==========================================================
   里番 · 全站样式表
   设计方向：会员中心风 / 深蓝白灰 + 橙色强调
   ========================================================== */

/* ==========================================================
   Base / Reset
   ========================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #1e2a3a;
  background-color: #f7f8fc;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #3b6ea5;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: #1e2a3a;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #1e2a3a;
}

/* ==========================================================
   Layout / 全站骨架
   ========================================================== */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f7f8fc;
}

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #d8dee9;
  width: 100%;
}

.header-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #1e2a3a;
  letter-spacing: 0.5px;
}

.brand:hover {
  color: #1e2a3a;
}

.brand-name {
  font-weight: 700;
}

.brand-name::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 22px;
  background-color: #f5a623;
  margin-right: 8px;
  vertical-align: -3px;
  border-radius: 2px;
}

.site-main {
  flex: 1;
  width: 100%;
}

.inner-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
}

.site-footer {
  background-color: #1e2a3a;
  color: #d8dee9;
  padding: 40px 0 20px;
  width: 100%;
}

.footer-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.footer-desc {
  font-size: 14px;
  color: #b0bccd;
  max-width: 560px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 6px 0;
}

.footer-nav a {
  color: #b0bccd;
  font-size: 14px;
}

.footer-nav a:hover {
  color: #f5a623;
}

.footer-copyright {
  font-size: 13px;
  color: #7d8aa0;
  border-top: 1px solid rgba(216, 222, 233, 0.15);
  padding-top: 14px;
  margin-top: 6px;
}

/* 导航 */
.site-nav {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-list a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  color: #4a5568;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list a:hover {
  background-color: #f0f3f8;
  color: #1e2a3a;
}

.nav-list a.is-current {
  color: #1e2a3a;
  font-weight: 700;
  background-color: #eef2f7;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #1e2a3a;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #7d8aa0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #3b6ea5;
}

.breadcrumb a:hover {
  color: #1e2a3a;
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #b0bccd;
}

.breadcrumb-current {
  color: #4a5568;
}

/* 页面标题区 */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 8px;
}

.page-description {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.7;
  max-width: 780px;
}

.page-description a {
  color: #3b6ea5;
  text-decoration: underline;
}

/* 通用区块标题 */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 6px;
}

.section-sub {
  font-size: 15px;
  color: #7d8aa0;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ==========================================================
   Components / 通用组件
   ========================================================== */

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 999px;
  background-color: #eef2f7;
  color: #3b6ea5;
  white-space: nowrap;
}

.tag-status {
  background-color: #fff3e0;
  color: #b26a00;
}

.tag-small {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 4px;
  background-color: #eef2f7;
  color: #3b6ea5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* 更多链接 */
.more-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #3b6ea5;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.more-link:hover {
  color: #1e2a3a;
  border-bottom-color: #f5a623;
}

/* 侧栏通用 */
.sidebar-left {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.sidebar-left > aside {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  position: relative;
}

.sidebar-left > div {
  flex: 1;
  min-width: 0;
}

/* ==========================================================
   Components / 首页模块
   ========================================================== */

.home-main {
  width: 100%;
}

.home-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.home-intro-panel {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px 18px;
  position: relative;
  align-self: flex-start;
}

.intro-sticky {
  position: sticky;
  top: 24px;
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
}

.intro-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #f5a623;
  border-radius: 2px;
}

.intro-slogan {
  font-size: 14px;
  color: #3b6ea5;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
}

.intro-text {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 20px;
}

.intro-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intro-nav a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: #3b6ea5;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.intro-nav a:hover {
  background-color: #f0f3f8;
  border-left-color: #f5a623;
  color: #1e2a3a;
}

.home-content {
  flex: 1;
  min-width: 0;
}

/* Hero 区块 */
.hero-block {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 28px;
  display: flex;
  overflow: hidden;
}

.hero-media {
  flex: 0 0 45%;
  max-width: 45%;
  min-height: 260px;
  background-color: #eef2f7;
  position: relative;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-copy {
  flex: 1;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  color: #1e2a3a;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 22px;
  max-width: 460px;
}

.hero-cta {
  display: inline-block;
  background-color: #3b6ea5;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.hero-cta:hover {
  background-color: #1e2a3a;
  color: #ffffff;
}

/* 模块通用 */
.module-section {
  margin-bottom: 36px;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
}

/* 最近更新 */
.featured-update {
  display: flex;
  gap: 16px;
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
}

.featured-cover {
  flex: 0 0 180px;
  width: 180px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #eef2f7;
}

.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.update-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 6px;
}

.update-desc {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.update-meta {
  font-size: 12px;
  color: #7d8aa0;
}

.update-card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.mini-card {
  background-color: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  box-shadow: 0 2px 8px rgba(30, 42, 58, 0.08);
  transform: translateY(-2px);
}

.mini-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mini-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e2a3a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-tag {
  font-size: 12px;
  color: #3b6ea5;
  margin-bottom: 2px;
}

.mini-update {
  font-size: 12px;
  color: #7d8aa0;
}

.update-list {
  border-top: 1px solid #e5e9f0;
}

.update-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14px;
}

.update-date {
  color: #7d8aa0;
  font-size: 13px;
  flex-shrink: 0;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.update-list a {
  flex: 1;
  min-width: 0;
  color: #1e2a3a;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-list a:hover {
  color: #3b6ea5;
}

.update-list .list-tag {
  flex-shrink: 0;
  font-size: 12px;
  background-color: #eef2f7;
  color: #3b6ea5;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 人气榜摘要 */
.ranking-summary .section-sub {
  margin-bottom: 16px;
}

.ranking-top3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.rank-card {
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 16px;
  position: relative;
}

.rank-card:hover {
  box-shadow: 0 3px 12px rgba(30, 42, 58, 0.08);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: #1e2a3a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  margin-bottom: 10px;
}

.rank-1 .rank-number {
  background-color: #f5a623;
}

.rank-2 .rank-number {
  background-color: #3b6ea5;
}

.rank-3 .rank-number {
  background-color: #7d8aa0;
}

.rank-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
}

.rank-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 6px;
}

.rank-comment {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
}

.rank-compact-list {
  border-top: 1px solid #e5e9f0;
}

.rank-compact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14px;
}

.rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background-color: #eef2f7;
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  flex-shrink: 0;
}

.rank-name {
  flex: 1;
  min-width: 0;
  color: #1e2a3a;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name:hover {
  color: #3b6ea5;
}

.rank-compact-list .list-tag {
  flex-shrink: 0;
  font-size: 12px;
  background-color: #eef2f7;
  color: #3b6ea5;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 题材分类模块 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 20px 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 3px 12px rgba(30, 42, 58, 0.08);
  transform: translateY(-2px);
}

.category-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a3a;
  text-align: center;
}

/* 新读者路径 */
.reader-path {
  padding: 24px;
}

.path-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.path-card {
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e2a3a;
}

.path-card p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  flex: 1;
}

.path-card a {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: #3b6ea5;
  border-bottom: 2px solid #e5e9f0;
  transition: border-color 0.2s ease;
}

.path-card a:hover {
  color: #1e2a3a;
  border-bottom-color: #f5a623;
}

/* ==========================================================
   Pages / 漫画库 library
   ========================================================== */

.page-library {
  background-color: #f7f8fc;
}

.library-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.library-main {
  flex: 1;
  min-width: 0;
}

.library-sidebar {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.category-jump a {
  display: inline-block;
  padding: 5px 14px;
  font-size: 14px;
  color: #3b6ea5;
  background-color: #f0f3f8;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.category-jump a:hover {
  background-color: #3b6ea5;
  color: #ffffff;
}

.category-group {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  scroll-margin-top: 20px;
}

.category-group h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e2a3a;
  padding-left: 12px;
  border-left: 4px solid #f5a623;
  margin-bottom: 8px;
}

.category-desc {
  font-size: 14px;
  color: #7d8aa0;
  margin-bottom: 16px;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.comic-card {
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.comic-card:hover {
  box-shadow: 0 3px 12px rgba(30, 42, 58, 0.08);
  transform: translateY(-2px);
}

.comic-card a {
  display: block;
  padding: 10px;
}

.comic-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
  background-color: #eef2f7;
}

.comic-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comic-card h3:hover {
  color: #3b6ea5;
}

.comic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.comic-tags .tag {
  font-size: 11px;
  padding: 1px 8px;
}

.back-to-top {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: #3b6ea5;
  padding: 8px 16px;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.back-to-top:hover {
  background-color: #f0f3f8;
  color: #1e2a3a;
}

.side-block {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 20px;
}

.side-block h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e9f0;
  margin-bottom: 12px;
}

.side-cat-list li {
  border-bottom: 1px solid #f0f3f8;
}

.side-cat-list li:last-child {
  border-bottom: none;
}

.side-cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #4a5568;
  transition: color 0.2s ease;
}

.side-cat-list a:hover {
  color: #3b6ea5;
}

.side-cat-list a::after {
  content: '›';
  font-size: 18px;
  color: #b0bccd;
  line-height: 1;
}

.side-note p {
  font-size: 13px;
  color: #7d8aa0;
  line-height: 1.6;
}

/* ==========================================================
   Pages / 人气榜 ranking
   ========================================================== */

.page-ranking {
  background-color: #f7f8fc;
}

.ranking-sidebar {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
}

.sidebar-panel {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 20px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e9f0;
  margin-bottom: 8px;
}

.panel-desc {
  font-size: 13px;
  color: #7d8aa0;
  line-height: 1.6;
  margin-bottom: 12px;
}

.topic-list {
  display: flex;
  flex-direction: column;
}

.topic-list li {
  border-bottom: 1px solid #f0f3f8;
}

.topic-list li:last-child {
  border-bottom: none;
}

.topic-list a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #4a5568;
  transition: color 0.2s ease;
}

.topic-list a:hover {
  color: #3b6ea5;
}

.sidebar-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #3b6ea5;
}

.sidebar-link:hover {
  color: #1e2a3a;
  text-decoration: underline;
}

.ranking-content {
  flex: 1;
  min-width: 0;
}

.rank-section {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.section-note {
  font-size: 14px;
  color: #7d8aa0;
  margin-bottom: 16px;
}

.top-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.top-three-grid .rank-card {
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.top-three-grid .rank-card:hover {
  box-shadow: 0 4px 16px rgba(30, 42, 58, 0.1);
  transform: translateY(-4px);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: #1e2a3a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  margin-bottom: 10px;
}

.rank-first .rank-badge {
  background-color: #f5a623;
}

.rank-second .rank-badge {
  background-color: #3b6ea5;
}

.rank-third .rank-badge {
  background-color: #7d8aa0;
}

.rank-cover {
  width: 100%;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #eef2f7;
  margin-bottom: 12px;
  position: relative;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.rank-info {
  flex: 1;
}

.rank-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 6px;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.rank-tags .tag {
  font-size: 11px;
  padding: 1px 8px;
}

.rank-desc {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
}

.rank-list {
  border-top: 1px solid #e5e9f0;
}

.rank-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14px;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: #eef2f7;
  color: #4a5568;
  font-size: 14px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  flex-shrink: 0;
}

.rank-list-item:nth-child(1) .rank-num {
  background-color: #f5a623;
  color: #ffffff;
}

.rank-list-item:nth-child(2) .rank-num {
  background-color: #3b6ea5;
  color: #ffffff;
}

.rank-list-item:nth-child(3) .rank-num {
  background-color: #7d8aa0;
  color: #ffffff;
}

.rank-item-name {
  flex: 1;
  min-width: 0;
  color: #1e2a3a;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-item-name:hover {
  color: #3b6ea5;
}

.rank-item-tags {
  flex-shrink: 0;
  font-size: 12px;
  color: #3b6ea5;
  background-color: #eef2f7;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.rank-heat {
  flex-shrink: 0;
  font-size: 13px;
  color: #b26a00;
  background-color: #fff3e0;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  white-space: nowrap;
}

.rule-content p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 10px;
}

.rule-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   Pages / 阅读指南 guide
   ========================================================== */

.page-guide {
  background-color: #f7f8fc;
}

.guide-sidebar {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-content {
  flex: 1;
  min-width: 0;
}

.sidebar-card {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 20px;
}

.sidebar-card h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e9f0;
  margin-bottom: 12px;
}

.sidebar-links li {
  border-bottom: 1px solid #f0f3f8;
}

.sidebar-links li:last-child {
  border-bottom: none;
}

.sidebar-links a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #4a5568;
  transition: color 0.2s ease;
}

.sidebar-links a:hover {
  color: #3b6ea5;
}

.guide-media {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
}

.guide-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.guide-media figcaption {
  font-size: 13px;
  color: #7d8aa0;
  text-align: center;
  padding: 8px 0 0;
  line-height: 1.5;
}

.guide-steps {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.guide-steps > h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 20px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  display: flex;
  gap: 16px;
  background-color: #f7f8fc;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  padding: 16px;
  align-items: flex-start;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: #3b6ea5;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  flex-shrink: 0;
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 6px;
}

.step-body p:last-child {
  margin-bottom: 0;
}

.step-body a {
  color: #3b6ea5;
  font-weight: 500;
  text-decoration: underline;
}

.step-body a:hover {
  color: #1e2a3a;
}

.guide-details {
  background-color: #f7f8fc;
  border: 1px solid #d8dee9;
  border-radius: 6px;
  padding: 16px;
  margin: 4px 0 4px 48px;
}

.guide-details summary {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a3a;
  cursor: pointer;
  padding: 4px 0;
}

.guide-details summary:hover {
  color: #3b6ea5;
}

.guide-details p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  padding: 8px 0 0;
}

.update-tips {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.update-tips h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e2a3a;
  padding-left: 12px;
  border-left: 4px solid #f5a623;
  margin-bottom: 12px;
}

.update-tips p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 10px;
}

.update-tips p:last-child {
  margin-bottom: 0;
}

.guide-related {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
}

.guide-related h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
}

.guide-related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.guide-related li {
  font-size: 14px;
}

.guide-related a {
  display: inline-block;
  padding: 6px 0;
  color: #3b6ea5;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.guide-related a:hover {
  color: #1e2a3a;
  border-bottom-color: #f5a623;
}

/* ==========================================================
   Pages / 版权与反馈 feedback
   ========================================================== */

.page-feedback {
  background-color: #f7f8fc;
}

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.copyright-panel {
  flex: 1;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
}

.feedback-panel {
  flex: 0 0 360px;
  width: 360px;
  max-width: 360px;
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
}

.content-media {
  margin: 12px 0 16px;
}

.content-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
}

.content-media figcaption {
  font-size: 13px;
  color: #7d8aa0;
  padding-top: 6px;
  line-height: 1.5;
}

.content-media-inline {
  max-width: 420px;
}

.copyright-block {
  padding: 16px 0;
  border-bottom: 1px solid #f0f3f8;
}

.copyright-block:last-child {
  border-bottom: none;
}

.block-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 8px;
}

.copyright-block p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 8px;
}

.copyright-block p:last-child {
  margin-bottom: 0;
}

.feedback-block {
  padding: 16px 0;
  border-bottom: 1px solid #f0f3f8;
}

.feedback-block:last-child {
  border-bottom: none;
}

.feedback-block p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 8px;
}

.feedback-block p:last-child {
  margin-bottom: 0;
}

.notice-section {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 24px;
  margin-top: 24px;
  width: 100%;
}

.notice-section p {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 10px;
}

.notice-section p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   Pages / 404
   ========================================================== */

.site-error {
  background-color: #f7f8fc;
}

.error-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-panel {
  background-color: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  padding: 48px 40px;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.error-code {
  font-size: 64px;
  font-weight: 700;
  color: #3b6ea5;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  line-height: 1;
  margin-bottom: 16px;
}

.error-panel h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.error-home-link,
.error-library-link {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.error-home-link {
  background-color: #3b6ea5;
  color: #ffffff;
}

.error-home-link:hover {
  background-color: #1e2a3a;
  color: #ffffff;
}

.error-library-link {
  background-color: #f0f3f8;
  color: #3b6ea5;
}

.error-library-link:hover {
  background-color: #e5e9f0;
  color: #1e2a3a;
}

/* ==========================================================
   Responsive / 响应式
   ========================================================== */

@media (max-width: 1024px) {
  /* 首页 */
  .home-intro-panel {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }

  .sidebar-left > aside {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }

  .library-sidebar {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }

  .ranking-sidebar {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }

  .guide-sidebar {
    flex-basis: 200px;
    width: 200px;
    max-width: 200px;
  }

  .feedback-panel {
    flex-basis: 300px;
    width: 300px;
    max-width: 300px;
  }

  /* 三列降为两列 */
  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .update-card-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  /* 首页布局改为单列 */
  .home-layout {
    flex-direction: column;
  }

  .home-intro-panel {
    display: none;
  }

  .sidebar-left {
    flex-direction: column;
  }

  .sidebar-left > aside {
    flex: none;
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  .sidebar-left > div {
    width: 100%;
    order: 1;
  }

  /* 漫画库侧栏 */
  .library-layout {
    flex-direction: column;
  }

  .library-sidebar {
    flex: none;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* 人气榜侧栏 */
  .ranking-sidebar {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .guide-sidebar {
    flex: none;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* 反馈页双栏 */
  .page-layout {
    flex-direction: column;
  }

  .feedback-panel {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  /* 首页 hero 改纵向 */
  .hero-block {
    flex-direction: column-reverse;
  }

  .hero-media {
    flex: none;
    max-width: 100%;
    width: 100%;
    height: 220px;
    min-height: 0;
    position: relative;
  }

  .hero-copy {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  .header-shell {
    height: 56px;
    padding: 0 16px;
  }

  .brand {
    font-size: 20px;
  }

  /* 导航按钮 */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #d8dee9;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(30, 42, 58, 0.08);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid #f0f3f8;
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    padding: 12px 8px;
    font-size: 15px;
    border-radius: 4px;
  }

  .nav-list a.is-current {
    background-color: #f0f3f8;
  }

  /* 内页间距 */
  .inner-main {
    padding: 16px 16px 48px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-description {
    font-size: 15px;
  }

  /* 区块 */
  .module-section {
    padding: 20px 16px;
  }

  .featured-update {
    flex-direction: column;
  }

  .featured-cover {
    flex: none;
    width: 100%;
    height: 160px;
  }

  .update-card-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .mini-card {
    padding: 8px;
  }

  .mini-card img {
    height: 70px;
  }

  .ranking-top3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rank-card img {
    height: 130px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .path-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 漫画库 */
  .category-jump {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .category-jump a {
    flex-shrink: 0;
  }

  .category-group {
    padding: 20px 16px;
  }

  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .comic-card a {
    padding: 8px;
  }

  .comic-cover {
    height: 120px;
  }

  /* 榜单 */
  .rank-list-item {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 4px;
  }

  .rank-item-name {
    flex-basis: 60%;
  }

  .rank-item-tags {
    order: 3;
  }

  .rank-heat {
    order: 4;
  }

  .top-three-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rank-cover {
    height: 180px;
  }

  /* 指南 */
  .step-item {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .guide-details {
    margin-left: 0;
  }

  .guide-media img {
    height: 160px;
  }

  /* 反馈 */
  .content-media-inline {
    max-width: 100%;
  }

  /* 404 */
  .error-panel {
    padding: 36px 20px;
  }

  .error-code {
    font-size: 48px;
  }

  /* 页脚 */
  .footer-shell {
    padding: 0 16px;
    gap: 10px;
  }

  .footer-nav {
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .home-layout {
    padding: 16px 12px 40px;
  }

  .inner-main {
    padding: 12px 12px 40px;
  }

  .header-shell {
    padding: 0 12px;
  }

  .hero-block {
    margin-bottom: 20px;
  }

  .hero-copy {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-media {
    height: 180px;
  }

  .module-section {
    padding: 16px 12px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 19px;
  }

  .update-card-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mini-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .mini-card:nth-child(3) img {
    height: 100px;
  }

  .update-list li {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 2px;
  }

  .update-date {
    font-size: 12px;
  }

  .update-list a {
    flex-basis: calc(100% - 80px);
  }

  .update-list .list-tag {
    margin-left: auto;
  }

  .category-grid {
    gap: 8px;
  }

  .category-card {
    padding: 12px 8px;
  }

  .category-card img {
    height: 70px;
  }

  .category-name {
    font-size: 13px;
  }

  .path-cards {
    gap: 10px;
  }

  .path-card {
    padding: 16px;
  }

  .comic-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .comic-cover {
    height: 100px;
  }

  .comic-card h3 {
    font-size: 13px;
  }

  .comic-tags .tag {
    font-size: 10px;
    padding: 0 6px;
  }

  .library-sidebar {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    grid-template-columns: 1fr;
  }

  .rank-list .rank-list-item {
    padding: 10px 2px;
  }

  .rank-num {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .rank-item-tags {
    font-size: 11px;
    padding: 1px 6px;
  }

  .rank-heat {
    font-size: 12px;
    padding: 1px 6px;
  }

  .rank-cover {
    height: 150px;
  }

  .breadcrumb {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  .page-description {
    font-size: 14px;
  }

  .category-group {
    padding: 16px 12px;
    margin-bottom: 16px;
  }

  .category-group h2 {
    font-size: 18px;
  }

  .category-desc {
    font-size: 13px;
  }

  .step-body h3 {
    font-size: 15px;
  }

  .step-body p {
    font-size: 13px;
  }

  .guide-details {
    padding: 12px;
  }

  .guide-details summary {
    font-size: 14px;
  }

  .guide-details p {
    font-size: 13px;
  }

  .copyright-panel,
  .feedback-panel,
  .notice-section {
    padding: 16px 12px;
  }

  .block-title {
    font-size: 15px;
  }

  .copyright-block p,
  .feedback-block p,
  .notice-section p {
    font-size: 13px;
  }

  .error-main {
    padding: 40px 12px;
  }

  .error-panel {
    padding: 28px 16px;
  }

  .error-code {
    font-size: 40px;
  }

  .error-panel h1 {
    font-size: 20px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-home-link,
  .error-library-link {
    text-align: center;
  }

  .footer-shell {
    padding: 0 12px;
  }

  .footer-nav {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-brand {
    font-size: 16px;
  }

  .footer-desc {
    font-size: 13px;
  }

  .footer-copyright {
    font-size: 12px;
  }
}

/* 动画增强：仅作为不影响可见性的增强 */
@media (prefers-reduced-motion: no-preference) {
  .rank-card,
  .mini-card,
  .comic-card,
  .category-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
