:root,
.dark-theme {
    /* Color Palette - Codex Dark Mode */
    --bg-base: #181818;
    --bg-surface: #212121;
    --bg-elevated: #202124;
    --bg-surface-secondary: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(33, 33, 33, 0.95);
    --bg-glass-hover: rgba(43, 43, 43, 1);

    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-strong: rgba(255, 255, 255, 0.1);

    --accent-cyan: #339cff;
    --accent-cyan-glow: transparent;
    --brand-blue-gradient-end: #339cff;

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-placeholder: rgba(255, 255, 255, 0.5);

    --state-safe: #04b84c;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Variables */
    --sidebar-width: 68px;
    --composer-max-width: 920px;
    --send-control-size: 30px;
    --send-icon-size: 15px;
    --send-lottie-size: 96px;
    --send-slot-offset-y: 0px;
}

.light-theme {
    /* Color Palette - Codex Light Mode */
    --bg-base: #ffffff;
    --bg-surface: #f9f9f9;
    --bg-elevated: #ffffff;
    --bg-surface-secondary: rgba(0, 0, 0, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-glass-hover: rgba(243, 243, 243, 1);

    --border-glass: rgba(13, 13, 13, 0.05);
    --border-glass-strong: rgba(13, 13, 13, 0.1);

    --accent-cyan: #0285ff;
    --accent-cyan-glow: transparent;
    --brand-blue-gradient-end: #0285ff;

    --text-primary: #000000;
    --text-secondary: rgba(13, 13, 13, 0.7);
    --text-placeholder: rgba(13, 13, 13, 0.5);

    --state-safe: #00a240;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 1100px) {

    html,
    body {
        touch-action: manipulation;
        overflow: hidden;
    }

    .app-shell,
    .main-layout,
    .content-area {
        touch-action: manipulation;
        overscroll-behavior: none;
    }

    .chat-feed-container,
    .chat-history,
    .workspace-view {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    .app-shell.trade-mode .chat-feed-container,
    .app-shell.trade-mode .workspace-view.sparkle-trade-workspace,
    .app-shell.trade-mode .trade-chart-frame,
    .app-shell.trade-mode .trade-chart-frame .tradingview-widget-container,
    .app-shell.trade-mode .trade-chart-frame .tradingview-widget-container__widget {
        touch-action: auto !important;
        overscroll-behavior: auto !important;
        -webkit-overflow-scrolling: auto;
    }

    .quick-prompts-row {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

}

body.theme-transitioning,
body.theme-transitioning * {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* Base Glass Effect */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-glass);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

/* App Shell Layout */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 800px;
}

/* Top Navigation */
.top-nav {
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 50;
    background: transparent;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.01em;
}

.brand-trade-icon {
    display: none !important;
    width: 18px;
    height: 18px;
    color: var(--text-primary);
    flex: 0 0 auto;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: auto;
    /* Pushes to top right */
}

.header-profile:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-theme .header-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}



.header-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.header-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    color: #d91f2c;
    --badge-shadow: rgba(217, 31, 44, 0.32);
}

.header-verified-badge svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 14px var(--badge-shadow));
}

.header-verified-badge[data-badge-color="yellow"] {
    color: #f59e0b;
    --badge-shadow: rgba(245, 158, 11, 0.34);
}

.header-verified-badge[data-badge-color="blue"] {
    color: #2563eb;
    --badge-shadow: rgba(37, 99, 235, 0.32);
}

.header-verified-badge[data-badge-color="red"] {
    color: #d91f2c;
    --badge-shadow: rgba(217, 31, 44, 0.32);
}

.header-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.sparkle-stars {
    font-size: 18px;
}


.sub-brand {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(-6px);
    font-weight: 450;
    transition: opacity 0.18s ease, max-width 0.18s ease, transform 0.18s ease;
}

.brand-area:hover .sub-brand,
.brand-area:focus-within .sub-brand {
    opacity: 0.78;
    max-width: 120px;
    transform: translateX(0);
}

.app-shell.code-workspace .sub-brand {
    opacity: 1;
    max-width: 120px;
    transform: translateX(0);
    color: #0a7aff;
    font-weight: 600;
}

.app-shell.trade-mode .brand-trade-icon {
    display: block !important;
}

.app-shell.code-workspace {
    width: calc(100vw * var(--code-workspace-zoom-inverse, 1));
    height: calc(100vh * var(--code-workspace-zoom-inverse, 1));
    min-height: calc(100vh * var(--code-workspace-zoom-inverse, 1));
}

.left-compose-dock {
    position: fixed;
    left: 20px;
    right: auto;
    top: 94px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 70;
}

.session-corner-history {
    --session-corner-panel-bottom: 18px;
    --session-corner-panel-max-height: 468px;
    --session-corner-scroll-max-height: 372px;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 260px;
    height: calc(100vh - 18px);
    z-index: 82;
    pointer-events: none;
}

.session-corner-hotspot {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 170px;
    pointer-events: auto;
    background: transparent;
}

.session-corner-panel {
    position: absolute;
    left: 10px;
    bottom: var(--session-corner-panel-bottom);
    width: min(224px, calc(100vw - 12px));
    max-height: var(--session-corner-panel-max-height);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    overflow: visible;
    transform-origin: bottom left;
    transform: translate3d(-22px, 18px, 0) scale(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.session-corner-panel::before {
    content: '';
    position: absolute;
    left: -18px;
    bottom: calc((var(--session-corner-panel-bottom) * -1) - 24px);
    width: 72px;
    height: calc(var(--session-corner-panel-bottom) + 128px);
    pointer-events: auto;
}

.session-corner-panel::after {
    content: none;
}

.session-corner-history:hover .session-corner-panel,
.session-corner-history:focus-within .session-corner-panel,
.session-corner-history.is-open .session-corner-panel {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.session-corner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 2px 2px 2px;
    position: relative;
    z-index: 1;
}

.session-corner-header::after {
    content: none;
}

.session-corner-header-label {
    font-size: 9px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.session-corner-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: var(--session-corner-scroll-max-height);
    overflow-y: scroll;
    padding: 1px 4px 1px 1px;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
    -webkit-mask-image: none;
    mask-image: none;
}

.session-corner-scroll::-webkit-scrollbar {
    width: 8px;
}

.session-corner-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.session-corner-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.session-corner-new {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: none;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    border-radius: 999px;
    min-height: 27px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.session-corner-new:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(10, 122, 255, 0.14);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.session-corner-list {
    padding: 1px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.session-corner-item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: transparent;
    backdrop-filter: none;
    color: var(--text-primary);
    text-align: left;
    border-radius: 14px;
    padding: 8px 10px 8px;
    cursor: pointer;
    box-shadow: none;
    transform: translateX(calc(var(--session-depth, 0) * 2px));
    opacity: 1;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    font: inherit;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    overflow: hidden;
    margin-top: 0 !important;
}

.session-corner-item:first-child {
    margin-top: 0;
}

.session-corner-item::after {
    content: none;
}

.session-corner-item:hover,
.session-corner-item:focus-visible {
    background: transparent;
    border-color: rgba(10, 122, 255, 0.16);
    box-shadow: none;
    transform: translateY(-1px);
    opacity: 1;
    outline: none;
}

.session-corner-item.is-current {
    border-color: rgba(10, 122, 255, 0.18);
    background: transparent;
    box-shadow: none;
}

.session-corner-item-title {
    display: block;
    font-size: 12px;
    line-height: 1.26;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.session-corner-item-preview {
    display: none;
}

.session-corner-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.session-corner-empty {
    width: 100%;
    padding: 14px 14px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.app-shell.code-workspace .session-corner-history,
.app-shell.agent-workspace .session-corner-history,
.app-shell.image-mode .session-corner-history {
    display: none;
}

.dark-theme .session-corner-panel {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.dark-theme .session-corner-header::after {
    background: none;
}

.dark-theme .session-corner-new {
    background: rgba(17, 22, 30, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.26);
}

.dark-theme .session-corner-new:hover {
    background: rgba(23, 29, 38, 0.92);
    border-color: rgba(89, 163, 255, 0.24);
}

.dark-theme .session-corner-item:hover,
.dark-theme .session-corner-item:focus-visible {
    background: transparent;
    border-color: rgba(89, 163, 255, 0.26);
}

.dark-theme .session-corner-item.is-current {
    background: transparent;
    border-color: rgba(89, 163, 255, 0.28);
}

.dark-theme .session-corner-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dark-theme .session-corner-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    background-clip: padding-box;
}

.dark-theme .session-corner-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.dark-theme .session-corner-item::after {
    background: none;
}

.dark-theme .session-corner-empty {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.dark-theme .session-corner-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
}

.mobile-sidebar-tap-zone {
    display: none;
}

.left-compose-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.16s ease, opacity 0.16s ease;
    position: relative;
    overflow: visible;
}

.left-compose-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.trade-icon-mask {
    display: block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-image: url('assets/exact_clone_target_dollar.svg');
    mask-image: url('assets/exact_clone_target_dollar.svg');
}

.trade-icon-mask--left {
    width: 32px;
    height: 32px;
}

.trade-icon-mask--pill {
    width: 18px;
    height: 18px;
}

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

.left-compose-icon.trade-icon-mask--left {
    width: 32px;
    height: 32px;
}

.left-compose-label {
    position: absolute;
    left: calc(100% + 8px);
    right: auto;
    top: 50%;
    color: var(--text-primary);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translate(-6px, -50%);
    font-weight: 450;
    font-size: 16px;
    transition: opacity 0.18s ease, max-width 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.left-compose-btn:hover,
.left-compose-btn:focus-visible {
    transform: translateY(-1px) scale(1.02);
    opacity: 0.92;
    outline: none;
}

.left-compose-btn.is-active {
    color: #0a7aff;
    transform: translateY(-1px) scale(1.08);
    opacity: 1;
}

.left-compose-btn.is-active:hover,
.left-compose-btn.is-active:focus-visible {
    color: #0a7aff;
    transform: translateY(-1px) scale(1.08);
    opacity: 1;
}

.left-compose-btn:hover .left-compose-label,
.left-compose-btn:focus-visible .left-compose-label,
.left-compose-btn:focus-within .left-compose-label {
    opacity: 0.78;
    max-width: 160px;
    transform: translate(0, -50%);
}

.dark-theme .left-compose-btn {
    background: transparent;
    box-shadow: none;
}

.dark-theme .left-compose-btn:hover,
.dark-theme .left-compose-btn:focus-visible {
    opacity: 0.9;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    -webkit-app-region: no-drag;
}

.info-voice-btn {
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 550;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.info-voice-btn:hover {
    background: rgba(51, 156, 255, 0.12);
    border-color: rgba(51, 156, 255, 0.28);
    color: var(--text-primary);
}

.info-voice-btn:active {
    transform: translateY(1px);
}

.info-voice-btn.active,
.info-voice-btn[aria-pressed="true"] {
    background: rgba(51, 156, 255, 0.2);
    border-color: rgba(51, 156, 255, 0.38);
    color: var(--text-primary);
}

.info-voice-icon {
    width: 14px;
    height: 14px;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.composer-voice-btn {
    height: 28px;
    padding: 0 12px;
    gap: 0;
    font-size: 12px;
    font-weight: 550;
}

.composer-voice-btn .info-voice-icon {
    width: 12px;
    height: 12px;
}

.composer-voice-btn .info-voice-label {
    line-height: 1;
    white-space: nowrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(34, 197, 94, 0.1);
    color: var(--state-safe);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--state-safe);
    box-shadow: 0 0 8px var(--state-safe);
}

.status-indicator.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-indicator.offline .dot {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Main Content Wrapper */
.main-layout {
    display: flex;
    flex: 1;
    overflow: visible;
    position: relative;
    padding-bottom: 0;
}

.sidebar-hover-zone {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18px;
    z-index: 70;
}

/* Narrow Sidebar */
.narrow-sidebar {
    width: var(--sidebar-width);
    margin: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    z-index: 40;
    opacity: 0;
    transform: translateX(-110%);
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.app-shell.left-edge-hover .narrow-sidebar,
.app-shell.sidebar-open .narrow-sidebar {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.nav-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.nav-icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-icon-btn.primary-action {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.nav-icon-btn.primary-action:hover {
    background: rgba(255, 255, 255, 0.05);
    /* very subtle hover */
}

.nav-icon-btn.active,
.icon-btn.active {
    background: rgba(51, 156, 255, 0.14);
    color: var(--text-primary);
    border-color: rgba(51, 156, 255, 0.25);
}

.sidebar-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 292px;
    background: var(--bg-base);
    border-right: 1px solid var(--border-glass);
    transform: translateX(-105%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 65;
    display: flex;
    flex-direction: column;
}

.app-shell.sidebar-open .sidebar-drawer {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.app-shell.sidebar-open .content-area {
    margin-left: 292px;
    transition: margin-left 0.2s ease;
}

.content-area {
    transition: margin-left 0.2s ease;
}

.sidebar-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 10px 14px;
}

.sidebar-drawer-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-close-btn:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.sidebar-drawer-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 10px 12px;
}

.sidebar-action-btn {
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.sidebar-action-btn:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.sidebar-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 10px;
}

.sidebar-conversation-item {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    border-radius: 10px;
    padding: 8px 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-conversation-item:hover {
    background: var(--bg-surface-secondary);
    border-color: var(--border-glass);
}

.sidebar-conversation-title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-conversation-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.sidebar-conversation-empty {
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Center Content Hub */
.content-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Floating Live Desk Screen (PiP Customization) */
.pip-video-widget {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass-strong);
    border-radius: 12px;
    overflow: hidden;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-right: 8px;
    margin-bottom: 2px;
}

.pip-video-widget:hover {
    background: rgba(40, 40, 40, 0.9);
    color: var(--text-primary);
}

/* Minimized State (Inside Composer) */
.pip-video-widget.minimized {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    position: relative;
    display: none;
    /* Hidden until screen recording is active */
}

.pip-video-widget.minimized .pip-header {
    display: none;
}

.pip-video-widget.minimized .pip-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Display a small icon instead of full canvas when collapsed */
}

/* Expanded State (Floating Picture-in-Picture) */
.pip-video-widget.expanded {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 320px;
    height: auto;
    z-index: 60;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    cursor: default;
    display: flex;
    flex-direction: column;
}

.pip-video-widget.expanded .pip-header {
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.5);
    cursor: grab;
    /* Indicates it might be draggable in the future */
}

.pip-video-widget.expanded .pip-header .close-pip {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.pip-video-widget.expanded .pip-header .close-pip:hover {
    color: #fff;
}

.title-drag-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--state-safe);
    box-shadow: 0 0 6px var(--state-safe);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.pip-video-widget.expanded .pip-canvas {
    height: 180px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pip-canvas .placeholder {
    color: var(--text-placeholder);
    font-size: 12px;
}

.pip-video-widget.expanded svg {
    display: none;
    /* Hide the minimized icon */
}

/* Chat Feed Area */
.chat-feed-container {
    flex: 1;
    width: 100%;
    max-width: var(--composer-max-width);
    overflow-y: auto;
    padding: 20px 24px 120px 24px;
    /* Padding bottom for composer overlap */
    display: flex;
    flex-direction: column;
}

.chat-history {
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;
}

.chat-history.hidden {
    display: none;
}

.workspace-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding-bottom: 24px;
}

.workspace-view.hidden {
    display: none;
}

.workspace-view.sparkle-agent-workspace {
    width: 100%;
    padding-bottom: 24px;
}

.sparkle-agent-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    width: 100%;
}

.sparkle-agent-main {
    border: 1px solid var(--border-glass-strong);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sparkle-agent-header h2 {
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.sparkle-agent-header p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.sparkle-agent-compose {
    display: flex;
    align-items: center;
    gap: 10px;
}

#agentModePromptInput {
    width: 100%;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border-glass-strong);
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}

#agentModePromptInput:focus {
    border-color: rgba(10, 122, 255, 0.52);
    box-shadow: 0 0 0 3px rgba(10, 122, 255, 0.16);
}

.sparkle-agent-compose-btn {
    border: 1px solid rgba(10, 122, 255, 0.42);
    background: rgba(10, 122, 255, 0.14);
    color: var(--text-primary);
    border-radius: 999px;
    height: 44px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.sparkle-agent-compose-btn:hover {
    background: rgba(10, 122, 255, 0.22);
}

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

.sparkle-agent-card {
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    text-align: left;
    padding: 12px;
    cursor: pointer;
}

.sparkle-agent-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
}

.sparkle-agent-card p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.sparkle-agent-card:hover {
    border-color: rgba(10, 122, 255, 0.38);
    background: rgba(10, 122, 255, 0.08);
}

.sparkle-agent-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sparkle-agent-sidebar-card {
    border: 1px solid var(--border-glass-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sparkle-agent-sidebar-card h3 {
    font-size: 14px;
}

.sparkle-agent-sidebar-card p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.sparkle-agent-sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-runtime-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-glass-strong);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.agent-runtime-pill.is-good {
    border-color: rgba(3, 186, 120, 0.44);
    color: #03ba78;
}

.agent-runtime-pill.is-bad {
    border-color: rgba(239, 68, 68, 0.44);
    color: #ef4444;
}

.agent-runtime-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agent-runtime-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.agent-runtime-row strong {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.agent-runtime-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

@media (max-width: 1100px) {
    .sparkle-agent-page {
        grid-template-columns: 1fr;
    }

    .sparkle-agent-cards {
        grid-template-columns: 1fr;
    }

    .sparkle-agent-compose {
        flex-direction: column;
        align-items: stretch;
    }

    .sparkle-agent-compose-btn {
        width: 100%;
    }
}

.workspace-shell {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-glass-strong);
    border-radius: 16px;
    padding: 18px;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.workspace-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.workspace-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

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

.workspace-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.workspace-card:hover {
    border-color: rgba(51, 156, 255, 0.35);
    background: rgba(51, 156, 255, 0.08);
    transform: translateY(-1px);
}

.workspace-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
}

.workspace-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.workspace-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.workspace-btn {
    border: 1px solid var(--border-glass-strong);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.workspace-btn:hover {
    color: var(--text-primary);
    border-color: rgba(51, 156, 255, 0.35);
    background: rgba(51, 156, 255, 0.08);
}

.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workspace-list-item {
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.workspace-list-item .meta {
    font-size: 11px;
    color: var(--accent-cyan);
    margin-bottom: 6px;
}

.workspace-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.workspace-input-group:last-child {
    margin-bottom: 0;
}

.workspace-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.workspace-input-group input,
.workspace-input-group textarea,
.workspace-input-group select {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    width: 100%;
    resize: vertical;
}

.dark-theme .workspace-input-group input,
.dark-theme .workspace-input-group textarea,
.dark-theme .workspace-input-group select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.workspace-input-group input:focus,
.workspace-input-group textarea:focus,
.workspace-input-group select:focus {
    outline: none;
    border-color: #0a7aff;
    background: transparent;
    box-shadow: 0 0 0 2px rgba(10, 122, 255, 0.2);
}

.workspace-input-group input:read-only {
    opacity: 0.7;
    cursor: not-allowed;
    background: transparent;
}

/* ── iOS-style Settings Rows ── */

.settings-section {
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.settings-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 14px 16px 8px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    min-height: 40px;
}

.settings-row.vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.settings-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0 16px;
}

.settings-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-value {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
}

.settings-value.muted {
    color: var(--text-secondary);
}

.settings-inline-input {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: right;
    padding: 4px 0;
    flex: 1;
    min-width: 0;
    outline: none;
}

.settings-inline-input:focus {
    color: var(--text-primary);
}

.settings-inline-select {
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 8px;
    outline: none;
    cursor: pointer;
}

.settings-inline-select:focus {
    border-color: #0a7aff;
    color: var(--text-primary);
}

.settings-textarea {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    padding: 8px 10px;
    resize: vertical;
    outline: none;
    width: 100%;
}

.dark-theme .settings-textarea {
    background: rgba(255, 255, 255, 0.03);
}

.settings-textarea:focus {
    border-color: #0a7aff;
    box-shadow: 0 0 0 2px rgba(10, 122, 255, 0.15);
}

.settings-help-text {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.settings-badge-stack {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-code-value {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}

.settings-switch {
    position: relative;
    width: 46px;
    height: 28px;
    display: inline-flex;
    flex-shrink: 0;
}

.settings-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.settings-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.14);
    transition: background-color 0.18s ease;
}

.settings-switch-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
    transition: transform 0.18s ease;
}

.settings-switch input:checked + .settings-switch-slider {
    background: #0a7aff;
}

.settings-switch input:checked + .settings-switch-slider::after {
    transform: translateX(18px);
}

.settings-connector-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-connector-item {
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.02);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-connector-meta {
    min-width: 0;
}

.settings-connector-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.settings-connector-state {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-secondary-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-primary);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.settings-secondary-btn:hover {
    background: rgba(10, 122, 255, 0.08);
    border-color: rgba(10, 122, 255, 0.16);
}

.settings-secondary-btn.danger {
    color: #c41d29;
    border-color: rgba(196, 29, 41, 0.16);
}

.settings-secondary-btn.danger:hover {
    background: rgba(196, 29, 41, 0.08);
    border-color: rgba(196, 29, 41, 0.24);
}

.workspace-list-item p {
    font-size: 13px;
    line-height: 1.45;
}

.workspace-key-value {
    display: grid;
    gap: 8px;
}

.workspace-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px dashed var(--border-glass);
    padding-bottom: 6px;
}

.workspace-kv-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.workspace-kv-row span:first-child {
    color: var(--text-secondary);
    font-size: 12px;
}

.workspace-kv-row strong {
    font-size: 12px;
    color: var(--text-primary);
}

.workspace-template {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
}

.app-shell.image-mode .composer-container,
.app-shell.trade-mode .composer-container {
    display: none;
}

.app-shell.trade-mode {
    --composer-max-width: min(1720px, calc(100vw - 88px));
}

.app-shell.trade-mode .left-compose-dock {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-140%);
}

.app-shell.trade-mode .mobile-sidebar-tap-zone {
    display: none !important;
    pointer-events: none !important;
}

.app-shell.image-mode .chat-feed-container {
    max-width: 1140px;
    padding-bottom: 24px;
}

.app-shell.trade-mode .chat-feed-container {
    max-width: none;
    overflow: hidden;
    padding: 18px 12px 0 12px;
}

.workspace-view.sparkle-image-workspace {
    display: block;
    width: 100%;
    padding-bottom: 24px;
}

.workspace-view.sparkle-trade-workspace {
    display: block;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
}

.sparkle-image-page {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    color: #101114;
    font-family: var(--font-sans);
}

.sparkle-trade-page {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 74px);
    margin: 0 auto;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(170px, 196px) minmax(0, 1fr) minmax(150px, 168px);
    gap: 12px;
    align-items: stretch;
    color: #111216;
    font-family: var(--font-sans);
}

.trade-card {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.trade-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-width: 0;
}

.trade-symbol-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trade-symbol-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.trade-symbol-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #dc2626;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.trade-symbol-name {
    font-size: clamp(42px, 5.8vw, 84px);
    line-height: 0.92;
    font-weight: 700;
    letter-spacing: -0.09em;
    text-transform: uppercase;
    color: #111216;
    overflow-wrap: anywhere;
}

.trade-symbol-meta {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b7280;
}

.trade-market-list {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-card-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b7280;
}

.trade-market-buttons {
    display: grid;
    gap: 10px;
}

.trade-market-btn {
    border: none;
    border-radius: 0;
    background: transparent;
    color: #111216;
    text-align: left;
    padding: 8px 0;
    cursor: pointer;
    transition: opacity 0.18s ease, color 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: none;
    opacity: 0.62;
}

.trade-market-btn:hover {
    background: transparent;
    transform: none;
    opacity: 0.86;
}

.trade-market-btn.is-active {
    box-shadow: none;
    opacity: 1;
}

.trade-market-btn-name {
    font-size: 14px;
    font-weight: 700;
}

.trade-market-btn-code {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.trade-center {
    height: 100%;
    min-width: 0;
}

.trade-chart-card {
    height: 100%;
    min-height: 0;
    padding: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trade-chart-topline {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
}

.trade-chart-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}

.trade-chart-title {
    font-size: 22px;
    line-height: 1.05;
    font-weight: 700;
    color: #111216;
    letter-spacing: -0.03em;
}

.trade-chart-frame {
    position: relative;
    flex: 1;
    min-height: 0;
    border-radius: 0;
    border: none;
    overflow: hidden;
    background: #ffffff;
}

.trade-chart-header-mask {
    position: absolute;
    left: 0;
    top: 0;
    width: min(420px, 42%);
    height: 68px;
    background: #ffffff;
    pointer-events: none;
    z-index: 4;
}

.trade-chart-frame .tradingview-widget-container,
.trade-chart-frame .tradingview-widget-container__widget {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.trade-chart-frame .tradingview-widget-container,
.trade-chart-frame .tradingview-widget-container__widget {
    pointer-events: none;
}

.trade-chart-frame .tradingview-widget-container iframe,
.trade-chart-frame .tradingview-widget-container__widget iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto !important;
}

.trade-chart-interaction-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.trade-chart-signal-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.trade-chart-signal-overlay {
    position: absolute;
    inset: 0;
}

.trade-chart-signal-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 2px dotted rgba(34, 197, 94, 0.55);
    opacity: 0.95;
}

.trade-chart-signal-line--entry {
    border-top-color: rgba(59, 130, 246, 0.78);
}

.trade-chart-signal-line--target {
    border-top-color: rgba(34, 197, 94, 0.56);
}

.trade-chart-signal-line--stop {
    border-top: 2px dashed rgba(148, 163, 184, 0.82);
}

.trade-chart-signal-overlay--short .trade-chart-signal-line--stop {
    border-top: 2px dotted rgba(249, 115, 22, 0.82);
}

.trade-chart-signal-box {
    position: absolute;
    top: 0;
    bottom: 0;
}

.trade-chart-signal-box--glued {
    left: auto;
    right: 0;
    width: min(38%, 320px);
    min-width: 240px;
}

.trade-chart-signal-zone {
    position: absolute;
    left: 0;
    right: 0;
}

.trade-chart-signal-overlay--long .trade-chart-signal-zone--reward {
    background: rgba(153, 246, 228, 0.42);
}

.trade-chart-signal-overlay--long .trade-chart-signal-zone--risk {
    background: rgba(252, 165, 165, 0.42);
}

.trade-chart-signal-overlay--short .trade-chart-signal-zone--reward {
    background: rgba(187, 247, 208, 0.5);
}

.trade-chart-signal-overlay--short .trade-chart-signal-zone--risk {
    background: rgba(253, 186, 116, 0.48);
}

.trade-chart-signal-seam {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 2px solid rgba(71, 85, 105, 0.72);
}

.trade-candle-hotspot {
    position: absolute;
    width: 14px;
    height: 74px;
    transform: translate(-50%, -50%);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 12px;
}

.trade-candle-hotspot-hit,
.trade-candle-hotspot-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.trade-candle-hotspot-hit {
    width: 100%;
    height: 100%;
    background: transparent;
    box-shadow: none;
    opacity: 0;
}

.trade-candle-hotspot-dot {
    width: 4px;
    height: 28px;
    background: rgba(37, 99, 235, 0.28);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
    opacity: 0.55;
}

.trade-candle-hotspot:hover .trade-candle-hotspot-hit,
.trade-candle-hotspot.is-active .trade-candle-hotspot-hit {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.05));
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.trade-candle-hotspot:hover .trade-candle-hotspot-dot,
.trade-candle-hotspot.is-active .trade-candle-hotspot-dot {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    width: 6px;
    height: 38px;
    background: rgba(37, 99, 235, 0.52);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.trade-candle-panel {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: min(360px, calc(100% - 32px));
    padding: 14px 16px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
}

.trade-candle-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.trade-candle-panel-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #64748b;
}

.trade-candle-panel-time {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
}

.trade-candle-panel-title {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
    color: #111216;
    max-width: calc(100% - 28px);
}

.trade-candle-panel-support {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.trade-chart-summary-strip {
    position: absolute;
    top: 12px;
    left: 12px;
    width: min(640px, calc(100% - 24px));
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    pointer-events: none;
}

.trade-chart-summary-tile {
    position: relative;
    min-height: 66px;
    padding: 12px 14px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    pointer-events: none;
}

.trade-chart-summary-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.65), transparent 28%);
    pointer-events: none;
}

.trade-chart-summary-tile--bearish {
    background: linear-gradient(180deg, rgba(255, 247, 247, 0.96), rgba(255, 238, 238, 0.92));
}

.trade-chart-summary-tile--soft-bearish {
    background: linear-gradient(180deg, rgba(255, 248, 245, 0.96), rgba(255, 242, 238, 0.92));
}

.trade-chart-summary-tile--impact {
    background: linear-gradient(180deg, rgba(250, 250, 252, 0.97), rgba(243, 244, 246, 0.93));
}

.trade-chart-summary-tile--bullish {
    background: linear-gradient(180deg, rgba(241, 253, 247, 0.96), rgba(232, 250, 241, 0.92));
}

.trade-chart-summary-tile--neutral {
    background: linear-gradient(180deg, rgba(250, 250, 252, 0.97), rgba(243, 244, 246, 0.93));
}

.trade-chart-summary-tile-label {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}

.trade-chart-summary-tile-value {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    font-size: clamp(16px, 1.15vw, 22px);
    line-height: 1.04;
    font-weight: 800;
    color: #dc2626;
}

.trade-chart-summary-tile--bullish .trade-chart-summary-tile-value {
    color: #059669;
}

.trade-chart-summary-tile--impact .trade-chart-summary-tile-value,
.trade-chart-summary-tile--neutral .trade-chart-summary-tile-value {
    color: #111216;
}

.trade-chart-summary-tile-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    color: rgba(220, 38, 38, 0.78);
}

.trade-chart-summary-tile--bullish .trade-chart-summary-tile-icon {
    color: rgba(5, 150, 105, 0.78);
}

.trade-chart-summary-tile--impact .trade-chart-summary-tile-icon {
    right: auto;
    left: 14px;
    top: auto;
    bottom: 12px;
    font-size: 14px;
    color: #ef4444;
}

.trade-chart-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
    color: #f7f0e7;
}

.trade-chart-headline {
    position: absolute;
    top: 3%;
    left: 4%;
    right: 6%;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(22px, 2.6vw, 42px);
    line-height: 1.01;
    font-weight: 700;
    letter-spacing: -0.045em;
    text-wrap: balance;
    color: #f8f1e7;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.trade-chart-summary-card,
.trade-chart-callout,
.trade-chart-note,
.trade-chart-level {
    position: absolute;
}

.trade-chart-summary-card {
    min-height: 82px;
    padding: 14px 16px;
    border-radius: 18px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34);
}

.trade-chart-summary-card--bearish {
    background: radial-gradient(circle at 76% 28%, rgba(255, 140, 140, 0.2), transparent 24%),
        linear-gradient(180deg, rgba(66, 18, 18, 0.88), rgba(28, 8, 10, 0.84));
    border: 1px solid rgba(177, 101, 255, 0.78);
}

.trade-chart-summary-card--soft-bearish {
    background: radial-gradient(circle at 74% 30%, rgba(255, 138, 138, 0.16), transparent 23%),
        linear-gradient(180deg, rgba(61, 21, 23, 0.78), rgba(24, 10, 11, 0.72));
    border: 1px solid rgba(94, 54, 255, 0.18);
}

.trade-chart-summary-card--impact {
    background: linear-gradient(180deg, rgba(32, 34, 39, 0.9), rgba(16, 18, 22, 0.84));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.trade-chart-summary-card--bullish {
    background: radial-gradient(circle at 76% 28%, rgba(90, 255, 185, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(8, 46, 37, 0.86), rgba(7, 24, 22, 0.82));
    border: 1px solid rgba(74, 255, 191, 0.28);
}

.trade-chart-summary-card--neutral {
    background: linear-gradient(180deg, rgba(24, 28, 35, 0.82), rgba(13, 16, 21, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-chart-summary-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 241, 233, 0.76);
}

.trade-chart-summary-value {
    margin-top: 8px;
    font-size: clamp(15px, 1.25vw, 22px);
    line-height: 1.02;
    font-weight: 800;
    color: #ff7676;
}

.trade-chart-summary-card--bullish .trade-chart-summary-value {
    color: #79f2bd;
}

.trade-chart-summary-card--neutral .trade-chart-summary-value,
.trade-chart-summary-card--impact .trade-chart-summary-value {
    color: rgba(255, 255, 255, 0.78);
}

.trade-chart-summary-icon {
    position: absolute;
    right: 14px;
    bottom: 14px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 121, 121, 0.95);
}

.trade-chart-summary-card--impact .trade-chart-summary-icon {
    right: auto;
    left: 14px;
    bottom: 18px;
    font-size: 32px;
    color: #d73c3c;
}

.trade-chart-summary-card--bullish .trade-chart-summary-icon {
    color: rgba(121, 242, 189, 0.95);
}

.trade-chart-callout {
    max-width: 30%;
}

.trade-chart-callout-eyebrow {
    margin-bottom: 8px;
    font-size: clamp(10px, 0.82vw, 11px);
    font-weight: 700;
    color: rgba(244, 244, 246, 0.36);
}

.trade-chart-callout-title {
    font-size: clamp(11px, 1.05vw, 17px);
    line-height: 1.14;
    font-weight: 650;
    color: rgba(247, 247, 248, 0.86);
    text-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.trade-chart-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(12, 11, 15, 0.78);
    border: 1px solid rgba(145, 94, 255, 0.18);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(11px, 0.95vw, 15px);
    font-weight: 650;
}

.trade-chart-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgba(151, 92, 255, 0.62), rgba(45, 17, 78, 0.92));
    color: #f3d8ff;
    font-size: 12px;
}

.trade-chart-level {
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.18);
}

.trade-chart-level-label {
    position: absolute;
    right: 2.8%;
    top: -13px;
    padding-left: 18px;
    background: #040404;
    font-size: clamp(12px, 1vw, 18px);
    line-height: 1;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.64);
}

.trade-chart-level-label strong {
    color: #f2eee9;
}

.trade-chart-level--target {
    border-top: 1px solid rgba(228, 115, 115, 0.48);
}

.trade-chart-level--target .trade-chart-level-label {
    color: rgba(229, 118, 118, 0.78);
}

.trade-chart-level--target .trade-chart-level-label strong {
    color: #ff7e7e;
}

.trade-chart-connector-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: visible;
}

.trade-chart-connector {
    fill: none;
    stroke: rgba(139, 83, 255, 0.62);
    stroke-width: 0.22;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1 0.72;
}

.trade-chart-anchor {
    fill: rgba(154, 94, 255, 0.84);
    stroke: rgba(154, 94, 255, 0.24);
    stroke-width: 0.18;
    vector-effect: non-scaling-stroke;
}

.trade-timeframe-card,
.trade-bidders-card,
.trade-bias-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.trade-timeframe-btn {
    border-radius: 0;
    border: none;
    background: transparent;
    color: #20242c;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.18s ease, color 0.18s ease;
    box-shadow: none;
    opacity: 0.58;
}

.trade-timeframe-btn:hover {
    transform: none;
    opacity: 0.84;
}

.trade-timeframe-btn.is-active {
    background: transparent;
    color: #111216;
    box-shadow: none;
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.trade-timeframe-btn.is-signal-live {
    position: relative;
    color: #8c6300;
    opacity: 1;
    text-shadow: 0 0 18px rgba(245, 185, 44, 0.28);
}

.trade-timeframe-btn.is-signal-live::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f5b92c;
    transform: translateY(-50%);
    box-shadow: 0 0 0 0 rgba(245, 185, 44, 0.46);
    animation: trade-timeframe-pulse 1.25s ease-in-out infinite;
}

.trade-timeframe-btn.is-signal-live.is-active {
    color: #6d4b00;
    text-decoration-color: #d99f10;
}

.trade-timeframe-btn.is-signal-watch::after {
    animation-duration: 1.5s;
}

.trade-timeframe-btn.is-signal-active::after {
    animation-duration: 1.05s;
}

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

@keyframes trade-timeframe-pulse {
    0% {
        opacity: 0.72;
        box-shadow: 0 0 0 0 rgba(245, 185, 44, 0.42);
        transform: translateY(-50%) scale(0.95);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(245, 185, 44, 0);
        transform: translateY(-50%) scale(1.18);
    }
    100% {
        opacity: 0.72;
        box-shadow: 0 0 0 0 rgba(245, 185, 44, 0);
        transform: translateY(-50%) scale(0.95);
    }
}

.trade-data-empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 0;
}

.trade-data-empty-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111216;
}

.trade-data-empty-copy {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: #64748b;
    text-wrap: balance;
}

.trade-signal-panel {
    display: grid;
    gap: 10px;
    padding-top: 10px;
}

.trade-signal-history-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
}

.trade-signal-history-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.8);
    background: #ffffff;
    padding: 0;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.trade-signal-history-dot:hover,
.trade-signal-history-dot:focus-visible {
    transform: scale(1.08);
    outline: none;
    border-color: #111216;
}

.trade-signal-history-dot.is-selected {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    border-color: #111216;
}

.trade-signal-history-dot.is-live {
    border-color: #15803d;
    background: rgba(21, 128, 61, 0.14);
    animation: trade-signal-history-pulse 1.8s ease-in-out infinite;
}

.trade-signal-history-dot.is-completed {
    border-color: rgba(21, 128, 61, 0.9);
    background: rgba(21, 128, 61, 0.9);
}

.trade-signal-history-dot.is-stopped {
    border-color: rgba(185, 28, 28, 0.9);
    background: rgba(185, 28, 28, 0.14);
}

.trade-signal-watch {
    margin-top: 10px;
    padding: 12px 0 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.trade-signal-watch-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.trade-signal-watch-detail {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
    color: #64748b;
}

.trade-signal-watch-timer {
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #111216;
}

.trade-signal-watch--long .trade-signal-watch-timer {
    color: #15803d;
}

.trade-signal-watch--short .trade-signal-watch-timer {
    color: #b91c1c;
}

.trade-signal-panel-empty {
    gap: 8px;
}

.trade-signal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 16px;
}

.trade-signal-row-main {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2px;
}

.trade-signal-panel-empty .trade-signal-row-main {
    justify-content: flex-start;
}

.trade-signal-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}

.trade-signal-value {
    font-size: 15px;
    font-weight: 800;
    color: #111216;
    text-align: right;
    letter-spacing: 0.01em;
}

.trade-signal-value-muted {
    color: #64748b;
}

.trade-signal-value-long {
    color: #15803d;
}

.trade-signal-value-short {
    color: #b91c1c;
}

.trade-signal-meta {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    color: #64748b;
}

.trade-signal-progress-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.trade-signal-progress-rail {
    position: relative;
    min-height: 22px;
    display: flex;
    justify-content: center;
}

.trade-signal-progress-dot {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.72);
    background: #ffffff;
    box-sizing: border-box;
}

.trade-signal-progress-line {
    position: absolute;
    top: 16px;
    bottom: -14px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(203, 213, 225, 0.95);
}

.trade-signal-progress-row.is-hit .trade-signal-progress-dot {
    border-color: rgba(21, 128, 61, 0.92);
    background: rgba(21, 128, 61, 0.92);
}

.trade-signal-progress-row.is-hit .trade-signal-progress-dot::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.trade-signal-progress-line.is-hit {
    background: rgba(21, 128, 61, 0.92);
}

.trade-signal-progress-row.is-active .trade-signal-progress-dot {
    border-color: #111216;
    box-shadow: 0 0 0 3px rgba(17, 18, 22, 0.08);
}

.trade-signal-panel.is-live .trade-signal-progress-row.is-active .trade-signal-progress-dot {
    animation: trade-signal-progress-pulse 1.35s ease-in-out infinite;
}

.trade-signal-panel.is-live .trade-signal-progress-row.is-active .trade-signal-progress-line {
    background: linear-gradient(180deg, rgba(17, 18, 22, 0.95) 0%, rgba(148, 163, 184, 0.3) 100%);
    animation: trade-signal-progress-flow 1.2s linear infinite;
}

.trade-signal-progress-row.is-stop-hit .trade-signal-progress-dot {
    border-color: rgba(185, 28, 28, 0.92);
    background: rgba(185, 28, 28, 0.92);
}

.trade-signal-progress-row.is-stop-hit .trade-signal-progress-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.trade-signal-progress-line.is-stop-hit {
    background: rgba(185, 28, 28, 0.92);
}

.trade-signal-progress-row.is-active .trade-signal-label,
.trade-signal-progress-row.is-active .trade-signal-value {
    color: #111216;
}

.trade-signal-note {
    padding-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
    color: #64748b;
    text-wrap: balance;
}

@keyframes trade-signal-progress-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(17, 18, 22, 0.18);
    }
    55% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(17, 18, 22, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(17, 18, 22, 0);
    }
}

@keyframes trade-signal-progress-flow {
    0% {
        opacity: 0.35;
        transform: translateX(-50%) translateY(-3px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.35;
        transform: translateX(-50%) translateY(3px);
    }
}

@keyframes trade-signal-history-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.14);
    }
    60% {
        box-shadow: 0 0 0 8px rgba(21, 128, 61, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(21, 128, 61, 0);
    }
}

.trade-bias-pill {
    width: fit-content;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.trade-bias-pill.is-bullish {
    background: transparent;
    color: #15803d;
}

.trade-bias-pill.is-bearish {
    background: transparent;
    color: #b91c1c;
}

.trade-bias-pill.is-neutral {
    background: transparent;
    color: #475569;
}

.trade-bias-arrow {
    font-size: 15px;
    line-height: 1;
}

.trade-sidebar-right {
    justify-content: flex-start;
    gap: 24px;
}

.trade-bias-card {
    margin-top: auto;
}

@media (max-width: 1100px) {
    .app-shell.trade-mode {
        --composer-max-width: min(1240px, calc(100vw - 32px));
    }

    .app-shell.trade-mode .left-compose-dock {
        transform: translateX(-140%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .sparkle-trade-page {
        height: auto;
        grid-template-columns: 1fr;
    }

    .trade-chart-card {
        min-height: 540px;
    }

    .trade-chart-frame {
        min-height: 460px;
    }

    .trade-chart-summary-strip {
        grid-template-columns: 1fr;
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        gap: 8px;
    }

    .trade-chart-summary-tile {
        min-height: 58px;
        padding: 10px 12px;
    }

    .trade-chart-summary-tile-value {
        font-size: 16px;
    }

    .trade-chart-summary-tile-icon {
        font-size: 16px;
        right: 12px;
        top: 12px;
    }

    .trade-candle-hotspot {
        width: 12px;
        height: 62px;
    }

    .trade-candle-panel {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 10px;
        padding: 12px 14px 14px;
    }

    .trade-chart-overlay {
        display: none;
    }

    .trade-sidebar-right {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .sparkle-trade-page {
        gap: 14px;
    }

    .trade-symbol-card,
    .trade-market-list,
    .trade-chart-card,
    .trade-timeframe-card,
    .trade-bidders-card,
    .trade-bias-card {
        padding: 14px;
        border-radius: 20px;
    }

    .trade-chart-card {
        min-height: 480px;
    }

    .trade-chart-frame {
        min-height: 380px;
        border-radius: 18px;
    }

    .trade-chart-header-mask {
        width: min(240px, 64%);
        height: 64px;
    }

    .trade-timeframe-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sparkle-image-header h2 {
    font-size: 28px;
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
}

.sparkle-image-compose {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border-radius: 999px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #e3e4e8;
    box-shadow: 0 2px 8px rgba(16, 17, 20, 0.06);
}

.sparkle-image-compose-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #1d1e22;
    cursor: pointer;
}

.sparkle-image-compose-btn svg {
    width: 22px;
    height: 22px;
}

.sparkle-image-compose-btn:hover {
    background: #f2f3f5;
}

#imageModePromptInput {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #111216;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 400;
    font-family: var(--font-sans);
    padding: 0;
}

#imageModePromptInput::placeholder {
    color: #8d9096;
}

.sparkle-image-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdccb5;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(249, 142, 84, 0.32);
    font-family: var(--font-sans);
}

.sparkle-image-send-btn svg {
    width: 20px;
    height: 20px;
}

.sparkle-image-send-btn:hover {
    filter: brightness(0.97);
}

.sparkle-image-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sparkle-image-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.sparkle-image-section-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    color: #111216;
}

.sparkle-image-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sparkle-image-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #d8dae0;
    background: #ffffff;
    color: #555964;
    font-size: 25px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-sans);
}

.sparkle-image-nav-btn:hover {
    border-color: #c9ccd4;
    color: #22242a;
}

.sparkle-image-cards-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sparkle-image-style-card {
    min-width: 152px;
    width: 152px;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.sparkle-image-style-thumb {
    width: 152px;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid #d9dce2;
    background: #f3f4f6;
}

.sparkle-image-style-label {
    width: 100%;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    color: #5f6470;
    font-weight: 500;
    font-family: var(--font-sans);
}

.sparkle-image-discovery-row {
    overflow-x: auto;
    padding-bottom: 2px;
}

.sparkle-image-discovery-grid {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

.sparkle-image-discovery-item {
    border: none;
    background: transparent;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #666b77;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.3;
    font-family: var(--font-sans);
}

.sparkle-image-discovery-thumb {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid #dcdee3;
    background: #f2f3f5;
    flex: 0 0 54px;
}

.sparkle-image-discovery-item span {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 500;
}

.sparkle-image-style-card:hover .sparkle-image-style-thumb,
.sparkle-image-discovery-item:hover .sparkle-image-discovery-thumb {
    border-color: #c7cad3;
}

.sparkle-image-discovery-item:hover span,
.sparkle-image-style-card:hover .sparkle-image-style-label {
    color: #202329;
}

.dark-theme .sparkle-image-page {
    color: #f2f4f8;
}

.dark-theme .sparkle-image-header h2,
.dark-theme .sparkle-image-section-head h3 {
    color: #f4f6fa;
}

.dark-theme .sparkle-image-compose {
    background: #1b1d23;
    border-color: #30343f;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
}

.dark-theme #imageModePromptInput {
    color: #f4f6fa;
}

.dark-theme #imageModePromptInput::placeholder {
    color: #8f95a4;
}

.dark-theme .sparkle-image-compose-btn {
    color: #c9cfdb;
}

.dark-theme .sparkle-image-compose-btn:hover {
    background: #2a2d36;
}

.dark-theme .sparkle-image-nav-btn {
    background: #1f222a;
    color: #d7dce8;
    border-color: #3b3f4c;
}

.dark-theme .sparkle-image-style-thumb,
.dark-theme .sparkle-image-discovery-thumb {
    border-color: #3b3f4c;
}

.dark-theme .sparkle-image-style-label,
.dark-theme .sparkle-image-discovery-item {
    color: #b6bcc9;
}

.dark-theme .sparkle-image-discovery-item:hover span,
.dark-theme .sparkle-image-style-card:hover .sparkle-image-style-label {
    color: #eef2ff;
}

/* Chat Message Layout overhaul */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-row {
    display: flex;
    width: 100%;
    margin-bottom: 36px;
    animation: messageSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.message-row.user {
    justify-content: flex-end;
}

.message-row.agent {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 14px 20px;
    font-size: 15px;
    line-height: 1.5;
}

/* User Message: Highly distinct, solid modern grey/blue */
.message-row.user .message-bubble {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 16px;
    box-shadow: none;
    border: none;
}

.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

/* Agent Message specific */
.message-row.agent .message-content {
    display: flex;
    gap: 16px;
    max-width: 100%;
    width: 100%;
}

.agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    box-shadow: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s;
}

.agent-avatar.thinking {
    width: auto;
    padding: 0 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}



.agent-avatar.thinking .thinking-label::after {
    content: '';
    display: inline-block;
    width: 12px;
    text-align: left;
    animation: thinking-dots 1.5s infinite steps(4, end);
}

@keyframes thinking-dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}

.agent-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.agent-text {
    color: #e2e8f0;
    padding-top: 2px;
    line-height: 1.65;
    font-size: 15px;
    letter-spacing: 0.15px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.agent-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-row.agent:hover .agent-actions {
    opacity: 1;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Rich Markdown Rendering Overrides */
.agent-text p {
    margin-bottom: 16px;
}

.agent-text p:last-child {
    margin-bottom: 0;
}

.agent-text pre {
    background: #0f111a !important;
    /* Override hljs default */
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.agent-text code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}

.agent-text pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.agent-text p code,
.agent-text li code {
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.agent-text ul,
.agent-text ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.agent-text li {
    margin-bottom: 6px;
}

/* Elegant Markdown Tables */
.agent-text table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.agent-text th,
.agent-text td {
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    text-align: left;
}

.agent-text th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.agent-text tr {
    background: rgba(0, 0, 0, 0.2);
}

.agent-text tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Blockquotes */
.agent-text blockquote {
    border-left: 3px solid var(--accent-cyan);
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background: rgba(0, 240, 255, 0.05);
    color: #a1a1aa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Horizontal Rule */
.agent-text hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glass-strong), transparent);
    margin: 24px 0;
}

/* Removed Duplicate Thinking Block */

/* Images */
.agent-text img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-glass-strong);
}

/* Removed Duplicate Thinking Blocks */

/* Task Checkboxes */
.agent-text input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-glass-strong);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    vertical-align: middle;
    margin-right: 8px;
    position: relative;
    top: -1px;
}

.agent-text input[type="checkbox"]:checked {
    background: rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.5);
}

.agent-text input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--accent-cyan);
    font-size: 12px;
    left: 2px;
    top: -1px;
}

/* Agent Operational Badges */
.agent-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 4px;
    font-family: var(--font-sans);
}

.agent-badge.now {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.agent-badge.plan {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.agent-badge.doing {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.agent-badge.result {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Rich Content Blocks - 2026 Premium Aesthetics */
.code-block {
    background: #0d0d12;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    margin: 18px 0;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.code-block:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

.code-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    font-size: 12px;
}

.code-header button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: var(--font-sans);
    transition: color 0.2s ease;
}

.code-lang {
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.5);
}

.code-header button:hover {
    color: var(--text-primary);
}

.code-block pre {
    padding: 18px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'SF Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-block code.hljs {
    background: transparent !important;
}

/* Premium Glassmorphism Thinking Block */
.thinking-block {
    margin: 16px 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.thinking-block:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

.thinking-block summary {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
    list-style: none !important;
    list-style-type: none !important;
}

.thinking-block summary::-webkit-details-marker,
.thinking-block summary::marker,
.thinking-block summary::before {
    display: none !important;
    content: "" !important;
}

.thinking-block summary:hover {
    color: var(--text-primary);
}

.thinking-block[open] summary .think-icon {
    transform: rotate(90deg);
}

.think-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: var(--accent-cyan);
    opacity: 0.8;
}

.thinking-content {
    padding: 0 16px 16px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 4px;
    padding-top: 12px;
}

.task-block {
    background: #111111;
    border: 1px solid var(--border-glass-strong);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.task-block-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item.done {
    color: var(--text-secondary);
}

.task-item.done .task-icon {
    color: var(--state-safe);
}

.task-item.active {
    color: var(--text-primary);
}

.task-item.active .task-icon {
    color: var(--accent-cyan);
    animation: rotate 2s linear infinite;
}

.task-item.pending {
    color: var(--text-placeholder);
}

.task-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.scrollbar-hidden::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

.scrollbar-hidden {
    scrollbar-width: none;
}

.quick-prompts-row.hidden,
.composer-autocomplete.hidden {
    display: none !important;
}

/* Welcome Hero */
.welcome-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    /* Pushes content to center if empty */
    min-height: 200px;
}

.welcome-hero h1 {
    font-size: 32px;
    font-weight: 500;
    max-width: 500px;
    text-align: center;
    line-height: 1.3;
}

.code-sidebar-hero {
    display: none;
}

.code-sidebar-hero.hidden {
    display: none !important;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--accent-cyan);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

/* 2026.142 desktop dark-mode parity with light-mode layout */
@media (min-width: 1101px) {

    .dark-theme body {
        background: #0f1115;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) {
        background: #0f1115;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .chat-feed-container {
        background: transparent;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .welcome-hero h1 {
        color: #f3f4f6;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .text-glow {
        color: #f3f4f6;
        text-shadow: none;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .prompt-pill {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.72);
        box-shadow: none;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .prompt-pill:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        transform: none;
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .composer-container::before {
        background: linear-gradient(to top, #0f1115 40%, rgba(15, 17, 21, 0) 100%);
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .composer-box {
        background: #1a1c20;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .composer-pill-btn,
    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .active-pill {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .composer-pill-btn:hover,
    .dark-theme .app-shell:not(.code-workspace):not(.agent-workspace):not(.image-mode) .active-pill:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.12);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.text-glow {
    color: var(--text-primary);
    text-shadow: 0 0 24px var(--accent-cyan-glow);
    font-weight: 600;
}

/* Bottom Composer Component (Floating) */
.composer-container {
    position: absolute;
    bottom: -1.4%;
    width: 100%;
    max-width: var(--composer-max-width);
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 40;
}

.composer-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to top, var(--bg-base) 40%, transparent);
    z-index: -1;
    pointer-events: none;
}

/* Action Prompts */
.quick-prompts-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    width: 100%;
    padding: 12px 24px;
    justify-content: flex-start;
}

.prompt-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quick-prompts-row::after {
    content: '';
    display: block;
    padding-right: 24px;
}

.composer-autocomplete {
    width: 100%;
    margin: 0 0 10px;
    padding: 0 12px 2px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.composer-autocomplete-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 8px;
    border-radius: 16px;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.composer-autocomplete-item + .composer-autocomplete-item {
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.composer-autocomplete-item:hover,
.composer-autocomplete-item.is-active {
    background: rgba(15, 23, 42, 0.035);
    color: var(--text-primary);
}

.composer-autocomplete-icon,
.composer-autocomplete-arrow {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.composer-autocomplete-item:hover .composer-autocomplete-arrow,
.composer-autocomplete-item.is-active .composer-autocomplete-arrow {
    color: var(--text-primary);
}

.composer-autocomplete-label {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.4;
    color: currentColor;
}

.composer-autocomplete-match {
    color: var(--text-primary);
    font-weight: 700;
}

.prompt-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-glass-strong);
}

/* ===== ChatGPT.com Input Bar \u2014 Exact Grid Layout from Live DOM =====
   Grid collapsed:  'leading primary trailing'
                    '.       footer  .'
   Grid expanded:   'primary primary primary'
                    'leading footer  trailing'
   Card:   border-radius:28px  padding:10px  dark:bg:#303030
   Primary:  min-h-14 (56px)  -my-2.5 (margin -10px)  px-1.5 (6px)
   Textarea: font-size:16px  line-height:24px  padding:0
   Buttons:  h-9 w-9  =  36x36px  rounded-full
   ================================================================ */

/* The Composer Card — CSS Grid with named areas */
.composer-box {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    overflow: visible;
    padding: 10px;
    /* p-2.5 = 10px */

    /* Default = expanded layout (textarea full width on top) */
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        'primary primary primary'
        'leading footer  trailing';
}

.light-theme .composer-box {
    background: #ffffff;
}

/* Expanded state (user focused / has content) */
.composer-box.expanded {
    grid-template-areas:
        'primary primary primary'
        'leading footer  trailing';
}

/* [grid-area: primary] — contains the textarea */
.composer-primary {
    grid-area: primary;
    display: flex;
    flex-direction: column;
    min-height: 56px;
    /* min-h-14 = 14*4px */
    align-items: stretch;
    justify-content: center;
    overflow-x: hidden;
    padding: 6px 10px 2px;
    margin: 0;
}

.composer-prosemirror-parent {
    flex: 1;
    display: flex;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    min-height: 36px;
    max-height: 208px;
    /* max-h-52 = 52*4px */
    position: relative;
    overflow-y: auto;
    scrollbar-width: thin;
}

.composer-prediction-ghost {
    position: absolute;
    inset: 0;
    pointer-events: none;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    color: transparent;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 24px;
    padding: 0;
    transition: opacity 0.16s ease;
}

.composer-prediction-ghost.hidden {
    opacity: 0;
}

.composer-prediction-prefix {
    visibility: hidden;
}

.composer-prediction-suffix {
    color: var(--text-primary);
    opacity: 0.26;
}

.composer-prediction-row {
    display: flex;
    align-items: center;
    padding-top: 6px;
}

.composer-prediction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-glass-strong);
    background: var(--bg-surface-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    font: inherit;
}

.composer-prediction-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.composer-prediction-label {
    font-size: 12px;
    letter-spacing: 0.01em;
}

.composer-prediction-word {
    color: var(--text-primary);
    font-weight: 600;
}

.composer-prediction-hint {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}

/* Textarea \u2014 exact: font-size:16px, line-height:24px, padding:0 */
#userInput,
.composer-prosemirror-parent textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    /* exact from chatgpt.com */
    line-height: 24px;
    /* exact 24px */
    resize: none;
    outline: none;
    padding: 4px 0 2px;
    min-height: 30px;
    display: block;
    position: relative;
    z-index: 1;
}

#userInput::placeholder,
.composer-prosemirror-parent textarea::placeholder {
    color: var(--text-placeholder);
}

/* Keep long code-mode placeholder readable in the right sidebar composer */
.app-shell.code-workspace #userInput::placeholder,
.app-shell.code-workspace .composer-prosemirror-parent textarea::placeholder {
    font-size: 14px;
    line-height: 1.25;
}

/* [grid-area: leading] \u2014 the + button column */
.composer-leading {
    grid-area: leading;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8px;
    /* align with bottom of primary area in expanded */
}

/* [grid-area: footer] \u2014 the model/feature pills row */
.composer-footer-pills {
    grid-area: footer;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: visible;
    scrollbar-width: none;
    padding-top: 8px;
    /* gap below primary */
}

/* [grid-area: trailing] \u2014 mic + send buttons column */
.composer-trailing {
    grid-area: trailing;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
}

/* Shared slot so idle Lottie and typed send occupy exact same position */
.send-slot {
    position: relative;
    width: var(--send-control-size);
    height: var(--send-control-size);
    flex: 0 0 var(--send-control-size);
    transform: translateY(var(--send-slot-offset-y));
}

/* Composer Button (+ and mic) \u2014 Codex token size = 28x28 */
.composer-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.composer-btn svg {
    width: 18px;
    height: 18px;
}

.composer-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

/* Model selector pill \u2014 gray, rounded-full, 36px tall */
.composer-pill-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px;
    background: var(--bg-surface-secondary);
    border: none;
    border-radius: 999px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.composer-pill-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Send button */
.send-btn {
    background: #0b0b0f;
    color: #ffffff;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    opacity: 0;
    visibility: hidden;
    padding: 0;
    box-shadow: none;
    pointer-events: none;
}

.send-btn:hover {
    background: #15151a;
    transform: none;
}

/* Lottie remains visible at rest; hide it while send/stop button is active */
.send-idle-lottie {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    overflow: visible;
}

/* Show send-btn when typing OR when streaming */
.composer-box.has-text .send-btn,
.composer-box.streaming .send-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.composer-box.has-text .send-idle-lottie,
.composer-box.streaming .send-idle-lottie {
    opacity: 0;
    visibility: hidden;
}

.send-btn.stopping {
    background: #0b0b0f;
    color: #ffffff;
}

.send-lottie {
    width: var(--send-lottie-size);
    height: var(--send-lottie-size);
    display: block;
    pointer-events: none;
    overflow: visible;
}

dotlottie-wc.send-lottie {
    width: var(--send-lottie-size);
    height: var(--send-lottie-size);
    display: block;
}

.send-lottie svg,
.send-lottie canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Backward compat aliases */
.submit-btn {
    background: var(--text-primary);
    color: var(--bg-base);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
    border: none;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}




.composer-input-area {
    display: flex;
    flex-direction: column;
    background: transparent;
    min-height: 32px;
    /* ProseMirror min-h-[2rem] */
}

/* Exact Codex textarea — 13px base, no margin on <p> */
.composer-input-area textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    /* --text-base = 13px */
    resize: none;
    outline: none;
    padding: 4px 6px;
    /* tight inside the 8px box padding */
    max-height: 180px;
    line-height: 1.5;
    /* --leading-normal */
    margin: 0;
}

.composer-input-area textarea::placeholder {
    color: var(--text-placeholder);
    opacity: 0.5;
    /* Codex uses opacity:.5 on placeholder */
}

/* Base icon button — Codex uses h-token-button-composer = 28px */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.icon-btn:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

/* Exact Codex: grid-template-columns:minmax(0,1fr) auto auto, gap=4px (1 spacing unit) */
.composer-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 4px;
    /* gap-1 = 1 * 4px */
    padding-top: 4px;
    /* 4px between textarea and footer row */
}

.composer-footer-left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    /* gap-1 = 4px between + and pills */
}

.composer-footer-right {
    display: flex;
    align-items: center;
    gap: 4px;
    /* gap-1 = 4px */
    flex-shrink: 0;
}

/* Model pill — rounded-full, px-2 (8px), text-xs (11px) */
.mode-btn {
    background: rgba(128, 128, 128, 0.1);
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    /* py-1 px-2 */
    border-radius: 999px;
    /* rounded-full */
    font-weight: 500;
    font-size: 12px;
    /* text-xs */
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.mode-btn:hover {
    background: rgba(128, 128, 128, 0.18);
    color: var(--text-primary);
}

.submit-btn {
    background: var(--text-primary);
    color: var(--bg-base);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
    opacity: 0.25;
    flex-shrink: 0;
}

.mic-btn {
    opacity: 0.65;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8f8f93;
    padding: 0;
}

.mic-btn:hover {
    opacity: 1;
    background: transparent !important;
}

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

/* Show submit-btn when typing OR when streaming */
.composer-box.has-text .submit-btn,
.composer-box.streaming .submit-btn {
    display: flex;
    opacity: 1;
}

.composer-box.has-text .submit-btn:hover,
.composer-box.streaming .submit-btn:hover {
    opacity: 0.75;
}

/* Hide mic while typing; keep visible when streaming */
.composer-box.has-text:not(.streaming):not(.dictating) .mic-btn {
    display: none;
}

.dictation-ui {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    min-width: 110px;
    padding-right: 2px;
    color: var(--text-secondary);
}

.dictation-ui.hidden {
    display: none;
}

.dictation-wave {
    width: 72px;
    height: 28px;
    display: block;
    color: var(--text-secondary);
}

.dictation-timer {
    font-size: 12px;
    line-height: 1;
    min-width: 28px;
    text-align: right;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.composer-box.dictating .mic-btn {
    opacity: 1;
}

.disclaimer {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-placeholder);
    padding-top: 2px;
    padding-bottom: 14px;
    text-align: center;
}

/* Model Selector Dropdown */
.model-selector-container {
    position: relative;
    display: inline-block;
}

/* ===== ChatGPT-style Dropdown Popover ===== */
.model-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    z-index: 100;
    padding: 8px;
    overflow: hidden;
}

.model-dropdown.hidden {
    display: none;
}

/* Header label — muted gray, smaller text */
.dropdown-header {
    padding: 8px 12px 6px;
    font-size: 13px;
    color: var(--text-placeholder);
    font-weight: 400;
    user-select: none;
}

/* Each dropdown item — flex row with icon, label, checkmark */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    transition: background 0.12s;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Icon in each item */
.dropdown-item-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.dropdown-item-icon.model-icon {
    border-radius: 7px;
    padding: 2px;
    border: 1px solid var(--border-glass-strong);
    background: rgba(51, 156, 255, 0.12);
}

.model-icon-sparkle-pro {
    color: #7bb3ff;
    background: rgba(123, 179, 255, 0.16);
}

.model-icon-sparkle {
    color: #4fb0ff;
    background: rgba(79, 176, 255, 0.14);
}

.model-icon-sparkle-plus {
    color: #2ee7b0;
    background: rgba(46, 231, 176, 0.15);
}

.model-icon-stacy {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.14);
}

.model-icon-stacy-pro {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.16);
}

.pill-model-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    border: 1px solid var(--border-glass-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 176, 255, 0.18);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill-model-icon-wrap .pill-model-icon-svg {
    border: none;
    background: transparent;
    padding: 0;
}

.pill-model-icon-wrap.model-icon-sparkle-pro {
    color: #7bb3ff;
    background: rgba(123, 179, 255, 0.2);
}

.pill-model-icon-wrap.model-icon-sparkle {
    color: #4fb0ff;
    background: rgba(79, 176, 255, 0.18);
}

.pill-model-icon-wrap.model-icon-sparkle-plus {
    color: #2ee7b0;
    background: rgba(46, 231, 176, 0.2);
}

.pill-model-icon-wrap.model-icon-stacy {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.2);
}

.pill-model-icon-wrap.model-icon-stacy-pro {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
}

/* The label text fills remaining space */
.dropdown-item-label {
    flex: 1;
    font-weight: 400;
}

/* Checkmark — hidden by default, shown on .selected */
.dropdown-check {
    flex-shrink: 0;
    opacity: 0;
    color: var(--text-primary);
    transition: opacity 0.12s;
}

.dropdown-item.selected .dropdown-check {
    opacity: 1;
}

/* Pill icon color — blue to match ChatGPT "Thinking" */
.pill-icon {
    color: #2563eb;
    flex-shrink: 0;
}

/* Chevron rotation when dropdown is open */
.pill-chevron {
    transition: transform 0.15s;
}

.model-selector-container.open .pill-chevron {
    transform: rotate(180deg);
}

.model-item.loading {
    color: var(--text-secondary);
    font-style: italic;
    cursor: default;
}

.model-item.loading:hover {
    background: transparent;
}

/* ===== Tools Dropdown Menu ( (+) button ) ===== */
.tools-selector-container {
    position: relative;
    display: inline-block;
}

.tools-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    padding: 8px;
}

.tools-dropdown.hidden {
    display: none;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--text-primary);
    transition: background 0.12s;
    text-align: left;
}

.tool-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tool-icon {
    flex-shrink: 0;
    color: var(--text-primary);
    opacity: 0.8;
}

.tool-label {
    flex: 1;
    font-weight: 400;
}

.tool-arrow {
    flex-shrink: 0;
    opacity: 0.5;
}

.code-only-item {
    display: none;
}

.code-only-divider {
    margin: 6px 4px;
}

.code-plan-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-plan-switch {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
    position: relative;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.code-plan-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease;
}

.code-plan-item.is-on .code-plan-switch {
    background: rgba(10, 122, 255, 0.35);
}

.code-plan-item.is-on .code-plan-knob {
    transform: translateX(18px);
}

.dark-theme .code-plan-switch {
    background: rgba(255, 255, 255, 0.2);
}

.dark-theme .code-plan-item.is-on .code-plan-switch {
    background: rgba(10, 122, 255, 0.5);
}

.tools-dropdown.code-workspace-menu .tool-item {
    display: none;
}

.tools-dropdown.code-workspace-menu .tool-item[data-mode="attach"] {
    display: flex;
}

.tools-dropdown.code-workspace-menu .dropdown-divider {
    display: none;
}

.tools-dropdown.code-workspace-menu .code-only-item {
    display: flex;
}

.tools-dropdown.code-workspace-menu .code-only-divider {
    display: block;
}

.tools-dropdown.code-workspace-menu .tools-submenu {
    display: none !important;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 6px 4px;
}

/* Tools Sub-menu positioning with transitions */
.tools-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 8px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 6px;
    z-index: 1001;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Smooth transition */
    opacity: 0;
    transform: translateX(-4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tools-submenu:not(.hidden) {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    display: flex;
}

.tools-submenu.hidden {
    display: none;
}

/* Ensure sub-menu stays open when hovering from More to Submenu */
.has-submenu {
    position: relative;
}

/* Active Pills in Footer */
.active-pills-container {
    display: flex;
    gap: 8px;
    margin-right: 8px;
    align-items: center;
    min-height: 34px;
}

.active-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass-strong);
    border-radius: 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.active-pill:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-strong);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.active-pill .pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    font-size: 15px;
    opacity: 1;
    color: inherit;
}

.active-pill .pill-label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.active-pill svg {
    flex-shrink: 0;
}

.tool-check {
    margin-left: auto;
    color: var(--text-secondary);
}

.tool-check.hidden {
    display: none;
}

.tool-item.selected {
    color: var(--text-primary);
    background: var(--bg-surface-secondary);
}

.tool-item.selected .tool-icon {
    color: var(--text-primary);
    opacity: 1;
}

/* =======================================
   LIGHT THEME OVERRIDES 
   ======================================= */
/* Removed redundant light theme overrides for composer and messages since they are flat variable-driven now */

.light-theme .code-block {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.light-theme .code-block code {
    color: #333333;
}

.light-theme .code-header {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .code-lang {
    color: rgba(0, 0, 0, 0.5);
}

.light-theme .thinking-block {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

.light-theme .thinking-block:hover {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.01));
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.08);
}

.light-theme .thinking-content {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.7);
}

.light-theme .task-block {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .agent-text th {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .agent-text tr {
    background: #ffffff;
}

.light-theme .agent-text tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.light-theme .agent-text th,
.light-theme .agent-text td {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.light-theme .pip-video-widget {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Removed redundant nav-icon overrides */

.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.light-theme .sidebar {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===== ChatGPT-style transcript + markdown defaults ===== */
.chat-history {
    gap: 24px;
}

.message-row {
    margin-bottom: 0;
    animation: messageSlideIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.message-row.user .message-bubble {
    max-width: min(80%, 640px);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.45;
}

.message-row.agent .message-content {
    gap: 12px;
}

.agent-avatar {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    margin-top: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    font-size: 12px;
}

.agent-avatar.thinking {
    padding: 0 10px;
    height: 24px;
    border-radius: 12px;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.agent-text-container {
    max-width: min(100%, 700px);
}

.agent-text {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0;
}

.agent-text p {
    margin-bottom: 14px;
}

.agent-text h1,
.agent-text h2,
.agent-text h3,
.agent-text h4 {
    margin: 18px 0 10px;
    line-height: 1.35;
    color: var(--text-primary);
}

.agent-text h1 {
    font-size: 1.6rem;
}

.agent-text h2 {
    font-size: 1.35rem;
}

.agent-text h3 {
    font-size: 1.18rem;
}

.agent-text p code,
.agent-text li code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.05rem 0.35rem;
}

.code-block {
    margin: 14px 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #101218;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.code-block:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
}

.code-header {
    background: #171b24;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    font-size: 12px;
}

.code-lang {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.62);
}

.code-header button {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.code-header button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.code-block pre {
    padding: 12px 14px;
}

.code-block code {
    font-size: 12.5px;
    line-height: 1.6;
}

.dropdown-check {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.agent-text-container.streaming .agent-text {
    animation: streamPulse 220ms ease-out;
}

@keyframes streamPulse {
    from {
        opacity: 0.72;
        transform: translateY(1px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.light-theme .agent-text p code,
.light-theme .agent-text li code {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .code-block {
    background: #f7f7f8;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.light-theme .code-header {
    background: #eceef2;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.light-theme .code-lang {
    color: rgba(0, 0, 0, 0.55);
}

.light-theme .code-header button {
    color: rgba(0, 0, 0, 0.72);
}

/* ── SDUI Incremental Streaming Blinking Cursor ── */
.agent-text-container.streaming .sdui-conditional>div:last-child::after,
.agent-text-container.streaming .sdui-repeater>div:last-child::after,
.agent-text-container.streaming .agent-text:last-child p:last-child::after {
    content: '▍';
    display: inline-block;
    vertical-align: bottom;
    animation: sdui-blink 1s step-end infinite;
    margin-left: 2px;
    color: var(--text-primary);
}

/* Do not show a standard text cursor inside the CodeBlock's pre element */
.agent-text-container.streaming .code-block:last-child code::after {
    content: '▍';
    display: inline-block;
    vertical-align: bottom;
    animation: sdui-blink 1s step-end infinite;
    margin-left: 2px;
    color: var(--text-primary);
}

@keyframes sdui-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .sidebar-drawer {
        width: min(86vw, 320px);
    }

    .app-shell.sidebar-open .content-area {
        margin-left: 0;
    }

    .app-shell {
        min-width: 0;
    }

    .top-nav {
        padding: 0 12px;
    }

    .chat-feed-container {
        padding: 16px 12px 128px 12px;
    }

    .welcome-hero h1 {
        font-size: 24px;
    }

    .composer-container {
        padding: 0 12px;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .sparkle-image-page {
        gap: 24px;
    }

    .sparkle-image-header h2 {
        font-size: 24px;
    }

    .sparkle-image-compose {
        min-height: 58px;
    }

    #imageModePromptInput {
        font-size: 16px;
    }

    .sparkle-image-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .sparkle-image-style-card,
    .sparkle-image-style-thumb {
        min-width: 132px;
        width: 132px;
    }

    .sparkle-image-style-thumb {
        height: 194px;
    }

    .sparkle-image-style-label {
        font-size: 14px;
    }

    .sparkle-image-discovery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sparkle-image-discovery-item span {
        font-size: 14px;
    }
}

/* ===== ChatGPT Parity Renderer (Final Override Layer) ===== */
:root,
.dark-theme {
    --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body {
    font-size: 14px;
    letter-spacing: 0;
}

.main-layout,
.content-area {
    min-height: 0;
}

.content-area {
    overflow: hidden;
}

.chat-feed-container {
    position: relative;
    z-index: 1;
    min-height: 0;
    max-width: var(--composer-max-width);
    overflow-y: auto;
    padding: 18px 24px 64px 24px;
}

.chat-history {
    gap: 26px;
    padding-bottom: 20px;
}

.composer-container {
    z-index: 45;
    pointer-events: none;
}

.composer-container::before {
    z-index: 1;
    height: 230px;
    background: linear-gradient(to top, var(--bg-base) 36%, rgba(24, 24, 24, 0) 100%);
}

.light-theme .composer-container::before {
    background: linear-gradient(to top, #ffffff 36%, rgba(255, 255, 255, 0) 100%);
}

.composer-container>* {
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.message-row {
    margin-bottom: 0;
}

.message-row.user .message-bubble {
    max-width: min(82%, 660px);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.45;
}

.message-row.agent .message-content {
    gap: 12px;
    max-width: min(100%, 720px);
}

.agent-avatar {
    width: 24px;
    height: 24px;
    margin-top: 4px;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-text-container {
    max-width: min(100%, 720px);
    gap: 8px;
}

.thinking-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    min-height: 22px;
    letter-spacing: 0;
}

.thinking-status.done {
    color: var(--text-secondary);
}

.thinking-pulse {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.78;
    box-shadow: 0 0 8px rgba(51, 156, 255, 0.28);
    animation: sparkleThinkingPulse 1.15s ease-in-out infinite;
}

.thinking-status.done .thinking-pulse {
    display: none;
}

@keyframes sparkleThinkingPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.35;
    }

    50% {
        transform: scale(1);
        opacity: 0.95;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.35;
    }
}

.agent-text {
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0;
}

.agent-text p {
    margin: 0 0 0.92em;
}

.agent-text p:last-child {
    margin-bottom: 0;
}

.agent-text ul,
.agent-text ol {
    margin: 0 0 0.95em 1.2em;
}

.agent-text li {
    margin: 0.18em 0;
}

.agent-text h1,
.agent-text h2,
.agent-text h3,
.agent-text h4 {
    margin: 1.1em 0 0.55em;
}

.agent-text p code,
.agent-text li code {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 0.08rem 0.35rem;
}

.code-block {
    margin: 12px 0;
    border-radius: 20px;
    background: #ffffff;
    border: 0;
    box-shadow: none;
}

.code-header {
    background: transparent;
    border-bottom: 0;
    padding: 14px 18px;
}

.code-lang {
    font-size: 13px;
    letter-spacing: 0;
    color: #8a8a93;
    text-transform: lowercase;
}

.code-header .copy-btn {
    border-radius: 8px;
    padding: 3px 8px;
    color: #7c7c84;
    font-size: 16px;
}

.code-header .copy-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #5d5d66;
}

.code-block pre {
    padding: 18px 20px;
    background: transparent !important;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.54;
    background: transparent !important;
}

.code-block code.hljs {
    background: transparent !important;
}

.chatgpt-thinking-details {
    margin: 0 0 0.95em;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.chatgpt-thinking-details summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 11px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.chatgpt-thinking-details summary::-webkit-details-marker,
.chatgpt-thinking-details summary::marker {
    display: none;
}

.chatgpt-thinking-content {
    padding: 0 11px 11px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.chatgpt-thinking-content p:last-child {
    margin-bottom: 0;
}

.agent-actions {
    opacity: 0.94;
    transform: none;
    transition: opacity 0.16s ease;
}

.message-row.agent:hover .agent-actions {
    opacity: 1;
}

.agent-actions .action-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    padding: 0;
    color: var(--text-secondary);
}

.agent-actions.image-response-only-actions .action-btn {
    display: none !important;
}

.agent-actions.image-response-only-actions .regen-msg {
    display: inline-flex !important;
}

.agent-text-container.chatgpt-response:has(.agent-mode-surface.mode-image) .agent-actions .action-btn {
    display: none !important;
}

.agent-text-container.chatgpt-response:has(.agent-mode-surface.mode-image) .agent-actions .regen-msg {
    display: inline-flex !important;
}

.agent-actions .action-btn:hover {
    background: var(--bg-surface-secondary);
    color: var(--text-primary);
}

.agent-actions .action-btn.active {
    color: var(--text-primary);
    background: var(--bg-surface-secondary);
}

.message-row.agent .message-content {
    gap: 0;
}

.message-row.agent .agent-avatar {
    display: none !important;
}

.agent-text .code-block pre {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0;
}

.light-theme .agent-text .code-block,
.light-theme .code-block {
    background: #ffffff;
    border: 0;
}

.light-theme .agent-text .code-block pre,
.light-theme .agent-text .code-block code,
.light-theme .agent-text .code-block code.hljs,
.light-theme .code-block pre,
.light-theme .code-block code,
.light-theme .code-block code.hljs {
    background: transparent !important;
    color: #1f2937 !important;
}

.agent-text-container.streaming .agent-actions {
    opacity: 0 !important;
    pointer-events: none;
}

.light-theme .agent-text p code,
.light-theme .agent-text li code {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .code-block {
    background: #ffffff;
    border: 0;
}

.light-theme .code-header {
    background: transparent;
    border-bottom: 0;
}

.light-theme .code-lang {
    color: #8a8a93;
}

.light-theme .chatgpt-thinking-details {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .chat-feed-container {
        padding: 16px 12px 54px 12px;
    }

    .message-row.user .message-bubble {
        max-width: min(88%, 560px);
    }

    .agent-text {
        font-size: 14px;
    }
}

/* ===== ChatGPT Symbol Asset Overrides ===== */
.cg-icon {
    --cg-icon-src: none;
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    mask-image: var(--cg-icon-src);
    -webkit-mask-image: var(--cg-icon-src);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.cg-icon[data-icon="copy"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAI6ADAAQAAAABAAAAIwAAAAC4vEOnAAACz0lEQVRYCe2YuWtVQRTG4y4uUeJaKGIjuICSTjsLG2slaKeilfoXWAliKSqoWLh1KigINhZpRKyFKKQQcQMLIwjuuP2+xzuX7+YumXff1SoHPs6ZmbO9c2bmTjIwME3lFZhRPj3l7BAaO8F6sAjMBlW+/rD2C3wBr8HDLof1R/MxPwd+AAVpgt/Y3QTLQGOai+UoaJJAmc04vnIJqbypdAJFtSZoDOEx+AjUBgWsolksqJ1bwY6u0gb4BTDSHSczVWUCxC88izwz2TqveNT8qGVr88tTj4bNwTvkXipa5v2R+dsfCqm/bl0YwJ+BnzZuIj4xo6wyqcksMONPJjcV3cfCcFJV7l0o7AObwXKwFARp7U0M4LGPviG/B/rVN4A2dxVprwRVFkRZ3gURoB9+GT9zIuIkftpinIq1yZW5xcLuWOyTH+7aH0n148nsxcgTuc34CtDp8RuXYY70GRDmgTXgGFArRUroKqhrmfQKdI+ZaMu1wmr6hBJ7AMLXxRLT0jb55tlmRrrUmpKSOG/GunWTyJPRqQl6G0JD7vbut9adJ6MvctD3EBpyHfMg9xtzamWQKtkhT8YV/B4I3V54FgAj9xs+/OBkt7knE4pt87JkBi1Idhv/j2QsbkdUzO02+cLkTFRpA4uz2WbCRvPlnw61Ry/FiKP7awh0yHsXc21zveZ0h+lxtQmsAkGXED7EwHlkK95mZdyvy6PEKTtpnZxc8V8mM0G0k0Cvxxx5m5RM7PzgOeUeBm6vNhwHn8ErMAa0V2rpK6tRneRbs8KjPi3h63mFTmHaj7ZvpNUFzd4m3F4PriTyZJ6axSGTm4gHzcj92nS9eIDlKK0+B2fAFrACDAJt6iosYW0lGAbXQfgRj7cNYjrpDy09gtxRv/Kd9PBFTVWhrYTu4yt7+RdDpc2oQmqZXmt6l+iUqW11VdKft/ovw0ug23YPmKbWKvAXsZL03eZddJ0AAAAASUVORK5CYII=");
}

.cg-icon[data-icon="regenerate"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAiCAYAAACnSgJKAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIgAAAAApNqnBAAAC3ElEQVRYCe2XOYgVQRCG33ofiLB44oWwYKAILggqaKKgiW6mIHiAhiYGamSiCCayoaBmumrmAaYeeIDHiisqnssiYiCyeOB9fv8wNZRz9izrS7Tge11dXdXV3dM906/R+FelpebER+O/FNphOoyEd/AMrkEP/AIvU6jsgEtw1jeE6m04Hob3oM6L6KVtF4wDk2Mo8v8Gk8wYUg7FaS98haKEefaX+HeA5AqYz4LIEv8M85WUPp76SViVsquqGT6Gz9AK8+KSIpKp/J4CDXxIZKnxMxbf22AjVqkl3wNzIC3aO4vhOPwEH+frf8wcv4xopKfBd6CNMjnjmW9YgvkR+HjTK5NvSwV2Ug9dOu2RMTADusGSWlmafAIB/S7oBHrocVyOr46dJcorS5MfcMHP0TWLUOnCMS+ht80v6mwUDW9cB+uKHAvsW12sT2j6U9r1UkrEL+karGfilheUs0A7tY7MxXliToD6uQN6LIn4c74isTYaR9HrJlb4fddHpep3cbvzvuz0pqh9ZLHnU+sdPNDR+ZnrxSI5B68irck/s8nnBzRY6YfT0RHQ+z5vQw5Wntx+1mK1R7rbPP7GLK1vXy5yleQUNSv5Qpe81nF0cQNSpxH1A7TsmrW+H5H4l4wM2gz6JrepkiPXsW0E3WxCZQuOtsJX0V8XBe6kwTZGUbm6KDjHrhuN/9Jt9j42IrPp6lQmWrbeMgfXpu/GQbDLpG64+kQnkl72pMEph9B74votytANsx/fjjhOxXb44uoZdR+W9HK/xbYy41lsGEGTXii+H11EKyUvuXXSRfTMih60Hx6Axai8AfqzkZGyZT+Pt26kFrgeXReMC3ARdDn4BK2gL6KWOD24m9g0IPlVip+5npE67QM/k1BddwLdjgolvds/Ok/purvrD4EGpSMTIvdw0q1oA+hPRbDoq/YE7oJeOF50ZDaBjstD+ADfoR/0XDthGfirGdX/kl2B3+6P4PZAGMHFAAAAAElFTkSuQmCC");
}

.cg-icon[data-icon="thumb-up"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAjCAYAAABsFtHvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIwAAAAAUVoBxAAACpElEQVRYCe2XTahOURSGD9e/G8lPYfBFkoFMJFJIRDcpSkmUAcqAGRkoZkaUMlJKKBkwlIgBysRNoUhSVyJ/KV3/19/zunud1rfPOZ/Dd86dsOq9691r7/2ub6+z99nnJsm/ah1tLnwU83eCBUHnGf5H4LW7YyGZEgp3wUJQu80hwzdgic1/Jrai7uwXXeKH8F7Xfg0fC2qxlajaSvvgM0ED9ACL74ZXboNRvAMsyRGXYb2LX3LxyugWl+AtfIJTnub6tPkqtdGo2XHSyvdE6otpW0WuR31tN/c78cfwEZHiAdd/OOprqzmZ2e+c+MYcNZXaVl7pcTvlhLvhg6LkDdevYzcs6s80h2Qi/YEu3AYwC3SCMWAqMNsF0Qq9rXYN6d4Ar8BtcBLcAy1NG+oMsNLl+aMFCqdbzPtK376CeWn43G8EdKaLyrm1xVxbRHw60sRrosknaK9zsSfpyGIyna55YD5YArQprwJL/gneABk7T8QGHQy9412sTPKMKAE9/2tOZ2/eoBduwKQwoIrkklrrtM8G7UTvaTN7TX4h8NKCFfn3TmeocZ/cuO7oqm22E+wxbgmtXZdf5IRvOp5S22wf0kiSVPHMtcA3wPTT3T4QK59L4nFhQY/wupB+2UAkX2bJ8Fccb9rtKossvjD6o3//d7mbetnxJvqRln6A3+0qlz2rp02jyzVGMsx0v8O1h3JN4pZoYhihM6lLQXGdVb2t/sRWMdg0u+OJ/pnfd52bA+/DPwhc/51sCrys2+4G6vXdZB2upU8iu5OXwlUmvXJVOjun+mTuBXrP64cPz0EnsRngENDFJJPWNqAjl2sq8S1gZarSl/qem0JyfXlUmfg4ev7x0iw2fSzsALqHVXbdwToBZX6QyquL6Tm4ALrAf8tU4CeOp/gBCUzP8QAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="thumb-up-filled"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAjCAYAAABsFtHvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIwAAAAAUVoBxAAABu0lEQVRYCe2Xu0oDURCG4wXxVihYiI2dhbbiG/gOFimChdiIYCFapNAnEBtr0VYrQQTxAopYiI0XLBQLQRuLKIiFt28WZ5mEzWZd9uwWceDPTM5lvjlnN9mzuVy9WlMCC+8jxxTqQrfoG6VijVDOkABF56gfpWIFKApWf0Nbh2t6O4CHALgUMeMaXqwCFvieS3gvyV9D4BdR4HLDxLFFJnWGTJTL4cSGyPqB9AYL8nNOyCTdrgGWYqTAxG2UjEErtW13iVNJ2I2uIsCX48IbmDiGtlABqc0TlJBdYbX4kXHXSAo9RitoBIWagNeQJp01o5dMu/b/xX8xX3ak7NfVbAATxHnzPclQFiYPHyl4WhPbSia10aGXAoY1v4UPaqNDLzswrvktvEUbHXv/5rNwx0w/vf+3nAX8XsvIAn6SJXw3K7icAU6zgh8ClsexZ2lfc3/LhV438CcWe+nt9++HXbl/LeyABOOdylwW7uQEYoCrJvZCC1+v6JSXArVnDWL6Debth81tpfMI6SFh0wweIH43fTomipcDZ6TXpzYGLiB523xDPUhNDo/yMvCJakFfGHOA8kgeo/9WtgM/A4GfL4ipSqIAAAAASUVORK5CYII=");
}

.cg-icon[data-icon="thumb-down"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAjCAYAAABsFtHvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIwAAAAAUVoBxAAACnklEQVRYCe2WzYtPURjHx1t5yXuKJmaDUDaIUqNZiMXYoMjGxk5RktjaaZJ/wFaxoWxFxoQNUWJDGK8lRCnvg8+37nPne+/vjHtn3J8NT317nvOc5zzfe8495zyno+NflXEVE59Jfy9YAWRPAHXkB0FfwFtwB1wAX0Ft2U3kG/CzAbwkxxZQS/YS1QSp5xgi53ZnTy37EgLugUlZ4CD6HNASKoEShmi8MBfsAp0g5CRGEM7LnO/Ri4FyJeUE3vjia9hTk1Gtzlm4boMYezQLmY9+ZP59mT+pHltgdzJiZOdmGztgYdo/8VGnzV8wl1rQa+zxhd7qxgIb/9DC15g//6hy8o024CK2jsxo5JsFx56R66P5p4RdRR5xdbWWNiXaeCH5XeHksnsiAn3J7CbN/IQ5+SoYZmcs+l+Dmd025eQ9xtKuWRtFcTevt55+s9tm+syXGcsNs5sw8/9MsnxTOvkMY1FBaVKmWbL82Dn5MwvQTdWkeEXTZm6RI3jiCtTt1t0SUe1QgYkcT7PwHejP5u/N/AU1ndYLC1KSV+AuuAVugjNgDhhJttER5Ho8PLe2/NeBrzbNYVmN+Q5EgpQ+MBxesA5WjHtA/8LCiERjET5Vnk8gRa66XZZ1OIZAKl4bTLVdJbe2qDCoymnzRdLv2Kllv2ox/dibwAawEkwGY5adjAzyK4ks/p+1Wl2JmDG7TjEyyA+Vsmh17lv/sVL/HzefWPLlpWz7rU/HU8/rxmQimWLWH0pZRaSbMPp/+zYrja3d1HkVgV4p/pjsy/zq09L7y4VmM6KLIWZ3OEvZhfZba2szVK1Z9uAKcp3l4+C8+Qaw2yb67yKID3CtB+batjFniVUwLgMnlq2b8K+IHgSqUGeBjp8KTSf4L6NegV8JGuaN1rcruAAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="thumb-down-filled"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAjCAYAAAD17ghaAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIwAAAADrJhgjAAABwElEQVRYCe1XPS9EURBdBInPRGdlm41OIhQoRbBRa4lo1PgBGr3GH1BJFAoaH4kOjdImPloFOokE8RXO2byRyc3uu++tzM0mTHLM3Dfzzpw3m3fvk8n8datLMIA8aqaBXqDZU/+K/BGwreomEfP+c2ATeAQSWSOq1oFP4Csl1lAvlkMgHHeIhyQR5zkZPkXaxlLPhj2qwbXiukfcqXJlwzl1g5Cm9WOK+cThW5ZcvQSOX3LW1Sw1N8VrG5aFLpJrHN2gLIx8q/CWEzAhyRC+JgWMh3hy6eFOoA+JbkmG8K6AoL8/H7CmBHD3Gw0xdt1DT4Dvf7tOhoi1AB4+wU0LuEX3l0AKfrZmLYBn+V4gATyWS6YF8MIK8FbK2P7ZFXpXwCUSs8C7FBj4HXDu+3gHUHAAyJdM2m8B1ust/RjrZ4BfSk1AYutAZT8wEuEC3ifmCjUFgPeK5RG0yKJa34UbP4A4AZwYp2diM2CNa87chknniHTLI+AJee6mJsZz4gGIm8CqSeeINOdpzo2lzVJA1iNgwbK5cN9UEFHE9QYpsvSLFQRMWTbV3Ny23TfhUBeEiPk2zAOnwBnA/5j/7VcT+AZzjbGzCSYNgwAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="dots-horizontal"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAYCAYAAAACqyaBAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAGAAAAADCpwnmAAACCElEQVRIDe2Wuy9EURDGL7ERRKFYREg2EolIFCoFhURBpVJISBT+F4VOq9mKSqUQDR09CRKNVSEEhUc8gu+7u3N27ty5m9szydwz883vnDk5ex8bRf9WP4Eiwq56mhm1oDKYWU0WSkgLSSmdDUN6hF/DB9LloDQh2oP/wFeC6gdLkL/hB/BmH6mqOxi4IL1cldzrfI0h9wTvdKkoaoN+D5c1FzO4qBeFLwW+IO7IgHcVx4WXM7gFw+1ncBF3JTuUcdaBW6G9GnbL4SiVDfeBvJ0Fmv4NxqtS4uppoyB4nNo8jnWr86Ybk4m6+YiIasyrlTDHbohPw5BaS8Kwpm7eL1U15tW4Tp+ax5D3EDdgLTxFunmPpZB3O5rHEbOszWWpoOvm9tgIh5tDZmL0OI/15pIL83Vz7w2UV+OilrU5GVrQdXM+BtberYDc44hZ3Zub4HTzZ1aM8UVjzePIWN2bm+B081vbBflNTo2YZW0uS4U+unlFqmq8UrGEnvaJIj9G2u6QvGmhFldE081PRVRjXu0Cc7gBbfySnWmhFoc1dfNDB/S0c3D87GrzONaPNISY98WJ0eKUn0XeJPJR4bF5byjCm4ojP0fRsRlosh7HbYcJ0oaCV4OaDiYVd4m4kEZihSfLn0Q2MJ3BxXIR12M4jzHrD0IM4rIGf4BPwRvZBIr8Q7HeCPpbtV/ZMm7dCBmjRgAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="sound-on"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAiCAYAAAA3WXuFAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAJKADAAQAAAABAAAAIgAAAAClThZcAAAC0UlEQVRYCe2Wy6tNYRjGt0suUY4BQgohdHBcTgYyMpEJMxMDmSmSUowYGFIG/gNl4A9wiYGBSyFJKYQQHQ6HQyiXXH7P2etdPWedtbZ9W/tMzlvP/p7v/d79vs/+9rfeb1UqY1Z7B8bVXi5c7WLlAFgNnoHT4BUYFVtG1Rfgr+ETfA3ouC2nYh9wMcFvdlrNSgq+NTHalUNgwHwz4B2xbqr0g9iNQXhvUvmC+ZcmvlKGmWTtAfuBdiPEfICvA2GlC9pApavgDwgRMervkUi3ZgQdI8E1sNYT5fHtOH+AEODjc/z667LWqKA5JIi817PJfL6AyRcL1g69BPolh8F0kGdFgtTj9gH95d7vJjJ/B0LUeniuncIbQQ/gesTrsSJBO/hy5JMwt+NMYu2kLzh/bEHqwPVakaCtJIiiH+HTLKGaa6w9Mv8wGmen0SugSJCS3wBReM+wapXKU1vrirXxQRgnJfy7+VqlJyzBNuOid22+KrgLCl87xysk+50kVDtxe2KT+cHLFvSNQrpuZLOrQ/qpZhuWXjllC1JBtQ9ZtpbOVljaFrJBEdCucSqJ5ibJ1Hvc0oOM83MslC1oC4XUCGX3qkP6uSRl1VeaoakL+pkETLbAVulBS3DeuKhf0GrEI8z7wooRq8WOoj40i69EDxqEpwcXvtjW/GkbdtAuEhR2FrIwJk2Oek25n3z3KGN6TuC7Er+G7M6lS4tgekzjV/2CPwSXgO6iKSDPinZIsWq2urTd9ES9BlFnoy9m+U4cEhLBPuqu0x2UtVqCsrGaS6RuA+W+Df5rm4m4BVxM8Df4s+erUUESoB9+DnRrUq/NI3ATOAK+ghDVD/dEzQgiRWumlyi9QoQoNbl4RRkVQfo5PWAAhCjxvUA7Fj7vvrjLN+3KexACfLxTfvn8Cjo/fRlROmO9+eGNeSc0Fj4UrfNzJvmehFwGu0Fu+8c/Zm3dgX/YMtzmwKwEywAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="sound-off"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAjCAYAAAATx8MeAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAJaADAAQAAAABAAAAIwAAAAAfiPSvAAAD4ElEQVRYCe2XX2iWZRjGta2UwlYy/6RisBUlJIY4D2QpJJigB0IQSCNIOhLEEwl2oCR4IFJ0MA8KyZSRgWkTholak7YRSUGIRM4yNDtRtMwIU8z8XR/v/Xnt/d5ne7cGg/CCa/f93H+e536f93nu99uECfdRbgcmlgtLRrXieQ0+Dr+G78G/4JhBC/TAzbBMsVuJuwP/NZ5FnwHHDF8xUyzwAfoDiZlV8E6LjZyQexJ5ozJ35Bbax7i+YKa9ubh+xtvMdqUgZ9SmB8n8xCbXk38KH4KBRSixI5LdcHLmdHvRw2RhIxd1pHRCX+Aw41i4Ef1q5lecL+45bifsv0NnqQv6Il8wfiSbejqyJdNdeHyZot4huQ8u9klS+mocuta+iPR++ChMweOHK+p5Jon406kJw96Ect0SIjHkN/imRnBORoykF/UC4+2w2eIb0P3BV5qvRn0fS0z+K/oSqL4VNslTUK8wD4+Joh4mKBb/ET3OpnK9reimF0L95zcYky+3qE1ml/8HOMv8Ur2R1mU+FfE7jDnbM7vEQrP/ge63XP4K9KmI5L/R881zPTZf+CfGT8LAURTl61I4NjCIebX7UbBiLppPRdZArySStWNFeB3jPzDiLqA/lQXqSdXH8k88CdtlGDl+29QHw74OvYL8boQ9JT/E0QZvZwFzkb1wHrwFv80kooqbaMeqo8EtYMDsc0L3olRxGXxM0CtQRQhPwC/hAg0S0CEPzAwFqfMWeCwULypsZWQXQWugzp4wDZ6ALRoUQGcx4Gv6RuiiVeABYSsrjxC4CurKC7oon8NWDXKIcyfzJfNVdwebbmAFXlS10nCWkD3EvATVcAV1fN1CbyeyN+lPBp27wDOhIHUTa9CARdspxtPXBCUMunWRK3kDahcDa1GuwUPQN0K3N/JSr35Qo1tGwkgQk4fURXh5iAnm44vYP9HVOgrRiTUCf0YvbGiFmffyIl9SrePVRPy72CP2QCKmYn6Wv9r6CJY8B/vgDtgMU/CcXwiKsZrtG7kkNVgd7IjRL5MhET0oElzqlWxMZHucDrZ6U9jUEvS5CfiH+gzGUpdMh043S5PFxC61a3m4vx6nmur30O1vWtKL6HqFfgPNnVYbcanANjgAfYFdjP0muU9FCcr/DrrvLcZjBv0cPg59gf2M4wPs9ihKi6upnoTuL9ppxY4KKuAg9AXUxdvNVvQLYwr+XotRfgcsdZaIGxZ1ROyGXpjrHyVm0OHO77SOwJhBT/g29GKkn4ezYQpqkN3Q85amgkdrX0GiduYzuAX6B5ZhIfyfXrWYpwujxsGonda38blxWPt/tORdCmdPepsAUKYAAAAASUVORK5CYII=");
}

.cg-icon[data-icon="mic"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAjCAYAAABo4wHSAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHaADAAQAAAABAAAAIwAAAADAahC2AAACmklEQVRIDe2XTYhOYRTHx9f4Sr5qBiFhM+WjKKOsZmmFjSg1G2yUWNhMkdkoVqxQsrERpiZpZnwkCis2onykWAyilJTvr9//7Z46zr33ve9737vCqX/Pec45/3Pufe55nud929r+FRnT5ItOI3496ALt4DkYAqOgchlLxj7wAfwK+MH8NJgJKpPxZBoEsVicPyJmblVVj4SCH5lfARfBm+C7xVyr0pIshv0V2FuNoHe4jBPR40Ntdf5S6gFYVvAp+uScLGddnFahJbkK24ruqZNptYv7VCeu5ipaf98YD+oke+h8k9BnuHlKLSo6wTG+OT2q+u5ePM/ba3pR0RShCsP/olWsYm6OouX1DaIDPk+iz/NSnFg0bv5XjrHM6VFd7gzap+/dfIrTU+p2LNoWd4H2mmQ/sMPhGfpUGTPkPDaLu+z8JxL7KWf7Q72TBIjcm3gWMWqpLOE1dH9gaGWOOr/iNgPJUmC8n+i6rVJyDIsF3XbeQ84u/2dwAwyDd8A4Gm8C+2Fw2PnuoWfKKqw+wcYkahzjheDzcabrmOxMOAsZdQWab3dizxwuuUDdlQuSKDXcPqAGsUQ2fsembzcdSHQEaqXM/xK9bjN1EeCf8DFzPbWJGmkT6AMHQS+wt0OtNaAudyuocZscRbKTAE96y3wLsG+Vx1+D4z7w3DN5wVn2/kBWIn0zLbGSzwGzgfbuDuDvXSs6hL0dNCW7iP4CLEkz40l4+ilTSlbCug4aLfiE2A2lKmWQ1mI7DtRY2uj+IdSd54CKZR4A2FuWvWSwogNlsjX6ZPo7oe2kDp7vCum3UHcyf8H42vlaUmfBHgX2dnmjmm5dI5Xi1ZbFWYFxXpYj2LQ9eoKt9FStr30YGyi+sTp3SekqfyXxN3Ig4c7mUeqBAAAAAElFTkSuQmCC");
}

.cg-icon[data-icon="mic-filled-off"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAjCAYAAABsFtHvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIwAAAAAUVoBxAAADAklEQVRYCeWWS4iOcRTGx/02ci1RyDVJIbkWC80slFhIoZiF21JhQ8lK1lKUlIgSk5Qo5VLCxmyQEI1SbtO4NS7NYPg99Z56/Oedb77vNVZz6umc/znPOef7/te3qqqnSq+Cf3weebVgJHgLroP7oLAsIPMS2FyiwjRit8HvHOgHTAGF5C5ZUXR7ToU5+D4bJ7ium4jPysnt0lVvhX9hr00ydlvcG6b2U3iDktwuh2NgPANRrBW7Jsk6ZPHg5ekdSV5Zw0mwXlmDFuz5lqkNetrieY3la7Ccikyt2QcQhZuxZ1iFftiXLR481+3EB1pOReYS2F9BFHyJPd4qDMbubNdHzgTjV2yuIKMNRLHH2KOtynDsBxYPXujCxy56bMDQFEbBe9jVEUSPBY0g4q7/ubn67EqKX2M8QIFM1ES3nDeW3S3Ndbmkhevx9QYhszE+Aef9t+Zqciw6Z3op+huIH9AtzWdawSgc+mDWONRKjB8Zv/Bu9+txVFYsGqZ6Z3TO9Cb0T+A13E7ofw8PMFSDo+Z+kvnSxhrrNNQZV6ZmIEQ3ojh7wlFKvyYYRWPq9ma+vObyaapXgVR8yfTgdCl606PJvow9FP3C/BF3/Z34sowfapvlnA1nKb3eEj5ia80lc8F74A1TW8dNRzNEx/E8EM+XIuIddF88z0EUvmiM6dg3LRYc17pwplpOf2w9xWV/sq2B7AWPJMm6VPRma3NKbwSa9shpxB4HCstJMqOY9FXgL1taeDUOHbHIeYg9IiWVO9b9fQNEMelWcAKokT48hoGJ2fgUug04/w5jPb+FZAhZ54AXrNS+Qr4+QArLFjKbQDmN38DTw+PcM4zL3nBwO0g1nq1AS/EFeHF99eipVTym+XjCOcy4W0THMZqrsT+v0aAPxgXjib8/gkW0zu9CsAhEcx0x+YTJwCVv09Y5oVxb6x4NO9PtcNYlBXU1N1jurYjnTVfEUl2bOnLG2lQ1ib+FsT5GH2V+7f6KZTkZzaCzfy3/O7AY5ImWIF2WPF4P8P0BjBZWl2cckrIAAAAASUVORK5CYII=");
}

.cg-icon[data-icon="send-arrow"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAzCAYAAACAArhKAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMwAAAADzENywAAADV0lEQVRYCe1YS2gTQRhOshrzkIolBZEcIs2jEIJi9SAejBdP0pOoBw+Kiqj4OEikChYrKioqPioKgnjRmwcR9aYXBSkipBTzqgaUeJCsoqh5x29KZ/iTzT6Ssl7cgWX+5/fN/8/MZlubzRrGOiCFw+HtwWBwwFi4MsqhNOlbQHoBUQ8dDsdTzJJ+hjKi6ySQrgTMPTxs0ct9Pp9cLBbfKKG1Ld1WbAfcBB6x4GazOR6NRpdp0yi9XRGHQqGdgFjfBtNXq9Uut9l0VVaBoRGLxZaWy+U0gjseKOz3xlQq9dIQGIIMV1ypVM6pkTKyRqMxMTw8vJDJRobYK63gSCSyBnt5GzFaHRpAR37KsvxaC4v7jFTsAOktJOjG2u32U7jbfg6uNeuC4UDtBcBaAiKD4DfRPxN5MXxXia4qahLjzvoAxPaWjlF0oMQNkI9DrnId8VtQ9Sauq82axABlb6h+kjyZyWTuEt2GmPfQr1AbyG/ibjuprV1WJcaq1wFgF0lo4Mrsh94gtlnR5XKdgfCJ25EXwi1IcL3TrEYsgYQdKHGKUdkd3NO3nUCSyeQv+I9SH8hPDA0NBaiNyh2JcaAOImgVCfyKqk4SXSFms9lHMD4nDne9Xr9G9BZRQczeu1jtOI1CNYmpqalv1NZJBtEh2MvcB5wRFLGZ63RWEFer1UsIWEKCXqGa+0RXFWdmZnJwsgMpBsiv+/1+tzDMCS3EOFAbYN9BgupIPAC9SWyaIg7VeQR8JEEr3G73KNFnRUEcj8cX4ECxnzwx0OIb6XQ6KQwGhHw+X0LeYRqKxScGBweD1CaIC4XCPjiixPkFAGNENyxia54g9zFJWCRJ0kWit7x/t1IHEo/lcrkf1NaNDKIjiP9DckYCgYCL66JiGPq4EfMLrPoB0bsWcefzWPxZkih5vV4P1ynx5JyxigR2j+c9nE4nuyGZOaAP09PTMgcVxGjNGAjZvuxGtez9O+8BogowtwHoGQ7YHgooXonUqCfjV6uImH4Why+P1TgL7/Ry2v2i4naH2bpFbHaHBb7VatEKswWr1WZ3WOBbrRatMFuwWm12hwW+1WrRCrOFXlst/gOABVZ6WWRPxPhy5F+hJY/Hk/9nxPgUPg2y73jG2R/lvRD/fzl/AeiM+GQjSbRNAAAAAElFTkSuQmCC");
}

.cg-icon[data-icon="stop"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAgCAYAAAAWl4iLAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAFqADAAQAAAABAAAAIAAAAAAyQH58AAAAzUlEQVRIDWNgGGqAEc3BvkB+IxALo4nj4/4ESi4F4iYg/o9NoQFQ8BdUEqSAVFyMzVCQ2DwyDEO2/BFQPzPIIHTwECiArJBU9j+gfi2YoUwwBpCWRmKTwwTFlyRMI7LBWL0BU0gkzQJTh2wwTIwq9KjB8GAcDYrRoICHAJwxmipGgwIeAnAGXVIFqM6iFPyFGYDs4pcwQTJpUOX7CqYX2eBDMEEy6ddAfTew6bUHCoKCg9RqH6a+DZuhMLEMIOMNiYb/AKqfC8RsQDyEAQCEKFpSlDYXbQAAAABJRU5ErkJggg==");
}

.cg-icon[data-icon="menu"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAgCAYAAADqgqNBAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAH6ADAAQAAAABAAAAIAAAAABT9vqhAAAA7ElEQVRIDWNgGKmAEcnj9kD2bCBmRxKjNvMe0EA/IP6MbvBxoMB/OuACmMVMMAaQ1kFi05IJtwfZ8p+0tBHJbLg9yJbvQFJAS+ZOmOEsMAaQrgPip0DMhiRGbeZDoIG7YYYip3ZQKPACMbIYTB216D9Ag75Qy7BRc0ZDYDQERkNgNARGQ2DwhABy9QlicwExshgpLv0LVPydFA3IjQlxoMYwICa3MfEWqHcVEH8FYpLBFKAOSluvUSTbCtXwnAqWryXFcuQGJB8pGnGoJckMZMtv4zCQFGGyzQgC2gJqU5Mb76+AetVIcenIVQsAv4RfdDitz4gAAAAASUVORK5CYII=");
}

.cg-icon[data-icon="sidebar-mac"] {
    --cg-icon-src: url("./assets/chatgpt-symbols/sidebar-mac.png");
}

.action-icon {
    width: 16px;
    height: 16px;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.send-icon {
    width: 18px;
    height: 18px;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.mic-icon {
    width: 17px;
    height: 17px;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.nav-rail-icon {
    width: 20px;
    height: 20px;
    mask-size: contain;
    -webkit-mask-size: contain;
}

.send-btn {
    width: 100%;
    height: 100%;
    background: #0b0b0f;
    color: #ffffff;
    box-shadow: none;
}

.mic-btn {
    width: 30px;
    height: 30px;
    opacity: 0.62;
}

.mic-btn:hover {
    opacity: 0.95;
}

.send-btn:hover {
    background: #15151a;
    color: #ffffff;
    transform: none;
}

.send-btn:active {
    background: #1c1c22;
}

.send-arrow-svg {
    width: var(--send-icon-size);
    height: var(--send-icon-size);
    display: block;
}

.chat-feed-container {
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable both-edges;
}

.composer-container::before {
    pointer-events: none;
}

.sidebar-drawer {
    width: 286px;
    color: #1a1b20;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    box-shadow: none;
}

.app-shell.sidebar-open .content-area {
    margin-left: calc(286px - var(--sidebar-width)) !important;
    transition: margin-left 0.22s ease;
}

.app-shell.sidebar-open .narrow-sidebar {
    opacity: 0;
    transform: translateX(-110%);
    pointer-events: none;
}

.app-shell.sidebar-open .brand-area {
    transform: translateX(calc(286px - var(--sidebar-width)));
    opacity: 0.95;
}

.sidebar-drawer-header {
    padding: 14px 12px 7px;
    align-items: center;
}

.sidebar-brand-btn {
    border: none;
    background: transparent;
    color: #1a1b20;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
}

.sidebar-brand-btn svg {
    width: 22px;
    height: 22px;
}

.sidebar-brand-mark {
    width: 22px;
    height: 22px;
    display: block;
    background: transparent;
}

.sidebar-brand-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    background: transparent;
    color: rgba(0, 0, 0, 0.56);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.24);
    color: rgba(0, 0, 0, 0.82);
}

.sidebar-toggle-icon {
    width: 17px;
    height: 17px;
}

.sidebar-drawer-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 10px;
}

.sidebar-primary-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
}

.sidebar-menu-action {
    border: none;
    background: transparent;
    color: #1a1b20;
    width: 100%;
    min-height: 48px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    font-size: 15px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: -0.14px;
    border-radius: 10px;
    cursor: pointer;
}

.sidebar-menu-action svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.92;
}

.sidebar-menu-action span {
    font-size: 15px;
    line-height: 1.18;
    font-weight: 600;
}

.sidebar-menu-action:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-templates-link {
    margin-top: 14px;
    border: none;
    background: transparent;
    color: rgba(0, 0, 0, 0.48);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    cursor: pointer;
    letter-spacing: -0.12px;
    border-radius: 9px;
    min-height: 30px;
}

.sidebar-templates-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.66);
}

.sidebar-chevron {
    font-size: 15px;
    line-height: 1;
}

.sidebar-section-label {
    margin-top: 12px;
    margin-bottom: 6px;
    color: rgba(0, 0, 0, 0.62);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.12px;
    padding: 0 10px;
}

.sidebar-conversation-list {
    padding: 0 2px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-conversation-item {
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #1a1b20;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    display: block;
    cursor: pointer;
}

.sidebar-conversation-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.sidebar-conversation-title {
    font-size: 15px;
    line-height: 1.26;
    font-weight: 650;
    color: #1a1b20;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.95;
}

.sidebar-conversation-meta {
    display: none;
}

.sidebar-conversation-empty {
    color: rgba(0, 0, 0, 0.48);
    padding: 8px 12px 4px;
    font-size: 13px;
}

.sidebar-profile-row {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 12px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
}

.sidebar-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #1f232b;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.sidebar-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-profile-name {
    font-size: 15px;
    color: #1a1b20;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.14px;
}

.sidebar-profile-plan {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.48);
    line-height: 1.1;
}

.light-theme .sidebar-drawer {
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    color: #1a1b20;
}

.light-theme .sidebar-close-btn {
    border-color: rgba(0, 0, 0, 0.16);
    color: rgba(0, 0, 0, 0.56);
}

.light-theme .sidebar-close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.24);
    color: rgba(0, 0, 0, 0.82);
}

.light-theme .sidebar-menu-action {
    color: #1a1b20;
}

.light-theme .sidebar-menu-action:hover {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .sidebar-templates-link,
.light-theme .sidebar-section-label,
.light-theme .sidebar-profile-plan,
.light-theme .sidebar-conversation-empty {
    color: rgba(0, 0, 0, 0.48);
}

.light-theme .sidebar-section-label {
    color: rgba(0, 0, 0, 0.62);
}

.light-theme .sidebar-templates-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.66);
}

.light-theme .sidebar-conversation-item {
    color: #1a1b20;
}

.light-theme .sidebar-conversation-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .sidebar-conversation-title,
.light-theme .sidebar-profile-name,
.light-theme .sidebar-brand-btn {
    color: #1a1b20;
}

.light-theme .sidebar-profile-row {
    border-top-color: rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.light-theme .sidebar-profile-avatar {
    background: #1f232b;
    border-color: rgba(0, 0, 0, 0.14);
}

.dark-theme .sidebar-drawer {
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    color: #1a1b20;
}

.dark-theme .sidebar-brand-btn,
.dark-theme .sidebar-menu-action,
.dark-theme .sidebar-conversation-title,
.dark-theme .sidebar-profile-name {
    color: #1a1b20;
}

.dark-theme .sidebar-templates-link,
.dark-theme .sidebar-section-label,
.dark-theme .sidebar-profile-plan,
.dark-theme .sidebar-conversation-empty {
    color: rgba(0, 0, 0, 0.48);
}

.dark-theme .sidebar-section-label {
    color: rgba(0, 0, 0, 0.62);
}

.dark-theme .sidebar-close-btn {
    border-color: rgba(0, 0, 0, 0.16);
    color: rgba(0, 0, 0, 0.56);
}

.dark-theme .sidebar-close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.24);
    color: rgba(0, 0, 0, 0.82);
}

.dark-theme .sidebar-menu-action:hover,
.dark-theme .sidebar-templates-link:hover,
.dark-theme .sidebar-conversation-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-theme .sidebar-conversation-item:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

.dark-theme .sidebar-profile-row {
    border-top-color: rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.dark-theme .sidebar-profile-avatar {
    background: #1f232b;
    border-color: rgba(0, 0, 0, 0.14);
}

@media (max-width: 900px) {
    .sidebar-drawer {
        width: min(90vw, 292px);
    }

    .app-shell.sidebar-open .content-area {
        margin-left: 0 !important;
    }

    .app-shell.sidebar-open .brand-area {
        transform: none;
        opacity: 1;
    }
}

.agent-actions .action-btn {
    width: 30px;
    height: 30px;
}

.cg-icon[data-icon="arrow-up-lg"] {
    --cg-icon-src: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAzCAYAAACAArhKAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAMwAAAADzENywAAACOElEQVRYCe1XTShEURT2HylFFGUxCxsbP7GxMjZWVlZSig0LxcpCbFhZKDtKWclKKRt2SlmxsCFRJMpCCYnk//tq7nTmzH0z782bN5J36uvec+453/fuee/dN5OXF5q7DhQirQ+ocZeevax5UH0DBwAvIifWDJUPgMLEOBC45UNhDzCiHB+BWiBQGwK7FDXztSBVK0F+6yDMC4gCgdgSWM0ObeMx1ouzrdwOws80wryYiWwKF4Bs34UohZ+AeiArNgIW2do7+M8idi3mzFsHfFs1GCgkhYdVrB/+m8rphu/LVlAtRdlytl5eTCv8OZV3Br8EyMg6UPUFGGE+XG0xJi1cjviVyGXNdCzX08Dz9xAwohwXBYMW5lIvIPNf4EcATzaGbEnCg4MHiDGbMNe2AVm3aQrcjDx3HxTBoCp0Em5A3quq7VG1ju6qKuRHgR8HaU7CzJkB5K4v4JdxIZV1YlEW8fPXZClIJVyKfIpJnlkLRzxUhNmRKliIryZOUgkzk+2Vwmw/b4PVRhGVyTfwK6yZye+xLY0PluTbsCUxtqsSeSI5Wbodsy4C8JUy4rxtvA1JJt/bnaTVxIAbYVZMAUaYYxWD2pYR4CLP3Ua9qHy3wjw2TwHyniuOuFuHGe/LQDziPHErTIYWYAvoouPXvAhbtfil+RULhXPW9rDVYasD60D4cAXWWk0ctlp3JDA/bHVgrdXEf67V72IH/FXq2TLd8UlMiX9NLj2r+iiIovYemPTB8c9KfwCuuOUF82KP1gAAAABJRU5ErkJggg==");
}

/* 2026.54 code preview/play */
.code-header .code-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.code-header .preview-btn,
.code-header .copy-btn {
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 3px 8px;
    color: #7c7c84;
    font-weight: 500;
}

.code-header .preview-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.code-header .preview-icon,
.code-header .copy-icon,
.code-header .check-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.code-block pre::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.code-block pre {
    scrollbar-width: none;
}

.dark-theme .code-header .preview-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.code-header .preview-btn.is-active {
    background: rgba(0, 0, 0, 0.08);
}

.code-preview-inline {
    margin: 10px 16px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
}

.code-preview-inline.hidden {
    display: none !important;
}

.code-preview-inline-toolbar {
    height: 38px;
    padding: 0 10px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
}

.code-preview-inline-title {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.62);
    text-transform: lowercase;
}

.code-preview-inline-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-preview-inline-convert,
.code-preview-inline-close {
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5f5f68;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.code-preview-inline-convert {
    background: rgba(0, 0, 0, 0.06);
}

.code-preview-inline-convert:hover,
.code-preview-inline-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.code-preview-inline-frame {
    display: block;
    width: 100%;
    height: min(58vh, 560px);
    border: 0;
    background: #ffffff;
}

.code-preview-inline-frame.hidden {
    display: none;
}

.code-preview-inline-note {
    margin: 0;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    background: #ffffff;
}

.dark-theme .code-header .preview-btn.is-active {
    background: rgba(255, 255, 255, 0.14);
}

.dark-theme .code-preview-inline {
    border-color: rgba(255, 255, 255, 0.14);
    background: #11141c;
}

.dark-theme .code-preview-inline-toolbar {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    background: #171b24;
}

.dark-theme .code-preview-inline-title {
    color: rgba(255, 255, 255, 0.72);
}

.dark-theme .code-preview-inline-convert,
.dark-theme .code-preview-inline-close {
    color: rgba(255, 255, 255, 0.82);
}

.dark-theme .code-preview-inline-convert:hover,
.dark-theme .code-preview-inline-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dark-theme .code-preview-inline-frame {
    background: #0f1218;
}

.dark-theme .code-preview-inline-convert {
    background: rgba(255, 255, 255, 0.12);
}

.dark-theme .code-preview-inline-note {
    color: rgba(255, 255, 255, 0.82);
    background: #11141c;
}

/* 2026.51 final visual/runtime overrides */
.chat-feed-container,
.composer-container {
    max-width: var(--composer-max-width) !important;
}

.left-compose-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.dark-theme .code-block,
.dark-theme .agent-text .code-block {
    background: #12141b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.dark-theme .code-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.dark-theme .code-lang {
    color: rgba(255, 255, 255, 0.64) !important;
}

.dark-theme .code-header .copy-btn {
    color: rgba(255, 255, 255, 0.82) !important;
}

.dark-theme .code-header .copy-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.dark-theme .code-block pre,
.dark-theme .code-block code,
.dark-theme .code-block code.hljs,
.dark-theme .agent-text .code-block pre,
.dark-theme .agent-text .code-block code,
.dark-theme .agent-text .code-block code.hljs {
    background: transparent !important;
}

/* 2026.62 code workspace layout */
.app-shell.code-workspace .main-layout {
    padding: 14px 18px 12px 0;
    min-height: 0;
    height: calc(100% - 56px);
    overflow: hidden;
}

.app-shell.code-workspace .content-area {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    grid-template-rows: 1fr;
    gap: 14px;
    align-items: stretch;
    padding-left: 72px;
    overflow: visible;
    padding-bottom: 16px;
}

.app-shell.code-workspace.sidebar-open .content-area {
    margin-left: 0 !important;
}

.app-shell.code-workspace .chat-feed-container {
    grid-column: 1;
    max-width: none !important;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 20px 24px 32px 24px !important;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.86);
}

.app-shell.code-workspace .chat-feed-container .welcome-hero {
    display: none !important;
}

.app-shell.code-workspace .composer-container {
    grid-column: 2;
    position: relative;
    bottom: auto;
    width: 100%;
    max-width: none !important;
    height: 100%;
    min-height: 0;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.86);
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
}

.app-shell.code-workspace .code-sidebar-hero {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 16px;
    bottom: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.app-shell.code-workspace .code-sidebar-hero h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.24;
    font-weight: 500;
    color: var(--text-primary);
}

.app-shell.code-workspace .composer-container::before {
    display: none;
}

.app-shell.code-workspace .quick-prompts-row {
    display: none !important;
}

.app-shell.code-workspace .composer-box {
    margin-bottom: 0;
    border-radius: 28px;
    width: 100%;
}

.app-shell.code-workspace .composer-leading,
.app-shell.code-workspace .composer-footer-pills,
.app-shell.code-workspace .composer-trailing {
    padding-top: 8px;
}

.app-shell.code-workspace .disclaimer {
    margin-top: 0;
}

.app-shell.code-workspace .composer-voice-btn {
    display: none !important;
}

/* Agent workspace uses the same right info-bar shell as code workspace */
.app-shell.agent-workspace .main-layout {
    padding: 14px 18px 12px 0;
    min-height: 0;
    height: calc(100% - 56px);
    overflow: hidden;
}

.app-shell.agent-workspace .content-area {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    grid-template-rows: 1fr;
    gap: 14px;
    align-items: stretch;
    padding-left: 72px;
    overflow: visible;
    padding-bottom: 16px;
}

.app-shell.agent-workspace.sidebar-open .content-area {
    margin-left: 0 !important;
}

.app-shell.agent-workspace .chat-feed-container {
    grid-column: 1;
    max-width: none !important;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 20px 24px 32px 24px !important;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.86);
}

.app-shell.agent-workspace .chat-feed-container .welcome-hero {
    display: none !important;
}

.app-shell.agent-workspace .composer-container {
    grid-column: 2;
    position: relative;
    bottom: auto;
    width: 100%;
    max-width: none !important;
    height: 100%;
    min-height: 0;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.86);
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
}

.app-shell.agent-workspace .code-sidebar-hero {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 16px;
    bottom: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.app-shell.agent-workspace .code-sidebar-hero h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.24;
    font-weight: 500;
    color: var(--text-primary);
}

.app-shell.agent-workspace .composer-container::before {
    display: none;
}

.app-shell.agent-workspace .quick-prompts-row {
    display: none !important;
}

.app-shell.agent-workspace .composer-box {
    margin-bottom: 0;
    border-radius: 28px;
    width: 100%;
}

.app-shell.agent-workspace .composer-leading,
.app-shell.agent-workspace .composer-footer-pills,
.app-shell.agent-workspace .composer-trailing {
    padding-top: 8px;
}

.app-shell.agent-workspace .disclaimer {
    margin-top: 0;
}

.dark-theme .app-shell.agent-workspace .chat-feed-container {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 18, 24, 0.8);
}

.dark-theme .app-shell.agent-workspace .composer-container {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 18, 24, 0.8);
}

.light-theme .app-shell.agent-workspace .chat-feed-container,
.light-theme .app-shell.agent-workspace .composer-container {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.dark-theme .app-shell.code-workspace .chat-feed-container {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 18, 24, 0.8);
}

.dark-theme .app-shell.code-workspace .composer-container {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 18, 24, 0.8);
}

/* Code workspace follows active app theme */
.light-theme .app-shell.code-workspace .chat-feed-container,
.light-theme .app-shell.code-workspace .composer-container {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.light-theme .app-shell.code-workspace .composer-box,
.light-theme .app-shell.code-workspace .workspace-shell,
.light-theme .app-shell.code-workspace .workspace-list-item,
.light-theme .app-shell.code-workspace .workspace-template {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.dark-theme .app-shell.code-workspace {
    --bg-base: #0b0f16;
    --bg-surface: #101722;
    --bg-surface-secondary: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(12, 18, 28, 0.94);
    --bg-glass-hover: rgba(19, 28, 40, 0.96);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-strong: rgba(255, 255, 255, 0.14);
    --text-primary: #f3f6ff;
    --text-secondary: rgba(243, 246, 255, 0.74);
    --text-placeholder: rgba(243, 246, 255, 0.52);
}

.dark-theme .app-shell.code-workspace .composer-box {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-theme .app-shell.code-workspace .workspace-shell,
.dark-theme .app-shell.code-workspace .workspace-list-item,
.dark-theme .app-shell.code-workspace .workspace-template {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
    .app-shell.code-workspace .content-area {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-left: 0;
    }

    .app-shell.code-workspace .chat-feed-container {
        border: 0;
        border-radius: 0;
        height: auto;
        min-height: 0;
        background: transparent;
        padding: 20px 24px 140px 24px !important;
    }

    .app-shell.code-workspace .composer-container {
        position: absolute;
        bottom: -1.4%;
        padding: 0 24px;
        min-height: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        justify-content: flex-start;
        gap: 0;
    }

    .app-shell.code-workspace .code-sidebar-hero {
        display: none !important;
    }

    .app-shell.code-workspace .quick-prompts-row {
        display: flex;
    }

    .app-shell.code-workspace .composer-box {
        height: auto;
        min-height: 0;
    }

    .app-shell.agent-workspace .content-area {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-left: 0;
    }

    .app-shell.agent-workspace .chat-feed-container {
        border: 0;
        border-radius: 0;
        height: auto;
        min-height: 0;
        background: transparent;
        padding: 20px 24px 140px 24px !important;
    }

    .app-shell.agent-workspace .composer-container {
        position: absolute;
        bottom: -1.4%;
        padding: 0 24px;
        min-height: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        justify-content: flex-start;
        gap: 0;
    }

    .app-shell.agent-workspace .code-sidebar-hero {
        display: none !important;
    }

    .app-shell.agent-workspace .quick-prompts-row {
        display: flex;
    }

    .app-shell.agent-workspace .composer-box {
        height: auto;
        min-height: 0;
    }
}

/* 2026.90 code-mode runtime + skills panel */
.code-skills-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* Backend-only skills integration: never show catalog UI */
.code-skills-panel,
#codeSkillsPanel {
    display: none !important;
}

.code-skills-panel.hidden {
    display: none !important;
}

.code-skills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: #111827;
}

.code-skills-sync-btn {
    border: 0;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.08);
    color: #111827;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
}

.code-skills-sync-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.code-skills-search {
    width: 100%;
    border: 0;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
}

.code-skills-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 88px;
    overflow: auto;
}

.code-skill-chip {
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
}

.code-skill-chip-empty {
    opacity: 0.55;
    cursor: default;
}

.code-skill-chip.is-selected {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.code-skills-status {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(17, 24, 39, 0.64);
}

.code-skills-status.is-good {
    color: #0a7a3e;
}

.code-skills-status.is-bad {
    color: #b42318;
}

.code-skills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: min(42vh, 420px);
    overflow: auto;
    padding-right: 2px;
}

.code-skill-row {
    border: 0;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.04);
    text-align: left;
    padding: 9px 10px;
    display: grid;
    gap: 4px;
    cursor: pointer;
}

.code-skill-row.empty {
    color: rgba(17, 24, 39, 0.6);
    background: rgba(0, 0, 0, 0.02);
}

.code-skill-row.is-selected {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.36);
}

.code-skill-title {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.code-skill-meta {
    color: rgba(17, 24, 39, 0.62);
    font-size: 11px;
    text-transform: lowercase;
}

.code-skill-desc {
    color: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    line-height: 1.45;
}

.agent-tool-cards {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-tool-cards.hidden {
    display: none !important;
}

.agent-mode-surface {
    margin-top: 8px;
    margin-bottom: 2px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.86));
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.agent-mode-surface.hidden {
    display: none !important;
}

.mode-surface-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mode-surface-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.mode-surface-title-flash {
    animation: modeCreatingFlash 0.95s steps(2, end) infinite;
}

@keyframes modeCreatingFlash {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.34;
    }
}

.mode-surface-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.09);
    color: rgba(15, 23, 42, 0.88);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.agent-mode-surface.state-responding .mode-surface-pill {
    background: rgba(59, 130, 246, 0.16);
    color: rgba(30, 64, 175, 0.95);
}

.agent-mode-surface.state-complete .mode-surface-pill,
.agent-mode-surface.state-ready .mode-surface-pill {
    background: rgba(16, 185, 129, 0.18);
    color: rgba(6, 95, 70, 0.95);
}

.mode-surface-subtitle {
    color: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    line-height: 1.45;
}

.mode-surface-lanes {
    display: flex;
    gap: 8px;
}

.mode-surface-lanes span {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.12));
    animation: modeLaneMove 1.3s ease-in-out infinite;
}

.mode-surface-lanes span:nth-child(1) {
    width: 30%;
}

.mode-surface-lanes span:nth-child(2) {
    width: 48%;
    animation-delay: 0.16s;
}

.mode-surface-lanes span:nth-child(3) {
    width: 22%;
    animation-delay: 0.32s;
}

@keyframes modeLaneMove {
    0%, 100% {
        transform: scaleX(0.86);
        opacity: 0.52;
    }

    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

.agent-mode-surface.mode-image {
    background: transparent;
    border-color: rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    min-width: 0;
    border-radius: 18px;
    padding: 12px;
    gap: 10px;
    box-shadow: none;
}

.agent-mode-surface.mode-image .mode-surface-title-row {
    justify-content: flex-start;
}

.agent-mode-surface.state-ready .mode-surface-title-flash {
    animation: none;
}

.mode-image-stage {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.03);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: none;
}

.mode-image-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.66) 50%, transparent 85%);
    transform: translateX(-100%);
    animation: imageSheenMove 1.8s linear infinite;
    z-index: 1;
}

@keyframes imageSheenMove {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.mode-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: blur(22px);
    transform: scale(1.04);
    transition: opacity 0.45s ease, filter 0.9s ease, transform 0.9s ease;
    position: relative;
    z-index: 2;
}

.mode-image-preview.is-visible {
    opacity: 1;
}

.mode-image-preview.is-ready {
    filter: blur(0);
    transform: scale(1);
}

.agent-mode-surface.state-ready .mode-image-sheen {
    display: none;
}

.mode-image-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.mode-image-download {
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.98);
    color: rgba(15, 23, 42, 0.88);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.mode-image-download:hover {
    border-color: rgba(15, 23, 42, 0.28);
}

.mode-image-download svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mode-image-download[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 640px) {
    .agent-mode-surface.mode-image {
        border-radius: 16px;
        padding: 10px;
    }

    .mode-image-stage {
        border-radius: 20px;
    }
}

.agent-mode-surface.mode-web-search,
.agent-mode-surface.mode-deep-research,
.agent-mode-surface.mode-sources {
    background: linear-gradient(150deg, rgba(239, 246, 255, 0.94), rgba(224, 242, 254, 0.88));
    border-color: rgba(59, 130, 246, 0.28);
}

.agent-mode-surface.mode-shopping {
    background: linear-gradient(150deg, rgba(255, 247, 237, 0.95), rgba(254, 243, 199, 0.9));
    border-color: rgba(245, 158, 11, 0.35);
}

.agent-mode-surface.mode-study,
.agent-mode-surface.mode-quizzes {
    background: linear-gradient(150deg, rgba(238, 242, 255, 0.95), rgba(224, 231, 255, 0.9));
    border-color: rgba(99, 102, 241, 0.28);
}

.agent-mode-surface.mode-canvas {
    background: linear-gradient(150deg, rgba(250, 245, 255, 0.95), rgba(243, 232, 255, 0.9));
    border-color: rgba(147, 51, 234, 0.28);
}

.agent-mode-surface.mode-explore {
    background: linear-gradient(150deg, rgba(236, 253, 245, 0.95), rgba(220, 252, 231, 0.9));
    border-color: rgba(16, 185, 129, 0.26);
}

.dark-theme .agent-mode-surface {
    border-color: rgba(148, 163, 184, 0.24);
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.74));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.dark-theme .agent-mode-surface.mode-image {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: none;
}

.dark-theme .mode-surface-title {
    color: rgba(241, 245, 249, 0.95);
}

.dark-theme .mode-surface-pill {
    background: rgba(148, 163, 184, 0.2);
    color: rgba(241, 245, 249, 0.88);
}

.dark-theme .mode-surface-subtitle {
    color: rgba(226, 232, 240, 0.72);
}

.dark-theme .mode-image-stage {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.4);
}

.dark-theme .mode-image-download {
    background: rgba(15, 23, 42, 0.72);
    color: rgba(241, 245, 249, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
}

.agent-tool-card {
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 14px;
    box-shadow: none;
}

.agent-tool-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.agent-tool-card-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.agent-tool-card-status {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.3;
}

.agent-tool-card-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.agent-tool-card-args {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.agent-action-log {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.agent-action-log-row {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(55, 65, 81, 0.88);
}

.agent-action-log-row.good {
    color: #0a7a3e;
}

.agent-action-log-row.bad {
    color: #b42318;
}

.dark-theme .app-shell.code-workspace .code-skills-panel {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.dark-theme .app-shell.code-workspace .code-skills-header,
.dark-theme .app-shell.code-workspace .code-skill-title,
.dark-theme .app-shell.code-workspace .code-skills-sync-btn,
.dark-theme .app-shell.code-workspace .code-skills-search {
    color: rgba(243, 246, 255, 0.94);
}

.dark-theme .app-shell.code-workspace .code-skills-sync-btn,
.dark-theme .app-shell.code-workspace .code-skills-search,
.dark-theme .app-shell.code-workspace .code-skill-row {
    background: rgba(255, 255, 255, 0.07);
}

.dark-theme .app-shell.code-workspace .code-skill-meta,
.dark-theme .app-shell.code-workspace .code-skills-status,
.dark-theme .app-shell.code-workspace .code-skill-desc {
    color: rgba(243, 246, 255, 0.65);
}

.dark-theme .app-shell.code-workspace .code-skill-row.is-selected {
    background: rgba(59, 130, 246, 0.24);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.55);
}

.dark-theme .app-shell.code-workspace .agent-action-log-row {
    color: rgba(243, 246, 255, 0.82);
}

.dark-theme .agent-tool-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-theme .agent-tool-card-badge,
.dark-theme .agent-tool-card-args {
    background: rgba(255, 255, 255, 0.06);
}

.dark-theme .app-shell.code-workspace .agent-text .code-block,
.dark-theme .app-shell.code-workspace .code-block {
    background: #0c1220 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-theme .app-shell.code-workspace .code-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* 2026.96 hard light-mode lock for code workspace surfaces */
body.light-theme .app-shell.code-workspace .chat-feed-container,
body:not(.dark-theme) .app-shell.code-workspace .chat-feed-container {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .composer-container,
body:not(.dark-theme) .app-shell.code-workspace .composer-container {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .composer-box,
body.light-theme .app-shell.code-workspace .workspace-shell,
body.light-theme .app-shell.code-workspace .workspace-list-item,
body.light-theme .app-shell.code-workspace .workspace-template,
body:not(.dark-theme) .app-shell.code-workspace .composer-box,
body:not(.dark-theme) .app-shell.code-workspace .workspace-shell,
body:not(.dark-theme) .app-shell.code-workspace .workspace-list-item,
body:not(.dark-theme) .app-shell.code-workspace .workspace-template {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .code-skills-panel,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-panel {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .code-skills-header,
body.light-theme .app-shell.code-workspace .code-skill-title,
body.light-theme .app-shell.code-workspace .code-skills-sync-btn,
body.light-theme .app-shell.code-workspace .code-skills-search,
body.light-theme .app-shell.code-workspace .code-skill-meta,
body.light-theme .app-shell.code-workspace .code-skills-status,
body.light-theme .app-shell.code-workspace .code-skill-desc,
body.light-theme .app-shell.code-workspace .agent-action-log-row,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-header,
body:not(.dark-theme) .app-shell.code-workspace .code-skill-title,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-sync-btn,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-search,
body:not(.dark-theme) .app-shell.code-workspace .code-skill-meta,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-status,
body:not(.dark-theme) .app-shell.code-workspace .code-skill-desc,
body:not(.dark-theme) .app-shell.code-workspace .agent-action-log-row {
    color: #1f2937 !important;
}

body.light-theme .agent-tool-card,
body:not(.dark-theme) .agent-tool-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .agent-tool-card-badge,
body.light-theme .agent-tool-card-args,
body:not(.dark-theme) .agent-tool-card-badge,
body:not(.dark-theme) .agent-tool-card-args {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .app-shell.code-workspace .code-skills-sync-btn,
body.light-theme .app-shell.code-workspace .code-skills-search,
body.light-theme .app-shell.code-workspace .code-skill-row,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-sync-btn,
body:not(.dark-theme) .app-shell.code-workspace .code-skills-search,
body:not(.dark-theme) .app-shell.code-workspace .code-skill-row {
    background: rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .app-shell.code-workspace .agent-text .code-block,
body.light-theme .app-shell.code-workspace .code-block,
body:not(.dark-theme) .app-shell.code-workspace .agent-text .code-block,
body:not(.dark-theme) .app-shell.code-workspace .code-block {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .code-header,
body:not(.dark-theme) .app-shell.code-workspace .code-header {
    background: transparent !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-shell.code-workspace .code-block pre,
body.light-theme .app-shell.code-workspace .code-block code,
body.light-theme .app-shell.code-workspace .code-block code.hljs,
body:not(.dark-theme) .app-shell.code-workspace .code-block pre,
body:not(.dark-theme) .app-shell.code-workspace .code-block code,
body:not(.dark-theme) .app-shell.code-workspace .code-block code.hljs {
    color: #1f2937 !important;
}

/* 2026.97 runtime-resolved code workspace theme classes */
.app-shell.code-workspace.code-workspace-light .chat-feed-container,
.app-shell.code-workspace.code-workspace-light .composer-container {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.app-shell.code-workspace.code-workspace-light .composer-box,
.app-shell.code-workspace.code-workspace-light .workspace-shell,
.app-shell.code-workspace.code-workspace-light .workspace-list-item,
.app-shell.code-workspace.code-workspace-light .workspace-template,
.app-shell.code-workspace.code-workspace-light .code-skills-panel,
.app-shell.code-workspace.code-workspace-light .code-block {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.app-shell.code-workspace.code-workspace-light .code-header {
    background: transparent !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

.app-shell.code-workspace.code-workspace-light .code-block pre,
.app-shell.code-workspace.code-workspace-light .code-block code,
.app-shell.code-workspace.code-workspace-light .code-block code.hljs,
.app-shell.code-workspace.code-workspace-light .code-skills-header,
.app-shell.code-workspace.code-workspace-light .code-skill-title,
.app-shell.code-workspace.code-workspace-light .code-skills-sync-btn,
.app-shell.code-workspace.code-workspace-light .code-skills-search,
.app-shell.code-workspace.code-workspace-light .code-skill-meta,
.app-shell.code-workspace.code-workspace-light .code-skills-status,
.app-shell.code-workspace.code-workspace-light .code-skill-desc,
.app-shell.code-workspace.code-workspace-light .agent-action-log-row {
    color: #1f2937 !important;
}

.app-shell.code-workspace.code-workspace-light .code-skills-sync-btn,
.app-shell.code-workspace.code-workspace-light .code-skills-search,
.app-shell.code-workspace.code-workspace-light .code-skill-row {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* 2026.126 mobile sidebar tap-to-open behavior */
@media (max-width: 1100px) {
    .mobile-sidebar-tap-zone {
        display: block !important;
        position: fixed;
        left: 0;
        top: 56px;
        bottom: 0;
        width: 20px;
        z-index: 90;
        border: 0;
        margin: 0;
        padding: 0;
        background: transparent;
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
    }

    .left-compose-dock {
        left: 12px !important;
        transform: translateX(-140%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .app-shell.mobile-sidebar-open .left-compose-dock {
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* 2026.127 iOS/iPad sizing + safe-area stabilization */
@media (max-width: 1100px) {

    .session-corner-history {
        display: none !important;
    }

    html,
    body {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    body {
        position: fixed;
        inset: 0;
    }

    .app-shell {
        min-width: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    .top-nav {
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-layout {
        height: calc(100% - (56px + env(safe-area-inset-top, 0px)));
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    .content-area {
        height: 100%;
        min-height: 0;
        width: 100%;
        max-width: none;
        overflow: hidden;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .chat-feed-container {
        max-width: none !important;
        width: 100% !important;
        height: 100%;
        min-height: 0;
        padding: 12px 12px calc(198px + env(safe-area-inset-bottom, 0px)) 12px !important;
        overscroll-behavior-y: contain;
    }

    .composer-container {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0 !important;
        width: 100%;
        max-width: none !important;
        padding: 0 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 80;
    }

    .composer-container::before {
        bottom: 0;
        height: 160px;
    }

    .quick-prompts-row {
        width: 100%;
        padding: 8px 4px 10px !important;
        gap: 8px;
        overflow-x: auto;
    }

    .composer-autocomplete {
        margin-bottom: 10px;
        padding: 0 4px 2px;
    }

    .composer-autocomplete-item {
        gap: 12px;
        padding: 13px 8px;
        border-radius: 14px;
    }

    .composer-autocomplete-label {
        font-size: 17px;
    }

    .prompt-pill {
        font-size: 14px;
        line-height: 1.22;
        padding: 8px 14px;
    }

    #userInput {
        font-size: 17px;
        line-height: 1.35;
    }

    .composer-box {
        margin-bottom: 8px;
    }

    .disclaimer {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 2px;
        font-size: 12px;
        line-height: 1.3;
        text-align: center;
    }

    .app-shell.code-workspace,
    .app-shell.code-workspace .main-layout,
    .app-shell.code-workspace .content-area {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    .app-shell.code-workspace .content-area {
        display: flex !important;
        flex-direction: column;
        gap: 0;
        padding-left: 0 !important;
    }

    .app-shell.code-workspace .chat-feed-container {
        flex: 1 1 auto;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        padding: 12px 12px calc(198px + env(safe-area-inset-bottom, 0px)) 12px !important;
    }

    .app-shell.code-workspace .composer-container {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        padding: 0 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        justify-content: flex-start;
        gap: 0;
        min-height: 0 !important;
        height: auto !important;
    }

    .app-shell.code-workspace .code-sidebar-hero {
        display: none !important;
    }

    .app-shell.code-workspace .quick-prompts-row {
        display: flex !important;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .chat-feed-container {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .composer-container {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .left-compose-dock {
        top: calc(78px + env(safe-area-inset-top, 0px)) !important;
    }
}

/* 2026.128 dark-mobile border cleanup (remove bright edge artifacts) */
@media (max-width: 1100px) {

    html.dark-theme,
    body.dark-theme {
        background: #0b0f16 !important;
    }

    .dark-theme .app-shell,
    .dark-theme .main-layout,
    .dark-theme .content-area,
    .dark-theme .chat-feed-container,
    .dark-theme .composer-container {
        background: #0b0f16 !important;
        border-color: transparent !important;
    }

    .dark-theme .composer-container::before {
        background: linear-gradient(to top, #0b0f16 40%, rgba(11, 15, 22, 0) 100%) !important;
    }

    .dark-theme .composer-box {
        background: rgba(22, 24, 31, 0.95) !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .dark-theme .quick-prompts-row,
    .dark-theme .quick-prompts-row::after,
    .dark-theme .prompt-pill {
        border-color: transparent !important;
    }

    .dark-theme .composer-autocomplete-item + .composer-autocomplete-item {
        border-top-color: rgba(255, 255, 255, 0.06) !important;
    }

    .dark-theme .composer-autocomplete-item:hover,
    .dark-theme .composer-autocomplete-item.is-active {
        background: rgba(255, 255, 255, 0.06) !important;
    }

    .dark-theme .prompt-pill {
        background: rgba(255, 255, 255, 0.08) !important;
    }
}

/* 2026.132 iOS dark safe-area hard lock (remove top/bottom white strips) */
@media (max-width: 1100px) {

    html.dark-theme,
    html.dark-theme body,
    body.dark-theme {
        background-color: #0b0f16 !important;
        color-scheme: dark !important;
    }

    body.dark-theme::before {
        content: "";
        position: fixed;
        inset: 0;
        background: #0b0f16;
        pointer-events: none;
        z-index: -1;
    }

    .dark-theme .top-nav,
    .dark-theme .main-layout {
        background: #0b0f16 !important;
    }

    .dark-theme .composer-container {
        background: #0b0f16 !important;
    }
}
/* ── Profile settings Modal ── */

.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.profile-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    width: min(920px, 92vw);
    max-width: 92vw;
    max-height: 90vh;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.05) inset;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.profile-modal-overlay.active .profile-modal {
    transform: scale(1);
}

.profile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(128,128,128,0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.profile-modal-close:hover {
    background: rgba(128,128,128,0.2);
    color: var(--text-primary);
}

.profile-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-glass);
}

.profile-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.settings-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-nav-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 14px;
    padding: 11px 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.settings-nav-btn:hover {
    background: rgba(10, 122, 255, 0.08);
    color: var(--text-primary);
}

.settings-nav-btn.is-active {
    background: rgba(10, 122, 255, 0.12);
    border-color: rgba(10, 122, 255, 0.16);
    color: #0a7aff;
}

.settings-panels {
    min-width: 0;
}

.settings-panel[hidden] {
    display: none;
}

.settings-panel-intro {
    margin-bottom: 14px;
}

.profile-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(0,0,0,0.02);
}

.dark-theme .profile-modal-footer {
    background: rgba(255,255,255,0.01);
}

.profile-modal-save {
    background: #0a7aff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-modal-save:hover {
    background: #006ae6;
}

.light-theme .settings-code-value,
.light-theme .settings-connector-item {
    background: rgba(0, 0, 0, 0.03);
}

.dark-theme .settings-nav-btn.is-active {
    color: #7bb6ff;
}

.dark-theme .settings-code-value,
.dark-theme .settings-connector-item {
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 860px) {
    .profile-modal {
        width: min(96vw, 96vw);
    }

    .settings-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .settings-nav-btn {
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .profile-modal-body {
        padding: 18px;
    }

    .profile-modal-footer {
        padding: 14px 18px;
        flex-wrap: wrap;
    }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .settings-switch {
        align-self: flex-start;
    }
}

/* ===== Chat Response Polish (ChatGPT-like) ===== */
.chat-history .message-row.agent {
    margin-bottom: 24px;
}

.chat-history .message-row.agent .message-content {
    width: 100%;
    max-width: min(100%, 780px);
    gap: 0;
}

.chat-history .agent-text-container.chatgpt-response {
    max-width: min(100%, 780px);
    gap: 10px;
}

.chat-history .message-row.user .message-bubble {
    max-width: min(84%, 680px);
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.05);
    box-shadow: none;
}

.chat-history .agent-text-container.chatgpt-response .agent-text {
    font-size: 16px;
    line-height: 1.72;
    letter-spacing: 0;
}

.chat-history .agent-text-container.chatgpt-response .agent-text p {
    margin: 0 0 0.9em;
}

.chat-history .agent-text-container.chatgpt-response .agent-text h1,
.chat-history .agent-text-container.chatgpt-response .agent-text h2,
.chat-history .agent-text-container.chatgpt-response .agent-text h3 {
    margin-top: 1.15em;
    margin-bottom: 0.5em;
}

.chat-history .agent-text-container.chatgpt-response .agent-text blockquote {
    margin: 0.9em 0;
    padding: 0.45em 0.9em;
    border-left: 3px solid rgba(10, 122, 255, 0.36);
    background: rgba(10, 122, 255, 0.06);
    border-radius: 10px;
}

.chat-history .agent-text-container.chatgpt-response .agent-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.9em 0;
}

.chat-history .agent-text-container.chatgpt-response .agent-text th,
.chat-history .agent-text-container.chatgpt-response .agent-text td {
    border: 1px solid var(--border-glass);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.chat-history .agent-text-container.chatgpt-response .agent-actions {
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.chat-history .message-row.agent:hover .agent-actions,
.chat-history .message-row.agent:focus-within .agent-actions {
    opacity: 1;
}

.chat-history .agent-text-container.chatgpt-response.streaming .agent-actions {
    opacity: 0 !important;
    pointer-events: none;
}

.chat-history .agent-text-container.chatgpt-response .thinking-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.light-theme .chat-history .message-row.user .message-bubble {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.05);
}

@media (max-width: 900px) {
    .chat-history .agent-text-container.chatgpt-response .agent-text {
        font-size: 15px;
        line-height: 1.66;
    }

    .chat-history .message-row.user .message-bubble {
        max-width: min(90%, 560px);
    }
}

/* ===== Session Corner Scrollbar Polish ===== */
.session-corner-scroll {
    overflow-y: auto;
    padding: 1px 0;
    scrollbar-gutter: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.session-corner-scroll::-webkit-scrollbar {
    width: 6px;
}

.session-corner-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.session-corner-scroll::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
    border: 0;
}

.session-corner-panel:hover .session-corner-scroll,
.session-corner-panel:focus-within .session-corner-scroll {
    scrollbar-color: rgba(15, 23, 42, 0.24) transparent;
}

.session-corner-panel:hover .session-corner-scroll::-webkit-scrollbar-thumb,
.session-corner-panel:focus-within .session-corner-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.24);
}

.dark-theme .session-corner-scroll {
    scrollbar-color: transparent transparent;
}

.dark-theme .session-corner-panel:hover .session-corner-scroll,
.dark-theme .session-corner-panel:focus-within .session-corner-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.dark-theme .session-corner-panel:hover .session-corner-scroll::-webkit-scrollbar-thumb,
.dark-theme .session-corner-panel:focus-within .session-corner-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
}
