/* ==========================================================================
   1. DOCUMENT SETUP & RESET
   ========================================================================== */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family:'adega_serifregular', serif;
  line-height: 1.8;
  color: #2b2b2b;
  background: #fbf9f6; /* Soft paper color reduces eye strain */
  margin: 0;
  padding: 0;
  
  /* Lock the main window viewport for structured landscape view */
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden; 
  /* Force Firefox to smooth out thin serif fonts beautifully on older screens */
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  
  /* Prevent Windows 10 graphics drivers from washing out soft backgrounds */
  color-profile: sRGB;
  text-rendering: optimizeLegibility;  
  
}

/* ==========================================================================
   2. FIXED TOP HEADER (3-Zone Alignment) - Updated Switcher Zone
   ========================================================================== */
.book-header {
  position: relative; /* Anchor for absolute centered title */
  height: 60px;
  background: rgba(251, 249, 246, 0.95);
  border-bottom: 1px solid #eadecc;
  flex-shrink: 0; /* Prevents header compression */
  z-index: 10;
  padding: 0 40px;
  display: flex;
  justify-content: space-between; 
  align-items: center;
}

/* Left Zone: Dropdown & Page Marker */
.book-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  position: relative;
  z-index: 12;
}

#toc-dropdown {
  font-family:'adega_serifregular', serif;
  font-size: 0.95rem;
  color: #6C011E;
  background: #ffffff;
  border: 1px solid #eadecc;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

#toc-dropdown:hover {
  border-color: #0066cc;
}

.divider {
  color: #ccc;
}

/* Center Zone: Book Title */
.book-title {
  font-size: 1rem;
  letter-spacing: 2px;
  color: #6C011E;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap; 
}

/* Right Zone: Cleaned Up Language Container */
.lang-switcher {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 12;
  /* Removed old pill padding & background so sprite is visible */
}

/* Specific reset rule ensuring your sprite button preserves its dimensions */
.lang-switcher button.lang-toggle-btn {
  width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  border: none !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

/* ==========================================================================
   1. Base Button Layout
   ========================================================================== */
.lang-toggle-btn {
  width: 52px;
  height: 52px;
  cursor: pointer;
  border: none;
  outline: none;
  background-image: url('../meinleben/css_sprites.png'); /* Shared image source */
  background-repeat: no-repeat;
  background-color: transparent;            /* Removes default button styling */
  padding: 0;
}

/* ==========================================================================
   2. Sprite Display States tied to <body> class
   ========================================================================== */
/* English Layout - Button State */
body.lang-en .lang-toggle-btn {
  background-position: -10px -10px;
}
body.lang-en .lang-toggle-btn:hover {
  background-position: -82px -10px;
}

/* German Layout - Button State */
body.lang-de .lang-toggle-btn {
  background-position: -154px -10px;
}
body.lang-de .lang-toggle-btn:hover {
  background-position: -226px -10px; 
}

/* ==========================================================================
   3. Content Visibility Handling
   ========================================================================== */
/* Default Hide / Show Layout rules */ 
body.lang-en .text-de { display: none; }
body.lang-en .text-en { display: block; }

body.lang-de .text-en { display: none; }
body.lang-de .text-de { display: block; } 



/* ==========================================================================
   3. THE MAIN VIEWPORT FRAME
   ========================================================================== */
.book-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  max-width: 750px; /* Constrains reading line length on landscape screens */
  margin: 0 auto;
  
  /* Reserves layout block precisely between top and bottom bars */
  flex-grow: 1;
  height: calc(100vh - 140px); 
}

/* ==========================================================================
   4. STACKED SCROLLABLE BOOK PAGES
   ========================================================================== */
.book-page {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Fixes left-side bunching layout bug */
  height: 100%;
  
  /* Start hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;

  /* Enable standalone page scrolling */
  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;

  /* Custom elegant scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #eadecc transparent;
}

/* Webkit browser scrollbar styling adjustments */
.book-page::-webkit-scrollbar {
  width: 6px;
}

.book-page::-webkit-scrollbar-thumb {
  background-color: #eadecc;
  border-radius: 10px;
}

/* Reveal active book page */
.book-page.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   5. SINGLE DUAL-LANGUAGE CELL CROSS-FADE
   ========================================================================== */
.bio-block {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%; /* Force grid cells to expand fully */
  margin-bottom: 2rem;
}

.text-en, .text-de {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Force child content text containers to take full area */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide inactive language logic rules */
body.lang-en .text-de,
body.lang-de .text-en {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}



/* ==========================================================================
   3. THE MAIN VIEWPORT FRAME
   ========================================================================== */
.book-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  max-width: 750px; /* Constrains reading line length on landscape screens */
  margin: 0 auto;
  
  /* Reserves layout block precisely between top and bottom bars */
  flex-grow: 1;
  height: calc(100vh - 140px); 
}

/* ==========================================================================
   4. STACKED SCROLLABLE BOOK PAGES
   ========================================================================== */
.book-page {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Fixes left-side bunching layout bug */
  height: 100%;
  
  /* Start hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;

  /* Enable standalone page scrolling */
  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;

  /* Custom elegant scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #eadecc transparent;
}

/* Webkit browser scrollbar styling adjustments */
.book-page::-webkit-scrollbar {
  width: 6px;
}

.book-page::-webkit-scrollbar-thumb {
  background-color: #eadecc;
  border-radius: 10px;
}

/* Reveal active book page */
.book-page.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   5. SINGLE DUAL-LANGUAGE CELL CROSS-FADE
   ========================================================================== */
.bio-block {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%; /* Force grid cells to expand fully */
  margin-bottom: 2rem;
}

.text-en, .text-de {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Force child content text containers to take full area */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide inactive language logic rules */
body.lang-en .text-de,
body.lang-de .text-en {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ==========================================================================
   6. FIXED FOOTER NAVIGATION CONTROLS
   ========================================================================== */
.page-navigation {
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background: #fbf9f6;
  border-top: 1px solid #f2e9dc;
  flex-shrink: 0; /* Prevents button compression */
  z-index: 10;
}

.page-navigation button {
  background: #2b2b2b;
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.page-navigation button:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
}

/* ==========================================================================
   6. ABSOLUTE SIDE NAVIGATION SWITCHES
   ========================================================================== */
.side-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;              /* Matches your language switcher button size */
  height: 52px;
  background: #2b2b2b;
  color: #fff;
  border: none;
  border-radius: 50%;       /* Makes them perfectly circular */
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;              /* Layered safely above scrollable pages */
  transition: background-color 0.2s, opacity 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.side-nav-btn:hover {
  background: #6C011E;      /* Changes color to match your title wine-red on hover */
}

.side-nav-btn:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.5;
}

/* Position them directly to the screen edges */
.side-nav-btn.prev {
  left: 20px;
}

.side-nav-btn.next {
  right: 20px;
}
/* ==========================================================================
   7. PAGE-SPECIFIC SCROLLABLE FOOTNOTES
   ========================================================================== */
.page-footnotes {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eadecc;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* Use your existing global lang utility to swap footnote text instantly */
body.lang-en .page-footnotes .text-de { display: none; }
body.lang-en .page-footnotes .text-en { display: inline; }

body.lang-de .page-footnotes .text-en { display: none; }
body.lang-de .page-footnotes .text-de { display: inline; }

.footer-link {
  color: #6C011E;
  text-decoration: none;
  margin-left: 5px;
  font-weight: bold;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Very thin base layout block to preserve lower spacing limits */
.book-footer-base {
  height: 20px;
  background: #fbf9f6;
  flex-shrink: 0;
}

/* ==========================================================================
   9. CUSTOM COIN & PARAGRAPH FOOTNOTE FORMATTING
   ========================================================================== */

/* Structure for the injected footnotes right beneath the paragraph */
.footnote-block {
  font-family: 'adega_serifregular', serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555555;
  background: #f4f0e8;            /* Soft contrast paper shading */
  border-left: 2px solid #6C011E; /* Red border to match book theme accents */
  padding: 12px 16px;
  margin: -0.5rem 0 1.5rem 0;     /* Snugs it closely below its paragraph */
  border-radius: 0 4px 4px 0;
  background-color: #f4f0e8 !important; /* Force solid color opacity */
  opacity: 1 !important;
}

/* Format inline tiny coin thumbnail rules inside the footnote */
.footnote-block img {
  display: inline-block;
  vertical-align: middle;
  max-height: 28px;               /* Keeps small layout image crisp and fine */
  width: auto;
  margin: 0 6px;
  border: 1px solid #eadecc;
  cursor: pointer;
  transition: transform 0.2s;
}

.footnote-block img:hover {
  transform: scale(1.08);         /* Soft interactive responsive hover */
}

/* Hyperlink color mapping for nested links (e.g. your Nuremberg wiki link) */
.footnote-block a {
  color: #6C011E;
  text-decoration: none;
  border-bottom: 1px dotted #6C011E;
}

.footnote-block a:hover {
  color: #0066cc;
  border-bottom-color: #0066cc;
}


/* --- Responsive Layout Rule Updates --- */
/* Cleans up mobile-specific button arrangement since .book-footer changed */
@media screen and (max-width: 899px) {
  .side-sprite-btn {
    position: fixed;
    bottom: 20px;
    top: auto;
    transform: none;
    z-index: 30;
  }
  .side-sprite-btn.prev { left: 20px; }
  .side-sprite-btn.next { right: 20px; }
  
  /* Give the content container room at the bottom so text doesn't hide behind mobile buttons */
  .book-container {
    height: calc(100vh - 160px);
  }
}

/* ==========================================================================
   1. UNIFIED ENGINE FOR CSS_SPRITES.PNG
   ========================================================================== */
.lang-toggle-btn, .side-sprite-btn {
  width: 52px !important;
  height: 52px !important;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  background-image: url('../meinleben/css_sprites.png') !important; /* Forces your combined asset file */
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   2. FIXED TOP HEADER (3-Zone Alignment) - Updated Switcher Zone
   ========================================================================== */
.book-header {
  position: relative; /* Anchor for absolute centered title */
  height: 60px;
  background: rgba(251, 249, 246, 0.95);
  border-bottom: 1px solid #eadecc;
  flex-shrink: 0; /* Prevents header compression */
  z-index: 10;
  padding: 0 40px;
  display: flex;
  justify-content: space-between; 
  align-items: center;
}

/* Left Zone: Dropdown & Page Marker */
.book-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  position: relative;
  z-index: 12;
}

#toc-dropdown {
  font-family:'adega_serifregular', serif;
  font-size: 0.95rem;
  color: #6C011E;
  background: #ffffff;
  border: 1px solid #eadecc;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

#toc-dropdown:hover {
  border-color: #0066cc;
}

.divider {
  color: #ccc;
}

/* Center Zone: Book Title */
.book-title {
  font-size: 1rem;
  letter-spacing: 2px;
  color: #6C011E;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap; 
}

/* Right Zone: Cleaned Up Language Container */
.lang-switcher {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 12;
  /* Removed old pill padding & background so sprite is visible */
}

/* Specific reset rule ensuring your sprite button preserves its dimensions */
.lang-switcher button.lang-toggle-btn {
  width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  border: none !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

/* ==========================================================================
   3. SIDE PAGE NAVIGATION SWITCHES (Sprites 5 - 8)
   ========================================================================== */
.side-sprite-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  transition: opacity 0.2s ease-in-out;
}

.side-sprite-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3; /* Clean structural styling logic for the final end page */
}

/* Left / Right Screen Placement Rules */
.side-sprite-btn.prev {
  left: 20px;
}
.side-sprite-btn.next {
  right: 20px;
}

/* Left Page Navigation Layout Map */
.side-sprite-btn.prev {
  background-position: -298px -10px; /* sprite-05a */
}
.side-sprite-btn.prev:not(:disabled):hover {
  background-position: -370px -10px; /* sprite-06a */
}

/* Right Page Navigation Layout Map */
.side-sprite-btn.next {
  background-position: -442px -10px; /* sprite-07a */
}
.side-sprite-btn.next:not(:disabled):hover {
  background-position: -514px -10px; /* sprite-08a */
}

/* ==========================================================================
   4. STACKED SCROLLABLE BOOK PAGES
   ========================================================================== */
.book-page {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Fixes left-side bunching layout bug */
  height: 100%;
  
  /* Start hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;

  /* Enable standalone page scrolling */
  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;

  /* Custom elegant scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #eadecc transparent;
}

/* Webkit browser scrollbar styling adjustments */
.book-page::-webkit-scrollbar {
  width: 6px;
}

.book-page::-webkit-scrollbar-thumb {
  background-color: #eadecc;
  border-radius: 10px;
}

/* Reveal active book page */
.book-page.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   5. SINGLE DUAL-LANGUAGE CELL CROSS-FADE
   ========================================================================== */
.bio-block {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%; /* Force grid cells to expand fully */
  margin-bottom: 2rem;
}

.text-en, .text-de {
  grid-column: 1;
  grid-row: 1;
  width: 100%; /* Force child content text containers to take full area */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide inactive language logic rules */
body.lang-en .text-de,
body.lang-de .text-en {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   6. UNIFIED ENGINE FOR CSS_SPRITES.PNG
   ========================================================================== */
.lang-toggle-btn, .side-sprite-btn {
  width: 52px !important;
  height: 52px !important;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  background-image: url('../meinleben/css_sprites.png') !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: inline-block;
}

/* ==========================================================================
   7. TOP LANGUAGE TOGGLE STATES (Sprites 1 - 4)
   ========================================================================== */
/* English Layout - Active Sprite Settings */
body.lang-en .lang-toggle-btn {
  background-position: -10px -10px !important;
}
body.lang-en .lang-toggle-btn:hover {
  background-position: -82px -10px !important;
}

/* German Layout - Active Sprite Settings */
body.lang-de .lang-toggle-btn {
  background-position: -154px -10px !important;
}
body.lang-de .lang-toggle-btn:hover {
  background-position: -226px -10px !important;
}



/* ==========================================================================
   8. RESPONSIVE PAGE NAVIGATION CONTROLS
   ========================================================================== */

/* --- MOBILE FIRST (Narrow Screens under 900px wide) --- */
.side-sprite-btn {
  position: static;          /* Strips the floating behavior */
  transform: none;           /* Resets vertical centering alignment */
  display: inline-block;     /* Puts them side-by-side */
  vertical-align: middle;
  opacity: 1;                /* Keep visible on mobile touch screens */
}

/* Adjust your footer to contain the mobile buttons horizontally */
.book-footer {
  height: auto;
  min-height: 80px;
  display: flex;
  flex-direction: row;       /* Standard side-by-side flow */
  justify-content: space-between; /* Buttons on outer edges of footer, text center */
  align-items: center;
  background: #fbf9f6;
  border-top: 1px solid #f2e9dc;
  flex-shrink: 0;
  padding: 15px 20px;        /* Tighter padding for small screens */
  gap: 15px;
}

.footer-footnotes {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  flex-grow: 1;              /* Lets text occupy the middle center space */
}


/*//////////////////////////////////////////////////*

/* ==========================================================================
   9. CUSTOM COIN & PARAGRAPH FOOTNOTE FORMATTING
   ========================================================================== */

/* Structure for the injected footnotes right beneath the paragraph */
.footnote-block {
  font-family: 'adega_serifregular', serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555555;
  background: #f4f0e8;            /* Soft contrast paper shading */
  border-left: 2px solid #6C011E; /* Red border to match book theme accents */
  padding: 12px 16px;
  margin: -0.5rem 0 1.5rem 0;     /* Snugs it closely below its paragraph */
  border-radius: 0 4px 4px 0;
}

/* Format inline tiny coin thumbnail rules inside the footnote */
.footnote-block img {
  display: inline-block;
  vertical-align: middle;
  max-height: 28px;               /* Keeps small layout image crisp and fine */
  width: auto;
  margin: 0 6px;
  border: 1px solid #eadecc;
  cursor: pointer;
  transition: transform 0.2s;
}

.footnote-block img:hover {
  transform: scale(1.08);         /* Soft interactive responsive hover */
}

/* Hyperlink color mapping for nested links (e.g. your Nuremberg wiki link) */
.footnote-block a {
  color: #6C011E;
  text-decoration: none;
  border-bottom: 1px dotted #6C011E;
}

.footnote-block a:hover {
  color: #0066cc;
  border-bottom-color: #0066cc;
}









/* --- DESKTOP UPGRADES (Wide Screens over 900px wide) --- */
@media screen and (min-width: 900px) {
  
  /* Pop the buttons back out to float gracefully on screen margins */
  .side-sprite-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    opacity: 0.4;            /* Softly dimmed out while reading text */
    transition: opacity 0.3s ease-in-out;
  }

  .side-sprite-btn:not(:disabled):hover {
    opacity: 1;              /* Crisp display on desktop hover */
  }

  /* Separate absolute layout anchoring coordinates */
  .side-sprite-btn.prev {
    left: 20px;
  }
  .side-sprite-btn.next {
    right: 20px;
  }

  /* Reset footer layout spacing to look balanced on wide screens */
  .book-footer {
    justify-content: center;
    padding: 0 100px;        /* Wide side margins prevent text-to-button collisions */
  }
}


/* ==========================================================================
   6. DYNAMIC TEXT RENDERING (Chapters, Verses, & Highslide Footnotes)
   ========================================================================== */

/* Main Milestone Heading style inside the page scroll area */
.book-page h2 {
  font-family: 'adega_serifregular', serif;
  color: #6C011E;
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 2rem;
  border-bottom: 1px double #eadecc;
  padding-bottom: 0.5rem;
}

/* Individual paragraphs/verses from JSON */
.book-page p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Footnote block structural layout beneath individual paragraphs */
.footnote-block {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555555;
  background: #f4f0e8; /* Slightly darker paper shading to differentiate */
  border-left: 2px solid #6C011E; /* Red accent marker matching book title */
  padding: 10px 15px;
  margin: -0.5rem 0 1.5rem 0; /* Snugs it up directly under its paragraph */
  border-radius: 0 4px 4px 0;
}

/* Small thumbnail layout properties inside the footnote */
.footnote-block img {
  display: inline-block;
  vertical-align: middle;
  max-height: 32px; /* Keeps your coin image small and crisp */
  width: auto;
  margin: 0 8px;
  border: 1px solid #eadecc;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s;
}

.footnote-block img:hover {
  transform: scale(1.05); /* Quick interactive hover pop */
}

/* Hyperlinks inside footnotes (like your Wikipedia Free City link) */
.footnote-block a {
  color: #6C011E;
  text-decoration: none;
  border-bottom: 1px dotted #6C011E;
  transition: color 0.2s;
}

.footnote-block a:hover {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

/* Styled superscript markers for book body and footnotes */
sup.red-footnote {
  color: #6C011E;         /* Elegant red matching your title layout */
  font-weight: bold;      /* Makes the tiny number easier to read */
  padding: 0 2px;         /* Gives the number a tiny bit of breathing room */
  font-size: 0.75rem;     /* Sizes it perfectly above the text line */
}

/* ==========================================================================
   6. DYNAMIC TEXT RENDERING (Chapters, Verses, & Highslide Footnotes)
   ========================================================================== */

/* Main Milestone Heading style inside the page scroll area */
.book-page h2 {
  font-family: 'adega_serifregular', serif;
  color: #6C011E;
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 2rem;
  border-bottom: 1px double #eadecc;
  padding-bottom: 0.5rem;
}

/* Individual paragraphs/verses from JSON */
.book-page p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Footnote block structural layout beneath individual paragraphs */
.footnote-block {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555555;
  background: #f4f0e8; /* Slightly darker paper shading to differentiate */
  border-left: 2px solid #6C011E; /* Red accent marker matching book title */
  padding: 10px 15px;
  margin: -0.5rem 0 1.5rem 0; /* Snugs it up directly under its paragraph */
  border-radius: 0 4px 4px 0;
}

/* Small thumbnail layout properties inside the footnote */
.footnote-block img {
  display: inline-block;
  vertical-align: middle;
  max-height: 32px; /* Keeps your coin image small and crisp */
  width: auto;
  margin: 0 8px;
  border: 1px solid #eadecc;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s;
}

.footnote-block img:hover {
  transform: scale(1.05); /* Quick interactive hover pop */
}

/* Hyperlinks inside footnotes (like your Wikipedia Free City link) */
.footnote-block a {
  color: #6C011E;
  text-decoration: none;
  border-bottom: 1px dotted #6C011E;
  transition: color 0.2s;
}

.footnote-block a:hover {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

/* Styled superscript markers for book body and footnotes */
sup.red-footnote {
  color: #6C011E;         /* Elegant red matching your title layout */
  font-weight: bold;      /* Makes the tiny number easier to read */
  padding: 0 2px;         /* Gives the number a tiny bit of breathing room */
  font-size: 0.75rem;     /* Sizes it perfectly above the text line */
}


