        :root {
            --bg: #f5f5f5;
            --surface: #ffffff;
            --surface-muted: #efefef;
            --sidebar: #0a0a0a;
            --sidebar-hover: #1d1d1d;
            --border: #d8d8d8;
            --text-main: #111111;
            --text-soft: #616161;
            --text-strong: #f7f7f7;
            --primary: #111111;
            --primary-strong: #000000;
            --danger: #232323;
            --shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
        }
        [data-theme="dark"] {
            --bg: #050505;
            --surface: #0f0f0f;
            --surface-muted: #171717;
            --sidebar: #000000;
            --sidebar-hover: #141414;
            --border: #292929;
            --text-main: #ececec;
            --text-soft: #9a9a9a;
            --text-strong: #ffffff;
            --primary: #2a2a2a;
            --primary-strong: #3a3a3a;
            --danger: #d7d7d7;
            --shadow: 0 24px 45px rgba(0, 0, 0, 0.45);
        }
        * {
            box-sizing: border-box;
        }
        html,
        body {
            height: 100%;
            margin: 0;
            font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: radial-gradient(circle at top, rgba(0, 0, 0, 0.12), transparent 36%), var(--bg);
            color: var(--text-main);
            overflow: hidden;
        }
        .hidden {
            display: none !important;
        }
        .app-shell {
            display: flex;
            width: 100%;
            height: 100%;
            position: relative;
        }
        .view-login {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: radial-gradient(circle at top left, rgba(0, 0, 0, 0.09), transparent 42%), var(--bg);
            padding: 1.5rem;
            z-index: 60;
        }
        .auth-card {
            width: min(100%, 430px);
            border: 1px solid var(--border);
            border-radius: 24px;
            background: var(--surface);
            box-shadow: var(--shadow);
            padding: 2.25rem;
        }
        .auth-card.auth-card--welcome {
            width: min(100%, 520px);
            display: flex;
            flex-direction: column;
            gap: 0.95rem;
        }
        .auth-card--welcome .brand-block {
            margin-bottom: 0.2rem;
        }
        .welcome-auth-title {
            margin: 0;
            font-size: 1.72rem;
            text-align: center;
            font-weight: 750;
            letter-spacing: -0.01em;
            color: var(--text-main);
        }
        .welcome-auth-copy {
            margin: 0;
            text-align: center;
            color: var(--text-soft);
            font-size: 0.93rem;
            line-height: 1.5;
            max-width: 44ch;
            align-self: center;
        }
        .welcome-auth-highlights {
            display: grid;
            gap: 0.62rem;
        }
        .welcome-auth-highlight {
            margin: 0;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: color-mix(in srgb, var(--surface) 84%, var(--surface-muted) 16%);
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 0.62rem;
            align-items: center;
            padding: 0.66rem 0.75rem;
        }
        .welcome-auth-highlight-icon {
            width: 1.8rem;
            height: 1.8rem;
            border-radius: 10px;
            background: color-mix(in srgb, var(--surface) 56%, var(--primary) 44%);
            display: grid;
            place-items: center;
            color: var(--text-main);
            font-size: 0.78rem;
        }
        .welcome-auth-highlight-copy {
            margin: 0;
            color: var(--text-main);
            font-size: 0.84rem;
            line-height: 1.35;
            letter-spacing: -0.01em;
        }
        .welcome-auth-copy--trust {
            font-size: 0.8rem;
            line-height: 1.4;
            background: color-mix(in srgb, var(--surface) 77%, var(--surface-muted) 23%);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0.62rem 0.72rem;
        }
        .welcome-auth-stack {
            display: grid;
            gap: 0.7rem;
            margin-top: 0.2rem;
        }
        .auth-privacy-link-container {
            text-align: center;
            margin-top: 0.24rem;
        }
        .btn-secondary {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--surface);
            color: var(--text-main);
            font-weight: 600;
            padding: 0.9rem 1rem;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease;
        }
        .btn-secondary:hover {
            border-color: var(--primary-strong);
            background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
        }
        .brand-block {
            text-align: center;
            margin-bottom: 1.75rem;
        }
        .logo-space {
            width: min(100%, 288px);
            min-height: 77px;
            margin: 0 auto 1rem;
            display: grid;
            place-items: center;
            color: #111111;
            overflow: hidden;
        }
        .logo-space--sidebar {
            width: 144px;
            min-height: 41px;
            margin: 0;
        }
        .brand-logo {
            width: 100%;
            height: auto;
            max-height: 77px;
            object-fit: contain;
            display: block;
        }
        .logo-space--sidebar .brand-logo {
            max-height: 41px;
        }
        .brand-title {
            margin: 0;
            font-size: 1.7rem;
            font-weight: 700;
            letter-spacing: 0.01em;
        }
        .brand-subtitle {
            margin: 0.45rem 0 0;
            color: var(--text-soft);
            font-size: 0.92rem;
        }
        .form-stack {
            display: grid;
            gap: 0.95rem;
        }
        .form-label {
            display: block;
            font-size: 0.82rem;
            font-weight: 600;
            margin-bottom: 0.4rem;
            color: var(--text-soft);
        }
        .checkbox-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .checkbox-container {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            cursor: pointer;
            font-size: 0.85rem;
            color: var(--text-soft);
        }
        .checkbox-container input {
            margin-top: 0.2rem;
        }
        .checkbox-text a {
            color: var(--text-main);
            text-decoration: underline;
        }
        .terms-disclaimer {
            font-size: 0.7rem;
            color: var(--text-soft);
            margin: 0;
            line-height: 1.35;
            opacity: 0.75;
            padding-left: 1.35rem; /* align with text */
        }
        .auth-field-hint {
            font-size: 0.76rem;
            color: var(--text-soft);
            margin: 0.45rem 0 0;
            line-height: 1.35;
            opacity: 0.85;
        }
        .text-input {
            width: 100%;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-main);
            border-radius: 13px;
            padding: 0.82rem 0.95rem;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .text-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
        }
        .btn-primary {
            width: 100%;
            border: none;
            border-radius: 14px;
            background: var(--primary);
            color: #ffffff;
            font-weight: 600;
            padding: 0.9rem 1rem;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.45rem;
        }
        .btn-primary:hover {
            background: var(--primary-strong);
            transform: translateY(-1px);
        }
        .btn-primary:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }
        .auth-switch {
            margin-top: 0.2rem;
            text-align: center;
            color: var(--text-soft);
            font-size: 0.82rem;
        }
        .auth-switch-btn {
            border: none;
            background: transparent;
            color: var(--primary);
            font-weight: 600;
            cursor: pointer;
            padding: 0;
            margin-left: 0.2rem;
            font: inherit;
        }
        .auth-switch-btn:hover {
            text-decoration: underline;
        }
        .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 {
            border: none;
            background: transparent;
            color: inherit;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease, color 0.2s ease;
        }
        .btn-icon:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        .btn-mobile {
            display: none;
        }
        .sidebar-actions {
            padding: 0.3rem 1rem 0.7rem;
        }
        .btn-new-chat {
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.06);
            color: #ffffff;
            border-radius: 14px;
            padding: 0.78rem 0.95rem;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            transition: background 0.2s ease;
        }
        .btn-new-chat:hover {
            background: rgba(255, 255, 255, 0.14);
        }
        .btn-new-group {
            margin-top: 0.46rem;
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.03);
            color: #d9d9d9;
            border-radius: 14px;
            padding: 0.62rem 0.95rem;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            transition: background 0.2s ease;
        }
        .btn-new-group:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        .btn-my-files {
            margin-top: 0.46rem;
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.03);
            color: #d9d9d9;
            border-radius: 14px;
            padding: 0.62rem 0.95rem;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            transition: background 0.2s ease;
        }
        .btn-my-files:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        .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;
        }
        .sidebar-popup-wrap {
            position: relative;
        }
        .sidebar-menu-toggle {
            width: 28px;
            height: 28px;
        }
        .sidebar-popup-menu {
            position: absolute;
            right: 0;
            top: calc(100% + 0.32rem);
            min-width: 184px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            background: color-mix(in srgb, var(--sidebar) 88%, black);
            box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
            padding: 0.34rem;
            display: none;
            z-index: 35;
            gap: 0.22rem;
        }
        .sidebar-popup-menu.is-open {
            display: grid;
        }
        .sidebar-popup-item {
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.06);
            color: #dddddd;
            font-size: 0.76rem;
            display: flex;
            align-items: center;
            gap: 0.42rem;
            padding: 0.4rem 0.5rem;
            text-align: left;
            cursor: pointer;
        }
        .sidebar-popup-item:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #ffffff;
        }
        .sidebar-popup-item.is-delete {
            color: #ffb2b2;
        }
        .sidebar-popup-item.is-delete:hover {
            background: rgba(255, 87, 87, 0.18);
            color: #ffdede;
        }
        .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;
        }
        .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-menu-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .wallet-menu-toggle {
            border: 1px solid rgba(255, 255, 255, 0.24);
            color: var(--text-strong);
            background: rgba(255, 255, 255, 0.08);
            width: 24px;
            height: 24px;
            border-radius: 7px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.68rem;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;
        }
        .wallet-menu-toggle:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #ffffff;
        }
        .wallet-menu {
            position: absolute;
            right: 0;
            bottom: calc(100% + 0.45rem);
            min-width: 130px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            background: color-mix(in srgb, var(--sidebar) 84%, black);
            box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
            padding: 0.34rem;
            display: none;
            z-index: 50;
        }
        .wallet-menu.is-open {
            display: grid;
            gap: 0.3rem;
        }
        .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-menu .wallet-action-btn {
            width: 100%;
            justify-content: flex-start;
            font-size: 0.68rem;
            padding: 0.32rem 0.5rem;
        }
        .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;
        }
        .btn-text {
            border: none;
            background: transparent;
            color: #c8c8c8;
            padding: 0;
            font-size: 0.75rem;
            cursor: pointer;
            margin-top: 0.18rem;
        }
        .btn-text:hover {
            color: #ffffff;
        }
        .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);
        }
        .workspace-panel {
            width: min(42vw, 560px);
            min-width: 360px;
            border-left: 1px solid var(--border);
            background: var(--surface);
            display: flex;
            flex-direction: column;
        }
        .workspace-panel-head {
            height: 64px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.6rem;
            padding: 0 0.8rem 0 0.9rem;
            background: color-mix(in srgb, var(--surface) 84%, transparent);
        }
        .workspace-panel-title-wrap {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            color: var(--text-main);
            min-width: 0;
        }
        .workspace-panel-title {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 650;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .workspace-panel-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }
        .workspace-action-btn {
            border: 1px solid color-mix(in srgb, var(--primary) 46%, transparent);
            background: color-mix(in srgb, var(--primary) 10%, var(--surface));
            color: var(--primary);
            border-radius: 9px;
            font-size: 0.75rem;
            font-weight: 650;
            padding: 0.32rem 0.58rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            transition: filter 0.2s ease, transform 0.2s ease;
        }
        .workspace-action-btn:hover {
            filter: brightness(1.03);
            transform: translateY(-1px);
        }
        .workspace-status {
            padding: 0.5rem 0.8rem;
            color: var(--text-soft);
            border-bottom: 1px solid var(--border);
            font-size: 0.76rem;
            background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
        }
        .workspace-preview-frame {
            flex: 1;
            width: 100%;
            border: 0;
            background: #ffffff;
        }
        .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-dropdown-wrap {
            position: relative;
            display: inline-block;
        }
        .mode-dropdown-trigger {
            padding-right: 0.5rem;
        }
        .mode-dropdown-trigger .fa-chevron-down {
            font-size: 0.65rem;
            margin-left: 0.1rem;
            opacity: 0.6;
        }
        .mode-dropdown-menu {
            position: absolute;
            bottom: calc(100% + 0.4rem);
            left: 0;
            width: 240px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            z-index: 100;
            padding: 0.35rem;
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            animation: fadeIn 0.15s ease;
        }
        .mode-dropdown-header {
            padding: 0.4rem 0.6rem;
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-soft);
            text-transform: uppercase;
            letter-spacing: 0.03em;
            border-bottom: 1px solid var(--border);
            margin-bottom: 0.2rem;
        }
        .mode-dropdown-item {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.5rem 0.6rem;
            border: 1px solid transparent;
            background: transparent;
            border-radius: 8px;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s ease;
            color: var(--text-main);
        }
        .mode-dropdown-item:hover {
            background: var(--surface-muted);
        }
        .mode-dropdown-item.is-selected {
            background: color-mix(in srgb, var(--primary) 8%, var(--surface));
            border-color: color-mix(in srgb, var(--primary) 20%, transparent);
        }
        .mode-dropdown-item i {
            font-size: 1rem;
            width: 1.2rem;
            text-align: center;
            color: var(--text-soft);
        }
        .mode-dropdown-item.is-selected i {
            color: 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;
        }
        .mode-dropdown-note {
            margin-top: 0.2rem;
            padding: 0.4rem 0.6rem;
            font-size: 0.65rem;
            color: var(--text-soft);
            background: var(--surface-muted);
            border-radius: 6px;
            line-height: 1.3;
        }
        .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);
        }
        .privacy-link {
            color: var(--text-soft);
            font-size: 0.75rem;
            text-decoration: none;
            transition: color 0.2s ease;
            opacity: 0.8;
        }
        .privacy-link:hover {
            color: var(--text-main);
            opacity: 1;
            text-decoration: underline;
        }
        .sidebar-privacy-link {
            color: #c8c8c8;
        }
        .sidebar-privacy-link:hover {
            color: #ffffff;
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 1.1rem 1.2rem 10.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.15rem;
        }
        .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;
        }
        .attachment-preview {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 0.45rem;
        }
        .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;
        }
        .new-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #ff4d4d, #d90000);
            color: white;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 0.15rem 0.4rem;
            border-radius: 999px;
            box-shadow: 0 2px 6px rgba(255, 0, 0, 0.3);
            pointer-events: none;
            z-index: 10;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            line-height: 1;
        }
        .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);
        }
        .tools-balloon-wrap {
            position: relative;
            display: inline-flex;
        }
        .tools-balloon {
            position: absolute;
            right: 0;
            bottom: calc(100% + 0.55rem);
            width: min(320px, calc(100vw - 2rem));
            border: 1px solid var(--border);
            border-radius: 16px;
            background: color-mix(in srgb, var(--surface) 94%, transparent);
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
            backdrop-filter: blur(12px);
            padding: 0.65rem;
            z-index: 100;
            animation: fadeIn 0.15s ease;
        }
        .tools-balloon-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.15rem 0.2rem 0.5rem;
            border-bottom: 1px solid var(--border);
            margin-bottom: 0.5rem;
        }
        .tools-balloon-title {
            font-size: 0.74rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            color: var(--text-soft);
            text-transform: uppercase;
        }
        .tools-balloon-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.5rem;
        }
        .tools-balloon-item {
            position: relative;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--surface);
            padding: 0.6rem;
            display: flex;
            align-items: center;
            gap: 0.55rem;
            cursor: pointer;
            transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
            text-align: left;
        }
        .tools-balloon-item:hover {
            border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
            transform: translateY(-1px);
        }
        .tools-balloon-item.is-active {
            border-color: var(--primary);
            background: color-mix(in srgb, var(--primary) 14%, var(--surface));
        }
        .tools-balloon-icon {
            width: 30px;
            height: 30px;
            border-radius: 10px;
            background: color-mix(in srgb, var(--primary) 18%, var(--surface));
            color: var(--primary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.86rem;
        }
        .tools-balloon-text {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            min-width: 0;
        }
        .tools-balloon-label {
            font-size: 0.76rem;
            font-weight: 620;
            color: var(--text-main);
            line-height: 1.2;
        }
        .tools-balloon-badge {
            position: static;
            transform: translateY(-1px);
            margin-left: 0.2rem;
            box-shadow: none;
            font-size: 0.56rem;
            padding: 0.14rem 0.34rem;
        }
        .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);
        }
        .loading-bubble {
            color: var(--text-soft);
            font-weight: 520;
        }
        .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-attachments {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 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;
        }
        .file-chip-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.38rem;
            margin-bottom: 0.42rem;
        }
        .file-chip {
            font-size: 0.72rem;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.22);
            padding: 0.22rem 0.45rem;
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .upload-status {
            margin-top: 0.36rem;
            font-size: 0.75rem;
            opacity: 0.86;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        .attachment-tile {
            width: 64px;
            height: 64px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--surface-muted);
            position: relative;
            overflow: hidden;
            display: grid;
            place-items: center;
        }
        .attachment-thumb {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .attachment-remove {
            position: absolute;
            inset: 0;
            border: none;
            background: rgba(6, 9, 23, 0.55);
            color: #ffffff;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .attachment-tile:hover .attachment-remove {
            opacity: 1;
        }
        .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-copy-slot {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            pointer-events: none;
            transform: translateY(-4px);
            transition: max-height 0.2s ease, opacity 0.2s ease, transform 0.2s ease, margin-top 0.2s ease;
            margin-top: 0;
        }
        .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;
        }
        .message-copy-btn {
            border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
            background: color-mix(in srgb, var(--surface-muted) 85%, transparent);
            color: inherit;
            border-radius: 8px;
            font-size: 0.72rem;
            font-weight: 600;
            padding: 0.25rem 0.48rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.34rem;
            margin: 0;
            transition: transform 0.2s ease, filter 0.2s ease;
        }
        .message-copy-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }
        .message-copy-btn.is-disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .message-copy-btn.is-copied {
            color: #1f9d52;
        }
        .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); }
        .toast {
            position: fixed;
            right: 1.25rem;
            bottom: 1.25rem;
            border-radius: 14px;
            background: #141414;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.85rem 1rem;
            box-shadow: var(--shadow);
            transform: translateY(140%);
            transition: transform 0.25s ease;
            z-index: 70;
        }
        .toast.show {
            transform: translateY(0);
        }
        .toast-close {
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.85);
            cursor: pointer;
        }
        .image-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.88);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 84;
            backdrop-filter: blur(7px);
        }
        .image-modal img {
            max-width: 100%;
            max-height: 100%;
            border-radius: 14px;
            box-shadow: var(--shadow);
        }
        .video-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.92);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 85;
            backdrop-filter: blur(7px);
        }
        .video-modal video {
            max-width: 100%;
            max-height: 90vh;
            border-radius: 14px;
            box-shadow: var(--shadow);
        }
        .modal-close {
            position: absolute;
            top: 1.2rem;
            right: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 999px;
            border: none;
            background: rgba(0, 0, 0, 0.45);
            color: #ffffff;
            cursor: pointer;
        }
        .mero-launch-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.62);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 83;
        }
        .mero-launch-card {
            width: min(100%, 560px);
            border: 1px solid color-mix(in srgb, var(--border) 70%, #8257ff 30%);
            border-radius: 22px;
            background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 84%, #5c2fb5 16%) 0%, color-mix(in srgb, var(--surface) 91%, #0ea5e9 9%) 100%);
            box-shadow: var(--shadow);
            padding: 1rem 1rem 1.05rem;
            display: grid;
            gap: 0.72rem;
            position: relative;
            overflow: hidden;
            animation: mero-launch-enter 0.36s ease;
        }
        .mero-launch-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.08) 38%, transparent 63%);
            transform: translateX(-120%);
            animation: mero-launch-shimmer 4.2s linear infinite;
            pointer-events: none;
        }
        .mero-launch-close {
            width: 34px;
            height: 34px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: color-mix(in srgb, var(--surface) 72%, transparent);
            color: var(--text-main);
            cursor: pointer;
            position: absolute;
            top: 0.72rem;
            right: 0.72rem;
            z-index: 2;
        }
        .mero-launch-badge {
            justify-self: flex-start;
            display: inline-flex;
            align-items: center;
            gap: 0.38rem;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #ffffff;
            background: linear-gradient(120deg, #7c3aed, #2563eb);
            border-radius: 999px;
            padding: 0.33rem 0.64rem;
            box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28);
            position: relative;
            z-index: 1;
        }
        .mero-launch-hero {
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            gap: 0.7rem;
            position: relative;
            z-index: 1;
        }
        .mero-launch-icon-wrap {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 14px;
            background: color-mix(in srgb, var(--surface) 78%, #3b82f6 22%);
            display: grid;
            place-items: center;
            position: relative;
            color: var(--text-main);
        }
        .mero-launch-icon-main {
            font-size: 1.1rem;
            animation: mero-launch-float 2.6s ease-in-out infinite;
        }
        .mero-launch-icon-sub {
            position: absolute;
            right: -0.2rem;
            top: -0.18rem;
            font-size: 0.6rem;
            color: #facc15;
            filter: drop-shadow(0 0 7px rgba(250, 204, 21, 0.6));
            animation: mero-launch-twinkle 1.8s ease-in-out infinite;
        }
        .mero-launch-title {
            margin: 0;
            color: var(--text-main);
            font-size: 1.2rem;
            font-weight: 760;
            letter-spacing: -0.01em;
        }
        .mero-launch-copy {
            margin: 0;
            color: color-mix(in srgb, var(--text-main) 85%, var(--text-soft) 15%);
            font-size: 0.9rem;
            line-height: 1.42;
            position: relative;
            z-index: 1;
        }
        .mero-launch-points {
            display: grid;
            gap: 0.52rem;
            position: relative;
            z-index: 1;
        }
        .mero-launch-point {
            margin: 0;
            border: 1px solid color-mix(in srgb, var(--border) 75%, #8b5cf6 25%);
            border-radius: 13px;
            background: color-mix(in srgb, var(--surface) 78%, #111827 22%);
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 0.56rem;
            align-items: center;
            padding: 0.58rem 0.65rem;
        }
        .mero-launch-point p {
            margin: 0;
            color: var(--text-main);
            font-size: 0.84rem;
            line-height: 1.32;
        }
        .mero-launch-point-icon {
            width: 1.78rem;
            height: 1.78rem;
            border-radius: 10px;
            background: color-mix(in srgb, var(--surface) 60%, #4f46e5 40%);
            display: grid;
            place-items: center;
            color: #ffffff;
            font-size: 0.72rem;
        }
        .mero-launch-date {
            margin: 0.12rem 0 0;
            font-size: 0.84rem;
            color: var(--text-main);
            font-weight: 700;
            text-align: center;
            letter-spacing: 0.02em;
            position: relative;
            z-index: 1;
        }
        .ledger-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.6);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 82;
        }
        .ledger-modal-card {
            width: min(100%, 620px);
            max-height: min(86vh, 760px);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 20px;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .ledger-modal-card--wide {
            width: min(100%, 900px);
        }
        .ledger-modal-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.7rem;
            padding: 1rem 1rem 0.86rem;
            border-bottom: 1px solid var(--border);
            background: color-mix(in srgb, var(--surface) 84%, transparent);
        }
        .ledger-modal-title {
            margin: 0;
            font-size: 0.96rem;
            font-weight: 700;
            color: var(--text-main);
        }
        .ledger-modal-head-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
        }
        .ledger-topup-btn {
            font-size: 0.73rem;
            padding: 0.26rem 0.62rem;
            border-radius: 999px;
        }
        .ledger-close-btn {
            width: 34px;
            height: 34px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: color-mix(in srgb, var(--surface-muted) 74%, transparent);
            color: var(--text-main);
            cursor: pointer;
        }
        .ledger-modal-body {
            padding: 0.72rem 0.85rem 0.85rem;
            overflow-y: auto;
        }
        .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;
        }
        .my-file-card {
            background: var(--surface-raised);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .my-file-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        }
        .my-file-thumb {
            width: 100%;
            height: 140px;
            object-fit: cover;
            background: var(--surface-muted);
        }
        .my-file-thumb-wrap {
            width: 100%;
            height: 140px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--surface-muted);
        }
        .my-file-thumb-wrap i {
            font-size: 2.5rem;
            color: var(--text-muted);
        }
        .my-file-info {
            padding: 0.6rem 0.75rem;
        }
        .my-file-type {
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: var(--accent);
            margin-bottom: 0.2rem;
        }
        .my-file-date {
            font-size: 0.72rem;
            color: var(--text-muted);
        }
        .my-file-prompt {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .tutor-modal-card {
            width: min(100%, 540px);
        }
        .tutor-modal-head {
            align-items: flex-start;
        }
        .tutor-modal-title {
            font-size: 1.02rem;
        }
        .tutor-modal-subtitle {
            margin: 0.28rem 0 0;
            font-size: 0.8rem;
            color: var(--text-soft);
            line-height: 1.4;
        }
        .tutor-modal-body {
            padding-top: 1rem;
        }
        .tutor-mode-form {
            border: 1px solid var(--border);
            border-radius: 16px;
            background: color-mix(in srgb, var(--surface-muted) 68%, transparent);
            padding: 0.95rem;
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
        }
        .tutor-input-label {
            margin-top: 0.15rem;
            margin-bottom: 0.1rem;
            font-size: 0.74rem;
            letter-spacing: 0.03em;
        }
        .tutor-input {
            border-radius: 12px;
        }
        .tutor-start-btn {
            margin-top: 0.55rem;
        }
        .ledger-state {
            color: var(--text-soft);
            text-align: center;
            padding: 1.3rem 0.5rem;
            font-size: 0.86rem;
        }
        .ledger-list {
            display: grid;
            gap: 0.55rem;
        }
        .ledger-item {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0.72rem 0.76rem;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.65rem;
            background: color-mix(in srgb, var(--surface-muted) 56%, transparent);
        }
        .ledger-item-main {
            min-width: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
        }
        .ledger-item-title {
            margin: 0;
            color: var(--text-main);
            font-size: 0.83rem;
            font-weight: 640;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .ledger-item-meta {
            margin: 0;
            color: var(--text-soft);
            font-size: 0.72rem;
            display: inline-flex;
            align-items: center;
            gap: 0.32rem;
            flex-wrap: wrap;
        }
        .ledger-item-amount {
            font-size: 0.88rem;
            font-weight: 700;
            white-space: nowrap;
            margin-top: 0.02rem;
        }
        .ledger-item-amount.is-positive {
            color: #10b981;
        }
        .ledger-item-amount.is-negative {
            color: var(--text-main);
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        @keyframes mero-launch-enter {
            0% { opacity: 0; transform: translateY(14px) scale(0.97); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        @keyframes mero-launch-shimmer {
            0% { transform: translateX(-120%); }
            100% { transform: translateX(120%); }
        }
        @keyframes mero-launch-float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-4px); }
        }
        @keyframes mero-launch-twinkle {
            0%, 100% { opacity: 0.5; transform: scale(0.9); }
            50% { opacity: 1; transform: scale(1.16); }
        }
        @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-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;
            }
            .auth-card {
                padding: 1.85rem 1.45rem;
            }
            .auth-card.auth-card--welcome {
                gap: 0.8rem;
            }
            .welcome-auth-title {
                font-size: 1.55rem;
            }
            .welcome-auth-highlight {
                padding: 0.6rem 0.65rem;
            }
            .welcome-auth-highlight-copy {
                font-size: 0.8rem;
            }
            .toast {
                left: 1rem;
                right: 1rem;
                bottom: 1rem;
            }
            .message-copy-btn {
                transform: none;
            }
            .message-copy-slot {
                max-height: 40px;
                opacity: 1;
                pointer-events: auto;
                transform: none;
                margin-top: 0.32rem;
            }
            .workspace-panel {
                position: absolute;
                top: 0;
                right: 0;
                bottom: 0;
                width: min(100%, 440px);
                min-width: 0;
                z-index: 65;
                box-shadow: var(--shadow);
            }
            .ledger-modal {
                padding: 0.7rem;
            }
            .ledger-modal-card {
                width: 100%;
                max-height: 90vh;
                border-radius: 16px;
            }
            .mero-launch-card {
                width: 100%;
                border-radius: 16px;
                padding: 0.92rem 0.86rem 0.95rem;
                gap: 0.62rem;
            }
            .mero-launch-title {
                font-size: 1.05rem;
            }
            .mero-launch-copy {
                font-size: 0.84rem;
            }
            .mero-launch-point {
                padding: 0.53rem 0.58rem;
            }
            .mero-launch-point p {
                font-size: 0.79rem;
            }
            .tools-balloon {
                left: auto;
                right: 0;
                width: min(320px, calc(100vw - 1.5rem));
                max-width: calc(100vw - 1rem);
            }
            .tools-balloon-grid {
                grid-template-columns: 1fr;
            }
        }
        /* ElJefe Media Loader */
        .loading-bubble.media-loading {
            padding: 0 !important;
            overflow: hidden;
            border: 1px solid var(--border);
            background: #000 !important;
            box-shadow: 0 0 20px rgba(0,0,0,0.5);
            min-width: 200px;
        }

        .eljefe-media-loader {
            position: relative;
            width: 100%;
            height: 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(10,10,10,0.95) 100%);
        }

        .eljefe-media-loader.video-loader {
            position: relative;
            overflow: hidden;
            width: 280px;
            height: 152px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
        }
        
        .loading-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 0;
            opacity: 0.6;
        }

        .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 */
        .loading-bubble.video-mode .eljefe-icon {
            color: #ff3366;
            filter: drop-shadow(0 0 5px #ff3366);
        }
        .loading-bubble.video-mode .eljefe-grid {
             background-image: 
                linear-gradient(rgba(255, 50, 100, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 50, 100, 0.1) 1px, transparent 1px);
        }
        .loading-bubble.video-mode .eljefe-scanline {
            background: #ff3366;
            box-shadow: 0 0 10px #ff3366;
        }

        .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; }
        }

        .video-toolbox {
            width: 100%;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0.8rem;
            margin-bottom: 0.8rem;
            display: none;
            gap: 1rem;
            flex-wrap: wrap;
            align-items: center;
        }
        .video-toolbox.visible {
            display: flex;
        }
        .chat-messages.with-video-toolbox {
            padding-bottom: 15.5rem;
        }
        .toolbox-item {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }
        .toolbox-label {
            font-size: 0.75rem;
            color: var(--text-soft);
            font-weight: 600;
        }
        .toolbox-select {
            padding: 0.4rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--surface-muted);
            color: var(--text-main);
            font-size: 0.85rem;
            outline: none;
        }
        .toolbox-number-input {
            width: 60px;
        }
        .ledger-topup-btn--primary {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-main);
        }
        .code-block-actions {
            display: flex;
            gap: 0.5rem;
        }
/* Profile Modal Styles */
.profile-info-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.5rem 0.25rem;
}
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.profile-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-value {
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 500;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Support Modal Styles */
.support-channels-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}
.support-channel-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.support-channel-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    background: var(--surface);
}
.support-channel-link i {
    font-size: 1.35rem;
    width: 1.5rem;
    text-align: center;
    color: var(--primary);
}
.recharge-form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.recharge-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
.recharge-amount-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.recharge-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}
.recharge-currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}
.recharge-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
}
.recharge-input::placeholder {
    color: var(--text-muted);
}
.recharge-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.recharge-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}
.recharge-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: var(--text-muted);
}
.recharge-error {
    font-size: 0.85rem;
    color: var(--error);
    margin: 0;
    padding: 0.5rem;
    background: color-mix(in srgb, var(--error) 10%, transparent);
    border-radius: 6px;
}
.recharge-international-warning {
    font-size: 0.85rem;
    color: var(--text-main);
    margin: 0;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--warning, #f59e0b) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 30%, transparent);
    border-radius: 6px;
    line-height: 1.5;
}

/* AI Thought Process (Reasoning Models) */
.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;
}
