/* ══════════════════════════════════════
   BOOKS — OsakaWire Fiction Components
   ══════════════════════════════════════ */

/* ── FICTION COLOR PALETTE ── */
:root {
  --accent-fiction: #2C5F7F;
  --fiction-gold: #9B7B1C;
  --fiction-cream: #FAF8F4;
}

/* ── MASTHEAD OVERRIDES (fiction pages) ── */
.fiction-masthead .masthead-flag {
  background: var(--accent-fiction);
}

/* ── BOOK CARDS (landing page) ── */
.books-grid {
  display: grid;
  gap: 0;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.15s;
}

.book-card:hover {
  background: white;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.book-card-genre {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fiction-gold);
}

.book-card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.book-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
}

.book-card-desc {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.6;
  max-width: 700px;
  margin-top: 4px;
}

.book-card-warning {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── GENRE TAGS ── */
.book-genre-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fiction-gold);
  border: 1px solid var(--fiction-gold);
  padding: 2px 8px;
  margin-right: 6px;
}

/* ── CONTENT WARNING BANNER ── */
.book-content-warning-banner {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 1px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 16px;
}

.book-content-warning-banner::before {
  content: "⚠ ";
}

/* ── CHAPTER LIST (book overview page) ── */
.book-chapter-list {
  display: flex;
  flex-direction: column;
}

.book-chapter-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.15s;
}

.book-chapter-item:first-child {
  border-top: 1px solid var(--rule);
}

.book-chapter-item:hover {
  background: white;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.book-chapter-num {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--rule);
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.15s;
}

.book-chapter-item:hover .book-chapter-num {
  color: var(--accent-fiction);
}

.book-chapter-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.book-chapter-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.book-chapter-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 1px;
}

.book-chapter-arrow {
  font-size: 18px;
  color: var(--rule);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.book-chapter-item:hover .book-chapter-arrow {
  color: var(--ink);
  transform: translateX(3px);
}

/* ── START READING BUTTON ── */
.book-start-reading {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: white;
  background: var(--accent-fiction);
  padding: 14px 32px;
  text-decoration: none;
  margin: 24px 0 40px;
  transition: background 0.15s;
}

.book-start-reading:hover {
  background: #1E4A63;
}

/* ── CHAPTER READING BODY ── */
.book-prose {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--ink);
}

.book-prose p {
  margin-bottom: 1.4em;
  text-indent: 1.5em;
}

.book-prose p:first-child {
  text-indent: 0;
}

.book-prose p:first-child::first-letter {
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin: 4px 8px 0 0;
  font-weight: 700;
  color: var(--accent-fiction);
}

.book-prose hr {
  border: none;
  text-align: center;
  margin: 2.5em 0;
  color: var(--rule);
  font-size: 18px;
  letter-spacing: 12px;
}

.book-prose hr::before {
  content: "⁂";
}

.book-prose blockquote {
  border-left: 3px solid var(--accent-fiction);
  margin: 2em 0;
  padding: 0 0 0 1.5em;
  font-style: italic;
  color: var(--ink-mid);
}

.book-prose em {
  font-style: italic;
}

.book-prose strong {
  font-weight: 700;
}

/* ── CHAPTER PROGRESS INDICATOR ── */
.chapter-progress {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-fiction);
}

/* ── PREV/NEXT CHAPTER NAVIGATION ── */
.book-nav-section {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}

.book-nav-links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
}

.book-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  background: white;
  text-decoration: none;
  border: 1px solid var(--rule);
  transition: border-color 0.15s, background 0.15s;
}

.book-nav-link:hover {
  border-color: var(--accent-fiction);
  background: var(--fiction-cream);
}

.book-nav-prev { text-align: left; }
.book-nav-next { text-align: right; }

.book-nav-toc {
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 20px 16px;
}

.book-nav-disabled {
  background: transparent;
  border: 1px solid transparent;
}

.book-nav-disabled:hover {
  background: transparent;
  border-color: transparent;
}

.book-nav-dir {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-light);
}

.book-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ── ALL CHAPTERS LIST (bottom of chapter page) ── */
.book-all-chapters {
  padding: 40px 0 80px;
}

.book-all-chapters-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.book-all-chapters-list {
  display: flex;
  flex-direction: column;
}

.book-all-chapters-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--cream-dark);
  transition: color 0.15s, background 0.15s;
}

.book-all-chapters-item:hover {
  color: var(--ink);
  background: white;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.book-all-chapters-item.current {
  font-weight: 700;
  color: var(--ink);
}

.book-all-chapters-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--rule);
  min-width: 28px;
  text-align: center;
}

.book-all-chapters-item.current .book-all-chapters-num {
  color: var(--accent-fiction);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .book-nav-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .book-nav-prev,
  .book-nav-next { text-align: left; }

  .book-chapter-num { font-size: 20px; min-width: 32px; }
  .book-chapter-title { font-size: 16px; }

  .book-chapter-item { gap: 14px; padding: 16px 0; }

  .book-prose {
    font-size: 17px;
    line-height: 1.7;
  }

  .book-prose p:first-child::first-letter {
    font-size: 2.8em;
  }
}
