:root {
  --bg-abyss: #0B1412;
  --surface-glass: rgba(16, 29, 25, 0.84);
  --surface-glass-strong: rgba(13, 24, 21, 0.94);
  --surface-parchment: #F4ECE0;
  --surface-parchment-alt: #EFE5D5;
  --gold-primary: #D8B773;
  --gold-soft: rgba(216, 183, 115, 0.28);
  --gold-strong: rgba(216, 183, 115, 0.55);
  --text-ivory: #F5EFE6;
  --text-muted-warm: #B8B0A0;
  --text-ink: #1A2420;
  --badge-moss: #2E4A3E;
  --badge-sand: #E5D7C3;
}

html,
body.jrs-dark-academia {
  background-color: var(--bg-abyss);
  color: var(--text-ivory);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
}

.font-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-reading {
  font-family: 'Lora', Georgia, serif;
}

/* Plano de fundo padrão para telas principais */
.jrs-bg-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #0B1412;
  background-image: linear-gradient(135deg, rgba(11, 20, 18, 0.80) 0%, rgba(11, 20, 18, 0.68) 45%, rgba(11, 20, 18, 0.86) 100%), url('/static/img/bg-desktop.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .jrs-bg-backdrop {
    background-image: linear-gradient(180deg, rgba(11, 20, 18, 0.82) 0%, rgba(11, 20, 18, 0.78) 60%, rgba(11, 20, 18, 0.92) 100%), url('/static/img/bg-mobile.webp');
  }
}

.card-glass {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}

.card-parchment {
  background: linear-gradient(180deg, var(--surface-parchment) 0%, var(--surface-parchment-alt) 100%);
  color: var(--text-ink);
  border: 1px solid rgba(216, 183, 115, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.pill-parchment {
  background: var(--surface-parchment-alt);
  color: var(--text-ink);
  border: 1px solid rgba(216, 183, 115, 0.55);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.pill-parchment:hover {
  background: #FBF4E9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 183, 115, 0.16);
}

.book-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-strong) 50%, transparent 100%);
}

/* Leitor Imersivo: zero imagem de fundo, temas dedicados e proteção anti-cópia */
.reader-protected {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.reader-theme-light {
  background-color: #FAF6EE;
  color: #1F2421;
}

.reader-theme-sepia {
  background-color: #EFE4CE;
  color: #2B2118;
}

.reader-theme-dark {
  background-color: #0D1714;
  color: #EAE3D5;
}

.reader-prose p,
.editor-canvas p {
  margin-bottom: 1.15em;
  line-height: 1.8;
}

.reader-prose h2,
.editor-canvas h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 1.4em 0 0.6em;
}

.reader-prose h3,
.editor-canvas h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.2em 0 0.5em;
}

.reader-prose blockquote,
.editor-canvas blockquote {
  border-left: 3px solid #D8B773;
  padding-left: 1rem;
  font-style: italic;
  opacity: 0.92;
  margin: 1.25em 0;
}

.reader-prose hr,
.editor-canvas hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 183, 115, 0.7), transparent);
  margin: 2em auto;
  width: 60%;
}

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.editor-canvas {
  min-height: 460px;
  outline: none;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Scrollbar sutil */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0B1412; }
::-webkit-scrollbar-thumb { background: rgba(216, 183, 115, 0.3); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(216, 183, 115, 0.55); }
