/* =========================================================================
   HORAS PLANETÁRIAS v3.0 - ESTILOS DO MÓDULO DE KABBALAH HERMÉTICA
   Árvore da Vida, 10 Sephiroth, 22 Caminhos e 4 Mundos (Golden Dawn)
   ========================================================================= */

.kabbalah-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px 50px 15px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.kabbalah-tab-pane {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Banner Superior do Módulo */
.kabbalah-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(20, 24, 40, 0.85), rgba(10, 12, 22, 0.95));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.kabbalah-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #FFD700, #AF52DE, #34C759);
}

.kabbalah-header-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.45rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.kabbalah-header-desc {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Banner de Sincronia com a Hora Ativa */
.kabbalah-active-hour-banner {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

.kabbalah-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #E2E4E9;
    flex-wrap: wrap;
}

.kabbalah-banner-icon {
    font-size: 1.3rem;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #FFD700); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 8px #FFD700); }
}

/* Abas de Navegação Interna do Módulo */
.kabbalah-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kabbalah-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kabbalah-nav-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #FFF;
    border-color: rgba(212, 175, 55, 0.4);
}

.kabbalah-nav-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(175, 82, 222, 0.25));
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Área da Árvore da Vida Interativa (Canvas & SVG) */
.tree-of-life-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(16, 20, 36, 0.94), rgba(6, 8, 16, 0.99));
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 14px;
    padding: 18px 8px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tree-of-life-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.tree-of-life-canvas,
.tree-of-life-svg {
    width: 100% !important;
    max-width: 560px;
    height: auto !important;
    aspect-ratio: 600 / 1020;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.3s ease;
    touch-action: manipulation;
}

/* Nós Sephiroth no SVG - Prevenção contra salto/desvio ao passar o mouse */
.tree-sephirah-node {
    cursor: pointer;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.tree-sephirah-node circle,
.tree-sephirah-node text {
    transition: stroke 0.25s ease, stroke-width 0.25s ease, fill 0.25s ease;
}

.tree-sephirah-node:hover {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.95));
}

.tree-sephirah-node:hover circle {
    stroke: #FFD700 !important;
    stroke-width: 4px !important;
}

.tree-sephirah-node:hover text {
    fill: #FFFFFF !important;
}

.tree-sephirah-node:focus-visible {
    outline: none;
}

.tree-sephirah-node.active-node circle:first-child {
    animation: sephirahPulse 1.8s infinite ease-in-out;
}

@keyframes sephirahPulse {
    0%, 100% { stroke-width: 3.5; opacity: 0.9; }
    50% { stroke-width: 7; opacity: 1; }
}

/* Linhas e Nós dos Caminhos */
.tree-path-line {
    transition: stroke 0.25s, stroke-width 0.25s;
    cursor: pointer;
}

.tree-path-line:hover {
    stroke: rgba(255, 215, 0, 0.9) !important;
    stroke-width: 5 !important;
}

.tree-path-badge {
    cursor: pointer;
    transition: filter 0.25s ease;
}

.tree-path-badge circle,
.tree-path-badge rect,
.tree-path-badge text {
    transition: stroke 0.25s ease, stroke-width 0.25s ease, filter 0.25s ease;
}

.tree-path-badge:hover circle,
.tree-path-badge:hover rect {
    stroke: #FFD700 !important;
    stroke-width: 3px !important;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.9));
}

/* =========================================================================
   Ajustes de Espaçamento Dinâmico em CSS para os Caminhos da Árvore da Vida
   (As posições x,y exatas são calculadas dinamicamente no SVG em manager.js)
   ========================================================================= */

/* =========================================================================
   Legibilidade e Aumento de Fonte dos Rótulos em Hebraico no SVG (Mobile & Desktop)
   ========================================================================= */

.tree-path-badge text {
    font-size: 18px !important;
    font-family: "Times New Roman", "David", "Frank Ruhl Hofshi", "Cinzel", serif !important;
    font-weight: 800 !important;
}

.tree-sephirah-node text[y="6"],
.tree-sephirah-node text:nth-of-type(3) {
    font-size: 22px !important;
    font-family: "Times New Roman", "David", "Frank Ruhl Hofshi", serif !important;
    font-weight: 800 !important;
}

/* Regras de Legibilidade para Telas Menores (Mobile / Responsivo) */
@media (max-width: 600px) {
    .tree-of-life-canvas,
    .tree-of-life-svg {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Rótulos em Hebraico dos Caminhos em Telas Menores */
    .tree-path-badge text {
        font-size: 20px !important;
    }

    /* Rótulos em Hebraico das Sephiroth em Telas Menores */
    .tree-sephirah-node text[y="6"],
    .tree-sephirah-node text:nth-of-type(3) {
        font-size: 24px !important;
    }
}

/* Pilares da Árvore da Vida - Badges */
.sephirah-pillar-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.sephirah-pillar-pill.pillar-left {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.4);
    color: #FF453A;
}

.sephirah-pillar-pill.pillar-right {
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid rgba(0, 122, 255, 0.4);
    color: #5AC8FA;
}

.sephirah-pillar-pill.pillar-middle {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #FFD700;
}

/* Grade de Cartões das Sephiroth */
.kabbalah-sephiroth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.sephirah-card {
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(18, 22, 36, 0.75);
}

.sephirah-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.sephirah-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sephirah-card-badge {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.sephirah-card-glyph {
    font-size: 1.15rem;
    color: var(--accent-color);
}

.sephirah-card-hebrew {
    font-size: 1.7rem;
    font-weight: bold;
    color: #FFF;
    margin-bottom: 2px;
}

.sephirah-card-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #FFD700;
}

.sephirah-card-meaning {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.sephirah-card-astro, .sephirah-card-archangel {
    font-size: 0.82rem;
    color: #E2E4E9;
    margin-bottom: 4px;
}

.sephirah-card-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Lista dos 22 Caminhos */
.kabbalah-paths-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.kabbalah-path-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.kabbalah-path-row:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateX(4px);
}

.path-letter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
    flex-shrink: 0;
}

.path-hebrew {
    font-size: 1.6rem;
    font-weight: bold;
    color: #FFD700;
    line-height: 1;
}

.path-letter-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.path-info-box {
    flex: 1;
}

.path-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.path-number {
    font-family: 'Cinzel', serif;
    color: #FFF;
    font-size: 0.95rem;
}

.path-meaning {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.path-connection {
    font-size: 0.8rem;
    color: #A0A5B5;
    display: flex;
    gap: 8px;
    align-items: center;
}

.path-tarot-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.path-tarot-badge {
    background: rgba(175, 82, 222, 0.2);
    border: 1px solid rgba(175, 82, 222, 0.4);
    color: #D8BFD8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.path-astro-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #FFD700;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
}

/* Quatro Mundos (Olamot) */
.kabbalah-worlds-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.kabbalah-world-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.world-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.world-hebrew {
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
}

.world-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #FFF;
}

.world-trans {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.world-element-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--accent-color);
}

.world-desc {
    font-size: 0.86rem;
    color: #D1D5DB;
    line-height: 1.5;
    margin-bottom: 12px;
}

.world-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    color: #A0A5B5;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

/* Modal Dossiê da Sephirah */
.sephirah-dossier-layout {
    padding: 5px;
}

.sephirah-dossier-header {
    display: flex;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 15px;
}

.sephirah-dossier-symbol-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.2), rgba(15, 18, 30, 0.9));
    border: 2px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.sephirah-dossier-hebrew {
    font-size: 1.9rem;
    font-weight: bold;
    color: #FFD700;
    line-height: 1;
}

.sephirah-dossier-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-family: 'Cinzel', serif;
}

.sephirah-dossier-title {
    margin: 4px 0 2px 0;
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #FFD700;
}

.sephirah-dossier-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.sephirah-dossier-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .kabbalah-header-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }

    .tree-of-life-wrapper {
        padding: 15px 5px;
    }

    .kabbalah-path-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .path-tarot-box {
        align-items: flex-start;
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    .sephirah-dossier-header {
        flex-direction: column;
        text-align: center;
    }

    .sephirah-dossier-badges {
        justify-content: center;
    }
}

/* ==============================================
   ESTILOS ADICIONAIS: OVERLAY DE TAROT NA ÁRVORE
   ============================================== */
.kabbalah-tree-toolbar {
    transition: all 0.3s ease;
}

.tarot-correspondence-box {
    background: rgba(15, 18, 30, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.tarot-minor-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.tarot-minor-card-thumb {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tarot-minor-card-thumb:hover {
    transform: translateY(-3px);
    border-color: #FFD700;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.1);
}

.tarot-minor-card-img {
    width: 60px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    margin-bottom: 6px;
}

.tarot-minor-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Cinzel', serif;
    line-height: 1.2;
}

.tarot-minor-card-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}

/* =========================================================================
   ANIMAÇÕES E ESTILOS DE HIGHLIGHT (DESTAQUE NA ÁRVORE DA VIDA SVG)
   ========================================================================= */

@keyframes treeHighlightPulse {
    0% {
        stroke-width: 5px;
        filter: drop-shadow(0 0 6px #FFD700) drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    }
    50% {
        stroke-width: 9px;
        filter: drop-shadow(0 0 20px #FFD700) drop-shadow(0 0 30px #c084fc);
    }
    100% {
        stroke-width: 5px;
        filter: drop-shadow(0 0 6px #FFD700) drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    }
}

@keyframes treePathHighlightPulse {
    0% {
        stroke: #FFD700;
        stroke-width: 6px;
        filter: drop-shadow(0 0 8px #FFD700);
    }
    50% {
        stroke: #FFF;
        stroke-width: 9px;
        filter: drop-shadow(0 0 22px #FFD700) drop-shadow(0 0 35px #38bdf8);
    }
    100% {
        stroke: #FFD700;
        stroke-width: 6px;
        filter: drop-shadow(0 0 8px #FFD700);
    }
}

.tree-sephirah-node.is-highlighted circle:first-child {
    stroke: #FFD700 !important;
    stroke-width: 5px !important;
    animation: treeHighlightPulse 1.8s infinite ease-in-out !important;
    opacity: 1 !important;
}

.tree-path-line.is-highlighted {
    animation: treePathHighlightPulse 1.8s infinite ease-in-out !important;
}

.tree-path-badge.is-highlighted rect,
.tree-path-badge.is-highlighted circle {
    stroke: #FFD700 !important;
    stroke-width: 2.5px !important;
    fill: #1a1505 !important;
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.9)) !important;
}

/* Banner de Alerta do Destaque Ativo na Árvore */
.tree-highlight-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(167, 139, 250, 0.22));
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
    animation: fadeIn 0.3s ease;
}

.tree-highlight-status-text {
    font-size: 0.88rem;
    color: #FFF;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

/* Dossiê Expandido da Sephirah */
.sephirah-dossier-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sephirah-dossier-action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    justify-content: space-between;
    align-items: center;
}

.sephirah-connecting-paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.sephirah-path-badge-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sephirah-path-badge-card:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* Layout Responsivo da Árvore da Vida + Cards Flutuantes de Descrição */
.kabbalah-tree-responsive-layout {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.kabbalah-tree-left-col {
    position: sticky;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.kabbalah-tree-right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.kabbalah-floating-cards-dock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.kabbalah-floating-desc-card {
    background: linear-gradient(155deg, rgba(15, 19, 34, 0.95), rgba(8, 10, 20, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.kabbalah-floating-desc-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 18px rgba(212, 175, 55, 0.18);
}

.tree-inline-inspector {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 18px 16px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(11, 14, 25, 0.92);
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.sephirah-dossier-layout,
.sephirah-dossier-layout .tarot-detail-box,
.sephirah-dossier-layout .tarot-correspondence-box,
.sephirah-dossier-layout .tarot-advice-box,
.sephirah-dossier-layout .tarot-meaning-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.sephirah-dossier-layout .tarot-detail-box-title {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.kabbalah-responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.kabbalah-responsive-grid > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

@media (max-width: 1080px) {
    .kabbalah-tree-responsive-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .kabbalah-tree-left-col {
        position: static;
    }
}

@media (max-width: 680px) {
    .kabbalah-container {
        padding: 12px 10px 40px 10px;
    }
    .tree-of-life-wrapper {
        padding: 10px 4px;
    }
    .tree-inline-inspector {
        padding: 12px 10px;
    }
    .kabbalah-floating-cards-dock,
    .kabbalah-responsive-grid,
    .sephirah-connecting-paths-grid,
    .world-meta-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .sephirah-dossier-layout .tarot-detail-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
        text-align: left !important;
    }
    .sephirah-dossier-layout .tarot-detail-value {
        text-align: left !important;
        width: 100%;
    }
    .sephirah-dossier-title {
        font-size: 1.3rem;
    }
    .sephirah-dossier-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .sephirah-dossier-action-bar .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }
}

/* Tooltip Persistente de Informações da Árvore da Vida & Qliphoth (Hover & Click-to-Pin) */
.tree-hover-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: auto;
    background: linear-gradient(165deg, rgba(10, 13, 25, 0.98), rgba(5, 7, 15, 0.99));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(212, 175, 55, 0.65);
    border-radius: 14px;
    padding: 13px 15px;
    width: 375px;
    max-width: calc(100vw - 24px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.92), 0 0 24px rgba(212, 175, 55, 0.25);
    color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    line-height: 1.45;
    transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
    opacity: 1;
    transform: translateY(0);
}

.tree-hover-tooltip.is-pinned {
    border-color: #FFD700;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.95), 0 0 28px rgba(255, 215, 0, 0.42);
}

.tree-hover-tooltip.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.tree-tooltip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.28);
    padding-bottom: 8px;
    margin-bottom: 9px;
}

.tree-tooltip-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFD700;
    line-height: 1.25;
}

.tree-tooltip-badge {
    background: rgba(167, 139, 250, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.45);
    color: #c084fc;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.tree-tooltip-pin-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s ease;
}

.tree-tooltip-pin-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: #f87171;
    color: #fca5a5;
}

.tree-tooltip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 8px;
}

.tree-tooltip-pill-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 8px;
}

.tree-tooltip-pill-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.tree-tooltip-pill-val {
    font-size: 0.76rem;
    font-weight: 700;
    color: #f8fafc;
}

.tree-tooltip-row {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 0.76rem;
}

.tree-tooltip-row strong {
    color: #f1f5f9;
}

.tree-tooltip-footer {
    margin-top: 9px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
    font-size: 0.7rem;
    color: var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   MODO CLARO & UNIFICAÇÃO DE CONTRASTE — KABBALAH (v5.2.0)
   ========================================================================== */
:root[data-theme="light"] .kabbalah-nav-tabs,
:root[data-theme="light"] .sephirah-card,
:root[data-theme="light"] .path-card,
:root[data-theme="light"] .world-card {
    background: var(--surface-elevated, #ffffff) !important;
    border-color: var(--border-hairline, #d4dce8) !important;
    color: var(--text-main, #0f172a) !important;
}

:root[data-theme="light"] .kabbalah-nav-btn {
    color: #334155 !important;
}

:root[data-theme="light"] .kabbalah-nav-btn.active {
    background: rgba(154, 107, 6, 0.14) !important;
    color: #78350f !important;
    border-color: #9a6b06 !important;
}

:root[data-theme="light"] .tree-hover-tooltip {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #0f172a !important;
    border-color: #b8860b !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18) !important;
}

:root[data-theme="light"] .tree-tooltip-title {
    color: #855800 !important;
}

:root[data-theme="light"] .tree-tooltip-pill-box {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

:root[data-theme="light"] .tree-tooltip-pill-val,
:root[data-theme="light"] .tree-tooltip-row,
:root[data-theme="light"] .tree-tooltip-row strong {
    color: #1e293b !important;
}




