:root {
  --novel-paper: #f3efe6;
  --novel-paper-deep: #e8dfd0;
  --novel-card: rgba(255, 253, 248, 0.88);
  --novel-ink: #24221f;
  --novel-muted: #777066;
  --novel-accent: #8b3f2f;
  --novel-accent-dark: #672c21;
  --novel-rule: rgba(74, 58, 45, 0.15);
  --reader-font-size: 20px;
}

.page-layout-novels,
.page-layout-novel,
.page-layout-chapter {
  background:
    radial-gradient(circle at 12% 12%, rgba(139, 63, 47, 0.055), transparent 28rem),
    linear-gradient(180deg, #f7f4ee 0, var(--novel-paper) 36rem, #eee8dd 100%);
  color: var(--novel-ink);
}

.page-layout-novels .header,
.page-layout-novel .header,
.page-layout-chapter .header {
  border-bottom-color: rgba(74, 58, 45, 0.12);
}

.novel-main,
.novel-reader-main {
  box-sizing: border-box;
  float: none !important;
  width: min(1120px, calc(100% - 258px)) !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: calc(210px + max(24px, (100vw - 1330px) / 2)) !important;
  padding: 72px 0 96px !important;
}

.novel-kicker {
  margin: 0 0 14px;
  color: var(--novel-accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.novel-shelf-hero {
  max-width: 820px;
  margin-bottom: 56px;
}

.novel-shelf-hero h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.novel-shelf-intro {
  max-width: 700px;
  margin: 26px 0 0;
  color: var(--novel-muted);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 18px;
  line-height: 1.9;
}

.novel-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: stretch;
  padding: 32px;
  overflow: hidden;
  background: var(--novel-card);
  border: 1px solid var(--novel-rule);
  border-radius: 6px;
  box-shadow: 0 28px 72px rgba(66, 50, 37, 0.08);
}

.novel-cover {
  position: relative;
  display: block;
  aspect-ratio: 1055 / 1491;
  overflow: hidden;
  text-decoration: none !important;
  background: #d8d2b8;
  border: 1px solid rgba(59, 69, 58, 0.14);
  border-radius: 3px 9px 9px 3px;
  box-shadow: -8px 12px 24px rgba(34, 47, 38, 0.18), inset 9px 0 18px rgba(255,255,255,.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.novel-cover::after {
  position: absolute;
  content: "";
}

.novel-cover::after {
  top: 0;
  bottom: 0;
  left: 17px;
  width: 1px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 3px 0 rgba(39, 51, 43, 0.15);
  pointer-events: none;
}

a.novel-cover:hover {
  transform: translateY(-4px);
  box-shadow: -9px 19px 34px rgba(34, 47, 38, 0.24), inset 9px 0 18px rgba(255,255,255,.08);
}

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

.novel-card-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px 14px 0;
}

.novel-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--novel-muted);
  font-size: 13px;
}

.novel-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: var(--novel-accent-dark);
  font-weight: 700;
  line-height: 1;
  background: rgba(139, 63, 47, 0.1);
  border-radius: 999px;
}

.novel-card-content h2 {
  margin: 20px 0 16px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 38px;
  line-height: 1.2;
}

.novel-card-content h2 a {
  color: var(--novel-ink);
  text-decoration: none;
}

.novel-card-content > p,
.novel-summary {
  margin: 0;
  color: #5e5851;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  line-height: 1.9;
}

.novel-card-content blockquote,
.novel-featured-quote {
  margin: 24px 0 22px;
  padding: 2px 0 2px 18px;
  color: #5a5148;
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  font-style: normal;
  line-height: 1.8;
  border-left: 2px solid var(--novel-accent);
}

.novel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.novel-tags span {
  padding: 5px 9px;
  color: var(--novel-muted);
  font-size: 12px;
  border: 1px solid var(--novel-rule);
  border-radius: 2px;
}

.novel-enter,
.novel-primary-action {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 16px;
  color: var(--novel-accent-dark) !important;
  font-weight: 700;
  text-decoration: none !important;
}

.novel-primary-action {
  margin-top: 28px;
  padding: 12px 20px;
  color: #fff8ef !important;
  background: var(--novel-accent);
  border-radius: 2px;
}

.novel-primary-action:hover {
  background: var(--novel-accent-dark);
}

.novel-creation-note {
  margin-top: 38px;
  padding: 20px 24px;
  color: var(--novel-muted);
  font-size: 13px;
  line-height: 1.75;
  background: rgba(255, 253, 248, 0.48);
  border: 1px solid var(--novel-rule);
  border-radius: 4px;
}

.novel-creation-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--novel-ink);
}

.novel-creation-note p {
  margin: 0;
}

.novel-back {
  margin-bottom: 34px;
}

.novel-back a {
  color: var(--novel-muted);
  font-size: 13px;
  text-decoration: none;
}

.novel-detail {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.novel-cover-large {
  min-height: 0;
}

.novel-detail-copy h1 {
  margin: 0 0 14px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.12;
}

.novel-subtitle {
  margin: 0 0 24px;
  color: var(--novel-muted);
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  line-height: 1.75;
}

.novel-volume {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 10px;
  color: var(--novel-accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(139, 63, 47, 0.08);
  border: 1px solid rgba(139, 63, 47, 0.16);
  border-radius: 2px;
}

.novel-summary {
  max-width: 680px;
  margin-top: 28px;
}

.novel-directory {
  margin-top: 76px;
  padding-top: 38px;
  border-top: 1px solid var(--novel-rule);
}

.novel-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.novel-section-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
}

.novel-section-heading > span {
  color: var(--novel-muted);
  font-size: 12px;
}

.chapter-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--novel-rule);
}

.chapter-list li {
  margin: 0;
  border-bottom: 1px solid var(--novel-rule);
}

.chapter-list a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 112px 24px;
  gap: 16px;
  align-items: center;
  padding: 22px 10px;
  color: var(--novel-ink) !important;
  text-decoration: none !important;
  transition: padding 160ms ease, background 160ms ease;
}

.chapter-list a:hover {
  padding-right: 16px;
  padding-left: 16px;
  background: rgba(255, 253, 248, 0.56);
}

.chapter-index,
.chapter-date,
.chapter-arrow {
  color: var(--novel-muted);
  font-size: 12px;
}

.chapter-name {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
}

.chapter-arrow {
  font-size: 17px;
  text-align: right;
}

.novel-reader-main {
  width: min(900px, calc(100% - 258px)) !important;
  margin-left: calc(210px + max(24px, (100vw - 1110px) / 2)) !important;
  padding-top: 38px !important;
}

.reading-progress {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--novel-accent);
  transition: width 80ms linear;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 72px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--novel-rule);
}

.reader-back {
  color: var(--novel-muted) !important;
  font-size: 13px;
  text-decoration: none !important;
}

.reader-controls {
  display: flex;
  gap: 6px;
}

.reader-controls button {
  min-width: 42px;
  padding: 7px 10px;
  color: var(--novel-muted);
  font-family: inherit;
  font-size: 12px;
  background: rgba(255, 253, 248, 0.56);
  border: 1px solid var(--novel-rule);
  border-radius: 2px;
  cursor: pointer;
}

.reader-controls button:hover,
.reader-controls button:focus-visible {
  color: var(--novel-accent-dark);
  border-color: rgba(139, 63, 47, 0.44);
  outline: none;
}

.novel-chapter {
  max-width: 760px;
  margin: 0 auto;
}

.chapter-header {
  margin-bottom: 64px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--novel-rule);
}

.chapter-header h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.chapter-lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--novel-muted);
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  line-height: 1.85;
}

.chapter-body {
  color: var(--novel-ink);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: var(--reader-font-size);
  line-height: 2.05;
  letter-spacing: 0.025em;
}

.chapter-body p {
  margin: 0 0 1.55em;
}

.chapter-body blockquote {
  margin: 2.2em 0;
  padding: 0.2em 0 0.2em 1.4em;
  color: var(--novel-muted);
  font-style: normal;
  border-left: 2px solid var(--novel-accent);
}

.chapter-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 760px;
  margin: 80px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--novel-rule);
}

.chapter-navigation a {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 18px;
  color: var(--novel-ink) !important;
  text-decoration: none !important;
  background: rgba(255, 253, 248, 0.54);
  border: 1px solid var(--novel-rule);
  border-radius: 3px;
}

.chapter-navigation a:hover {
  border-color: rgba(139, 63, 47, 0.4);
}

.chapter-navigation span {
  margin-bottom: 5px;
  color: var(--novel-muted);
  font-size: 11px;
}

.chapter-navigation strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
}

.chapter-nav-next {
  text-align: right;
}

.page-layout-chapter.novel-night {
  --novel-paper: #1e201f;
  --novel-paper-deep: #181a19;
  --novel-card: rgba(43, 45, 43, 0.86);
  --novel-ink: #d9d2c5;
  --novel-muted: #aaa397;
  --novel-accent: #c17663;
  --novel-accent-dark: #db9785;
  --novel-rule: rgba(226, 215, 199, 0.12);
  background: linear-gradient(180deg, #242624 0, #1d1f1e 60%, #181a19 100%);
}

.novel-night .header,
.novel-night .footer {
  filter: brightness(.82) saturate(.7);
}

.novel-night .reader-controls button,
.novel-night .chapter-navigation a {
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 860px) {
  .novel-main,
  .novel-reader-main {
    width: min(100% - 32px, 720px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-top: 46px !important;
  }

  .novel-card,
  .novel-detail {
    grid-template-columns: 1fr;
  }

  .novel-card {
    gap: 32px;
  }

  .novel-cover,
  .novel-cover-large {
    width: min(100%, 290px);
    min-height: 0;
    margin: 0 auto;
  }

  .novel-card-content {
    padding: 0 4px 8px;
  }

  .novel-detail-copy {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .novel-main,
  .novel-reader-main {
    width: calc(100% - 24px) !important;
    padding-bottom: 64px !important;
  }

  .novel-shelf-hero {
    margin-bottom: 36px;
  }

  .novel-shelf-hero h1 {
    font-size: 38px;
  }

  .novel-card {
    padding: 18px;
    border-radius: 4px;
  }

  .novel-cover,
  .novel-cover-large {
    min-height: 0;
  }

  .novel-detail {
    gap: 38px;
  }

  .novel-detail-copy h1 {
    font-size: 46px;
  }

  .chapter-list a {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 18px 4px;
  }

  .chapter-date {
    display: none;
  }

  .reader-toolbar {
    margin-bottom: 48px;
  }

  .reader-back {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reader-controls button {
    min-width: 38px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .chapter-header {
    margin-bottom: 42px;
  }

  .chapter-header h1 {
    font-size: 42px;
  }

  .chapter-body {
    line-height: 1.95;
  }

  .chapter-navigation {
    grid-template-columns: 1fr;
  }

  .chapter-nav-placeholder {
    display: none;
  }

  .chapter-nav-next {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .novel-cover,
  .chapter-list a,
  .reading-progress span {
    transition: none;
  }
}
