:root {
  --bg: #f5f1e8;
  --panel: #fffdf8;
  --panel-strong: #f1eadb;
  --text: #2a241f;
  --muted: #6c6256;
  --line: #d9cfbf;
  --accent: #8a4d2f;
  --accent-dark: #6b3720;
  --max-width: 1160px;
  --reading-width: 760px;
  --shadow: 0 18px 45px rgba(58, 42, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "PingFang SC", serif;
  background:
    radial-gradient(circle at top, rgba(138, 77, 47, 0.06), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.85;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(138, 77, 47, 0.08);
  font-size: 0.92em;
}

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(138, 77, 47, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.hero {
  padding: 72px 0 64px;
}

.panel {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(138, 77, 47, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 28px 32px;
}

.hero-cover {
  width: 100%;
  max-width: 144px;
}

.cover-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(138, 77, 47, 0.12);
  background: linear-gradient(180deg, rgba(241, 234, 219, 0.92), rgba(255, 253, 248, 0.9));
}

.cover-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.story-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--accent-dark);
  font-size: 0.82rem;
}

.story-title {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.story-meta,
.chapter-meta,
.reading-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.story-summary {
  width: 100%;
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(241, 234, 219, 0.58);
  border: 1px solid rgba(138, 77, 47, 0.08);
}

.story-summary p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.96rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
  background: var(--accent);
  color: #fffaf5;
  box-shadow: 0 12px 24px rgba(138, 77, 47, 0.18);
}

.button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.button-secondary:hover {
  background: rgba(138, 77, 47, 0.05);
}

.button-disabled {
  pointer-events: none;
  opacity: 0.68;
  box-shadow: none;
}

.section {
  padding: 10px 0 60px;
}

.page-title,
.reading-title {
  margin: 0;
}

.page-intro,
.reading-intro {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-hero,
.reading-shell {
  padding: 52px 0 24px;
}

.page-banner,
.reading-panel {
  padding: 32px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.chapter-list {
  display: grid;
  gap: 16px;
}

.chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(138, 77, 47, 0.1);
  box-shadow: var(--shadow);
}

.chapter-row h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.chapter-row p {
  margin: 0;
  color: var(--muted);
}

.chapter-row-muted {
  opacity: 0.95;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(138, 77, 47, 0.08);
  color: var(--accent-dark);
  font-size: 0.84rem;
}

.reading-shell {
  display: flex;
  justify-content: center;
}

.reading-panel {
  width: min(calc(100% - 32px), var(--reading-width));
  margin: 0 auto;
}

.reading-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.reading-intro {
  margin-top: 10px;
}

.reading-body {
  margin-top: 28px;
  font-size: 1.08rem;
}

.reading-body p {
  margin: 0 0 1.4em;
  text-indent: 2em;
}

.reading-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(138, 77, 47, 0.35), transparent);
  margin: 28px 0;
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.chapter-nav a {
  min-width: 140px;
}

.site-footer {
  padding: 24px 0 48px;
  color: var(--muted);
}

.footer-panel {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-panel p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    max-width: 150px;
    margin: 0 auto;
  }

  .chapter-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-shell,
  .page-banner,
  .reading-panel,
  .chapter-row {
    padding: 22px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .button,
  .hero-actions .button-secondary {
    width: 100%;
  }
}
