/* ═══════════════════════════════════════════════
   module-features.css
   Electron drag · RICcionario · Post-it
   Paleta: #0A0A0F / #1A1A26 / #F5C518 / #E8832A
   Solo desktop ≥1024px para paneles laterales
═══════════════════════════════════════════════ */

/* ── Electron widget (módulos) ─────────────── */
#electron-module-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

#electron-module-widget.dragging {
  cursor: grabbing;
}

#electron-module-avatar {
  width: 62px;
  height: 62px;
  background: #1A1A26;
  border: 2px solid rgba(245,197,24,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 18px rgba(245,197,24,0.25), 0 4px 16px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s, border-color 0.2s;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
}

#electron-module-widget:not(.dragging) #electron-module-avatar:hover {
  border-color: rgba(245,197,24,0.7);
  box-shadow: 0 0 26px rgba(245,197,24,0.4), 0 4px 16px rgba(0,0,0,0.5);
}

/* Burbuja de diálogo contextual */
#electron-module-bubble {
  max-width: 220px;
  background: #1A1A26;
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 12px 12px 0 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #E8E8F0;
  line-height: 1.45;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.88) translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

#electron-module-bubble.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

#electron-module-bubble[data-action] {
  cursor: pointer;
  border-color: rgba(245,197,24,0.55);
}

#electron-module-bubble[data-action]:hover {
  background: rgba(245,197,24,0.06);
}

#electron-module-bubble .bubble-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.7rem;
  color: #F5C518;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── RICcionario — panel izquierdo ─────────── */
#riccionario-panel {
  position: fixed;
  top: 52px;
  left: 0;
  bottom: 0;
  width: 300px;
  z-index: 200;
  display: flex;
  background: #1A1A26;
  border-right: 2px solid rgba(245,197,24,0.2);
  border-radius: 0 8px 8px 0;
  transform: translateX(-302px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}

#riccionario-panel.expanded {
  transform: translateX(0);
}

/* Franja colapsada */
.ric-tab {
  width: 36px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 12px 0;
  gap: 8px;
}

.ric-tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.ric-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,197,24,0.6);
  transform: rotate(180deg);
}

/* Panel expandido — ver bloque con transition más abajo */

.ric-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(245,197,24,0.12);
  flex-shrink: 0;
  position: relative;
}

.ric-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #F5C518;
  line-height: 1;
  margin-bottom: 3px;
}

.ric-subtitle {
  font-size: 0.68rem;
  color: #9090A8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ric-close {
  position: absolute;
  top: 12px;
  right: 10px;
  background: none;
  border: none;
  color: #9090A8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.ric-close:hover { color: #F5C518; }

.ric-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,197,24,0.2) transparent;
}

.ric-section-title {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E8832A;
  margin-bottom: 8px;
  margin-top: 4px;
}

/* Término del módulo (precargado) */
.ric-term-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(245,197,24,0.1);
  border-radius: 6px;
  padding: 9px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ric-term-card:hover { border-color: rgba(245,197,24,0.3); }
.ric-term-card.open  { border-color: rgba(245,197,24,0.4); }

.ric-term-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #E8E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ric-term-badge {
  font-size: 0.6rem;
  font-weight: 700;
  color: #F5C518;
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ric-term-def {
  display: none;
  font-size: 0.78rem;
  color: #9090A8;
  margin-top: 6px;
  line-height: 1.45;
}

.ric-term-card.open .ric-term-def { display: block; }

/* Término guardado por usuario */
.ric-saved-card {
  background: rgba(232,131,42,0.05);
  border: 1px solid rgba(232,131,42,0.15);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ric-saved-texts { flex: 1; min-width: 0; }

.ric-saved-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #E8E8F0;
  word-break: break-word;
}

.ric-saved-def {
  font-size: 0.74rem;
  color: #9090A8;
  word-break: break-word;
  margin-top: 2px;
}

.ric-saved-del {
  background: none;
  border: none;
  color: #9090A8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.ric-saved-del:hover { color: #ef4444; }

/* Input agregar término */
.ric-add-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.ric-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245,197,24,0.2);
  border-radius: 6px;
  color: #E8E8F0;
  font-size: 0.8rem;
  padding: 7px 10px;
  font-family: 'Barlow', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.ric-input:focus { border-color: rgba(245,197,24,0.5); }
.ric-input::placeholder { color: #9090A8; }

.ric-add-btn {
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 6px;
  color: #F5C518;
  font-size: 1rem;
  width: 32px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.ric-add-btn:hover { background: rgba(245,197,24,0.22); }

.ric-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(245,197,24,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ric-counter {
  font-size: 0.7rem;
  color: #9090A8;
}

.ric-export-btn {
  font-size: 0.7rem;
  color: #9090A8;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}

.ric-export-btn:hover { color: #E8E8F0; }

.ric-export-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: #1A1A26;
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.68rem;
  color: #F5C518;
  white-space: nowrap;
  z-index: 10;
}

.ric-export-btn:hover .ric-export-tooltip { display: block; }

/* ── Post-it — tab lateral (entrada al drawer real de notas_usuario) ──────
   Unificación 03-08-2026: este era el panel expandible con localStorage
   (#postit-panel), retirado -- ahora es solo un segundo punto de entrada al
   mismo notas-drawer.js real. Ver js/module-features.js crearPostitTab() y
   css/module-features.css .notas-drawer-* (drawer real) más abajo. ── */
#pit-tab-real {
  position: fixed;
  top: 52px;
  right: 0;
  width: 36px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 12px 0;
  gap: 8px;
  background: #1A1A26;
  border-left: 2px solid rgba(245,197,24,0.2);
  border-radius: 8px 0 0 8px;
  transition: background 0.15s;
}

#pit-tab-real:hover { background: #22222f; }

.pit-tab-icon { font-size: 1.1rem; line-height: 1; }

.pit-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,197,24,0.6);
}

/* ── Drawer real de notas (js/notas-drawer.js) — lista de tarjetas post-it ──
   Reusa .postit-note/.postit-del/.postit-textarea de más abajo (mismo
   lenguaje visual, antes exclusivo del panel localStorage retirado). ── */
.notas-drawer-toolbar { padding: 14px 20px 0; flex-shrink: 0; }

.notas-drawer-new-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed rgba(245,197,24,0.3);
  background: rgba(255,255,255,0.03);
  color: #F5C518;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.notas-drawer-new-btn:hover { border-color: #F5C518; background: rgba(245,197,24,0.08); }

.notas-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notas-drawer-body:empty::after {
  content: 'Sin notas todavía — usa "+ Nueva nota" para crear tu primera.';
  color: #9090A8;
  font-size: 0.8rem;
  text-align: center;
  padding: 24px 8px;
}

.postit-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.7;
  margin-bottom: 4px;
}

.postit-ref {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0,0,0,0.15);
}

/* Post-it individual */
.postit-note {
  border-radius: 4px;
  padding: 10px 10px 8px;
  margin-bottom: 10px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  position: relative;
}

.postit-del {
  position: absolute;
  top: 5px;
  right: 6px;
  background: none;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
  line-height: 1;
}

.postit-del:hover { opacity: 1; }

.postit-textarea {
  width: 100%;
  min-height: 80px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  padding-right: 16px;
}

/* Colores de post-its */
.postit-note[data-color="gold"]   { background: #F5C518; border: 1px solid rgba(0,0,0,0.1); }
.postit-note[data-color="gold"]   .postit-textarea,
.postit-note[data-color="gold"]   .postit-del { color: #0A0A0F; }

.postit-note[data-color="orange"] { background: #E8832A; border: 1px solid rgba(0,0,0,0.1); }
.postit-note[data-color="orange"] .postit-textarea,
.postit-note[data-color="orange"] .postit-del { color: #0A0A0F; }

.postit-note[data-color="green"]  { background: #1a3a2a; border: 1px solid #4ade80; }
.postit-note[data-color="green"]  .postit-textarea,
.postit-note[data-color="green"]  .postit-del { color: #4ade80; }

.postit-note[data-color="blue"]   { background: #1A1A26; border: 1px solid #60a5fa; }
.postit-note[data-color="blue"]   .postit-textarea,
.postit-note[data-color="blue"]   .postit-del { color: #60a5fa; }

/* ── Capas 3-en-1 del RICcionario ─────────── */
.ric-term-layers {
  display: none;
}

.ric-term-card.open .ric-term-layers {
  display: block;
}

.ric-layer {
  margin-top: 7px;
  font-size: 0.76rem;
  line-height: 1.45;
  display: flex;
  gap: 6px;
}

.ric-layer-icon {
  flex-shrink: 0;
  font-size: 0.7rem;
  margin-top: 1px;
}

.ric-layer-sec  { color: #9090A8; }
.ric-layer-obra { color: #E8832A; }

.ric-layer-error {
  color: #fca5a5;
  background: rgba(239,68,68,0.06);
  border-left: 2px solid rgba(239,68,68,0.4);
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  margin-left: -8px;
}

/* ── Libro completo visible siempre ──────── */
#ric-libro {
  position: fixed;
  left: 0;
  top: auto;
  bottom: 40px;
  transform: none;
  z-index: 1000;
  width: 160px;
  height: 240px;
  display: flex;
  flex-direction: row;
  cursor: grab;
  box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  transition: width 0.25s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

#ric-libro.ric-dragging {
  cursor: grabbing;
  box-shadow: 8px 4px 32px rgba(201,162,39,0.35);
}

#ric-libro:hover {
  box-shadow: 6px 0 24px rgba(201,162,39,0.3);
}

.libro-lomo {
  width: 18px;
  flex-shrink: 0;
  background: #111a11;
  border-right: 1px solid #c9a227;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.libro-paginas {
  width: 10px;
  flex-shrink: 0;
  background: linear-gradient(to right, #c8c8be, #e8e8e0);
}

.libro-tapa {
  flex: 1;
  background: #1a2e1c;
  border-right: 2px solid #c9a227;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lomo-circuit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.lomo-wire {
  width: 1px;
  height: 18px;
  background: #c9a227;
  opacity: 0.6;
  transition: opacity 0.35s ease;
}

.lomo-node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #c9a227;
  background: transparent;
  transition: background 0.35s ease 0.1s, box-shadow 0.35s ease 0.1s;
  flex-shrink: 0;
}

.lomo-wire-bottom {
  width: 1px;
  height: 18px;
  background: transparent;
  border-left: 1px dashed #c9a227;
  opacity: 0.3;
  transition: opacity 0.35s ease, border-left-style 0.35s ease;
}

.lomo-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #c9a227;
  opacity: 0.8;
  white-space: nowrap;
  line-height: 1;
  text-transform: uppercase;
}

#ric-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c9a227;
  color: #0A0A0F;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

@keyframes ric-badge-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.franja-top {
  background: #c9a227;
  padding: 5px 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 7px;
  letter-spacing: 0.18em;
  color: #0a1a0c;
  text-transform: uppercase;
  text-align: center;
  flex-shrink: 0;
}

.tapa-corners {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 8px 0;
  flex-shrink: 0;
}

.corner-circuit {
  display: flex;
  align-items: center;
  gap: 0;
}

.corner-circuit.right {
  flex-direction: row-reverse;
}

.cc-wire {
  width: 8px;
  height: 1px;
  background: #c9a227;
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.cc-node {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #c9a227;
  background: transparent;
  transition: background 0.35s ease 0.1s, box-shadow 0.35s ease 0.1s;
  flex-shrink: 0;
}

.cc-wire-end {
  width: 8px;
  height: 1px;
  background: transparent;
  border-top: 1px dashed #c9a227;
  opacity: 0.28;
  transition: opacity 0.35s ease, border-top-style 0.35s ease;
}

.cc-spark {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8d080;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.tapa-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  gap: 6px;
}

.tapa-medidor {
  flex-shrink: 0;
}

.tapa-titulo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: bold;
  color: #e8d080;
  text-align: center;
  line-height: 1.1;
}

.tapa-sub {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 8px;
  color: #a8c898;
  text-align: center;
  line-height: 1.3;
}

.tapa-ornament {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  justify-content: center;
}

.tapa-ornament-line {
  flex: 1;
  height: 1px;
  background: #c9a227;
  opacity: 0.4;
}

.tapa-ornament-dots {
  display: flex;
  gap: 3px;
}

.tapa-ornament-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c9a227;
  opacity: 0.6;
}

.franja-bot {
  background: #c9a227;
  padding: 4px 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 6.5px;
  letter-spacing: 0.12em;
  color: #0a1a0c;
  text-transform: uppercase;
  text-align: center;
  flex-shrink: 0;
}

/* ── Interior del libro ───────────────────── */
.ric-interior {
  position: absolute;
  left: 0;
  top: 0;
  width: 220px;
  height: 100%;
  background: #f5f0e8;
  z-index: 1;
  padding: 14px 12px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease 0.3s;
  display: none;
}

#riccionario-panel.expanded .ric-interior {
  opacity: 1;
}

.ric-interior::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 0; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 23px,
    rgba(201,162,39,0.25) 23px,
    rgba(201,162,39,0.25) 24px
  );
  pointer-events: none;
}

.interior-entry {
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.interior-term {
  font-family: Georgia, serif;
  font-size: 8.5px;
  font-weight: bold;
  color: #1a2e1c;
  line-height: 1.3;
}

.interior-def {
  font-family: Georgia, serif;
  font-size: 7.5px;
  color: #5a6a5a;
  line-height: 1.4;
  margin-top: 1px;
}

/* ── Panel content ──────────────────────── */
.ric-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ══ ESTADO ABIERTO — circuito cerrado ════ */
#ric-libro.expanded .lomo-node {
  background: #c9a227;
  box-shadow: 0 0 6px rgba(201,162,39,0.7);
}

#ric-libro.expanded .lomo-wire-bottom {
  border-left-style: solid;
  opacity: 0.8;
}

#ric-libro.expanded .lomo-wire {
  opacity: 0.9;
}

#ric-libro.expanded .cc-node {
  background: #c9a227;
  box-shadow: 0 0 5px rgba(201,162,39,0.7);
}

#ric-libro.expanded .cc-wire-end {
  border-top-style: solid;
  opacity: 0.9;
}

#ric-libro.expanded .cc-wire {
  opacity: 0.9;
}

#ric-libro.expanded .cc-spark {
  opacity: 1;
}

/* ── Subrayado de términos ───────────────────── */
.ric-highlight {
  border-bottom: 2px dotted #F5C518;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ric-highlight:hover {
  border-color: #E8832A;
}

/* ── Tooltip preview ────────────────────────── */
#ric-tooltip {
  position: fixed;
  z-index: 400;
  background: #1A1A26;
  border: 1px solid rgba(245,197,24,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 260px;
  font-size: 0.78rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  font-family: 'Barlow', sans-serif;
  line-height: 1.45;
}

#ric-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ric-tt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ric-tt-icon { font-size: 0.85rem; flex-shrink: 0; }

.ric-tt-term {
  font-weight: 700;
  color: #E8E8F0;
  flex: 1;
  font-size: 0.82rem;
}

.ric-tt-ref {
  font-size: 0.62rem;
  color: #F5C518;
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ric-tt-divider {
  height: 1px;
  background: rgba(245,197,24,0.1);
  margin-bottom: 7px;
}

.ric-tt-obra {
  color: #E8832A;
  font-size: 0.76rem;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ric-tt-link {
  font-size: 0.72rem;
  color: #F5C518;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

.ric-tt-link:hover { color: #E8832A; }

/* ── Orden A-Z ──────────────────────────────── */
.ric-sort-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.ric-sort-btn {
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: none;
  border: 1px solid rgba(245,197,24,0.25);
  color: #9090A8;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.ric-sort-btn.active {
  background: rgba(245,197,24,0.12);
  border-color: rgba(245,197,24,0.5);
  color: #F5C518;
}

/* ── Flash al navegar desde tooltip ────────── */
@keyframes highlight-flash {
  0%   { box-shadow: 0 0 0 2px #F5C518; border-color: #F5C518; }
  100% { box-shadow: 0 0 0 0px transparent; }
}

.highlight-flash {
  animation: highlight-flash 1.5s ease forwards;
}

/* ── Electron welcome panel ─────────────── */
#electron-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
}

#electron-welcome-overlay.visible {
  opacity: 1;
}

#electron-welcome-sheet {
  width: 100%;
  max-height: 80vh;
  background: #0F0F1A;
  border-top: 2px solid #F5C518;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 24, 0.2) transparent;
}

#electron-welcome-sheet.visible {
  transform: translateY(0);
}

.ew-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(245, 197, 24, 0.12);
  position: sticky;
  top: 0;
  background: #0F0F1A;
  z-index: 1;
}

.ew-avatar {
  width: 52px;
  height: 52px;
  background: #1A1A26;
  border: 2px solid rgba(245, 197, 24, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.2);
}

.ew-header-text { flex: 1; min-width: 0; }

.ew-greeting {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #F5C518;
  line-height: 1.1;
}

.ew-ric-label {
  font-size: 0.72rem;
  color: #9090A8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ew-close-btn {
  background: none;
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #9090A8;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
  padding: 0;
}

.ew-close-btn:hover { color: #F5C518; border-color: rgba(245, 197, 24, 0.5); }

.ew-intro {
  padding: 14px 24px 16px;
  font-size: 0.88rem;
  color: #9090A8;
  line-height: 1.6;
  border-bottom: 1px solid rgba(245, 197, 24, 0.08);
}

.ew-secciones-label {
  padding: 14px 24px 6px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E8832A;
}

.ew-secciones {
  padding: 0 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ew-section-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 197, 24, 0.1);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.ew-section-item:hover { border-color: rgba(245, 197, 24, 0.28); }

.ew-section-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ew-nav-btn {
  background: none;
  border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #F5C518;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(245, 197, 24, 0.35);
  text-underline-offset: 3px;
}

.ew-nav-btn:hover { color: #E8832A; text-decoration-color: rgba(232, 131, 42, 0.55); }

.ew-badge {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.ew-badge-gold   { color: #F5C518; border-color: rgba(245, 197, 24, 0.4);  background: rgba(245, 197, 24, 0.08); }
.ew-badge-orange { color: #E8832A; border-color: rgba(232, 131, 42, 0.4); background: rgba(232, 131, 42, 0.08); }

.ew-section-desc {
  font-size: 0.84rem;
  color: #9090A8;
  line-height: 1.5;
  margin-bottom: 7px;
}

.ew-section-why {
  font-size: 0.82rem;
  color: #F5C518;
  font-style: italic;
  line-height: 1.45;
}

.ew-sec-link {
  color: #F5C518;
  cursor: pointer;
  font-weight: 700;
  border-bottom: 1px dotted rgba(245, 197, 24, 0.5);
  font-style: normal;
  transition: color 0.15s, border-color 0.15s;
}

.ew-sec-link:hover { color: #E8832A; border-color: rgba(232, 131, 42, 0.5); }

.ew-footer {
  padding: 16px 24px 28px;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(245, 197, 24, 0.1);
  position: sticky;
  bottom: 0;
  background: #0F0F1A;
}

.ew-btn-comenzar {
  background: linear-gradient(135deg, #E8832A, #F5C518);
  color: #0A0A0F;
  border: none;
  border-radius: 8px;
  padding: 13px 40px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.02em;
}

.ew-btn-comenzar:hover { opacity: 0.88; }

/* ── Móvil: ocultar ambos paneles ─────────── */
@media (max-width: 1023px) {
  #riccionario-panel,
  #postit-panel,
  #electron-module-widget,
  #ric-libro,
  #ric-tooltip {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════
   ELECTRON TOUR (piloto modulo1) — nubes flotantes + spotlight
   Robot: CSS transplantado de css/hero.css, scoped bajo
   #electron-tour (los módulos no cargan hero.css).
═══════════════════════════════════════════════════════ */

#electron-tour {
  position: fixed;
  inset: 0;
  z-index: 10500; /* sobre tutor-chat (9998) y widgets Electron (9999) */
  --color-estado: #F5C518;
  opacity: 0;
  transition: opacity 0.35s ease;
  font-family: 'Barlow', sans-serif;
}
#electron-tour.visible { opacity: 1; }

/* Spotlight: recorte por box-shadow gigante — atenúa todo salvo el rect.
   (fallback: en modo .et-clip el dim lo hace #et-dim con huecos múltiples) */
#et-spotlight {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  border: 1.5px solid rgba(245, 197, 24, 0.55);
  border-radius: 14px;
  box-shadow: 0 0 0 200vmax rgba(6, 6, 14, 0.82), 0 0 38px rgba(245, 197, 24, 0.14);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#electron-tour.et-centered #et-spotlight {
  border-color: transparent;
  border-radius: 50%;
}

/* Dim multi-hueco: clip-path path() recorta título + términos a plena luz */
#et-dim { display: none; }
#electron-tour.et-clip #et-dim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(6, 6, 14, 0.82);
  pointer-events: none;
}
#electron-tour.et-clip #et-spotlight {
  box-shadow: 0 0 38px rgba(245, 197, 24, 0.14);
}
#electron-tour.et-clip.et-centered #et-spotlight { opacity: 0; }

/* Subrayado liviano bajo cada término <strong> visible */
#et-terms {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.et-term-line {
  position: fixed;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #F5C518, #E8832A);
  box-shadow: 0 0 8px rgba(245, 197, 24, 0.55);
}

/* Durante scroll manual la luz sigue al contenido sin transiciones */
#electron-tour.et-no-trans #et-spotlight,
#electron-tour.et-no-trans #et-cloud,
#electron-tour.et-no-trans #et-robot {
  transition: none;
}

/* Robot */
#et-robot {
  position: fixed;
  width: 72px;
  height: 72px;
  z-index: 4;
  transition: left 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
              top  0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#electron-tour #electron-robot {
  width: 72px; height: 72px; position: relative;
  filter: drop-shadow(0 0 14px rgba(245, 197, 24, 0.5));
}
#electron-tour .robot-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(245, 197, 24, 0.22);
  animation: et-robot-rotar 7s linear infinite;
}
#electron-tour .robot-ring::after {
  content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-estado); box-shadow: 0 0 8px var(--color-estado);
}
@keyframes et-robot-rotar { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#electron-tour .robot-body { width: 72px; height: 72px; position: relative; z-index: 2; }
#electron-tour svg.robot-svg { width: 100%; height: 100%; overflow: visible; }
#electron-tour .robot-aura {
  position: absolute; inset: -12px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.14) 0%, transparent 70%);
  animation: et-robot-aura 3s ease-in-out infinite; z-index: 1;
}
@keyframes et-robot-aura { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
#electron-tour .antena-luz { animation: et-robot-antena 2s ease-in-out infinite; }
@keyframes et-robot-antena { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
#electron-tour .ojo-izq, #electron-tour .ojo-der { animation: et-robot-ojo 5s ease-in-out infinite; }
#electron-tour .ojo-der { animation-delay: 0.15s; }
@keyframes et-robot-ojo { 0%, 88%, 100% { transform: scaleY(1); } 92%, 96% { transform: scaleY(0.1); } }
#electron-tour .pecho-led { animation: et-robot-led 1.8s ease-in-out infinite; }
@keyframes et-robot-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
#electron-tour .casco-luz { animation: et-robot-casco 2.5s ease-in-out infinite; }
@keyframes et-robot-casco { 0%, 100% { opacity: 1; } 45%, 55% { opacity: 0.2; } }
#electron-tour .herramienta { animation: et-robot-tool 4s ease-in-out infinite; }
@keyframes et-robot-tool { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-6deg) translateY(-2px); } }

/* Nube */
#et-cloud {
  position: fixed;
  z-index: 5;
  width: min(380px, calc(100vw - 24px));
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              top  0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.et-cloud-inner {
  position: relative;
  background: linear-gradient(180deg, #1B1B28, #14141F);
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 18px;
  padding: 16px 18px 13px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 197, 24, 0.07);
  animation: et-float 3.6s ease-in-out infinite;
}
@keyframes et-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Pico tipo tooltip apuntando al título iluminado (offset via --et-arr) */
.et-arrow {
  display: none;
  position: absolute;
  width: 15px;
  height: 15px;
  background: #181823;
  border: 1px solid rgba(245, 197, 24, 0.35);
  transform: rotate(45deg);
  pointer-events: none;
}
#et-cloud.et-arr-left  .et-arrow { display: block; left: -8.5px;  top: var(--et-arr, 28px);  border-top: none;    border-right: none; }
#et-cloud.et-arr-right .et-arrow { display: block; right: -8.5px; top: var(--et-arr, 28px);  border-bottom: none; border-left: none; }
#et-cloud.et-arr-up    .et-arrow { display: block; top: -8.5px;   left: var(--et-arr, 28px); border-bottom: none; border-right: none; }

.et-cloud-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.et-cloud-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: 1.2rem; color: #fff;
  letter-spacing: 0.02em; line-height: 1.1;
}
.et-badge {
  font-size: 0.62rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.et-badge-gold   { color: #F5C518; border-color: rgba(245, 197, 24, 0.4);  background: rgba(245, 197, 24, 0.08); }
.et-badge-orange { color: #E8832A; border-color: rgba(232, 131, 42, 0.4); background: rgba(232, 131, 42, 0.08); }

.et-cloud-body {
  color: #C9C9D4; font-size: 0.88rem; line-height: 1.55;
}
.et-cloud-body strong { color: #fff; }
.et-cloud-why {
  margin-top: 9px; color: #F5C518; font-size: 0.8rem; line-height: 1.45;
}

.et-cloud-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
}
#et-skip {
  background: none; border: none; padding: 4px 2px;
  color: #8A8A98; font-size: 0.78rem; font-family: 'Barlow', sans-serif;
  text-decoration: underline; cursor: pointer;
}
#et-skip:hover { color: #F5C518; }
#et-progress { margin-left: auto; color: #8A8A98; font-size: 0.75rem; }
#et-next {
  background: linear-gradient(135deg, #E8832A, #F5C518);
  color: #0A0A0F; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 0.85rem; font-weight: 700;
  font-family: 'Barlow', sans-serif; cursor: pointer;
  transition: opacity 0.2s;
}
#et-next:hover { opacity: 0.88; }

@media (max-width: 760px) {
  .et-cloud-inner { padding: 13px 14px 11px; }
  .et-cloud-title { font-size: 1.05rem; }
}

/* Botón flotante "repetir tour" — sobre Mis Notas (bottom:235px) */
#btn-tour-replay {
  position: fixed; bottom: 292px; right: 24px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: #1A1A26; border: 1px solid rgba(245, 197, 24, 0.45);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
#btn-tour-replay:hover {
  transform: translateY(-2px);
  border-color: #F5C518;
  box-shadow: 0 6px 16px rgba(245, 197, 24, 0.3);
}
