/* Source: public/static/css/fuuvo-ai-chat.css */
body:has(#ai-chat-model):not(.chat-landing) .composer-capability-shell,
body:has(#ai-chat-model):not(.chat-landing) .mobile-home-scenes-title,
body:has(#ai-chat-model):not(.chat-landing) #core-feature-slot,
body:has(#ai-chat-model):not(.chat-landing) #composer-title,
body:has(#ai-chat-model):not(.chat-landing) .mobile-chat-toolbar { display: none !important; }

body:has(#ai-chat-model):not(.chat-landing) .composer { position: fixed !important; left: calc(50% + 32px) !important; top: auto !important; bottom: 58px !important; z-index: 15; width: min(960px, calc(100vw - 170px)) !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; transform: translateX(-50%) !important; }
body:has(#ai-chat-model):not(.chat-landing) .composer-top { display: none !important; }
body:has(#ai-chat-model):not(.chat-landing) #chat-compose-field .chat-input-wrap { min-height: 150px !important; padding-bottom: 56px !important; overflow: visible !important; border-radius: 20px !important; }
body:has(#ai-chat-model):not(.chat-landing) #chat-compose-field #chat-input { min-height: 70px !important; }
.ai-chat-heading { position: fixed; left: calc(50% + 32px); top: 24px; z-index: 3000; width: min(960px, calc(100vw - 170px)); pointer-events: none; transform: translateX(-50%); }
.ai-chat-heading h1 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: 0; text-align: center; }
.ai-chat-heading a { position: fixed; right: 28px; top: 84px; display: inline-flex; padding: 8px 12px; align-items: center; border: 1px solid currentColor; border-radius: 8px; color: inherit; font-size: 13px; font-weight: 600; text-decoration: none; pointer-events: auto; }
.ai-chat-welcome { position: fixed; left: calc(50% + 32px); top: 46%; z-index: 1; transform: translate(-50%, -50%); font-size: clamp(25px, 3vw, 38px); font-weight: 680; letter-spacing: 0; }
body:not(.chat-landing) .ai-chat-welcome { display: none; }
.ai-chat-model-field { position: relative; left: auto; bottom: auto; z-index: 5001; display: flex; width: 153px; min-width: 153px; max-width: 153px; flex: 0 0 153px; margin: 0 auto 0 8px; }
.ai-chat-model-field > select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.ai-chat-model-trigger { display: inline-flex; width: 153px; min-width: 153px; max-width: 153px; height: 45px; min-height: 45px; max-height: 45px; flex: 0 0 153px; box-sizing: border-box; padding: 5px 10px 5px 6px; align-items: center; gap: 8px; overflow: hidden; border: 1px solid #d5d7db; border-radius: 9px; background: transparent; color: #292c31; font: inherit; font-size: 14px; font-weight: 620; cursor: pointer; }
.ai-chat-model-trigger > span:nth-child(2) { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-trigger:hover, .ai-chat-model-trigger[aria-expanded="true"] { border-color: #9da2aa; }
.ai-chat-model-trigger svg { width: 17px; height: 17px; flex: 0 0 17px; margin-left: 3px; }
.ai-chat-model-icon { display: inline-flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; font-size: 10px; font-weight: 750; letter-spacing: 0; }
.ai-chat-model-panel { position: absolute; left: 0; bottom: 50px; z-index: 5002; width: min(620px, calc(100vw - 40px)); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9dadd; border-radius: 8px; background: #fff; color: #27292d; box-shadow: 0 22px 60px rgba(20, 22, 26, .24); }
.ai-chat-model-panel[hidden] { display: none !important; }
.ai-chat-model-panel.is-portaled { position: fixed; z-index: 10000; }

body:has(#ai-chat-model-panel:not([hidden])) .composer {
    z-index: 5000 !important;
}
.ai-chat-model-panel-head { display: grid; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid #ececee; }
.ai-chat-model-panel-head strong { font-size: 15px; }
.ai-chat-model-panel-head input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #d8dade; border-radius: 7px; background: transparent; color: inherit; font: inherit; outline: 0; }
.ai-chat-model-panel-head input:focus { border-color: #747b86; }
.ai-chat-model-auto { padding: 9px 11px; border-bottom: 1px solid #ececee; }
.ai-chat-model-auto:empty { display: none; }
.ai-chat-model-auto .ai-chat-model-option { border: 1px solid #e2e4e7; background: #f8f9fa; }
.ai-chat-model-browser { display: grid; flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; height: min(430px, max(180px, calc(100dvh - 300px))); max-height: none; grid-template-columns: 190px minmax(0, 1fr); overflow: hidden; }
.ai-chat-model-browser[hidden] { display: none !important; }
.ai-chat-provider-list { min-width: 0; padding: 8px; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; border-right: 1px solid #ececee; background: #f8f9fa; }
.ai-chat-provider-option { display: grid; width: 100%; min-height: 50px; padding: 7px 8px; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ai-chat-provider-option:hover { background: #eceef1; }
.ai-chat-provider-option.is-active { background: #e7effb; color: #1559b5; }
.ai-chat-provider-mark { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; font-weight: 760; }
.ai-chat-provider-copy { min-width: 0; }
.ai-chat-provider-copy strong { display: block; overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-provider-copy small { display: block; margin-top: 2px; color: #858991; font-size: 10px; }
.ai-chat-provider-count { min-width: 22px; padding: 2px 5px; border-radius: 8px; background: rgba(106, 112, 122, .1); color: #737983; font-size: 10px; text-align: center; }
.ai-chat-provider-models { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.ai-chat-provider-heading { display: flex; min-height: 48px; padding: 9px 14px; align-items: center; gap: 9px; border-bottom: 1px solid #ececee; }
.ai-chat-provider-heading strong { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-provider-heading small { margin-left: auto; color: #858991; font-size: 11px; white-space: nowrap; }
.ai-chat-provider-heading .ai-chat-provider-mark { width: 27px; height: 27px; }
.ai-chat-model-list { min-width: 0; min-height: 0; padding: 7px; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ai-chat-model-option { display: grid; width: 100%; min-height: 48px; padding: 7px 9px; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ai-chat-model-option:hover, .ai-chat-model-option.is-selected { background: #f2f3f4; }
.ai-chat-model-option .ai-chat-model-icon { width: 27px; height: 27px; flex-basis: 27px; }
.ai-chat-model-copy { display: grid; min-width: 0; gap: 2px; }
.ai-chat-model-copy strong { overflow: hidden; font-size: 14px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-copy small { color: #858991; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-radio { width: 16px; height: 16px; border: 1.5px solid #b9bdc4; border-radius: 50%; }
.ai-chat-model-option.is-selected .ai-chat-model-radio { border: 5px solid #1769e0; }
.ai-chat-model-empty { padding: 28px 12px; color: #777b83; text-align: center; font-size: 13px; }
.ai-chat-search-switch { display: grid; min-height: 72px; padding: 12px 15px; grid-template-columns: 30px minmax(0, 1fr) 40px; align-items: center; gap: 10px; border-top: 1px solid #e3e4e6; cursor: pointer; }
.ai-chat-search-switch > span:nth-child(2) { display: grid; gap: 3px; }
.ai-chat-search-switch strong { font-size: 14px; }
.ai-chat-search-switch small { color: #858991; font-size: 12px; }
.ai-chat-search-icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; }
.ai-chat-search-icon svg { width: 23px; height: 23px; }
.ai-chat-search-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ai-chat-search-switch i { position: relative; width: 38px; height: 22px; border-radius: 11px; background: #c5c8ce; transition: background .18s ease; }
.ai-chat-search-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.ai-chat-search-switch input:checked + i { background: #1769e0; }
.ai-chat-search-switch input:checked + i::after { transform: translateX(16px); }

/* Tier picker: keep Smart Select, FC 2.0 and FC 3.0 balanced in one row. */
.ai-chat-model-panel {
    width: min(456px, calc(100vw - 28px));
    border-color: rgba(143, 151, 165, .28);
    border-radius: 16px;
    box-shadow: 0 18px 52px rgba(28, 37, 52, .18), 0 3px 12px rgba(28, 37, 52, .08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.ai-chat-model-panel-head {
    gap: 0;
    padding: 14px 16px 10px;
    border-bottom: 0;
}
.ai-chat-model-panel-head strong {
    color: #303640;
    font-size: 13px;
    font-weight: 720;
    letter-spacing: .01em;
}
.ai-chat-model-auto {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 12px;
    border-bottom: 0;
}
.ai-chat-model-auto .ai-chat-model-option {
    position: relative;
    display: flex;
    min-height: 82px;
    padding: 12px 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: rgba(248, 250, 253, .82);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ai-chat-model-auto .ai-chat-model-option:hover {
    border-color: #b9c8e8;
    background: #f5f8ff;
    box-shadow: 0 4px 12px rgba(43, 93, 190, .1);
    transform: translateY(-1px);
}
.ai-chat-model-auto .ai-chat-model-option.is-selected {
    border-color: #4c7fe9;
    background: linear-gradient(145deg, #f4f8ff 0%, #eaf1ff 100%);
    box-shadow: inset 0 0 0 1px rgba(76, 127, 233, .12), 0 5px 14px rgba(56, 104, 211, .12);
}
.ai-chat-model-auto .ai-chat-model-option .ai-chat-model-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-width: 1.25px;
    color: #2467d9;
    font-size: 9px;
}
.ai-chat-model-auto .ai-chat-model-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}
.ai-chat-model-auto .ai-chat-model-copy strong {
    overflow: hidden;
    color: #303640;
    font-size: 12px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ai-chat-model-auto .ai-chat-model-copy small { display: none; }
.ai-chat-model-auto .ai-chat-model-radio {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 13px;
    height: 13px;
    border-width: 1.5px;
}
.ai-chat-model-auto .ai-chat-model-option.is-selected .ai-chat-model-radio { border-width: 4px; }

/* The AI chat page keeps its conversation in a bounded viewport between the
   shared top bar and the fixed composer. */
body:has(#ai-chat-model) .workspace-chat-header-center {
    display: flex !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body:has(#ai-chat-model) .workspace-chat-header-center * {
    visibility: hidden !important;
    opacity: 0 !important;
}

body:has(#ai-chat-model) .workspace > .fuuvo-ai-disclaimer {
    position: fixed !important;
    left: calc(50% + 32px) !important;
    right: auto !important;
    bottom: 8px !important;
    z-index: 14 !important;
    width: min(960px, calc(100vw - 170px)) !important;
    margin: 0 !important;
    padding: 0 8px !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    font-size: 9px !important;
    white-space: nowrap;
    transform: translateX(-50%);
}

body:has(#ai-chat-model):not(.chat-landing) .ai-chat-heading a {
    display: none;
}

body:has(#ai-chat-model):not(.chat-landing) .stage {
    position: fixed !important;
    left: calc(50% + 32px) !important;
    top: 72px !important;
    bottom: 242px !important;
    z-index: 2 !important;
    display: block !important;
    width: min(960px, calc(100vw - 170px)) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: translateX(-50%);
}

body:has(#ai-chat-model):not(.chat-landing) .result-card {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 12px 0 6px !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body:has(#ai-chat-model):not(.chat-landing) .result-card > .section-head,
body:has(#ai-chat-model):not(.chat-landing) .result-card > .iteration-banner,
body:has(#ai-chat-model):not(.chat-landing) .result-card > .task-actions {
    display: none !important;
}

body:has(#ai-chat-model):not(.chat-landing) .result-content {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 6px !important;
    overflow: hidden !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-area {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding: 8px 10px 64px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: 64px;
    scrollbar-gutter: stable !important;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* The docked navigation reduces the usable workspace. Keep the conversation
 * column on the same 950px track as the desktop composer instead of letting
 * the full result container grow wider than the input surface. */
@media (min-width: 921px) {
    html body.desktop-sidebar-docked:has(#ai-chat-model):not(.chat-landing)
        .result-card {
        /* The stage owns an 8px scrollbar; restore that track on the card so
         * its centered conversation column matches the fixed composer. */
        width: calc(100% + 8px) !important;
        max-width: none !important;
    }

    html body.desktop-sidebar-docked:has(#ai-chat-model):not(.chat-landing)
        .result-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html body.desktop-sidebar-docked:has(#ai-chat-model):not(.chat-landing)
        .chat-area {
        width: min(950px, calc(100vw - var(--fuuvo-desktop-navigation-width, var(--fuuvo-workspace-rail-width, 72px)) - 96px)) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

body:has(#ai-chat-model):not(.chat-landing) .chat-thread-card,
body:has(#ai-chat-model):not(.chat-landing) .chat-thread {
    width: 100% !important;
    min-width: 0 !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-thread {
    gap: 22px !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-bubble {
    width: fit-content !important;
    max-width: min(76%, 720px) !important;
    margin: 0 !important;
    padding: 11px 15px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    box-shadow: none !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.user {
    align-self: flex-end !important;
    border: 1px solid #e4e6e9 !important;
    background: #f1f2f4 !important;
    color: #202328 !important;
}

body:not([data-ui-theme="dark"]):has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .copy-btn,
body:not([data-ui-theme="dark"]):has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .edit-btn {
    background: transparent !important;
    color: #626873 !important;
}

body:not([data-ui-theme="dark"]):has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .copy-btn:hover,
body:not([data-ui-theme="dark"]):has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .edit-btn:hover {
    background: #e0e3e7 !important;
    color: #202328 !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .chat-plain,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.user .chat-markdown,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant .chat-plain,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant .chat-markdown,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system .chat-plain,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system .chat-markdown {
    color: inherit !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system {
    align-self: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 2px !important;
    border: 0 !important;
    background: transparent !important;
    color: #24272c !important;
}

body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant.is-pending,
body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system.is-pending {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: 360px !important;
    padding: 10px 13px !important;
    border: 1px solid #e6e8eb !important;
    border-radius: 12px !important;
    background: #fafafa !important;
    color: #616873 !important;
}

body:has(#ai-chat-model) #chat-send-btn.is-stop-response {
    opacity: 1;
    cursor: pointer;
}

body:has(#ai-chat-model) #chat-send-btn.is-stop-response svg {
    animation: none !important;
}

body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-bubble.user {
    border-color: #353a43 !important;
    background: #292e37 !important;
    color: #f2f4f7 !important;
}

body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant,
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system {
    color: #e8ebf0 !important;
}

body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant.is-pending,
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system.is-pending {
    border-color: #313641 !important;
    background: #171c24 !important;
    color: #b9c0cc !important;
}

/* Keep routed provider/model metadata private. The composer still exposes
 * routing tiers, while answer bubbles must not reveal the concrete provider
 * or model name, including legacy DOM nodes restored from an older cache. */
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta {
    display: none !important;
    max-width: 100%;
    min-height: 22px;
    margin: 0 0 7px;
    padding: 3px 8px;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    border: 1px solid #e1e5ec;
    border-radius: 999px;
    background: #f7f9fc;
    color: #6b7280;
    font-size: 11px;
    font-weight: 560;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
}
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-label {
    color: #7a8493;
    font-weight: 650;
}
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-provider {
    overflow: hidden;
    color: #49658e;
    text-overflow: ellipsis;
}
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-name {
    max-width: min(42vw, 300px);
    overflow: hidden;
    color: #2d4f87;
    font-weight: 680;
    text-overflow: ellipsis;
}
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-separator {
    color: #a2aab7;
}
body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta code {
    max-width: min(46vw, 340px);
    overflow: hidden;
    color: #68758a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
}

body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta {
    border-color: #384353;
    background: #1d2633;
    color: #b3bdcc;
}
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-label {
    color: #9da9ba;
}
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-provider {
    color: #a9c4ee;
}
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-name {
    color: #d8e5ff;
}
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-separator {
    color: #728096;
}
body[data-ui-theme="dark"]:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta code {
    color: #b7c8e1;
}

@media (max-width: 720px) {
    body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta {
        max-width: calc(100vw - 52px);
    }
    body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-name {
        max-width: 34vw;
    }
    body:has(#ai-chat-model):not(.chat-landing) .chat-message-model-meta code {
        max-width: 38vw;
    }
}

body[data-ui-theme="dark"] .ai-chat-model-trigger {
    border-color: #7186a5;
    background: #202833;
    color: #f7faff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .26);
}
body[data-ui-theme="dark"] .ai-chat-model-trigger:hover,
body[data-ui-theme="dark"] .ai-chat-model-trigger[aria-expanded="true"] {
    border-color: #9db8e4;
    background: #29374a;
    color: #ffffff;
}
body[data-ui-theme="dark"] .ai-chat-model-panel { border-color: #62728b; background: #202832; color: #f4f7fb; box-shadow: 0 20px 48px rgba(0,0,0,.52); }
body[data-ui-theme="dark"] .ai-chat-model-panel-head, body[data-ui-theme="dark"] .ai-chat-search-switch { border-color: #424449; }
body[data-ui-theme="dark"] .ai-chat-model-panel-head input { border-color: #4b4e54; }
body[data-ui-theme="dark"] .ai-chat-model-option:hover, body[data-ui-theme="dark"] .ai-chat-model-option.is-selected { background: #393b3f; }
body[data-ui-theme="dark"] .ai-chat-model-auto, body[data-ui-theme="dark"] .ai-chat-provider-heading { border-color: #424449; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option, body[data-ui-theme="dark"] .ai-chat-provider-list { border-color: #424449; background: #242529; }
body[data-ui-theme="dark"] .ai-chat-provider-option:hover { background: #34363b; }
body[data-ui-theme="dark"] .ai-chat-provider-option.is-active { background: #263c58; color: #8dbbf5; }
body[data-ui-theme="dark"] .ai-chat-model-panel-head strong,
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-copy strong { color: #f4f6fb; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option { border-color: #7186a5; background: #29374a; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option:hover { border-color: #a5bee8; background: #344762; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option.is-selected { border-color: #9db8e4; background: linear-gradient(145deg, #344b70 0%, #2b3c59 100%); }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-copy strong { color: #ffffff; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-copy small { color: #d7e2f3; }

@media (min-width: 721px) {
    body:has(#ai-chat-model):not(.chat-landing) .stage {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        scroll-padding: 16px 0 64px;
        scrollbar-gutter: stable !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .result-card,
    body:has(#ai-chat-model):not(.chat-landing) .result-content,
    body:has(#ai-chat-model):not(.chat-landing) .chat-area {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .result-card,
    body:has(#ai-chat-model):not(.chat-landing) .result-content {
        min-height: 100% !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .stage::-webkit-scrollbar {
        width: 8px;
    }

    body:has(#ai-chat-model):not(.chat-landing) .stage::-webkit-scrollbar-thumb {
        border-radius: 4px;
        background: rgba(98, 104, 115, .38);
    }
}

@media (max-width: 720px) {
    body:has(#ai-chat-model):not(.chat-landing) .mobile-nav-title { display: none !important; }
    body:has(#ai-chat-model):not(.chat-landing) .composer { left: 50% !important; bottom: calc(46px + env(safe-area-inset-bottom)) !important; width: calc(100vw - 24px) !important; }
    .ai-chat-heading { left: 50%; top: 18px; width: calc(100vw - 32px); }
    .ai-chat-heading h1 { font-size: 16px; }
    .ai-chat-heading a { right: 12px; top: 62px; padding: 6px 9px; font-size: 12px; }
    .ai-chat-welcome { left: 50%; font-size: 27px; }
    .ai-chat-model-field { width: 153px; min-width: 153px; max-width: 153px; flex: 0 0 153px; margin-left: 4px; }
    .ai-chat-model-trigger { width: 153px; min-width: 153px; max-width: 153px; height: 45px; min-height: 45px; max-height: 45px; flex-basis: 153px; }
    .ai-chat-model-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
    .ai-chat-model-auto { grid-template-columns: 1fr; gap: 6px; }
    .ai-chat-model-auto .ai-chat-model-option { min-height: 58px; padding: 9px 11px; flex-direction: row; align-items: center; gap: 9px; }
    .ai-chat-model-auto .ai-chat-model-copy { width: auto; }
    .ai-chat-model-auto .ai-chat-model-copy strong { font-size: 13px; }
    .ai-chat-model-browser { min-height: 0; max-height: 48vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .ai-chat-provider-list { display: flex; padding: 7px; gap: 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; border-right: 0; border-bottom: 1px solid #ececee; }
    .ai-chat-provider-option { width: auto; min-width: 132px; min-height: 46px; flex: 0 0 auto; }
    .ai-chat-provider-copy small { display: none; }
    .ai-chat-provider-heading { min-height: 42px; padding: 7px 12px; }
    .ai-chat-model-list { max-height: 32vh; }

    body:has(#ai-chat-model) .workspace > .fuuvo-ai-disclaimer {
        left: 50% !important;
        bottom: 5px !important;
        width: calc(100vw - 18px) !important;
        padding: 0 !important;
        font-size: 9px !important;
        flex-wrap: wrap !important;
        white-space: normal;
    }

    body:has(#ai-chat-model):not(.chat-landing) .stage {
        left: 50% !important;
        top: 58px !important;
        bottom: 218px !important;
        width: calc(100vw - 20px) !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .chat-area {
        padding: 8px 2px 52px !important;
        scroll-padding-bottom: 52px;
        scrollbar-gutter: auto !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .chat-bubble {
        max-width: 88% !important;
        font-size: 14px !important;
    }

    body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.assistant,
    body:has(#ai-chat-model):not(.chat-landing) .chat-bubble.system {
        max-width: 100% !important;
    }
}

/* Landing-page controls must sit above the shared workspace stacking rule.
   Keep the welcome state and the new-chat link anchored to the viewport, and
   keep the model/options controls together so their click targets do not
   drift apart when the composer stretches. */
html body:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading {
    position: fixed !important;
    left: calc(50% + 32px) !important;
    top: 24px !important;
    width: min(960px, calc(100vw - 170px)) !important;
    height: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 3000 !important;
    pointer-events: none !important;
}
html body:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading a {
    position: fixed !important;
    top: 84px !important;
    right: 28px !important;
    z-index: 3001 !important;
    pointer-events: auto !important;
}
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-welcome {
    position: fixed !important;
    left: calc(50% + 32px) !important;
    top: 50% !important;
    width: min(960px, calc(100vw - 170px)) !important;
    height: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading > a {
    display: none !important;
}
html body:has(#ai-chat-model) #chat-compose-field .chat-input-tools {
    pointer-events: none !important;
}
html body:has(#ai-chat-model) #chat-compose-field .chat-input-tools > .ai-chat-mode-controls {
    display: inline-flex !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    pointer-events: auto !important;
}
html body:has(#ai-chat-model) #chat-compose-field .ai-chat-mode-controls .ai-chat-model-field {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    pointer-events: auto !important;
}
html body:has(#ai-chat-model) #chat-compose-field .ai-chat-mode-controls .ai-chat-composer-toggles {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    pointer-events: auto !important;
}
html body:has(#ai-chat-model) #chat-compose-field .ai-chat-mode-controls .ai-chat-composer-toggle {
    position: relative !important;
    z-index: 4 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}
html body:has(#ai-chat-model) #chat-compose-field .ai-chat-mode-controls .ai-chat-composer-toggle.is-active {
    border-color: rgba(37, 99, 235, .34) !important;
    background: rgba(37, 99, 235, .12) !important;
    color: #1859c7 !important;
}
html body[data-ui-theme="dark"]:has(#ai-chat-model) #chat-compose-field .ai-chat-mode-controls .ai-chat-composer-toggle.is-active {
    border-color: rgba(120, 170, 255, .5) !important;
    background: rgba(73, 125, 220, .24) !important;
    color: #c7dcff !important;
}

@media (max-width: 720px) {
    html body:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading {
        left: 50% !important;
        top: 18px !important;
        width: calc(100vw - 32px) !important;
    }
    html body:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading a {
        top: 62px !important;
        right: 12px !important;
    }
    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-welcome {
        left: 50% !important;
        top: 50% !important;
        width: calc(100vw - 32px) !important;
        white-space: normal !important;
    }
    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model) .workspace[data-fuuvo-app-workspace="1"] > .ai-chat-heading > a {
        display: none !important;
    }
    html body:has(#ai-chat-model) #chat-compose-field .chat-input-tools > .ai-chat-mode-controls {
        gap: 2px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        inset: auto 12px 8px 12px !important;
        width: auto !important;
        height: 95px !important;
        min-height: 95px !important;
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        grid-template-rows: 45px 44px !important;
        align-items: center !important;
        column-gap: 6px !important;
        row-gap: 4px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-mode-controls {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 45px !important;
        min-height: 45px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-field {
        width: 153px !important;
        min-width: 153px !important;
        max-width: 153px !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        flex: 0 0 153px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-trigger {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        flex: 1 1 auto !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-composer-toggles {
        width: auto !important;
        height: 32px !important;
        min-height: 32px !important;
        display: inline-flex !important;
        flex: 0 0 auto !important;
        gap: 2px !important;
        margin: 0 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-upload-entry {
        grid-column: 1 !important;
        grid-row: 2 !important;
        align-self: end !important;
        justify-self: start !important;
        height: 42px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-action-group {
        grid-column: 3 !important;
        grid-row: 2 !important;
        align-self: end !important;
        justify-self: end !important;
        height: 44px !important;
        margin: 0 !important;
    }
}

/*
 * Keep the empty AI-chat composer aligned with the reference surface:
 * upload on the left, model/options stacked in the center, and voice/talk on
 * the right. This is intentionally desktop-only; the compact mobile composer
 * keeps its existing single-row behavior.
 */
@media (min-width: 921px) {
    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) {
        height: 170px !important;
        min-height: 170px !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 1px solid #e5e8ed !important;
        border-radius: 22px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(35, 48, 68, .04) !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-input {
        min-height: 104px !important;
        height: 104px !important;
        padding: 20px 20px 8px !important;
        resize: none !important;
        background: transparent !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-hint {
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        line-height: 1.5 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        inset: auto 14px 9px 14px !important;
        width: auto !important;
        height: 70px !important;
        min-height: 70px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        align-items: end !important;
        gap: 0 !important;
        pointer-events: none !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-upload-entry {
        grid-column: 1 !important;
        align-self: end !important;
        justify-self: start !important;
        height: 42px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-upload-btn {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        color: #27364d !important;
        box-shadow: none !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-mode-controls {
        grid-column: 2 !important;
        display: flex !important;
        width: 153px !important;
        height: 70px !important;
        min-width: 153px !important;
        flex: 0 0 153px !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        margin: 0 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-field {
        width: 153px !important;
        height: 45px !important;
        min-height: 45px !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-trigger {
        width: 153px !important;
        min-width: 153px !important;
        max-width: 153px !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        padding: 6px 10px 6px 7px !important;
        border-radius: 10px !important;
        background: #ffffff !important;
        font-size: 12px !important;
        font-weight: 560 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-composer-toggles {
        width: auto !important;
        height: 18px !important;
        min-height: 18px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 18px !important;
        margin: 0 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-composer-toggle {
        min-height: 18px !important;
        height: 18px !important;
        padding: 0 !important;
        gap: 4px !important;
        border-color: transparent !important;
        border-radius: 0 !important;
        color: #687487 !important;
        font-size: 12px !important;
        font-weight: 560 !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-composer-toggle svg {
        width: 16px !important;
        height: 16px !important;
        flex-basis: 16px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-action-group {
        grid-column: 3 !important;
        align-self: end !important;
        justify-self: end !important;
        height: 44px !important;
        margin: 0 !important;
        gap: 8px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-voice-btn.is-hold-to-talk {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }

    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-send-btn.is-talk {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }
}

/*
 * Dark-mode contrast for the desktop landing composer.
 * The layout rules above intentionally use a white surface in light mode;
 * override every text-bearing control after them so dark mode never renders
 * light text on a white/transparent control.
 */
@media (min-width: 921px) {
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) {
        background: #111c2d !important;
        border-color: #536b8d !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, .42) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-input {
        background: transparent !important;
        color: #f4f7ff !important;
        caret-color: #9fc3ff !important;
        -webkit-text-fill-color: #f4f7ff !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-input::placeholder,
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-input-hint {
        color: #b9c9e2 !important;
        -webkit-text-fill-color: #b9c9e2 !important;
        opacity: 1 !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-upload-btn,
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .chat-voice-btn,
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-composer-toggle {
        color: #dce9ff !important;
        -webkit-text-fill-color: #dce9ff !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-trigger {
        border-color: #718bb4 !important;
        background: #1d304a !important;
        color: #f5f8ff !important;
        -webkit-text-fill-color: #f5f8ff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .24) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-trigger:hover,
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) .ai-chat-model-trigger[aria-expanded="true"] {
        border-color: #a7c3f2 !important;
        background: #294466 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field > .chat-input-wrap:not(.has-attachments) #chat-send-btn.is-talk {
        border-color: #82aef2 !important;
        background: #2f6fca !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-panel {
    border-color: #62728b !important;
    background: #162235 !important;
    color: #f1f6ff !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-panel-head,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-auto,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-heading,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-search-switch {
    border-color: #40536f !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-panel-head strong,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-heading strong,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-search-switch strong,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-copy strong {
    color: #f6f9ff !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-panel-head input {
    border-color: #7186a5 !important;
    background: #101a2a !important;
    color: #f4f7ff !important;
    -webkit-text-fill-color: #f4f7ff !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-panel-head input::placeholder,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-copy small,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-copy small,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-search-switch small {
    color: #b8c8df !important;
    -webkit-text-fill-color: #b8c8df !important;
    opacity: 1 !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-option,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-option {
    color: #edf4ff !important;
}

html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-option:hover,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-model-option.is-selected,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-option:hover,
html body[data-ui-theme="dark"]:has(#ai-chat-model) .ai-chat-provider-option.is-active {
    background: #2b4262 !important;
    color: #ffffff !important;
}

/* Source: public/static/css/fuuvo-chat-detail-controls.css */
/* Controls shared by the focused AI chat page and conversation details. */
.ai-chat-model-field {
    position: relative;
    z-index: 5001;
    display: flex;
    min-width: 0;
    margin: 0 auto 0 8px;
}

.ai-chat-model-field > select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    opacity: 0;
    pointer-events: none;
}

.ai-chat-model-trigger {
    display: inline-flex;
    min-width: 0;
    min-height: 40px;
    max-width: min(100%, 260px);
    padding: 5px 10px 5px 6px;
    align-items: center;
    gap: 8px;
    border: 1px solid #d5d7db;
    border-radius: 9px;
    background: transparent;
    color: #292c31;
    font: inherit;
    font-size: 14px;
    font-weight: 620;
    cursor: pointer;
}

.ai-chat-model-trigger > span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-model-trigger:hover,
.ai-chat-model-trigger[aria-expanded="true"] { border-color: #9da2aa; }
.ai-chat-model-trigger svg { width: 17px; height: 17px; margin-left: 3px; }

.ai-chat-model-icon,
.ai-chat-provider-mark {
    display: inline-flex;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: transparent;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0;
}

.ai-chat-model-panel {
    position: absolute;
    left: 0;
    bottom: 50px;
    z-index: 5002;
    width: min(620px, calc(100vw - 40px));
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9dadd;
    border-radius: 8px;
    background: #fff;
    color: #27292d;
    box-shadow: 0 22px 60px rgba(20, 22, 26, .24);
}

.ai-chat-model-panel[hidden] { display: none !important; }
.ai-chat-model-panel-head { display: grid; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid #ececee; }
.ai-chat-model-panel-head strong { font-size: 15px; }
.ai-chat-model-panel-head input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #d8dade; border-radius: 7px; background: transparent; color: inherit; font: inherit; outline: 0; }
.ai-chat-model-panel-head input:focus { border-color: #747b86; }
.ai-chat-model-auto { padding: 9px 11px; border-bottom: 1px solid #ececee; }
.ai-chat-model-auto:empty { display: none; }
.ai-chat-model-auto .ai-chat-model-option { border: 1px solid #e2e4e7; background: #f8f9fa; }
.ai-chat-model-browser { display: grid; flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; height: min(430px, max(180px, calc(100dvh - 300px))); grid-template-columns: 190px minmax(0, 1fr); overflow: hidden; }
.ai-chat-model-browser[hidden] { display: none !important; }
.ai-chat-provider-list { min-width: 0; padding: 8px; overflow: auto; border-right: 1px solid #ececee; background: #f8f9fa; }
.ai-chat-provider-option { display: grid; width: 100%; min-height: 50px; padding: 7px 8px; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ai-chat-provider-option:hover { background: #eceef1; }
.ai-chat-provider-option.is-active { background: #e7effb; color: #1559b5; }
.ai-chat-provider-copy { min-width: 0; }
.ai-chat-provider-copy strong { display: block; overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-provider-copy small { display: block; margin-top: 2px; color: #858991; font-size: 10px; }
.ai-chat-provider-count { min-width: 22px; padding: 2px 5px; border-radius: 8px; background: rgba(106, 112, 122, .1); color: #737983; font-size: 10px; text-align: center; }
.ai-chat-provider-models { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.ai-chat-provider-heading { display: flex; min-height: 48px; padding: 9px 14px; align-items: center; gap: 9px; border-bottom: 1px solid #ececee; }
.ai-chat-provider-heading strong { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-provider-heading small { margin-left: auto; color: #858991; font-size: 11px; white-space: nowrap; }
.ai-chat-provider-heading .ai-chat-provider-mark { width: 27px; height: 27px; }
.ai-chat-model-list { min-width: 0; min-height: 0; padding: 7px; overflow: auto; }
.ai-chat-model-option { display: grid; width: 100%; min-height: 48px; padding: 7px 9px; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ai-chat-model-option:hover,
.ai-chat-model-option.is-selected { background: #f2f3f4; }
.ai-chat-model-option:disabled { cursor: not-allowed; opacity: .5; }
.ai-chat-model-option .ai-chat-model-icon { width: 27px; height: 27px; flex-basis: 27px; }
.ai-chat-model-copy { display: grid; min-width: 0; gap: 2px; }
.ai-chat-model-copy strong { overflow: hidden; font-size: 14px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-copy small { overflow: hidden; color: #858991; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-radio { width: 16px; height: 16px; border: 1.5px solid #b9bdc4; border-radius: 50%; }
.ai-chat-model-option.is-selected .ai-chat-model-radio { border: 5px solid #1769e0; }
.ai-chat-tier-option { min-height: 58px; }
.ai-chat-tier-option .ai-chat-model-copy small { white-space: normal; line-height: 1.35; }
.ai-chat-tier-option.is-compact { min-height: 48px; }
.ai-chat-model-empty { padding: 28px 12px; color: #777b83; text-align: center; font-size: 13px; }
.ai-chat-search-switch { display: grid; min-height: 72px; padding: 12px 15px; grid-template-columns: 30px minmax(0, 1fr) 40px; align-items: center; gap: 10px; border-top: 1px solid #e3e4e6; cursor: pointer; }
.ai-chat-search-switch > span:nth-child(2) { display: grid; gap: 3px; }
.ai-chat-search-switch strong { font-size: 14px; }
.ai-chat-search-switch small { color: #858991; font-size: 12px; }
.ai-chat-search-icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; }
.ai-chat-search-icon svg { width: 23px; height: 23px; }
.ai-chat-search-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ai-chat-search-switch i { position: relative; width: 38px; height: 22px; border-radius: 11px; background: #c5c8ce; transition: background .18s ease; }
.ai-chat-search-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.ai-chat-search-switch input:checked + i { background: #1769e0; }
.ai-chat-search-switch input:checked + i::after { transform: translateX(16px); }

/* Tier picker: keep Smart Select, FC 2.0 and FC 3.0 balanced in one row. */
.ai-chat-model-panel {
    width: min(456px, calc(100vw - 28px));
    border-color: rgba(143, 151, 165, .28);
    border-radius: 16px;
    box-shadow: 0 18px 52px rgba(28, 37, 52, .18), 0 3px 12px rgba(28, 37, 52, .08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.ai-chat-model-panel-head { gap: 0; padding: 14px 16px 10px; border-bottom: 0; }
.ai-chat-model-panel-head strong { color: #303640; font-size: 13px; font-weight: 720; letter-spacing: .01em; }
.ai-chat-model-auto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; border-bottom: 0; }
.ai-chat-model-auto .ai-chat-model-option {
    position: relative;
    display: flex;
    min-height: 82px;
    padding: 12px 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: rgba(248, 250, 253, .82);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ai-chat-model-auto .ai-chat-model-option:hover { border-color: #b9c8e8; background: #f5f8ff; box-shadow: 0 4px 12px rgba(43, 93, 190, .1); transform: translateY(-1px); }
.ai-chat-model-auto .ai-chat-model-option.is-selected { border-color: #4c7fe9; background: linear-gradient(145deg, #f4f8ff 0%, #eaf1ff 100%); box-shadow: inset 0 0 0 1px rgba(76, 127, 233, .12), 0 5px 14px rgba(56, 104, 211, .12); }
.ai-chat-model-auto .ai-chat-model-option .ai-chat-model-icon { width: 28px; height: 28px; flex: 0 0 28px; border-width: 1.25px; color: #2467d9; font-size: 9px; }
.ai-chat-model-auto .ai-chat-model-copy { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 2px; }
.ai-chat-model-auto .ai-chat-model-copy strong { overflow: hidden; color: #303640; font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-model-auto .ai-chat-model-copy small { display: none; }
.ai-chat-model-auto .ai-chat-model-radio { position: absolute; top: 10px; right: 10px; width: 13px; height: 13px; border-width: 1.5px; }
.ai-chat-model-auto .ai-chat-model-option.is-selected .ai-chat-model-radio { border-width: 4px; }

.ai-chat-composer-toggles { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
.ai-chat-composer-toggle { display: inline-flex; min-height: 34px; padding: 0 9px; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #717783; font: inherit; font-size: 12px; font-weight: 620; white-space: nowrap; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.ai-chat-composer-toggle svg { width: 17px; height: 17px; flex: 0 0 17px; }
.ai-chat-composer-toggle:hover,
.ai-chat-composer-toggle:focus-visible { border-color: #d9dce1; background: #f2f4f7; color: #2c5fb8; outline: none; }
.ai-chat-composer-toggle.is-active { border-color: rgba(37, 99, 235, .22); background: rgba(37, 99, 235, .1); color: #1859c7; }

/* The AI-chat action row sits inside a pointer-events:none shell so the
 * model/options controls can be positioned independently. Re-enable every
 * real control in the row; otherwise the first render may work while the
 * detail composer becomes impossible to use after the conversation opens. */
html body:has(#ai-chat-model) #chat-compose-field .chat-upload-entry,
html body:has(#ai-chat-model) #chat-compose-field .chat-input-action-group,
html body:has(#ai-chat-model) #chat-compose-field #chat-upload-btn,
html body:has(#ai-chat-model) #chat-compose-field #chat-voice-btn,
html body:has(#ai-chat-model) #chat-compose-field #chat-send-btn {
    pointer-events: auto !important;
}

/* Keep the detail-page send control in the same quiet, light style as the
 * original composer. The button is still the existing send control; only its
 * presentation changes between idle, text, and busy states. */
body.chat-detail-page #chat-compose-field .chat-input-wrap,
body.chat-detail-open #chat-compose-field .chat-input-wrap { overflow: visible; }
body.chat-detail-page #chat-compose-field #chat-send-btn,
body.chat-detail-open #chat-compose-field #chat-send-btn { width: auto; min-width: 92px; height: 44px; padding: 0 13px; gap: 7px; border-radius: 16px; white-space: nowrap; }
body.chat-detail-page #chat-compose-field #chat-send-btn .chat-send-mode-label,
body.chat-detail-open #chat-compose-field #chat-send-btn .chat-send-mode-label { display: inline-block; line-height: 1; white-space: nowrap; }
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 11px !important;
    gap: 6px !important;
    border: 1px solid #e1e6ed !important;
    border-radius: 22px !important;
    background: #fff !important;
    color: #2d405a !important;
    box-shadow: 0 2px 8px rgba(32, 48, 72, .06) !important;
}
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk:hover,
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk:focus-visible,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk:hover,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk:focus-visible {
    border-color: #cbd8e8 !important;
    background: #f8fbff !important;
    color: #1e5a9e !important;
    box-shadow: 0 4px 12px rgba(32, 78, 132, .1) !important;
}
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy),
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) {
    width: 94px !important;
    min-width: 94px !important;
    max-width: 94px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid #d6dce5 !important;
    border-radius: 23px !important;
    background: #f5f5f6 !important;
    color: #2f3742 !important;
    box-shadow: 0 2px 8px rgba(32, 48, 72, .06) !important;
    cursor: pointer !important;
}
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy):hover,
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy):focus-visible,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy):hover,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy):focus-visible {
    border-color: #bfcbd9 !important;
    background: #eef2f6 !important;
    color: #1f2937 !important;
    box-shadow: 0 4px 12px rgba(32, 78, 132, .1) !important;
}
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) > svg,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) > svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
}
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) .chat-send-mode-label,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) .chat-send-mode-label {
    display: none !important;
}

body[data-ui-theme="dark"].chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk,
body[data-ui-theme="dark"].chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn.is-talk,
body[data-ui-theme="dark"].chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy),
body[data-ui-theme="dark"].chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn:is(.has-text, .is-busy) {
    border-color: #4a5564 !important;
    background: #303640 !important;
    color: #e2eaf4 !important;
    box-shadow: none !important;
}

body[data-ui-theme="dark"] .ai-chat-model-trigger { border-color: #4a4d52; color: #f2f3f4; }
body[data-ui-theme="dark"] .ai-chat-model-panel { border-color: #45474c; background: #292a2d; color: #f4f4f5; box-shadow: 0 20px 48px rgba(0, 0, 0, .42); }
body[data-ui-theme="dark"] .ai-chat-model-panel-head,
body[data-ui-theme="dark"] .ai-chat-search-switch,
body[data-ui-theme="dark"] .ai-chat-provider-heading { border-color: #424449; }
body[data-ui-theme="dark"] .ai-chat-model-panel-head input { border-color: #4b4e54; }
body[data-ui-theme="dark"] .ai-chat-model-option:hover,
body[data-ui-theme="dark"] .ai-chat-model-option.is-selected { background: #393b3f; }
.ai-chat-tier-option .ai-chat-model-icon { color: #1769e0; }
body[data-ui-theme="dark"] .ai-chat-tier-option .ai-chat-model-icon { color: #8db8ff; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option,
body[data-ui-theme="dark"] .ai-chat-provider-list { border-color: #424449; background: #242529; }
body[data-ui-theme="dark"] .ai-chat-provider-option:hover { background: #34363b; }
body[data-ui-theme="dark"] .ai-chat-provider-option.is-active { background: #263c58; color: #8dbbf5; }
body[data-ui-theme="dark"] .ai-chat-model-panel-head strong,
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-copy strong { color: #f4f6fb; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option { border-color: #454b58; background: rgba(43, 47, 56, .88); }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option:hover { border-color: #718dcc; background: #303849; }
body[data-ui-theme="dark"] .ai-chat-model-auto .ai-chat-model-option.is-selected { border-color: #789cf0; background: linear-gradient(145deg, #303d59 0%, #29364f 100%); }
body[data-ui-theme="dark"] .ai-chat-composer-toggle { color: #aeb5c0; }
body[data-ui-theme="dark"] .ai-chat-composer-toggle:hover,
body[data-ui-theme="dark"] .ai-chat-composer-toggle:focus-visible { border-color: #4b596d; background: #303946; color: #bcd5ff; }
body[data-ui-theme="dark"] .ai-chat-composer-toggle.is-active { border-color: rgba(120, 170, 255, .38); background: rgba(73, 125, 220, .22); color: #bcd5ff; }

@media (max-width: 720px) {
    .ai-chat-model-field { margin-left: 4px; }
    .ai-chat-model-trigger { max-width: 148px; }
    .ai-chat-model-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
    .ai-chat-model-auto { grid-template-columns: 1fr; gap: 6px; }
    .ai-chat-model-auto .ai-chat-model-option { min-height: 58px; padding: 9px 11px; flex-direction: row; align-items: center; gap: 9px; }
    .ai-chat-model-auto .ai-chat-model-copy { width: auto; }
    .ai-chat-model-auto .ai-chat-model-copy strong { font-size: 13px; }
    .ai-chat-model-browser { height: min(430px, 48vh); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .ai-chat-provider-list { display: flex; padding: 7px; gap: 6px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #ececee; }
    .ai-chat-provider-option { width: auto; min-width: 132px; min-height: 46px; flex: 0 0 auto; }
    .ai-chat-provider-copy small { display: none; }
    .ai-chat-provider-heading { min-height: 42px; padding: 7px 12px; }
    .ai-chat-model-list { max-height: 32vh; }
    .ai-chat-composer-toggles { gap: 2px; margin-left: 3px; }
    .ai-chat-composer-toggle { min-height: 32px; padding: 0 6px; font-size: 11px; }
    .ai-chat-composer-toggle span { display: none; }
    body.chat-detail-page #chat-compose-field #chat-send-btn,
    body.chat-detail-open #chat-compose-field #chat-send-btn { min-width: 86px; padding: 0 10px; }
}

/*
 * Keep the chat surface stable in both the landing and conversation-detail
 * states.  The home glow styles are intentionally loaded before this file,
 * while the AI-chat stylesheet can add a later dark composer surface.  A
 * single final, neutral rule prevents either page from showing a second
 * blue/purple frame around the composer after navigation or theme changes.
 */
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace::after,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer::after {
    background-image: none !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer {
    background-color: var(--bg, #ffffff) !important;
    box-shadow: none !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace::after,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer::after,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap:not(.has-attachments) {
    background: var(--fuuvo-dark-input, var(--panel-strong, #ffffff)) !important;
    background-image: none !important;
    border-color: var(--fuuvo-dark-line-strong, rgba(148, 163, 184, .22)) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .10) !important;
    backdrop-filter: none !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap.has-attachments,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap.has-attachments::before,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap.has-attachments::after {
    background-image: none !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap > :is(#chat-input, .chat-input-tools, .chat-attachment-bar) {
    background: transparent !important;
    background-image: none !important;
}

html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .workspace,
html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] .composer {
    background-color: var(--fuuvo-dark-bg, #0f141d) !important;
}

html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"] #chat-compose-field .chat-input-wrap:not(.has-attachments) {
    background: var(--fuuvo-dark-input, #161e29) !important;
    border-color: var(--fuuvo-dark-line-strong, rgba(226, 232, 240, .18)) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18) !important;
}

/* The AI-chat stylesheet has an ID-bearing :has(#ai-chat-model) selector.
 * Match that specificity as well, so its blue landing override cannot bring
 * the coloured frame back after the model control is mounted. */
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model) .composer,
html body[data-ui-theme="dark"].chat-detail-page[data-mode="chat"]:has(#ai-chat-model) .composer,
html body[data-ui-theme="dark"].chat-detail-open[data-mode="chat"]:has(#ai-chat-model) .composer {
    background: transparent !important;
    background-image: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments),
html body[data-ui-theme="dark"].chat-detail-page[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments),
html body[data-ui-theme="dark"].chat-detail-open[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments) {
    background: var(--fuuvo-dark-input, #161e29) !important;
    background-image: none !important;
    border-color: var(--fuuvo-dark-line-strong, rgba(226, 232, 240, .18)) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18) !important;
}

html body:not([data-ui-theme="dark"]).chat-landing[data-mode="chat"]:has(#ai-chat-model) .composer,
html body:not([data-ui-theme="dark"]).chat-detail-page[data-mode="chat"]:has(#ai-chat-model) .composer,
html body:not([data-ui-theme="dark"]).chat-detail-open[data-mode="chat"]:has(#ai-chat-model) .composer {
    background: transparent !important;
    background-image: none !important;
}

html body:not([data-ui-theme="dark"]).chat-landing[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments),
html body:not([data-ui-theme="dark"]).chat-detail-page[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments),
html body:not([data-ui-theme="dark"]).chat-detail-open[data-mode="chat"]:has(#ai-chat-model) #chat-compose-field > .chat-input-wrap:not(.has-attachments) {
    background: var(--panel-strong, #ffffff) !important;
    background-image: none !important;
}

/*
 * Keep the model picker and chat options on one compact control row.
 * The earlier landing rules stack them vertically, which makes the
 * composer look unbalanced and pushes the action controls down.
 */
@media (min-width: 921px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-mode-controls {
        display: inline-flex !important;
        flex: 0 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-model-field {
        width: 153px !important;
        min-width: 153px !important;
        max-width: 153px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        flex: 0 0 153px !important;
        margin: 0 !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-model-trigger {
        width: 153px !important;
        min-width: 153px !important;
        max-width: 153px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        flex: 0 0 153px !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-composer-toggles {
        display: inline-flex !important;
        flex: 0 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: 32px !important;
        min-height: 32px !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-composer-toggle {
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 6px !important;
        border-radius: 8px !important;
    }

    /*
     * The empty state is still the same submit control (it changes its
     * label/icon through JS). Keep its "对话" and "发送" states identical.
     */
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) #chat-send-btn:is(.is-talk, .has-text, .is-busy) {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding: 0 !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-action-group {
        align-items: center !important;
        height: 44px !important;
    }

    /* Legacy standalone call trigger, when exposed by a theme, follows the
     * same dimensions as the submit control instead of becoming a second
     * differently sized pill. */
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .home-composer-call {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        border-radius: 22px !important;
    }
}

/*
 * Final bottom anchor for the model and option controls. Several legacy
 * landing rules size `.chat-input-tools` as a taller grid; keep the actual
 * controls on the input's bottom edge even when those rules are present.
 */
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
    top: auto !important;
    bottom: 8px !important;
    align-items: end !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-mode-controls,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-model-field,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .ai-chat-composer-toggles,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .chat-upload-entry,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools .chat-input-action-group {
    align-self: end !important;
}

@media (min-width: 921px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }
}

@media (max-width: 920px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
    }
}

/*
 * Landing ambience: a broad, quiet halo behind the title and composer.
 * Keep this on the landing surface only so conversation details retain their
 * neutral reading background. The layered brand blue/violet glow is deliberately
 * low contrast and sits behind all controls and capability cards.
 */
html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
    background-color: #ffffff !important;
    background-image:
        radial-gradient(ellipse 700px 330px at 52% 40%, rgba(91, 169, 255, .18), transparent 72%),
        radial-gradient(ellipse 500px 270px at 64% 49%, rgba(186, 142, 248, .12), transparent 76%) !important;
}

html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background:
        radial-gradient(ellipse 520px 240px at 52% 31%, rgba(117, 200, 255, .12), transparent 70%),
        radial-gradient(ellipse 390px 220px at 57% 58%, rgba(196, 145, 255, .09), transparent 74%) !important;
    filter: blur(18px) !important;
    opacity: .9 !important;
}

html body.chat-landing[data-mode="chat"] .composer-title,
html body.chat-landing[data-mode="chat"] .ai-chat-welcome,
html body.chat-landing[data-mode="chat"] #chat-compose-field {
    position: relative !important;
    z-index: 4 !important;
}

html body.chat-landing[data-mode="chat"] #chat-compose-field .chat-input-wrap:not(.has-attachments) {
    box-shadow:
        0 22px 50px rgba(31, 77, 139, .14),
        0 5px 14px rgba(32, 44, 67, .08),
        0 0 44px rgba(93, 169, 255, .12) !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
    background-color: #1a1b1e !important;
    background-image:
        radial-gradient(ellipse 720px 350px at 52% 40%, rgba(56, 116, 224, .25), transparent 72%),
        radial-gradient(ellipse 520px 280px at 64% 50%, rgba(101, 72, 196, .18), transparent 76%) !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
    background:
        radial-gradient(ellipse 560px 260px at 52% 31%, rgba(53, 137, 255, .18), transparent 70%),
        radial-gradient(ellipse 420px 220px at 57% 58%, rgba(133, 83, 225, .13), transparent 74%) !important;
    opacity: .95 !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] #chat-compose-field .chat-input-wrap:not(.has-attachments) {
    box-shadow:
        0 22px 50px rgba(0, 0, 0, .34),
        0 5px 14px rgba(0, 0, 0, .20),
        0 0 48px rgba(48, 108, 232, .18) !important;
}

@media (max-width: 920px) {
    html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
        background-image:
            radial-gradient(ellipse 440px 250px at 53% 28%, rgba(91, 169, 255, .15), transparent 72%),
            radial-gradient(ellipse 340px 210px at 66% 45%, rgba(186, 142, 248, .10), transparent 76%) !important;
    }

    html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
        background:
            radial-gradient(ellipse 360px 210px at 53% 25%, rgba(117, 200, 255, .11), transparent 70%),
            radial-gradient(ellipse 280px 180px at 58% 54%, rgba(196, 145, 255, .08), transparent 74%) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
        background-image:
            radial-gradient(ellipse 450px 260px at 53% 28%, rgba(56, 116, 224, .21), transparent 72%),
            radial-gradient(ellipse 350px 220px at 66% 45%, rgba(101, 72, 196, .15), transparent 76%) !important;
    }
}

/*
 * Remove the mode controls from the legacy grid flow. They must share the
 * same bottom baseline as upload and send, regardless of the landing-page
 * row sizing that is applied earlier in the cascade.
 */
@media (min-width: 921px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        grid-template-rows: 44px !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools > .ai-chat-mode-controls {
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        bottom: 0 !important;
        top: auto !important;
        width: max-content !important;
        min-width: 309px !important;
        max-width: calc(100% - 96px) !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 4 !important;
    }
}

@media (max-width: 920px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools > .ai-chat-mode-controls {
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        bottom: 0 !important;
        top: auto !important;
        width: min(321px, calc(100% - 96px)) !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 4 !important;
    }
}

@media (min-width: 921px) {
    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls .ai-chat-composer-toggles {
        width: max-content !important;
        min-width: max-content !important;
        flex: 0 0 auto !important;
    }

    html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls .ai-chat-composer-toggle {
        flex: 0 0 auto !important;
    }
}

@media (max-width: 920px) {
    html[lang^="en"] body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments) .chat-input-tools > .ai-chat-mode-controls {
        width: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 96px) !important;
    }

    html[lang^="en"] body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls .ai-chat-composer-toggles {
        width: max-content !important;
        min-width: max-content !important;
        flex: 0 0 auto !important;
    }

    html[lang^="en"] body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls .ai-chat-composer-toggle {
        flex: 0 0 auto !important;
    }
}

/*
 * After the first message, fuuvo-chat-attachments.css switches the detail
 * composer to a flex column and changes the toolbar to position: relative.
 * The model/options row is still an overlay control, so keep the whole
 * toolbar anchored to the input's bottom edge in that state as well.
 */
html body.chat-detail-open[data-mode="chat"] #chat-compose-field
> .chat-input-wrap:not(.has-attachments) {
    position: relative !important;
}

@media (min-width: 921px) {
    html body.chat-detail-open[data-mode="chat"] #chat-compose-field
    > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        position: absolute !important;
        inset: auto 12px 8px 12px !important;
        width: auto !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        grid-template-rows: 44px !important;
        align-items: end !important;
        box-sizing: border-box !important;
        flex: none !important;
    }

    html body.chat-detail-open[data-mode="chat"] #chat-compose-field
    > .chat-input-wrap:not(.has-attachments) .chat-upload-entry {
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: end !important;
        justify-self: start !important;
        height: 44px !important;
    }

    html body.chat-detail-open[data-mode="chat"] #chat-compose-field
    > .chat-input-wrap:not(.has-attachments) .chat-input-action-group {
        grid-column: 3 !important;
        grid-row: 1 !important;
        align-self: end !important;
        justify-self: end !important;
        height: 44px !important;
        margin: 0 !important;
    }
}

@media (max-width: 920px) {
    html body.chat-detail-open[data-mode="chat"] #chat-compose-field
    > .chat-input-wrap:not(.has-attachments) .chat-input-tools {
        position: absolute !important;
        inset: auto 10px 8px 10px !important;
        width: auto !important;
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        flex: none !important;
    }
}

/*
 * Busy state uses the exact same sizing rule as the send-icon state above.
 * Keep only the icon constraint here so later responsive rules can determine
 * the button dimensions for both states together.
 */
html body.chat-detail-page[data-mode="chat"] #chat-compose-field #chat-send-btn.is-busy > svg,
html body.chat-detail-open[data-mode="chat"] #chat-compose-field #chat-send-btn.is-busy > svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
}

/* Keep the model picker in the same compact control family as the thinking
 * and web-search toggles.  The picker remains a button with its existing
 * dialog behavior; only its visual treatment is normalized. */
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-field {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* Keep the landing header fused to the workspace so its ambience starts at
 * the top of the page instead of below a separate header surface. */
html body.chat-landing[data-mode="chat"],
html body.chat-landing[data-mode="chat"] .app[data-fuuvo-app-shell="1"] {
    background-color: #ffffff !important;
}

html body.chat-landing[data-mode="chat"] :is(.workspace-chat-header, .mobile-chat-topbar) {
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
    background-color: #ffffff !important;
    background-image:
        radial-gradient(ellipse 700px 360px at 52% 8%, rgba(91, 169, 255, .18), transparent 72%),
        radial-gradient(ellipse 500px 300px at 64% 20%, rgba(186, 142, 248, .12), transparent 76%) !important;
}

html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
    background:
        radial-gradient(ellipse 520px 260px at 52% 7%, rgba(117, 200, 255, .12), transparent 70%),
        radial-gradient(ellipse 390px 230px at 57% 27%, rgba(196, 145, 255, .09), transparent 74%) !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"],
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .app[data-fuuvo-app-shell="1"] {
    background-color: #1a1b1e !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] :is(.workspace-chat-header, .mobile-chat-topbar) {
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
    background-color: #1a1b1e !important;
    background-image:
        radial-gradient(ellipse 720px 380px at 52% 8%, rgba(56, 116, 224, .25), transparent 72%),
        radial-gradient(ellipse 520px 300px at 64% 20%, rgba(101, 72, 196, .18), transparent 76%) !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
    background:
        radial-gradient(ellipse 560px 280px at 52% 7%, rgba(53, 137, 255, .18), transparent 70%),
        radial-gradient(ellipse 420px 240px at 57% 27%, rgba(133, 83, 225, .13), transparent 74%) !important;
}

@media (max-width: 920px) {
    html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
        background-image:
            radial-gradient(ellipse 440px 270px at 53% 7%, rgba(91, 169, 255, .15), transparent 72%),
            radial-gradient(ellipse 340px 220px at 66% 20%, rgba(186, 142, 248, .10), transparent 76%) !important;
    }

    html body.chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
        background:
            radial-gradient(ellipse 360px 220px at 53% 6%, rgba(117, 200, 255, .11), transparent 70%),
            radial-gradient(ellipse 280px 190px at 58% 28%, rgba(196, 145, 255, .08), transparent 74%) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"] {
        background-image:
            radial-gradient(ellipse 450px 280px at 53% 7%, rgba(56, 116, 224, .21), transparent 72%),
            radial-gradient(ellipse 350px 230px at 66% 20%, rgba(101, 72, 196, .15), transparent 76%) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] .workspace[data-fuuvo-app-workspace="1"]::before {
        background:
            radial-gradient(ellipse 390px 230px at 53% 6%, rgba(53, 137, 255, .15), transparent 70%),
            radial-gradient(ellipse 300px 190px at 58% 28%, rgba(133, 83, 225, .11), transparent 74%) !important;
    }
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 auto !important;
    padding: 0 6px !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: visible !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #717783 !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 620 !important;
    line-height: 1 !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:hover,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:focus-visible,
html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger[aria-expanded="true"] {
    border-color: #d9dce1 !important;
    background: #f2f4f7 !important;
    color: #2c5fb8 !important;
    outline: none !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger .ai-chat-model-icon {
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
    border-width: 1.4px !important;
    font-size: 8px !important;
    font-weight: 750 !important;
}

html body:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger > svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
    margin-left: 0 !important;
}

html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    border-color: transparent !important;
    background: transparent !important;
    color: #aeb5c0 !important;
}

html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:hover,
html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:focus-visible,
html body[data-ui-theme="dark"]:is(.chat-landing, .chat-detail-page, .chat-detail-open)[data-mode="chat"]
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger[aria-expanded="true"] {
    border-color: #4b596d !important;
    background: #303946 !important;
    color: #bcd5ff !important;
}

/* The empty-state Talk action shares the same control row as the model and
 * thinking/search toggles. Keep its background transparent as well; the
 * typed send state remains a separate, visible action surface. */
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk {
    border-color: transparent !important;
    background: transparent !important;
    color: #717783 !important;
    box-shadow: none !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:hover,
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:focus-visible {
    border-color: #d9dce1 !important;
    background: #f2f4f7 !important;
    color: #2c5fb8 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk {
    border-color: transparent !important;
    background: transparent !important;
    color: #aeb5c0 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:hover,
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:focus-visible {
    border-color: #4b596d !important;
    background: #303946 !important;
    color: #bcd5ff !important;
    box-shadow: none !important;
}

/* Final landing alignment: model selection should be one compact sibling of
 * the other toggles, and the whole group should begin immediately after the
 * upload control instead of being centered in the composer. */
@media (min-width: 921px) {
    html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls {
        left: 62px !important;
        right: auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 146px) !important;
        transform: none !important;
    }
}

/* Keep the compact model control close to the upload button after a chat
 * opens as a detail view as well as on the landing composer. */
@media (min-width: 921px) {
    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls {
        left: 62px !important;
        right: auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 146px) !important;
        transform: none !important;
    }
}

@media (max-width: 920px) {
    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls {
        left: 62px !important;
        right: auto !important;
        width: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 96px) !important;
        transform: none !important;
    }
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-field,
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 auto !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    padding: 0 6px !important;
    gap: 4px !important;
    border-color: transparent !important;
    background: transparent !important;
    color: #717783 !important;
    box-shadow: none !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger > span:nth-child(2) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger .ai-chat-model-icon {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    border-width: 1.3px !important;
    font-size: 7px !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger > svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    margin-left: 0 !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
    border-color: #d9dce1 !important;
    background: #f2f4f7 !important;
    color: #2c5fb8 !important;
    outline: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    border-color: transparent !important;
    background: transparent !important;
    color: #aeb5c0 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
    border-color: #4b596d !important;
    background: #303946 !important;
    color: #bcd5ff !important;
}

/* Keep the dark model selector compact: its width follows the icon, label,
 * and chevron instead of spreading them across an oversized fixed control. */
@media (min-width: 921px) {
    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-field,
    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
        width: max-content !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
        padding: 0 6px !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        border-color: transparent !important;
        background: transparent !important;
        color: #aeb5c0 !important;
        box-shadow: none !important;
    }

    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger .ai-chat-model-icon {
        width: 17px !important;
        min-width: 17px !important;
        height: 17px !important;
        flex: 0 0 17px !important;
        font-size: 8px !important;
    }

    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger > span:nth-child(2) {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }

    html body:is(.chat-detail-page, .chat-detail-open)[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger > svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        margin-left: 0 !important;
    }
}

/*
 * Route-transition guard: after sending from the landing composer the page
 * briefly renders before chat-landing/chat-detail-open is applied. Keep the
 * model picker compact during that first paint so the legacy 153px button
 * cannot flash between the home page and the conversation view.
 */
html body[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-field {
    width: max-content !important;
    inline-size: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 max-content !important;
    flex-basis: max-content !important;
    margin: 0 !important;
}

html body[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    display: inline-flex !important;
    width: max-content !important;
    inline-size: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 max-content !important;
    flex-basis: max-content !important;
    padding: 0 6px !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: visible !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #717783 !important;
    box-shadow: none !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

html body[data-ui-theme="dark"][data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
.chat-input-tools .ai-chat-mode-controls .ai-chat-model-trigger {
    border-color: transparent !important;
    background: transparent !important;
    color: #aeb5c0 !important;
}

@media (min-width: 921px) {
    html body[data-mode="chat"]:has(#ai-chat-model)
    #chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
    .chat-input-tools > .ai-chat-mode-controls {
        left: 62px !important;
        right: auto !important;
        width: max-content !important;
        inline-size: max-content !important;
        min-width: 0 !important;
        max-width: calc(100% - 146px) !important;
        justify-self: start !important;
        transform: none !important;
    }
}

/* Keep the landing wordmark as one coherent red/white mark. The older
 * red-only overlay was visible at rest and produced a misaligned duplicate
 * over the text at small sizes. */
html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo {
    position: relative !important;
    display: inline-flex !important;
    width: clamp(110px, 10.5vw, 132px) !important;
    height: clamp(37px, 3.5vw, 44px) !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    line-height: 0 !important;
    min-height: 1.1em !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) {
    transform: none !important;
    animation: none !important;
}

html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo .home-living-brand {
    position: relative !important;
    z-index: 1 !important;
    display: inline-flex !important;
    align-items: baseline !important;
    line-height: 1 !important;
    transform-origin: 18% 68% !important;
}

html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand,
html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) .fuuvo-video-brand {
    transform: none !important;
    animation: none !important;
}

html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo .home-brand-letter > span {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    background: linear-gradient(180deg, #ef4038 0 44%, #f1f3f7 47% 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    filter:
        drop-shadow(0 1px 0 rgba(255, 255, 255, .14))
        drop-shadow(0 2px 1px rgba(0, 0, 0, .28)) !important;
    animation: none !important;
}

html body:not([data-ui-theme="dark"]).chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .home-brand-letter > span {
    background: linear-gradient(180deg, #e93d36 0 44%, #34383f 47% 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
}

html body.chat-landing[data-mode="chat"] .composer-title-logo-link.composer-fuuvo-logo .home-brand-trademark {
    color: #667080 !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .home-brand-letter > span {
    background: linear-gradient(180deg, #ff6258 0 44%, #f1f4fa 47% 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    filter:
        drop-shadow(0 1px 0 rgba(255, 255, 255, .18))
        drop-shadow(0 3px 2px rgba(0, 0, 0, .42))
        drop-shadow(0 0 5px rgba(255, 79, 69, .12)) !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .home-brand-trademark {
    color: #aeb8c8 !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) .home-living-brand {
    animation: fuuvo-landing-logo-bounce 620ms cubic-bezier(.2, .8, .2, 1) both !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible)::before {
    animation: fuuvo-landing-logo-sheen 760ms cubic-bezier(.2, .7, .2, 1) both !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo::after,
html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .home-living-brand::after {
    display: none !important;
    content: none !important;
}

@keyframes fuuvo-landing-logo-bounce {
    0%,
    100% {
        transform: translateY(0) rotate(0) scale(1);
    }
    35% {
        transform: translateY(-2px) rotate(-1deg) scale(1.045, .97);
    }
    62% {
        transform: translateY(1px) rotate(.65deg) scale(.99, 1.025);
    }
    82% {
        transform: translateY(-.5px) rotate(-.25deg) scale(1.012, .995);
    }
}

@keyframes fuuvo-landing-logo-sheen {
    0% {
        opacity: 0;
        transform: translateX(-125%) skewX(-16deg);
    }
    20% {
        opacity: .9;
    }
    72% {
        opacity: .58;
    }
    100% {
        opacity: 0;
        transform: translateX(125%) skewX(-16deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) .home-living-brand,
    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible)::before {
        animation: none !important;
    }
}

/* The supplied GIF must not change the landing layout when it starts. Keep
 * the title row fixed and apply the small vertical correction only inside
 * the logo slot, so the composer below never moves. */
@media (min-width: 921px) {
    html body.chat-landing[data-mode="chat"] .composer-title.has-fuuvo-slogan {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 9px !important;
        height: 44px !important;
        min-height: 44px !important;
        line-height: 1.2 !important;
    }

    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand,
    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) .fuuvo-video-brand {
        top: -3px !important;
        transform: none !important;
        animation: none !important;
    }
}

/* The Chinese landing mark uses the supplied video-derived artwork. The
 * animated layer loads on hover so the static mark remains the fallback. */
html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand {
    position: relative !important;
    display: inline-grid !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 3 / 1 !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-items: center !important;
    vertical-align: middle !important;
    transform: none !important;
    animation: none !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo:has(.fuuvo-video-brand)::before,
html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo:has(.fuuvo-video-brand)::after {
    display: none !important;
    content: none !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand > img, .fuuvo-video-brand > picture > img,
html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand > video {
    grid-area: 1 / 1 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    pointer-events: none !important;
    transition: opacity 120ms ease !important;
    /* The artwork already contains its edge treatment. A large blur here
     * makes the thin lower strokes unreadable at compact sizes. */
    filter: contrast(1.08) saturate(1.04) drop-shadow(0 1px 1px rgba(37, 47, 62, .18)) !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-motion {
    visibility: hidden !important;
    opacity: 0 !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-white {
    visibility: hidden !important;
    opacity: 0 !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-static-dark {
    display: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-static-light {
    display: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-static-dark {
    display: block !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand-video {
    mix-blend-mode: normal !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo.is-fuuvo-video-playing .fuuvo-video-brand-static {
    opacity: 0 !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo.is-fuuvo-video-playing .fuuvo-video-brand-motion.is-fuuvo-video-active {
    visibility: visible !important;
    opacity: 1 !important;
}

/* The animated artwork supplies the hover motion itself. Do not let the
 * shared brand bounce transform the logo slot or alter the title baseline. */
html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo:is(:hover, :focus-visible) .fuuvo-video-brand {
    transform: none !important;
    animation: none !important;
}

html body.chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo.is-fuuvo-video-light-playing .fuuvo-video-brand-white {
    visibility: visible !important;
    opacity: 1 !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand > img, .fuuvo-video-brand > picture > img,
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
.composer-title-logo-link.composer-fuuvo-logo .fuuvo-video-brand > video {
    filter:
        contrast(1.1)
        brightness(1.06)
        saturate(1.05)
        drop-shadow(0 1px 1px rgba(0, 0, 0, .38)) !important;
}

@media (prefers-reduced-motion: reduce) {
    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo.is-fuuvo-video-playing .fuuvo-video-brand-static {
        opacity: 1 !important;
    }

    html body.chat-landing[data-mode="chat"]
    .composer-title-logo-link.composer-fuuvo-logo.is-fuuvo-video-playing .fuuvo-video-brand-motion.is-fuuvo-video-active {
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Keep the landing Talk state visually paired with the microphone control.
 * This final rule must come after the older transparent-action overrides. */
html body.chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk {
    border: 1px solid #e4e8ee !important;
    background: #f4f6f9 !important;
    color: #53647b !important;
    box-shadow: none !important;
}

html body.chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk:hover,
html body.chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk:focus-visible {
    border: 1px solid #d9dce1 !important;
    background: #e9e9eb !important;
    color: #1d1f23 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk {
    border: 1px solid #3d4959 !important;
    background: #252b34 !important;
    color: #c8d5e5 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk:hover,
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"] #chat-compose-field .chat-input-action-group #chat-send-btn.is-talk:focus-visible {
    border: 1px solid #3d4959 !important;
    background: #3a3b41 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* The model-aware landing layout has an older, more specific rule that
 * makes the idle action transparent. Keep the Talk control bordered there
 * too, matching the microphone control shown beside it. */
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk {
    border: 1px solid #e4e8ee !important;
    background: #f4f6f9 !important;
    color: #53647b !important;
    box-shadow: none !important;
}

html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:hover,
html body.chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:focus-visible {
    border: 1px solid #d9dce1 !important;
    background: #e9e9eb !important;
    color: #1d1f23 !important;
    box-shadow: none !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk {
    border: 1px solid #3d4959 !important;
    background: #252b34 !important;
    color: #c8d5e5 !important;
}

html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:hover,
html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]:has(#ai-chat-model)
#chat-compose-field.has-chat-input > .chat-input-wrap:not(.has-attachments)
#chat-send-btn.is-talk:focus-visible {
    border: 1px solid #4b596d !important;
    background: #303946 !important;
    color: #ffffff !important;
}

/* Model picker feature controls: keep the two composer actions together
 * inside the picker and show both icon and label on every viewport. */
.ai-chat-model-feature-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 12px;
    border-bottom: 1px solid #ececee;
}

.ai-chat-model-feature-options .ai-chat-composer-toggle {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 0 10px;
    gap: 7px;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    background: #f8f9fa;
    color: #5e6673;
    font-size: 12px;
    font-weight: 650;
}

.ai-chat-model-feature-options .ai-chat-composer-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ai-chat-model-feature-options .ai-chat-composer-toggle > span {
    display: inline !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-model-feature-options .ai-chat-composer-toggle:hover,
.ai-chat-model-feature-options .ai-chat-composer-toggle:focus-visible {
    border-color: #b7c5dd;
    background: #eef4ff;
    color: #1859c7;
    outline: none;
}

.ai-chat-model-feature-options .ai-chat-composer-toggle.is-active {
    border-color: rgba(37, 99, 235, .34);
    background: rgba(37, 99, 235, .1);
    color: #1859c7;
}

body[data-ui-theme="dark"] .ai-chat-model-feature-options {
    border-color: #40536f;
}

body[data-ui-theme="dark"] .ai-chat-model-feature-options .ai-chat-composer-toggle {
    border-color: #526783;
    background: #26364d;
    color: #c1cee2;
}

body[data-ui-theme="dark"] .ai-chat-model-feature-options .ai-chat-composer-toggle:hover,
body[data-ui-theme="dark"] .ai-chat-model-feature-options .ai-chat-composer-toggle:focus-visible {
    border-color: #88a7d8;
    background: #304967;
    color: #dce9ff;
}

body[data-ui-theme="dark"] .ai-chat-model-feature-options .ai-chat-composer-toggle.is-active {
    border-color: rgba(120, 170, 255, .5);
    background: rgba(73, 125, 220, .24);
    color: #c7dcff;
}

@media (max-width: 420px) {
    .ai-chat-model-feature-options {
        gap: 6px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .ai-chat-model-feature-options .ai-chat-composer-toggle {
        padding-right: 7px;
        padding-left: 7px;
        gap: 5px;
        font-size: 11px;
    }
}

/* The More menu is a mobile-only entry. Keep its DOM node for mobile
 * interactions, but remove it from the desktop composer without leaving a
 * gap beside the upload button. */
@media (min-width: 921px) {
    html body[data-mode="chat"] #chat-compose-field.has-chat-input
    > .chat-input-wrap:not(.has-attachments) .chat-input-tools > .chat-upload-entry {
        display: inline-flex !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        align-items: center !important;
        gap: 0 !important;
    }

    html body[data-mode="chat"] #chat-compose-field.has-chat-input
    > .chat-input-wrap:not(.has-attachments) .chat-input-tools > .chat-upload-entry > #mobile-chat-more-btn {
        display: none !important;
    }
}

/*
 * Restore a visible hover response for the homepage capability rail.
 * Later landing-layout rules intentionally flatten the cards, but also
 * override the motion from fuuvo-home-motion.css with transform:none.
 */
@media (hover: hover) and (pointer: fine) {
    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn,
    html body.chat-landing[data-mode="chat"] .core-feature-btn {
        transition:
            transform 180ms cubic-bezier(.2, .8, .2, 1),
            background-color 180ms ease,
            color 180ms ease,
            box-shadow 180ms ease !important;
    }

    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn:is(:hover, :focus-visible),
    html body.chat-landing[data-mode="chat"] .core-feature-btn:is(:hover, :focus-visible) {
        transform: translateY(-2px) !important;
        background: rgba(55, 116, 212, .08) !important;
        color: #2467d9 !important;
        box-shadow: 0 8px 18px rgba(45, 96, 177, .12) !important;
        outline: none !important;
    }

    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn .capability-icon,
    html body.chat-landing[data-mode="chat"] .core-feature-btn .core-feature-btn-icon {
        transition:
            transform 240ms cubic-bezier(.2, .8, .2, 1),
            filter 180ms ease !important;
    }

    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn:hover .capability-icon,
    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn:focus-visible .capability-icon,
    html body.chat-landing[data-mode="chat"] .core-feature-btn:hover .core-feature-btn-icon,
    html body.chat-landing[data-mode="chat"] .core-feature-btn:focus-visible .core-feature-btn-icon {
        transform: translateY(-3px) rotate(-4deg) scale(1.08) !important;
        filter: saturate(1.12) brightness(1.08) !important;
    }

    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn:is(:hover, :focus-visible),
    html body[data-ui-theme="dark"].chat-landing[data-mode="chat"]
    .core-feature-btn:is(:hover, :focus-visible) {
        background: rgba(130, 164, 214, .14) !important;
        color: #c6dcff !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .22) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn,
    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn:is(:hover, :focus-visible),
    html body.chat-landing[data-mode="chat"] .core-feature-btn,
    html body.chat-landing[data-mode="chat"] .core-feature-btn:is(:hover, :focus-visible) {
        transform: none !important;
        transition: none !important;
    }

    html body.chat-landing[data-mode="chat"]
    .home-capability-group-actions > .composer-capability-btn .capability-icon,
    html body.chat-landing[data-mode="chat"] .core-feature-btn .core-feature-btn-icon {
        transform: none !important;
        transition: none !important;
        filter: none !important;
    }
}

/* Use the textarea's native placeholder for the empty chat composer. The
 * legacy hint is independently positioned and can sit above the caret when
 * mobile height/padding rules change; keeping it hidden makes both share one
 * text baseline. Attachment composers retain their dedicated hint placement. */
html body[data-mode="chat"] #chat-compose-field
> .chat-input-wrap:not(.has-attachments) > .chat-input-hint {
    display: none !important;
}

html body[data-mode="chat"] #chat-compose-field
> .chat-input-wrap:not(.has-attachments) > #chat-input::placeholder {
    opacity: 1 !important;
}
