.app-shell {
            display: flex;
            width: 100%;
            height: 100%;
            position: relative;
        }
        .sidebar {
            width: 286px;
            background: var(--sidebar);
            color: var(--text-strong);
            display: flex;
            flex-direction: column;
            border-right: 1px solid rgba(255, 255, 255, 0.06);
            transition: transform 0.25s ease;
            z-index: 40;
        }
        .sidebar-head {
            padding: 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .sidebar-brand {
            display: flex;
            align-items: center;
            gap: 0.68rem;
            min-width: 0;
        }
        .sidebar-brand-name {
            font-weight: 700;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }
        .btn-icon.btn-mobile {
            display: none;
        }
        .sidebar-actions {
            padding: 0.3rem 1rem 0.7rem;
        }
        .session-list {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 0.6rem 0.8rem;
            display: grid;
            align-content: flex-start;
            gap: 0.38rem;
        }
        .session-section {
            margin: 0.22rem 0 0.12rem;
        }
        .session-section-title,
        .session-section-toggle {
            width: 100%;
            border: 0;
            background: transparent;
            color: #b8b8b8;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.74rem;
            font-weight: 650;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            padding: 0.34rem 0.2rem;
        }
        .session-section-title {
            justify-content: flex-start;
            gap: 0.4rem;
        }
        .session-section-toggle {
            cursor: pointer;
        }
        .session-section-toggle:hover {
            color: #f0f0f0;
        }
        .session-date-label {
            color: #8d8d8d;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.36rem 0.26rem 0.2rem;
            letter-spacing: 0.01em;
        }
        .chat-group-card {
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.03);
            padding: 0.34rem 0.3rem 0.28rem;
        }
        .chat-group-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.32rem;
            margin-bottom: 0.2rem;
            position: relative;
        }
        .chat-group-title-btn {
            border: 0;
            background: transparent;
            color: #f2f2f2;
            font-size: 0.81rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.42rem;
            min-width: 0;
            flex: 1;
            padding-right: 0.2rem;
        }
        .chat-group-title-btn span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
            text-align: left;
        }
        .chat-group-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            position: relative;
        }
        .chat-group-body {
            display: grid;
            gap: 0.2rem;
            border: 1px dashed transparent;
            border-radius: 10px;
            transition: border-color 0.2s ease, background 0.2s ease;
            min-height: 1.8rem;
            padding: 0.05rem 0;
        }
        .standalone-session-body {
            display: grid;
            gap: 0.2rem;
            border: 1px dashed transparent;
            border-radius: 10px;
            transition: border-color 0.2s ease, background 0.2s ease;
            min-height: 1.8rem;
            padding: 0.04rem 0;
        }
        .session-drop-zone.is-drop-target {
            border-color: rgba(255, 255, 255, 0.25);
            background: rgba(255, 255, 255, 0.05);
        }
        .session-drop-hint {
            color: #8f8f8f;
            font-size: 0.72rem;
            padding: 0.32rem 0.35rem;
        }
        .session-item {
            border: 0;
            background: transparent;
            color: #dddddd;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            cursor: pointer;
            text-align: left;
            min-width: 0;
            flex: 1;
            padding: 0.68rem 0.2rem 0.68rem 0.75rem;
        }
        .session-item-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            min-width: 0;
            position: relative;
            cursor: grab;
            border: 1px solid transparent;
            border-radius: 12px;
            background: transparent;
            padding-right: 0.3rem;
            transition: background 0.2s ease, border-color 0.2s ease;
        }
        .session-item-row.is-dragging {
            opacity: 0.45;
        }
        .session-item-actions {
            display: inline-flex;
            align-items: center;
            position: static;
            opacity: 0;
            pointer-events: none;
            transform: translateX(6px);
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 3;
            margin-left: 0.25rem;
        }
        .session-item-row:hover .session-item-actions,
        .session-item-row:focus-within .session-item-actions,
        .chat-group-head:hover .session-item-actions,
        .chat-group-head:focus-within .session-item-actions {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(0);
        }
        .session-item-row:hover .session-item-title,
        .session-item-row:focus-within .session-item-title {
            opacity: 0.58;
        }
        .session-item-action {
            border: 1px solid rgba(255, 255, 255, 0.18);
            background: rgba(255, 255, 255, 0.08);
            color: #cfcfcf;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease, color 0.2s ease;
        }
        .session-item-action:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
        }
        .session-item-action-delete {
            color: #ffb2b2;
        }
        .session-item-action-delete:hover {
            background: rgba(255, 87, 87, 0.18);
            color: #ffdede;
        }
        .session-item-row:hover {
            background: var(--sidebar-hover);
        }
        .session-item-row.is-active {
            background: rgba(255, 255, 255, 0.14);
            border-color: rgba(255, 255, 255, 0.32);
        }
        .session-item-row.is-active .session-item {
            color: #ffffff;
        }
        .session-item-title {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
            transition: opacity 0.2s ease;
        }
        .session-empty {
            color: #9a9a9a;
            font-size: 0.8rem;
            text-align: center;
            padding: 0.95rem 0.45rem;
        }
        .sidebar-user {
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            padding: 0.95rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.7rem;
        }
        .user-avatar {
            width: 38px;
            height: 38px;
            border-radius: 999px;
            background: linear-gradient(145deg, #2b2b2b, #000000);
            display: grid;
            place-items: center;
            font-size: 0.95rem;
            font-weight: 700;
            flex-shrink: 0;
        }
        .user-meta {
            min-width: 0;
            flex: 1;
        }
        .wallet-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.45rem;
            margin-top: 0.18rem;
            margin-bottom: 0.16rem;
        }
        .sidebar-user-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-top: 0.2rem;
        }
        .wallet-balance {
            font-size: 0.76rem;
            color: #10b981;
            font-weight: 700;
            letter-spacing: 0.01em;
        }
        .wallet-balance-btn {
            border: none;
            background: transparent;
            padding: 0;
            cursor: pointer;
            transition: opacity 0.2s ease;
        }
        .wallet-balance-btn:hover {
            opacity: 0.82;
        }
        .wallet-inline-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.32rem;
        }
        .wallet-inline-topup {
            font-size: 0.64rem;
            padding: 0.18rem 0.48rem;
            border-radius: 999px;
            line-height: 1;
        }
        .wallet-action-btn {
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: var(--text-strong);
            background: rgba(255, 255, 255, 0.09);
            padding: 0.14rem 0.5rem;
            border-radius: 7px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.64rem;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
            cursor: pointer;
        }
        .wallet-action-btn:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #ffffff;
            transform: translateY(-1px);
        }
        .wallet-action-btn--topup {
            color: #96ffd8;
            border-color: rgba(90, 255, 193, 0.45);
            background: rgba(14, 81, 58, 0.36);
        }
        .wallet-action-btn--topup:hover {
            color: #c7ffe8;
            background: rgba(17, 112, 79, 0.45);
        }
        .wallet-action-btn--ledger {
            border: 1px solid rgba(255, 255, 255, 0.24);
        }
        .user-name {
            margin: 0;
            font-size: 0.85rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .chat-main {
            flex: 1;
            min-width: 0;
            height: 100%;
            display: flex;
            flex-direction: column;
            position: relative;
            background: var(--surface);
        }
        .promo-banner {
            padding: 0.62rem 0.95rem;
            border-bottom: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
            background: linear-gradient(112deg, color-mix(in srgb, #16a34a 18%, var(--surface)) 0%, color-mix(in srgb, #0f172a 82%, var(--surface)) 100%);
        }
        .promo-banner-content {
            width: min(100%, 980px);
            margin: 0 auto;
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            gap: 0.66rem;
        }
        .promo-banner-icon {
            width: 32px;
            height: 32px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            color: #f0fff7;
            background: color-mix(in srgb, #16a34a 44%, rgba(255, 255, 255, 0.12));
            border: 1px solid rgba(240, 255, 247, 0.22);
            font-size: 0.84rem;
            box-shadow: 0 4px 16px rgba(2, 6, 23, 0.24);
            flex-shrink: 0;
        }
        .promo-banner-text {
            display: grid;
            gap: 0.22rem;
        }
        .promo-banner-title {
            margin: 0;
            font-size: 0.86rem;
            line-height: 1.35;
            font-weight: 760;
            color: #f7fff9;
            letter-spacing: 0.01em;
        }
        .promo-banner-copy,
        .promo-banner-terms {
            margin: 0;
            font-size: 0.74rem;
            line-height: 1.45;
            color: rgba(244, 255, 249, 0.9);
        }
        .promo-banner-link {
            color: #b8ffdf;
            text-decoration: none;
            font-weight: 660;
            margin-left: 0.26rem;
            border-bottom: 1px solid rgba(184, 255, 223, 0.42);
            transition: color 0.2s ease, border-color 0.2s ease;
        }
        .promo-banner-link:hover {
            color: #e9fff4;
            border-color: rgba(233, 255, 244, 0.8);
        }
        .chat-header {
            height: 64px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.8rem 0 1rem;
            background: color-mix(in srgb, var(--surface) 84%, transparent);
            backdrop-filter: blur(14px);
            position: sticky;
            top: 0;
            z-index: 20;
        }
        .chat-title-wrap {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
        }
        .chat-title {
            margin: 0;
            font-size: 1rem;
            font-weight: 650;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .header-actions {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .btn-header-toggle {
            border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
            background: color-mix(in srgb, var(--primary) 8%, var(--surface));
            color: var(--primary);
            border-radius: 10px;
            height: 36px;
            padding: 0 0.7rem;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.78rem;
            font-weight: 650;
            cursor: pointer;
            transition: filter 0.2s ease, transform 0.2s ease;
        }
        .btn-header-toggle:hover {
            filter: brightness(1.03);
            transform: translateY(-1px);
        }
        .btn-header-toggle.is-active {
            color: #ffffff;
            border-color: var(--primary);
            background: var(--primary);
        }
        .mode-dd-text {
            display: flex;
            flex-direction: column;
        }
        .mode-dd-title {
            font-size: 0.82rem;
            font-weight: 600;
        }
        .mode-dd-desc {
            font-size: 0.68rem;
            color: var(--text-soft);
            line-height: 1.2;
        }
        .btn-theme {
            color: var(--text-soft);
        }
        .btn-theme:hover {
            color: var(--text-main);
            background: color-mix(in srgb, var(--surface-muted) 60%, transparent);
        }
        .btn-delete {
            color: var(--danger);
        }
        .btn-delete:hover {
            background: color-mix(in srgb, var(--danger) 10%, transparent);
        }
        .sidebar-privacy-link {
            color: #c8c8c8;
            font-size: 0.72rem;
            font-weight: 500;
            text-decoration: none;
            opacity: 0.75;
            transition: color 0.2s ease, opacity 0.2s ease;
        }
        .sidebar-privacy-link:hover {
            color: #ffffff;
            opacity: 1;
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 1.1rem 1.2rem 10.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.15rem;
            transition: opacity 0.15s ease;
        }
        .chat-messages.is-loading {
            opacity: 0.6;
            pointer-events: none;
        }
        .welcome-screen {
            min-height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            width: min(100%, 500px);
            margin: 0 auto;
        }
        .welcome-icon {
            width: 82px;
            height: 82px;
            border-radius: 24px;
            background: color-mix(in srgb, var(--primary) 16%, var(--surface));
            color: var(--primary);
            display: grid;
            place-items: center;
            font-size: 2.2rem;
        }
        .welcome-title {
            margin: 1rem 0 0.55rem;
            font-size: 1.65rem;
        }
        .welcome-copy {
            margin: 0;
            color: var(--text-soft);
            line-height: 1.55;
        }
        .inline-chip {
            display: inline-flex;
            align-items: center;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0.15rem 0.4rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            color: var(--text-main);
            background: var(--surface-muted);
            font-size: 0.79rem;
        }
        .input-wrap {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            padding: 1.2rem 1rem 1rem;
            background: linear-gradient(to top, var(--surface), color-mix(in srgb, var(--surface) 65%, transparent), transparent);
        }
        .composer {
            width: min(100%, 900px);
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .gen-mode-bar {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-bottom: 0.5rem;
        }
        .gen-mode-btn {
            position: relative;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-soft);
            border-radius: 10px;
            font-size: 0.78rem;
            font-weight: 600;
            padding: 0.4rem 0.62rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.36rem;
            transition: all 0.2s ease;
        }
        .gen-mode-btn:hover {
            color: var(--text-main);
            border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
        }
        .gen-mode-btn.is-active {
            color: #ffffff;
            background: var(--primary);
            border-color: var(--primary);
        }
        .chat-composer {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: var(--surface);
            box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
            padding: 0.45rem;
            display: flex;
            gap: 0.45rem;
            align-items: flex-end;
        }
        .chat-composer:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
        }
        .composer-input {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            max-height: 192px;
            min-height: 44px;
            line-height: 1.42;
            font-size: 0.95rem;
            background: transparent;
            color: var(--text-main);
            padding: 0.62rem 0.45rem 0.62rem 0.2rem;
        }
        .btn-send {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            border: none;
            background: var(--primary);
            color: #ffffff;
            display: grid;
            place-items: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: background 0.2s ease;
        }
        .btn-send:hover {
            background: var(--primary-strong);
        }
        .btn-send:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }
        .note {
            margin-top: 0.45rem;
            text-align: center;
            font-size: 0.73rem;
            color: var(--text-soft);
        }
        .message-row {
            display: flex;
            align-items: flex-start;
            gap: 0.7rem;
            max-width: min(100%, 760px);
        }
        .message-row.user {
            margin-left: auto;
            justify-content: flex-end;
        }
        .assistant-avatar {
            width: 34px;
            height: 34px;
            border-radius: 11px;
            display: grid;
            place-items: center;
            color: var(--primary);
            background: color-mix(in srgb, var(--primary) 14%, var(--surface));
            flex-shrink: 0;
            margin-top: 0.16rem;
        }
        .message-bubble {
            border-radius: 18px;
            padding: 0.8rem 0.95rem;
            line-height: 1.5;
            word-break: break-word;
            max-width: 100%;
            position: relative;
        }
        .user-bubble {
            background: var(--primary);
            color: #ffffff;
            border-bottom-right-radius: 6px;
        }
        .assistant-bubble {
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text-main);
            border-bottom-left-radius: 6px;
            box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
        }
        .error-bubble {
            background: color-mix(in srgb, var(--danger) 12%, var(--surface));
            border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent);
            color: var(--danger);
            display: flex;
            align-items: flex-start;
            gap: 0.45rem;
        }
        .message-image {
            max-height: 240px;
            border-radius: 12px;
            border: 1px solid var(--border);
            cursor: pointer;
        }
        .message-image:hover {
            opacity: 0.9;
        }
        .message-video {
            width: min(100%, 320px);
            border-radius: 12px;
            border: 1px solid var(--border);
            background: #000000;
        }
        .upload-status {
            margin-top: 0.36rem;
            font-size: 0.75rem;
            opacity: 0.86;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .center-loader {
            display: flex;
            justify-content: center;
            padding: 1rem;
        }
        .empty-chat {
            text-align: center;
            color: var(--text-soft);
            margin-top: 2rem;
        }
        .loader {
            width: 20px;
            height: 20px;
            border: 3px solid color-mix(in srgb, var(--text-soft) 28%, transparent);
            border-top-color: var(--primary);
            border-radius: 999px;
            animation: spin 1s linear infinite;
        }
        .spin {
            animation: spin 1s linear infinite;
        }
        .markdown strong {
            font-weight: 700;
            color: inherit;
        }
        .message-content-stack {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 0;
            max-width: 100%;
        }
        .message-row.user .message-content-stack {
            align-items: flex-end;
        }
        .message-content-stack:hover .message-copy-slot,
        .message-content-stack:focus-within .message-copy-slot {
            max-height: 40px;
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
            margin-top: 0.32rem;
        }
        .user-bubble .message-copy-btn {
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(255, 255, 255, 0.14);
            color: #ffffff;
        }
        .markdown .code-block-wrap {
            margin: 0.55rem 0;
            border-radius: 11px;
            overflow: hidden;
            border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
        }
        .markdown p {
            margin: 0.45rem 0;
            line-height: 1.6;
        }
        .markdown h1,
        .markdown h2,
        .markdown h3,
        .markdown h4,
        .markdown h5,
        .markdown h6 {
            margin: 0.68rem 0 0.4rem;
            line-height: 1.35;
            font-weight: 700;
        }
        .markdown h1 { font-size: 1.12rem; }
        .markdown h2 { font-size: 1.04rem; }
        .markdown h3 { font-size: 0.98rem; }
        .markdown h4,
        .markdown h5,
        .markdown h6 { font-size: 0.92rem; }
        .markdown hr {
            border: 0;
            border-top: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
            margin: 0.74rem 0;
        }
        /* Markdown Tables */
        .markdown table {
            width: 100%;
            border-collapse: collapse;
            margin: 0.8rem 0;
            display: block;
            overflow-x: auto;
            border-radius: 8px;
            border: 1px solid var(--border);
        }
        .markdown th,
        .markdown td {
            padding: 0.6rem 0.8rem;
            border: 1px solid var(--border);
            text-align: left;
            font-size: 0.88rem;
        }
        .markdown th {
            background: color-mix(in srgb, var(--surface-muted) 60%, transparent);
            font-weight: 650;
            color: var(--text-main);
        }
        .markdown tr:nth-child(even) {
            background: color-mix(in srgb, var(--surface-muted) 30%, transparent);
        }
        .markdown tr:hover {
            background: color-mix(in srgb, var(--surface-muted) 50%, transparent);
        }
        .markdown ul,
        .markdown ol {
            margin: 0.46rem 0 0.46rem 1.2rem;
            padding: 0;
        }
        .markdown li {
            margin: 0.22rem 0;
            line-height: 1.55;
        }
        .markdown .code-block-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.45rem;
            padding: 0.38rem 0.55rem;
            background: color-mix(in srgb, var(--sidebar) 78%, black);
        }
        .markdown .code-lang-badge {
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #dbe6ff;
            background: rgba(150, 180, 255, 0.14);
            border: 1px solid rgba(150, 180, 255, 0.34);
            border-radius: 999px;
            padding: 0.14rem 0.5rem;
        }
        .markdown .code-copy-btn {
            border: 1px solid rgba(255, 255, 255, 0.24);
            background: rgba(255, 255, 255, 0.08);
            color: #f0f4ff;
            border-radius: 8px;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.18rem 0.45rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            transition: background 0.2s ease, opacity 0.2s ease;
        }
        .markdown .code-copy-btn:hover {
            background: rgba(255, 255, 255, 0.16);
        }
        .markdown .code-copy-btn.is-copied {
            color: #67e59a;
        }
        .markdown pre {
            background: color-mix(in srgb, var(--sidebar) 86%, black);
            color: #f0f0f0;
            padding: 0.95rem;
            border-radius: 0;
            overflow-x: auto;
            margin: 0;
        }
        .markdown code {
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            background: color-mix(in srgb, var(--surface-muted) 82%, transparent);
            padding: 0.09rem 0.28rem;
            border-radius: 5px;
        }
        .markdown pre code {
            background: transparent;
            padding: 0;
        }
        .markdown pre code.hljs {
            background: transparent;
        }
        .markdown .preview-launch-wrap {
            margin: 0.62rem 0 0.2rem;
            padding: 0.55rem 0.62rem;
            border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
            border-radius: 10px;
            background: color-mix(in srgb, var(--surface-muted) 66%, var(--surface));
            display: inline-flex;
            align-items: center;
            gap: 0.46rem;
        }
        .markdown .preview-launch-btn {
            border: 1px solid color-mix(in srgb, var(--primary) 48%, transparent);
            background: color-mix(in srgb, var(--primary) 12%, var(--surface));
            color: var(--primary);
            border-radius: 8px;
            font-size: 0.73rem;
            font-weight: 650;
            padding: 0.22rem 0.56rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.34rem;
            transition: filter 0.2s ease, transform 0.2s ease;
        }
        .markdown .preview-launch-btn:hover {
            filter: brightness(1.04);
            transform: translateY(-1px);
        }
        .markdown .preview-launch-label {
            font-size: 0.73rem;
            color: var(--text-soft);
            font-weight: 520;
        }
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-soft) 35%, transparent); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-soft) 55%, transparent); }
        .my-files-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            padding: 2.5rem 1rem;
            color: var(--text-muted);
        }
        .my-files-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            padding: 2.5rem 1rem;
            color: var(--text-muted);
            text-align: center;
        }
        .my-files-empty i {
            font-size: 2.5rem;
            opacity: 0.5;
        }
        .my-files-error {
            padding: 1rem;
            text-align: center;
            color: #e5534b;
        }
        .my-files-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 0.85rem;
            padding: 0.25rem 0;
        }
        @media (max-width: 920px) {
            .sidebar {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                transform: translateX(-104%);
                box-shadow: var(--shadow);
            }
            .sidebar.is-open {
                transform: translateX(0);
            }
            .btn-icon.btn-mobile {
                display: inline-flex;
            }
            .chat-messages {
                padding: 1rem 0.9rem 10.5rem;
            }
            .promo-banner {
                padding: 0.56rem 0.74rem;
            }
            .promo-banner-content {
                gap: 0.54rem;
                align-items: flex-start;
            }
            .promo-banner-icon {
                width: 28px;
                height: 28px;
                font-size: 0.75rem;
                margin-top: 0.08rem;
            }
            .promo-banner-title {
                font-size: 0.8rem;
            }
            .promo-banner-copy,
            .promo-banner-terms {
                font-size: 0.7rem;
            }
            .input-wrap {
                padding: 1rem 0.8rem 0.85rem;
            }
            .btn-header-toggle span {
                display: none;
            }
        .eljefe-text.overlay-text {
            z-index: 10;
            position: relative;
            background: rgba(0, 0, 0, 0.5);
            padding: 4px 8px;
            border-radius: 4px;
        }

        .eljefe-grid {
            position: absolute;
            inset: -50%;
            width: 200%;
            height: 200%;
            background-image: 
                linear-gradient(rgba(50, 255, 100, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(50, 255, 100, 0.1) 1px, transparent 1px);
            background-size: 30px 30px;
            background-position: center;
            transform: perspective(300px) rotateX(60deg);
            animation: grid-move 4s linear infinite;
            z-index: 0;
        }

        .eljefe-content {
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            text-align: center;
            padding: 10px;
        }

        .eljefe-icon {
            font-size: 2rem;
            color: #00ff66;
            filter: drop-shadow(0 0 5px #00ff66);
            animation: pulse-glow 2s infinite ease-in-out;
        }
        
        /* Video specific color */
        .eljefe-text {
            font-family: 'Courier New', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 2px;
            animation: glitch-text 3s infinite;
            text-shadow: 0 2px 0 rgba(0,0,0,0.5);
        }

        .eljefe-scanline {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: #00ff66;
            box-shadow: 0 0 10px #00ff66;
            opacity: 0.6;
            animation: scanline 2.5s linear infinite;
            z-index: 1;
        }

        @keyframes grid-move {
            0% { transform: perspective(300px) rotateX(60deg) translateY(0); }
            100% { transform: perspective(300px) rotateX(60deg) translateY(30px); }
        }

        @keyframes pulse-glow {
            0%, 100% { transform: scale(1); opacity: 0.8; }
            50% { transform: scale(1.15); opacity: 1; }
        }

        @keyframes scanline {
            0% { top: -10%; opacity: 0; }
            20% { opacity: 1; }
            80% { opacity: 1; }
            100% { top: 110%; opacity: 0; }
        }

        .chat-messages.with-video-toolbox {
            padding-bottom: 15.5rem;
        }
        .code-block-actions {
            display: flex;
            gap: 0.5rem;
        }
/* Profile Modal Styles */
.ai-thought-process {
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--surface-muted) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.ai-thought-process > summary {
    cursor: pointer;
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
    background: color-mix(in srgb, var(--surface-muted) 40%, transparent);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, background 0.2s ease;
}
.ai-thought-process > summary:hover {
    color: var(--text-main);
    background: color-mix(in srgb, var(--surface-muted) 60%, transparent);
}
.ai-thought-process[open] > summary {
    border-bottom-color: color-mix(in srgb, var(--border) 50%, transparent);
    color: var(--text-main);
}
.ai-thought-process > summary i {
    font-size: 0.75rem;
    opacity: 0.8;
}
.thought-content {
    padding: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.5;
    border-left: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
    margin: 0 0.85rem 0.85rem;
    background: color-mix(in srgb, var(--surface-muted) 15%, transparent);
    border-radius: 0 8px 8px 0;
}
.thought-content p:last-child {
    margin-bottom: 0;
}
.thought-content p:first-child {
    margin-top: 0;
}

/* ── Scroll-to-bottom button ── */
.scroll-to-bottom-btn {
    position: absolute;
    bottom: 10.8rem;
    right: 1.5rem;
    z-index: 20;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-elevated, #1e293b);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.scroll-to-bottom-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-to-bottom-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
}