/* Down The Memory Lane - Executive Heritage Design System */
/* Dark Theme (Default) & Warm Cream Light Theme with Rock-Solid Toggle */

:root,
[data-theme="dark"],
body[data-theme="dark"] {
  --bg-deep: #070D1E;
  --bg-surface: #0E172C;
  --bg-card: rgba(18, 29, 56, 0.75);
  --bg-card-hover: rgba(28, 44, 82, 0.9);
  --border-color: rgba(212, 175, 55, 0.22);
  --border-gold-glow: rgba(212, 175, 55, 0.55);

  --gold-primary: #D4AF37;
  --gold-bright: #F3C649;
  --gold-dark: #997A15;
  --gold-bg-glow: rgba(212, 175, 55, 0.12);

  --text-heading: #F8FAFC;
  --text-body: #E2E8F0;
  --text-muted: #94A3B8;

  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);
  --sidebar-width: 290px;
  --reading-font-size: 1.125rem;
}

[data-theme="light"],
body[data-theme="light"] {
  /* Warm Cream & Rich Mahogany Gold Palette */
  --bg-deep: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F3EFEA;
  --border-color: rgba(184, 134, 11, 0.28);
  --border-gold-glow: rgba(184, 134, 11, 0.65);

  --gold-primary: #B8860B;
  --gold-bright: #8B6508;
  --gold-dark: #5C4302;
  --gold-bg-glow: rgba(184, 134, 11, 0.09);

  --text-heading: #1C1615;
  --text-body: #2C2523;
  --text-muted: #5C524E;

  --shadow-card: 0 10px 30px rgba(44, 37, 35, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Seamless Theme Transition Rules */
body, aside.sidebar, .hero-banner, .hero-cover-portal, .part-card, .stat-card, 
article.chapter-body, .sidebar-controls, .archival-image-card, 
.pull-quote-box, .theme-toggle-btn, .nav-link, .page-nav-btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile Header & Hamburger Toggle */
.mobile-top-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
}

.mobile-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav-toggle {
  background: var(--gold-bg-glow);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 99;
}

.sidebar-backdrop.show {
  display: block !important;
}

/* Reading Progress Bar */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 4px;
  background: rgba(0,0,0,0.05);
  z-index: 1000;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-bright));
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Sidebar Navigation */
aside.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title i {
  color: var(--gold-primary);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Sidebar Reader Controls Widget */
.sidebar-controls {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--gold-bg-glow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  font-size: 0.85rem;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-bg-glow);
}

.theme-control-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.theme-toggle-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
  background: var(--gold-primary);
  color: #070D1E !important;
  border-color: var(--gold-primary);
}

.theme-toggle-btn:hover i, .theme-toggle-btn:hover span {
  color: #070D1E !important;
}

[data-theme="dark"] .theme-toggle-btn {
  background: rgba(212, 175, 55, 0.15);
  color: #F3C649;
  border-color: rgba(212, 175, 55, 0.4);
}

[data-theme="light"] .theme-toggle-btn {
  background: #FFFFFF;
  color: #B8860B;
  border-color: rgba(184, 134, 11, 0.4);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: var(--gold-primary);
  color: #FFFFFF !important;
  border-color: var(--gold-primary);
}

[data-theme="light"] .theme-toggle-btn:hover i, [data-theme="light"] .theme-toggle-btn:hover span {
  color: #FFFFFF !important;
}

.nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold-primary);
  padding: 16px 20px 8px 20px;
  font-weight: 600;
}

.nav-menu {
  list-style: none;
  padding: 0 10px 20px 10px;
}

.nav-item {
  margin-bottom: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 8px;
  gap: 12px;
}

.nav-link:hover {
  color: var(--text-heading);
  background-color: var(--gold-bg-glow);
}

.nav-link.active {
  color: var(--gold-primary);
  background-color: var(--gold-bg-glow);
  border-left: 4px solid var(--gold-primary);
  font-weight: 600;
}

.nav-link i {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

/* Main Layout */
main.main-content, main.content-container {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px 60px;
  max-width: 1100px;
}

/* Hero Banner Layout */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-bg-glow);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

[data-theme="dark"] .btn-gold {
  color: #070D1E;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.45);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  background: var(--gold-bg-glow);
  border-color: var(--gold-primary);
}

/* Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--gold-bg-glow);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 1.2rem;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Chapter Cards Grid */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* Photo Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.part-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.part-card:hover {
  border-color: var(--border-gold-glow);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.part-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.part-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text-heading);
  margin-bottom: 14px;
}

.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
}

.chapter-item a:hover {
  color: var(--gold-primary);
  background: var(--gold-bg-glow);
}

/* Reader View & Chapter Tools */
.chapter-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.chapter-tools-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tool-action-btn:hover {
  background: var(--gold-primary);
  color: #FFFFFF !important;
  border-color: var(--gold-primary);
}

.part-badge {
  background: var(--gold-bg-glow);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.chapter-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--text-heading);
  line-height: 1.25;
  margin-bottom: 24px;
}

.chapter-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
  margin-bottom: 36px;
}

article.chapter-body {
  font-family: 'Lora', Georgia, serif;
  font-size: var(--reading-font-size, 1.125rem);
  color: var(--text-body);
}

article.chapter-body p {
  margin-bottom: 24px;
}

.drop-cap::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.8rem;
  float: left;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  color: var(--gold-primary);
  font-weight: 700;
}

.pull-quote-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--gold-primary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 12px 12px 0;
  padding: 26px 34px;
  margin: 36px 0;
  position: relative;
  box-shadow: var(--shadow-card);
}

.quote-icon {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2.2rem;
  color: var(--gold-bg-glow);
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--gold-primary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.quote-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Archival Image Cards (UNCLIPPED FULL PHOTO VIEW) */
.archival-image-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin: 36px 0;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  page-break-inside: avoid;
}

.archival-img, img {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archival-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.archival-img:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 25px rgba(184, 134, 11, 0.25);
}

.image-caption {
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  width: 100%;
}

.image-caption strong {
  color: var(--gold-primary);
  font-style: normal;
}

/* Toast Notifications */
.dtn-toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold-glow);
  color: var(--text-heading);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100000;
  pointer-events: none;
}

.dtn-toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Wider & Taller Book Search Modal Overlay */
.search-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold-glow);
  border-radius: 16px;
  width: 92%;
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,0.8);
  overflow: hidden;
}

.search-modal-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gold-bg-glow);
}

.search-modal-icon {
  color: var(--gold-primary);
  font-size: 1.35rem;
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-heading);
  font-size: 1.15rem;
  font-family: inherit;
}

.search-results-list {
  padding: 22px 26px;
  overflow-y: auto;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
  font-size: 1rem;
}

.search-count-label {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.search-result-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-result-card:hover {
  border-color: var(--gold-primary);
  background: var(--gold-bg-glow);
  transform: translateX(4px);
}

.search-result-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.search-result-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.search-highlight {
  background: rgba(212, 175, 55, 0.35);
  color: var(--text-heading);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* Interactive Share Modal Styles */
.share-modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold-glow);
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.75);
  overflow: hidden;
}

.share-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gold-bg-glow);
}

.share-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--gold-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-modal-body {
  padding: 24px;
}

.share-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.share-app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: #FFFFFF !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.share-wa {
  background: #25D366;
}

.share-wa:hover {
  background: #1DA851;
}

.share-email {
  background: #EA4335;
}

.share-email:hover {
  background: #C5221F;
}

.share-twitter {
  background: #14171A;
  border: 1px solid rgba(255,255,255,0.2);
}

.share-twitter:hover {
  background: #000000;
}

.share-linkedin {
  background: #0A66C2;
}

.share-linkedin:hover {
  background: #084E96;
}

.share-link-copy-box {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 8px;
}

.share-link-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 6px 10px;
  font-family: inherit;
}

.share-copy-btn {
  background: var(--gold-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

[data-theme="dark"] .share-copy-btn {
  color: #070D1E;
}

.share-copy-btn:hover {
  background: var(--gold-bright);
}

/* Clean Image Viewer Modal Overlay */
.img-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(4, 8, 20, 0.94);
  backdrop-filter: blur(8px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.img-modal-overlay.open {
  display: flex !important;
}

.img-modal-container {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.img-modal-close {
  position: absolute;
  top: -24px;
  right: -24px;
  color: var(--gold-bright);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 100000;
  background: rgba(14, 23, 44, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-gold-glow);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.img-modal-close:hover {
  background: var(--gold-primary);
  color: #070D1E;
  transform: scale(1.1);
}

.img-modal-view {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--border-gold-glow);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85);
}

.img-modal-caption {
  margin-top: 14px;
  color: #F8FAFC;
  font-size: 0.92rem;
  text-align: center;
  background: rgba(14, 23, 44, 0.88);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  max-width: 800px;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.page-nav-btn {
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 10px;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 16px;
  width: 48%;
  box-shadow: var(--shadow-card);
}

.page-nav-btn:hover {
  border-color: var(--gold-primary);
  background: var(--gold-bg-glow);
}

.nav-direction {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
}

.nav-page-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  font-weight: 600;
}

/* PDF & PRINT-OPTIMIZED MEDIA STYLES */
@media print {
  aside.sidebar, .reading-progress-container, .chapter-tools-group, 
  .pagination-bar, .theme-toggle-btn, .search-box-wrapper, .mobile-top-bar {
    display: none !important;
  }
  main.main-content, main.content-container {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt !important;
  }
  .chapter-title {
    font-size: 24pt !important;
    color: #000000 !important;
  }
  article.chapter-body p {
    font-size: 11pt !important;
    line-height: 1.6 !important;
    color: #111111 !important;
  }
  .pull-quote-box {
    border-left: 3px solid #000 !important;
    background: #F8F8F8 !important;
    color: #000000 !important;
  }
  .archival-image-card {
    page-break-inside: avoid;
    border: 1px solid #CCC !important;
  }
}

/* Rock-Solid Mobile Responsive Layout Engine */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 0px;
  }
  body {
    padding-top: 56px;
  }
  .mobile-top-bar {
    display: flex !important;
  }
  aside.sidebar {
    transform: translateX(-100%);
    width: 290px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
  }
  aside.sidebar.show {
    transform: translateX(0) !important;
  }
  main.main-content, main.content-container {
    margin-left: 0 !important;
    padding: 24px 18px !important;
    width: 100% !important;
  }
  .reading-progress-container {
    left: 0 !important;
    top: 56px !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .parts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .chapter-title {
    font-size: 2rem !important;
  }
  .hero-title {
    font-size: 2.2rem !important;
  }
  .pagination-bar {
    flex-direction: column !important;
    gap: 14px !important;
  }
  .page-nav-btn {
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .share-buttons-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-actions {
    flex-direction: column !important;
    width: 100% !important;
  }
  .hero-actions a {
    width: 100% !important;
    justify-content: center !important;
  }
  .search-modal-container {
    width: 96% !important;
    max-height: 92vh !important;
  }
  .search-modal-header {
    padding: 14px 16px !important;
  }
  .search-results-list {
    padding: 16px !important;
  }
}
