/* ==========================================================================
   base
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #2c3e50;
  background-color: #f5f5f5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #4a7c59;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3a6548;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  font-weight: 700;
  color: #2c3e50;
}

/* ==========================================================================
   layout
   ========================================================================== */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #4a7c59;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-logo:hover {
  color: #3a6548;
}

.site-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav .nav-list a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9375rem;
  color: #2c3e50;
  border-radius: 6px;
  line-height: 1.4;
}

.site-nav .nav-list a:hover {
  color: #4a7c59;
  background-color: #f0f5f1;
}

.site-nav .nav-list a.is-current {
  color: #4a7c59;
  background-color: #eaf1ec;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #2c3e50;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  min-height: calc(100vh - 200px);
}

.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e8e8e8;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4a7c59;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: #2c3e50;
}

.footer-nav a:hover {
  color: #4a7c59;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #7a8a80;
}

/* 内页通用布局骨架 */

.inner-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  min-height: calc(100vh - 200px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: #7a8a80;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #4a7c59;
}

.breadcrumb a:hover {
  color: #3a6548;
}

.breadcrumb-sep {
  color: #b0b8b0;
}

.breadcrumb-current {
  color: #2c3e50;
}

.page-header {
  margin-bottom: 36px;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.3;
}

.page-description {
  font-size: 1rem;
  color: #5a6b5e;
  max-width: 720px;
  line-height: 1.7;
}

/* 侧栏在前布局 */

.sidebar-left {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.sidebar-left .page-layout {
  display: contents;
}

.sidebar-left .page-aside,
.sidebar-left .sidebar,
.sidebar-left .page-sidebar {
  position: sticky;
  top: 88px;
}

/* 侧栏通用 */

.sidebar-inner,
.page-aside,
.page-sidebar {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
}

.sidebar-inner h2,
.sidebar-title,
.aside-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.sidebar-links li + li,
.aside-list li + li,
.sidebar-nav ul li + li,
.sidebar-related ul li + li {
  margin-top: 4px;
}

.sidebar-links a,
.aside-list a,
.sidebar-nav ul a,
.sidebar-related ul a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9375rem;
  color: #2c3e50;
  border-radius: 6px;
  line-height: 1.5;
}

.sidebar-links a:hover,
.aside-list a:hover,
.sidebar-nav ul a:hover,
.sidebar-related ul a:hover {
  background-color: #f0f5f1;
  color: #4a7c59;
}

.sidebar-related {
  margin-top: 20px;
}

.aside-nav + .aside-nav {
  margin-top: 24px;
}

/* ==========================================================================
   components
   ========================================================================== */

/* 首页首屏 hero */

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 48px;
  margin-bottom: 48px;
}

.hero-content h1 {
  font-size: 2.125rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-desc {
  font-size: 1.0625rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.4;
  min-height: 44px;
}

.btn-primary {
  background-color: #4a7c59;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #3a6548;
  color: #ffffff;
}

.btn-secondary {
  background-color: #ffffff;
  color: #4a7c59;
  border: 1px solid #4a7c59;
}

.btn-secondary:hover {
  background-color: #f0f5f1;
  color: #3a6548;
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-figure figcaption {
  font-size: 0.8125rem;
  color: #7a8a80;
  margin-top: 8px;
  text-align: center;
}

/* 首页栏目通用 */

.topic-nav-section,
.recent-updates,
.popular-list,
.guide-entry,
.featured-topics {
  margin-bottom: 48px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #2c3e50;
}

.section-link {
  font-size: 0.875rem;
  color: #4a7c59;
  white-space: nowrap;
}

.section-link:hover {
  color: #3a6548;
}

.section-desc {
  font-size: 0.9375rem;
  color: #5a6b5e;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* 题材标签 */

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topic-tag {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #2c3e50;
  line-height: 1.4;
}

.topic-tag:hover {
  border-color: #4a7c59;
  color: #4a7c59;
  background-color: #f0f5f1;
}

/* 最近更新列表 */

.update-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.update-item {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.update-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.update-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.update-info {
  padding: 16px;
}

.update-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
  line-height: 1.4;
}

.update-meta {
  font-size: 0.8125rem;
  color: #4a7c59;
  margin-bottom: 8px;
}

.update-desc {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 人气榜单 */

.popular-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.popular-item {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.popular-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.popular-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.popular-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
  line-height: 1.4;
}

.popular-reason {
  font-size: 0.8125rem;
  color: #5a6b5e;
  line-height: 1.6;
}

/* 指南卡片 */

.guide-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.guide-card {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.guide-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.guide-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.guide-card p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 16px;
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a7c59;
  display: inline-block;
  min-height: 28px;
}

.card-link:hover {
  color: #3a6548;
}

/* 专题卡 */

.topic-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.topic-card {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.topic-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.topic-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
}

.topic-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.topic-card p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* 内页通用 content-section */

.content-section {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
}

.content-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.content-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.content-section .section-desc {
  font-size: 0.9375rem;
  color: #5a6b5e;
  margin-bottom: 20px;
  line-height: 1.7;
}

/* 分类页 */

.tag-section,
.genre-detail,
.related-links {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  display: inline-block;
  padding: 8px 18px;
  background-color: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #2c3e50;
  line-height: 1.5;
}

.tag-item:hover {
  border-color: #4a7c59;
  color: #4a7c59;
  background-color: #f0f5f1;
}

.genre-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid #e8e8e8;
}

.genre-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.genre-text h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.genre-text p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 12px;
}

.genre-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.genre-media figcaption {
  font-size: 0.8125rem;
  color: #7a8a80;
  margin-top: 8px;
  text-align: center;
}

.related-links p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 8px;
}

.related-links a {
  color: #4a7c59;
  font-weight: 500;
}

.related-links a:hover {
  color: #3a6548;
}

/* 阅读指南页 */

.guide-figure {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 6px;
}

.guide-figure figcaption {
  font-size: 0.8125rem;
  color: #7a8a80;
  margin-top: 12px;
  text-align: center;
}

.guide-section {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
}

.guide-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.guide-section > p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 20px;
}

.guide-steps {
  counter-reset: step-counter;
}

.guide-step {
  position: relative;
  padding: 16px 0 16px 48px;
  border-bottom: 1px solid #e8e8e8;
}

.guide-step:last-child {
  border-bottom: none;
}

.guide-step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #4a7c59;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.guide-step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.guide-step p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.guide-tips li {
  padding: 14px 0;
  border-bottom: 1px solid #e8e8e8;
}

.guide-tips li:last-child {
  border-bottom: none;
}

.guide-tips h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.guide-tips p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.guide-section .guide-cards {
  margin-top: 8px;
}

.guide-section .guide-cards .guide-card {
  border: 1px solid #e8e8e8;
  background-color: #fafafa;
}

.manage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.manage-item {
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
}

.manage-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.manage-item p {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.guide-outro {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.guide-outro a {
  color: #4a7c59;
  font-weight: 500;
}

.guide-outro a:hover {
  color: #3a6548;
}

/* 职场漫画页 */

.comic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.comic-card {
  display: flex;
  gap: 16px;
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.comic-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.comic-cover {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
}

.comic-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.comic-desc {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.6;
}

.reason-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reason-item {
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
}

.reason-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.reason-text {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.tips-list {
  padding-left: 0;
}

.tips-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  border-bottom: 1px solid #f0f0f0;
}

.tips-list li:last-child {
  border-bottom: none;
}

.tips-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4a7c59;
}

.section-footnote {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-top: 20px;
}

.section-footnote a {
  color: #4a7c59;
  font-weight: 500;
}

.section-footnote a:hover {
  color: #3a6548;
}

/* 生活漫画页 */

.content-area {
  min-width: 0;
}

.comic-entry {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #e8e8e8;
  align-items: start;
}

.comic-entry:first-child {
  padding-top: 0;
}

.comic-entry:last-child {
  border-bottom: none;
}

.comic-media figure {
  margin: 0;
}

.comic-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
}

.comic-media figcaption {
  font-size: 0.8125rem;
  color: #7a8a80;
  margin-top: 6px;
  text-align: center;
}

.comic-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.comic-tag {
  display: inline-block;
  font-size: 0.8125rem;
  color: #4a7c59;
  background-color: #eaf1ec;
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

.comic-info p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.content-section .reason-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-section .reason-list li {
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
}

.content-section .reason-list h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.content-section .reason-list p {
  font-size: 0.875rem;
  color: #5a6b5e;
  line-height: 1.7;
}

.content-section > p {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 12px;
}

.content-section > p a {
  color: #4a7c59;
  font-weight: 500;
}

.content-section > p a:hover {
  color: #3a6548;
}

/* 404 页 */

.error-main {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.error-section {
  max-width: 480px;
  text-align: center;
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 48px 40px;
}

.error-code {
  font-size: 3.5rem;
  font-weight: 700;
  color: #4a7c59;
  line-height: 1;
  margin-bottom: 16px;
}

.error-section h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 0.9375rem;
  color: #5a6b5e;
  line-height: 1.7;
  margin-bottom: 24px;
}

.error-back {
  display: inline-block;
  padding: 12px 28px;
  background-color: #4a7c59;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.4;
  min-height: 44px;
}

.error-back:hover {
  background-color: #3a6548;
  color: #ffffff;
}

.error-help {
  font-size: 0.8125rem;
  color: #7a8a80;
  margin-top: 20px;
  line-height: 1.6;
}

.error-help a {
  color: #4a7c59;
}

/* ==========================================================================
   pages
   ========================================================================== */

/* 首页专属 */

.home-main {
  padding-top: 32px;
}

/* 分类页 */

.page-fenlei .genre-block {
  grid-template-columns: minmax(0, 1fr) 280px;
}

/* 职场页 */

.page-zhichang .comic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 生活页 */

.page-shenghuo .comic-entry {
  grid-template-columns: 220px minmax(0, 1fr);
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .sidebar-left {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
  }

  .popular-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .popular-item:nth-child(4),
  .popular-item:nth-child(5) {
    grid-column: span 1;
  }

  .comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 56px;
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .site-nav .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px;
    gap: 0;
  }

  .site-nav .nav-list.is-open {
    display: flex;
  }

  .site-nav .nav-list a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .site-main,
  .inner-main {
    padding: 24px 16px 48px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 1.625rem;
  }

  .update-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .popular-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-cards,
  .guide-cards {
    grid-template-columns: 1fr;
  }

  .sidebar-left {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar-left .page-aside,
  .sidebar-left .sidebar,
  .sidebar-left .page-sidebar {
    position: static;
    order: 2;
  }

  .sidebar-left .page-layout main,
  .sidebar-left main {
    order: 1;
  }

  /* 内页侧栏在前时，移动端保证 main 在前 */
  .layout-shell.sidebar-left main,
  .page-layout.sidebar-left main {
    order: 1;
  }

  .layout-shell.sidebar-left aside,
  .page-layout.sidebar-left aside {
    order: 2;
  }

  .genre-block {
    grid-template-columns: 1fr;
  }

  .genre-media {
    order: -1;
  }

  .comic-grid {
    grid-template-columns: 1fr;
  }

  .comic-card {
    flex-direction: column;
  }

  .comic-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .reason-list {
    grid-template-columns: 1fr;
  }

  .comic-entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .comic-media img {
    aspect-ratio: 16 / 9;
  }

  .manage-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 16px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
  }

  .error-section {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .update-list {
    grid-template-columns: 1fr;
  }

  .popular-items {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 24px 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
  }

  .topic-tag {
    padding: 8px 14px;
    font-size: 0.875rem;
  }

  .content-section,
  .tag-section,
  .genre-detail,
  .related-links,
  .guide-section,
  .guide-figure {
    padding: 24px 16px;
  }

  .guide-step {
    padding-left: 44px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .breadcrumb {
    font-size: 0.8125rem;
  }
}
