        * { box-sizing: border-box; }
        body {
            margin: 0;
            overflow: hidden;
            background: #06050a;
            font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
        }
        canvas { display: block; }

        .vignette {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            pointer-events: none;
            background: radial-gradient(ellipse at center, transparent 40%, rgba(6,5,10,0.7) 100%);
            z-index: 10;
        }

        .top-bar {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 30;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .title {
            color: rgba(255, 235, 225, 0.6);
            font-size: 13px;
            font-weight: 500;
            letter-spacing: 3px;
            text-transform: uppercase;
        }

        .search-box {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            padding: 8px 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            backdrop-filter: blur(12px);
            transition: border-color 0.2s, background 0.2s;
        }
        .search-box:focus-within {
            border-color: rgba(255,255,255,0.25);
            background: rgba(255,255,255,0.1);
        }
        .search-box input {
            background: transparent;
            border: none;
            color: #fff;
            font-size: 13px;
            width: 180px;
            outline: none;
        }
        .search-box input::placeholder { color: rgba(255,255,255,0.3); }
        .search-box .search-icon { color: rgba(255,255,255,0.4); font-size: 14px; }
        .search-box .clear-search {
            background: none;
            border: none;
            color: rgba(255,255,255,0.4);
            cursor: pointer;
            font-size: 16px;
            padding: 0;
            display: none;
        }
        .search-box .clear-search.visible { display: block; }

        .legend {
            position: fixed;
            top: 24px;
            right: 28px;
            z-index: 30;
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 11px;
            color: rgba(255,255,255,0.5);
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: all 0.2s;
        }
        .legend-item:hover { background: rgba(255,255,255,0.1); }
        .legend-item.active { background: rgba(255,255,255,0.15); color: #fff; }
        .legend-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }

        /* User menu dropdown */
        .user-menu-wrapper {
            position: relative;
            margin-left: 16px;
        }
        .user-menu-btn {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            color: rgba(255,255,255,0.6);
            padding: 5px 12px;
            border-radius: 8px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }
        .user-menu-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
        .user-menu {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: rgba(16, 14, 22, 0.97);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            padding: 6px 0;
            min-width: 180px;
            backdrop-filter: blur(20px);
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            z-index: 100;
        }
        .user-menu.visible { display: block; }
        .user-menu-item {
            padding: 10px 16px;
            font-size: 13px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            transition: background 0.15s;
        }
        .user-menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
        .user-menu-divider {
            height: 1px;
            background: rgba(255,255,255,0.08);
            margin: 4px 0;
        }

        /* Dropdown panels (settings, bot config, help) — positioned under user menu */
        .dropdown-panel {
            display: none;
            position: fixed;
            top: 64px;
            right: 28px;
            background: rgba(16, 14, 22, 0.97);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            padding: 16px 20px;
            z-index: 90;
            backdrop-filter: blur(20px);
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            min-width: 280px;
            max-width: 340px;
        }
        .dropdown-panel.visible { display: block; }
        .dropdown-panel h4 {
            margin: 0 0 14px 0;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255,255,255,0.4);
        }

        .hud {
            position: fixed;
            bottom: 24px;
            left: 28px;
            z-index: 20;
            color: rgba(255, 235, 225, 0.4);
            font-size: 11px;
            letter-spacing: 1px;
        }
        .hud span { color: rgba(255, 235, 225, 0.7); }

        .view-switcher {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 25;
            display: flex;
            gap: 2px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 3px;
            backdrop-filter: blur(16px);
        }
        .view-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.35);
            font-size: 11px;
            font-family: inherit;
            letter-spacing: 0.5px;
            padding: 6px 14px;
            border-radius: 7px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .view-btn:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.05); }
        .view-btn.active {
            background: rgba(255,255,255,0.12);
            color: rgba(255,255,255,0.95);
            box-shadow: 0 0 12px rgba(255,255,255,0.06);
        }

        .hint {
            position: fixed;
            bottom: 24px;
            right: 28px;
            z-index: 20;
            color: rgba(255, 235, 225, 0.3);
            font-size: 11px;
        }

        .idle-indicator {
            position: fixed;
            bottom: 50%;
            left: 50%;
            transform: translate(-50%, 50%);
            z-index: 20;
            color: rgba(255, 220, 200, 0.6);
            font-size: 14px;
            letter-spacing: 1px;
            opacity: 0;
            transition: opacity 1s ease;
            pointer-events: none;
            text-shadow: 0 0 20px rgba(255, 180, 150, 0.5);
        }
        .idle-indicator.visible {
            opacity: 1;
        }

        #toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: rgba(20, 18, 28, 0.95);
            border: 1px solid rgba(255, 100, 100, 0.25);
            border-radius: 12px;
            padding: 12px 20px;
            z-index: 200;
            font-size: 13px;
            color: rgba(255, 180, 180, 0.9);
            backdrop-filter: blur(10px);
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
            max-width: 400px;
        }
        #toast.visible {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        #filter-banner {
            display: none;
            position: fixed;
            top: 70px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 18, 28, 0.9);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            padding: 8px 20px;
            z-index: 30;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            backdrop-filter: blur(10px);
        }
        #filter-banner.visible { display: flex; align-items: center; gap: 12px; }
        #filter-banner .filter-label { opacity: 0.5; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
        #filter-banner .filter-value { font-weight: 500; }
        #filter-banner .clear-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: rgba(255,255,255,0.6);
            padding: 4px 10px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 11px;
        }

        #focus-overlay {
            display: none;
            position: fixed;
            bottom: 60px;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            z-index: 50;
            pointer-events: none;
        }
        #focus-overlay.visible { display: block; }
        #focus-overlay .source-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 10px;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        #focus-overlay h2 {
            margin: 0 0 8px 0;
            font-size: 28px;
            font-weight: 600;
            color: #fff;
            text-shadow: 0 2px 20px rgba(0,0,0,0.5);
        }
        #focus-overlay .context { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
        #focus-overlay .context.urgent { color: #ff6b6b; }
        #focus-overlay .context.overdue { color: #ffa94d; }
        #focus-overlay .context.active { color: #69db7c; }
        #focus-overlay .related { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 4px; }
        #focus-overlay .related span { cursor: pointer; text-decoration: underline; pointer-events: auto; }
        #focus-overlay .related span:hover { color: rgba(255,255,255,0.7); }

        #focus-actions {
            display: none;
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 50;
            gap: 12px;
        }
        #focus-actions.visible { display: flex; }
        #focus-actions button {
            padding: 12px 24px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            backdrop-filter: blur(10px);
        }
        #focus-actions .primary-btn { background: rgba(255, 220, 200, 0.2); color: #fff; border: 1px solid rgba(255, 220, 200, 0.3); }
        #focus-actions .filter-btn { background: rgba(136, 200, 255, 0.15); color: rgba(255,255,255,0.9); border: 1px solid rgba(136, 200, 255, 0.2); }
        #focus-actions .back-btn { background: rgba(255, 255, 255, 0.1); color: rgba(255,255,255,0.7); }
        #focus-actions .dismiss-btn { background: rgba(255, 100, 100, 0.15); color: rgba(255, 180, 180, 0.9); border: 1px solid rgba(255, 100, 100, 0.25); }
        #focus-actions .dismiss-btn:hover { background: rgba(255, 100, 100, 0.25); }

        #memory-panel {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, rgba(255, 158, 207, 0.15), rgba(255, 209, 102, 0.15));
            border: 1px solid rgba(255, 200, 180, 0.3);
            border-radius: 20px;
            padding: 36px 40px;
            max-width: 560px;
            width: 90vw;
            color: #fff5f0;
            z-index: 100;
            backdrop-filter: blur(20px);
            box-shadow: 0 0 60px rgba(255, 158, 207, 0.2);
        }
        #memory-panel::before {
            content: '\2728 MEMORY';
            position: absolute;
            top: -10px;
            left: 24px;
            background: linear-gradient(90deg, #ff9ecf, #ffd166);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            padding: 2px 10px;
            font-size: 10px;
            letter-spacing: 2px;
            font-weight: 600;
        }
        #memory-years-ago {
            font-size: 32px;
            font-weight: 700;
            background: linear-gradient(90deg, #ff9ecf, #ffd166);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 4px;
        }
        #memory-panel h3 { margin: 0 0 14px 0; font-size: 18px; font-weight: 500; }
        #memory-thumb { margin-bottom: 14px; }
        #memory-thumb img {
            border-radius: 12px;
            max-width: 100%;
            max-height: 340px;
            object-fit: cover;
            cursor: pointer;
        }
        #memory-thumb a { text-decoration: none; }
        #memory-panel p { margin: 0 0 14px 0; opacity: 0.8; font-size: 13px; line-height: 1.6; font-style: italic; }
        #memory-panel .memory-meta { font-size: 12px; opacity: 0.5; margin-bottom: 16px; }
        #memory-panel .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
        #memory-panel button { padding: 10px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 12px; }
        #memory-panel .memory-btn { background: linear-gradient(90deg, rgba(255, 158, 207, 0.3), rgba(255, 209, 102, 0.3)); color: #fff; border: 1px solid rgba(255, 200, 180, 0.3); }
        #memory-panel .memory-btn:hover { background: linear-gradient(90deg, rgba(255, 158, 207, 0.5), rgba(255, 209, 102, 0.5)); }
        #memory-panel .skip-btn { background: transparent; color: rgba(255, 245, 240, 0.5); }
        .memory-status { font-size: 11px; color: rgba(255, 200, 180, 0.6); margin-top: 8px; text-align: center; min-height: 16px; }
        .memory-photos { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
        .memory-photos img {
            border-radius: 12px;
            max-width: 48%;
            max-height: 280px;
            object-fit: cover;
            cursor: pointer;
        }

        /* Labels container */
        #labels { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 15; }
        .orb-label {
            position: absolute;
            color: #fff;
            font-size: 10px;
            font-weight: 500;
            text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
            white-space: nowrap;
            transform: translate(-50%, -50%);
            opacity: 0.85;
            transition: opacity 0.2s;
        }
        .orb-label.dimmed { opacity: 0.2; }
        .orb-label.hidden { opacity: 0; }
        .orb-label.epic-label {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            text-shadow: 0 0 20px rgba(255,255,255,0.4), 0 0 40px rgba(255,255,255,0.15), 0 1px 4px rgba(0,0,0,0.8);
            opacity: 1;
        }
        .orb-label.hub-label {
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-shadow: 0 0 12px rgba(244,114,182,0.6), 0 1px 4px rgba(0,0,0,0.8);
            opacity: 1;
        }
        .orb-label.news-label {
            color: rgba(96,165,250,0.7);
            font-size: 9px;
            font-style: italic;
            pointer-events: auto;
            cursor: pointer;
        }
        .orb-label.news-label:hover { color: rgba(96,165,250,1); }

        /* Project orb labels */
        .orb-label.project-label {
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.8px;
            text-shadow: 0 0 12px currentColor, 0 0 24px rgba(0,0,0,0.8);
        }
        .orb-label.task-label {
            font-size: 8px;
            opacity: 0.5;
        }

        /* Project detail panel */
        #project-detail {
            margin-top: 8px;
            display: none;
        }
        .project-heat {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 8px 0;
        }
        .heat-bar {
            flex: 1;
            height: 4px;
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
            overflow: hidden;
        }
        .heat-fill {
            height: 100%;
            border-radius: 2px;
            transition: width 0.6s ease;
        }
        .heat-value {
            font-size: 11px;
            font-weight: 700;
            color: rgba(255,255,255,0.7);
            min-width: 24px;
            text-align: right;
        }
        .project-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 6px 0;
        }
        .project-stats .stat {
            font-size: 11px;
            color: rgba(255,255,255,0.65);
            background: rgba(255,255,255,0.06);
            padding: 2px 8px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.08);
        }
        .project-contacts {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin: 6px 0;
        }
        .contact-chip {
            font-size: 10px;
            color: rgba(255,255,255,0.8);
            background: rgba(255,255,255,0.08);
            padding: 2px 8px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.12);
        }
        .project-links {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin: 6px 0;
        }
        .project-link {
            font-size: 10px;
            color: rgba(96,165,250,0.8);
            text-decoration: none;
            padding: 2px 6px;
            border-radius: 4px;
            background: rgba(96,165,250,0.08);
        }
        .project-link:hover {
            background: rgba(96,165,250,0.15);
            color: rgba(96,165,250,1);
        }
        .activity-feed {
            margin-top: 8px;
            max-height: 200px;
            overflow-y: auto;
        }
        .activity-item {
            display: flex;
            align-items: flex-start;
            gap: 6px;
            padding: 4px 0;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            font-size: 11px;
        }
        .activity-icon {
            flex-shrink: 0;
            width: 16px;
            text-align: center;
        }
        .activity-text {
            flex: 1;
            color: rgba(255,255,255,0.7);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .activity-time {
            flex-shrink: 0;
            font-size: 10px;
            color: rgba(255,255,255,0.35);
        }
        .loading-dots {
            font-size: 11px;
            color: rgba(255,255,255,0.3);
            text-align: center;
            padding: 8px;
        }

        /* Settings shared styles */
        .settings-group { margin-bottom: 14px; }
        .settings-group label {
            display: block;
            font-size: 11px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .settings-row {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: rgba(255,255,255,0.8);
        }
        .settings-row input[type="range"] {
            flex: 1;
            accent-color: #60a5fa;
        }
        .calendar-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-height: 150px;
            overflow-y: auto;
        }
        .calendar-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
        }
        .calendar-item:hover { background: rgba(255,255,255,0.05); }
        .calendar-item input[type="checkbox"] { accent-color: #60a5fa; }
        .calendar-item .cal-primary { color: rgba(96,165,250,0.8); font-size: 10px; }
        .settings-actions {
            display: flex;
            gap: 8px;
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.08);
        }
        .settings-cancel-btn {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.15);
            background: rgba(255,255,255,0.05);
            color: rgba(255,255,255,0.6);
            font-size: 12px;
            cursor: pointer;
        }
        .settings-cancel-btn:hover { background: rgba(255,255,255,0.1); }
        .settings-sync-btn {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(74,222,128,0.3);
            background: rgba(74,222,128,0.15);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
        }
        .settings-sync-btn:hover { background: rgba(74,222,128,0.25); }
        .settings-gmail-btn {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(251,191,36,0.3);
            background: rgba(251,191,36,0.15);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
        }
        .settings-gmail-btn:hover { background: rgba(251,191,36,0.25); }
        .settings-synapse-btn {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(192,132,252,0.3);
            background: rgba(192,132,252,0.15);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
        }
        .settings-synapse-btn:hover { background: rgba(192,132,252,0.25); }
        .settings-status {
            font-size: 11px;
            color: rgba(255,255,255,0.4);
            margin-top: 8px;
            text-align: center;
            min-height: 16px;
        }
        .char-count {
            float: right;
            font-size: 10px;
            color: rgba(255,255,255,0.3);
            text-transform: none;
            letter-spacing: 0;
        }

        /* Bot config styles */
        .bot-model-select {
            display: flex;
            gap: 6px;
        }
        .bot-model-btn {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            color: rgba(255,255,255,0.5);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .bot-model-btn:hover { background: rgba(255,255,255,0.08); }
        .bot-model-btn.selected {
            border-color: rgba(96,165,250,0.4);
            background: rgba(96,165,250,0.15);
            color: #fff;
        }
        .bot-select {
            width: 100%;
            padding: 8px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            outline: none;
            font-family: inherit;
        }
        .bot-select option { background: #16141e; color: #fff; }
        .bot-textarea {
            width: 100%;
            min-height: 80px;
            max-height: 160px;
            padding: 10px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            line-height: 1.5;
            resize: vertical;
            outline: none;
            font-family: inherit;
        }
        .bot-textarea:focus { border-color: rgba(96,165,250,0.4); }
        .bot-textarea::placeholder { color: rgba(255,255,255,0.25); }

        /* Help panel */
        .help-toggle {
            position: fixed;
            bottom: 140px;
            right: 28px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: rgba(255,255,255,0.5);
            font-size: 14px;
            cursor: pointer;
            z-index: 25;
        }
        .help-toggle:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

        .help-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4px 0;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
        }
        .help-key {
            background: rgba(255,255,255,0.1);
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            color: rgba(255,255,255,0.8);
            font-family: monospace;
        }

        /* ===== FAB STACK (bottom-right) ===== */
        .fab {
            position: fixed;
            right: 28px;
            width: 44px;
            height: 44px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.6);
            font-size: 18px;
            cursor: pointer;
            z-index: 25;
            transition: all 0.2s;
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }
        .fab:hover {
            background: rgba(255,255,255,0.15);
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(0,0,0,0.3);
        }
        .fab.active {
            background: rgba(96,165,250,0.2);
            border-color: rgba(96,165,250,0.3);
            color: #fff;
        }
        .fab-board { bottom: 140px; }
        .fab-chat { bottom: 84px; }
        .fab-add { bottom: 28px; }

        /* SVG icons inside FABs */
        .fab svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* ===== FULL-HEIGHT CHAT SIDEBAR ===== */

        .chat-sidebar {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            width: 420px;
            background: rgba(12, 10, 18, 0.98);
            border-left: 1px solid rgba(96,165,250,0.15);
            z-index: 80;
            display: none;
            flex-direction: column;
            backdrop-filter: blur(20px);
        }
        .chat-sidebar.visible { display: flex; }

        .chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            font-size: 12px;
            color: rgba(96,165,250,0.8);
            letter-spacing: 1px;
            text-transform: uppercase;
            flex-shrink: 0;
        }
        .chat-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.4);
            font-size: 18px;
            cursor: pointer;
        }
        .chat-close:hover { color: #fff; }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .chat-msg {
            max-width: 90%;
            word-wrap: break-word;
        }
        .chat-msg-content {
            padding: 12px 16px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.6;
        }
        .chat-msg.user {
            align-self: flex-end;
        }
        .chat-msg.user .chat-msg-content {
            background: rgba(96,165,250,0.2);
            color: #fff;
            border: 1px solid rgba(96,165,250,0.15);
            border-bottom-right-radius: 4px;
        }
        .chat-msg.assistant {
            align-self: flex-start;
        }
        .chat-msg.assistant .chat-msg-content {
            background: rgba(255,255,255,0.05);
            color: rgba(255,255,255,0.9);
            border: 1px solid rgba(255,255,255,0.08);
            border-bottom-left-radius: 4px;
        }
        /* Markdown content styling in chat */
        .chat-msg-content p { margin: 0 0 8px 0; }
        .chat-msg-content p:last-child { margin-bottom: 0; }
        .chat-msg-content ul, .chat-msg-content ol { margin: 4px 0 8px 0; padding-left: 20px; }
        .chat-msg-content li { margin-bottom: 2px; }
        .chat-msg-content code {
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 12px;
            background: rgba(255,255,255,0.08);
            padding: 2px 6px;
            border-radius: 4px;
        }
        .chat-msg-content pre {
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.08);
            padding: 12px;
            border-radius: 8px;
            overflow-x: auto;
            margin: 8px 0;
        }
        .chat-msg-content pre code {
            background: none;
            padding: 0;
            font-size: 12px;
        }
        .chat-msg-content strong { color: #fff; }
        .chat-msg-content a { color: rgba(96,165,250,0.9); text-decoration: none; }
        .chat-msg-content a:hover { text-decoration: underline; }
        .chat-msg-content blockquote {
            border-left: 3px solid rgba(96,165,250,0.3);
            padding: 4px 12px;
            margin: 8px 0;
            color: rgba(255,255,255,0.6);
        }
        .chat-msg-content table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }
        .chat-msg-content th, .chat-msg-content td {
            border: 1px solid rgba(255,255,255,0.1);
            padding: 6px 10px;
            text-align: left;
        }
        .chat-msg-content th { background: rgba(255,255,255,0.05); }

        .chat-msg.tool-result {
            align-self: flex-start;
        }
        .chat-msg.tool-result .chat-msg-content {
            background: rgba(74,222,128,0.08);
            color: rgba(74,222,128,0.9);
            border: 1px solid rgba(74,222,128,0.12);
            font-size: 12px;
            font-family: 'SF Mono', Monaco, monospace;
            border-bottom-left-radius: 4px;
        }

        .chat-typing {
            align-self: flex-start;
            padding: 12px 16px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            border-bottom-left-radius: 4px;
        }
        .chat-typing-dots { display: flex; gap: 4px; align-items: center; }
        .chat-typing-dots span {
            width: 6px; height: 6px;
            background: rgba(96,165,250,0.5);
            border-radius: 50%;
            animation: typingBounce 1.2s infinite;
        }
        .chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
        .chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes typingBounce {
            0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
            40% { transform: translateY(-4px); opacity: 1; }
        }

        .chat-input-bar {
            display: flex;
            gap: 8px;
            padding: 16px 20px;
            border-top: 1px solid rgba(255,255,255,0.08);
            flex-shrink: 0;
        }
        .chat-input-bar input {
            flex: 1;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 12px 16px;
            color: #fff;
            font-size: 14px;
            outline: none;
            font-family: inherit;
        }
        .chat-input-bar input:focus { border-color: rgba(96,165,250,0.4); }
        .chat-input-bar input::placeholder { color: rgba(255,255,255,0.3); }
        .chat-send {
            background: rgba(96,165,250,0.2);
            border: 1px solid rgba(96,165,250,0.3);
            border-radius: 10px;
            color: #fff;
            padding: 12px 16px;
            cursor: pointer;
            font-size: 16px;
        }
        .chat-send:hover { background: rgba(96,165,250,0.35); }
        .chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
        .chat-mic {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: rgba(255,255,255,0.5);
            padding: 12px 14px;
            cursor: pointer;
            font-size: 14px;
        }
        .chat-mic:hover { background: rgba(255,255,255,0.1); color: #fff; }
        .chat-mic.recording {
            background: rgba(255,80,80,0.2);
            border-color: rgba(255,80,80,0.4);
            color: #ff6b6b;
            animation: micPulse 1s ease-in-out infinite;
        }
        @keyframes micPulse {
            0%, 100% { box-shadow: 0 0 4px rgba(255,80,80,0.2); }
            50% { box-shadow: 0 0 12px rgba(255,80,80,0.5); }
        }

        /* ===== KANBAN BOARD VIEW ===== */
        .board-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(6, 5, 10, 0.97);
            z-index: 70;
            display: flex;
            flex-direction: column;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
            overflow: hidden;
        }
        .board-overlay.visible {
            opacity: 1;
            pointer-events: auto;
        }
        .board-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 28px;
            flex-shrink: 0;
        }
        .board-title {
            font-size: 16px;
            font-weight: 500;
            color: rgba(255, 235, 225, 0.6);
            letter-spacing: 2px;
            text-transform: uppercase;
            margin: 0;
        }
        .board-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.4);
            font-size: 24px;
            cursor: pointer;
            padding: 4px 8px;
        }
        .board-close:hover { color: #fff; }
        .board-columns {
            flex: 1;
            display: flex;
            gap: 16px;
            padding: 0 28px 28px;
            overflow-x: auto;
            overflow-y: hidden;
        }
        .board-column {
            flex: 1;
            min-width: 220px;
            max-width: 320px;
            display: flex;
            flex-direction: column;
            border-radius: 14px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            overflow: hidden;
        }
        .board-column-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 14px 16px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255,255,255,0.5);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }
        .board-column-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        .board-column-count {
            margin-left: auto;
            font-size: 10px;
            color: rgba(255,255,255,0.3);
        }
        .board-column-cards {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .board-card {
            padding: 12px 14px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            opacity: 0;
            transform: translateY(20px) scale(0.95);
            animation: cardSwoop 0.4s ease forwards;
        }
        .board-card:hover {
            background: rgba(255,255,255,0.08);
            border-color: rgba(255,255,255,0.12);
            transform: translateY(-1px);
        }
        .board-card-name {
            font-size: 13px;
            color: rgba(255,255,255,0.85);
            margin-bottom: 4px;
            font-weight: 500;
        }
        .board-card-context {
            font-size: 11px;
            color: rgba(255,255,255,0.4);
            line-height: 1.4;
        }
        .board-card-source {
            display: inline-block;
            margin-top: 6px;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .board-card-source.calendar { background: rgba(96,165,250,0.15); color: rgba(96,165,250,0.8); }
        .board-card-source.email { background: rgba(251,191,36,0.15); color: rgba(251,191,36,0.8); }
        .board-card-source.task { background: rgba(192,132,252,0.15); color: rgba(192,132,252,0.8); }
        .board-card-source.github { background: rgba(74,222,128,0.15); color: rgba(74,222,128,0.8); }
        .board-card-source.person { background: rgba(244,114,182,0.15); color: rgba(244,114,182,0.8); }
        .board-card-source.visitor { background: rgba(56,189,248,0.15); color: rgba(56,189,248,0.8); }

        @keyframes cardSwoop {
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Legacy class mapped to .fab */

        /* Quick add bar */
        .quick-add-bar {
            display: none;
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 100;
            background: rgba(16, 14, 22, 0.95);
            border: 1px solid rgba(255, 220, 200, 0.25);
            border-radius: 16px;
            padding: 16px 20px;
            backdrop-filter: blur(20px);
            width: 90%;
            max-width: 480px;
        }
        .quick-add-bar.visible { display: block; }
        .quick-add-bar input {
            width: 100%;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 14px 18px;
            color: #fff;
            font-size: 16px;
            outline: none;
        }
        .quick-add-bar input:focus { border-color: rgba(255, 220, 200, 0.4); }
        .quick-add-bar input::placeholder { color: rgba(255,255,255,0.35); }
        .quick-add-hint {
            margin-top: 10px;
            font-size: 11px;
            color: rgba(255,255,255,0.35);
            text-align: center;
        }
        .quick-add-hint kbd {
            background: rgba(255,255,255,0.1);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
        }

        /* Edit modal */
        .edit-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(6, 5, 10, 0.85);
            backdrop-filter: blur(8px);
            z-index: 200;
            justify-content: center;
            align-items: center;
        }
        .edit-modal.visible { display: flex; }
        .edit-panel {
            background: rgba(16, 14, 22, 0.98);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            width: 90%;
            max-width: 480px;
            padding: 28px 32px;
            position: relative;
        }
        .edit-panel h3 {
            margin: 0 0 20px 0;
            font-size: 18px;
            color: #fff;
        }
        .edit-close {
            position: absolute;
            top: 16px;
            right: 20px;
            background: none;
            border: none;
            color: rgba(255,255,255,0.4);
            font-size: 24px;
            cursor: pointer;
        }
        .edit-close:hover { color: rgba(255,255,255,0.8); }
        .edit-form { display: flex; flex-direction: column; gap: 16px; }
        .edit-row {
            display: flex;
            gap: 12px;
        }
        .edit-row .form-group { flex: 1; }
        .edit-type-select {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .edit-type-btn {
            padding: 8px 14px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            color: rgba(255,255,255,0.6);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .edit-type-btn:hover { background: rgba(255,255,255,0.08); }
        .edit-type-btn.selected { border-color: rgba(255,220,200,0.4); color: #fff; }
        .edit-status-select {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .edit-status-btn {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.08);
            background: transparent;
            color: rgba(255,255,255,0.5);
            font-size: 11px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .edit-status-btn:hover { border-color: rgba(255,255,255,0.2); }
        .edit-status-btn.selected { border-color: rgba(255,220,200,0.4); color: #fff; }
        .edit-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        .edit-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.08);
        }
        .edit-delete-btn {
            padding: 10px 16px;
            border-radius: 8px;
            border: 1px solid rgba(255,100,100,0.3);
            background: transparent;
            color: rgba(255,100,100,0.7);
            font-size: 13px;
            cursor: pointer;
        }
        .edit-delete-btn:hover { background: rgba(255,100,100,0.1); color: #ff6b6b; }
        .edit-save-btn {
            padding: 10px 24px;
            border-radius: 8px;
            border: 1px solid rgba(255,220,200,0.3);
            background: rgba(255,220,200,0.15);
            color: #fff;
            font-size: 13px;
            cursor: pointer;
        }
        .edit-save-btn:hover { background: rgba(255,220,200,0.25); }

        /* Form */
        .form-group label {
            display: block;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .form-group input {
            width: 100%;
            padding: 12px 16px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 14px;
            outline: none;
        }
        .form-group input:focus { border-color: rgba(255, 220, 200, 0.4); }
        .form-group input::placeholder { color: rgba(255,255,255,0.25); }

        /* Connection picker */
        .connection-picker {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-height: 120px;
            overflow-y: auto;
            padding: 4px;
        }
        .connection-chip {
            padding: 6px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            transition: all 0.2s;
        }
        .connection-chip:hover { background: rgba(255,255,255,0.1); }
        .connection-chip.selected {
            background: rgba(136, 200, 255, 0.15);
            border-color: rgba(136, 200, 255, 0.3);
            color: #fff;
        }

        /* ===== MOBILE ===== */
        @media (max-width: 768px) {
            /* Top bar: title centered, search below */
            .top-bar {
                top: 10px;
                flex-direction: column;
                gap: 6px;
            }
            .title {
                font-size: 11px;
                letter-spacing: 2px;
            }
            .search-box {
                padding: 6px 12px;
            }
            .search-box input {
                width: 140px;
                font-size: 13px;
            }

            /* Legend: hide dots on mobile, keep user menu top-right */
            .legend {
                top: unset !important;
                right: unset !important;
                bottom: 14px !important;
                left: 14px !important;
                gap: 4px;
                font-size: 10px;
                flex-wrap: wrap;
                max-width: calc(100vw - 80px);
            }
            .legend-item {
                padding: 3px 5px;
                gap: 3px;
                white-space: nowrap;
                flex-shrink: 0;
            }
            .legend-dot { width: 6px; height: 6px; }

            /* User menu: pull to top right on mobile */
            .user-menu-wrapper {
                position: fixed !important;
                top: 12px !important;
                right: 12px !important;
                bottom: unset !important;
                left: unset !important;
                margin-left: 0;
                z-index: 31;
            }

            /* HUD + hint: hide on mobile */
            .hud { display: none; }
            .hint { display: none; }
            .view-switcher { bottom: 70px; }

            /* FABs: tighter on mobile */
            .fab {
                right: 12px;
                width: 40px;
                height: 40px;
                border-radius: 12px;
                font-size: 16px;
            }
            .fab-board { bottom: 124px; }
            .fab-chat { bottom: 76px; }
            .fab-add { bottom: 24px; }

            /* Board: columns stack vertically on mobile */
            .board-columns {
                flex-direction: column;
                padding: 0 16px 16px;
                overflow-y: auto;
            }
            .board-column {
                max-width: none;
                min-width: auto;
            }

            /* Chat sidebar: full width on mobile */
            .chat-sidebar {
                width: 100%;
            }

            /* Dropdown panels: full width */
            .dropdown-panel {
                right: 8px;
                left: 8px;
                max-width: none;
            }

            /* Quick add bar: full width, lower */
            .quick-add-bar {
                bottom: 60px;
                width: 94%;
            }

            /* Focus overlay: tighter */
            #focus-overlay { bottom: 80px; }
            #focus-overlay h2 { font-size: 20px; }
            #focus-overlay .context { font-size: 12px; }

            /* Focus actions: smaller buttons, wrap */
            #focus-actions {
                bottom: 40px;
                gap: 6px;
                flex-wrap: wrap;
                justify-content: center;
                max-width: 90vw;
            }
            #focus-actions button {
                padding: 8px 14px;
                font-size: 12px;
            }

            /* Panels: full width on mobile */
            #memory-panel {
                max-width: 90vw;
                padding: 20px 24px;
            }

            /* Edit modal: tighter padding */
            .edit-panel {
                padding: 20px 20px;
                max-width: 94vw;
            }
            .edit-row {
                flex-direction: column;
                gap: 12px;
            }

            /* Orb labels: slightly smaller */
            .orb-label {
                font-size: 9px;
            }
        }

        /* Extra small phones */
        @media (max-width: 380px) {
            .title { font-size: 10px; letter-spacing: 1.5px; }
            .search-box input { width: 120px; }
        }
