:root {
  --bg: #0a0f14;
  --surface: #111921;
  --border: #1e323d;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --gold: #e5b84b;
  --font-size: 19px;
  --font-family: 'Georgia', serif;
}

body.theme-sepia {
  --bg: #1c1915;
  --surface: #26221c;
  --border: #3d352b;
  --text: #e8dec8;
  --muted: #a89b84;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  transition: background 0.25s, color 0.25s;
}

/* Полоска прогресса сверху */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 1000;
}

/* Верхняя панель навигации */
.top-bar {
  position: sticky;
  top: 0;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 900;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
}

.top-bar a {
  color: var(--accent);
  text-decoration: none;
}

.top-bar a:hover { text-decoration: underline; }

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.ctrl-btn:hover { border-color: var(--accent); }

/* Контейнер текста */
.reader-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.chapter-meta {
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.chapter-title {
  text-align: center;
  color: var(--gold);
  font-size: 28px;
  margin: 0 0 35px;
  line-height: 1.3;
}

.chapter-text {
  font-size: var(--font-size);
  line-height: 1.75;
}

.chapter-text p {
  margin: 0 0 1.2em;
  text-indent: 1.5em;
}

.chapter-text .disclaimer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 35px;
  font-family: 'Segoe UI', sans-serif;
}

.chapter-text .disclaimer-box p {
  text-indent: 0;
  margin-bottom: 8px;
}

/* Нижняя навигация между главами */
.bottom-nav {
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-family: 'Segoe UI', sans-serif;
}

.nav-btn {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-btn:hover {
  border-color: var(--accent);
  background: #16222c;
}

.nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}