:root {
  color-scheme: dark;
  --bg: #14110d;
  --ink: #e7ddcd;
  --ink-soft: #9a8f7d;
  --accent: #cda878;
  --rule: rgba(205, 168, 120, 0.28);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "Source Han Serif CN", "Georgia", "Times New Roman", serif;
  font-size: clamp(1.06rem, 1rem + 0.45vw, 1.22rem);
  line-height: 1.95;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 16%, rgba(205, 168, 120, 0.08), transparent 26rem),
    radial-gradient(circle at 15% 72%, rgba(231, 221, 205, 0.035), transparent 20rem);
  opacity: 0.7;
}

::selection {
  background: rgba(205, 168, 120, 0.25);
  color: #fff;
}

.page {
  max-width: 33rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vh, 7rem) 1.5rem clamp(4rem, 12vh, 9rem);
}

.title {
  margin: 0 0 0.6em;
  font-size: clamp(1.7rem, 1.35rem + 2.1vw, 2.35rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}

.title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 1.4rem auto 0;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

article {
  margin-top: clamp(2.5rem, 6vh, 4rem);
}

p {
  margin: 0 0 1.5em;
  /* 任由字句靠左，不强其两端对齐——免得标点被拉开，行间淌出河来 */
  text-align: left;
  word-break: normal;
  line-break: strict;
}

strong {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.015em;
}

a {
  color: var(--accent);
  text-underline-offset: 0.24em;
}

blockquote {
  margin: 0 0 1.5em;
  padding: 0.1em 0 0.1em 1.3rem;
  border-left: 2px solid var(--rule);
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95em;
  line-height: 1.85;
}

blockquote p {
  margin: 0 0 0.7em;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* 节与节之间的沉默，落一记星花 */
.sep {
  border: 0;
  overflow: visible;
  line-height: 1;
  margin: clamp(2.75rem, 6vh, 3.75rem) 0;
  text-align: center;
}

.sep::before {
  content: "⁂";
  color: var(--rule);
  font-size: 1.05rem;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  user-select: none;
}

/* 终章的印记——开头那一笔，至今没被抹去 */
.seal {
  margin-top: 1.6rem;
  padding: 0;
  border: 0;
  text-align: center;
  font-style: italic;
  font-size: 1.32em;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(205, 168, 120, 0.22);
}

@media (max-width: 30rem) {
  body {
    line-height: 1.9;
  }

  .page {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* 失页：此处无字 */
.notfound {
  max-width: 33rem;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.notfound .title {
  margin: 0;
}

.notfound p {
  margin: 0;
  max-width: 26rem;
}

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

.quiet {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95em;
}
