:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-sidebar: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #0284c7;
  --badge-bg: #dbeafe;
  --badge-text: #1e40af;
  --code-bg: #f1f5f9;
  --table-stripe: #f8fafc;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --sidebar-width: 290px;
  --toc-width: 230px;
  --header-height: 60px;
}

body.theme-dark {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-elevated: #1f2937;
  --bg-sidebar: #111827;
  --bg-hover: #1f2937;
  --border-color: #1f2937;
  --border-subtle: #374151;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e3a8a33;
  --accent: #38bdf8;
  --badge-bg: #1e3a8a;
  --badge-text: #93c5fd;
  --code-bg: #1f2937;
  --table-stripe: #162032;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-primary);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Visibility helpers */
.mobile-only {
  display: none !important;
}
.desktop-only {
  display: flex;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  backdrop-filter: blur(8px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  font-size: 1.05rem;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
}
.mobile-toggle-btn:hover {
  background: var(--bg-hover);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-info h1 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.lang-tag {
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Desktop Search */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 1rem;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.header-search input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 2.2rem 0.45rem 2.3rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--bg-surface);
}

.search-kbd {
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  background: var(--border-color);
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
}
.search-dropdown.hidden {
  display: none;
}
.search-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s ease;
}
.search-item:last-child {
  border-bottom: none;
}
.search-item:hover {
  background: var(--bg-hover);
}
.search-item-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}
.search-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.2rem 0;
}
.search-item-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.95rem;
}
.action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
}

.mobile-search-btn {
  display: none;
}

.theme-icon-dark { display: none; }
body.theme-dark .theme-icon-light { display: none; }
body.theme-dark .theme-icon-dark { display: inline-block; }

/* Mobile Search Overlay */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-surface);
  z-index: 200;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
.mobile-search-overlay.hidden {
  display: none;
}

.mobile-search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}
.mobile-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}
.close-search-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  margin-top: 1rem;
}

/* Mobile Quick Chapter Bar */
.mobile-chapter-bar {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.mobile-bar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-chapter-select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Main App Layout */
.app-layout {
  display: flex;
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  margin-bottom: 0.25rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

/* Module Filter Pills */
.module-filter-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.filter-pill {
  flex: 1;
  background: none;
  border: none;
  padding: 0.35rem 0;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.filter-pill:hover {
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
}

/* Sidebar Navigation Items */
.sidebar-module-group {
  margin-bottom: 0.85rem;
}

.sidebar-module-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.65rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  margin-bottom: 0.25rem;
  min-height: 40px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  font-size: 0.85rem;
  min-width: 1.1rem;
  text-align: center;
}

.nav-item-num {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.nav-item-title {
  flex: 1;
  line-height: 1.3;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.75rem 0.5rem 0.25rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-gh-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}
.sidebar-gh-link:hover {
  color: var(--primary);
}

/* Main Content Area */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem;
  background: var(--bg-primary);
}

.content-container {
  max-width: 880px;
  margin: 0 auto;
}

.content-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.chapter-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.chapter-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.chapter-badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chapter-pages {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chapter-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.title-icon {
  color: var(--primary);
  margin-top: 0.25rem;
}

.chapter-summary {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Concept Visual Infographic Box */
.concept-visual-card {
  margin: 1.5rem 0 2rem;
  background: var(--bg-surface);
  border: 2px solid var(--primary-light);
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: var(--shadow-md);
  position: relative;
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.concept-visual-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
  display: block;
  margin: 0 auto;
}

.concept-visual-card figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Content Body Styles */
.content-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.head-icon {
  font-size: 0.95rem;
  color: var(--primary);
}

.content-body p {
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.section-divider {
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 2rem 0;
}

/* Feature Lists */
.feature-list {
  list-style: none;
  margin-bottom: 1.25rem;
  padding-left: 0.25rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  line-height: 1.6;
}

.list-check {
  color: #10b981;
  font-size: 0.95rem;
  margin-top: 0.3rem;
  min-width: 1rem;
}

/* Callout Boxes with FontAwesome Icons */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-sidebar);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.callout-icon {
  font-size: 1.25rem;
  color: var(--primary);
  margin-top: 0.15rem;
}

.callout.tip {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.callout-icon.tip {
  color: #d97706;
}
body.theme-dark .callout.tip {
  background: #78350f26;
}

.callout.warning {
  border-left-color: #ef4444;
  background: #fef2f2;
}
.callout-icon.warning {
  color: #dc2626;
}
body.theme-dark .callout.warning {
  background: #7f1d1d26;
}

.callout.success {
  border-left-color: #10b981;
  background: #f0fdf4;
}
.callout-icon.success {
  color: #059669;
}
body.theme-dark .callout.success {
  background: #064e3b26;
}

.callout-body {
  flex: 1;
}

/* Responsive Table Wrapper */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.35rem 0.75rem;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
  min-width: 480px;
}

th {
  background: var(--bg-sidebar);
  padding: 0.85rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

tr:nth-child(even) td {
  background: var(--table-stripe);
}

/* Chapter Navigation Footer */
.chapter-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.nav-chapter-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  min-height: 60px;
  justify-content: center;
}
.nav-chapter-btn.next {
  text-align: right;
}
.nav-chapter-btn:hover:not(:disabled) {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: var(--primary-light);
}
.nav-chapter-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-dir {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.nav-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

/* Right TOC (Desktop Only) */
.app-toc {
  width: var(--toc-width);
  min-width: var(--toc-width);
  padding: 2rem 1rem 2rem 0.5rem;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
}

.toc-header {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toc-list {
  list-style: none;
  border-left: 2px solid var(--border-color);
  padding-left: 0.75rem;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.toc-dot {
  font-size: 0.65rem;
  margin-top: 0.25rem;
}

.toc-link:hover {
  color: var(--primary);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-modal img {
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem;
}

.lightbox-caption {
  color: #f1f5f9;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
}

.drawer-backdrop {
  display: none;
}

/* ========================================================
   RESPONSIVE DESIGN (Tablets & Mobile Phones)
   ======================================================== */

@media (max-width: 1200px) {
  .app-toc {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  .mobile-search-btn {
    display: flex;
  }

  #desktopSearchBar {
    display: none !important;
  }

  .mobile-chapter-bar {
    display: flex;
  }

  .app-header {
    height: 56px;
    padding: 0 0.75rem;
    flex-wrap: nowrap !important;
  }

  .header-left {
    flex-wrap: nowrap !important;
    overflow: hidden;
  }

  /* Single Column Layout on Mobile */
  .app-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.55rem !important;
  }

  .content-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .chapter-article {
    width: 100% !important;
    padding: 1.25rem 0.85rem !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  .chapter-title {
    font-size: 1.35rem;
  }

  .concept-visual-card {
    padding: 0.65rem 0.4rem;
  }

  /* Ensure TOC is 100% hidden on mobile */
  .app-toc {
    display: none !important;
  }

  /* Drawer Navigation on Mobile */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100%;
    z-index: 100;
    width: 290px;
    height: 100vh;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
  }

  .app-sidebar.open {
    left: 0;
    transform: translateX(0);
  }

  .drawer-backdrop.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 99;
  }

  .chapter-nav-footer {
    flex-direction: row;
    gap: 0.5rem;
  }

  .nav-chapter-btn {
    padding: 0.65rem 0.6rem;
  }

  .nav-title {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .lang-tag {
    display: none !important;
  }

  .brand-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.35rem;
  }

  .brand-info h1 {
    font-size: 0.88rem;
  }

  .chapter-title {
    font-size: 1.25rem;
  }

  .chapter-nav-footer {
    flex-direction: column;
  }

  .nav-chapter-btn.next {
    text-align: left;
  }
}
