/* ================================================================
   reader.css — Reader estilo WuxiaWorld+
   1 capítulo = 1 página, controles, temas, nav sticky
   ================================================================ */

/* ----- CSS VARIABLES (Default: Light theme) ----- */
:root {
  /* Theme colors */
  --r-bg: #f8f8f8;
  --r-bg-content: #ffffff;
  --r-bg-ui: #ffffff;
  --r-bg-ui-hover: #f0f0f0;
  --r-border: #e5e7eb;
  --r-text: #1e1e1e;
  --r-text-mute: #6b7280;
  --r-text-dim: #9ca3af;
  --r-accent: #4f46e5;
  --r-accent-hover: #4338ca;
  --r-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --r-shadow-lg: 0 4px 16px rgba(0,0,0,0.1);

  /* Typography */
  --r-font: 'Lora', Georgia, 'Times New Roman', serif;
  --r-font-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --r-font-mono: 'JetBrains Mono', Consolas, monospace;
  --r-size: 18px;
  --r-line-height: 1.85;
  --r-content-width: 800px;
  --r-paragraph-spacing: 1.2em;
}

/* ----- THEMES ----- */
[data-theme="dark"] {
  --r-bg: #0d1117;
  --r-bg-content: #161b22;
  --r-bg-ui: #1c2128;
  --r-bg-ui-hover: #262c36;
  --r-border: #30363d;
  --r-text: #e6edf3;
  --r-text-mute: #8b949e;
  --r-text-dim: #6e7681;
  --r-accent: #79c0ff;
  --r-accent-hover: #a5d6ff;
  --r-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --r-shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
}

[data-theme="sepia"] {
  --r-bg: #f1e7d0;
  --r-bg-content: #faf4e8;
  --r-bg-ui: #f5ead4;
  --r-bg-ui-hover: #ebe0c8;
  --r-border: #d4c5a0;
  --r-text: #3d3426;
  --r-text-mute: #7a6e56;
  --r-text-dim: #a09478;
  --r-accent: #8b6914;
  --r-accent-hover: #a07a1a;
  --r-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --r-shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
}

[data-theme="paper"] {
  --r-bg: #eae6df;
  --r-bg-content: #f5f1ea;
  --r-bg-ui: #eeeae3;
  --r-bg-ui-hover: #e3ded5;
  --r-border: #cdc7bb;
  --r-text: #2c2c2c;
  --r-text-mute: #666057;
  --r-text-dim: #8f887d;
  --r-accent: #5c4b27;
  --r-accent-hover: #6e5a30;
  --r-shadow: 0 1px 3px rgba(0,0,0,0.05);
  --r-shadow-lg: 0 4px 16px rgba(0,0,0,0.07);
}

/* ----- FONT SIZE PRESETS ----- */
[data-fontsize="small"]  { --r-size: 15px; --r-line-height: 1.7; }
[data-fontsize="medium"] { --r-size: 18px; --r-line-height: 1.85; }
[data-fontsize="large"]  { --r-size: 21px; --r-line-height: 1.9; }
/* tamanos numericos en px (selector de letra) */
[data-fontsize="14"] { --r-size: 14px; --r-line-height: 1.70; }
[data-fontsize="16"] { --r-size: 16px; --r-line-height: 1.78; }
[data-fontsize="18"] { --r-size: 18px; --r-line-height: 1.85; }
[data-fontsize="20"] { --r-size: 20px; --r-line-height: 1.90; }
[data-fontsize="22"] { --r-size: 22px; --r-line-height: 1.95; }
[data-fontsize="24"] { --r-size: 24px; --r-line-height: 2.00; }
[data-fontsize="26"] { --r-size: 26px; --r-line-height: 2.05; }

/* ----- WIDTH PRESETS ----- */
[data-width="narrow"] { --r-content-width: 600px; }
[data-width="medium"] { --r-content-width: 800px; }
[data-width="wide"]   { --r-content-width: 1000px; }

/* ----- FONT FAMILY PRESETS ----- */
[data-fontfamily="serif"]     { --r-font: 'Lora', Georgia, 'Times New Roman', serif; }
[data-fontfamily="sans"]      { --r-font: 'Inter', 'Segoe UI', system-ui, sans-serif; }
[data-fontfamily="calibri"]   { --r-font: Calibri, 'Segoe UI', sans-serif; }
[data-fontfamily="georgia"]   { --r-font: Georgia, 'Times New Roman', serif; }

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--r-font-ui);
  background: var(--r-bg);
  color: var(--r-text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

a {
  color: var(--r-accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ================================================================
   PROGRESS BAR (top of page)
   ================================================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--r-accent);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ================================================================
   HEADER (sticky)
   ================================================================ */
.reader-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--r-bg-ui);
  border-bottom: 1px solid var(--r-border);
  box-shadow: var(--r-shadow);
  transition: background 0.3s, border-color 0.3s;
  gap: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.header-title {
  font-size: 13px;
  color: var(--r-text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-chapter {
  font-size: 14px;
  font-weight: 600;
  color: var(--r-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--r-bg-ui);
  border: 1px solid var(--r-border);
  border-radius: 8px;
  color: var(--r-text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--r-font-ui);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--r-bg-ui-hover);
  border-color: var(--r-accent);
  color: var(--r-accent);
}

.nav-btn:disabled, .nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Header back-to-book button */
.header-back-btn {
  font-size: 12px;
  padding: 6px 10px;
}

.header-back-btn svg {
  flex-shrink: 0;
}

/* Header controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--r-border);
  border-radius: 8px;
  background: var(--r-bg-ui);
  color: var(--r-text-mute);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  background: var(--r-bg-ui-hover);
  color: var(--r-text);
  border-color: var(--r-accent);
}

.ctrl-btn.active {
  background: var(--r-accent);
  color: #fff;
  border-color: var(--r-accent);
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.reader-body {
  max-width: var(--r-content-width);
  margin: 0 auto;
  padding: 48px 32px 80px;
  transition: max-width 0.3s;
}

/* Chapter heading */
.chapter-heading {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--r-border);
}

.chapter-heading h1 {
  font-family: var(--r-font-ui);
  font-size: 28px;
  font-weight: 700;
  color: var(--r-text);
  margin-bottom: 8px;
}

.chapter-heading .chapter-meta {
  font-size: 13px;
  color: var(--r-text-dim);
  font-family: var(--r-font-mono);
}

/* Chapter content — the actual text */
.chapter-content {
  font-family: var(--r-font);
  font-size: var(--r-size);
  line-height: var(--r-line-height);
  color: var(--r-text);
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  transition: font-size 0.2s, line-height 0.2s;
}

.chapter-content p {
  margin-bottom: var(--r-paragraph-spacing);
  orphans: 2;
  widows: 2;
}

.chapter-content h1,
.chapter-content h2,
.chapter-content h3,
.chapter-content h4 {
  font-family: var(--r-font-ui);
  color: var(--r-text);
  text-align: left;
  margin: 1.8em 0 0.6em;
  line-height: 1.35;
}

.chapter-content h1 { font-size: 1.5em; font-weight: 700; }
.chapter-content h2 { font-size: 1.3em; font-weight: 600; }
.chapter-content h3 { font-size: 1.15em; font-weight: 600; }
.chapter-content h4 { font-size: 1em; font-weight: 600; font-style: italic; }

.chapter-content strong {
  font-weight: 700;
  color: var(--r-text);
}

.chapter-content em {
  font-style: italic;
}

.chapter-content ul, .chapter-content ol {
  margin: 1em 0 1em 2em;
  text-align: left;
}

.chapter-content li {
  margin-bottom: 0.4em;
}

.chapter-content blockquote {
  border-left: 4px solid var(--r-accent);
  background: var(--r-bg-ui-hover);
  padding: 16px 20px;
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--r-text-mute);
}

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

.chapter-content code {
  font-family: var(--r-font-mono);
  font-size: 0.88em;
  background: var(--r-bg-ui-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--r-border);
}

.chapter-content pre {
  background: var(--r-bg-ui-hover);
  border: 1px solid var(--r-border);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 14px;
  line-height: 1.6;
}

.chapter-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.chapter-content hr {
  border: none;
  border-top: 1px solid var(--r-border);
  margin: 2.5em 4em;
}

.chapter-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9em;
}

.chapter-content th, .chapter-content td {
  padding: 10px 14px;
  border: 1px solid var(--r-border);
  text-align: left;
}

.chapter-content th {
  background: var(--r-bg-ui-hover);
  font-weight: 600;
}

.chapter-content a {
  color: var(--r-accent);
  text-decoration: underline;
  text-decoration-color: var(--r-border);
  text-underline-offset: 3px;
}

.chapter-content a:hover {
  text-decoration-color: var(--r-accent);
}

.chapter-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1em 0;
}

/* ================================================================
   FOOTER NAV (sticky bottom)
   ================================================================ */
.reader-footer {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--r-bg-ui);
  border-top: 1px solid var(--r-border);
  box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
  transition: background 0.3s, border-color 0.3s;
}

.footer-center {
  font-size: 12px;
  color: var(--r-text-dim);
  font-family: var(--r-font-mono);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.footer-book-link {
  font-size: 11px;
  color: var(--r-text-mute);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  transition: color 0.2s;
}

.footer-book-link:hover {
  color: var(--r-accent);
}

.footer-progress {
  font-size: 12px;
  color: var(--r-text-dim);
}

.footer-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--r-bg-ui);
  border: 1px solid var(--r-border);
  border-radius: 8px;
  color: var(--r-text);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--r-font-ui);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-nav-btn:hover {
  background: var(--r-accent);
  color: #fff;
  border-color: var(--r-accent);
}

.footer-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ================================================================
   TOC PANEL (slide-out)
   ================================================================ */
.toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.toc-overlay.open {
  opacity: 1;
  visibility: visible;
}

.toc-panel {
  position: fixed;
  top: 0;
  left: -340px;
  width: 320px;
  height: 100vh;
  background: var(--r-bg-ui);
  border-right: 1px solid var(--r-border);
  box-shadow: var(--r-shadow-lg);
  z-index: 501;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  overflow: hidden;
}

.toc-panel.open {
  left: 0;
}

.toc-header {
  padding: 20px;
  border-bottom: 1px solid var(--r-border);
  flex-shrink: 0;
}

.toc-book-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--r-text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.toc-book-author {
  font-size: 13px;
  color: var(--r-text-mute);
}

.toc-book-stats {
  font-size: 12px;
  color: var(--r-text-dim);
  font-family: var(--r-font-mono);
  margin-top: 4px;
}

.toc-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--r-text-mute);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.toc-item:hover {
  background: var(--r-bg-ui-hover);
  color: var(--r-text);
}

.toc-item.active {
  background: var(--r-accent);
  color: #fff;
  font-weight: 600;
}

.toc-item .toc-num {
  font-family: var(--r-font-mono);
  font-size: 11px;
  min-width: 28px;
  text-align: center;
  opacity: 0.7;
}

.toc-item.active .toc-num {
  opacity: 1;
}

.toc-item .toc-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--r-border);
  flex-shrink: 0;
}

.toc-back-link {
  display: block;
  font-size: 13px;
  color: var(--r-accent);
  padding: 6px 0;
}

/* ================================================================
   SETTINGS PANEL (slide-out right)
   ================================================================ */
.settings-panel {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: var(--r-bg-ui);
  border-left: 1px solid var(--r-border);
  box-shadow: var(--r-shadow-lg);
  z-index: 501;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 24px 20px;
}

.settings-panel.open {
  right: 0;
}

.settings-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--r-text);
  margin-bottom: 24px;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--r-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.setting-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.setting-btn {
  flex: 1;
  min-width: 60px;
  padding: 8px 12px;
  border: 1px solid var(--r-border);
  border-radius: 8px;
  background: var(--r-bg-ui);
  color: var(--r-text-mute);
  font-size: 13px;
  font-family: var(--r-font-ui);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.setting-btn:hover {
  border-color: var(--r-accent);
  color: var(--r-text);
}

.setting-btn.active {
  background: var(--r-accent);
  color: #fff;
  border-color: var(--r-accent);
}

/* Theme preview swatches */
.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--r-border);
  cursor: pointer;
  transition: all 0.2s;
  flex: 0 0 auto;
}

.theme-swatch:hover, .theme-swatch.active {
  border-color: var(--r-accent);
  transform: scale(1.15);
}

.theme-swatch[data-t="light"]  { background: #ffffff; }
.theme-swatch[data-t="dark"]   { background: #161b22; }
.theme-swatch[data-t="sepia"]  { background: #faf4e8; }
.theme-swatch[data-t="paper"]  { background: #f5f1ea; }

/* ================================================================
   BOOK INDEX PAGE (not the reader, the book overview)
   ================================================================ */
.book-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.book-hero {
  padding: 32px;
  background: var(--r-bg-content);
  border: 1px solid var(--r-border);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: var(--r-shadow);
}

.book-hero .book-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.book-hero h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.book-hero .book-author {
  font-size: 16px;
  color: var(--r-text-mute);
  margin-bottom: 4px;
}

.book-hero .book-stats {
  font-size: 13px;
  color: var(--r-text-dim);
  font-family: var(--r-font-mono);
  margin-bottom: 16px;
}

.book-hero .book-sinopsis {
  font-size: 15px;
  line-height: 1.7;
  color: var(--r-text-mute);
  border-top: 1px solid var(--r-border);
  padding-top: 16px;
}

.book-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--r-accent);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--r-font-ui);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.book-start-btn:hover {
  background: var(--r-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* Chapter list on book page */
.chapter-list {
  background: var(--r-bg-content);
  border: 1px solid var(--r-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--r-shadow);
}

.chapter-list-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--r-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chapter-list-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.chapter-list-header .ch-count {
  font-size: 13px;
  color: var(--r-text-dim);
  font-family: var(--r-font-mono);
}

.ch-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--r-border);
  color: var(--r-text);
  text-decoration: none;
  transition: background 0.2s;
}

.ch-list-item:last-child {
  border-bottom: none;
}

.ch-list-item:hover {
  background: var(--r-bg-ui-hover);
}

.ch-list-item .ch-num {
  font-family: var(--r-font-mono);
  font-size: 12px;
  color: var(--r-text-dim);
  min-width: 32px;
  text-align: center;
  background: var(--r-bg-ui-hover);
  padding: 4px 8px;
  border-radius: 6px;
}

.ch-list-item .ch-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.ch-list-item .ch-arrow {
  color: var(--r-text-dim);
  transition: transform 0.2s;
}

.ch-list-item:hover .ch-arrow {
  transform: translateX(4px);
  color: var(--r-accent);
}

/* ================================================================
   BACK TO TOP BUTTON
   ================================================================ */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--r-accent);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--r-shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ================================================================
   KEYBOARD HINTS
   ================================================================ */
.kbd-hint {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--r-bg-ui);
  border: 1px solid var(--r-border);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 12px;
  color: var(--r-text-mute);
  font-family: var(--r-font-mono);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 200;
  box-shadow: var(--r-shadow-lg);
  white-space: nowrap;
}

.kbd-hint.visible {
  opacity: 1;
  visibility: visible;
}

.kbd-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--r-bg-ui-hover);
  border: 1px solid var(--r-border);
  border-radius: 4px;
  font-size: 11px;
  margin: 0 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .reader-header {
    padding: 8px 12px;
  }

  .nav-btn span { display: none; }
  .nav-btn { padding: 8px 10px; }

  .header-title { font-size: 11px; }
  .header-chapter { font-size: 12px; }

  .reader-body {
    padding: 24px 16px 60px;
  }

  .chapter-heading h1 {
    font-size: 22px;
  }

  .chapter-content {
    text-align: left;
  }

  .reader-footer {
    padding: 8px 12px;
  }

  .footer-nav-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .footer-nav-btn span { display: none; }

  .header-back-btn span { display: none; }
  .header-back-btn { padding: 6px 8px; }

  .footer-book-link { max-width: 120px; font-size: 10px; }

  .toc-panel {
    width: 280px;
    left: -300px;
  }

  .settings-panel {
    width: 280px;
    right: -300px;
  }

  .book-hero h1 {
    font-size: 24px;
  }

  .book-hero {
    padding: 20px;
  }

  .ctrl-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* ================================================================
   SCROLLBAR (themed)
   ================================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--r-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--r-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--r-text-dim);
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .reader-header, .reader-footer, .progress-bar,
  .toc-panel, .toc-overlay, .settings-panel,
  .back-to-top, .kbd-hint, .ctrl-btn { display: none !important; }

  .reader-body { max-width: 100%; padding: 0; }
  .chapter-content { font-size: 12pt; }
}
