/* ============================================================
   91SM · 小说首页 novel.html
   - 主题：紫色基底 · CYBER NOIR LIBRARY
   - 全局组件：.book-card / .book-cover / .bc-g* / .bc-p* 来自 themes.css
   ============================================================ */

.novel-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px clamp(var(--space-m), 4vw, var(--space-xxl)) 48px;
}

/* ============================================================
   HERO 书架 — 5 本运营精选，扇形叠放
   - 默认：除最右 1 本外，每本被右边的书压住 45%（露出 55%）
   - z-index 从左到右递增（1→5），右书压左书
   - Hover：该书 z-index 拔到 99 + 上移 + 放大；右侧兄弟书向右让位
   - 装饰：书架下方一根紫色发光横条，凸显"运营精选"
   ============================================================ */

.novel-shelf-hero {
  position: relative;
  display: flex;
  justify-content: flex-start;  /* 靠左对齐：与下方"01 短篇精选"标号水平对齐 */
  align-items: flex-end;
  padding: var(--space-l) 0 var(--space-m);
  margin: 0 0 var(--space-l);
  overflow: visible;
}

/* 发光横条 — 撑满 main 内容宽度，与下方 hscroll 楼层对齐 */

.novel-shelf-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 46, 126, 0.7) 15%, rgba(192, 132, 252, 0.7) 85%, transparent);
  box-shadow:
    0 0 8px rgba(255, 46, 126, 0.6),
    0 0 20px rgba(255, 46, 126, 0.35),
    0 0 36px rgba(157, 78, 221, 0.25);
  pointer-events: none;
  z-index: 0;
}

.shelf-book {
  flex: 0 0 308px;             /* 6 本总宽 = 308 + 5*170 = 1158 ≈ main 1164 内容宽（99% 占满） */
  width: 308px;
  margin-left: -138px;          /* 重叠 45% = 308 * 0.45 ≈ 138 */
  position: relative;
  /* z-index 必须立即变（hover 进入即刻拔高），离开时延迟 0.35s 等 transform 回归 */
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0s 0.35s;
}

.shelf-book:first-child { margin-left: 0; }

/* 第 1 本不叠 */

/* z-index 从左到右递增：右书压左书 */

.shelf-book:nth-child(1) { z-index: 1; }

.shelf-book:nth-child(2) { z-index: 2; }

.shelf-book:nth-child(3) { z-index: 3; }

.shelf-book:nth-child(4) { z-index: 4; }

.shelf-book:nth-child(5) { z-index: 5; }

.shelf-book:nth-child(6) { z-index: 6; }

/* Hover / is-active：被选中书"抽出"——上移 + 微放大 + z 拔高 */

.shelf-book:hover,
.shelf-book.is-active {
  z-index: 99;
  transform: translateY(-20px) scale(1.05);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0s;
}

.shelf-book:hover .book-cover,
.shelf-book.is-active .book-cover {
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 46, 126, 0.45),
    0 0 32px rgba(255, 46, 126, 0.3);
}

/* 右侧兄弟书向右让位 */

.shelf-book:hover ~ .shelf-book,
.shelf-book.is-active ~ .shelf-book {
  transform: translateX(138px);
}

/* 书架卡的卡下方独立标题行隐藏（PC：标题已在封面内蒙层；H5：单独处理） */

.shelf-book .book-info { display: none; }

/* ============================================================
   shelf-book 内的文字布局优化（不影响下方 hscroll 楼层的 .book-card）
   - 标题字号略大（书架尺寸 280 比常规 ≈155 更宽，字号需匹配）
   - 标题与简介间距更大、分割线更明显
   - 简介行高更松，字号 13px 增加呼吸
   ============================================================ */

.shelf-book .bc-title-overlay {
  font-size: 19px;
  bottom: 18px;
  left: 18px;
  right: 18px;
}

.shelf-book:hover .bc-title-overlay,
.shelf-book.is-active .bc-title-overlay {
  bottom: 144px;
}

.shelf-book .bc-synopsis-overlay {
  font-size: 13px;
  line-height: 1.7;
  bottom: 18px;
  left: 18px;
  right: 18px;
  /* 分割线更可见 + 标题与简介之间留更多间距 */
  border-top: 0.5px solid rgba(255, 255, 255, 0.32);
  padding-top: var(--space-m);
  margin-top: var(--space-s);
  /* 行数减 1，避免文字撑满到顶 */
  -webkit-line-clamp: 4;
}

.shelf-book .bc-fade {
  /* 默认蒙层：从 50% 开始渐变，给标题更好的可读性 */
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 78%,
    rgba(0, 0, 0, 0.88) 100%);
}

.shelf-book:hover .bc-synopsis-overlay,
.shelf-book.is-active .bc-synopsis-overlay {
  opacity: 1;
  transition-delay: 0s;
}

.shelf-book:hover .bc-fade,
.shelf-book.is-active .bc-fade {
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 22%,
    rgba(0, 0, 0, 0.5) 38%,
    rgba(0, 0, 0, 0.92) 55%,
    rgba(0, 0, 0, 0.96) 100%);
}

/* 响应式 */

@media (max-width: 1280px) {
  .shelf-book { flex-basis: 240px; width: 240px; margin-left: -108px; }
  .shelf-book:hover ~ .shelf-book,
  .shelf-book.is-active ~ .shelf-book { transform: translateX(108px); }
}

@media (max-width: 980px) {
  .shelf-book { flex-basis: 190px; width: 190px; margin-left: -85px; }
  .shelf-book:hover,
  .shelf-book.is-active { transform: translateY(-14px) scale(1.04); }
  .shelf-book:hover ~ .shelf-book,
  .shelf-book.is-active ~ .shelf-book { transform: translateX(85px); }
}

@media (max-width: 640px) {
  /* 手机端：横滑，无叠放，is-active 无效 */
  .novel-shelf-hero {
    overflow-x: auto;
    justify-content: flex-start;
    padding: var(--space-m) var(--space-m) var(--space-m);
    scrollbar-width: none;
  }
  .novel-shelf-hero::-webkit-scrollbar { display: none; }
  .shelf-book { flex: 0 0 140px; width: 140px; margin-left: 10px; }
  .shelf-book:first-child { margin-left: 0; }
  .shelf-book:hover, .shelf-book.is-active,
  .shelf-book:hover ~ .shelf-book, .shelf-book.is-active ~ .shelf-book { transform: none; }
  .shelf-book .book-info { display: flex; }
  .novel-shelf-hero::after { display: none; }
}

/* ---------- 楼层 通用（沿用 .floor 的命名，但作用域更紧）---------- */

.novel-floor {
  margin-bottom: 44px;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.novel-floor.in-view { opacity: 1; transform: translateY(0); }

.novel-floor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-m);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-2);
  position: relative;
}

.novel-floor-head::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.novel-floor-title {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.floor-num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin-right: var(--space-s);
  letter-spacing: 0.08em;
}

.novel-floor-sub {
  margin: var(--space-xs) 0 0;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.novel-floor-head .right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.floor-more-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s;
}

.floor-more-link:hover { color: var(--accent); }

.floor-more-link .arr { margin-left: var(--space-xs); }

/* ---------- 横向滚动行（短篇 / 最新更新）---------- */

.hscroll-wrap {
  position: relative;
  margin: 0 calc(-1 * var(--space-s));
}

.hscroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 8, 32, 0.85);
  border: 1px solid var(--border-2);
  color: var(--text);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.18s, border-color 0.18s, opacity 0.18s;
}

.hscroll-btn:hover { background: var(--accent); border-color: var(--accent); }

.hscroll-btn-l { left: -6px; }

.hscroll-btn-r { right: -6px; }

.book-hscroll {
  display: grid;
  grid-auto-flow: column;
  /* 精确 6 列：(容器宽 − 5 个间距) ÷ 6，每列等宽，2:3 封面自动撑高 */
  grid-auto-columns: calc((100% - 5 * var(--space-m)) / 6);
  gap: var(--space-m);
  overflow-x: auto;
  /* padding-top 16px 为 hover 弹出（translateY + scale）留出空间；
     margin-top: -16px 补偿，不影响楼层整体间距 */
  padding: 16px var(--space-s) 12px;
  margin-top: -16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.book-hscroll::-webkit-scrollbar { display: none; }

.book-hscroll > .book-card {
  scroll-snap-align: start;
}

/* ---------- 网格（题材楼层）---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-m);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1280px) {
  .book-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 980px) {
  .novel-main { padding-top: 14px; padding-bottom: 30px; }
  .book-grid { grid-template-columns: repeat(4, 1fr); }
  .novel-floor-title { font-size: 18px; }
  .hscroll-btn { display: none; }
  .book-hscroll { grid-auto-columns: minmax(140px, 1fr); margin: 0 calc(-1 * var(--space-m)); padding: var(--space-s) var(--space-m) 12px; margin-top: 0; }
}

@media (max-width: 640px) {
  .book-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  /* H5 小说 3 列（视频列表为 2 列）：hscroll 转普通 3 列 grid */
  .book-hscroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: unset;
    overflow-x: visible;
    margin: 0;
    padding: 0;
    gap: 12px;
  }
}

/* ============================================================
   书封面左下角 views chip（继承全局 .views-chip 样式，仅微调 z-index）
   ============================================================ */

.book-cover .views-chip {
  z-index: 4;       /* 与 .bc-status (z:3) 同层级以上，确保不被 ::after 纹理遮挡 */
}

/* ============================================================
   连载更新行（用 lastCh / lastTime 替代 views 显示）
   ============================================================ */

.book-update {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ============================================================
   小说分类页 novel-category.html
   ============================================================ */

.nc-filter-card {
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 18px var(--space-l);
  margin-bottom: var(--space-m);
}

/* 简化后的类型切换行（窄屏横向滚动，chip 文案不换行不压缩） */

.nc-type-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nc-type-row::-webkit-scrollbar { display: none; }

.nc-type-btn {
  padding: 7px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nc-type-btn:hover { border-color: var(--accent); color: var(--text-1); }

.nc-type-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(255,46,126,0.4);
}

.nc-filter-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: start;
  gap: var(--space-m);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.nc-filter-row:last-child { border-bottom: none; }

.nc-filter-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 6px;
}

.nc-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.nc-fpill {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.15s;
}

.nc-fpill:hover { border-color: var(--accent-subtle); color: var(--text); }

.nc-fpill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(255, 46, 126, 0.4);
}

/* 已选条 */

.nc-selected-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px dashed var(--accent-subtle);
  border-radius: 8px;
  padding: 12px var(--space-m);
  margin-bottom: var(--space-m);
  background: rgba(255, 46, 126, 0.04);
}

.nc-selected-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
}

.nc-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.nc-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-xs) 10px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-subtle);
  color: var(--accent);
  font-size: 12px;
  border-radius: 999px;
  font-family: var(--sans);
}

.nc-selected-x {
  background: transparent;
  border: none;
  color: currentColor;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
}

.nc-selected-x:hover { opacity: 1; }

.nc-clear {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: var(--space-xs) 10px;
  text-transform: uppercase;
}

.nc-clear:hover { text-decoration: underline; }

/* 工具栏：数量 + 排序 */

.nc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: 10px 0 18px;
  flex-wrap: wrap;
}

.nc-count {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-2);
}

.nc-count em { color: var(--text); font-weight: 600; font-style: normal; margin: 0 2px; }

.nc-pool {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  margin-left: 6px;
}

.nc-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
}

.nc-sort-prefix {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
}

.nc-sort-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  transition: border-color 0.15s;
}

.nc-sort-btn:hover { border-color: var(--accent-subtle); }

.nc-sort-btn svg { transition: transform 0.18s; }

.nc-sort.is-open .nc-sort-btn svg { transform: rotate(180deg); }

.nc-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: var(--space-xs) 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
  z-index: 50;
}

.nc-sort.is-open .nc-sort-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s, transform 0.18s, visibility 0s;
}

.nc-sort-opt {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  padding: var(--space-s) 14px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s, color 0.15s;
}

.nc-sort-opt:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.nc-sort-opt.is-active { color: var(--accent); font-weight: 500; }

/* 结果网格 */

.nc-result-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-m);
  min-height: 200px;
}

.nc-result-grid[hidden] { display: none; }

/* 空态 */

.nc-empty {
  padding: 60px 28px;
  text-align: center;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.nc-empty[hidden] { display: none; }

.nc-empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.nc-empty-title {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.nc-empty-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.nc-empty-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--space-xs);
}

.nc-empty-btn {
  padding: var(--space-s) 18px;
  font-size: 12.5px;
  font-family: var(--sans);
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.nc-empty-btn--outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
}

.nc-empty-btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nc-empty-btn--solid {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 500;
}

.nc-empty-btn--solid:hover { box-shadow: 0 0 14px rgba(255, 46, 126, 0.4); }

.nc-empty-recs-label {
  margin: 20px 0 var(--space-xs);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nc-empty .book-grid {
  width: 100%;
  max-width: 720px;
  grid-template-columns: repeat(4, 1fr);
}

/* H5：空状态推荐与小说列表一致 3 列（需同特异性才能盖过上面的 4 列） */

@media (max-width: 640px) { .nc-empty .book-grid { grid-template-columns: repeat(3, 1fr); } }

/* 分页 */

.nc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 28px 0 var(--space-s);
  margin-top: 12px;
  flex-wrap: wrap;
}

.nc-pg-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
}

.nc-pg-btn:hover:not(:disabled) { border-color: var(--accent-subtle); color: var(--text); }

.nc-pg-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 46, 126, 0.4);
}

.nc-pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.nc-pg-ellipsis {
  color: var(--text-3);
  font-family: var(--mono);
  padding: 0 var(--space-xs);
}

/* 响应式 */

@media (max-width: 1280px) {
  .nc-result-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 980px) {
  .nc-result-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .nc-filter-card { padding: 18px; }
  .nc-filter-row { grid-template-columns: 70px 1fr; }
}

@media (max-width: 640px) {
  .nc-result-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .nc-filter-row { grid-template-columns: 1fr; gap: var(--space-s); }
  .nc-filter-label { padding-top: 0; }
}

/* ============================================================
   N3b · 小说详情页 novel-detail.html
   ============================================================ */

/* ---------- HERO ---------- */

.nd-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-bottom: 36px;
  align-items: start;
}

/* 左：封面 + 动作按钮 */

.nd-hero-cover {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.nd-hero-cover .book-cover {
  width: 100%;
  border-radius: 10px;
}

.nd-cover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nd-cover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}

.nd-cover-btn:hover {
  background: rgba(255, 46, 126, 0.08);
  border-color: rgba(255, 46, 126, 0.4);
  color: var(--accent);
}

.nd-cover-btn.is-on {
  background: rgba(255, 46, 126, 0.14);
  border-color: rgba(255, 46, 126, 0.55);
  color: var(--accent);
}

.nd-cover-btn svg { flex: none; }

/* 右：信息块 */

.nd-hero-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

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

.nd-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}

/* 标题行的状态徽章：从封面绝对定位 → 内联流式 */

.nd-title-row .bc-status {
  position: static;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: var(--space-xs) 9px;
}

.nd-author-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-3);
}

.nd-author-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s, opacity 0.15s;
}

.nd-author-link:hover { opacity: 0.8; color: var(--accent); }

.nd-follow-inline {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 46, 126, 0.55);
  color: var(--accent);
  padding: var(--space-xs) 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  white-space: nowrap;
}

.nd-follow-inline:hover {
  background: rgba(255, 46, 126, 0.14);
}

.nd-follow-inline.is-followed {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-2);
}

.nd-follow-inline.is-followed:hover {
  background: rgba(255, 46, 126, 0.1);
  border-color: rgba(255, 46, 126, 0.5);
  color: var(--accent);
}

.nd-meta-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nd-meta-line em {
  font-style: normal;
  color: var(--text-2);
  font-weight: 500;
}

.nd-meta-line .sep {
  color: var(--text-4, rgba(255, 255, 255, 0.2));
  font-weight: 400;
}

.nd-synopsis-wrap {
  padding: var(--space-m) 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.nd-synopsis {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.nd-synopsis.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nd-synopsis-toggle {
  margin-top: var(--space-s);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 12.5px;
  cursor: pointer;
  padding: var(--space-xs) 0;
  font-family: inherit;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.nd-synopsis-toggle:hover { opacity: 1; }

.nd-synopsis-toggle.is-expanded svg { transform: rotate(180deg); }

.nd-synopsis-toggle svg { transition: transform 0.2s; }

/* 自定义标签 chip 行 */

.nd-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.nd-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}

.nd-tag--custom {
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #F472B6 !important;
}

.nd-tag--custom:hover {
  background: rgba(244, 114, 182, 0.18);
  border-color: rgba(244, 114, 182, 0.55);
  color: #f9a8d4 !important;
  transform: translateY(-1px);
}

/* CTA 行 */

.nd-cta-row {
  display: flex;
  gap: 12px;
  margin-top: var(--space-xs);
  flex-wrap: wrap;
}

.nd-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  height: 46px;
  padding: 0 26px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
  cursor: pointer;
}

.nd-cta--primary {
  background: linear-gradient(135deg, var(--accent), #c026d3);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 46, 126, 0.35);
}

.nd-cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 46, 126, 0.5);
}

.nd-cta--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-2);
}

.nd-cta--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- F1 章节目录 ---------- */

.nd-chapter-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px 20px 6px;
}

.nd-chapter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
  flex-wrap: wrap;
}

.nd-chapter-total {
  font-size: 13px;
  color: var(--text-3);
}

.nd-chapter-total em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--mono);
  margin: 0 2px;
}

.nd-chapter-order {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
}

.nd-chapter-order button {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.nd-chapter-order button.is-active {
  background: var(--accent);
  color: #fff;
}

.nd-chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-s);
}

.nd-chapter-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
  min-width: 0;
}

.nd-chapter-cell:hover {
  background: rgba(255, 46, 126, 0.08);
  border-color: rgba(255, 46, 126, 0.35);
  color: var(--accent);
}

.nd-chapter-no {
  font-size: 10.5px;
  font-family: var(--mono);
  color: var(--text-4, rgba(255, 255, 255, 0.35));
  letter-spacing: 0.05em;
}

.nd-chapter-cell:hover .nd-chapter-no { color: var(--accent); }

.nd-chapter-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nd-chapter-expand-row {
  display: flex;
  justify-content: center;
  padding: 14px 0 var(--space-s);
}

.nd-chapter-expand-btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-2);
  font-size: 12.5px;
  padding: var(--space-s) 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.18s;
}

.nd-chapter-expand-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nd-chapter-expand-btn svg { transition: transform 0.2s; }

.nd-chapter-expand-btn.is-expanded svg { transform: rotate(180deg); }

/* ---------- F2 标签云 ---------- */

.nd-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nd-tagcloud-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s;
}

.nd-tagcloud-pill:hover {
  background: rgba(255, 46, 126, 0.1);
  border-color: rgba(255, 46, 126, 0.5);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- F3/F4 相关推荐：直接继承 .book-grid（repeat(6,1fr)），无需覆盖 ---------- */

/* ---------- 浮层提示 ---------- */

.nd-toast {
  position: absolute;
  z-index: 9999;
  transform: translate(-50%, 0) translateY(-4px);
  background: rgba(15, 8, 32, 0.95);
  color: #fff;
  font-size: 12.5px;
  padding: var(--space-s) 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 46, 126, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
}

.nd-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) translateY(0);
}

/* ---------- 404 视图 ---------- */

.nd-404 {
  max-width: 720px;
  margin: var(--space-xxl) auto;
  padding: 60px clamp(var(--space-m), 4vw, var(--space-xxl));
  text-align: center;
  min-height: calc(100vh - 200px);
}

.nd-404__icon {
  font-family: var(--mono);
  font-size: 92px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.nd-404__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-s);
}

.nd-404__sub {
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 30px;
}

.nd-404__action {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #c026d3);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 6px 18px rgba(255, 46, 126, 0.3);
}

.nd-404__action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 46, 126, 0.45);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1280px) {
  /* nd-related-grid 继承 .book-grid 响应式（1280px→5列） */
  .nd-chapter-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .nd-hero {
    grid-template-columns: 220px 1fr;
    gap: var(--space-l);
  }
  /* nd-related-grid 继承 .book-grid 响应式（980px→4列） */
  .nd-chapter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nd-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .nd-hero-cover {
    max-width: 200px;
    margin: 0 auto;
    width: 100%;
  }
  .nd-cover-actions { max-width: 100%; }
  .nd-title { font-size: 22px; }
  .nd-cta { width: 100%; }
  .nd-cta-row { flex-direction: column; }
  /* nd-related-grid 继承 .book-grid 响应式（640px→3列） */
  .nd-chapter-grid { grid-template-columns: 1fr; }
  .nd-chapter-card { padding: var(--space-m) 14px var(--space-xs); }
  .nd-synopsis-wrap { padding: 14px; }
  .nd-404 {
    margin: var(--space-xl) auto;
    padding: var(--space-xl) 20px;
  }
  .nd-404__icon { font-size: 68px; }
  .nd-404__title { font-size: 22px; }
}

/* ---------- 相关推荐 feed 流 ---------- */

.novel-feed-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.novel-feed-more {
  display: flex;
  justify-content: center;
  margin: 28px 0 0;
}

.novel-feed-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 32px;
  border-radius: 24px;
  border: 1px solid rgba(255,46,126,0.35);
  background: rgba(255,46,126,0.06);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.novel-feed-more-btn:hover {
  background: rgba(255,46,126,0.14);
  border-color: rgba(255,46,126,0.6);
}

.novel-feed-more-btn[disabled] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 1024px) { .novel-feed-grid { grid-template-columns: repeat(5, 1fr); } }

@media (max-width: 768px)  { .novel-feed-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

@media (max-width: 640px)  { .novel-feed-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
