/* ============================================
   Parkaran — Space/Solar System Terminal Theme
   Bloomberg-grade information density
   ============================================ */

:root {
    /* Celestial Observatory: warm purple-black space */
    --void: #0f0d13;
    --deep: #161420;
    --mid: #1e1a2a;
    --space-surface: #272236;
    --star-core: #f59e0b;
    --star-glow: #fbbf24;
    --star-corona: rgba(245, 158, 11, 0.12);
    --nebula-blue: #3b82f6;
    --nebula-purple: #8b5cf6;
    --nebula-cyan: #06b6d4;
    --signal-green: #10b981;
    --signal-red: #ef4444;
    /* Warm parchment text scale */
    --text-scripture: #f5e6c8;
    --text-primary: #e8dcc8;
    --text-secondary: #a89b8a;
    --text-dim: #6b5f52;
    --grid-line: rgba(255, 255, 255, 0.03);
    --border-subtle: #3d3552;
    --border-hover: rgba(245, 158, 11, 0.2);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Focus visible (keyboard accessibility) --- */
:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.6);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* --- Star field background --- */
.star-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 50%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.05) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.07) 0%, transparent 100%),
        radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.09) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 5%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 90%, rgba(255,255,255,0.11) 0%, transparent 100%),
        radial-gradient(1px 1px at 95% 50%, rgba(255,255,255,0.04) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 70%, rgba(245,158,11,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 60%, rgba(59,130,246,0.04) 0%, transparent 100%);
}

/* --- Typography --- */
.font-mono { font-family: 'IBM Plex Mono', 'Space Mono', monospace; }
.font-terminal { font-family: 'Space Mono', monospace; }

.page-title {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.page-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    letter-spacing: 0.02em;
}
.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.detail-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

/* --- Navigation --- */
.nav-bar {
    background: rgba(15, 13, 19, 0.92);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid var(--border-subtle);
}
.nav-link {
    font-family: 'Space Mono', monospace;
    padding: 0.625rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    transition: all 0.15s ease;
    position: relative;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}
.nav-link:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}
.nav-link.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.06);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.75rem;
    height: 1.5px;
    background: var(--star-core);
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* --- Panels & Cards --- */
.card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px -4px rgba(245, 158, 11, 0.06);
}

.glass-card-gold {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.panel {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
}
.panel-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.015);
}
.panel-scanline {
    border-top: 2px solid var(--star-core);
    box-shadow: 0 -1px 8px -2px rgba(245, 158, 11, 0.2);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.4375rem;
    border-radius: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-high { background: rgba(16, 185, 129, 0.1); color: var(--signal-green); border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-medium { background: rgba(245, 158, 11, 0.1); color: var(--star-core); border: 1px solid rgba(245, 158, 11, 0.15); }
.badge-low { background: rgba(239, 68, 68, 0.1); color: var(--signal-red); border: 1px solid rgba(239, 68, 68, 0.15); }
.badge-raag { background: rgba(139, 92, 246, 0.08); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.1); }
.badge-theme { background: rgba(245, 158, 11, 0.08); color: var(--star-core); border: 1px solid rgba(245, 158, 11, 0.12); }

.badge-sggs {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.1875rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.12);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-library {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.1875rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.08);
    color: var(--star-core);
    border: 1px solid rgba(245, 158, 11, 0.12);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --- Score gauge --- */
.score-gauge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.score-high { background: rgba(16, 185, 129, 0.08); color: var(--signal-green); border: 1.5px solid rgba(16, 185, 129, 0.25); box-shadow: 0 0 8px -2px rgba(16, 185, 129, 0.15); }
.score-mid { background: rgba(245, 158, 11, 0.08); color: var(--star-core); border: 1.5px solid rgba(245, 158, 11, 0.25); box-shadow: 0 0 8px -2px rgba(245, 158, 11, 0.15); }
.score-low { background: rgba(239, 68, 68, 0.08); color: var(--signal-red); border: 1.5px solid rgba(239, 68, 68, 0.25); }

/* --- Transition ratings --- */
.transition-strong { border-left: 2px solid var(--signal-green); }
.transition-moderate { border-left: 2px solid var(--star-core); }
.transition-weak { border-left: 2px solid var(--signal-red); }

/* --- Loading --- */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Orbital spinner */
.orbital-spinner {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--border-subtle);
    border-top-color: var(--star-core);
    border-radius: 50%;
    animation: orbit 1s linear infinite;
}
@keyframes orbit {
    to { transform: rotate(360deg); }
}

/* --- Form inputs --- */
.search-input {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
    min-height: 2.75rem;
}
.search-input:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(22, 20, 32, 0.8);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06), 0 0 12px -4px rgba(245, 158, 11, 0.1);
}
.search-input::placeholder {
    color: var(--text-dim);
    font-size: 0.75rem;
}
.search-input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Command-line search */
.search-cmd {
    position: relative;
}
.search-cmd::before {
    content: '>';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--star-core);
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    pointer-events: none;
}
.search-cmd .search-input {
    padding-left: 1.75rem;
}

.filter-select {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.4375rem 0.625rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
}
.filter-select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
}
.filter-select option {
    background: var(--deep);
    color: var(--text-secondary);
}

/* --- Buttons --- */
.btn-primary {
    font-family: 'Space Mono', monospace;
    background: var(--star-core);
    color: var(--void);
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 0 12px -2px rgba(245, 158, 11, 0.25);
    border: none;
    cursor: pointer;
    min-height: 2.75rem;
}
.btn-primary:hover {
    background: var(--star-glow);
    box-shadow: 0 0 20px -2px rgba(245, 158, 11, 0.35);
}
.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    font-family: 'IBM Plex Mono', monospace;
    background: transparent;
    color: var(--star-core);
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    min-height: 2.25rem;
}
.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
}

.btn-ghost {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    letter-spacing: 0.02em;
    min-height: 2.25rem;
}
.btn-ghost:hover {
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.15);
    background: rgba(245, 158, 11, 0.04);
}

.btn-add {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: var(--star-core);
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-add:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px -2px rgba(245, 158, 11, 0.2);
}

/* --- Gurmukhi text --- */
.gurmukhi {
    font-family: 'Noto Sans Gurmukhi', serif;
    font-size: 1.125rem;
    line-height: 2;
    color: var(--star-glow);
}

/* --- Shabad expand/collapse --- */
.shabad-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}
.shabad-details.open {
    max-height: 700px;
}

/* --- Seed card --- */
.seed-card {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    transition: all 0.15s;
}
.seed-card:hover {
    background: rgba(245, 158, 11, 0.07);
}

/* --- Suggestion card --- */
.suggestion-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}
.suggestion-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px -4px rgba(245, 158, 11, 0.08);
}

/* --- Position tags --- */
.position-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.0625rem 0.3125rem;
    border-radius: 0.1875rem;
    font-weight: 600;
}
.position-opening { background: rgba(59, 130, 246, 0.08); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.12); }
.position-building { background: rgba(139, 92, 246, 0.08); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.12); }
.position-climax { background: rgba(245, 158, 11, 0.08); color: var(--star-glow); border: 1px solid rgba(245, 158, 11, 0.12); }
.position-resolution { background: rgba(16, 185, 129, 0.08); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.12); }

/* --- Occasion card --- */
.occasion-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.occasion-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 24px -8px rgba(245, 158, 11, 0.08);
}

/* --- Parkaran list item --- */
.parkaran-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: grab;
    transition: all 0.15s ease;
}
.parkaran-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.parkaran-item.dragging { opacity: 0.3; }
.parkaran-item.drag-over {
    border-color: var(--star-core);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}
.parkaran-item:active { cursor: grabbing; }
.drag-handle {
    color: #1f2937;
    cursor: grab;
    font-size: 0.875rem;
    user-select: none;
    transition: color 0.15s;
}
.drag-handle:hover { color: var(--text-dim); }
.parkaran-num {
    color: var(--text-dim);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    width: 1.25rem;
    flex-shrink: 0;
}

/* --- Autocomplete dropdown --- */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(22, 20, 32, 0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 0.125rem;
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6);
}
.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.1s ease;
}
.autocomplete-item:hover {
    background: rgba(245, 158, 11, 0.05);
}
.autocomplete-item:last-child {
    border-bottom: none;
}

/* --- Tab buttons --- */
.tab-btn {
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.3125rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}
.tab-btn.active {
    color: var(--star-core);
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
}

/* --- Discover card --- */
.discover-card {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.discover-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px -4px rgba(245, 158, 11, 0.06);
}

/* --- Mukhra verse selection --- */
.mukhra-verse {
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s;
}
.mukhra-verse:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}
.mukhra-verse.rahao {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.04);
}
.mukhra-verse.selected {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}
.mukhra-verse.selected::before {
    content: "\2713 ";
    color: var(--star-core);
    font-weight: bold;
}

/* ============================
   GRAPH EXPLORER
   ============================ */

#cy {
    background: transparent;
}

/* Graph container grid overlay */
.graph-container {
    position: relative;
    background:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Mission control sidebar */
.mission-panel {
    background: var(--deep);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    overflow: hidden;
}
.mission-panel-header {
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border-subtle);
    border-top: 2px solid var(--star-core);
    box-shadow: 0 1px 8px -2px rgba(245, 158, 11, 0.1);
}

/* Tag chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 0.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.08);
    color: rgba(245, 158, 11, 0.7);
    cursor: pointer;
    transition: all 0.15s;
}
.tag-chip:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--star-core);
}
.tag-chip .count {
    font-size: 0.5625rem;
    color: var(--text-dim);
}

/* Tag modal */
.tag-modal-overlay {
    background: rgba(15, 13, 19, 0.88);
    backdrop-filter: blur(8px);
}

/* Parkaran sidebar items */
.parkaran-sidebar-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 0.25rem;
    padding: 0.4375rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: grab;
    font-size: 0.75rem;
    transition: all 0.12s;
}
.parkaran-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.08);
}
.parkaran-sidebar-item:active {
    cursor: grabbing;
}
.parkaran-sidebar-item {
    user-select: none;
    -webkit-user-select: none;
}

/* Breadcrumbs */
.breadcrumb-node {
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 0.1875rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 0.5);
    font-size: 0.5625rem;
    cursor: pointer;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.12s;
    letter-spacing: 0.01em;
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
}
.breadcrumb-node:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--star-core);
}
.breadcrumb-node.active {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--star-core);
    font-weight: 700;
}

/* HUD tooltip */
.hud-tooltip {
    background: rgba(18, 16, 28, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-top: 2px solid var(--star-core);
    border-radius: 0.5rem;
    padding: 0;
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6), 0 0 16px -4px rgba(245, 158, 11, 0.06);
    font-family: 'IBM Plex Mono', monospace;
    width: 340px;
    pointer-events: auto;
}

/* Tooltip internal elements */
.tt-body { padding: 0.75rem 1rem; }
.tt-gurmukhi {
    font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif;
    color: var(--text-scripture);
    font-size: 18px;
    line-height: 1.8;
}
.tt-meta {
    color: var(--text-dim);
    font-size: 11px;
    margin-top: 6px;
    letter-spacing: 0.03em;
}
.tt-summary {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
}
.tt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.tt-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(245, 158, 11, 0.06);
    color: rgba(245, 158, 11, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.1);
}
.tt-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 6px;
}
.tt-btn {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
    background: none;
    min-height: 32px;
}
.tt-btn-add {
    color: var(--star-core);
    border-color: rgba(245, 158, 11, 0.15);
}
.tt-btn-add:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.tt-btn-explore {
    color: var(--text-dim);
    border-color: var(--border-subtle);
}
.tt-btn-explore:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}
.tt-btn-preview {
    color: var(--text-dim);
    border-color: var(--border-subtle);
}
.tt-btn-preview:hover {
    color: var(--accent-gold);
    border-color: rgba(245, 158, 11, 0.3);
}

/* --- Shabad Preview Overlay --- */
.shabad-preview-overlay {
    background: rgba(18, 16, 28, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.7);
    max-width: 420px;
    min-width: 300px;
    max-height: 60vh;
    overflow-y: auto;
    pointer-events: auto;
}
.shabad-preview-overlay .preview-header {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shabad-preview-overlay .preview-close {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 14px;
    background: none;
    border: none;
    padding: 0 4px;
}
.shabad-preview-overlay .preview-close:hover {
    color: var(--text-primary);
}
.shabad-preview-overlay .preview-verse {
    margin-bottom: 10px;
    padding: 4px 0;
}
.shabad-preview-overlay .preview-gurmukhi {
    font-family: 'Noto Serif Gurmukhi', 'Noto Sans Gurmukhi', serif;
    color: var(--text-scripture);
    font-size: 15px;
    line-height: 1.8;
}
.shabad-preview-overlay .preview-english {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
    margin-top: 2px;
}
.shabad-preview-overlay .preview-rahao {
    border-left: 2px solid rgba(245, 158, 11, 0.4);
    padding-left: 8px;
    background: rgba(245, 158, 11, 0.03);
    border-radius: 0 4px 4px 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.1); }

/* --- Line clamp --- */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Threshold Slider --- */
.threshold-slider {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
}
.threshold-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 1px;
    outline: none;
}
.threshold-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(245, 158, 11, 0.6);
    border-radius: 50%;
    cursor: pointer;
}

/* --- Force Panel (Obsidian-style) --- */
.force-panel {
    background: rgba(14, 12, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    width: 200px;
}
.force-panel-header {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(245, 158, 11, 0.4);
    letter-spacing: 0.1em;
    padding: 5px 8px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.force-panel-header::-webkit-details-marker { display: none; }
.force-panel-header::before {
    content: "\25B8 ";
    font-size: 7px;
}
details[open] > .force-panel-header::before {
    content: "\25BE ";
}
.force-panel-body {
    padding: 4px 8px 8px;
}
.force-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.force-row label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    width: 52px;
    flex-shrink: 0;
}
.force-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 2px;
    outline: none;
    padding: 10px 0;
    margin: -10px 0;
    background-clip: content-box;
}
.force-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(245, 158, 11, 0.5);
    border-radius: 50%;
    cursor: pointer;
}
.force-row span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(245, 158, 11, 0.4);
    width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Selection --- */
::selection {
    background: rgba(245, 158, 11, 0.2);
    color: #fef3c7;
}

/* ========== REVIEWER ========== */

.reviewer-save-dialog {
    margin-top: 8px;
    padding: 10px;
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
}
.reviewer-library-modal {
    margin-top: 8px;
    padding: 10px;
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.reviewer-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.reviewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}
.reviewer-flow-panel {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.reviewer-flow-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.reviewer-flow-item {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}
.reviewer-flow-item:hover {
    background: rgba(255, 255, 255, 0.015);
}
.reviewer-flow-item.selected {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.12);
}
.reviewer-connection {
    padding: 3px 0;
}
.reviewer-detail-panel {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
    .parkaran-sidebar {
        width: 160px;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    /* Nav: horizontal scroll instead of wrap */
    .nav-bar .flex.gap-0\.5 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-bar .flex.gap-0\.5::-webkit-scrollbar { display: none; }

    .nav-link {
        font-size: 0.625rem;
        padding: 0.5rem 0.5rem;
        white-space: nowrap;
    }

    /* Explore: hide sidebar, show as bottom sheet */
    .parkaran-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 40vh;
        z-index: 40;
        border-top: 1px solid rgba(245, 158, 11, 0.15);
        border-left: none;
        transform: translateY(calc(100% - 40px));
        transition: transform 0.3s ease-out;
    }
    .parkaran-sidebar.mobile-open {
        transform: translateY(0);
    }
    .parkaran-sidebar-header {
        cursor: pointer;
    }

    /* Graph canvas: full width */
    #cy {
        width: 100% !important;
    }

    /* Reviewer */
    .reviewer-flow-panel {
        width: 100%;
        min-width: unset;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    #reviewContent {
        flex-direction: column !important;
    }

    /* Force panel: compact */
    .force-panel {
        max-width: 180px;
    }

    /* Page titles */
    .page-title { font-size: 1rem; }
    .page-subtitle { font-size: 0.6875rem; }
}

/* --- Parkaran Toast Notification --- */
.parkaran-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18, 16, 28, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 10px 20px;
    color: #fbbf24;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.parkaran-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
