/* 阅读站：参考 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;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-switch__item {
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.lang-switch__item:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.lang-switch__item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.lang-switch__sep {
  color: var(--line);
}

.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;
}

.site-footer .inner {
  text-align: center;
}

.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: 1fr;
  gap: 1.35rem;
}

/* 插在 card-grid 内的 feed 广告：多列时占满一行，避免与卡片并排变窄 */
.card-grid > .card-grid__feed-ad,
.novel-list-grid > .card-grid__feed-ad {
  grid-column: 1 / -1;
  width: 100%;
}

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

.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;
}

/* 分类 /novel 列表顶栏横幅（与首页 Home_Topfeed 共用 id） */
.list-page-ad-top {
  margin: 0 0 0.4rem;
  max-width: 100%;
  overflow-x: hidden;
}

.list-page-ad-top .gam-ad-slot {
  margin-top: 0;
}

.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%;
  height: auto;
  display: block;
  max-height: min(72vh, 560px);
  object-fit: contain;
  object-position: center top;
}

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

/* --- Post: URL-based pages (/post/…/p/N) + ad slot hook --- */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.article-continued {
  margin: 0.65rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.article-continued a {
  font-weight: 700;
}

.article-continued__sep {
  margin: 0 0.35rem;
}

.article-ad-slot {
  margin: 1.5rem 0 0;
  min-height: 0;
}

/* --- Google Ad Manager (GPT) --- */
/* 留白最小化：占位高度交给真实创意撑开，未填充由 collapseDiv:ON_NO_FILL 折叠；
   仅保留极小外边距分隔，避免与相邻内容粘连 */
.gam-ad-slot {
  margin: 0.25rem auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  text-align: center;
  overflow: visible;
}

/* 原生/矩形 feed 位（非纯横幅）；高度由创意决定，不预留空白 */
.gam-ad-slot--card {
  min-height: 0;
}

/* 头部 Home_Topfeed：多尺寸填充；setCentering 居中，窄屏靠容器裁切过宽创意 */
.gam-ad-slot--topfeed {
  max-width: 100%;
  min-height: 0;
}

@media (min-width: 960px) {
  .gam-ad-slot--topfeed {
    max-width: 728px;
  }
}

.gam-ad-slot iframe {
  vertical-align: top;
}

@media (max-width: 959px) {
  .gam-ad-slot,
  .list-page-ad-top .gam-ad-slot {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto;
    margin-right: auto;
    /* 不用 overflow:hidden/auto 包 iframe：iOS Safari 易整段不绘制 */
    overflow: visible !important;
  }

  .gam-ad-slot--topfeed {
    min-height: 0 !important;
    padding-bottom: 0;
  }

  .gam-ad-slot--card:not(.gam-ad-slot--topfeed) {
    min-height: 0 !important;
    padding-bottom: 0;
  }
}

/* iPhone / iPad Safari：勿限制 iframe 宽度，避免 0×0 空白；横向溢出由页面边距吸收 */
@supports (-webkit-touch-callout: none) {
  .site-main {
    overflow-x: visible;
  }

  .gam-ad-slot,
  .gam-ad-slot iframe,
  .gam-ad-slot [id^="google_ads_iframe"] {
    max-width: none !important;
    overflow: visible !important;
    transform: none !important;
  }
}

.gam-ad-wrap {
  margin: 0.45rem 0;
  clear: both;
}

.gam-ad-wrap--inarticle {
  margin: 0.5rem 0;
}

.gam-ad-wrap--like {
  margin: 0.5rem 0 0.25rem;
}

/* 优先级保障：谷歌广告(GAM)在层叠顺序上始终高于同区 AdSkeeper（后者为普通流 z-index:auto），
   任何重叠情形下谷歌都在上、绝不被 AdSkeeper 覆盖。不改变「两者并存展示」的现状。 */
.gam-ad-slot,
.gam-ad-wrap {
  position: relative;
  z-index: 1;
}

.adskeeper-slot {
  margin: 1.25rem auto;
  max-width: 100%;
  clear: both;
  overflow: visible;
}

.adskeeper-clip {
  overflow: visible;
  width: 100%;
}

/* AdsKeeper：高度由 adskeeper-layout.js 写 slot 的 max-height；此处仅首屏默认。
   clip 不要与 slot 同时 max-height+hidden，否则内层先裁切、scrollHeight/测量在 Safari 上偏小。 */
/* 首页首条 MGID（2009900）常为整卡推荐位，高度由 adskeeper-layout.js 控制；勿用 88px 物理封顶 */
.adskeeper-slot--home-header {
  margin: 0 auto 0.85rem !important;
}

.adskeeper-clip--home-header {
  max-height: none;
  overflow: visible;
  /* 轻微水平内边距：部分 MGID 双列在 light DOM 下可略减「两卡贴死」；主体仍在 shadow 内则效果有限 */
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  box-sizing: border-box;
}

.adskeeper-slot--home-under {
  margin: 0.4rem auto !important;
}

.adskeeper-slot--detail-strip {
  margin: 0 auto 0.5rem !important;
}

.adskeeper-clip [data-type="_mgwidget"] {
  min-height: 64px;
}

.adskeeper-slot iframe {
  max-height: min(95vh, 900px) !important;
  vertical-align: top;
}

.adskeeper-wrap--detail-sidebar {
  margin: 1.15rem 0 0;
}

/* 正文内两条 MGID 分块，减少并排/遮挡 */
.adskeeper-inarticle-wrap {
  margin: 1.35rem 0;
  clear: both;
  width: 100%;
}

.home-main > .gam-ad-slot:first-of-type {
  margin-top: 0;
}

/* 顶部谷歌广告：位于站点标题（StoryLedger）之上，留白最小化 */
.site-top-ad {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.15rem 1.25rem;
  text-align: center;
}

.site-top-ad .gam-ad-slot {
  margin: 0 auto;
}

/* Interstitial 占位：GAM 尺寸由 sizeMapping 决定；移出视口以免占位影响阅读 */
.gam-interstitial-anchor {
  position: absolute;
  left: -10000px;
  width: 250px;
  min-width: 250px;
  height: 250px;
  min-height: 250px;
  overflow: hidden;
  pointer-events: none;
}

.article-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.15rem;
  flex-wrap: wrap;
  row-gap: 0.65rem;
  margin-top: 1.35rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(28, 27, 26, 0.06);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.article-pager__indicator {
  min-width: 6.5rem;
  text-align: center;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.article-pager__link {
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.article-pager__link:hover {
  background: #ffd4bc;
  color: var(--accent-hover);
  text-decoration: none;
}

.article-pager__disabled {
  opacity: 0.38;
  cursor: not-allowed;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  background: var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Compact page jump: single pill, matches Prev/Next styling */
.pager-jump__input::-webkit-outer-spin-button,
.pager-jump__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pager-jump__input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.pager-jump--pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.4rem 0.22rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
}

.pager-jump__lead,
.pager-jump__of {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pager-jump__input {
  width: 2.85rem;
  min-width: 2.85rem;
  height: 2.2rem;
  padding: 0 0.3rem;
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(240, 230, 222, 0.95);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: center;
  transition: box-shadow 0.15s ease;
}

.pager-jump__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.pager-jump__input::placeholder {
  color: var(--muted);
}

.pager-jump__go {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  margin-left: 0.05rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  line-height: 1.2;
}

.pager-jump__go:hover {
  background: #ffd4bc;
  color: var(--accent-hover);
}

.pager-jump__go:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pager.pager--jump {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  row-gap: 0.65rem;
}

.pager__pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pager__pill:hover {
  background: #ffd4bc;
  color: var(--accent-hover);
  text-decoration: none;
}

.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 / Other stories / 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;
  min-width: 0;
}

.home-main {
  min-width: 0;
  /* 勿用 min-height:0：grid 子项可被压扁，导致下方 GAM iframe 底部被裁切 */
  min-height: auto;
  align-self: start;
}

/* 首页主栏：在出现「主栏 + 右侧 Novel」分栏之前，卡片始终单列（避免 640～959px 与分类页同宽却仍出两列卡） */
.home-main .card-grid {
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

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

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

  .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 栏在窄屏下全宽堆叠：略增留白，减轻封面与文案挤在一起 */
@media (max-width: 959.98px) {
  .novel-rail {
    padding: 1rem 1.2rem 1.2rem;
  }

  .novel-rail-head {
    margin-bottom: 0.85rem;
    padding-bottom: 0.55rem;
  }

  .novel-rail-item {
    gap: 1rem;
    padding: 1rem 0;
  }

  .novel-rail-body {
    gap: 0.5rem;
  }

  .novel-rail-title {
    line-height: 1.42;
  }

  .novel-rail-excerpt {
    line-height: 1.58;
  }
}

/* --- /novel archive --- */
.novel-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

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

/* --- Partner novel detail：封面区宽度与列表卡一致；展示用 contain 保持比例，避免 cover + max-height 在窄屏上裁切/拉伸 --- */
.article--novel .article-hero--novel {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.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;
}
