/* Shared palette, type and spacing. WenKai subsets are served from this site. */
:root {
  color-scheme: light;
  --paper: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #eef2ff;
  --ink: #1e293b;
  --muted: #475569;
  --accent: #4338ca;
  --accent-hover: #312e81;
  --line: #cbd5e1;
  --focus: #4f46e5;
  --button-bg: #4338ca;
  --button-ink: #ffffff;
  --font-text: "LXGW WenKai Screen", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: var(--font-text);
  --sans: var(--font-text);
  --font-code: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wide: 72rem;
  --reading: 40rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-section: clamp(3rem, 6vw, 5rem);
  --radius: 4px;
  --shadow: 0 12px 32px #0f172a12;
  --body-size: 1.2rem;
  --reading-leading: 1.85;
  --speed: 160ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111827;
  --surface: #172033;
  --surface-raised: #243047;
  --ink: #f1f5f9;
  --muted: #b8c5d6;
  --accent: #a5b4fc;
  --accent-hover: #c7d2fe;
  --line: #42516b;
  --focus: #a5b4fc;
  --button-bg: #a5b4fc;
  --button-ink: #111827;
  --shadow: 0 12px 32px #0003;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111827;
    --surface: #172033;
    --surface-raised: #243047;
    --ink: #f1f5f9;
    --muted: #b8c5d6;
    --accent: #a5b4fc;
    --accent-hover: #c7d2fe;
    --line: #42516b;
    --focus: #a5b4fc;
    --button-bg: #a5b4fc;
    --button-ink: #111827;
    --shadow: 0 12px 32px #0003;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: 0;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea,
option,
optgroup {
  font: inherit;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-code);
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  touch-action: manipulation;
}

a {
  color: var(--accent);
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-hover);
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .4;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

::selection {
  background: var(--button-bg);
  color: var(--button-ink);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: .7rem 1rem;
  background: var(--surface);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.measure-wide,
.site-header,
.site-footer {
  width: min(var(--wide), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.measure-reading {
  width: min(var(--reading), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* The publication masthead remains small and in normal document flow. */
.site-header {
  display: flex;
  gap: 2rem;
  align-items: center;
  min-height: 6rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font: 1.2rem var(--serif);
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--ink);
}

.brand-icon {
  flex: 0 0 auto;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}

.theme-toggle:hover {
  background: var(--surface-raised);
}

.theme-toggle [data-theme-icon] {
  font: 1.25rem/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.theme-toggle [data-theme-icon]::before { content: '🖥️'; }
:root[data-theme="light"] .theme-toggle [data-theme-icon]::before { content: '☀️'; }
:root[data-theme="dark"] .theme-toggle [data-theme-icon]::before { content: '🌙'; }

:root[data-navigating] { cursor: progress; }
:root[data-navigating]::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font: 650 .7rem/1.5 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.button-link {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--button-ink);
  font: 600 .9rem/1.5 var(--sans);
  text-decoration: none;
  transition: box-shadow var(--speed);
}

.button-link:hover {
  color: var(--button-ink);
  box-shadow: 0 0 0 3px var(--line);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  font: 600 .86rem/1.5 var(--sans);
}

.novel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.resume-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.25rem;
  border-left: 2px solid var(--accent);
  padding: .45rem 1rem;
  font-size: .9rem;
  text-decoration: none;
}

.resume-link:hover {
  background: var(--surface-raised);
}

.resume-link small {
  display: block;
  color: var(--muted);
  margin-top: .2rem;
  font-size: .75rem;
}

/* A compact introduction and a single editorial feature, using existing artwork. */
.home-intro {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.home-intro h1 {
  margin: .6rem 0 1rem;
  font: 400 clamp(2.65rem, 5.5vw, 4.7rem)/1.12 var(--serif);
  letter-spacing: -.04em;
}

.home-intro h1 em {
  font-weight: 400;
  color: var(--accent);
}

.home-intro__lede {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--muted);
}

.home-intro>.button-link {
  margin-top: 1.5rem;
}

.featured-section {
  width: min(var(--wide), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
}

.featured-section .measure-wide {
  width: 100%;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.section-label>p:last-child {
  margin: 0;
  font-size: .75rem;
  color: var(--muted);
}

.featured-novel {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: 2.5rem;
}

.featured-novel__cover-link {
  display: block;
  box-shadow: 8px 12px 24px #0002;
}

.novel-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--surface-raised);
  border-radius: 2px;
}

.novel-cover--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 4rem var(--serif);
}

.featured-novel h2 {
  margin: .65rem 0;
  font: 400 clamp(2rem, 3.8vw, 3.6rem)/1.1 var(--serif);
  letter-spacing: -.035em;
}

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

.featured-novel__subtitle {
  color: var(--accent);
  font: italic 1.15rem/1.55 var(--serif);
}

.featured-novel__copy>p:not(.kicker, .featured-novel__subtitle) {
  color: var(--muted);
  font-size: .94rem;
}

.novel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font: .75rem/1.6 var(--sans);
}

.home-note {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem 3rem;
  padding-block: var(--space-section);
}

.home-note .kicker {
  grid-row: 1 / 4;
}

.home-note h2 {
  max-width: 28ch;
  margin: 0;
  font: 400 clamp(1.7rem, 3vw, 2.5rem)/1.25 var(--serif);
}

.home-note>p:not(.kicker) {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
}

/* Library, About, legal and error pages share the same typography. */
.page-shell {
  min-height: 65vh;
  padding-block: var(--space-section);
}

.page-heading {
  margin-bottom: 2.5rem;
}

.page-heading h1 {
  max-width: 18ch;
  margin: .7rem 0 0;
  font: 400 clamp(2.4rem, 5.5vw, 4.4rem)/1.12 var(--serif);
  letter-spacing: -.035em;
}

.page-heading>p:last-child:not(.kicker) {
  color: var(--muted);
  max-width: 40rem;
}

.library-list {
  border-top: 1px solid var(--line);
}

.library-item {
  border-bottom: 1px solid var(--line);
  padding-block: 2rem;
}

.library-item>a:not(.resume-link),
.library-item--upcoming {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  color: inherit;
  text-decoration: none;
}

.library-item>a:hover h2 {
  color: var(--accent);
}

.library-item__body {
  align-self: center;
  max-width: 45rem;
}

.library-item h2 {
  margin: .5rem 0;
  font: 400 clamp(1.7rem, 3vw, 2.6rem)/1.18 var(--serif);
}

.library-item__subtitle {
  color: var(--accent);
  font: italic 1.1rem/1.5 var(--serif);
}

.library-item__body>p:not(.kicker, .library-item__subtitle) {
  color: var(--muted);
  font-size: .94rem;
}

.library-item .resume-link {
  margin-left: clamp(10.25rem, 13vw, 12rem);
}

.prose-page {
  font-family: var(--serif);
}

.prose-page__body,
.prose-page section {
  font-size: 1.15rem;
  line-height: 1.85;
}

.prose-page section {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}

.prose-page section h2 {
  font-size: 1.65rem;
  font-weight: 400;
  margin: .25rem 0 1rem;
}

.prose-page section p,
.prose-page__body p {
  margin: 0 0 1.2em;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.75rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

.site-footer p {
  margin: 0;
}

.site-footer__brand>p:last-child {
  margin-top: .7rem;
}

.wordmark--footer {
  font-size: 1.2rem;
}

.site-footer__links {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

.not-found {
  min-height: 65vh;
  padding-block: var(--space-section);
}

.not-found h1 {
  font: 400 clamp(2.5rem, 6vw, 4rem)/1.15 var(--serif);
}

/* The novel: bounded line length, natural paragraph rhythm and reachable navigation. */
.page-novel {
  background: var(--surface);
}

.reading-progress {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}

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

.reader-shell {
  display: grid;
  grid-template-columns: 14rem minmax(0, var(--reading));
  justify-content: center;
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(var(--wide), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding-block: var(--space-section);
}

.reader-sidebar {
  position: sticky;
  top: 2rem;
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: .5rem;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font: .82rem var(--sans);
  text-decoration: none;
}

.reader-sidebar__cover {
  width: 6rem;
  margin: 1rem 0 2rem;
}

.reader-contents ol {
  display: grid;
  gap: .2rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.reader-contents a {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .65rem .5rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  font: .92rem/1.45 var(--serif);
  text-decoration: none;
}

.reader-contents a span {
  color: var(--accent);
  font: .65rem var(--sans);
}

.reader-contents a:hover,
.reader-contents a[aria-current="true"] {
  color: var(--ink);
  background: var(--surface-raised);
  border-left-color: var(--accent);
}

.reader-article {
  min-width: 0;
}

.novel-heading {
  padding-bottom: 2rem;
}

.novel-heading h1 {
  scroll-margin-top: 1rem;
  margin: .65rem 0 1.2rem;
  font: 400 clamp(2.6rem, 4.7vw, 4rem)/1.12 var(--serif);
  letter-spacing: -.035em;
}

.novel-heading__subtitle {
  color: var(--accent);
  font: italic 1.2rem/1.6 var(--serif);
}

.novel-heading__description {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.75;
}

.reader-tools {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  gap: .5rem;
  align-items: center;
  min-height: 76px;
  padding: .5rem 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.reader-tools [data-reader-steps][hidden] { display: flex !important; visibility: hidden; }
.reader-tools [data-reader-type][hidden] { display: block !important; visibility: hidden; }
@media (min-width: 601px) {
  .reader-tools [data-progress-label][hidden] { display: inline-block !important; visibility: hidden; }
}

.chapter-picker {
  flex: 1;
  min-width: 0;
}

.chapter-picker summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: .25rem .5rem;
  cursor: pointer;
  list-style: none;
}

.chapter-picker summary::-webkit-details-marker,
.reader-settings summary::-webkit-details-marker {
  display: none;
}

.chapter-picker__label {
  font: 600 .72rem/1.6 var(--sans);
  color: var(--accent);
}

.chapter-picker [data-current-chapter] {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: .85rem/1.6 var(--sans);
}

.chapter-picker nav,
.reader-settings__panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  left: 0;
  max-height: min(60dvh, 30rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.reader-tools__steps,
.reader-tools__type {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.reader-tools button,
.reader-settings summary {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 1rem var(--sans);
}

.reader-tools button:hover:not(:disabled),
.reader-settings summary:hover {
  background: var(--surface-raised);
}

.reader-settings summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
}

.reader-settings__panel {
  left: auto;
  width: min(19rem, 100%);
}

.reader-tools__type {
  justify-content: space-between;
  margin-top: 1rem;
}

.reader-settings__panel>p:last-child {
  margin-bottom: 0;
  font-size: .78rem;
  color: var(--muted);
}

.reader-percentage {
  width: 2.5rem;
  text-align: right;
  color: var(--muted);
  font: .7rem var(--sans);
  font-variant-numeric: tabular-nums;
}

.novel-body {
  font: var(--body-size)/var(--reading-leading) var(--serif);
  overflow-wrap: break-word;
}

.novel-body h2 {
  scroll-margin-top: 6rem;
  margin: 4rem 0 1.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  font: 400 clamp(1.8rem, 3.3vw, 2.55rem)/1.22 var(--serif);
  letter-spacing: -.02em;
}

.novel-chapter:first-child h2 {
  border: 0;
  padding-top: 0;
  margin-top: 2.75rem;
}

.novel-body h3,
.novel-body h4 {
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.novel-body p {
  margin: 0 0 1.1em;
}

.novel-body h2+p:has(> em:only-child) {
  color: var(--muted);
  margin-bottom: 2rem;
}

.novel-body blockquote {
  margin: 2rem 0;
  border-left: 2px solid var(--accent);
  padding-left: 1.3rem;
  color: var(--muted);
}

.novel-body ul,
.novel-body ol {
  padding-left: 1.4rem;
}

.novel-body hr {
  width: 4rem;
  margin: 3rem auto;
  border: 0;
  border-top: 1px solid var(--line);
}

.novel-body img {
  margin: 2rem auto;
  width: auto;
  max-height: 46rem;
  object-fit: contain;
}

.novel-body pre {
  overflow-x: auto;
  font-size: .8em;
}

.chapter-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.chapter-pagination a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  min-height: 80px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 var(--serif);
  text-decoration: none;
}

.chapter-pagination a:hover {
  border-color: var(--accent);
}

.chapter-pagination a:nth-child(2) {
  text-align: right;
}

.chapter-pagination a span {
  color: var(--accent);
  font: 600 .68rem/1.5 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.chapter-return {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .75rem;
  font: .78rem var(--sans);
}

.chapter-return a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

.novel-end {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.novel-end p {
  font: italic 1.3rem var(--serif);
  color: var(--muted);
}

@media (max-width: 900px) {
  .reader-shell {
    grid-template-columns: minmax(0, var(--reading));
    gap: 1rem;
    padding-top: 1rem;
  }

  .reader-sidebar {
    position: static;
    padding: 0;
  }

  .reader-sidebar__cover,
  .reader-sidebar>.reader-contents {
    display: none;
  }

  .novel-heading h1 {
    font-size: clamp(2.6rem, 6vw, 4rem);
  }
}

@media (max-width: 600px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .2rem 1rem;
    padding-block: .85rem .4rem;
  }

  .wordmark {
    font-size: 1.08rem;
    gap: .4rem;
  }

  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    margin: 0;
    gap: 1.8rem;
  }

  .site-nav a {
    font-size: .82rem;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .home-intro {
    text-align: left;
  }

  .home-intro h1 {
    max-width: none;
    font-size: clamp(2rem, 8.5vw, 3rem);
  }

  .home-intro__lede {
    margin: 0;
  }

  .featured-novel {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: .7rem 1rem;
    padding-block: 1.75rem;
  }

  .featured-novel__cover-link {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 100%;
    align-self: start;
  }

  .featured-novel__copy {
    display: contents;
  }

  .featured-novel__copy>* {
    grid-column: 2;
    margin-block: 0;
  }

  .featured-novel h2 {
    max-width: 17ch;
    font-size: 1.8rem;
  }

  .featured-novel__subtitle {
    grid-column: 1 / -1;
    font-size: 1rem;
    margin-top: .5rem;
  }

  .featured-novel__copy>p:not(.kicker, .featured-novel__subtitle),
  .featured-novel .novel-meta,
  .featured-novel .novel-actions,
  .featured-novel .resume-link {
    grid-column: 1 / -1;
  }

  .featured-novel__copy>p:not(.kicker, .featured-novel__subtitle) {
    margin-top: .6rem;
  }

  .featured-novel .novel-actions {
    margin-top: .75rem;
  }

  .featured-novel .resume-link {
    margin-top: .5rem;
  }

  .section-label>p:last-child {
    font-size: .65rem;
  }

  .home-note {
    grid-template-columns: 1fr;
  }

  .home-note .kicker {
    grid-row: auto;
  }

  .library-item>a:not(.resume-link),
  .library-item--upcoming {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .library-item__body>p:not(.kicker) {
    grid-column: 1 / -1;
  }

  .library-item .resume-link {
    margin-left: 0;
  }

  .site-footer {
    gap: 1.25rem;
  }

  .reader-tools {
    gap: .25rem;
  }

  .reader-percentage {
    display: none;
  }

  .chapter-picker summary {
    padding-inline: 0 .5rem;
  }

  .chapter-picker [data-current-chapter] {
    font-size: .75rem;
  }

  .chapter-pagination {
    gap: .65rem;
  }

  .chapter-pagination a {
    font-size: .9rem;
    padding: .8rem;
  }
}

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

  .chapter-pagination>span {
    display: none;
  }

  .chapter-pagination a:nth-child(2) {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  :root {
    color-scheme: light;
    --ink: #222;
    --muted: #444;
    --accent: #333;
    --line: #ccc;
  }

  body,
  .page-novel {
    background: white;
    color: #222;
  }

  .site-header,
  .site-footer,
  .reader-sidebar,
  .reader-tools,
  .reading-progress,
  .chapter-pagination,
  .chapter-return,
  .novel-end,
  .resume-link {
    display: none !important;
  }

  .reader-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .novel-body {
    font-size: 11pt !important;
  }

  .novel-body h2 {
    break-after: avoid;
  }

  .novel-body p {
    orphans: 3;
    widows: 3;
  }
}

.empty-state {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: var(--space-section);
}

.empty-state h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.empty-state p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
}
