    :root {
      --bg-primary: #0a0b0e;
      --bg-secondary: #11131a;
      --bg-card: #161922;
      --bg-elevated: #1e2230;
      --text-primary: #f2efe9;
      --text-secondary: #c5bfb3;
      --text-muted: #8a8478;
      --gold-primary: #d4af37;
      --gold-light: #f3e5ab;
      --gold-dark: #997a15;
      --accent-crimson: #8b1e24;
      --border-subtle: rgba(212, 175, 55, 0.22);
      --border-strong: rgba(212, 175, 55, 0.55);
      --shadow-luxury: 0 20px 50px rgba(0, 0, 0, 0.75);
      --font-display: 'Cinzel', Georgia, serif;
      --font-body: 'Cormorant Garamond', 'Times New Roman', serif;
      --font-ui: 'Inter', -apple-system, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
      --base-font-size: 21px;
      --line-height-body: 1.88;
    }

    [data-theme="parchment"] {
      --bg-primary: #f7f3e8;
      --bg-secondary: #efe9d8;
      --bg-card: #fcfaf2;
      --bg-elevated: #e6dec8;
      --text-primary: #1b1814;
      --text-secondary: #3d372e;
      --text-muted: #6e6559;
      --gold-primary: #8c6611;
      --gold-light: #5c4106;
      --gold-dark: #6b4c08;
      --accent-crimson: #7a161b;
      --border-subtle: rgba(140, 102, 17, 0.25);
      --border-strong: rgba(140, 102, 17, 0.6);
      --shadow-luxury: 0 15px 40px rgba(45, 35, 18, 0.12);
    }

    [data-theme="sepia"] {
      --bg-primary: #1a1510;
      --bg-secondary: #241d16;
      --bg-card: #2c241b;
      --bg-elevated: #382e22;
      --text-primary: #eadbc8;
      --text-secondary: #c9b69c;
      --text-muted: #948169;
      --gold-primary: #dfb15b;
      --gold-light: #f6dca8;
      --gold-dark: #a67c2e;
      --accent-crimson: #9e2a2b;
      --border-subtle: rgba(223, 177, 91, 0.22);
      --border-strong: rgba(223, 177, 91, 0.55);
      --shadow-luxury: 0 20px 50px rgba(0, 0, 0, 0.8);
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      background-color: var(--bg-primary);
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: var(--base-font-size);
      line-height: var(--line-height-body);
      overflow-x: hidden;
      transition: background-color 0.35s ease, color 0.35s ease;
    }

    /* Barra de Progreso Superior */
    #reading-progress {
      position: fixed;
      top: 0;
      left: 0;
      height: 4px;
      width: 0%;
      background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
      z-index: 9999;
      box-shadow: 0 0 12px var(--gold-primary);
      transition: width 0.1s linear;
    }

    /* Cabecera Flotante de Control Editorial Ultra-Compacta */
    .top-command-bar {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: rgba(10, 11, 14, 0.94);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border-bottom: 1px solid var(--border-subtle);
      padding: 0.35rem 1rem;
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      font-family: var(--font-ui);
    }

    [data-theme="parchment"] .top-command-bar {
      background: rgba(247, 243, 232, 0.94);
    }
    [data-theme="sepia"] .top-command-bar {
      background: rgba(26, 21, 16, 0.94);
    }

    .brand-Cluster {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      flex-shrink: 0;
    }

    .brand-emblem {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1.5px solid var(--gold-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 0.85rem;
      color: var(--gold-primary);
      background: radial-gradient(circle, rgba(212,175,55,0.18) 0%, transparent 70%);
      flex-shrink: 0;
    }

    .brand-titles {
      display: flex;
      flex-direction: column;
      white-space: nowrap;
      line-height: 1.15;
    }

    .brand-titles .main-t {
      font-family: var(--font-display);
      font-size: 0.86rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      color: var(--gold-primary);
      display: block;
    }

    .brand-titles .sub-t {
      font-size: 0.63rem;
      color: var(--text-muted);
      letter-spacing: 0.03em;
      display: block;
    }

    .toolbar-actions {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex-wrap: nowrap;
    }

    @media (max-width: 1200px) {
      .toolbar-actions {
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
      }
      .toolbar-actions::-webkit-scrollbar {
        display: none;
      }
    }

    .ui-btn-group {
      display: inline-flex;
      align-items: center;
      background: rgba(18, 21, 28, 0.75);
      border: 1px solid rgba(212, 175, 55, 0.22);
      border-radius: 7px;
      padding: 2px;
      gap: 2px;
      flex-shrink: 0;
    }

    .ui-btn-group .ui-btn {
      background: transparent;
      border: 1px solid transparent;
      border-radius: 5px;
      padding: 0.25rem 0.5rem;
      font-size: 0.74rem;
      font-weight: 500;
      white-space: nowrap;
      gap: 0.28rem;
      color: var(--text-primary);
      min-height: 28px;
      height: 28px;
      box-sizing: border-box;
    }

    .ui-btn-group .ui-btn:hover {
      background: rgba(212, 175, 55, 0.15);
      border-color: rgba(212, 175, 55, 0.35);
      color: var(--gold-primary);
    }

    .ui-btn-group .ui-btn.btn-mode-3d {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(124, 58, 237, 0.2));
      border-color: var(--gold-primary);
      color: var(--gold-light);
      font-weight: 700;
    }

    .ui-btn-group .ui-btn.btn-mode-3d.active {
      background: linear-gradient(135deg, var(--gold-primary), #997a15);
      color: #0a0b0e;
      border-color: var(--gold-light);
    }

    .ui-btn-group .ui-btn.polyglot-trigger {
      background: rgba(212, 175, 55, 0.12);
      border-color: rgba(212, 175, 55, 0.35);
    }

    .ui-btn {
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border-subtle);
      padding: 0.48rem 0.88rem;
      border-radius: 8px;
      font-family: var(--font-ui);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: all 0.22s ease;
    }

    .ui-btn:hover {
      border-color: var(--gold-primary);
      color: var(--gold-primary);
      transform: translateY(-1px);
    }

    .ui-btn.polyglot-trigger {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
      border: 1px solid var(--gold-primary);
      color: var(--gold-light);
      font-weight: 600;
      padding: 0.52rem 1.05rem;
      box-shadow: 0 0 18px rgba(212, 175, 55, 0.18);
    }

    [data-theme="parchment"] .ui-btn.polyglot-trigger {
      color: var(--gold-dark);
    }

    .polyglot-badge-count {
      background: var(--gold-primary);
      color: #0a0b0e;
      font-size: 0.68rem;
      font-weight: 800;
      padding: 0.12rem 0.45rem;
      border-radius: 99px;
      letter-spacing: 0.03em;
    }

    /* ==========================================================================
       GAVETA DESPLEGABLE DEL ÍNDICE GENERAL (TOC DRAWER) & BACKDROP
       ========================================================================== */
    .sidebar-toc {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 380px !important;
      max-width: 88vw !important;
      height: 100vh !important;
      background: var(--bg-secondary) !important;
      border-right: 1.5px solid var(--border-strong) !important;
      box-shadow: 15px 0 50px rgba(0, 0, 0, 0.9) !important;
      z-index: 5000 !important;
      transform: translateX(-100%) !important;
      transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
      display: flex !important;
      flex-direction: column !important;
      overflow: hidden !important;
    }

    .sidebar-toc.open,
    .sidebar-toc.is-active {
      transform: translateX(0) !important;
    }

    .sidebar-toc .toc-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.1rem 1.35rem;
      border-bottom: 1px solid var(--border-subtle);
      background: var(--bg-elevated);
      flex-shrink: 0;
    }

    .sidebar-toc .toc-header h3 {
      font-family: var(--font-display);
      font-size: 0.88rem;
      color: var(--gold-primary);
      letter-spacing: 0.12em;
      margin: 0;
      font-weight: 700;
    }

    .sidebar-toc .toc-close-btn {
      background: transparent;
      border: 1px solid var(--border-subtle);
      color: var(--gold-primary);
      font-size: 1.3rem;
      width: 32px;
      height: 32px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      line-height: 1;
    }

    .sidebar-toc .toc-close-btn:hover {
      color: #fff;
      border-color: var(--gold-primary);
      background: rgba(212, 175, 55, 0.2);
    }

    .sidebar-toc .toc-body {
      padding: 1.2rem 1.35rem 3rem;
      overflow-y: auto;
      flex: 1;
      scrollbar-width: thin;
      scrollbar-color: var(--gold-dark) transparent;
    }

    .sidebar-toc .toc-meta-summary {
      font-size: 0.76rem;
      color: var(--text-muted);
      padding-bottom: 0.85rem;
      margin-bottom: 0.95rem;
      border-bottom: 1px dashed var(--border-subtle);
      line-height: 1.45;
    }

    /* Backdrop del Índice */
    .toc-backdrop {
      position: fixed !important;
      inset: 0 !important;
      background: rgba(0, 0, 0, 0.72) !important;
      backdrop-filter: blur(4px) !important;
      -webkit-backdrop-filter: blur(4px) !important;
      z-index: 4999 !important;
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
      transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    .toc-backdrop.open,
    .toc-backdrop.is-active {
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }

    /* Contenedor Maestro: Códice Web Imperial */
    .codex-wrapper {
      width: 100%;
      min-height: calc(100vh - 60px);
      display: block;
      position: relative;
    }

    .codex-sheets-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 2.5rem 1.5rem 6rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3.5rem;
    }

    .toc-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
    }

    .toc-item a {
      display: block;
      text-decoration: none;
      color: var(--text-secondary);
      font-size: 0.8rem;
      padding: 0.42rem 0.65rem;
      border-radius: 6px;
      line-height: 1.35;
      transition: all 0.2s ease;
      border-left: 2px solid transparent;
    }

    .toc-item a:hover,
    .toc-item a.active {
      background: rgba(212, 175, 55, 0.1);
      color: var(--gold-primary);
      border-left-color: var(--gold-primary);
    }

    .toc-book-divider {
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--gold-primary);
      letter-spacing: 0.08em;
      margin-top: 0.95rem;
      margin-bottom: 0.25rem;
      padding-left: 0.4rem;
      text-transform: uppercase;
    }

    .codex-stats-box {
      margin-top: 1.5rem;
      padding: 0.9rem;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      font-size: 0.75rem;
      color: var(--text-secondary);
    }

    .codex-stats-box div {
      display: flex;
      justify-content: space-between;
      padding: 0.22rem 0;
      border-bottom: 1px dashed rgba(212, 175, 55, 0.12);
    }

    .codex-stats-box div:last-child {
      border-bottom: none;
    }

    /* Contenedor Central de Páginas Editoriales */
    .codex-main {
      padding: 3rem 2rem 6rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3.5rem;
    }

    .book-sheet {
      width: 100%;
      max-width: calc(var(--sheet-max-width, 920px) * var(--sheet-scale, 1));
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      box-shadow: var(--shadow-luxury);
      padding: calc(var(--sheet-padding-v, 4.5rem) * var(--sheet-scale, 1)) calc(var(--sheet-padding-h, 5rem) * var(--sheet-scale, 1));
      position: relative;
      border-radius: 4px;
      transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    }

    .book-sheet::before {
      content: "";
      position: absolute;
      inset: 12px;
      border: 1px solid rgba(212, 175, 55, 0.14);
      pointer-events: none;
    }

    .sheet-running-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-family: var(--font-display);
      font-size: 0.72rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--text-muted);
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 0.85rem;
      margin-bottom: 2.8rem;
    }

    .sheet-footer-folio {
      margin-top: 3.5rem;
      padding-top: 1rem;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      justify-content: space-between;
      font-family: var(--font-display);
      font-size: 0.74rem;
      color: var(--text-muted);
      letter-spacing: 0.12em;
    }

    /* Portada Monumental */
    .cover-sheet {
      text-align: center;
      padding: 6rem 4.5rem;
      background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.14), transparent 70%), var(--bg-card);
      border: 2px solid var(--gold-primary);
    }

    .cover-pre-title {
      font-family: var(--font-display);
      font-size: 0.85rem;
      letter-spacing: 0.28em;
      text-transform: uppercase;
      color: var(--gold-primary);
      margin-bottom: 1.5rem;
    }

    .cover-title {
      font-family: var(--font-display);
      font-size: 4.2rem;
      font-weight: 900;
      letter-spacing: 0.14em;
      line-height: 1.1;
      color: var(--text-primary);
      text-shadow: 0 4px 24px rgba(212, 175, 55, 0.25);
      margin-bottom: 1.2rem;
    }

    .cover-subtitle {
      font-family: var(--font-body);
      font-size: 1.45rem;
      font-style: italic;
      color: var(--text-secondary);
      max-width: 680px;
      margin: 0 auto 2.5rem;
      line-height: 1.55;
    }

    .cover-ornament {
      margin: 2.2rem auto;
      width: 240px;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
      position: relative;
    }

    .cover-ornament::after {
      content: "❖";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--bg-card);
      padding: 0 0.8rem;
      color: var(--gold-primary);
      font-size: 1.2rem;
    }

    .cover-author {
      font-family: var(--font-display);
      font-size: 1.55rem;
      font-weight: 700;
      letter-spacing: 0.16em;
      color: var(--gold-primary);
      margin-top: 2rem;
    }

    .cover-credentials {
      font-family: var(--font-ui);
      font-size: 0.82rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-top: 0.65rem;
      max-width: 660px;
      margin-left: auto;
      margin-right: auto;
      line-height: 1.6;
    }

    .cover-chronology-badge {
      display: inline-block;
      margin-top: 2.8rem;
      padding: 0.75rem 1.6rem;
      border: 1px solid var(--border-strong);
      border-radius: 4px;
      font-family: var(--font-display);
      font-size: 0.78rem;
      letter-spacing: 0.14em;
      color: var(--gold-light);
      background: rgba(212, 175, 55, 0.07);
    }

    [data-theme="parchment"] .cover-chronology-badge {
      color: var(--gold-dark);
    }

    /* Tipografía de Capítulos y Libros */
    .book-part-banner {
      text-align: center;
      padding: 3.2rem 2rem;
      margin-bottom: 2.5rem;
      border-top: 2px solid var(--gold-primary);
      border-bottom: 2px solid var(--gold-primary);
      background: linear-gradient(180deg, rgba(212,175,55,0.06), transparent, rgba(212,175,55,0.06));
    }

    .book-part-number {
      font-family: var(--font-display);
      font-size: 0.95rem;
      letter-spacing: 0.3em;
      color: var(--gold-primary);
      text-transform: uppercase;
      margin-bottom: 0.6rem;
    }

    .book-part-title {
      font-family: var(--font-display);
      font-size: 2.35rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      color: var(--text-primary);
      margin-bottom: 0.6rem;
    }

    .book-part-subtitle {
      font-style: italic;
      font-size: 1.25rem;
      color: var(--text-secondary);
    }

    .epigraph-box {
      margin: 2rem 0 2.8rem;
      padding: 1.5rem 2.2rem;
      border-left: 3px solid var(--gold-primary);
      background: rgba(212, 175, 55, 0.05);
      font-style: italic;
      font-size: 1.15rem;
      color: var(--text-secondary);
    }

    .poetic-prelude {
      margin: 2.2rem auto 3rem;
      padding: 2rem 2.5rem;
      max-width: 680px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-secondary);
      text-align: center;
      position: relative;
    }

    .poetic-prelude h4 {
      font-family: var(--font-display);
      font-size: 0.85rem;
      letter-spacing: 0.2em;
      color: var(--gold-primary);
      text-transform: uppercase;
      margin-bottom: 1.2rem;
    }

    .poetic-prelude pre {
      font-family: var(--font-body);
      font-style: italic;
      font-size: 1.08rem;
      line-height: 1.75;
      white-space: pre-wrap;
      color: var(--text-primary);
    }

    .chapter-header {
      text-align: center;
      margin: 1rem 0 2.6rem;
    }

    .chapter-number {
      font-family: var(--font-display);
      font-size: 0.86rem;
      letter-spacing: 0.25em;
      color: var(--gold-primary);
      text-transform: uppercase;
      display: block;
      margin-bottom: 0.5rem;
    }

    .chapter-title {
      font-family: var(--font-display);
      font-size: 1.95rem;
      font-weight: 700;
      line-height: 1.28;
      color: var(--text-primary);
      margin-bottom: 0.45rem;
    }

    .chapter-subtitle {
      font-style: italic;
      font-size: 1.2rem;
      color: var(--gold-light);
    }

    [data-theme="parchment"] .chapter-subtitle {
      color: var(--gold-dark);
    }

    .prose p {
      margin-bottom: 1.45rem;
      text-align: justify;
      hyphens: auto;
    }

    .prose p.dropcap::first-letter {
      float: left;
      font-family: var(--font-display);
      font-size: 3.9rem;
      line-height: 0.82;
      padding-top: 4px;
      padding-right: 12px;
      padding-bottom: 4px;
      color: var(--gold-primary);
      font-weight: 800;
    }

    .prose h3 {
      font-family: var(--font-display);
      font-size: 1.22rem;
      color: var(--gold-primary);
      letter-spacing: 0.06em;
      margin: 2.4rem 0 1rem;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 0.4rem;
    }

    .clinical-case-box {
      margin: 2.2rem 0;
      padding: 1.65rem 2rem;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-left: 4px solid var(--gold-primary);
      border-radius: 4px;
    }

    .clinical-case-title {
      font-family: var(--font-display);
      font-size: 0.85rem;
      letter-spacing: 0.14em;
      color: var(--gold-primary);
      text-transform: uppercase;
      margin-bottom: 0.75rem;
      font-weight: 700;
    }

    .axiomatic-callout {
      margin: 2.2rem 0;
      padding: 1.6rem 2rem;
      text-align: center;
      border-top: 1px solid var(--border-strong);
      border-bottom: 1px solid var(--border-strong);
      font-family: var(--font-display);
      font-size: 1.12rem;
      color: var(--gold-light);
      line-height: 1.6;
      letter-spacing: 0.03em;
    }

    [data-theme="parchment"] .axiomatic-callout {
      color: var(--gold-dark);
    }

    .chapter-cliffhanger {
      margin-top: 2.6rem;
      padding: 1.35rem 1.8rem;
      background: linear-gradient(90deg, rgba(139, 30, 36, 0.14), rgba(212, 175, 55, 0.08));
      border-left: 3px solid var(--accent-crimson);
      font-style: italic;
    }

    /* Código de Barras Legal Code-128 */
    .barcode-box {
      margin: 1.8rem 0;
      padding: 1.25rem;
      background: #ffffff;
      color: #000000;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      border-radius: 6px;
      border: 2px solid var(--gold-primary);
      box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }

    .barcode-numbers {
      font-family: var(--font-mono);
      font-size: 0.82rem;
      letter-spacing: 0.08em;
      margin-top: 0.45rem;
      color: #000;
      font-weight: 600;
    }

    /* Cuadrícula de los 249 Idiomas en la Declaración de Universalidad */
    .languages-declaration-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 0.55rem;
      margin-top: 1.5rem;
      max-height: 540px;
      overflow-y: auto;
      padding: 0.85rem;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
    }

    .lang-pill {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      padding: 0.45rem 0.65rem;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      font-family: var(--font-ui);
      font-size: 0.76rem;
      cursor: pointer;
      transition: all 0.18s ease;
    }

    .lang-pill:hover {
      border-color: var(--gold-primary);
      background: rgba(212, 175, 55, 0.12);
      transform: translateY(-1px);
    }

    .lang-pill .flag-i {
      font-size: 1.15rem;
      flex-shrink: 0;
    }

    .lang-pill .lang-meta {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .lang-pill .lang-es {
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .lang-pill .lang-nat {
      font-size: 0.66rem;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Modal Políglota Universal de 249 Idiomas */
    .polyglot-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(5, 6, 8, 0.85);
      backdrop-filter: blur(12px);
      z-index: 5000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
    }

    .polyglot-modal-backdrop.open {
      display: flex;
    }

    .polyglot-modal {
      width: 100%;
      max-width: 1120px;
      max-height: 88vh;
      background: var(--bg-card);
      border: 1.5px solid var(--gold-primary);
      border-radius: 14px;
      box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      font-family: var(--font-ui);
    }

    .polyglot-modal-header {
      padding: 1.25rem 1.6rem;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
    }

    .polyglot-modal-header h3 {
      font-family: var(--font-display);
      font-size: 1.15rem;
      color: var(--gold-primary);
      letter-spacing: 0.08em;
    }

    .polyglot-controls {
      padding: 1rem 1.6rem;
      background: var(--bg-primary);
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      gap: 0.85rem;
      flex-wrap: wrap;
      align-items: center;
    }

    .polyglot-search {
      flex: 1;
      min-width: 240px;
      padding: 0.68rem 1rem;
      border-radius: 8px;
      border: 1px solid var(--border-strong);
      background: var(--bg-card);
      color: var(--text-primary);
      font-family: var(--font-ui);
      font-size: 0.88rem;
    }

    .polyglot-region-tabs {
      display: flex;
      gap: 0.4rem;
      flex-wrap: wrap;
    }

    .region-tab {
      padding: 0.42rem 0.78rem;
      font-size: 0.75rem;
      border-radius: 6px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-card);
      color: var(--text-secondary);
      cursor: pointer;
    }

    .region-tab.active {
      background: var(--gold-primary);
      color: #0a0b0e;
      font-weight: 700;
      border-color: var(--gold-primary);
    }

    .polyglot-modal-body {
      padding: 1.25rem 1.6rem;
      overflow-y: auto;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
      gap: 0.65rem;
    }

    .polyglot-status-banner {
      padding: 0.75rem 1.6rem;
      background: var(--bg-secondary);
      border-top: 1px solid var(--border-subtle);
      font-size: 0.78rem;
      color: var(--text-secondary);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    /* Indicador de Traducción en Curso */
    #translation-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 6000;
      background: var(--bg-elevated);
      border: 1.5px solid var(--gold-primary);
      color: var(--text-primary);
      padding: 0.9rem 1.35rem;
      border-radius: 10px;
      font-family: var(--font-ui);
      font-size: 0.84rem;
      box-shadow: 0 15px 40px rgba(0,0,0,0.65);
      display: none;
      align-items: center;
      gap: 0.75rem;
    }

    /* Ocultar cualquier barra externa si el motor auxiliar del navegador se activa */
    .goog-te-banner-frame.skiptranslate,
    .goog-te-gadget-icon,
    #goog-gt-tt,
    .VIpgJd-ZVi9od-ORHb-OEVmcd,
    .VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
      display: none !important;
      visibility: hidden !important;
    }
    body {
      top: 0px !important;
    }

    @media (max-width: 1100px) {
      .codex-layout {
        grid-template-columns: 1fr;
      }
      .codex-sidebar {
        display: none;
      }
      .book-sheet {
        padding: 2.8rem 2rem;
      }
      .cover-title {
        font-size: 2.75rem;
      }
    }

    /* Restricción Absoluta de Impresión por Derechos de Autor */
    @media print {
      html, body, * {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
      }
    }

    /* Resaltado de lectura vocal activa (TTS) */
    .tts-reading-active {
      background: rgba(212, 175, 55, 0.14) !important;
      border-left: 3px solid var(--gold-primary) !important;
      padding-left: 0.85rem !important;
      border-radius: 4px;
      transition: all 0.25s ease;
    }

    .ui-btn.active-state {
      border-color: var(--gold-primary);
      background: rgba(212, 175, 55, 0.22);
      color: var(--gold-light);
      box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
    }

    [data-theme="parchment"] .ui-btn.active-state {
      color: var(--gold-dark);
    }

    .lang-pill.active-lang-pill {
      border-color: var(--gold-primary);
      background: rgba(212, 175, 55, 0.22);
      box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    }

    section.book-sheet, h3[id] {
      scroll-margin-top: 82px;
    }

    /* Modales Auxiliares de la Suite */
    .tts-modal-backdrop, .polyglot-modal-backdrop, .cite-modal-backdrop, .search-modal-backdrop {
      position: fixed !important;
      inset: 0 !important;
      background: rgba(0, 0, 0, 0.82) !important;
      backdrop-filter: blur(8px) !important;
      -webkit-backdrop-filter: blur(8px) !important;
      z-index: 100000 !important;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    /* Resaltador de búsqueda en texto */
    mark.codex-highlight {
      background: rgba(212, 175, 55, 0.45) !important;
      color: #fff !important;
      padding: 2px 4px;
      border-radius: 3px;
      box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    }
    mark.codex-highlight.current-match {
      background: #d4af37 !important;
      color: #0a0b0e !important;
      font-weight: 700;
      box-shadow: 0 0 14px #d4af37;
    }

    /* Modo Zen / Tameion */
    body.zen-focus-active .top-command-bar {
      opacity: 0.25;
      transition: opacity 0.3s ease;
    }
    body.zen-focus-active .top-command-bar:hover {
      opacity: 1;
    }
    body.zen-focus-active .book-sheet p {
      opacity: 0.45;
      transition: opacity 0.25s ease, filter 0.25s ease;
      filter: blur(0.3px);
    }
    body.zen-focus-active .book-sheet p:hover,
    body.zen-focus-active .book-sheet p.tts-reading-active {
      opacity: 1 !important;
      filter: none !important;
    }

    /* Escenario de Revista 3D Real */
    #real3d-flipbook-container {
      width: 100%;
      min-height: calc(100vh - 60px);
      display: none;
      background: radial-gradient(circle at 50% 50%, #151824 0%, #080a10 100%);
      position: relative;
    }

    .flipbook-3d-stage {
      max-width: 1300px;
      margin: 0 auto;
      padding: 2rem 1.5rem 6rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: calc(100vh - 120px);
      perspective: 2500px;
    }

    .flipbook-spread {
      display: flex;
      width: 100%;
      max-width: 1100px;
      min-height: 680px;
      background: var(--bg-card);
      border: 1.5px solid var(--border-strong);
      border-radius: 8px;
      box-shadow: 0 30px 80px rgba(0,0,0,0.85), 0 0 35px rgba(212,175,55,0.2);
      position: relative;
      overflow: hidden;
    }

    .flipbook-page-left, .flipbook-page-right {
      flex: 1;
      padding: 3rem 2.8rem;
      overflow-y: auto;
      position: relative;
      max-height: 720px;
    }

    .flipbook-page-left {
      border-right: 1px solid var(--border-subtle);
      box-shadow: inset -20px 0 30px rgba(0,0,0,0.4);
    }

    .flipbook-page-right {
      box-shadow: inset 20px 0 30px rgba(0,0,0,0.4);
    }

    .flipbook-spine-line {
      position: absolute;
      left: 50%;
      top: 0;
      bottom: 0;
      width: 8px;
      transform: translateX(-50%);
      background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(212,175,55,0.3), rgba(0,0,0,0.6));
      pointer-events: none;
      z-index: 10;
    }

    .flipbook-nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: rgba(10, 11, 14, 0.92);
      border: 1.5px solid var(--gold-primary);
      color: var(--gold-primary);
      font-size: 1.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 50;
      transition: all 0.2s ease;
      box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }
    .flipbook-nav-btn:hover {
      background: var(--gold-primary);
      color: #000;
      transform: translateY(-50%) scale(1.1);
    }
    .flipbook-nav-btn.prev { left: 16px; }
    .flipbook-nav-btn.next { right: 16px; }

