/* =========================================
   GEMATRIA 2 - ÁRBOL DE LA VIDA & SEFIROT CSS
   Integración interactiva basada en Arbol.html
   ========================================= */

.g2-tree-widget {
  max-width: 900px;
  width: 100%;
  margin: 35px auto;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

.g2-tree-widget * {
  box-sizing: border-box;
}

/* CABECERA DEL WIDGET DEL ÁRBOL */
.g2-tree-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #0e7490 100%);
  padding: 24px 20px;
  text-align: center;
  color: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 10px 30px -10px rgba(49, 46, 129, 0.4);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
}

.g2-tree-header h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff !important;
}

.g2-tree-header p {
  margin: 8px auto 0;
  opacity: 0.9;
  font-size: 0.95rem;
  max-width: 680px;
  color: #e0e7ff;
  line-height: 1.4;
}

/* CONTENEDOR PRINCIPAL DEL ÁRBOL */
.g2-tree-container {
  background: radial-gradient(circle at 50% 25%, #1e293b 0%, #0f172a 100%);
  color: #f1f5f9;
  border-radius: 0 0 16px 16px;
  padding: 30px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* BARRA SUPERIOR: SELECTOR DE VISTAS Y SWITCH DE SINCRONIZACIÓN */
.g2-tree-top-toolbar {
  width: 100%;
  max-width: 680px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.g2-tree-views-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.g2-tree-view-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.25s ease;
  font-family: inherit;
}

.g2-tree-view-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.g2-tree-view-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* SWITCH DE SINCRONIZACIÓN CON EL DICCIONARIO */
.g2-tree-sync-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g2-tree-switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.g2-tree-switch-label input {
  display: none;
}

.g2-tree-slider {
  width: 34px;
  height: 18px;
  background-color: #475569;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
  display: inline-block;
}

.g2-tree-slider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.g2-tree-switch-label input:checked + .g2-tree-slider {
  background-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.g2-tree-switch-label input:checked + .g2-tree-slider::before {
  transform: translateX(16px);
}

.g2-tree-sync-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  transition: 0.3s;
}

.g2-tree-sync-badge.on {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.g2-tree-sync-badge.off {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Modal interactivo de confirmación de cambio de gematría */
.g2-tree-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.g2-tree-confirm-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.g2-tree-confirm-card {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.g2-tree-confirm-modal.active .g2-tree-confirm-card {
  transform: scale(1);
}

.g2-tree-confirm-card h4 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #38bdf8;
}

.g2-tree-confirm-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.g2-tree-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.g2-tree-confirm-btn {
  padding: 9px 20px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.g2-tree-btn-accept {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.g2-tree-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.g2-tree-btn-decline {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.g2-tree-btn-decline:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Toast flotante informativo del árbol */
.g2-tree-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #38bdf8;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.g2-tree-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* LIENZO SVG DEL ÁRBOL */
.g2-tree-canvas-wrapper {
  width: 100%;
  max-width: 480px;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px 0;
  border-radius: 16px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.g2-tree-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* PANEL DE CONTROL / ENTRADA */
.g2-tree-controls {
  width: 100%;
  max-width: 680px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.g2-tree-title {
  text-align: center;
  margin-bottom: 4px;
}

.g2-tree-title h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #ffffff;
  font-weight: 700;
}

/* SELECTOR DE MÉTODO MOD / SUM */
.g2-tree-method-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.g2-tree-method-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.g2-tree-method-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.g2-tree-method-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.g2-tree-method-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: 700;
}

.g2-tree-method-desc {
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 4px;
}

/* FILA DE ENTRADA Y BOTÓN IR */
.g2-tree-input-row {
  display: flex;
  gap: 10px;
}

.g2-tree-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  text-align: center;
  font-size: 1.25rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.g2-tree-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.g2-tree-run-btn {
  width: 120px;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.g2-tree-run-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
}

/* CAJA DE RESULTADO DE LA SEFIRÁ */
.g2-tree-res-box {
  display: none;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #38bdf8;
  border-radius: 16px;
  margin-top: 15px;
  animation: fadeIn 0.4s ease-out;
}

.g2-tree-math-breakdown {
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
  border-radius: 10px;
  border-left: 4px solid #38bdf8;
  margin-bottom: 20px;
}

.g2-tree-math-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 700;
}

.g2-tree-math-text {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5;
}

.g2-tree-sefira-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.g2-tree-sefira-hebrew {
  font-family: 'Heebo', serif;
  font-size: 2.6rem;
  color: #ffffff;
  line-height: 1;
}

.g2-tree-desc-short {
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 12px;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.g2-tree-desc-long {
  font-style: italic;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 1rem;
  text-align: justify;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

/* ========================================================
   SECCIÓN DE CONEXIONES CON LAS 10 SEFIROT
   (Solicitud específica del usuario: conectar los números
   con Kéter, Jojmá, Biná, Jésed, Guevurá, etc.)
   ======================================================== */
.g2-tree-connections-area {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.g2-tree-connections-header {
  text-align: center;
  margin-bottom: 16px;
}

.g2-tree-connections-header h4 {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  color: #38bdf8;
  font-weight: 700;
}

.g2-tree-connections-header p {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.g2-tree-connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.g2-tree-sefira-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.g2-tree-sefira-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: rgba(30, 41, 59, 0.85);
}

.g2-tree-sefira-card.active-sefira {
  border-color: #38bdf8;
  background: rgba(14, 116, 144, 0.25);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.g2-tree-sefira-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--sefira-color, #38bdf8);
}

.g2-tree-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.g2-tree-card-hebrew {
  font-family: 'Heebo', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.g2-tree-card-target-num {
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--sefira-color, #38bdf8);
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.g2-tree-card-target-num:hover {
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--sefira-color, #38bdf8);
  filter: brightness(1.2);
}

.g2-tree-card-target-num:active {
  transform: scale(0.96);
}

.g2-tree-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.g2-tree-card-short {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 10px;
}

.g2-tree-card-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.g2-tree-action-explore {
  cursor: pointer;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  transition: all 0.2s ease;
}

.g2-tree-action-explore:hover {
  background: #38bdf8;
  color: #0f172a;
  transform: scale(1.06);
}

.sefira-node .bd {
  cursor: pointer;
}

.sefira-node .bd:hover {
  filter: drop-shadow(0 0 8px #38bdf8);
}

.sefira-node .bd:hover rect {
  stroke: #ffffff;
  stroke-width: 1.5px;
}

.g2-tree-clear-btn {
  background: transparent;
  color: #64748b;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 6px;
  text-decoration: underline;
  align-self: center;
  font-family: inherit;
  transition: color 0.2s;
}

.g2-tree-clear-btn:hover {
  color: #94a3b8;
}

/* BOTÓN SCROLL */
.g2-tree-scroll-btn {
  width: 100%;
  max-width: 260px;
  margin: 18px auto 0;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  display: block;
}

.g2-tree-scroll-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .g2-tree-header h2 {
    font-size: 1.45rem;
  }
  .g2-tree-input-row {
    flex-direction: column !important;
  }
  .g2-tree-run-btn {
    width: 100% !important;
  }
  .g2-tree-controls {
    padding: 16px;
  }
  .g2-tree-sefira-title {
    font-size: 1.5rem;
  }
  .g2-tree-sefira-hebrew {
    font-size: 2.1rem;
  }
  .g2-tree-connections-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TZINOROT (צינורות - 22 CANALES DEL ÁRBOL DE LA VIDA) ESTILOS Y DIAPOSITIVAS
   ========================================================================== */

/* Animación glowing de canales activos */
@keyframes tzinorPulseGlow {
  0% { filter: drop-shadow(0 0 6px #38bdf8); }
  50% { filter: drop-shadow(0 0 14px #38bdf8) drop-shadow(0 0 22px rgba(56, 189, 248, 0.6)); }
  100% { filter: drop-shadow(0 0 6px #38bdf8); }
}

.g2-tzinor-path-active {
  animation: tzinorPulseGlow 2.5s infinite ease-in-out;
}

/* Badges SVG de canales (Sin transform: scale para evitar vibración / parpadeo infinito en SVG) */
.g2-tz-svg-badge {
  cursor: pointer;
  pointer-events: all;
}

.g2-tz-svg-badge .tz-badge-circle {
  transition: stroke 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease, fill 0.2s ease;
}

.g2-tz-svg-badge:hover .tz-badge-circle {
  stroke: #38bdf8 !important;
  stroke-width: 2.8px !important;
  fill: rgba(30, 41, 59, 0.95) !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.85));
}

.g2-tz-svg-badge .tz-badge-letter {
  transition: fill 0.2s ease;
}

.g2-tz-svg-badge:hover .tz-badge-letter {
  fill: #38bdf8 !important;
  font-weight: 800 !important;
}

/* Barra de Gematría en Vivo (Sistema Hebreo) */
.g2-tz-live-gematria-bar {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeInTz 0.25s ease;
}

.g2-tz-live-gem-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.g2-tz-gem-icon {
  color: #38bdf8;
  font-size: 1rem;
}

.g2-tz-live-gem-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  color: #facc15;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
  margin-left: 4px;
}

.g2-tz-live-gem-breakdown {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: monospace;
}

/* Panel interactivo de Tzinorot */
.g2-tree-tzinorot-panel {
  width: 100%;
  max-width: 680px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInTz 0.35s ease;
}

@keyframes fadeInTz {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cabecera del Panel */
.g2-tz-panel-header {
  text-align: center;
  padding: 6px 0 12px;
}

.g2-tz-badge-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.g2-tz-panel-header h3 {
  margin: 0;
  font-size: 1.55rem;
  color: #ffffff;
  font-weight: 700;
}

.g2-tz-subtitle {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 8px auto 0;
  max-width: 620px;
}

/* Tarjeta de Entrada */
.g2-tz-input-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.g2-tz-input-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.g2-tz-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.g2-tz-input-wrapper {
  position: relative;
  flex: 1;
}

.g2-tz-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px 38px 12px 14px;
  color: #ffffff;
  font-size: 1.05rem;
  font-family: 'Outfit', 'Heebo', sans-serif;
  box-sizing: border-box;
  transition: all 0.2s;
}

.g2-tz-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.g2-tz-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.g2-tz-clear-btn:hover {
  color: #e2e8f0;
}

.g2-tz-run-btn {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  border: none;
  color: #0f172a;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  transition: all 0.2s;
  white-space: nowrap;
}

.g2-tz-run-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5);
}

/* Fila de Ejemplos */
.g2-tz-examples-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.g2-tz-examples-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.g2-tz-examples-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.g2-tz-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.g2-tz-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Teclado Virtual Hebreo */
.g2-tz-letters-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.g2-tz-letters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.g2-tz-text-btn {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 6px;
}

.g2-tz-text-btn:hover {
  text-decoration: underline;
}

.g2-tz-keyboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
}

.g2-tz-key {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
}

.g2-tz-key:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.g2-tz-key .tz-key-hebrew {
  font-family: 'Heebo', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f0;
}

.g2-tz-key .tz-key-name {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 1px;
}

.g2-tz-key.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.g2-tz-key.active .tz-key-hebrew {
  color: #38bdf8;
}

/* Área de Resultados */
.g2-tz-results-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Banner de Resumen */
.g2-tz-summary-banner {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(14, 116, 144, 0.35) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.g2-tz-summary-label {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.g2-tz-display-hebrew {
  font-family: 'Heebo', serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}

.g2-tz-display-latin {
  font-size: 1.05rem;
  color: #e2e8f0;
  font-weight: 600;
  margin-left: 8px;
}

/* Caja de Gematría Destacada en el Banner de Resumen */
.g2-tz-summary-gematria-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.g2-tz-gem-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.g2-tz-gem-big-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: #facc15;
  line-height: 1.1;
  text-shadow: 0 0 16px rgba(250, 204, 21, 0.55);
}

.g2-tz-gem-formula-text {
  font-size: 0.74rem;
  color: #cbd5e1;
  font-family: monospace;
  opacity: 0.9;
  max-width: 260px;
  word-break: break-all;
}

.g2-tz-gem-quick-actions {
  margin-top: 6px;
}

.g2-tz-gem-quick-btn {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #0f172a;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
  white-space: nowrap;
}

.g2-tz-gem-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.55);
}

.g2-tz-letters-tag-label {
  font-size: 0.78rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}

.g2-tz-detected-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.g2-tz-detected-chip {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.2);
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  border-radius: 50%;
  font-family: 'Heebo', serif;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* TARJETA 1: SU BALANCE (ESTÉTICA DE LA DIAPOSITIVA) */
.g2-tz-balance-card {
  background: radial-gradient(circle at 80% 20%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  padding: 26px 22px;
}

.g2-tz-card-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: #facc15;
  text-transform: uppercase;
  opacity: 0.9;
}

.g2-tz-card-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 18px 0;
  letter-spacing: 0.5px;
}

.g2-tz-balance-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.g2-tz-balance-block {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #38bdf8;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
}

.g2-tz-block-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.g2-tz-block-tag {
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: #94a3b8;
}

.g2-tz-block-subtag {
  font-size: 0.85rem;
  font-weight: 700;
  color: #facc15;
  letter-spacing: 0.5px;
}

.g2-tz-block-desc {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 0;
}

/* Niveles de Conciencia */
.g2-tz-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.g2-tz-level-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}

.g2-tz-lvl-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.g2-tz-lvl-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 2px 0 8px 0;
  display: block;
}

.g2-tz-lvl-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.g2-tz-lvl-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 4px;
  transition: width 0.4s ease;
}

#g2-tz-lvl-mid .g2-tz-lvl-bar {
  background: linear-gradient(90deg, #eab308, #facc15);
}

#g2-tz-lvl-bot .g2-tz-lvl-bar {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.g2-tz-lvl-count {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-weight: 600;
}

/* Footer de la tarjeta con Motto y Tikkun */
.g2-tz-card-footer {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.g2-tz-motto {
  font-family: 'Outfit', sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #facc15;
  margin: 0 0 10px 0;
  letter-spacing: 0.3px;
}

.g2-tz-tikkun-narrative {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.55;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 14px;
  border-radius: 10px;
}

/* TARJETA 2: TRES TIPOS DE LETRAS (SLIDE 2) */
.g2-tz-types-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px 20px;
}

.g2-tz-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.g2-tz-type-col {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
}

.g2-tz-type-header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.g2-tz-type-subtitle {
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-weight: 800;
  color: #facc15;
  margin-top: 2px;
  display: inline-block;
}

.g2-tz-type-caption {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 6px 0 12px 0;
  line-height: 1.4;
}

.g2-tz-type-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g2-tz-type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tz-item-hebrew {
  font-family: 'Heebo', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #38bdf8;
  min-width: 24px;
  text-align: center;
}

#g2-tz-col-dobles .tz-item-hebrew {
  color: #facc15;
}

#g2-tz-col-simples .tz-item-hebrew {
  color: #a855f7;
}

.tz-item-name {
  font-size: 0.85rem;
  color: #e2e8f0;
  font-weight: 600;
}

.g2-tz-type-empty {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
  padding: 8px 0;
}

/* EXPLORADOR DE LOS 22 CANALES */
.g2-tz-channels-explorer {
  margin-top: 10px;
}

.g2-tz-explorer-header {
  text-align: center;
  margin-bottom: 14px;
}

.g2-tz-explorer-header h4 {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  color: #e2e8f0;
}

.g2-tz-explorer-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.g2-tz-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.g2-tz-channel-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.g2-tz-channel-card:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-2px);
}

.g2-tz-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.g2-tz-ch-letter {
  font-family: 'Heebo', serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #38bdf8;
  min-width: 24px;
}

.g2-tz-ch-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.g2-tz-ch-type {
  font-size: 0.7rem;
  color: #94a3b8;
  display: block;
}

.g2-tz-ch-corr {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}

.g2-tz-ch-tikkun {
  font-size: 0.74rem;
  color: #94a3b8;
  margin: 6px 0 0 0;
  line-height: 1.35;
}

/* RESPONSIVE TZINOROT & MOBILE TOUCH OPTIMIZATIONS */
@media (max-width: 768px) {
  .g2-tz-types-grid {
    grid-template-columns: 1fr;
  }
  .g2-tz-levels-grid {
    grid-template-columns: 1fr;
  }
  .g2-tz-summary-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .g2-tz-input-row {
    flex-direction: column;
  }
  .g2-tz-run-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .g2-tree-container {
    padding: 18px 10px;
  }
  .g2-tree-top-toolbar {
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 10px;
  }
  .g2-tree-views-nav {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .g2-tree-view-btn {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.76rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .g2-tree-sync-toggle-wrap {
    justify-content: center;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .g2-tz-keyboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 4px;
  }
  .g2-tz-key {
    min-height: 44px;
    padding: 4px 2px;
    justify-content: center;
  }
  .g2-tz-channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
  .g2-tz-balance-card,
  .g2-tz-types-card {
    padding: 18px 14px;
  }
  .g2-tz-card-title {
    font-size: 1.35rem;
  }
  .g2-tz-display-hebrew {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .g2-tz-channels-grid {
    grid-template-columns: 1fr;
  }
  .g2-tree-canvas-wrapper {
    padding: 10px 0;
  }
  .g2-tz-keyboard-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }
  .g2-tz-key {
    min-height: 42px;
  }
  .g2-tz-key .tz-key-hebrew {
    font-size: 1rem;
  }
  .g2-tz-key .tz-key-name {
    font-size: 0.55rem;
  }
}

