/* =========================================================================
   📖 EL ÁLBUM ARCANO & LECTOR SUBRAYADOR MULTICOLOR — ESTILOS OFICIALES
   ========================================================================= */

@keyframes albumAuraGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(255, 204, 102, 0.35), 0 0 26px rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 224, 130, 0.78), 0 0 42px rgba(255, 204, 102, 0.45);
    border-color: #ffe082;
  }
}

/* Botón en el menú principal */
#albumArcanoBtn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-color: #e6c25b !important;
  color: #ffe599 !important;
  text-shadow: 0 0 8px rgba(255, 204, 102, 0.55);
  background: linear-gradient(180deg, rgba(64, 42, 16, 0.92), rgba(28, 17, 7, 0.95));
  animation: albumAuraGlow 3.2s ease-in-out infinite;
}

/* Modal Principal del Álbum Arcano */
.album-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(6, 4, 2, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
}

.album-book-shell {
  width: 100%;
  max-width: 1060px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top center, #25170c 0%, #120b06 75%);
  border: 2px solid #bfa060;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.88), inset 0 0 40px rgba(212, 175, 55, 0.08);
  overflow: hidden;
  color: #f4eedf;
  font-family: 'Crimson Text', Georgia, serif;
}

.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(180deg, rgba(44, 28, 14, 0.96), rgba(22, 14, 8, 0.96));
  border-bottom: 1.5px solid #6e4e26;
}

.album-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.album-crest {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(255, 204, 102, 0.55));
}

.album-header h2 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  color: #f4d88c;
  letter-spacing: 0.06em;
}

.album-subtitle {
  font-size: 0.9rem;
  color: #c8b896;
}

.album-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #8a642c;
  background: rgba(0, 0, 0, 0.45);
  color: #f4d88c;
  font-size: 1.1rem;
  cursor: pointer;
}
.album-close-btn:hover {
  background: rgba(212, 175, 55, 0.2);
}

/* Barra de estado y progreso */
.album-status-bar {
  padding: 12px 22px;
  background: rgba(16, 10, 6, 0.92);
  border-bottom: 1px solid #3f2a15;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.album-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: #e6d8bc;
  margin-bottom: 6px;
}

.album-reward-chip {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 204, 102, 0.14);
  border: 1px solid #d4af37;
  color: #ffe082;
}
.album-reward-chip.claimed {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #86efac;
}

.album-progress-track {
  width: 100%;
  height: 10px;
  background: #23160c;
  border-radius: 999px;
  border: 1px solid #593b1c;
  overflow: hidden;
}

.album-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b88628, #ffd970, #fff0b3);
  transition: width 0.45s ease;
}

.album-destiny-banner {
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.10);
  border: 1px dashed #bfa060;
  color: #f3e5c3;
}

/* Cortina de revelado de portadas */
.album-grid-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
}

.album-curtain {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: radial-gradient(circle at center, rgba(32, 20, 10, 0.97), rgba(12, 7, 4, 0.99));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.34s ease;
  opacity: 1;
}
.album-curtain.hidden {
  opacity: 0;
  pointer-events: none;
}
.album-curtain-spinner {
  font-size: 2.6rem;
  animation: albumAuraGlow 1.6s ease-in-out infinite;
  border-radius: 50%;
  padding: 12px 16px;
  border: 1.5px solid #d4af37;
  background: rgba(212, 175, 55, 0.12);
}
.album-curtain-text {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #f4d88c;
}

/* Rejilla de cromos/viñetas */
.album-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.album-cromo {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(35, 23, 13, 0.95), rgba(18, 12, 7, 0.95));
  border: 1.5px solid #4d351d;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  color: inherit;
}

.album-cromo:hover {
  transform: translateY(-4px);
  border-color: #d4af37;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.album-cromo.is-gold {
  border-color: #d4af37;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.22);
}

.album-cromo.is-destino {
  border-color: #ffe082;
  animation: albumAuraGlow 2.4s ease-in-out infinite;
}

.album-cromo-ribbon {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.album-cromo-ribbon.destino {
  background: linear-gradient(135deg, #ffd54f, #ff8f00);
  color: #1a0c00;
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.65);
}
.album-cromo-ribbon.next {
  background: rgba(56, 189, 248, 0.9);
  color: #071926;
}

.album-cromo-frame {
  width: 100%;
  aspect-ratio: 3 / 3.65;
  max-height: 225px;
  border-radius: 8px;
  overflow: hidden;
  background: #0d0805;
  border: 1px solid #3c2816;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.album-cromo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.35s ease, transform 0.35s ease;
}

/* Blanco y negro para temas bloqueados, color vibrante para desbloqueados */
.album-cromo.is-locked .album-cromo-img {
  filter: grayscale(100%) brightness(0.72) contrast(1.05);
}
.album-cromo.is-gold .album-cromo-img,
.album-cromo.is-destino .album-cromo-img,
.album-cromo.is-next .album-cromo-img {
  filter: none;
}

.album-cromo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #2a1d11 0%, #120b06 100%);
  color: #a89574;
}
.album-cromo.is-gold .album-cromo-placeholder {
  color: #f3d78e;
}
.ph-num {
  font-family: 'Cinzel', serif;
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
}
.ph-lbl {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin-top: 6px;
}

/* Placas metálicas en PLATA (bloqueado) y ORO (desbloqueado) */
.album-placa {
  margin-top: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.album-placa.plata {
  background: linear-gradient(135deg, #cfd8dc 0%, #90a4ae 45%, #eceff1 70%, #78909c 100%);
  color: #1c2833;
  border: 1px solid #b0bec5;
}

.album-placa.oro {
  background: linear-gradient(135deg, #fff1a8 0%, #d4af37 45%, #ffe57f 70%, #9c6d14 100%);
  color: #1b0e02;
  border: 1px solid #fff3c4;
}

.album-placa.oro-suave {
  background: linear-gradient(135deg, #f3d78e 0%, #b88628 60%, #e0b85c 100%);
  color: #1a0d03;
  border: 1px solid #f7e3a8;
}

/* Paginación */
.album-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: rgba(18, 11, 6, 0.96);
  border-top: 1px solid #4d351d;
}

.album-page-indicator {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  color: #e8d5a7;
  font-weight: 700;
}

/* Botones comunes del Álbum */
.album-btn-gold,
.album-btn-ghost,
.album-btn-test {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.album-btn-gold {
  background: linear-gradient(135deg, #f0cf7b, #b58328);
  color: #140b04;
  border: 1px solid #fff0c2;
}
.album-btn-gold:hover { transform: translateY(-1px); filter: brightness(1.07); }

.album-btn-test {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c);
  color: #fff5f5;
  border: 1px solid #f87171;
}
.album-btn-test:hover { transform: translateY(-1px); filter: brightness(1.1); }

.album-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #e8d5a7;
  border: 1px solid #6e4e26;
}
.album-btn-ghost:hover:not(:disabled) { border-color: #d4af37; color: #fff2cc; }
.album-btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }

/* Sub-modal de acción del tema y Modal de Entrega */
.album-submodal-overlay,
.album-entrega-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(5, 3, 2, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.album-submodal-card,
.album-entrega-card {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(160deg, #21140b, #110a05);
  border: 2px solid #d4af37;
  border-radius: 16px;
  padding: 24px;
  color: #f4eedf;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.85), 0 0 32px rgba(212, 175, 55, 0.25);
  font-family: 'Crimson Text', Georgia, serif;
}

.album-entrega-card {
  text-align: center;
  animation: albumAuraGlow 2.8s ease-in-out infinite;
}
.album-entrega-aura {
  font-size: 3.4rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.7));
}
.album-entrega-kicker {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #ffd54f;
  font-weight: 800;
  margin-bottom: 6px;
}
.album-entrega-card h2,
.album-submodal-card h3 {
  font-family: 'Cinzel', serif;
  color: #f7e3a8;
  margin: 0 0 10px 0;
}
.album-entrega-list {
  text-align: left;
  margin: 14px 0 18px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.98rem;
}
.album-entrega-actions,
.album-submodal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.album-warning-box {
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: #fde68a;
  margin: 12px 0;
  line-height: 1.45;
}

.album-badge-gold,
.album-badge-dest,
.album-badge-next {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}
.album-badge-gold { background: rgba(212, 175, 55, 0.22); border: 1px solid #ffd54f; color: #ffe57f; }
.album-badge-dest { background: rgba(255, 152, 0, 0.22); border: 1px solid #ffb74d; color: #ffe0b2; }
.album-badge-next { background: rgba(56, 189, 248, 0.18); border: 1px solid #38bdf8; color: #bae6fd; }

.album-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.album-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #4d351d;
  border-radius: 10px;
  padding: 10px 12px;
}
.album-file-name {
  font-size: 0.95rem;
  color: #f4eedf;
  flex: 1;
  min-width: 160px;
}
.album-file-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.album-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #8a642c;
  background: rgba(0, 0, 0, 0.35);
  color: #f3d78e;
  text-decoration: none;
  cursor: pointer;
}
.album-mini-btn.gold {
  background: linear-gradient(135deg, #e5c16c, #b58328);
  color: #140b04;
  border-color: #fff0c2;
}

/* =========================================================================
   🖍️ EL LECTOR ARCANO (PDF.js + SUBRAYADOR MULTICOLOR)
   ========================================================================= */
.lector-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: #0b0806;
  display: flex;
  flex-direction: column;
}

.lector-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lector-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: linear-gradient(180deg, #21150b, #140c06);
  border-bottom: 1.5px solid #6e4e26;
  color: #f4eedf;
  width: 100%;
  box-sizing: border-box;
}

.lector-tb-left,
.lector-tb-center,
.lector-tb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lector-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f4d88c;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lector-page-info,
.lector-zoom-info {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: #e8d5a7;
  min-width: 56px;
  text-align: center;
}

.lector-sep { color: #5a3c20; }

.lector-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid #6e4e26;
  background: rgba(255, 255, 255, 0.06);
  color: #f4eedf;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.lector-btn:hover { border-color: #d4af37; color: #ffe57f; }
.lector-btn.active { background: #b91c1c; border-color: #fca5a5; color: #fff; }
.lector-btn.gold { background: linear-gradient(135deg, #e5c16c, #b58328); color: #140b04; border-color: #fff0c2; }
.lector-btn.close { background: rgba(185, 28, 28, 0.25); border-color: #ef4444; color: #fecaca; }

.lector-colors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid #4d351d;
  border-radius: 999px;
}

.hl-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hl-swatch:hover { transform: scale(1.15); }
.hl-swatch.active { border-color: #ffffff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.85); transform: scale(1.15); }

.lector-hint-bar {
  padding: 6px 16px;
  font-size: 0.82rem;
  background: rgba(212, 175, 55, 0.10);
  color: #e6d8bc;
  border-bottom: 1px solid #3c2816;
  text-align: center;
}

.lector-stage {
  flex: 1;
  overflow: auto;
  padding: 20px 14px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #17120e;
}

.lector-page-wrap {
  position: relative;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
  isolation: isolate;
}

#lectorCanvas {
  display: block;
}

.lector-hl-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.lector-hl-layer.eraser-active {
  pointer-events: auto;
  z-index: 4;
}

.lector-hl-rect {
  position: absolute;
  border-radius: 3px;
}
.lector-hl-layer.eraser-active .lector-hl-rect {
  cursor: pointer;
  outline: 1.5px dashed #ef4444;
}

/* Capa de texto PDF.js alineada para selección limpia */
.lector-text-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  line-height: 1;
  user-select: text;
  -webkit-user-select: text;
}
.lector-text-layer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}
.lector-text-layer ::selection {
  background: rgba(255, 213, 79, 0.42);
}

@media (max-width: 820px) {
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
  .lector-title { display: none; }
}

/* =========================================================================
   ✨ SUPERPODERES DEL LECTOR ARCANO (Diccionario, Podcast, Notas, Filtros, ⭐)
   ========================================================================= */

/* Filtros de lectura cómoda en el canvas PDF */
.lector-page-wrap.mode-sepia #lectorCanvas {
  filter: sepia(0.35) brightness(0.95) contrast(0.98);
}
.lector-page-wrap.mode-night {
  background: #141414;
}
.lector-page-wrap.mode-night #lectorCanvas {
  filter: invert(0.88) hue-rotate(180deg) contrast(0.95);
}
.lector-page-wrap.mode-night .lector-hl-layer {
  mix-blend-mode: screen;
  opacity: 0.48;
}

/* Botón estrella y nota con indicador activo */
.lector-btn.starred {
  background: rgba(255, 213, 79, 0.22);
  border-color: #ffd54f;
  color: #ffe57f;
}
@keyframes noteBtnPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.55), 0 0 16px rgba(245, 158, 11, 0.35);
    border-color: #fbbf24;
  }
  50% {
    box-shadow: 0 0 18px rgba(253, 224, 71, 0.95), 0 0 28px rgba(245, 158, 11, 0.65);
    border-color: #fef08a;
  }
}

.lector-btn.has-note {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(180, 83, 9, 0.38));
  border-color: #fbbf24;
  color: #fef08a;
  animation: noteBtnPulse 2s ease-in-out infinite;
}

/* Barra desplegable de Podcast dentro del Lector */
.lector-subbar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: linear-gradient(180deg, rgba(35, 22, 11, 0.96), rgba(20, 12, 6, 0.96));
  border-bottom: 1px solid #6e4e26;
  color: #f4eedf;
}
.lector-subbar.open {
  display: flex;
}
.lector-podcast-title {
  font-family: 'Cinzel', serif;
  font-size: 0.84rem;
  color: #f4d88c;
  font-weight: 700;
}
.lector-podcast-audio {
  height: 36px;
  max-width: 420px;
  width: 100%;
}

/* Barra rápida de Marcadores (páginas con estrella) */
.lector-bookmarks-bar {
  display: none;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 16px;
  background: rgba(16, 10, 6, 0.94);
  border-bottom: 1px solid #3c2816;
  font-size: 0.8rem;
  color: #d8be85;
}
.lector-bookmarks-bar.open {
  display: flex;
}
.lector-bm-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #8a642c;
  background: rgba(212, 175, 55, 0.14);
  color: #ffe599;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.lector-bm-chip:hover,
.lector-bm-chip.current {
  background: #d4af37;
  color: #140b04;
}

/* Panel flotante de Post-it / Nota de página */
.lector-note-drawer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9800;
  width: min(340px, calc(100vw - 36px));
  background: linear-gradient(160deg, #2b1d0f, #181008);
  border: 1.5px solid #d4af37;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.82);
  color: #f4eedf;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.lector-note-drawer.open {
  display: flex;
}
.lector-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  color: #f4d88c;
  font-weight: 700;
}
.lector-note-area {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border-radius: 9px;
  border: 1px solid #6e4e26;
  background: rgba(10, 7, 4, 0.85);
  color: #f4eedf;
  padding: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.45;
  box-sizing: border-box;
}
.lector-note-area:focus {
  outline: none;
  border-color: #ffd54f;
}
.lector-note-status {
  font-size: 0.74rem;
  color: #b9aa8e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tarjeta flotante de Diccionario / Glosario Arcano */
.lector-dict-card {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9810;
  width: min(410px, calc(100vw - 36px));
  max-height: 62vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #21150c, #110a05);
  border: 1.5px solid #d4af37;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.88), 0 0 24px rgba(212, 175, 55, 0.22);
  color: #f4eedf;
  display: none;
  flex-direction: column;
  gap: 10px;
  font-family: 'Inter', system-ui, sans-serif;
}
.lector-dict-card.open {
  display: flex;
}
.lector-dict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lector-dict-head h4 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 0.96rem;
  color: #f4d88c;
}
.lector-dict-search {
  display: flex;
  gap: 6px;
}
.lector-dict-search input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #6e4e26;
  background: rgba(10, 7, 4, 0.85);
  color: #f4eedf;
  font-size: 0.84rem;
}
.lector-dict-term {
  font-family: 'Cinzel', serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffe599;
}
.lector-dict-source {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid #bfa060;
  color: #f3d78e;
}
.lector-dict-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e6dac3;
}

/* =========================================================================
   ✨ MEJORAS UX LECTOR (Salmón, Enlaces PDF, Márgenes Laterales)
   ========================================================================= */

/* Papel color salmón anaranjado cálido (mantiene tinta negra 100% nítida con multiply) */
.lector-page-wrap.mode-salmon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 174, 118, 0.36);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2;
}

/* Capa de enlaces interactivos del PDF (Índice clicable) */
.lector-ann-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.lector-pdf-link {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s ease, outline 0.15s ease;
}
.lector-pdf-link:hover {
  background: rgba(212, 175, 55, 0.22);
  outline: 1px solid rgba(212, 175, 55, 0.65);
}

/* Márgenes laterales para pasar página (1 clic = ±1, doble clic = ±5) */
.lector-stage {
  position: relative;
}
.lector-margin-nav {
  position: fixed;
  top: 112px;
  bottom: 24px;
  width: 54px;
  z-index: 9740;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  color: rgba(244, 216, 140, 0.28);
  font-size: 1.7rem;
  font-weight: 800;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease;
}
.lector-margin-nav.left { left: 8px; }
.lector-margin-nav.right { right: 8px; }
.lector-margin-nav:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #ffe599;
}
.lector-margin-nav:active {
  background: rgba(212, 175, 55, 0.24);
}
@media (max-width: 720px) {
  .lector-margin-nav { width: 34px; font-size: 1.25rem; }
}


/* ✏️ Modo Lapicero Táctil de precisión palabra-a-palabra */
.lector-page-wrap.draw-mode-active,
.lector-page-wrap.draw-mode-active .lector-text-layer {
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: crosshair !important;
}
.lector-hl-preview-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.lector-hl-preview {
  position: absolute;
  pointer-events: none;
  border-radius: 3px;
  mix-blend-mode: multiply;
}


/* ⚡ Respuesta táctil instantánea (elimina el delay de 300ms de Android WebView en todos los botones) */
.lector-toolbar,
.lector-btn,
.hl-swatch,
.lector-margin-nav,
.album-card,
.album-modal-btn,
#albumArcanoModal button,
#lectorArcanoModal button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
}

/* 📖 Cortinilla inmediata al abrir un tema en el Lector Arcano */
.lector-loading-curtain {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(12, 8, 5, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: all;
}
.lector-loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(216, 190, 133, 0.22);
  border-top-color: #f3d78e;
  animation: lectorSpin 0.85s linear infinite;
}
.lector-loading-text {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f3d78e;
  text-align: center;
  padding: 0 20px;
}
@keyframes lectorSpin {
  to { transform: rotate(360deg); }
}


/* 🚀 Aislamiento GPU de la barra y desactivación de cuellos de botella en Android WebView */
.lector-toolbar {
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
}
html.ua-android-lite .lector-hl-layer,
html.ua-android-lite .lector-hl-rect,
html.ua-android-lite .lector-hl-preview {
  mix-blend-mode: normal !important;
}
html.ua-android-lite .lector-hl-rect {
  opacity: 0.42;
}
html.ua-android-lite #albumArcanoBtn,
html.ua-android-lite .album-card.destino-activo,
html.ua-android-lite .album-curtain-seal,
html.ua-android-lite .album-reward-card,
html.ua-android-lite #lectorNoteBtn.has-note {
  animation: none !important;
}
html.ua-android-lite .lector-page-wrap {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}
