/* 阅读站：参考 GoodNovel 暖色、竖版封面、清晰层级；正文优先本地图 */
:root {
  --bg: #fff7f0;
  --bg-elevated: #fffdfb;
  --paper: #ffffff;
  --ink: #1c1b1a;
  --muted: #6b6560;
  --line: #f0e6de;
  --accent: #ff5c00;
  --accent-hover: #e65300;
  --accent-soft: #ffe8d9;
  --accent-bar: #ff8a3d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(28, 27, 26, 0.08);
  --shadow-hover: 0 12px 40px rgba(255, 92, 0, 0.12);
  --font-read: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, serif;
  --font-ui: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-read);
  font-size: 1.08rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(255, 92, 0, 0.06);
}

.site-header .inner,
.site-main,
.site-footer .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.logo {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}
.nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.site-main {
  padding: 1.75rem 1.25rem 3.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 1.35rem 0;
}

.block {
  margin-bottom: 3rem;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: none;
}

.block-head h2 {
  margin: 0;
  font-size: 1.28rem;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.02em;
  padding-left: 0.65rem;
  border-left: 4px solid var(--accent-bar);
  line-height: 1.2;
}

.block-head h2 a {
  color: var(--ink);
}
.block-head h2 a:hover {
  color: var(--accent);
}

.more {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}
.more:hover {
  text-decoration: underline;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1.35rem 1.1rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(240, 230, 222, 0.9);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-media {
  display: block;
  /* 竖版封面，接近 GoodNovel / 网文书封比例 */
  aspect-ratio: 3 / 4;
  background: linear-gradient(165deg, var(--accent-soft), #fff0e8);
  overflow: hidden;
}

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

.card-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #e8dfd8, #f5ebe4);
}

.card-body {
  padding: 0.85rem 0.95rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-body h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 700;
  font-family: var(--font-ui);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h3 a {
  color: var(--ink);
}
.card-body h3 a:hover {
  color: var(--accent);
}

.excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1;
  font-family: var(--font-ui);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

time {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: #9a928a;
  font-weight: 600;
}

.page-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head .meta {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

.pager {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  font-family: var(--font-ui);
  font-weight: 700;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-elevated);
  padding: 2rem 1.5rem 2.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

@media (min-width: 800px) {
  .article {
    padding: 2.25rem 2.75rem 3rem;
  }
}

.article-head .crumb {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
}

.article-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.22;
  font-weight: 700;
}

.article-head .meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}

.article-hero {
  margin: 1.35rem 0 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--accent-soft);
}

.article-hero img {
  width: 100%;
  display: block;
  max-height: min(72vh, 560px);
  object-fit: contain;
  object-position: center top;
}

.article-body {
  margin-top: 1.65rem;
}

.prose {
  font-size: 1.12rem;
  line-height: 1.75;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}

.prose figure {
  margin: 1.25rem 0;
}

.prose p {
  margin: 0.9rem 0;
}

.prose h2,
.prose h3 {
  font-family: var(--font-ui);
  font-weight: 800;
  margin-top: 1.75rem;
}

/* --- Article 下方：区块标题条 + Latest Chapter 网格 + More + 双横滑封面（配色随站点 --accent）--- */
.gn-below-article {
  max-width: 1120px;
  margin: 2.5rem auto 0;
  padding: 0 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.gn-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.gn-section-bar {
  display: inline-block;
  width: 5px;
  height: 1.15em;
  border-radius: 3px;
  background: var(--accent-bar);
  flex-shrink: 0;
}

.gn-latest {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.35rem;
}

.gn-chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.15rem;
}

@media (max-width: 640px) {
  .gn-chapter-grid {
    grid-template-columns: 1fr;
  }
}

.gn-chapter-card {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.gn-chapter-card__title {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.4rem;
}

.gn-chapter-card__title:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.gn-chapter-card__snippet {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gn-chapter-card__updated {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: #9a928a;
}

.gn-clock {
  flex-shrink: 0;
  opacity: 0.75;
}

.gn-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.gn-btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 2.25rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 92, 0, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.gn-btn-more:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* 横滑封面：You may also like / Related Novels */
.gn-shelf {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 0 1.15rem;
}

.gn-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.95rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.35rem 1.15rem 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.gn-track::-webkit-scrollbar {
  height: 6px;
}
.gn-track::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}

.gn-cover-card {
  flex: 0 0 152px;
  width: 152px;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.gn-cover-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.gn-cover-card__img {
  aspect-ratio: 5 / 7;
  background: var(--accent-soft);
  overflow: hidden;
}

.gn-cover-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gn-cover-card__ph {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(160deg, #ffe8d9 0%, #ffd9c2 50%, #fff4eb 100%);
}

.gn-cover-card__body {
  padding: 0.5rem 0.55rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gn-cover-card__title {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gn-cover-card:hover .gn-cover-card__title {
  color: var(--accent);
}

.gn-cover-card__meta {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  color: #9a928a;
}

.gn-empty {
  margin: 0;
  padding: 1rem 1.15rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

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

/* --- Home: main + Novel sidebar --- */
.home-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 960px) {
  .home-layout {
    grid-template-columns: 1fr minmax(260px, 300px);
  }

  .home-novel {
    position: sticky;
    top: 4.75rem;
  }
}

.novel-rail {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid rgba(240, 230, 222, 0.9);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 1rem;
}

.novel-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.novel-rail-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.02em;
  padding-left: 0.5rem;
  border-left: 4px solid var(--accent-bar);
  line-height: 1.2;
}

.novel-rail-head h2 a {
  color: var(--ink);
}

.novel-rail-head h2 a:hover {
  color: var(--accent);
}

.novel-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.novel-rail-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

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

.novel-rail-thumb {
  flex: 0 0 72px;
  width: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(165deg, var(--accent-soft), #fff0e8);
  align-self: flex-start;
}

.novel-rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.novel-rail-ph {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 96px;
  background: linear-gradient(145deg, #e8dfd8, #f5ebe4);
}

.novel-rail-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.novel-rail-title {
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}

.novel-rail-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.novel-rail-excerpt {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-rail-meta {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  color: #9a928a;
}

.novel-rail-empty {
  margin: 0.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- /novel archive --- */
.novel-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1.35rem 1.1rem;
}

@media (min-width: 640px) {
  .novel-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* --- Partner novel detail (same cover as cards) --- */
.article--novel .article-hero--novel {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.article--novel .article-hero--novel img {
  object-fit: cover;
  max-height: min(72vh, 520px);
  width: 100%;
}

.novel-synopsis {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.novel-synopsis__label {
  margin: 0 0 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.novel-synopsis__hint {
  margin: -0.35rem 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--muted);
}

.novel-synopsis__body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.novel-synopsis__body p {
  margin: 0.5rem 0;
}

.novel-synopsis__body p:first-child {
  margin-top: 0;
}

.novel-synopsis__body p:last-child {
  margin-bottom: 0;
}
