/* Novel index and reading pages */
.novel-site-link { color: var(--gold); text-decoration: underline; text-underline-offset: .2em; }
.novel-index-shell {
  max-width: 50rem;
  margin: 2rem auto 3rem;
  padding: 2rem clamp(1.2rem, 5vw, 3.5rem);
  border-radius: .55rem;
  background: #fcf8ef;
  color: #262d28;
}
.novel-kicker { color: #535f4c; font-size: .85rem; letter-spacing: .12em; }
.novel-index-intro {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 2rem);
}
.novel-index-cover { width: 100%; height: auto; box-shadow: 0 .3rem .9rem #25231e35; }
.novel-index-intro h1 { margin: .55rem 0 .85rem; font-size: clamp(1.55rem, 4vw, 2.45rem); line-height: 1.55; }
@media (max-width: 540px) {
  .novel-index-intro { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .novel-index-cover { width: min(43vw, 9rem); }
}
.novel-byline { color: #535a50; }
.novel-synopsis { margin: 1.4rem 0; max-width: 40em; line-height: 1.95; }
.novel-index-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.novel-main-action, .novel-secondary-action {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  border-radius: .28rem; padding: .5rem .9rem; font-weight: 700;
}
.novel-main-action { background: #17392f; color: #fff8e7; }
.novel-secondary-action { border: 1px solid #6d7e67; color: #17392f; }
.episode-list { margin-top: 2.4rem; }
.episode-list-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.episode-list-header h2 { margin: 0; }
.episode-list-header a { color: #21584b; text-decoration: underline; text-underline-offset: .2em; }
#episode-count { color: #535a50; font-size: .9rem; }
.episode-search { display: grid; gap: .25rem; margin: 1rem 0; font-size: .88rem; }
.episode-search input {
  width: 100%; min-height: 2.75rem; padding: .45rem .7rem;
  border: 1px solid #8a9384; border-radius: .25rem; background: #fffdf7; color: #262d28; font-size: 1rem;
}
#episode-rows { padding: 0; margin: 0; list-style: none; }
#episode-rows li { border-top: 1px solid #dedbd0; }
#episode-rows a { display: grid; grid-template-columns: 5.3rem minmax(0, 1fr); gap: .4rem; padding: .75rem .25rem; align-items: baseline; color: #263c34; }
#episode-rows a:hover { background: #eee9da; }
.episode-number { font-size: .83rem; color: #565e50; }
.episode-name { text-decoration: underline; text-decoration-color: #849488; text-underline-offset: .16em; overflow-wrap: anywhere; }

.novel-reading-page .reader-heading { display: none; }
.novel-reading-page .novel-reader-main { padding-top: 1.3rem; }
.novel-article .novel-series-link { color: inherit; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: .22em; font-size: .9rem; }
.novel-article-heading { margin: 1.55rem 0 1.75rem; padding: 0 0 1.1rem; border-bottom: 1px solid #8f91876b; }
.novel-article-heading h1 { margin: .35rem 0 0; font-size: clamp(1.45rem, 4.2vw, 2.2rem); line-height: 1.55; overflow-wrap: anywhere; }
.novel-article .novel-position { color: inherit; opacity: .8; margin: .25rem 0; }
.novel-reading-page .novel-body {
  max-width: 38em; margin: 0 auto; font-size: var(--novel-size, 18px);
  line-height: var(--novel-leading, 1.95); letter-spacing: .015em; white-space: pre-wrap;
  text-wrap: wrap; overflow-wrap: anywhere;
}
.novel-reader-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: 1.2rem 0; font: 600 .9rem var(--sans); }
.novel-reader-nav a, .novel-reader-nav span {
  display: flex; align-items: center; justify-content: center; min-height: 2.75rem;
  text-align: center; padding: .4rem; border: 1px solid #8f9187; border-radius: .3rem;
}
.novel-reader-nav span { opacity: .48; }
.novel-reader-nav a { color: inherit; text-decoration: underline; text-underline-offset: .17em; }
.novel-reader-nav a[data-forward] { background: #17392f; color: #fff8e7; border-color: #416358; }
.novel-reader-nav.is-bottom { margin-top: 1.6rem; border-top: 1px solid #8f91876b; }
.novel-reader-nav.is-top { padding-bottom: 0; }
.novel-toc-page-link { display: inline-block; margin: .4rem 0 1rem; color: var(--gold); text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 720px) {
  .novel-index-shell { margin: 0 auto 2rem; border-radius: 0; }
  .novel-reading-page .novel-reader-main { padding-inline: 1.15rem; }
  .novel-reader-nav { gap: .35rem; }
  #episode-rows a { grid-template-columns: 4.2rem minmax(0, 1fr); }
}
