        *,
        *::before,
        *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ── THEME SYSTEM ── */
        :root,
        html[data-theme="dark"] {
            --gold: #c9a96e;
            --gold-lt: #e8d5b0;
            --gold-dim: #5c4424;
            --ink: #07070f;
            --ink2: #0e0e1a;
            --ink3: #141420;
            --ink4: #1a1a28;
            --text: #ede9e0;
            --muted: #8e8a82;
            --dim: #2a2825;
            --img: #8b7ff5;
            --vid: #2dd4a0;
            --code: #f5a442;
            --font-d: 'Cormorant Garamond', Georgia, serif;
            --font-b: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --ease: cubic-bezier(0.16, 1, 0.3, 1);
            --sidebar-w: 260px;
        }

        html[data-theme="light"] {
            --gold: #8a6c2f;
            --gold-lt: #c9a96e;
            --gold-dim: #d4c4a0;
            --ink: #f5f3ef;
            --ink2: #eae7e1;
            --ink3: #e0ddd6;
            --ink4: #d6d3cc;
            --text: #1a1a1a;
            --muted: #6b6b6b;
            --dim: #c8c5be;
        }

        html,
        body {
            height: 100%;
            height: 100dvh;
            width: 100%;
            max-width: 100vw;
            overflow: hidden;
            background: var(--ink);
            color: var(--text);
            font-family: var(--font-b);
            font-weight: 400;
            -webkit-font-smoothing: antialiased;
        }

        body {
            display: flex;
            flex-direction: row;
            position: fixed;
            inset: 0;
        }

        /* ── SIDEBAR ── */
        .sidebar {
            width: var(--sidebar-w);
            background: var(--ink2);
            border-right: 1px solid var(--dim);
            display: flex;
            flex-direction: column;
            transition: transform 0.3s var(--ease), margin-left 0.3s var(--ease);
            z-index: 100;
            flex-shrink: 0;
        }

        .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid var(--dim);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            font-family: var(--font-d);
            font-size: 20px;
            font-weight: 400;
            letter-spacing: .16em;
            text-transform: uppercase;
            color: var(--gold);
            text-decoration: none;
        }

        .logo em {
            font-style: italic;
            color: var(--text)
        }

        .new-chat-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(201, 169, 110, .12);
            color: var(--gold);
            border: 1px solid rgba(201, 169, 110, .25);
            border-radius: 8px;
            padding: 10px 14px;
            margin: 16px;
            cursor: pointer;
            font-family: var(--font-b);
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s;
            justify-content: center;
        }

        .new-chat-btn:hover {
            background: rgba(201, 169, 110, .22);
            border-color: var(--gold);
        }

        .new-chat-btn svg {
            width: 16px;
            height: 16px;
        }

        .history-list {
            flex: 1;
            overflow-y: auto;
            padding: 0 10px;
        }

        .history-group {
            margin-bottom: 16px;
        }

        .history-label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--muted);
            margin: 0 8px 6px 8px;
        }

        .history-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            color: var(--text);
            font-size: 13px;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 2px;
        }

        .history-item:hover {
            background: var(--ink3);
        }

        .history-item.active {
            background: rgba(201, 169, 110, .12);
            color: var(--gold);
        }

        .history-title {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
        }

        .delete-chat {
            opacity: 0;
            background: none;
            border: none;
            color: #ff5555;
            cursor: pointer;
            padding: 2px;
            transition: opacity 0.2s;
        }

        .history-item:hover .delete-chat {
            opacity: 1;
        }

        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid var(--dim);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .user-info {
            font-size: 12px;
            color: var(--muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 150px;
        }

        .theme-toggle button {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: none;
            background: transparent;
            color: var(--muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all .3s;
        }

        .theme-toggle button:hover {
            color: var(--text)
        }

        /* ── MAIN CHAT AREA ── */
        .main-area {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            height: 100%;
            height: 100dvh;
            min-width: 0;
            position: relative;
            overflow: hidden;
            background: var(--ink);
        }

        .mobile-header {
            display: none;
            height: 52px;
            padding: 0 16px;
            border-bottom: 1px solid var(--dim);
            background: var(--ink2);
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
            z-index: 90;
        }

        .hamburger {
            background: none;
            border: none;
            color: var(--gold);
            cursor: pointer;
            font-size: 20px;
            padding: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mobile-new-btn {
            background: transparent;
            border: 1px solid rgba(201, 169, 110, 0.3);
            color: var(--gold);
            cursor: pointer;
            padding: 5px 10px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            border-radius: 8px;
            font-size: 12px;
            font-family: var(--font-b);
            font-weight: 500;
        }

        .chat-wrapper {
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            padding: 24px 16px 16px 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            scroll-behavior: smooth;
            min-height: 0;
            width: 100%;
        }

        .chat-container {
            width: 100%;
            max-width: 860px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-width: 0;
            margin: 0 auto;
        }

        /* ── CUSTOM DARK LUXURY SCROLLBAR ── */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.14);
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(201, 169, 110, 0.45);
        }
        * {
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
        }

        .welcome-screen {
            text-align: center;
            margin: auto auto 24px auto;
            padding: 20px 20px 0 20px;
            max-width: 720px;
        }

        .welcome-screen h1 {
            font-family: var(--font-d);
            font-weight: 400;
            font-size: 34px;
            color: var(--text);
            margin-bottom: 10px;
            line-height: 1.2;
        }

        .welcome-screen p {
            color: var(--muted);
            font-size: 14.5px;
            margin-bottom: 24px;
        }

        .starter-chips {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
        }

        .starter-chip {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text);
            padding: 9px 16px;
            border-radius: 24px;
            font-size: 12.5px;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.25s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            backdrop-filter: blur(10px);
        }

        .starter-chip:hover {
            background: rgba(201, 169, 110, 0.12);
            border-color: var(--gold);
            color: var(--gold);
            transform: translateY(-2px);
            box-shadow: 0 4px 14px rgba(201, 169, 110, 0.15);
        }

        .msg {
            display: flex;
            flex-direction: column;
            width: 100%;
            min-width: 0;
            animation: fadeInMsg 0.22s ease-out;
        }

        @keyframes fadeInMsg {
            from {
                opacity: 0;
                transform: translateY(6px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        .msg.user {
            align-self: flex-end;
            align-items: flex-end;
        }

        .msg.ai {
            align-self: flex-start;
            align-items: flex-start;
        }

        .msg-bubble {
            font-size: 15px;
            line-height: 1.6;
            word-break: break-word;
            overflow-wrap: anywhere;
            min-width: 0;
        }

        .msg.user .msg-bubble {
            background: linear-gradient(135deg, rgba(201, 169, 110, 0.2), rgba(201, 169, 110, 0.08));
            border: 1px solid rgba(201, 169, 110, 0.32);
            color: #fff;
            border-radius: 18px 18px 4px 18px;
            padding: 12px 18px;
            max-width: 82%;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        }

        .msg.ai .msg-bubble {
            background: transparent;
            color: var(--text);
            width: 100%;
            max-width: 100%;
            padding: 0 4px;
            line-height: 1.68;
        }

        .routing-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            background: rgba(201, 169, 110, .1);
            color: var(--gold);
            padding: 4px 10px;
            border-radius: 12px;
            border: 1px solid rgba(201, 169, 110, .2);
            margin-bottom: 8px;
            font-family: var(--font-b);
        }

        .routing-badge svg {
            width: 12px;
            height: 12px;
        }

        .thinking-block {
            font-size: 13px;
            color: var(--muted);
            border-left: 2px solid var(--gold);
            padding: 8px 12px;
            margin-bottom: 12px;
            font-style: italic;
            background: rgba(201, 169, 110, 0.04);
            border-radius: 0 6px 6px 0;
        }

        /* ── IMAGE GRID ── */
        @keyframes imgReveal {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(6px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .ai-img-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 14px;
            border-radius: 12px;
            overflow: hidden;
        }

        .ai-img-grid.single {
            grid-template-columns: 1fr;
        }

        .ai-img-grid.triple {
            grid-template-columns: 2fr 1fr;
        }

        .ai-img-grid img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            cursor: pointer;
            display: block;
            transition: transform 0.3s ease, filter 0.3s ease;
            animation: imgReveal 0.45s ease both;
            filter: brightness(0.92);
        }

        .ai-img-grid img:hover {
            transform: scale(1.02);
            filter: brightness(1.05);
        }

        .ai-img-grid.single img {
            height: 280px;
            border-radius: 12px;
        }

        .ai-img-grid img.hero {
            height: 100%;
            grid-row: 1 / 3;
        }

        .ai-img-inline {
            display: block;
            width: auto;
            max-width: 100%;
            max-height: 420px;
            object-fit: contain;
            border-radius: 10px;
            margin: 12px 0;
            cursor: pointer;
            animation: imgReveal 0.4s ease both;
            transition: transform 0.3s ease;
        }

        .ai-img-inline:hover {
            transform: scale(1.01);
        }

        /* Markdown styling inside AI bubble */
        .msg.ai .msg-bubble p {
            margin-bottom: 12px;
        }

        .msg.ai .msg-bubble p:last-child {
            margin-bottom: 0;
        }

        .msg.ai .msg-bubble h1,
        .msg.ai .msg-bubble h2,
        .msg.ai .msg-bubble h3,
        .msg.ai .msg-bubble h4 {
            color: var(--gold-lt);
            font-family: var(--font-b);
            font-weight: 600;
            margin: 16px 0 8px 0;
            line-height: 1.35;
        }

        .msg.ai .msg-bubble h1 {
            font-size: 1.35em;
        }

        .msg.ai .msg-bubble h2 {
            font-size: 1.2em;
        }

        .msg.ai .msg-bubble h3 {
            font-size: 1.08em;
        }

        .msg.ai .msg-bubble ul,
        .msg.ai .msg-bubble ol {
            padding-left: 22px;
            margin-bottom: 12px;
        }

        .msg.ai .msg-bubble li {
            margin-bottom: 4px;
        }

        .msg.ai .msg-bubble a {
            color: var(--gold);
            text-decoration: underline;
            text-underline-offset: 3px;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .msg.ai .msg-bubble a:hover {
            color: var(--gold-lt);
        }

        .msg.ai .msg-bubble blockquote {
            border-left: 3px solid var(--gold);
            background: rgba(201, 169, 110, 0.06);
            padding: 8px 14px;
            margin: 10px 0;
            border-radius: 0 8px 8px 0;
            color: var(--muted);
        }

        .msg.ai .msg-bubble table {
            width: 100%;
            border-collapse: collapse;
            margin: 14px 0;
            font-size: 13.5px;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--dim);
        }

        .msg.ai .msg-bubble th {
            background: var(--ink3);
            color: var(--gold);
            font-weight: 500;
            padding: 8px 12px;
            text-align: left;
            border-bottom: 1px solid var(--dim);
        }

        .msg.ai .msg-bubble td {
            padding: 8px 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .msg.ai .msg-bubble pre {
            background: #10101c;
            padding: 14px 16px;
            border-radius: 8px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin: 10px 0;
            border: 1px solid var(--dim);
            font-family: monospace;
            font-size: 13px;
            max-width: 100%;
            line-height: 1.5;
        }

        .msg.ai .msg-bubble code {
            background: rgba(201, 169, 110, 0.12);
            padding: 2px 6px;
            border-radius: 4px;
            color: var(--code);
            font-family: monospace;
            font-size: 13px;
            word-break: break-word;
        }

        .msg.ai .msg-bubble pre code {
            background: transparent;
            padding: 0;
            white-space: pre;
            word-break: normal;
            overflow-wrap: normal;
        }

        /* Code block container — must never overflow its parent */
        .code-block-container {
            margin: 12px 0;
            background: #0d0d18;
            border: 1px solid rgba(201, 169, 110, 0.18);
            border-radius: 10px;
            overflow: hidden;
            width: 100%;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
        }

        .code-block-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 14px;
            background: rgba(255, 255, 255, 0.03);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            color: var(--muted);
            font-size: 11px;
            font-family: monospace;
        }

        .copy-code-btn {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #ddd;
            cursor: pointer;
            border-radius: 4px;
            padding: 3px 8px;
            font-size: 11px;
            transition: all 0.2s;
        }

        .copy-code-btn:hover {
            background: rgba(201, 169, 110, 0.15);
            border-color: var(--gold);
            color: var(--gold);
        }

        .msg-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            align-self: flex-start;
        }

        .copy-msg-btn,
        .tts-speak-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--muted);
            border-radius: 14px;
            cursor: pointer;
            font-size: 11px;
            font-family: var(--font-b);
            transition: all 0.2s;
            user-select: none;
        }

        .copy-msg-btn:hover,
        .tts-speak-btn:hover {
            color: var(--gold);
            border-color: rgba(201, 169, 110, 0.3);
            background: rgba(201, 169, 110, 0.08);
        }

        .tts-speak-btn.playing {
            color: #2dd4a0;
            border-color: rgba(45, 212, 160, 0.4);
            background: rgba(45, 212, 160, 0.1);
        }

        .tts-spinner {
            width: 10px;
            height: 10px;
            border: 2px solid rgba(201, 169, 110, 0.25);
            border-top-color: var(--gold, #c9a96e);
            border-radius: 50%;
            animation: ttsSpin 0.7s linear infinite;
            display: inline-block;
        }

        @keyframes ttsSpin {
            to { transform: rotate(360deg); }
        }

        .typing-indicator {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 0;
            color: var(--gold);
            font-size: 13px;
        }

        .dot {
            width: 6px;
            height: 6px;
            background: var(--gold);
            border-radius: 50%;
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .dot:nth-child(1) {
            animation-delay: -0.32s;
        }

        .dot:nth-child(2) {
            animation-delay: -0.16s;
        }

        @keyframes bounce {

            0%,
            80%,
            100% {
                transform: scale(0);
            }

            40% {
                transform: scale(1);
            }
        }

        /* ── INPUT AREA ── */
        .input-container {
            flex-shrink: 0;
            width: 100%;
            background: linear-gradient(to top, var(--ink) 92%, rgba(7, 7, 15, 0.7) 60%, transparent);
            padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)) 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 20;
        }

        .input-box {
            width: 100%;
            max-width: 860px;
            background: #13131b;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 18px;
            padding: 12px 14px 10px 14px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(16px);
            transition: border-color 0.25s, box-shadow 0.25s;
        }

        .input-box:focus-within {
            border-color: rgba(201, 169, 110, 0.45);
            box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 169, 110, 0.2);
        }

        .chat-input-row {
            width: 100%;
            display: flex;
        }

        textarea {
            width: 100%;
            background: transparent;
            border: none;
            color: var(--text);
            font-family: var(--font-b);
            font-size: 15px;
            resize: none;
            outline: none;
            min-height: 24px;
            max-height: 160px;
            line-height: 1.5;
            padding: 2px 0;
        }

        textarea::placeholder {
            color: #6b7280;
        }

        /* ── CLEAN BOTTOM ACTION ROW ── */
        .input-action-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding-top: 4px;
        }

        .input-action-left {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            position: relative;
        }

        .tool-add-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #9ca3af;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .tool-add-btn:hover, .tool-add-btn.active {
            background: rgba(201, 169, 110, 0.2);
            border-color: var(--gold);
            color: var(--gold);
            transform: rotate(45deg);
        }

        .tool-popover-menu {
            display: none;
            position: absolute;
            bottom: 38px;
            left: 0;
            width: 250px;
            background: #14141e;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 6px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
            z-index: 250;
            backdrop-filter: blur(20px);
            animation: toolPopoverFade 0.15s ease;
        }

        .tool-popover-menu.open {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        @keyframes toolPopoverFade {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .tool-popover-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border-radius: 9px;
            cursor: pointer;
            transition: background 0.15s;
            color: #e4e4e7;
            text-decoration: none;
        }

        .tool-popover-item:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .tool-popover-item.active {
            background: rgba(201, 169, 110, 0.15);
            color: var(--gold);
        }

        .tool-popover-icon {
            font-size: 15px;
            flex-shrink: 0;
        }

        .tool-popover-title {
            font-size: 12px;
            font-weight: 500;
            color: #f4f4f5;
        }

        .tool-popover-desc {
            font-size: 10.5px;
            color: #71717a;
            margin-top: 1px;
        }

        /* ── CLAUDE-STYLE SEGMENTED MODE PILL ── */
        .segmented-mode-pill {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
        }

        .segmented-opt {
            background: transparent;
            border: none;
            color: #8e8e99;
            font-family: inherit;
            font-size: 11.5px;
            font-weight: 500;
            padding: 3px 9px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .segmented-opt:hover {
            color: #fff;
        }

        .segmented-opt.active {
            background: rgba(255, 255, 255, 0.14);
            color: #ffffff;
            font-weight: 600;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
        }

        /* ── UNIVERSAL FILE ATTACHMENT CHIPS ── */
        .file-attachment-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            margin-bottom: 6px;
        }

        .file-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 4px 8px;
            font-size: 11.5px;
            color: #e4e4e7;
            max-width: 220px;
            animation: chipFadeIn 0.15s ease;
        }

        @keyframes chipFadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }

        .file-chip-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 130px;
        }

        .file-chip-size {
            font-size: 10px;
            color: #71717a;
        }

        .file-chip-remove {
            background: transparent;
            border: none;
            color: #9ca3af;
            font-size: 13px;
            cursor: pointer;
            padding: 0;
            margin-left: 2px;
            line-height: 1;
        }

        .file-chip-remove:hover {
            color: #ef4444;
        }

        .file-chip-img-preview {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            object-fit: cover;
        }

        .model-picker-wrapper {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .model-picker-passive {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            color: #8e8e99;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: color 0.15s, background 0.15s;
            user-select: none;
        }

        .model-picker-passive:hover {
            color: #f3f3ee;
            background: rgba(255, 255, 255, 0.06);
        }

        .model-sub-badge {
            font-size: 10px;
            color: #60606b;
        }

        .model-dropdown-menu {
            display: none;
            position: absolute;
            bottom: 36px;
            right: 0;
            width: 220px;
            background: #14141c;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            padding: 6px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(20px);
            z-index: 300;
            animation: modelFadeIn 0.15s ease;
        }

        .model-dropdown-menu.open {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        @keyframes modelFadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .model-dropdown-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.15s ease;
            color: #d4d4d8;
        }

        .model-dropdown-item:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .model-dropdown-item.active {
            background: rgba(201, 169, 110, 0.14);
            color: var(--gold);
        }

        .model-dropdown-title {
            font-size: 12px;
            font-weight: 500;
        }

        .model-dropdown-desc {
            font-size: 10px;
            color: #71717a;
            margin-top: 1px;
        }

        .model-dropdown-item.active .model-dropdown-desc {
            color: rgba(201, 169, 110, 0.7);
        }

        .model-dropdown-check {
            font-size: 12px;
            color: var(--gold);
            font-weight: bold;
        }

        .claude-hero-title,
        .luxur-hero-title {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            font-family: 'Cormorant Garamond', Georgia, serif;
            font-size: 36px;
            font-weight: 400;
            color: var(--text, #f3f3ee);
            margin-bottom: 20px;
            letter-spacing: -0.01em;
        }

        .claude-starburst,
        .luxur-starburst {
            color: var(--gold, #c9a96e);
            font-size: 30px;
            line-height: 1;
            filter: drop-shadow(0 0 10px rgba(201, 169, 110, 0.45));
            display: inline-block;
            animation: luxurSparkle 3s ease-in-out infinite alternate;
        }

        @keyframes luxurSparkle {
            0% { transform: scale(0.95); filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.3)); }
            100% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(201, 169, 110, 0.75)); }
        }

        .model-selector-quiet select {
            background: transparent;
            border: none;
            color: inherit;
            font-family: inherit;
            font-size: 11.5px;
            font-weight: 500;
            outline: none;
            cursor: pointer;
            padding: 0;
            margin: 0;
        }

        .model-selector-quiet select option {
            background: #181822;
            color: #fff;
        }

        .send-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            background: var(--gold);
            color: #07070f;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
            box-shadow: 0 2px 10px rgba(201, 169, 110, 0.3);
        }

        .send-btn:hover {
            background: var(--gold-lt);
            transform: scale(1.04);
        }

        .send-btn:disabled {
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.2);
            box-shadow: none;
            cursor: not-allowed;
            transform: none;
        }

        .send-btn svg {
            width: 14px;
            height: 14px;
        }

        /* ── SPEECH-TO-TEXT (STT) MICROPHONE BUTTON ── */
        .stt-mic-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 1px solid rgba(201, 169, 110, 0.28);
            background: rgba(201, 169, 110, 0.08);
            color: var(--gold);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            flex-shrink: 0;
            position: relative;
        }

        .stt-mic-btn:hover {
            background: rgba(201, 169, 110, 0.18);
            border-color: var(--gold);
            transform: scale(1.05);
        }

        .stt-mic-btn svg {
            width: 15px;
            height: 15px;
            transition: transform 0.2s;
        }

        .stt-mic-btn.recording {
            background: #ef4444 !important;
            border-color: #f87171 !important;
            color: #ffffff !important;
            animation: sttPulse 1.1s infinite alternate ease-in-out;
        }

        .stt-mic-btn.recording svg {
            transform: scale(1.1);
        }

        @keyframes sttPulse {
            0% {
                box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
                transform: scale(1.0);
            }
            100% {
                box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
                transform: scale(1.08);
            }
        }

        .pricing-note {
            font-size: 10px;
            color: var(--muted);
            text-align: center;
            margin-top: 6px;
            letter-spacing: 0.04em;
            opacity: 0.75;
        }

        /* ── QUOTA INDICATOR & ACTIONS RIGHT ── */
        .input-action-right {
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            min-width: 0;
            flex-shrink: 0;
        }

        #quotaBtn {
            position: relative;
            width: 14px;
            height: 14px;
            border-radius: 3px;
            background: #10b981;
            border: none;
            cursor: pointer;
            padding: 0;
            flex-shrink: 0;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
        }

        #quotaBtn::before {
            content: '';
            position: absolute;
            inset: -6px;
            cursor: pointer;
        }

        #quotaBtn:hover {
            transform: scale(1.25);
            box-shadow: 0 0 10px rgba(16, 185, 129, 1);
        }

        #quotaBtn.quota-ok {
            background: #10b981;
            box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
        }

        #quotaBtn.quota-warn {
            background: #ecc94b;
            box-shadow: 0 0 6px rgba(236, 201, 75, 0.7);
        }

        #quotaBtn.quota-over {
            background: #e53e3e;
            box-shadow: 0 0 6px rgba(229, 62, 62, 0.9);
        }

        #quotaPopup {
            display: none;
            position: absolute;
            bottom: calc(100% + 12px);
            right: 0;
            width: 300px;
            background: #14141c;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 16px;
            z-index: 999;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(20px);
            font-family: var(--font-b);
            color: var(--text);
            animation: quotaFadeIn 0.18s ease;
        }

        #quotaPopup.active {
            display: block !important;
        }

        @keyframes quotaFadeIn {
            from {
                opacity: 0;
                transform: translateY(8px) scale(0.97);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .quota-header {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--muted);
            margin-bottom: 12px;
        }

        .quota-section {
            margin-bottom: 10px;
        }

        .quota-section-title {
            font-size: 11px;
            font-weight: 600;
            color: var(--gold);
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .quota-bar-row {
            margin-bottom: 4px;
        }

        .quota-bar-label {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            color: rgba(255, 255, 255, 0.45);
            margin-bottom: 2px;
        }

        .quota-bar-track {
            height: 4px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 99px;
            overflow: hidden;
        }

        .quota-bar-fill {
            height: 100%;
            border-radius: 99px;
            transition: width 0.4s ease;
            background: #48bb78;
        }

        .quota-bar-fill.warn {
            background: #ecc94b;
        }

        .quota-bar-fill.over {
            background: #e53e3e;
        }

        .quota-reset {
            font-size: 9px;
            color: rgba(255, 255, 255, 0.25);
            margin-top: 2px;
            text-align: right;
        }

        .quota-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.06);
            margin: 10px 0;
        }

        .quota-toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 2px;
        }

        .quota-toggle-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.3;
            flex: 1;
        }

        .quota-toggle-label small {
            display: block;
            color: rgba(255, 255, 255, 0.3);
            font-size: 9.5px;
            margin-top: 1px;
        }

        .qt-switch {
            position: relative;
            width: 36px;
            height: 20px;
            flex-shrink: 0;
            margin-left: 10px;
        }

        .qt-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .qt-slider {
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.12);
            border-radius: 99px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .qt-slider:before {
            content: "";
            position: absolute;
            width: 14px;
            height: 14px;
            left: 3px;
            top: 3px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.2s;
        }

        .qt-switch input:checked+.qt-slider {
            background: #e53e3e;
        }

        .qt-switch input:checked+.qt-slider:before {
            transform: translateX(16px);
        }

        /* ── STOCK CARD ── */
        .stock-card {
            background: rgba(30, 30, 30, 0.6);
            border: 1px solid rgba(201, 169, 110, 0.2);
            border-radius: 16px;
            padding: 16px;
            margin: 12px 0;
            max-width: 320px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            color: var(--text);
            font-family: var(--font-b);
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .stock-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .stock-ticker {
            font-size: 18px;
            font-weight: 600;
            color: var(--gold);
        }

        .stock-name {
            font-size: 12px;
            color: var(--muted);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 180px;
        }

        .stock-source {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.2);
            background: rgba(0, 0, 0, 0.3);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .stock-price-row {
            display: flex;
            align-items: baseline;
            gap: 8px;
        }

        .stock-price {
            font-size: 28px;
            font-weight: 300;
            font-family: var(--font-d);
        }

        .stock-change {
            font-size: 14px;
            font-weight: 500;
            padding: 2px 6px;
            border-radius: 4px;
        }

        .stock-change.positive {
            color: #4ade80;
            background: rgba(74, 222, 128, 0.1);
        }

        .stock-change.negative {
            color: #f87171;
            background: rgba(248, 113, 113, 0.1);
        }

        .stock-chart-container {
            margin-top: 8px;
            height: 60px;
            width: 100%;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .stock-chart {
            width: 100%;
            height: 100%;
            overflow: visible;
        }

        .stock-chart path {
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .stock-chart path.positive {
            stroke: #4ade80;
            filter: drop-shadow(0 2px 4px rgba(74, 222, 128, 0.3));
        }

        .stock-chart path.negative {
            stroke: #f87171;
            filter: drop-shadow(0 2px 4px rgba(248, 113, 113, 0.3));
        }

        html[data-theme="light"] .stock-card {
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
        }

        html[data-theme="light"] .stock-source {
            color: rgba(0, 0, 0, 0.5);
            background: rgba(0, 0, 0, 0.05);
        }

        html[data-theme="light"] .stock-chart-container {
            border-top: 1px solid rgba(0, 0, 0, 0.05);
        }

        html[data-theme="light"] .stock-change.positive {
            color: #16a34a;
            background: rgba(22, 163, 74, 0.1);
        }

        html[data-theme="light"] .stock-change.negative {
            color: #dc2626;
            background: rgba(220, 38, 38, 0.1);
        }

        html[data-theme="light"] .stock-chart path.positive {
            stroke: #16a34a;
            filter: drop-shadow(0 2px 4px rgba(22, 163, 74, 0.3));
        }

        html[data-theme="light"] .stock-chart path.negative {
            stroke: #dc2626;
            filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.3));
        }

        /* ── OVERLAYS ── */
        #auth-overlay {
            position: fixed;
            inset: 0;
            background: var(--ink);
            z-index: 1000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
        }

        #auth-overlay h2 {
            font-family: var(--font-d);
            font-size: 32px;
            font-weight: 300;
            margin-bottom: 12px;
            color: var(--gold);
        }

        #auth-overlay p {
            color: var(--muted);
            margin-bottom: 24px;
        }

        .auth-btn {
            background: var(--gold);
            color: var(--ink);
            padding: 12px 24px;
            text-decoration: none;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .1em;
            border-radius: 2px;
        }

        #img-gen-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(7, 7, 15, 0.85);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(6px);
        }

        .modal-box {
            background: var(--ink2);
            border: 1px solid var(--gold);
            padding: 24px;
            border-radius: 12px;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        .modal-title {
            color: var(--gold);
            margin-top: 0;
            font-family: var(--font-d);
            font-weight: 300;
            font-size: 24px;
        }

        #closeSidebar {
            display: none;
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 900;
            opacity: 0;
            transition: opacity 0.3s;
            backdrop-filter: blur(2px);
        }

        .sidebar-overlay.open {
            display: block;
            opacity: 1;
        }

        /* ── 3D VIEWERS ── */
        .viewer-card {
            position: relative;
            width: 100%;
            height: 400px;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(201, 169, 110, 0.15);
            background: radial-gradient(circle at center, #141428 0%, #07070f 100%);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            margin: 12px 0;
        }

        .viewer-canvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        .viewer-header {
            position: absolute;
            top: 12px;
            left: 12px;
            right: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            pointer-events: none;
            z-index: 10;
        }

        .viewer-title {
            background: rgba(7, 7, 15, 0.8);
            border: 1px solid rgba(201, 169, 110, 0.25);
            border-radius: 20px;
            padding: 4px 12px;
            display: flex;
            align-items: center;
            gap: 6px;
            backdrop-filter: blur(8px);
        }

        .viewer-title-text {
            font-size: 11px;
            font-weight: 600;
            color: #C9A96E;
            font-family: var(--font-b);
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .viewer-title-sub {
            font-size: 9px;
            color: rgba(255, 255, 255, 0.45);
            border-left: 1px solid rgba(255, 255, 255, 0.25);
            padding-left: 6px;
        }

        .viewer-controls {
            display: flex;
            gap: 6px;
            pointer-events: auto;
        }

        .viewer-controls button {
            background: rgba(7, 7, 15, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #ccc;
            border-radius: 6px;
            padding: 4px 8px;
            font-size: 11px;
            cursor: pointer;
            backdrop-filter: blur(8px);
            transition: all 0.2s;
            font-family: var(--font-b);
        }

        .viewer-controls button:hover {
            border-color: var(--gold);
            color: var(--gold);
        }

        .viewer-controls button.grid-btn {
            color: #C9A96E;
            border-color: rgba(201, 169, 110, 0.25);
        }

        .viewer-footer {
            position: absolute;
            bottom: 12px;
            left: 12px;
            right: 12px;
            pointer-events: none;
            z-index: 10;
            text-align: center;
        }

        .viewer-instructions {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.5);
            background: rgba(7, 7, 15, 0.65);
            padding: 4px 10px;
            border-radius: 12px;
            backdrop-filter: blur(4px);
            font-family: var(--font-b);
        }

        @media (max-width: 768px) {
            /* ════════════════════════════════════════════
       LUXURAI MOBILE UI — Ultra Clean & Fluid
    ════════════════════════════════════════════ */

            .mobile-header {
                display: flex;
                height: 52px;
                padding: 0 16px;
                background: var(--ink2);
                border-bottom: 1px solid var(--dim);
                align-items: center;
                justify-content: space-between;
                flex-shrink: 0;
                z-index: 90;
            }

            /* 1. Sidebar as sleek off-canvas drawer */
            .sidebar {
                position: fixed;
                inset: 0 auto 0 0;
                width: min(290px, 86vw);
                height: 100vh;
                height: 100dvh;
                transform: translateX(-100%);
                transition: transform 0.3s var(--ease);
                box-shadow: 4px 0 40px rgba(0, 0, 0, 0.8);
                z-index: 1000;
                left: auto;
            }

            .sidebar.open {
                transform: translateX(0);
            }

            #closeSidebar {
                display: block;
            }

            .delete-chat {
                opacity: 1 !important;
            }

            /* 2. Chat scroll area */
            .chat-wrapper {
                padding: 16px 12px 10px 12px;
                min-height: 0;
                width: 100%;
            }

            .chat-container {
                gap: 16px;
                max-width: 100%;
            }

            .chat-container::after {
                display: none;
            }

            /* 3. Message bubbles */
            .msg.user .msg-bubble {
                max-width: 86%;
                font-size: 14.5px;
                padding: 10px 15px;
                border-radius: 16px 16px 4px 16px;
            }

            .msg.ai .msg-bubble {
                padding: 0 2px;
                max-width: 100%;
                font-size: 14.5px;
                line-height: 1.62;
            }

            /* 4. Welcome screen */
            .welcome-screen {
                padding: 24px 12px;
            }

            .welcome-screen h1 {
                font-size: 24px;
                margin-bottom: 8px;
            }

            .welcome-screen p {
                font-size: 13.5px;
            }

            /* 5. Code blocks — clean horizontal scrolling code only */
            .msg.ai .msg-bubble pre {
                padding: 10px 12px;
                font-size: 12px;
                border-radius: 6px;
                max-width: 100%;
            }

            .msg.ai .msg-bubble code {
                font-size: 12px;
            }

            /* 6. Input Area */
            .input-container {
                padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
            }

            .input-box {
                border-radius: 16px;
                padding: 8px 10px;
                gap: 6px;
                max-width: 100%;
            }

            .input-toggles {
                gap: 5px;
            }

            .toggle-pill {
                padding: 4px 9px;
                font-size: 11px;
            }

            .textarea-wrapper {
                gap: 8px;
            }

            textarea {
                font-size: 16px;
                /* prevent iOS zoom */
                min-height: 22px;
                max-height: 110px;
            }

            .send-btn,
            .stt-mic-btn {
                width: 34px;
                height: 34px;
            }

            .pricing-note {
                font-size: 9px;
                margin-top: 4px;
            }

            /* 7. Stock card & Media */
            .stock-card {
                max-width: 100%;
                width: 100%;
                padding: 12px;
            }

            .ai-img-grid {
                grid-template-columns: 1fr !important;
            }

            .ai-img-grid img {
                height: 200px !important;
            }

            .ai-img-grid img.hero {
                grid-row: auto !important;
            }

            .ai-img-inline {
                max-height: 280px;
            }

            /* 8. 3D Viewer & Textbook */
            .tb-form-grid {
                grid-template-columns: 1fr !important;
            }

            .textbook-ask-card {
                padding: 12px;
            }

            .viewer-card {
                height: 260px !important;
            }

            .viewer-title-sub {
                display: none !important;
            }

            .viewer-header {
                top: 8px !important;
                left: 8px !important;
                right: 8px !important;
            }

            .viewer-controls button {
                padding: 4px 6px !important;
                font-size: 10px !important;
            }

            details textarea.code-editor {
                height: 160px;
                font-size: 10px !important;
            }

            iframe {
                max-width: 100% !important;
            }
        }

        @media (max-width: 380px) {
            .toggle-pill {
                font-size: 10px;
                padding: 4px 7px;
            }

            .msg.user .msg-bubble {
                font-size: 13.5px;
                padding: 9px 12px;
            }

            .welcome-screen h1 {
                font-size: 20px;
            }

            .send-btn,
            .stt-mic-btn {
                width: 32px;
                height: 32px;
            }
        }


        /* Three-Body Orbital Loader */
        .lux-three-body {
            --lux-uib-size: 35px;
            --lux-uib-speed: 0.8s;
            --lux-uib-color: #c9a96e;
            /* Using the gold accent instead of purple */
            position: relative;
            display: inline-block;
            height: var(--lux-uib-size);
            width: var(--lux-uib-size);
            animation: luxThreeBodySpin calc(var(--lux-uib-speed) * 2.5) infinite linear;
        }

        .lux-three-body-dot {
            position: absolute;
            height: 100%;
            width: 30%;
        }

        .lux-three-body-dot:after {
            content: '';
            position: absolute;
            height: 0%;
            width: 100%;
            padding-bottom: 100%;
            background-color: var(--lux-uib-color);
            border-radius: 50%;
        }

        .lux-three-body-dot:nth-child(1) {
            bottom: 5%;
            left: 0;
            transform: rotate(60deg);
            transform-origin: 50% 85%;
        }

        .lux-three-body-dot:nth-child(1)::after {
            bottom: 0;
            left: 0;
            animation: luxWobble1 var(--lux-uib-speed) infinite ease-in-out;
            animation-delay: calc(var(--lux-uib-speed) * -0.3);
        }

        .lux-three-body-dot:nth-child(2) {
            bottom: 5%;
            right: 0;
            transform: rotate(-60deg);
            transform-origin: 50% 85%;
        }

        .lux-three-body-dot:nth-child(2)::after {
            bottom: 0;
            left: 0;
            animation: luxWobble1 var(--lux-uib-speed) infinite calc(var(--lux-uib-speed) * -0.15) ease-in-out;
        }

        .lux-three-body-dot:nth-child(3) {
            bottom: -5%;
            left: 0;
            transform: translateX(116.666%);
        }

        .lux-three-body-dot:nth-child(3)::after {
            top: 0;
            left: 0;
            animation: luxWobble2 var(--lux-uib-speed) infinite ease-in-out;
        }

        @keyframes luxThreeBodySpin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes luxWobble1 {

            0%,
            100% {
                transform: translateY(0%) scale(1);
                opacity: 1;
            }

            50% {
                transform: translateY(-66%) scale(0.65);
                opacity: 0.8;
            }
        }

        @keyframes luxWobble2 {

            0%,
            100% {
                transform: translateY(0%) scale(1);
                opacity: 1;
            }

            50% {
                transform: translateY(66%) scale(0.65);
                opacity: 0.8;
            }
        }

        /* ── KaTeX Math Styling ─────────────────────────────────── */
        .math-display {
            display: block;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 10px 0;
            text-align: center;
        }

        .math-inline {
            display: inline;
        }

        .katex-display {
            overflow-x: auto;
            overflow-y: hidden;
            padding: 4px 0;
        }

        .katex {
            font-size: 1.05em;
        }

        /* Light mode KaTeX */
        body.light-mode .katex {
            color: #1a1a1a;
        }

        /* ── Textbook Page Explainer ──────────────────────────────── */
        .textbook-ask-card {
            background: linear-gradient(135deg, rgba(30, 20, 60, 0.95), rgba(15, 10, 40, 0.98));
            border: 1px solid rgba(139, 92, 246, 0.4);
            border-radius: 16px;
            padding: 20px 24px;
            margin: 12px 0;
            box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
            animation: slideUp 0.3s ease;
        }

        .textbook-ask-card h3 {
            margin: 0 0 4px;
            font-size: 15px;
            color: #a78bfa;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .textbook-ask-card p {
            margin: 0 0 16px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.5);
        }

        .tb-form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 14px;
        }

        .tb-field {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .tb-field label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            font-weight: 500;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .tb-field input,
        .tb-field select {
            background: rgba(255, 255, 255, 0.07);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 8px;
            color: #fff;
            padding: 8px 10px;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s;
        }

        .tb-field input:focus,
        .tb-field select:focus {
            border-color: #a78bfa;
            background: rgba(139, 92, 246, 0.1);
        }

        .tb-field select option {
            background: #1a0a3a;
        }

        .tb-submit-btn {
            width: 100%;
            padding: 10px;
            background: linear-gradient(135deg, #7c3aed, #a78bfa);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.15s, opacity 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .tb-submit-btn:hover {
            transform: translateY(-1px);
            opacity: 0.92;
        }

        .tb-submit-btn:active {
            transform: translateY(0);
        }

        .textbook-page-viewer {
            margin: 12px 0;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(139, 92, 246, 0.3);
            background: #0f0a1e;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }

        .tb-page-header {
            background: linear-gradient(90deg, rgba(124, 58, 237, 0.3), rgba(167, 139, 250, 0.15));
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(139, 92, 246, 0.2);
        }

        .tb-page-header span {
            font-size: 12px;
            color: #a78bfa;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .tb-page-canvas-wrap {
            position: relative;
            display: block;
        }

        .tb-page-canvas-wrap img {
            width: 100%;
            display: block;
            border-radius: 0 0 12px 12px;
        }

        .tb-highlight-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            border-radius: 0 0 12px 12px;
        }

        .textbook-explanation {
            margin: 8px 0;
            padding: 16px 20px;
            background: linear-gradient(135deg, rgba(20, 10, 50, 0.6), rgba(10, 5, 30, 0.8));
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 12px;
            border-left: 3px solid #7c3aed;
            font-size: 14px;
            line-height: 1.7;
        }

        /* ── DEEPTHINK & SANDBOX PROCESS STYLING ── */
        .ai-thought-process {
            margin-bottom: 15px;
        }

        .ai-thought-process summary {
            cursor: pointer;
            color: var(--gold);
            font-weight: 500;
            user-select: none;
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: var(--font-b);
        }

        .ai-thought-process summary::-webkit-details-marker {
            color: var(--gold);
        }

        .thought-content,
        .sandbox-content {
            padding: 12px;
            margin-top: 8px;
            background: var(--ink3);
            border-radius: 8px;
            font-size: 0.9em;
            border: 1px solid var(--dim);
            color: var(--muted);
            line-height: 1.5;
        }

        .sandbox-content {
            font-family: monospace;
            white-space: pre-wrap;
        }

        .sandbox-content pre {
            background: var(--ink) !important;
            border: 1px solid var(--dim) !important;
            padding: 8px !important;
            border-radius: 4px;
            margin-top: 4px;
            overflow-x: auto;
        }

        .sandbox-content code {
            color: var(--code) !important;
        }

        /* ── LUXURMANIM 3BLUE1BROWN INTERACTIVE MATH PLAYER ── */
        .manim-player-card {
            margin: 16px 0;
            background: #0e1117;
            border: 1px solid rgba(88, 196, 221, 0.25);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(88, 196, 221, 0.08);
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 720px;
            font-family: 'DM Sans', system-ui, sans-serif;
            position: relative;
        }

        .manim-header {
            background: #151922;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .manim-title-box {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .manim-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            border-radius: 6px;
            background: rgba(88, 196, 221, 0.15);
            color: #58C4DD;
            font-size: 13px;
            font-weight: 700;
        }

        .manim-title {
            font-size: 13px;
            font-weight: 600;
            color: #ECEED9;
            letter-spacing: 0.2px;
        }

        .manim-badge {
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 2px 7px;
            border-radius: 4px;
            background: rgba(201, 169, 110, 0.15);
            color: #c9a96e;
            border: 1px solid rgba(201, 169, 110, 0.3);
        }

        .manim-canvas-wrapper {
            position: relative;
            width: 100%;
            height: 340px;
            background: #0e1117;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: crosshair;
        }

        .manim-canvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        .manim-formula-overlay {
            position: absolute;
            top: 10px;
            left: 12px;
            background: rgba(14, 17, 23, 0.88);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 6px;
            padding: 6px 12px;
            color: #ECEED9;
            font-size: 13px;
            pointer-events: none;
            box-shadow: 0 4px 14px rgba(0,0,0,0.5);
            max-width: 85%;
            z-index: 10;
        }

        .manim-formula-overlay .katex {
            color: #58C4DD;
        }

        .manim-controls {
            background: #151922;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            padding: 8px 14px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .manim-btn {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #ECEED9;
            border-radius: 6px;
            padding: 5px 10px;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s ease;
        }

        .manim-btn:hover {
            background: rgba(88, 196, 221, 0.2);
            border-color: #58C4DD;
            color: #58C4DD;
        }

        .manim-scrub-slider {
            flex: 1;
            -webkit-appearance: none;
            appearance: none;
            height: 5px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 3px;
            outline: none;
            cursor: pointer;
        }

        .manim-scrub-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 14px;
            height: 14px;
            border-radius: 5px;
            background: #58C4DD;
            box-shadow: 0 0 8px #58C4DD;
            cursor: pointer;
        }

        .manim-time-label {
            font-size: 11px;
            font-family: 'Fira Code', monospace;
            color: rgba(236, 238, 217, 0.6);
            min-width: 36px;
            text-align: right;
        }

        .manim-params-tray {
            background: #11151d;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            padding: 8px 14px;
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
        }

        .manim-param-item {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 11px;
        }

        .manim-param-label {
            color: #ECEED9;
            font-weight: 500;
            white-space: nowrap;
        }

        .manim-param-label b {
            color: #58C4DD;
            font-family: 'Fira Code', monospace;
        }

        .manim-param-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 75px;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
        }

        .manim-param-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #c9a96e;
            box-shadow: 0 0 6px #c9a96e;
            cursor: pointer;
        }

        /* ── CLAUDE-STYLE ARTIFACT CARD STYLING ── */
        .claude-artifact-card {
            margin: 14px 0;
            background: #18181f;
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
            transition: border-color 0.2s, box-shadow 0.2s;
            font-family: var(--font-b);
        }

        .claude-artifact-card:hover {
            border-color: rgba(201, 169, 110, 0.35);
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
        }

        .artifact-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.025);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            gap: 12px;
            flex-wrap: nowrap;
            min-width: 0;
        }

        .artifact-card-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            cursor: pointer;
            flex: 1 1 auto;
            overflow: hidden;
        }

        .artifact-icon-box {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
            color: var(--gold);
        }

        .artifact-info {
            min-width: 0;
            flex: 1 1 auto;
            overflow: hidden;
        }

        .artifact-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
        }

        .artifact-subtitle {
            font-size: 11px;
            color: var(--muted);
            margin-top: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
        }

        .artifact-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .artifact-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #d1d5db;
            font-size: 11.5px;
            font-weight: 500;
            padding: 5px 10px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s;
            font-family: inherit;
        }

        .artifact-btn:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            border-color: rgba(255, 255, 255, 0.2);
        }

        .artifact-btn.preview-btn {
            background: linear-gradient(135deg, rgba(201, 169, 110, 0.25) 0%, rgba(201, 169, 110, 0.1) 100%);
            border-color: rgba(201, 169, 110, 0.4);
            color: var(--gold);
        }

        .artifact-btn.preview-btn:hover {
            background: linear-gradient(135deg, rgba(201, 169, 110, 0.4) 0%, rgba(201, 169, 110, 0.2) 100%);
            border-color: var(--gold);
            color: #fff;
        }

        .artifact-inline-code {
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            background: #111117;
            max-height: 420px;
            overflow-y: auto;
        }

        .artifact-inline-code pre {
            margin: 0;
            padding: 12px 14px;
            font-family: 'Fira Code', Consolas, monospace;
            font-size: 12.5px;
            line-height: 1.6;
            color: #d8d8e0;
        }

        /* ── CLAUDE ACTION TREE / TOOL CHAIN STYLING ── */
        .claude-action-tree {
            margin: 12px 0 16px 0;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            padding: 10px 14px;
            font-size: 12.5px;
        }

        .claude-action-tree-header {
            font-weight: 500;
            color: var(--muted);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .action-tree-list {
            position: relative;
            padding-left: 18px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .action-tree-list::before {
            content: '';
            position: absolute;
            left: 5px;
            top: 4px;
            bottom: 6px;
            width: 1.5px;
            background: rgba(255, 255, 255, 0.12);
        }

        .action-tree-item {
            position: relative;
            display: flex;
            align-items: center;
            gap: 8px;
            color: #bbb;
            font-size: 12px;
        }

        .action-tree-item::before {
            content: '';
            position: absolute;
            left: -18px;
            top: 50%;
            width: 10px;
            height: 1.5px;
            background: rgba(255, 255, 255, 0.12);
        }

        .action-tree-icon {
            font-size: 12px;
            opacity: 0.8;
        }

        .action-tree-diff {
            font-family: monospace;
            font-size: 11px;
            margin-left: auto;
            display: inline-flex;
            gap: 4px;
        }

        .action-tree-diff .diff-add { color: #4ade80; }
        .action-tree-diff .diff-del { color: #f87171; }

        /* ── DEEP SEARCH MULTI-ANGLE VISUALIZER ── */
        .deep-search-card {
            margin: 10px 0 14px 0;
            background: linear-gradient(135deg, rgba(20, 20, 35, 0.8) 0%, rgba(13, 13, 24, 0.9) 100%);
            border: 1px solid rgba(212, 175, 55, 0.28);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.06);
            border-radius: 12px;
            padding: 10px 14px;
            font-size: 13px;
            backdrop-filter: blur(12px);
            transition: all 0.25s ease;
        }

        .deep-search-card summary {
            list-style: none;
            outline: none;
        }

        .deep-search-card summary::-webkit-details-marker {
            display: none;
        }

        .deep-search-header {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
            font-weight: 600;
            color: #f1f5f9;
        }

        .deep-search-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            background: rgba(212, 175, 55, 0.12);
            border: 1px solid rgba(212, 175, 55, 0.3);
            color: #fbbf24;
            border-radius: 9999px;
            font-size: 11px;
            font-weight: 500;
        }

        .deep-search-status-pulsing {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            color: #38bdf8;
            margin-left: auto;
        }

        .deep-search-status-pulsing::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #38bdf8;
            animation: ds-pulse 1.4s infinite;
        }

        .deep-search-status-done {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            color: #4ade80;
            margin-left: auto;
            opacity: 0.85;
        }

        @keyframes ds-pulse {
            0% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
            70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
            100% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
        }

        .deep-search-queries {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 8px 0 10px 0;
        }

        .deep-search-query-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            font-size: 11.5px;
            color: #cbd5e1;
        }

        .deep-search-sources-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 8px;
            margin-top: 8px;
        }

        .deep-search-source-card {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 8px;
            text-decoration: none;
            color: inherit;
            transition: all 0.2s ease;
            overflow: hidden;
        }

        .deep-search-source-card:hover {
            background: rgba(212, 175, 55, 0.09);
            border-color: rgba(212, 175, 55, 0.35);
            transform: translateY(-1px);
        }

        .ds-favicon {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            flex-shrink: 0;
        }

        .ds-source-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
            flex: 1;
        }

        .ds-domain {
            font-size: 10px;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-weight: 600;
        }

        .ds-title {
            font-size: 11.5px;
            color: #f1f5f9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 500;
        }

        /* ── CLAUDE SPLIT-VIEW ARTIFACTS WORKSPACE ── */
        .main-workspace-layout {
            flex: 1 1 auto;
            display: flex;
            width: 100%;
            height: 100%;
            min-height: 0;
            position: relative;
            overflow: hidden;
        }

        .chat-column {
            flex: 1 1 100%;
            display: flex;
            flex-direction: column;
            height: 100%;
            min-width: 0;
            transition: flex 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }

        .main-workspace-layout.artifact-open .chat-column {
            flex: 1 1 50%;
            max-width: 50%;
        }

        .artifact-workspace-panel {
            width: 0;
            max-width: 0;
            flex: 0 0 0;
            display: flex;
            flex-direction: column;
            height: 100%;
            background: #0c0c14;
            border-left: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            z-index: 80;
        }

        .main-workspace-layout.artifact-open .artifact-workspace-panel {
            width: 50%;
            max-width: 50%;
            flex: 1 1 50%;
            opacity: 1;
            pointer-events: auto;
        }

        .main-workspace-layout.artifact-open.artifact-fullscreen .chat-column {
            display: none;
        }

        .main-workspace-layout.artifact-open.artifact-fullscreen .artifact-workspace-panel {
            width: 100%;
            max-width: 100%;
            flex: 1 1 100%;
        }

        /* Side Panel Header */
        .artifact-side-header {
            height: 50px;
            padding: 0 12px;
            background: #11111a;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-shrink: 0;
        }

        .artifact-side-title-box {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            flex: 0 1 auto;
        }

        .artifact-side-icon {
            font-size: 15px;
            flex-shrink: 0;
        }

        .artifact-side-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .artifact-side-title {
            font-size: 12.5px;
            font-weight: 600;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 150px;
        }

        .artifact-side-subtitle {
            font-size: 10.5px;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 150px;
        }

        .artifact-side-tabs {
            display: flex;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 7px;
            padding: 2px;
            gap: 2px;
            flex-shrink: 0;
        }

        .artifact-side-tab {
            background: transparent;
            border: none;
            color: var(--muted);
            font-size: 11.5px;
            font-family: inherit;
            padding: 4px 10px;
            border-radius: 5px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
        }

        .artifact-side-tab.active {
            background: rgba(201, 169, 110, 0.2);
            color: var(--gold);
            font-weight: 500;
        }

        .artifact-side-actions {
            display: flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
        }

        .artifact-side-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text);
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-family: inherit;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
        }

        .artifact-side-btn:hover {
            background: rgba(201, 169, 110, 0.18);
            border-color: var(--gold);
            color: var(--gold);
        }

        .artifact-side-btn.close-btn:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
            color: #ef4444;
        }

        .artifact-download-all-btn {
            margin-top: 10px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: var(--text);
            padding: 7px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-family: inherit;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }

        .artifact-download-all-btn:hover {
            background: rgba(201, 169, 110, 0.2);
            border-color: var(--gold);
            color: var(--gold);
            transform: translateY(-1px);
        }

        /* Side Panel Body */
        .artifact-side-body {
            flex: 1 1 auto;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background: #09090f;
        }

        .artifact-side-iframe {
            width: 100%;
            height: 100%;
            border: none;
            background: #ffffff;
        }

        .artifact-side-code-container {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: #09090f;
        }

        .artifact-code-topbar {
            height: 36px;
            padding: 0 16px;
            background: #11111a;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .code-lang-label {
            font-size: 11.5px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--gold);
            font-weight: 600;
        }

        .code-copy-btn {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--muted);
            border-radius: 5px;
            padding: 3px 8px;
            font-size: 11px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
        }

        .code-copy-btn:hover {
            color: #fff;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .artifact-side-code-scroll {
            flex: 1 1 auto;
            overflow: auto;
            padding: 20px;
        }

        .artifact-code-pre {
            margin: 0;
            font-family: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
            font-size: 12.5px;
            line-height: 1.6;
            color: #e2e8f0;
            white-space: pre-wrap;
            word-break: break-word;
        }

        @media (max-width: 960px) {
            .main-workspace-layout.artifact-open .chat-column {
                display: none;
            }
            .main-workspace-layout.artifact-open .artifact-workspace-panel {
                width: 100%;
                max-width: 100%;
                flex: 1 1 100%;
                position: absolute;
                top: 0;
                left: 0;
            }
        }

        .artifact-modal-body {
            flex: 1;
            position: relative;
            background: #0d0d12;
            overflow: hidden;
            display: flex;
        }

        .artifact-iframe-view {
            width: 100%;
            height: 100%;
            border: none;
            background: #ffffff;
        }

        .artifact-code-view {
            width: 100%;
            height: 100%;
            padding: 16px;
            overflow: auto;
            margin: 0;
            background: #0d0d12;
            font-family: 'Fira Code', Consolas, monospace;
            font-size: 13px;
            line-height: 1.6;
            color: #d1d5db;
        }

        /* ── CLAUDE-STYLE IN-BROWSER TERMINAL EXECUTION WIDGET ── */
        .terminal-cmd-wrapper {
            margin: 12px 0 16px 0;
            width: 100%;
            max-width: 100%;
            font-family: var(--font-b);
        }

        .terminal-cmd-header {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 7px;
            font-size: 13px;
            font-weight: 500;
            color: var(--muted);
            letter-spacing: 0.01em;
        }

        .terminal-status-tag {
            color: #9a968e;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .terminal-status-running {
            color: var(--gold);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .terminal-status-running::before {
            content: "";
            display: inline-block;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--gold);
            animation: pulseTerminalDot 1.1s infinite ease-in-out;
        }

        @keyframes pulseTerminalDot {
            0%, 100% { opacity: 0.4; transform: scale(0.85); }
            50% { opacity: 1; transform: scale(1.2); }
        }

        .terminal-cmd-card {
            background: #0d0d17;
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 10px;
            overflow: hidden;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .terminal-cmd-card:hover {
            border-color: rgba(201, 169, 110, 0.35);
        }

        .terminal-cmd-bar {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.02);
            cursor: pointer;
            user-select: none;
            transition: background 0.2s;
        }

        .terminal-cmd-bar:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .terminal-icon-box {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.06);
            color: var(--gold);
            flex-shrink: 0;
        }

        .terminal-cmd-title {
            font-size: 13.5px;
            color: var(--text);
            font-weight: 500;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .terminal-cmd-chevron {
            color: var(--muted);
            transition: transform 0.25s ease;
            display: inline-flex;
            align-items: center;
        }

        .terminal-cmd-card.expanded .terminal-cmd-chevron {
            transform: rotate(180deg);
        }

        .terminal-cmd-drawer {
            display: none;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            background: #080811;
        }

        .terminal-cmd-card.expanded .terminal-cmd-drawer {
            display: block;
        }

        .terminal-pane {
            padding: 10px 14px;
        }

        .terminal-pane-code {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            background: #090913;
        }

        .terminal-pane-output {
            background: #06060c;
        }

        .terminal-pane-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 6px;
        }

        .terminal-lang-badge {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--muted);
        }

        .terminal-output-label {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--gold);
        }

        .terminal-copy-btn {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--muted);
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .terminal-copy-btn:hover {
            color: var(--text);
            border-color: var(--gold);
        }

        .terminal-code-body,
        .terminal-output-body {
            margin: 0;
            padding: 0;
            font-family: 'Fira Code', 'SFMono-Regular', Consolas, Menlo, monospace !important;
            font-size: 12.5px;
            line-height: 1.6;
            white-space: pre-wrap;
            word-break: break-all;
            overflow-x: auto;
            color: #d6d3cd;
        }

        .terminal-output-body {
            color: #ece8df;
            font-weight: 400;
        }

        /* ── SLEEK CUSTOM SCROLLBARS ── */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(201, 169, 110, 0.25);
            border-radius: 3px;
            transition: background 0.2s;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(201, 169, 110, 0.45);
        }

        /* For Firefox */
        * {
            scrollbar-width: thin;
            scrollbar-color: rgba(201, 169, 110, 0.25) transparent;
        }

        /* ── COLLAPSIBLE DESKTOP SIDEBAR ── */
        @media (min-width: 769px) {
            .sidebar.closed {
                transform: translateX(-100%);
                margin-left: calc(-1 * var(--sidebar-w));
                border-right: none;
            }

            .chat-wrapper {
                padding: 50px 80px 0 80px;
            }
        }

        /* ── FLEXIBLE DESKTOP/LAPTOP WIDTHS & SCALING ── */
        @media (min-width: 1024px) {

            .chat-container,
            .input-box {
                max-width: 1050px;
            }

            .viewer-card {
                height: 520px;
            }

            .ai-img-grid img {
                height: 350px !important;
            }

            .ai-img-grid.single img {
                height: 500px !important;
            }
        }

        @media (min-width: 1440px) {

            .chat-container,
            .input-box {
                max-width: 1350px;
            }

            .viewer-card {
                height: 580px;
            }

            .ai-img-grid img {
                height: 420px !important;
            }

            .ai-img-grid.single img {
                height: 600px !important;
            }
        }

        /* ── UIVERSE ANIMATED SIDEBAR TOGGLE BUTTON ── */
        #desktopSidebarCheckbox {
            display: none;
        }

        .sidebar-toggle-container {
            position: absolute;
            top: 16px;
            left: 24px;
            z-index: 95;
        }

        .toggle {
            position: relative;
            width: 40px;
            height: 40px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition-duration: .3s;
            background: rgba(14, 14, 26, 0.7);
            backdrop-filter: blur(8px);
            border: 1px solid var(--dim);
            border-radius: 8px;
            padding: 6px;
        }

        .toggle:hover {
            border-color: var(--gold);
            background: rgba(20, 20, 36, 0.9);
        }

        .bars {
            width: 22px;
            height: 2px;
            background-color: var(--text);
            border-radius: 5px;
            transition-duration: .3s;
        }

        #desktopSidebarCheckbox:checked+.toggle #bar2 {
            transform: translateY(8px) rotate(45deg);
            margin-left: 0;
            transform-origin: right;
            transition-duration: .3s;
            z-index: 2;
        }

        #desktopSidebarCheckbox:checked+.toggle #bar1 {
            transform: translateY(16px) rotate(-45deg);
            transition-duration: .3s;
            transform-origin: left;
            z-index: 1;
        }

        #desktopSidebarCheckbox:checked+.toggle #bar3 {
            opacity: 0;
            transform: scale(0);
            transition-duration: .3s;
        }

        #desktopSidebarCheckbox:checked+.toggle {
            transform: rotate(-90deg);
        }

        @media (max-width: 768px) {
            .sidebar-toggle-container {
                display: none !important;
            }
        }

        .thinking-block {
            font-size: 13.5px;
            color: var(--dim);
            background: rgba(255, 255, 255, 0.04);
            border-left: 2px solid var(--gold);
            padding: 10px 14px;
            margin-bottom: 12px;
            border-radius: 0 6px 6px 0;
            font-style: italic;
            line-height: 1.5;
        }

        /* ── LUXURAI VOICE STUDIO MODAL ─────────────────────────────────────── */
        /* ── LUXURAI VOICE STUDIO MODAL (Mobile + Laptop + Light/Dark Mode) ── */
        
        /* ══════════════════════════════════════════════════════════════════════ */
        /*  CLAUDE-STYLE CONNECTORS & MCP MARKETPLACE STYLES                      */
        /* ══════════════════════════════════════════════════════════════════════ */
        .claude-connectors-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.78);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: claudeFadeIn 0.2s ease-out;
        }
        @keyframes claudeFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .claude-connectors-modal {
            width: 100%;
            max-width: 980px;
            height: 86vh;
            max-height: 800px;
            background: #14161b;
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 20px;
            box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            color: #f1f5f9;
            animation: claudeSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes claudeSlideUp {
            from { transform: translateY(16px) scale(0.98); opacity: 0; }
            to { transform: translateY(0) scale(1); opacity: 1; }
        }

        /* ── Top Header ─────────────────────────────────────────── */
        .claude-mcp-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 24px 14px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            background: #16181f;
        }
        .claude-mcp-header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .claude-mcp-title {
            font-size: 20px;
            font-weight: 600;
            color: #ffffff;
            margin: 0;
            letter-spacing: -0.01em;
        }
        .claude-mcp-pill-toggle {
            display: inline-flex;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            padding: 3px;
            gap: 2px;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        .claude-pill-btn {
            background: transparent;
            border: none;
            color: #94a3b8;
            font-size: 13px;
            font-weight: 500;
            padding: 5px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .claude-pill-btn:hover {
            color: #ffffff;
        }
        .claude-pill-btn.active {
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }
        .claude-pill-count {
            font-size: 12px;
            background: rgba(255, 255, 255, 0.15);
            padding: 1px 6px;
            border-radius: 10px;
            color: #e2e8f0;
        }

        .claude-mcp-header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .claude-mcp-search-wrap {
            position: relative;
            display: flex;
            align-items: center;
        }
        .claude-search-icon {
            position: absolute;
            left: 12px;
            color: #64748b;
            pointer-events: none;
        }
        .claude-mcp-search-wrap input {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 9px;
            padding: 7px 12px 7px 34px;
            font-size: 13px;
            color: #ffffff;
            width: 190px;
            transition: all 0.2s ease;
        }
        .claude-mcp-search-wrap input:focus {
            outline: none;
            border-color: #3b82f6;
            background: rgba(255, 255, 255, 0.08);
            width: 230px;
        }
        .claude-add-btn {
            background: #ffffff;
            color: #0f172a;
            border: none;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s ease;
        }
        .claude-add-btn:hover {
            background: #e2e8f0;
            transform: translateY(-1px);
        }
        .claude-mcp-close-btn {
            background: transparent;
            border: none;
            color: #94a3b8;
            font-size: 22px;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
            transition: color 0.15s ease;
        }
        .claude-mcp-close-btn:hover {
            color: #ffffff;
        }

        /* ── Subbar ─────────────────────────────────────────────── */
        .claude-mcp-subbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 24px 12px 24px;
        }
        .claude-mcp-subbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .claude-mcp-section-title {
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
        }
        .claude-mcp-badge-pill {
            font-size: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            padding: 2px 7px;
            border-radius: 12px;
            font-weight: 500;
        }
        .claude-mcp-showall-link {
            font-size: 12px;
            color: #94a3b8;
            cursor: pointer;
            transition: color 0.15s ease;
        }
        .claude-mcp-showall-link:hover {
            color: #60a5fa;
        }

        /* ── Body & Grid ────────────────────────────────────────── */
        .claude-mcp-content {
            flex: 1;
            overflow-y: auto;
            padding: 0 24px 24px 24px;
        }
        .claude-connectors-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        @media (max-width: 768px) {
            .claude-connectors-grid {
                grid-template-columns: 1fr;
            }
            .claude-mcp-search-wrap input {
                width: 130px;
            }
            .claude-mcp-search-wrap input:focus {
                width: 150px;
            }
        }

        .claude-connector-card {
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 14px;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            gap: 14px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        .claude-connector-card:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.16);
            transform: translateY(-1px);
        }
        .claude-connector-icon {
            width: 44px;
            height: 44px;
            border-radius: 11px;
            background: #1e212b;
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            overflow: hidden;
        }
        .claude-connector-info {
            flex: 1;
            min-width: 0;
        }
        .claude-connector-title-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 3px;
        }
        .claude-connector-name {
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .claude-verified-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #94a3b8;
        }
        .claude-connector-desc {
            font-size: 12px;
            color: #94a3b8;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 4px;
        }
        .claude-connector-author {
            font-size: 12px;
            color: #64748b;
            font-weight: 500;
        }

        .claude-connector-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .claude-connector-btn:hover {
            background: #2563eb;
            border-color: #2563eb;
            color: #ffffff;
            transform: scale(1.08);
        }
        .claude-connected-pill {
            font-size: 12px;
            font-weight: 600;
            color: #10b981;
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.25);
            padding: 3px 8px;
            border-radius: 12px;
            white-space: nowrap;
        }

        /* ── Custom MCP Drawer ──────────────────────────────────── */
        .claude-mcp-drawer {
            background: #181b24;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 18px 24px;
            animation: drawerSlideDown 0.2s ease-out;
        }
        @keyframes drawerSlideDown {
            from { max-height: 0; opacity: 0; }
            to { max-height: 400px; opacity: 1; }
        }
        .claude-drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 14px;
        }
        .claude-drawer-title {
            font-size: 15px;
            font-weight: 600;
            color: #fff;
        }
        .claude-drawer-desc {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 2px;
        }
        .claude-drawer-close {
            background: transparent;
            border: none;
            color: #94a3b8;
            font-size: 20px;
            cursor: pointer;
        }
        .claude-form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 12px;
        }
        @media (max-width: 640px) {
            .claude-form-row { grid-template-columns: 1fr; }
        }
        .claude-form-group label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #cbd5e1;
            margin-bottom: 5px;
        }
        .claude-form-group input, .claude-form-group select, #mcpSseGroup input, #mcpStdioGroup input {
            width: 100%;
            padding: 8px 12px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
        }
        .claude-form-group input:focus, #mcpSseGroup input:focus, #mcpStdioGroup input:focus {
            outline: none;
            border-color: #3b82f6;
        }
        .claude-probe-btn {
            background: rgba(59, 130, 246, 0.15);
            border: 1px solid #3b82f6;
            color: #60a5fa;
            border-radius: 8px;
            padding: 0 14px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.15s ease;
        }
        .claude-probe-btn:hover {
            background: #2563eb;
            color: #fff;
        }
        .claude-probe-hint {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 6px;
        }
        .claude-drawer-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 14px;
        }
        .claude-drawer-cancel {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: #94a3b8;
            border-radius: 8px;
            padding: 7px 16px;
            font-size: 12px;
            cursor: pointer;
        }
        .claude-drawer-submit {
            background: #2563eb;
            border: none;
            color: #fff;
            border-radius: 8px;
            padding: 7px 18px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .claude-drawer-submit:hover {
            background: #1d4ed8;
        }

        
        
        /* ══════════════════════════════════════════════════════════════════════ */
        /*  OFFICIAL CLAUDE GITHUB INTEGRATION STYLES                             */
        /* ══════════════════════════════════════════════════════════════════════ */
        .claude-gh-modal-sheet {
            width: 100%;
            max-width: 620px;
            background: #14161b;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 18px;
            box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            color: #f1f5f9;
            animation: claudeSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .claude-gh-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px 16px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: #161821;
        }
        .claude-gh-header-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .claude-gh-icon-box {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background: #1f2330;
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .claude-gh-title {
            font-size: 19px;
            font-weight: 600;
            color: #ffffff;
            margin: 0;
            letter-spacing: -0.01em;
        }
        .claude-gh-author {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 2px;
            display: block;
        }
        .claude-gh-body {
            padding: 22px 24px;
            overflow-y: auto;
            max-height: 420px;
        }
        .claude-gh-intro {
            font-size: 13px;
            color: #cbd5e1;
            line-height: 1.5;
            margin: 0 0 16px 0;
        }
        .claude-gh-feature-list {
            margin: 0 0 22px 0;
            padding-left: 18px;
            color: #94a3b8;
            font-size: 13px;
            line-height: 1.6;
        }
        .claude-gh-feature-list li {
            margin-bottom: 6px;
        }
        .claude-gh-feature-list strong {
            color: #f1f5f9;
        }

        /* ── Card Connected State ── */
        .claude-gh-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 16px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }
        .claude-gh-card-left {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .claude-gh-check {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .claude-gh-uncheck {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .claude-gh-card-title {
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
        }
        .claude-gh-card-sub {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 3px;
        }
        .claude-gh-btn-disconnect {
            background: transparent;
            color: #f1f5f9;
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 8px;
            padding: 7px 16px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .claude-gh-btn-disconnect:hover {
            border-color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.06);
        }
        .claude-gh-btn-connect {
            background: #2563eb;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 8px 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .claude-gh-btn-connect:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
        }
        .claude-gh-btn-primary {
            background: #2563eb;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 8px 18px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .claude-gh-btn-primary:hover {
            background: #1d4ed8;
        }
        .claude-gh-input {
            width: 100%;
            padding: 9px 12px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 8px;
            color: #ffffff;
            font-size: 13px;
            outline: none;
        }
        .claude-gh-input:focus {
            border-color: #3b82f6;
        }
        .claude-gh-footer {
            padding: 16px 24px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: #161821;
            display: flex;
            justify-content: flex-end;
        }

        /* ── Claude Confirm Dialog ── */
        .claude-confirm-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.82);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 10006;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: claudeFadeIn 0.15s ease-out;
        }
        .claude-confirm-dialog {
            width: 100%;
            max-width: 440px;
            background: #1b1e28;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9);
            animation: claudeSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .claude-confirm-title {
            font-size: 17px;
            font-weight: 600;
            color: #ffffff;
            margin: 0 0 10px 0;
        }
        .claude-confirm-desc {
            font-size: 13px;
            color: #94a3b8;
            line-height: 1.5;
            margin: 0 0 22px 0;
        }
        .claude-confirm-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        .claude-confirm-btn-cancel {
            background: transparent;
            color: #cbd5e1;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .claude-confirm-btn-cancel:hover {
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
        }
        .claude-confirm-btn-danger {
            background: #dc2626;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 8px 18px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .claude-confirm-btn-danger:hover {
            background: #b91c1c;
        }

        /* ── Connector Detail Sheet (Claude-Style) ─────────────────── */
        .claude-detail-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.72);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 10001;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: claudeFadeIn 0.15s ease-out;
        }
        .claude-detail-sheet {
            width: 100%;
            max-width: 580px;
            background: #161821;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 18px;
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: claudeSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .claude-detail-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px 16px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: #181b26;
        }
        .claude-detail-header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .claude-detail-icon {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            background: #1f2330;
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .claude-detail-title {
            font-size: 18px;
            font-weight: 600;
            color: #ffffff;
            margin: 0;
        }
        .claude-detail-badge {
            font-size: 12px;
            background: rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            padding: 2px 8px;
            border-radius: 10px;
        }
        .claude-detail-desc {
            font-size: 13px;
            color: #94a3b8;
            margin-top: 4px;
            line-height: 1.4;
        }
        .claude-detail-body {
            padding: 20px 24px;
            overflow-y: auto;
            max-height: 360px;
        }
        .claude-detail-section-title {
            font-size: 13px;
            font-weight: 600;
            color: #cbd5e1;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .claude-caps-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .claude-cap-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 13px;
            color: #e2e8f0;
            line-height: 1.45;
        }
        .claude-cap-bullet {
            color: #3b82f6;
            margin-top: 2px;
            flex-shrink: 0;
        }
        .claude-detail-privacy-note {
            background: rgba(59, 130, 246, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.2);
            border-radius: 10px;
            padding: 12px 14px;
            font-size: 12px;
            color: #93c5fd;
            margin-top: 18px;
            line-height: 1.45;
        }
        .claude-detail-footer {
            padding: 16px 24px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: #181b26;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
        .claude-detail-cta {
            background: #2563eb;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            padding: 10px 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .claude-detail-cta:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
        }
        .claude-detail-disconnect {
            background: transparent;
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.35);
            border-radius: 8px;
            padding: 10px 18px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .claude-detail-disconnect:hover {
            background: rgba(239, 68, 68, 0.12);
        }
        .claude-connector-card {
            cursor: pointer;
        }

        /* ── Yours Connected List ────────────────────────────────── */
        .claude-yours-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .claude-yours-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 14px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .voice-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: voiceFadeIn 0.2s ease-out;
        }
        @keyframes voiceFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .voice-modal-box {
            width: 100%;
            max-width: 660px;
            background: var(--ink2, #0e0e1a);
            border: 1px solid rgba(201, 169, 110, 0.35);
            border-radius: 18px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 169, 110, 0.1);
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            overflow: hidden;
            animation: voiceSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes voiceSlideUp {
            from { transform: translateY(20px) scale(0.97); opacity: 0; }
            to { transform: translateY(0) scale(1); opacity: 1; }
        }
        .voice-modal-header {
            padding: 18px 22px 14px 22px;
            border-bottom: 1px solid rgba(128, 128, 128, 0.15);
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
        }
        .voice-modal-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--gold);
            background: rgba(201, 169, 110, 0.12);
            border: 1px solid rgba(201, 169, 110, 0.25);
            padding: 2px 8px;
            border-radius: 20px;
            margin-bottom: 6px;
        }
        .voice-modal-title {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
            font-family: var(--font-d, inherit);
            letter-spacing: 0.02em;
        }
        .voice-modal-sub {
            margin: 4px 0 0 0;
            font-size: 12px;
            color: var(--muted);
            line-height: 1.4;
        }
        .voice-modal-close {
            background: transparent;
            border: none;
            color: var(--muted);
            font-size: 22px;
            cursor: pointer;
            padding: 2px 8px;
            border-radius: 6px;
            line-height: 1;
            transition: all 0.2s;
        }
        .voice-modal-close:hover {
            color: var(--text);
            background: rgba(128, 128, 128, 0.15);
        }
        .voice-grid {
            padding: 16px 20px;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            overflow-y: auto;
            max-height: 52vh;
        }
        .voice-card {
            background: rgba(128, 128, 128, 0.06);
            border: 1px solid rgba(128, 128, 128, 0.14);
            border-radius: 12px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .voice-card:hover {
            background: rgba(201, 169, 110, 0.08);
            border-color: rgba(201, 169, 110, 0.4);
            transform: translateY(-1px);
        }
        .voice-card.selected {
            background: rgba(201, 169, 110, 0.15);
            border-color: var(--gold);
            box-shadow: 0 0 16px rgba(201, 169, 110, 0.2);
        }
        .voice-card-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex: 1;
        }
        .voice-avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: rgba(128, 128, 128, 0.1);
            border: 1px solid rgba(128, 128, 128, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gold);
            font-size: 13px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .voice-card.selected .voice-avatar {
            border-color: var(--gold);
            background: rgba(201, 169, 110, 0.25);
        }
        .voice-info {
            min-width: 0;
            flex: 1;
        }
        .voice-name-row {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .voice-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
        }
        .voice-pill {
            font-size: 9.5px;
            font-weight: 600;
            padding: 1px 5px;
            border-radius: 4px;
            background: rgba(128, 128, 128, 0.12);
            color: var(--muted);
            letter-spacing: 0.02em;
        }
        .voice-tagline {
            font-size: 11px;
            color: var(--muted);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .voice-preview-btn {
            background: rgba(201, 169, 110, 0.12);
            border: 1px solid rgba(201, 169, 110, 0.35);
            color: var(--gold);
            border-radius: 20px;
            padding: 5px 10px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            flex-shrink: 0;
            transition: all 0.2s ease;
        }
        .voice-preview-btn:hover {
            background: rgba(201, 169, 110, 0.22);
            border-color: var(--gold);
        }
        .voice-preview-btn.playing {
            background: var(--gold);
            color: #000;
            border-color: var(--gold);
        }
        .voice-bars {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            height: 10px;
        }
        .voice-bar {
            width: 2px;
            height: 100%;
            background: currentColor;
            border-radius: 1px;
            animation: soundWave 0.8s ease-in-out infinite alternate;
        }
        .voice-bar:nth-child(2) { animation-delay: 0.2s; height: 60%; }
        .voice-bar:nth-child(3) { animation-delay: 0.4s; height: 80%; }
        @keyframes soundWave {
            0% { transform: scaleY(0.3); }
            100% { transform: scaleY(1); }
        }
        .voice-modal-footer {
            padding: 14px 22px 18px 22px;
            border-top: 1px solid rgba(128, 128, 128, 0.15);
            background: var(--ink3, #141420);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }
        .voice-modal-note {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            font-size: 11px;
            color: var(--muted);
            max-width: 360px;
            line-height: 1.4;
        }
        .voice-modal-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-left: auto;
        }
        .voice-btn-cancel {
            background: transparent;
            border: 1px solid rgba(128, 128, 128, 0.25);
            color: var(--muted);
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        .voice-btn-cancel:hover {
            color: var(--text);
            background: rgba(128, 128, 128, 0.1);
        }
        .voice-btn-confirm {
            background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
            border: none;
            color: #000;
            border-radius: 8px;
            padding: 8px 20px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(201, 169, 110, 0.3);
            transition: all 0.2s ease;
        }
        .voice-btn-confirm:hover {
            filter: brightness(1.1);
            transform: translateY(-1px);
        }
        .voice-toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--ink2, #0e0e1a);
            border: 1px solid var(--gold);
            color: var(--gold);
            padding: 8px 18px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            z-index: 10001;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        /* ── LIGHT THEME (html[data-theme="light"]) ────────────────────────── */
        html[data-theme="light"] .voice-modal-overlay {
            background: rgba(0, 0, 0, 0.4);
        }
        html[data-theme="light"] .voice-modal-box {
            background: #ffffff;
            border-color: rgba(138, 108, 47, 0.35);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), 0 0 30px rgba(138, 108, 47, 0.1);
        }
        html[data-theme="light"] .voice-modal-header {
            border-bottom-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .voice-card {
            background: #f8f6f1;
            border-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .voice-card:hover {
            background: rgba(138, 108, 47, 0.08);
            border-color: rgba(138, 108, 47, 0.4);
        }
        html[data-theme="light"] .voice-card.selected {
            background: rgba(138, 108, 47, 0.12);
            border-color: var(--gold);
        }
        html[data-theme="light"] .voice-avatar {
            background: #eae5da;
            border-color: rgba(0, 0, 0, 0.1);
        }
        html[data-theme="light"] .voice-pill {
            background: #eae5da;
            color: #555;
        }
        html[data-theme="light"] .voice-modal-footer {
            background: #f4f1ea;
            border-top-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .voice-btn-cancel {
            border-color: rgba(0, 0, 0, 0.15);
            color: #444;
        }
        html[data-theme="light"] .voice-btn-confirm {
            color: #fff;
            background: linear-gradient(135deg, #8a6c2f 0%, #68501f 100%);
            box-shadow: 0 4px 14px rgba(138, 108, 47, 0.25);
        }
        html[data-theme="light"] .voice-preview-btn.playing {
            color: #fff;
        }
        html[data-theme="light"] .voice-toast {
            background: #ffffff;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
        }

        /* ── LIGHT THEME COMPLETE WORKSPACE OVERRIDES (html[data-theme="light"]) ── */
        html[data-theme="light"] .claude-hero-title,
        html[data-theme="light"] .luxur-hero-title {
            color: #1a1a1a !important;
        }
        html[data-theme="light"] .sidebar-toggle-container .toggle {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        html[data-theme="light"] .sidebar-toggle-container .toggle:hover {
            background: #ffffff;
            border-color: var(--gold);
        }
        html[data-theme="light"] .sidebar-toggle-container .bars {
            background-color: #1a1a1a;
        }
        html[data-theme="light"] .starter-chip {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.1);
            color: #2a2a2a;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        }
        html[data-theme="light"] .starter-chip:hover {
            background: rgba(138, 108, 47, 0.08);
            border-color: var(--gold);
            color: var(--gold);
            box-shadow: 0 4px 14px rgba(138, 108, 47, 0.15);
        }
        html[data-theme="light"] .input-container {
            background: linear-gradient(to top, var(--ink) 92%, rgba(245, 243, 239, 0.8) 60%, transparent);
        }
        html[data-theme="light"] .input-box {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
        }
        html[data-theme="light"] .input-box:focus-within {
            border-color: rgba(138, 108, 47, 0.5);
            box-shadow: 0 10px 36px rgba(138, 108, 47, 0.12), 0 0 0 1px rgba(138, 108, 47, 0.2);
        }
        html[data-theme="light"] textarea {
            color: #1a1a1a;
        }
        html[data-theme="light"] textarea::placeholder {
            color: #8e8a82;
        }
        html[data-theme="light"] .tool-add-btn {
            background: rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.1);
            color: #555555;
        }
        html[data-theme="light"] .tool-add-btn:hover,
        html[data-theme="light"] .tool-add-btn.active {
            background: rgba(138, 108, 47, 0.15);
            border-color: var(--gold);
            color: var(--gold);
        }
        html[data-theme="light"] .tool-popover-menu {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        }
        html[data-theme="light"] .tool-popover-item {
            color: #333333;
        }
        html[data-theme="light"] .tool-popover-item:hover {
            background: rgba(0, 0, 0, 0.05);
        }
        html[data-theme="light"] .tool-popover-title {
            color: #1a1a1a;
        }
        html[data-theme="light"] .tool-popover-desc {
            color: #777777;
        }
        html[data-theme="light"] .segmented-mode-pill {
            background: rgba(0, 0, 0, 0.05);
            border-color: rgba(0, 0, 0, 0.09);
        }
        html[data-theme="light"] .segmented-opt {
            color: #666666;
        }
        html[data-theme="light"] .segmented-opt:hover {
            color: #111111;
        }
        html[data-theme="light"] .segmented-opt.active {
            background: #ffffff;
            color: #1a1a1a;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
        }
        html[data-theme="light"] .file-chip {
            background: rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.1);
            color: #333333;
        }
        html[data-theme="light"] .file-chip-size {
            color: #777777;
        }
        html[data-theme="light"] .model-picker-passive {
            color: #555555;
        }
        html[data-theme="light"] .model-picker-passive:hover {
            color: #1a1a1a;
            background: rgba(0, 0, 0, 0.05);
        }
        html[data-theme="light"] .model-sub-badge {
            color: #888888;
        }
        html[data-theme="light"] .model-dropdown-menu {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
        }
        html[data-theme="light"] .model-dropdown-item {
            color: #333333;
        }
        html[data-theme="light"] .model-dropdown-item:hover {
            background: rgba(0, 0, 0, 0.05);
            color: #000000;
        }
        html[data-theme="light"] .model-dropdown-title {
            color: #1a1a1a;
        }
        html[data-theme="light"] .model-dropdown-desc {
            color: #777777;
        }
        html[data-theme="light"] #quotaPopup {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
            color: #1a1a1a;
        }
        html[data-theme="light"] .quota-header {
            color: #1a1a1a;
            border-bottom-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .quota-section-title {
            color: #333333;
        }
        html[data-theme="light"] .quota-bar-track {
            background: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .quota-divider {
            border-top-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .quota-footer {
            border-top-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .quota-footer-title {
            color: #1a1a1a;
        }
        html[data-theme="light"] .msg.user .msg-bubble {
            background: linear-gradient(135deg, rgba(138, 108, 47, 0.16), rgba(138, 108, 47, 0.06));
            border-color: rgba(138, 108, 47, 0.35);
            color: #1a1a1a;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
        }
        html[data-theme="light"] .msg.ai .msg-bubble {
            color: #1a1a1a;
        }
        html[data-theme="light"] .msg.ai .msg-bubble pre {
            background: #f8f6f1;
            border-color: rgba(0, 0, 0, 0.1);
            color: #1a1a1a;
        }
        html[data-theme="light"] .msg.ai .msg-bubble code {
            background: rgba(138, 108, 47, 0.12);
            color: #8a6c2f;
        }
        html[data-theme="light"] .msg.ai .msg-bubble pre code {
            background: transparent;
            color: #1a1a1a;
        }
        html[data-theme="light"] .copy-msg-btn,
        html[data-theme="light"] .tts-speak-btn {
            background: rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.1);
            color: #555555;
        }
        html[data-theme="light"] .copy-msg-btn:hover,
        html[data-theme="light"] .tts-speak-btn:hover {
            background: rgba(138, 108, 47, 0.1);
            border-color: var(--gold);
            color: var(--gold);
        }
        html[data-theme="light"] .send-btn:disabled {
            background: rgba(0, 0, 0, 0.06);
            color: rgba(0, 0, 0, 0.2);
        }
        html[data-theme="light"] .stt-mic-btn {
            border-color: rgba(184, 134, 11, 0.35);
            background: rgba(184, 134, 11, 0.08);
            color: #8b6b1b;
        }
        html[data-theme="light"] .stt-mic-btn:hover {
            background: rgba(184, 134, 11, 0.16);
            border-color: #b8860b;
        }
        html[data-theme="light"] .artifact-workspace-panel {
            background: #ffffff;
            border-left-color: rgba(0, 0, 0, 0.08);
            box-shadow: -10px 0 35px rgba(0, 0, 0, 0.06);
        }
        html[data-theme="light"] .artifact-side-header {
            background: #f8f6f1;
            border-bottom-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .artifact-side-title {
            color: #1a1a1a;
        }
        html[data-theme="light"] .artifact-side-tab {
            color: #666666;
        }
        html[data-theme="light"] .artifact-side-tab.active {
            background: #ffffff;
            color: #1a1a1a;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        html[data-theme="light"] .artifact-side-btn {
            border-color: rgba(0, 0, 0, 0.1);
            color: #555555;
        }
        html[data-theme="light"] .artifact-side-btn:hover {
            color: #1a1a1a;
            background: rgba(0, 0, 0, 0.05);
        }
        html[data-theme="light"] .artifact-side-body {
            background: #f8f6f1;
        }
        html[data-theme="light"] .artifact-side-code-container {
            background: #ffffff;
        }
        html[data-theme="light"] .artifact-code-topbar {
            background: #f8f6f1;
            border-bottom-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .code-copy-btn {
            border-color: rgba(0, 0, 0, 0.15);
            color: #555555;
        }
        html[data-theme="light"] .code-copy-btn:hover {
            color: #000000;
            background: rgba(0, 0, 0, 0.06);
            border-color: rgba(0, 0, 0, 0.3);
        }
        html[data-theme="light"] .artifact-code-pre {
            color: #1a1a1a;
        }
        html[data-theme="light"] .claude-artifact-card {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        }
        html[data-theme="light"] .claude-artifact-card:hover {
            border-color: rgba(138, 108, 47, 0.4);
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
        }
        html[data-theme="light"] .artifact-card-header {
            background: #f8f6f1;
            border-bottom-color: rgba(0, 0, 0, 0.08);
        }
        html[data-theme="light"] .artifact-icon-box {
            background: #eae5da;
            border-color: rgba(0, 0, 0, 0.1);
            color: var(--gold);
        }
        html[data-theme="light"] .artifact-title {
            color: #1a1a1a;
        }
        html[data-theme="light"] .artifact-subtitle {
            color: #666666;
        }
        html[data-theme="light"] .artifact-btn {
            background: #ffffff;
            border-color: rgba(0, 0, 0, 0.12);
            color: #333333;
        }
        html[data-theme="light"] .artifact-btn:hover {
            background: #f0ede6;
            color: #000000;
            border-color: rgba(0, 0, 0, 0.2);
        }
        html[data-theme="light"] .artifact-btn.preview-btn {
            background: rgba(138, 108, 47, 0.12);
            border-color: rgba(138, 108, 47, 0.35);
            color: var(--gold);
        }
        html[data-theme="light"] .artifact-btn.preview-btn:hover {
            background: rgba(138, 108, 47, 0.22);
            border-color: var(--gold);
            color: #000000;
        }

        /* ── RESPONSIVE MOBILE TWEAKS (<= 640px) ─────────────────────────────── */
        @media (max-width: 640px) {
            .voice-modal-box {
                max-height: 92vh;
                border-radius: 16px;
            }
            .voice-modal-header {
                padding: 14px 16px 10px 16px;
            }
            .voice-modal-title {
                font-size: 16px;
            }
            .voice-modal-sub {
                font-size: 11px;
            }
            .voice-grid {
                grid-template-columns: 1fr;
                gap: 8px;
                padding: 12px 14px;
                max-height: 48vh;
            }
            .voice-card {
                padding: 10px 12px;
            }
            .voice-avatar {
                width: 32px;
                height: 32px;
                font-size: 12px;
            }
            .voice-name {
                font-size: 12.5px;
            }
            .voice-tagline {
                font-size: 10.5px;
            }
            .voice-preview-btn {
                padding: 4px 8px;
                font-size: 10.5px;
            }
            .voice-modal-footer {
                padding: 12px 14px 14px 14px;
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            .voice-modal-note {
                max-width: 100%;
                font-size: 10.5px;
            }
            .voice-modal-actions {
                width: 100%;
                justify-content: space-between;
                margin-left: 0;
            }
            .voice-btn-cancel {
                padding: 8px 14px;
                font-size: 11.5px;
            }
            .voice-btn-confirm {
                flex: 1;
                text-align: center;
                padding: 8px 16px;
                font-size: 11.5px;
            }
        }


/* ── LUXUR VIDEO STUDIO ARTIFACT CARD & 60FPS PLAYER ── */
.lux-vid-studio-card {
    background: #090a10;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 14px;
    overflow: hidden;
    margin: 14px 0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.lux-vid-studio-card.aspect-16-9 {
    max-width: 680px;
}

.lux-vid-studio-card.aspect-9-16 {
    max-width: 380px;
}

.lux-vid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(15, 17, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

.lux-vid-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.lux-vid-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.lux-vid-title-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lux-vid-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lux-vid-btn-icon {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.lux-vid-btn-icon:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(212, 175, 55, 0.4);
}

.lux-vid-btn-record {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #050608;
    border: 1px solid #ffd700;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.lux-vid-btn-record:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.lux-vid-btn-record.recording {
    background: #ef4444;
    color: #fff;
    border-color: #f87171;
    animation: luxVidRecPulse 1.2s infinite;
}

@keyframes luxVidRecPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.lux-vid-scenes-track {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(10, 11, 17, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    scrollbar-width: thin;
}

.lux-vid-scene-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 3px 8px;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.lux-vid-scene-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.lux-vid-scene-pill.active {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.6);
    color: #fbbf24;
    font-weight: 600;
}

.lux-vid-scene-pill .sc-num {
    opacity: 0.6;
    font-size: 10px;
    font-family: monospace;
}

.lux-vid-stage {
    position: relative;
    width: 100%;
    background: #020306;
    overflow: hidden;
}

.aspect-16-9 .lux-vid-stage {
    aspect-ratio: 16 / 9;
}

.aspect-9-16 .lux-vid-stage {
    aspect-ratio: 9 / 16;
}

.lux-vid-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.lux-vid-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(15, 17, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lux-vid-play-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.lux-vid-play-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fbbf24;
}

.lux-vid-timeline-wrapper {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lux-vid-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #fbbf24);
    border-radius: 3px;
    transition: width 0.05s linear;
}

.lux-vid-time-display {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── CLAUDE-STYLE AI MOTION GRAPHICS IFRAME & CODE DRAWER ── */
.lux-vid-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #020306;
}

.lux-vid-code-drawer {
    display: none;
    max-height: 280px;
    overflow-y: auto;
    background: #080911;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #cbd5e1;
    position: relative;
}

.lux-vid-code-drawer pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.lux-vid-code-drawer .code-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
    font-weight: 600;
    color: #d4af37;
}

.lux-vid-code-drawer .code-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lux-vid-code-drawer .code-copy-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #fff;
}

