        :root {
            --page-bg: #14171a;
            --page-veil: rgba(6, 10, 14, 0.78);
            --surface: #ffffff;
            --surface-warm: #fff8fb;
            --surface-soft: #f6f6f7;
            --surface-quiet: #f0f0f1;
            --text: #202124;
            --text-soft: #6f7379;
            --muted: #9a9da3;
            --line: #e5e5e8;
            --line-strong: #d4d4d8;
            --brand-red: #ff3b3f;
            --brand-red-deep: #ec2028;
            --brand-blue: #344be0;
            --brand-pink: #ff4b93;
            --message-pink: #ffd1d1;
            --success: #1f9d67;
            --warning: #c78113;
            --danger: #c82929;
            --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.34);
            --shadow-soft: 0 18px 45px rgba(245, 35, 65, 0.12);
            --radius-card: 24px;
            --radius-panel: 16px;
            --radius-ui: 8px;
        }

        * {
            box-sizing: border-box;
        }

        html { height: 100%; }

        body {
            min-height: 100%;
            overflow-x: hidden;
            overflow-y: auto;
        }

        body {
            margin: 0;
            background:
                linear-gradient(var(--page-veil), var(--page-veil)),
                radial-gradient(circle at 55% 45%, rgba(255, 255, 255, 0.12), transparent 24%),
                linear-gradient(135deg, #1d2023 0%, #090c10 100%);
            color: var(--text);
            font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", ui-sans-serif, system-ui, sans-serif;
            font-size: 16px;
            letter-spacing: 0;
        }

        button,
        textarea,
        select,
        input {
            font: inherit;
        }

        button {
            border: 0;
        }

        .app {
            width: 100vw;
            height: 100vh;
            min-height: 0;
            margin: 0;
            display: grid;
            grid-template-columns: 280px minmax(0, 1fr);
            overflow: hidden;
            border-radius: 0;
            background:
                linear-gradient(115deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 64%, rgba(255, 243, 255, 0.92) 100%);
            box-shadow: var(--shadow-xl);
        }

        .sidebar {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 34px;
            padding: 42px 28px 26px;
            border-right: 1px solid #eeeeef;
            background: rgba(255, 255, 255, 0.82);
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .brand-mark {
            width: 46px;
            height: 46px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background:
                conic-gradient(from 0deg, var(--brand-red), var(--brand-red) 8deg, transparent 8deg, transparent 15deg),
                #fff;
            color: #111;
            font-size: 13px;
            font-weight: 900;
            box-shadow: inset 0 0 0 10px #fff, 0 0 0 1px rgba(255, 59, 63, 0.22);
        }

        .brand-title {
            font-size: 25px;
            font-weight: 900;
            letter-spacing: 0;
            background: linear-gradient(90deg, var(--brand-blue), var(--brand-pink));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .brand-subtitle {
            margin-top: 2px;
            color: var(--muted);
            font-size: 12px;
        }

        .section-label {
            margin: 0 0 18px;
            color: var(--text);
            font-size: 17px;
            font-weight: 500;
        }

        .agent-list {
            display: grid;
            gap: 12px;
        }

        .agent-switch-section {
            display: none;
        }

        .agent-option {
            width: 100%;
            min-height: 64px;
            display: grid;
            grid-template-columns: 30px minmax(0, 1fr);
            gap: 12px;
            align-items: center;
            padding: 13px 14px;
            border-radius: 8px;
            background: transparent;
            color: var(--text);
            text-align: left;
            cursor: pointer;
            transition: background 160ms ease, color 160ms ease, transform 160ms ease;
        }

        .agent-option:hover {
            background: #f8f8fa;
        }

        .agent-option.active {
            background: #f6f7fb;
            color: var(--brand-blue);
        }

        .agent-option:disabled {
            cursor: not-allowed;
            opacity: 0.62;
        }

        .agent-icon {
            width: 28px;
            height: 28px;
            display: grid;
            place-items: center;
            color: currentColor;
        }

        .agent-icon svg {
            width: 24px;
            height: 24px;
            stroke-width: 1.8;
        }

        .agent-name {
            display: block;
            font-size: 18px;
            font-weight: 500;
            line-height: 1.2;
        }

        .agent-description {
            display: block;
            margin-top: 6px;
            color: var(--muted);
            font-size: 12px;
            line-height: 1.35;
        }

        .sidebar-footer {
            margin-top: auto;
            display: grid;
            gap: 14px;
            color: var(--text-soft);
            font-size: 14px;
        }

        .endpoint {
            padding: 11px 12px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #fff;
            color: var(--text-soft);
            word-break: break-all;
            line-height: 1.5;
        }

        .login-state {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 20px;
            color: var(--text);
            font-size: 16px;
            font-weight: 600;
        }

        .login-state-icon {
            width: 38px;
            height: 38px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: #fff0f0;
            color: var(--brand-red);
        }

        .main {
            min-width: 0;
            min-height: 0;
            height: 100%;
            display: grid;
            grid-template-rows: auto minmax(0, 1fr) auto;
            background:
                radial-gradient(ellipse at 92% 84%, rgba(255, 75, 147, 0.12), transparent 31%),
                radial-gradient(ellipse at 12% 86%, rgba(52, 75, 224, 0.08), transparent 28%),
                rgba(255, 255, 255, 0.76);
        }

        .topbar {
            min-height: 104px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 36px 54px 20px;
            background: transparent;
        }

        .conversation-title {
            min-width: 0;
        }

        .conversation-title h1 {
            margin: 0;
            font-size: 20px;
            line-height: 1.25;
            font-weight: 700;
            letter-spacing: 0;
        }

        .conversation-meta {
            margin-top: 8px;
            color: var(--muted);
            font-size: 14px;
        }

        .topbar-actions {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 34px;
            padding: 8px 12px;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.8);
            color: var(--text-soft);
            white-space: nowrap;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--muted);
        }

        .status-pill.running .status-dot {
            background: var(--warning);
            box-shadow: 0 0 0 5px rgba(199, 129, 19, 0.12);
        }

        .status-pill.connected .status-dot {
            background: var(--success);
        }

        .status-pill.error .status-dot {
            background: var(--danger);
        }

        .icon-button {
            width: 38px;
            height: 38px;
            display: grid;
            place-items: center;
            border-radius: 8px;
            background: transparent;
            color: #45464a;
            cursor: pointer;
        }

        .icon-button:hover {
            background: #f1f1f3;
        }

        .icon-button svg {
            width: 24px;
            height: 24px;
            stroke-width: 2;
        }

        .wide-toggle {
            position: relative;
        }

        .wide-toggle::after {
            content: attr(data-tooltip);
            position: absolute;
            top: calc(100% + 10px);
            left: 50%;
            z-index: 3;
            min-width: 64px;
            padding: 6px 10px;
            border-radius: 8px;
            background: rgba(17, 20, 28, 0.88);
            color: #fff;
            font-size: 12px;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transform: translate(-50%, -4px);
            transition: opacity 160ms ease, transform 160ms ease;
        }

        .wide-toggle:hover::after {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        .wide-icon-exit {
            display: none;
        }

        .wide-toggle.active .wide-icon-enter {
            display: none;
        }

        .wide-toggle.active .wide-icon-exit {
            display: block;
        }

        .agent-settings {
            position: relative;
        }

        .agent-settings-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            z-index: 8;
            width: 220px;
            padding: 8px;
            border: 1px solid var(--line);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 18px 42px rgba(20, 26, 40, 0.16);
            display: none;
        }

        .agent-settings.open .agent-settings-menu {
            display: grid;
            gap: 4px;
        }

        .agent-setting-option {
            width: 100%;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: center;
            padding: 10px 12px;
            border-radius: 10px;
            color: var(--text);
            text-align: left;
            cursor: pointer;
        }

        .agent-setting-option:hover,
        .agent-setting-option.active {
            background: #eef4ff;
            color: #236cff;
        }

        .agent-setting-name {
            display: block;
            font-size: 13px;
            font-weight: 800;
        }

        .agent-setting-desc {
            display: block;
            margin-top: 3px;
            color: var(--muted);
            font-size: 11px;
            line-height: 1.35;
        }

        .messages {
            min-height: 0;
            overflow-y: auto;
            padding: 16px 54px 32px;
            scroll-behavior: smooth;
            overscroll-behavior: contain;
        }

        .messages::-webkit-scrollbar,
        .activity-list::-webkit-scrollbar {
            width: 8px;
        }

        .messages::-webkit-scrollbar-thumb,
        .activity-list::-webkit-scrollbar-thumb {
            background: #dadade;
            border-radius: 999px;
        }

        .empty-state {
            height: 100%;
            display: grid;
            align-items: center;
            color: var(--text-soft);
        }

        .empty-state-inner {
            width: min(760px, 100%);
        }

        .empty-state h2 {
            margin: 0 0 14px;
            color: var(--text);
            font-size: 34px;
            line-height: 1.22;
            font-weight: 800;
            letter-spacing: 0;
        }

        .empty-state p {
            max-width: 620px;
            margin: 0;
            color: var(--text-soft);
            line-height: 1.8;
        }

        .suggestions {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 28px;
        }

        .suggestion {
            min-height: 44px;
            padding: 0 18px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #f3f3f4;
            color: var(--text);
            cursor: pointer;
            transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .suggestion:hover {
            border-color: var(--brand-red);
            background: #fff;
            transform: translateY(-1px);
        }

        .message {
            max-width: 1060px;
            margin: 0 auto 24px;
            display: grid;
            gap: 12px;
        }

        .message.user {
            grid-template-columns: minmax(0, 1fr) 54px;
            align-items: start;
        }

        .message.assistant {
            grid-template-columns: 54px minmax(0, 1fr);
        }

        .avatar {
            width: 50px;
            height: 50px;
            display: grid;
            place-items: center;
            border-radius: 8px;
            border: 1px solid var(--line);
            background: #fff;
            color: var(--brand-red);
            overflow: hidden;
        }

        .avatar svg {
            width: 27px;
            height: 27px;
            stroke-width: 1.9;
        }

        .avatar img {
            width: 100%;
            height: 100%;
            display: block;
        }

        .message.user .avatar {
            border: 0;
            background: linear-gradient(180deg, #ff7b83, var(--brand-red));
            color: #fff;
        }

        .bubble {
            min-width: 0;
        }

        .message.user .bubble {
            justify-self: end;
            max-width: min(620px, 100%);
            padding: 18px 24px;
            border-radius: 18px;
            background: var(--message-pink);
            color: #1f1f22;
            font-size: 18px;
            line-height: 1.6;
        }

        .message.assistant .bubble {
            display: grid;
            gap: 14px;
        }

        .message-header {
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--muted);
            font-size: 14px;
        }

        .message.user .message-header {
            display: none;
        }

        .message-author {
            color: var(--muted);
            font-size: 18px;
            font-weight: 500;
        }

        .message-time {
            color: #c0c1c5;
            font-size: 12px;
        }

        .message-content {
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            line-height: 1.75;
        }

        .answer-body {
            width: min(920px, 100%);
            padding: 2px 0 0;
            color: #202124;
            font-size: 18px;
            line-height: 1.85;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .answer-body.pending {
            display: none;
        }

        .answer-body.empty {
            color: var(--muted);
        }

        .final-answer-stream {
            margin: 0;
            white-space: pre-wrap;
        }

        .answer-token-usage {
            width: min(920px, 100%);
            margin-top: -4px;
            color: #9a9da5;
            font-size: 12px;
            line-height: 1.5;
        }

        .answer-token-usage[hidden] {
            display: none;
        }

        .opportunity-product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
            gap: 12px;
            margin-top: 18px;
        }

        .opportunity-product-card {
            min-width: 0;
            display: grid;
            grid-template-columns: 64px minmax(0, 1fr) auto;
            gap: 12px;
            align-items: center;
            padding: 12px;
            border: 1px solid #e9edf5;
            border-radius: 8px;
            background: #fff;
        }

        .opportunity-product-thumb {
            width: 64px;
            height: 64px;
            display: grid;
            place-items: center;
            border-radius: 8px;
            background: #f4f6fb;
            color: #596174;
            font-size: 12px;
            font-weight: 800;
            overflow: hidden;
        }

        .opportunity-product-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .opportunity-product-info {
            min-width: 0;
        }

        .opportunity-product-name {
            display: block;
            color: #202124;
            font-size: 14px;
            font-weight: 800;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-decoration: none;
        }

        .opportunity-product-meta,
        .opportunity-product-signal {
            margin-top: 5px;
            color: #697282;
            font-size: 12px;
            line-height: 1.35;
        }

        .opportunity-product-signal strong {
            color: #ff5b2c;
        }

        .opportunity-product-actions {
            display: grid;
            gap: 8px;
        }

        .opportunity-product-actions button,
        .opportunity-product-actions a {
            min-width: 82px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e2e6ef;
            border-radius: 8px;
            background: #fff;
            color: #3a3f4b;
            font-size: 13px;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
        }

        .opportunity-product-actions .primary-action {
            border-color: #7d6bff;
            color: #5b47ff;
        }

        .operation-analysis-card {
            width: min(920px, 100%);
            overflow: hidden;
            border: 1px solid #e5e7ef;
            border-radius: 16px;
            background: #fff;
            box-shadow: 0 12px 32px rgba(65, 57, 104, 0.06);
        }

        .translation-result-card {
            width: min(920px, 100%);
            overflow: hidden;
            border: 1px solid #e3e5ee;
            border-radius: 16px;
            background: #fff;
            box-shadow: 0 12px 32px rgba(72, 62, 112, 0.07);
        }

        .translation-preview-card {
            width: min(920px, 100%);
            display: grid;
            grid-template-columns: 68px minmax(0, 1fr) auto;
            align-items: center;
            gap: 14px;
            padding: 13px;
            border: 1px solid #e5e7ef;
            border-radius: 14px;
            background: #fff;
            box-shadow: 0 10px 28px rgba(72, 62, 112, 0.06);
        }

        .translation-preview-image {
            width: 68px;
            height: 68px;
            display: block;
            border-radius: 10px;
            object-fit: cover;
            background: #f5f6f8;
        }

        .translation-preview-info {
            min-width: 0;
        }

        .translation-preview-title {
            display: block;
            overflow: hidden;
            color: #24262d;
            font-size: 14px;
            font-weight: 800;
            line-height: 1.45;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .translation-preview-category {
            display: block;
            margin-top: 7px;
            overflow: hidden;
            color: #858a96;
            font-size: 12px;
            line-height: 1.4;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .translation-preview-detail {
            height: 34px;
            padding: 0 13px;
            border: 1px solid #ded9ff;
            border-radius: 8px;
            background: #fff;
            color: #6654d9;
            font-size: 12px;
            font-weight: 800;
            white-space: nowrap;
            cursor: pointer;
        }

        .translation-preview-detail:hover {
            border-color: #8a78f0;
            background: #f8f6ff;
        }

        .translation-result-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 20px 22px;
            border-bottom: 1px solid #ececf3;
            background: linear-gradient(135deg, #fbf9ff, #f7faff);
        }

        .translation-result-head h3,
        .translation-result-head p {
            margin: 0;
        }

        .translation-result-head h3 {
            color: #22242b;
            font-size: 19px;
        }

        .translation-result-head p {
            margin-top: 7px;
            color: #747a87;
            font-size: 12px;
            line-height: 1.55;
        }

        .translation-language-badge {
            flex: 0 0 auto;
            padding: 7px 11px;
            border: 1px solid #ded7ff;
            border-radius: 8px;
            background: #f2efff;
            color: #6654d9;
            font-size: 12px;
            font-weight: 800;
        }

        .translation-result-body {
            display: grid;
            gap: 18px;
            padding: 20px 22px 22px;
        }

        .translation-compare-block,
        .translation-section {
            display: grid;
            gap: 10px;
        }

        .translation-section-title {
            margin: 0;
            color: #2d2f37;
            font-size: 14px;
            font-weight: 800;
        }

        .translation-compare-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .translation-compare-item {
            min-width: 0;
            padding: 12px 13px;
            border: 1px solid #ececf2;
            border-radius: 10px;
            background: #fbfbfd;
        }

        .translation-compare-item.target {
            border-color: #e4ddff;
            background: #faf8ff;
        }

        .translation-compare-item span {
            display: block;
            color: #9297a2;
            font-size: 11px;
            font-weight: 700;
        }

        .translation-compare-item strong,
        .translation-compare-item p {
            display: block;
            margin: 6px 0 0;
            color: #31343c;
            font-size: 13px;
            line-height: 1.6;
            overflow-wrap: anywhere;
        }

        .translation-table,
        .translation-variant-list {
            display: grid;
            gap: 7px;
        }

        .translation-table-row,
        .translation-variant-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 12px;
            padding: 10px 12px;
            border: 1px solid #eeeeF3;
            border-radius: 9px;
            color: #4b505c;
            font-size: 12px;
            line-height: 1.5;
        }

        .translation-field-head {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            padding: 0 12px 2px;
            color: #9297a2;
            font-size: 11px;
            font-weight: 700;
        }

        .translation-field-cell {
            min-width: 0;
            display: grid;
            gap: 3px;
        }

        .translation-field-cell span {
            color: #5c626f;
            overflow-wrap: anywhere;
        }

        .translation-table-row strong,
        .translation-variant-row strong {
            color: #30333b;
        }

        .translation-image-compare-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .translation-image-compare-panel {
            min-width: 0;
            padding: 12px;
            border: 1px solid #ececf2;
            border-radius: 10px;
            background: #fbfbfd;
        }

        .translation-image-compare-panel.target {
            border-color: #e4ddff;
            background: #faf8ff;
        }

        .translation-image-compare-label {
            display: block;
            margin-bottom: 10px;
            color: #9297a2;
            font-size: 11px;
            font-weight: 700;
        }

        .translation-main-image-list {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 96px;
            justify-content: start;
            gap: 10px;
            padding-bottom: 3px;
            overflow-x: auto;
        }

        .translation-main-image-item {
            margin: 0;
        }

        .translation-main-image-item img {
            width: 96px;
            height: 96px;
            display: block;
            border: 1px solid #e6e8ee;
            border-radius: 10px;
            object-fit: cover;
            background: #f5f6f8;
        }

        .translation-main-image-item figcaption {
            margin-top: 6px;
            color: #898f9b;
            font-size: 11px;
            text-align: center;
        }

        .translation-spec-image-list {
            display: grid;
            gap: 8px;
        }

        .translation-spec-image-card {
            min-width: 0;
            padding: 11px 12px 12px;
            border: 1px solid #ececf2;
            border-radius: 10px;
            background: #fbfbfd;
        }

        .translation-spec-image-title {
            margin: 0 0 9px;
            color: #4c515d;
            font-size: 12px;
            line-height: 1.5;
        }

        .translation-spec-image-pair {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .translation-spec-image-side {
            min-width: 0;
            display: grid;
            grid-template-columns: 72px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            padding: 8px;
            border: 1px solid #e7e9ef;
            border-radius: 9px;
            background: #fff;
        }

        .translation-spec-image-side.target {
            border-color: #e4ddff;
            background: #faf8ff;
        }

        .translation-spec-image-side img {
            width: 72px;
            height: 72px;
            display: block;
            border-radius: 8px;
            object-fit: cover;
            background: #f2f3f6;
        }

        .translation-spec-image-caption {
            min-width: 0;
        }

        .translation-spec-image-caption small,
        .translation-spec-image-caption strong {
            display: block;
            overflow-wrap: anywhere;
        }

        .translation-spec-image-caption small {
            color: #9297a2;
            font-size: 11px;
        }

        .translation-spec-image-caption strong {
            margin-top: 5px;
            color: #30333b;
            font-size: 12px;
        }

        .translation-image-empty {
            padding: 14px;
            border: 1px dashed #dfe2e9;
            border-radius: 10px;
            color: #969ba6;
            font-size: 12px;
            text-align: center;
        }

        .translation-richtext-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .translation-richtext-panel {
            min-width: 0;
            padding: 12px 13px;
            border: 1px solid #ececf2;
            border-radius: 10px;
            background: #fbfbfd;
        }

        .translation-richtext-panel.target {
            border-color: #e4ddff;
            background: #faf8ff;
        }

        .translation-richtext-label {
            display: block;
            margin-bottom: 10px;
            color: #9297a2;
            font-size: 11px;
            font-weight: 700;
        }

        .translation-richtext-content {
            color: #31343c;
            font-size: 13px;
            line-height: 1.7;
            overflow-wrap: anywhere;
        }

        .translation-richtext-content > :first-child {
            margin-top: 0;
        }

        .translation-richtext-content > :last-child {
            margin-bottom: 0;
        }

        .translation-richtext-content h1,
        .translation-richtext-content h2,
        .translation-richtext-content h3,
        .translation-richtext-content h4,
        .translation-richtext-content h5,
        .translation-richtext-content h6 {
            margin: 12px 0 7px;
            color: #252830;
            font-size: 15px;
            line-height: 1.45;
        }

        .translation-richtext-content p,
        .translation-richtext-content ul,
        .translation-richtext-content ol,
        .translation-richtext-content blockquote {
            margin: 8px 0;
        }

        .translation-richtext-content ul,
        .translation-richtext-content ol {
            padding-left: 20px;
        }

        .translation-richtext-content img {
            display: block;
            max-width: 100%;
            height: auto;
            margin: 10px 0;
            border-radius: 8px;
        }

        .translation-richtext-content table {
            width: 100%;
            border-collapse: collapse;
        }

        .translation-richtext-content th,
        .translation-richtext-content td {
            padding: 6px 8px;
            border: 1px solid #e1e4eb;
            text-align: left;
        }

        .translation-richtext-empty {
            color: #9a9faa;
        }

        .translation-warnings {
            padding: 10px 12px;
            border: 1px solid #ffe2bb;
            border-radius: 9px;
            background: #fffaf2;
            color: #8b5b1d;
            font-size: 12px;
            line-height: 1.55;
        }

        .translation-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        .translation-actions button {
            height: 34px;
            padding: 0 14px;
            border: 1px solid #e0e3ea;
            border-radius: 8px;
            background: #fff;
            color: #4c5260;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }

        .translation-actions button.primary {
            border-color: #ff5b2c;
            background: #ff5b2c;
            color: #fff;
        }

        @media (max-width: 560px) {
            .translation-preview-card {
                grid-template-columns: 58px minmax(0, 1fr) auto;
                gap: 10px;
                padding: 10px;
            }

            .translation-preview-image {
                width: 58px;
                height: 58px;
            }

            .translation-preview-detail {
                padding: 0 10px;
            }

            .translation-spec-image-pair,
            .translation-image-compare-grid {
                grid-template-columns: 1fr;
            }

            .translation-compare-grid,
            .translation-richtext-grid {
                grid-template-columns: 1fr;
            }
        }

        .operation-card-head {
            display: grid;
            align-items: flex-start;
            gap: 12px;
            padding: 22px 24px 18px;
            background: linear-gradient(135deg, #faf9ff, #f7f9ff);
            border-bottom: 1px solid #ececf3;
        }

        .operation-card-title {
            margin: 0;
            color: #202127;
            font-size: 20px;
            font-weight: 800;
            line-height: 1.4;
        }

        .operation-card-summary {
            margin: 7px 0 0;
            color: #626876;
            font-size: 13px;
            line-height: 1.65;
        }

        .operation-status-badge {
            justify-self: start;
            flex: 0 0 auto;
            max-width: 100%;
            padding: 7px 11px;
            border: 1px solid #ded8ff;
            border-radius: 8px;
            background: #f2efff;
            color: #6554d9;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.5;
        }

        .operation-card-body {
            display: grid;
            gap: 22px;
            padding: 20px 24px 24px;
        }

        .operation-metric-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .operation-metric {
            min-width: 0;
            padding: 15px;
            border: 1px solid #ececf3;
            border-radius: 10px;
            background: #fafafd;
        }

        .operation-metric-label {
            display: block;
            color: #838897;
            font-size: 12px;
        }

        .operation-metric-value {
            display: block;
            margin-top: 7px;
            color: #272932;
            font-size: 22px;
            font-weight: 800;
            line-height: 1.25;
        }

        .operation-comparisons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 12px;
            margin-top: 8px;
            color: #8a8f9c;
            font-size: 11px;
        }

        .operation-rate.up {
            color: #d9485f;
        }

        .operation-rate.down {
            color: #16875f;
        }

        .operation-section-title {
            margin: 0 0 12px;
            color: #25262d;
            font-size: 17px;
            font-weight: 800;
        }

        .operation-category-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .operation-category-item {
            min-width: 0;
            padding: 11px 12px;
            border: 1px solid #eeedf4;
            border-radius: 8px;
        }

        .operation-category-item strong,
        .operation-category-item span {
            display: block;
        }

        .operation-category-item strong {
            color: #3b3d46;
            font-size: 13px;
        }

        .operation-category-item span {
            margin-top: 5px;
            color: #7c8290;
            font-size: 11px;
            line-height: 1.45;
        }

        .operation-recommendations {
            display: grid;
            gap: 0;
            border: 1px solid #e8e8f0;
            border-radius: 12px;
            overflow: hidden;
        }

        .operation-recommendation {
            padding: 17px 18px;
            background: #fff;
        }

        .operation-recommendation + .operation-recommendation {
            border-top: 1px solid #ececf2;
        }

        .operation-rec-title {
            display: block;
            color: #2a2b32;
            font-size: 15px;
            font-weight: 800;
        }

        .operation-rec-summary {
            margin: 8px 0 0;
            color: #505562;
            font-size: 13px;
            line-height: 1.7;
        }

        .operation-product-list {
            display: grid;
            gap: 8px;
            margin-top: 13px;
        }

        .operation-product-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
            gap: 12px;
            align-items: center;
            padding: 12px;
            border: 1px solid #ececf2;
            border-radius: 9px;
            background: #fff;
        }

        .operation-product-name {
            grid-column: 1 / -1;
        }

        .operation-product-name strong,
        .operation-product-name span {
            display: block;
        }

        .operation-product-name strong {
            color: #30323a;
            font-size: 13px;
        }

        .operation-product-name span,
        .operation-product-stat span {
            margin-top: 4px;
            color: #858a97;
            font-size: 11px;
        }

        .operation-product-stat strong {
            display: block;
            color: #4b4f59;
            font-size: 12px;
        }

        .operation-data-note {
            margin: 0;
            color: #8b909d;
            font-size: 11px;
            line-height: 1.6;
        }

        .operation-empty {
            padding: 24px;
            color: #5f6470;
            font-size: 14px;
            line-height: 1.7;
        }

        @media (max-width: 760px) {
            .operation-card-head,
            .operation-card-body {
                padding-left: 16px;
                padding-right: 16px;
            }

            .operation-metric-grid,
            .operation-category-list {
                grid-template-columns: 1fr;
            }

            .operation-product-row {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            .operation-product-name {
                grid-column: 1;
            }

            .operation-product-stat {
                display: none;
            }
        }

        .operation-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 20px 24px;
            background: #fff;
        }

        .operation-card-window {
            color: #858a97;
            font-size: 12px;
            white-space: nowrap;
        }

        .operation-conclusion {
            padding: 16px 18px;
            border: 1px solid #e7e3ff;
            border-radius: 12px;
            background: #faf9ff;
        }

        .operation-conclusion-label {
            display: block;
            margin-bottom: 7px;
            color: #6b5ad7;
            font-size: 12px;
            font-weight: 800;
        }

        .operation-conclusion p {
            margin: 0;
            color: #343640;
            font-size: 14px;
            line-height: 1.75;
        }

        .operation-category-groups {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .operation-category-panel {
            min-width: 0;
            padding: 14px;
            border: 1px solid #ececf2;
            border-radius: 12px;
            background: #fcfcfd;
        }

        .operation-category-panel h5 {
            margin: 0 0 10px;
            color: #444751;
            font-size: 13px;
        }

        .operation-category-panel .operation-category-list {
            grid-template-columns: 1fr;
        }

        .operation-recommendations {
            gap: 10px;
            border: 0;
            border-radius: 0;
            overflow: visible;
        }

        .operation-recommendation {
            padding: 16px 18px;
            border: 1px solid #e8e8f0;
            border-radius: 12px;
        }

        .operation-recommendation + .operation-recommendation {
            border-top: 1px solid #e8e8f0;
        }

        .operation-rec-summary {
            color: #5d626e;
            font-size: 13px;
        }

        .operation-product-recommendations {
            display: grid;
            gap: 18px;
        }

        .operation-product-recommendation {
            min-width: 0;
        }

        .operation-product-rec-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .operation-product-rec-title {
            color: #2f3139;
            font-size: 15px;
            font-weight: 800;
            line-height: 1.45;
        }

        .operation-product-rec-more {
            flex: 0 0 auto;
            padding: 3px 0;
            border: 0;
            background: transparent;
            color: #8b8f9a;
            font-size: 12px;
            cursor: pointer;
        }

        .operation-product-rec-conclusion {
            margin: 8px 0 0;
            color: #444851;
            font-size: 13px;
            line-height: 1.75;
        }

        .operation-product-rec-copy {
            display: none;
            gap: 6px;
            margin-top: 8px;
            color: #737884;
            font-size: 12px;
            line-height: 1.7;
        }

        .operation-product-recommendation.expanded .operation-product-rec-copy {
            display: grid;
        }

        .operation-product-rec-copy p {
            margin: 0;
        }

        .operation-product-rec-copy strong {
            color: #3c3f48;
        }

        .operation-product-recommendation .operation-product-list {
            display: block;
            margin-top: 12px;
            border: 1px solid #e8e8f0;
            border-radius: 11px;
            overflow: hidden;
            background: #fff;
        }

        .operation-product-row {
            display: grid;
            grid-template-columns: 58px minmax(0, 1fr) auto;
            gap: 12px;
            align-items: center;
            padding: 13px 14px;
            border: 0;
            border-radius: 0;
            background: #fff;
        }

        .operation-product-row.no-image {
            grid-template-columns: minmax(0, 1fr) auto;
        }

        .operation-product-row + .operation-product-row {
            border-top: 1px solid #f0eff4;
        }

        .operation-product-image {
            grid-column: 1;
            grid-row: 1 / span 2;
            width: 58px;
            height: 58px;
            border: 1px solid #efeff3;
            border-radius: 8px;
            background: #fff;
            object-fit: cover;
        }

        .operation-product-name {
            grid-column: 2;
        }

        .operation-product-row.no-image .operation-product-name,
        .operation-product-row.no-image .operation-product-detail {
            grid-column: 1;
        }

        .operation-product-detail-button {
            grid-column: 3;
            grid-row: 1 / span 2;
            min-width: 76px;
            height: 34px;
            padding: 0 14px;
            border: 1px solid #8b72ff;
            border-radius: 8px;
            background: #fff;
            color: #7458ee;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
            cursor: pointer;
        }

        .operation-product-detail-button:hover {
            background: #f7f4ff;
        }

        .operation-product-row.no-image .operation-product-detail-button {
            grid-column: 2;
        }

        .operation-product-name span {
            color: #858a97;
            font-weight: 500;
        }

        .operation-product-detail {
            grid-column: 2;
            display: block;
            padding-top: 0;
            border-top: 0;
            color: #5f6470;
            font-size: 12px;
            line-height: 1.65;
        }

        .operation-product-data {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 10px;
        }

        .operation-product-data span {
            padding: 0;
            border-radius: 0;
            background: transparent;
            color: #777c87;
            font-size: 11px;
        }

        .operation-product-detail-dialog {
            width: min(640px, calc(100vw - 40px));
            max-height: min(86vh, 760px);
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            padding: 0;
            overflow: hidden;
        }

        .operation-product-detail-body {
            min-height: 0;
            padding: 20px;
            overflow-y: auto;
            background: #f7f8fb;
        }

        .operation-product-detail-hero {
            display: grid;
            grid-template-columns: 88px minmax(0, 1fr);
            gap: 16px;
            align-items: center;
            padding: 16px;
            border: 1px solid #e9eaf0;
            border-radius: 12px;
            background: #fff;
        }

        .operation-product-detail-hero.no-image {
            grid-template-columns: minmax(0, 1fr);
        }

        .operation-product-detail-image {
            width: 88px;
            height: 88px;
            border: 1px solid #ececf2;
            border-radius: 10px;
            background: #fff;
            object-fit: cover;
        }

        .operation-product-detail-heading strong,
        .operation-product-detail-heading span {
            display: block;
        }

        .operation-product-detail-heading strong {
            color: #282a31;
            font-size: 17px;
        }

        .operation-product-detail-heading span {
            margin-top: 6px;
            color: #7b808c;
            font-size: 12px;
        }

        .operation-product-detail-metrics {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 12px;
        }

        .operation-product-detail-metric {
            padding: 13px 14px;
            border: 1px solid #e9eaf0;
            border-radius: 10px;
            background: #fff;
        }

        .operation-product-detail-metric span,
        .operation-product-detail-metric strong {
            display: block;
        }

        .operation-product-detail-metric span {
            color: #898e99;
            font-size: 11px;
        }

        .operation-product-detail-metric strong {
            margin-top: 5px;
            color: #343740;
            font-size: 14px;
        }

        @media (max-width: 760px) {
            .operation-card-head {
                align-items: flex-start;
                flex-direction: column;
            }

            .operation-category-groups {
                grid-template-columns: 1fr;
            }

            .operation-product-row {
                grid-template-columns: 48px minmax(0, 1fr) auto;
                padding: 12px;
            }

            .operation-product-image {
                width: 48px;
                height: 48px;
            }

            .operation-product-detail-button {
                min-width: 68px;
                padding: 0 10px;
            }

            .operation-product-detail-metrics {
                grid-template-columns: 1fr;
            }

            .operation-product-stat {
                display: block;
            }
        }

        .typing {
            color: var(--muted);
        }

        .reasoning-card.loading .reasoning-title::before {
            content: "";
            width: 16px;
            height: 16px;
            flex: 0 0 auto;
            display: inline-block;
            border: 2px solid rgba(35, 108, 255, 0.16);
            border-top-color: #236cff;
            border-radius: 50%;
            animation: agent-spin 820ms linear infinite;
        }

        @keyframes agent-spin {
            to {
                transform: rotate(360deg);
            }
        }

        .agent-workflow {
            width: min(920px, 100%);
            display: grid;
            gap: 8px;
            padding: 2px 0 6px;
        }

        .agent-thinking-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            color: #5f6470;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.4;
        }

        .agent-thinking-toggle {
            width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: #8a909c;
            cursor: pointer;
        }

        .agent-thinking-toggle:hover {
            background: #f2f4f8;
            color: #4d5667;
        }

        .agent-thinking-toggle svg {
            width: 14px;
            height: 14px;
            transition: transform 160ms ease;
        }

        .agent-workflow.collapsed .agent-thinking-toggle svg {
            transform: rotate(-90deg);
        }

        .agent-thinking-spinner {
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
            border: 2px solid rgba(35, 108, 255, 0.16);
            border-top-color: #236cff;
            border-radius: 50%;
            animation: agent-spin 820ms linear infinite;
        }

        .agent-thinking-status.done .agent-thinking-spinner {
            border-color: #cfd3dc;
            background: #cfd3dc;
            animation: none;
        }

        .agent-thought-stream {
            display: grid;
            gap: 10px;
            padding: 0 0 2px 22px;
            color: #8a909c;
            font-size: 13px;
            line-height: 1.65;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .agent-workflow .reasoning-line {
            padding-left: 0;
            color: #8a909c;
            font-size: 13px;
            line-height: 1.65;
        }

        .agent-workflow .reasoning-line::before {
            display: none;
        }

        .agent-workflow.collapsed .agent-thought-stream {
            display: none;
        }

        .agent-workflow .agent-tool-card {
            width: min(760px, 100%);
            margin: 2px 0 2px -22px;
        }

        .reasoning-card {
            width: min(920px, 100%);
            border: 1px solid var(--line-strong);
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.86);
            overflow: hidden;
        }

        .reasoning-head {
            min-height: 54px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 14px 18px 10px 20px;
        }

        .reasoning-title {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #202124;
            font-size: 18px;
            font-weight: 800;
        }

        .reasoning-state {
            color: var(--muted);
            font-size: 14px;
            font-weight: 500;
        }

        .reasoning-toggle {
            min-width: 74px;
            height: 34px;
            padding: 0 10px;
            border-radius: 8px;
            background: #f0f0f2;
            color: var(--text-soft);
            cursor: pointer;
        }

        .reasoning-body {
            display: grid;
            gap: 12px;
            padding: 0 20px 18px;
            color: var(--muted);
            font-size: 16px;
            line-height: 1.7;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .reasoning-card.collapsed .reasoning-body {
            display: none;
        }

        .reasoning-line {
            position: relative;
            padding-left: 18px;
        }

        .reasoning-line::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.72em;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #c8c8ce;
        }

        .agent-tool-card {
            display: grid;
            gap: 8px;
            padding: 12px 14px;
            border: 1px solid #e7ebf2;
            border-radius: 8px;
            background: #fff;
        }

        .agent-tool-card.running {
            border-color: #dbe5ff;
            background: #f8fbff;
        }

        .agent-tool-card.done {
            border-color: #e3efe8;
            background: #fbfdfc;
        }

        .agent-tool-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            color: #262a37;
            font-size: 14px;
            font-weight: 800;
        }

        .agent-tool-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .agent-tool-title::before {
            content: "";
            width: 12px;
            height: 12px;
            flex: 0 0 auto;
            border: 2px solid rgba(35, 108, 255, 0.18);
            border-top-color: #236cff;
            border-radius: 50%;
            animation: agent-spin 820ms linear infinite;
        }

        .agent-tool-card.done .agent-tool-title::before {
            border-color: #16a05d;
            background: #16a05d;
            animation: none;
        }

        .agent-tool-status {
            flex: 0 0 auto;
            color: #236cff;
            font-size: 12px;
            font-weight: 700;
        }

        .agent-tool-card.done .agent-tool-status {
            color: #12834d;
        }

        .agent-tool-body {
            color: #6c7280;
            font-size: 13px;
            line-height: 1.6;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .risk-card {
            width: min(920px, 100%);
            border: 1px solid var(--line-strong);
            border-radius: 16px;
            background: #fff;
            overflow: hidden;
        }

        .risk-card-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 20px;
            border-bottom: 1px solid var(--line);
        }

        .risk-card-title {
            margin: 0;
            color: var(--text);
            font-size: 18px;
            font-weight: 800;
        }

        .risk-card-summary {
            margin: 6px 0 0;
            color: var(--text-soft);
            font-size: 14px;
            line-height: 1.6;
        }

        .risk-badge {
            flex: 0 0 auto;
            min-width: 76px;
            padding: 7px 12px;
            border-radius: 999px;
            text-align: center;
            font-size: 14px;
            font-weight: 800;
        }

        .risk-badge.low {
            background: #e9f8f1;
            color: var(--success);
        }

        .risk-badge.medium {
            background: #fff3da;
            color: var(--warning);
        }

        .risk-badge.high {
            background: #ffe8e8;
            color: var(--danger);
        }

        .risk-card-body {
            display: grid;
            gap: 14px;
            padding: 16px 20px 20px;
        }

        .risk-metrics {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .risk-metric {
            min-width: 0;
            padding: 12px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #f8f8fa;
        }

        .risk-metric span {
            display: block;
            color: var(--muted);
            font-size: 12px;
        }

        .risk-metric strong {
            display: block;
            margin-top: 5px;
            color: var(--text);
            font-size: 16px;
            overflow-wrap: anywhere;
        }

        .risk-evidence-list {
            display: grid;
            gap: 10px;
        }

        .risk-evidence {
            padding: 11px 12px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #fff;
        }

        .risk-evidence strong {
            display: block;
            color: var(--text);
            font-size: 14px;
        }

        .risk-evidence span {
            display: block;
            margin-top: 4px;
            color: var(--text-soft);
            font-size: 13px;
            line-height: 1.5;
            overflow-wrap: anywhere;
        }

        .risk-report {
            padding: 14px;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #fbfbfc;
            color: var(--text);
            font-size: 14px;
            line-height: 1.75;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }

        .artifact-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
            margin-top: 4px;
        }

        .artifact-card {
            min-width: 0;
            overflow: hidden;
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #fff;
        }

        .artifact-card img,
        .artifact-card video {
            width: 100%;
            max-height: 320px;
            display: block;
            object-fit: contain;
            background: #f7f7f8;
        }

        .artifact-card audio {
            width: 100%;
            display: block;
            padding: 12px;
        }

        .artifact-link {
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 52px;
            padding: 12px;
            color: var(--brand-blue);
            text-decoration: none;
            overflow-wrap: anywhere;
        }

        .artifact-caption {
            padding: 10px 12px;
            border-top: 1px solid var(--line);
            color: var(--text-soft);
            font-size: 13px;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }

        .response-tools {
            display: flex;
            gap: 12px;
            width: min(920px, 100%);
            color: #7f8490;
        }

        .response-tools.pending {
            display: none;
        }

        .tool-icon {
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border-radius: 8px;
            background: transparent;
            color: inherit;
            cursor: pointer;
        }

        .tool-icon:hover {
            background: #f2f2f4;
            color: var(--text);
        }

        .tool-icon svg {
            width: 22px;
            height: 22px;
        }

        .composer {
            padding: 12px 54px 28px;
            background: transparent;
        }

        .composer-inner {
            width: min(1220px, 100%);
            min-height: 164px;
            margin: 0 auto;
            display: grid;
            grid-template-rows: auto minmax(74px, 1fr) auto auto;
            gap: 0;
            padding: 0;
            border: 1px solid #e9edf5;
            border-radius: 16px;
            background: #fff;
            box-shadow: 0 14px 34px rgba(31, 40, 64, 0.08);
            overflow: visible;
        }

        .composer-input-row {
            min-height: 74px;
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 12px 16px 8px;
        }

        textarea {
            flex: 1 1 auto;
            width: 100%;
            min-height: 48px;
            max-height: 180px;
            resize: none;
            padding: 0;
            border: 0;
            outline: 0;
            color: var(--text);
            background: transparent;
            font-size: 15px;
            line-height: 1.6;
        }

        textarea::placeholder {
            color: #a2a4aa;
        }

        .composer-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 16px;
            border-bottom: 1px solid #edf0f6;
        }

        .composer-left {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .business-action-wrap,
        .composer-more-wrap {
            position: relative;
            display: inline-flex;
            flex: 0 0 auto;
        }

        .ai-selection-menu,
        .composer-more-menu {
            position: absolute;
            left: 50%;
            bottom: calc(100% + 10px);
            z-index: 20;
            width: min(420px, calc(100vw - 56px));
            display: grid;
            gap: 6px;
            padding: 8px;
            border: 1px solid #e5e8ef;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 42px rgba(31, 40, 64, 0.16);
            opacity: 0;
            pointer-events: none;
            transform: translate(-50%, 8px);
            transition: opacity 160ms ease, transform 160ms ease;
        }

        .composer-more-menu {
            width: 176px;
            gap: 8px;
            padding: 10px;
        }

        .composer-more-menu .btn {
            width: 100%;
            justify-content: flex-start;
        }

        .ai-selection-menu.open,
        .composer-more-menu.open {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, 0);
        }

        .ai-selection-menu[hidden],
        .composer-more-menu[hidden] {
            display: none;
        }

        .ai-selection-menu::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: -7px;
            width: 12px;
            height: 12px;
            border-right: 1px solid #e5e8ef;
            border-bottom: 1px solid #e5e8ef;
            background: #fff;
            transform: translateX(-50%) rotate(45deg);
        }

        .ai-selection-preset {
            min-height: 38px;
            padding: 9px 11px;
            border-radius: 8px;
            background: transparent;
            color: var(--text);
            font-size: 14px;
            font-weight: 600;
            line-height: 1.35;
            text-align: left;
            cursor: pointer;
        }

        .ai-selection-preset:hover,
        .ai-selection-preset:focus-visible {
            background: #f6f8fb;
            outline: 0;
        }

        .btn {
            min-width: 0;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 0 12px;
            border: 1px solid #e7ebf2;
            border-radius: 10px;
            background: #fff;
            color: #30343b;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
        }

        .btn:hover {
            border-color: #bfc1c8;
            transform: translateY(-1px);
        }

        .btn.active {
            border-color: rgba(35, 108, 255, 0.2);
            background: #eef3ff;
            color: #236cff;
        }

        .business-action.hidden {
            display: none !important;
        }

        .btn svg {
            width: 16px;
            height: 16px;
            stroke-width: 2.1;
        }

        .btn.primary {
            width: 34px;
            min-width: 34px;
            height: 34px;
            padding: 0;
            border: 0;
            border-radius: 10px;
            background: #236cff;
            color: #fff;
            box-shadow: 0 10px 18px rgba(35, 108, 255, 0.22);
        }

        .btn.primary:hover {
            background: #155de8;
        }

        .btn.danger {
            background: #fff4f4;
            color: var(--danger);
        }

        .btn.ghost {
            color: #c3c5ca;
        }

        .btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            transform: none;
        }

        .disclaimer {
            margin: 14px auto 0;
            width: min(1220px, 100%);
            color: var(--text-soft);
            text-align: center;
            font-size: 14px;
        }

        .activity {
            display: none;
        }

        .activity-list,
        .activity-header {
            display: none;
        }

        @media (max-width: 1100px) {
            .app {
                grid-template-columns: 236px minmax(0, 1fr);
            }

            .topbar,
            .messages,
            .composer {
                padding-left: 28px;
                padding-right: 28px;
            }
        }

        @media (max-width: 780px) {
            body {
                background: #fff;
            }

            .app {
                grid-template-columns: 1fr;
                grid-template-rows: auto minmax(0, 1fr);
            }

            .sidebar {
                gap: 18px;
                padding: 18px;
                border-right: 0;
                border-bottom: 1px solid var(--line);
            }

            .brand-subtitle,
            .endpoint,
            .section-label,
            .login-state {
                display: none;
            }

            .agent-list {
                display: flex;
                gap: 8px;
                overflow-x: auto;
            }

            .agent-option {
                min-width: 154px;
            }

            .agent-description {
                display: none;
            }

            .main {
                min-height: 0;
            }

            .topbar {
                min-height: 72px;
                padding: 16px 18px 8px;
            }

            .conversation-meta,
            .status-pill {
                display: none;
            }

            .messages {
                padding: 12px 18px;
            }

            .message.user,
            .message.assistant {
                grid-template-columns: 42px minmax(0, 1fr);
            }

            .message.user {
                direction: rtl;
            }

            .message.user .bubble {
                direction: ltr;
            }

            .avatar {
                width: 40px;
                height: 40px;
            }

            .reasoning-body,
            .message.user .bubble {
                font-size: 16px;
            }

            .composer {
                padding: 10px 18px 18px;
            }

            .composer-inner {
                min-height: 150px;
            }

            .composer-actions {
                align-items: center;
            }

            .composer-left {
                max-width: calc(100% - 42px);
            }

            .btn {
                height: 34px;
                padding: 0 10px;
                font-size: 12px;
            }

            .btn.primary {
                width: 34px;
                height: 34px;
            }

            .btn.ghost {
                display: none;
            }
        }
