/* ==========================================================================
   繁星 AI 聊天工作台 —— 输入区（Composer）完整设计
   本文件是输入区样式的唯一来源：
   · 悬浮玻璃容器 + 单一品牌紫焦点（与 chat-sidebar-premium.css 同一语言）
   · 对话 / 图片 / 视频三种模式共用一套骨架，差异仅在工具按钮与上传区
   · 深色 / 浅色双主题
   文件结构：
     1. 设计令牌
     2. 容器与输入区
     3. 工具栏与按钮
     4. 发送 / 停止
     5. 上拉框（推理强度 / 参数选项 / 路由策略）
     6. 上传区（聊天附件卡 / 参考图 / 首尾帧）
     7. 折叠态、价格徽章、响应式
     8. 浅色主题覆盖
     9. 侧边栏紧凑模型导航（保留）
    10. 浅色工作区与 API 弹窗（保留）
    11. 角色状态条（保留）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
body.chat-shell {
    --fxc-accent: #7c6cff;
    --fxc-accent-strong: #a99fff;
    --fxc-accent-soft: rgba(124, 108, 255, 0.16);
    --fxc-accent-ring: rgba(124, 108, 255, 0.42);
    --fxc-accent-glow: rgba(124, 108, 255, 0.12);
    --fxc-box-border: rgba(255, 255, 255, 0.09);
    --fxc-box-bg:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 52%),
        rgba(20, 21, 29, 0.78);
    --fxc-box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 28px 70px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.3);
    --fxc-text: #f4f5fa;
    --fxc-text-dim: rgba(240, 240, 246, 0.55);
    --fxc-text-faint: rgba(240, 240, 246, 0.34);
    --fxc-btn-hover-bg: rgba(255, 255, 255, 0.06);
    --fxc-btn-hover-ring: rgba(255, 255, 255, 0.08);
    --fxc-popup-bg: rgba(18, 19, 26, 0.94);
    --fxc-popup-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 4px 16px rgba(124, 108, 255, 0.06);
    --fxc-dash-border: rgba(255, 255, 255, 0.15);
    --fxc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. 容器与输入区
   -------------------------------------------------------------------------- */
body.workspace-mode-chat .input-container,
body.workspace-mode-image .input-container,
body.workspace-mode-video .input-container {
    width: min(720px, calc(100% - 48px));
    max-width: 720px;
}

body.workspace-mode-chat .chat-input-box,
body.workspace-mode-image .chat-input-box,
body.workspace-mode-video .chat-input-box {
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    padding: 12px 12px 10px;
    border: 1px solid var(--fxc-box-border);
    border-radius: 18px;
    color: var(--fxc-text);
    background: var(--fxc-box-bg);
    box-shadow: var(--fxc-box-shadow);
    backdrop-filter: blur(24px) saturate(1.15);
    -webkit-backdrop-filter: blur(24px) saturate(1.15);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0;
    transition: border-color 0.25s var(--fxc-ease), box-shadow 0.25s var(--fxc-ease);
}

body.workspace-mode-chat .chat-input-box:focus-within,
body.workspace-mode-image .chat-input-box:focus-within,
body.workspace-mode-video .chat-input-box:focus-within {
    border-color: var(--fxc-accent-ring);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 4px var(--fxc-accent-glow),
        0 18px 56px rgba(124, 108, 255, 0.13),
        0 28px 70px rgba(0, 0, 0, 0.5);
}

body.workspace-mode-chat .chat-input-box .rich-input,
body.workspace-mode-image .chat-input-box .rich-input,
body.workspace-mode-video .chat-input-box .rich-input {
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: min(58vh, 420px);
    padding: 7px 8px 4px;
    color: inherit;
    background: transparent;
    font: inherit;
    line-height: 1.55;
    letter-spacing: 0;
    caret-color: var(--fxc-accent-strong);
    overflow-y: hidden;
}

body.workspace-mode-chat .chat-input-box .rich-input.is-empty::before,
body.workspace-mode-image .chat-input-box .rich-input.is-empty::before,
body.workspace-mode-video .chat-input-box .rich-input.is-empty::before {
    color: var(--fxc-text-faint);
    font: inherit;
    letter-spacing: 0;
}

body.workspace-mode-video .chat-input-box:not(.has-reference-stage) .rich-input.is-empty {
    height: 56px !important;
    min-height: 56px !important;
}

body.workspace-mode-chat .input-hint,
body.workspace-mode-image .input-hint,
body.workspace-mode-video .input-hint {
    display: none;
}

/* --------------------------------------------------------------------------
   3. 工具栏与按钮
   -------------------------------------------------------------------------- */
body.workspace-mode-chat .input-toolbar,
body.workspace-mode-image .input-toolbar,
body.workspace-mode-video .input-toolbar {
    width: 100%;
    height: 34px;
    min-height: 34px;
    margin-top: 6px;
    padding: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit;
    font: inherit;
    line-height: normal;
    letter-spacing: 0;
}

body.workspace-mode-chat .input-toolbar-left,
body.workspace-mode-image .input-toolbar-left,
body.workspace-mode-video .input-toolbar-left {
    height: 32px;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    color: inherit;
    font: inherit;
    line-height: normal;
    letter-spacing: 0;
}

body.workspace-mode-chat .input-toolbar-left::before,
body.workspace-mode-image .input-toolbar-left::before,
body.workspace-mode-video .input-toolbar-left::before {
    display: none;
}

/* 按钮顺序 */
body.workspace-mode-chat .asset-entry-rail { order: 3; gap: 5px; }
body.workspace-mode-chat .thinking-level-picker { order: 4; }
body.workspace-mode-chat #webSearchBtn { order: 5; }
body.workspace-mode-image #imageModeBtn { order: 2; }
body.workspace-mode-image #imageAspectRatioBtn,
body.workspace-mode-image #imageSizeBtn,
body.workspace-mode-video #imageAspectRatioBtn { order: 3; }
body.workspace-mode-image #imageResolutionBtn,
body.workspace-mode-image #imageQualityBtn,
body.workspace-mode-video #imageResolutionBtn { order: 4; }
body.workspace-mode-image #imageCountBtn,
body.workspace-mode-video #videoDurationBtn { order: 5; }
body.workspace-mode-image #imageFormatBtn,
body.workspace-mode-video #videoStyleBtn { order: 6; }
body.workspace-mode-video #videoMovementBtn { order: 7; }
body.workspace-mode-video #videoSpecsBtn { order: 3; }
body.workspace-mode-video #videoDurationBtn { order: 4; }
body.workspace-mode-video #videoReferenceBtn { order: 5; }
body.workspace-mode-video #imageCountBtn { order: 8; }

body.workspace-mode-image #imageModeBtn.is-display-only,
body.workspace-mode-image .image-option-btn.is-display-only {
    pointer-events: none;
    cursor: default;
}

/* 基础按钮：幽灵玻璃胶囊 */
body.workspace-mode-chat .tool-btn,
body.workspace-mode-image .tool-btn,
body.workspace-mode-video .tool-btn,
body.workspace-mode-chat .asset-entry-btn,
body.workspace-mode-image .asset-entry-btn,
body.workspace-mode-video .asset-entry-btn,
body.workspace-mode-image .image-option-btn,
body.workspace-mode-video .image-option-btn,
body.workspace-mode-video #videoBgmBtn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: auto;
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    color: var(--fxc-text-dim);
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s var(--fxc-ease), background 0.18s var(--fxc-ease),
        box-shadow 0.18s var(--fxc-ease), border-color 0.18s var(--fxc-ease);
}

body.workspace-mode-chat .tool-btn:hover,
body.workspace-mode-image .tool-btn:hover,
body.workspace-mode-video .tool-btn:hover,
body.workspace-mode-chat .asset-entry-btn:hover,
body.workspace-mode-image .asset-entry-btn:hover,
body.workspace-mode-video .asset-entry-btn:hover,
body.workspace-mode-image .image-option-btn:hover,
body.workspace-mode-video .image-option-btn:hover,
body.workspace-mode-video #videoBgmBtn:hover {
    color: var(--fxc-text);
    background: var(--fxc-btn-hover-bg);
    box-shadow: inset 0 0 0 1px var(--fxc-btn-hover-ring);
}

/* 激活态：统一品牌紫软胶囊（推理 / 联网 / BGM / 水印不再分彩色） */
body.workspace-mode-chat .tool-btn.active,
body.workspace-mode-chat .tool-btn.web-search.active,
body.workspace-mode-chat #thinkingBtn.active,
body.workspace-mode-chat #thinkingBtn.thinking-mode,
body.workspace-mode-chat .asset-entry-btn.is-active,
body.workspace-mode-image .tool-btn.active,
body.workspace-mode-video .tool-btn.active,
body.workspace-mode-image .asset-entry-btn.is-active,
body.workspace-mode-video .asset-entry-btn.is-active,
body.workspace-mode-video #videoBgmBtn.active,
body.workspace-mode-video #videoWatermarkBtn.active {
    color: var(--fxc-accent-strong);
    background: var(--fxc-accent-soft);
    box-shadow: inset 0 0 0 1px var(--fxc-accent-ring);
}

body.workspace-mode-chat #thinkingBtn strong,
body.workspace-mode-chat #thinkingBtn.active strong,
body.workspace-mode-chat #thinkingBtn.thinking-mode strong {
    color: inherit;
    font-weight: 600;
}

body.workspace-mode-chat #uploadBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    gap: 0;
    width: 30px;
    padding: 0;
}

body.workspace-mode-chat #uploadBtn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

/* 语言模型附件提示框：默认必须隐藏。它常驻在 reference-stage 里，只有
   聊天模式悬停占位卡时才显示；缺少基础 display:none 会在切到图片/视频
   模式时把内容以裸文本漏进输入区（已踩过）。 */
.chat-attachment-hint {
    display: none;
}

body.workspace-mode-chat .reference-stage .chat-attachment-hint {
    position: absolute;
    z-index: 1200;
    left: 0;
    bottom: calc(100% + 9px);
    width: 224px;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1px solid var(--fxc-box-border);
    border-radius: 10px;
    color: var(--fxc-text);
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    pointer-events: none;
}

body.workspace-mode-chat .reference-stage .empty-reference-trigger:hover ~ .chat-attachment-hint,
body.workspace-mode-chat .reference-stage .empty-reference-trigger:focus-visible ~ .chat-attachment-hint {
    display: block;
}

body.workspace-mode-chat .chat-attachment-hint-title {
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

body.workspace-mode-chat .chat-attachment-hint-note,
body.workspace-mode-chat .chat-attachment-hint-empty {
    margin-top: 3px;
    color: var(--fxc-text-faint);
    font-size: 10px;
    line-height: 1.4;
}

body.workspace-mode-chat .chat-attachment-hint-divider {
    height: 1px;
    margin: 8px 0 5px;
    background: var(--fxc-box-border);
}

body.workspace-mode-chat .chat-attachment-hint-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    font-size: 11px;
}

body.workspace-mode-chat .chat-attachment-hint-row strong {
    color: var(--fxc-accent-strong);
    font-size: 11px;
    font-weight: 650;
}

body.workspace-mode-chat .chat-attachment-hint-row small {
    grid-column: 1 / -1;
    margin-top: -4px;
    color: var(--fxc-text-faint);
    font-size: 10px;
}

body.workspace-mode-image #assetSelectorBtn {
    display: none !important;
}

body.workspace-mode-chat .role-entry-btn {
    width: auto;
    padding: 0 10px;
    gap: 6px;
}

body.workspace-mode-chat .asset-entry-label {
    display: inline;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

body.workspace-mode-chat .asset-entry-icon,
body.workspace-mode-chat .role-entry-btn .asset-entry-icon {
    color: inherit;
}

body.workspace-mode-image #assetSelectorBtn,
body.workspace-mode-video #assetSelectorBtn {
    width: 32px;
    min-width: 32px;
    padding: 0;
    gap: 0;
    justify-content: center;
}

body.workspace-mode-image #assetSelectorBtn .asset-entry-icon,
body.workspace-mode-video #assetSelectorBtn .asset-entry-icon,
body.workspace-mode-image #assetSelectorBtn .asset-entry-icon svg,
body.workspace-mode-video #assetSelectorBtn .asset-entry-icon svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

body.workspace-mode-chat #routeStrategyBtn,
body.workspace-mode-image #routeStrategyBtn,
body.workspace-mode-video #routeStrategyBtn {
    order: -100;
    max-width: 168px;
    padding: 0 9px;
    color: var(--fxc-text);
    border: 1px solid rgba(124, 108, 255, 0.28);
    background: rgba(124, 108, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.workspace-mode-chat #routeStrategyBtn:hover,
body.workspace-mode-image #routeStrategyBtn:hover,
body.workspace-mode-video #routeStrategyBtn:hover,
body.workspace-mode-chat #routeStrategyBtn.active,
body.workspace-mode-image #routeStrategyBtn.active,
body.workspace-mode-video #routeStrategyBtn.active {
    color: var(--fxc-accent-strong);
    border-color: var(--fxc-accent-ring);
    background: var(--fxc-accent-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 18px rgba(124, 108, 255, 0.12);
}

#routeStrategyBtn .route-trigger-text {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

#routeStrategyBtn .route-trigger-label {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#routeStrategyBtn .route-trigger-chevron {
    flex: 0 0 auto;
    opacity: 0.55;
    transition: transform 0.18s var(--fxc-ease), opacity 0.18s var(--fxc-ease);
}

#routeStrategyBtn.active .route-trigger-chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}

/* 图片/视频参数钮：细边玻璃胶囊，图标去彩色 */
body.workspace-mode-image .image-option-btn {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

body.workspace-mode-image .tool-btn,
body.workspace-mode-image .image-option-btn,
body.workspace-mode-image #routeStrategyBtn,
body.workspace-mode-video .tool-btn,
body.workspace-mode-video .image-option-btn,
body.workspace-mode-video #routeStrategyBtn {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

body.workspace-mode-image .tool-btn:hover,
body.workspace-mode-image .image-option-btn:hover,
body.workspace-mode-image .image-option-btn.popup-open,
body.workspace-mode-image #routeStrategyBtn:hover,
body.workspace-mode-image #routeStrategyBtn.active,
body.workspace-mode-video .tool-btn:hover,
body.workspace-mode-video .image-option-btn:hover,
body.workspace-mode-video .image-option-btn.popup-open,
body.workspace-mode-video #routeStrategyBtn:hover,
body.workspace-mode-video #routeStrategyBtn.active {
    color: var(--fxc-text);
    border: 0 !important;
    background: rgba(255, 255, 255, 0.055) !important;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
    transform: translateY(-1px);
}

body.workspace-mode-image .image-option-btn.popup-open,
body.workspace-mode-video .image-option-btn.popup-open {
    transform: translateY(-1px);
}

body.workspace-mode-image .image-option-btn > svg:first-child,
body.workspace-mode-video .image-option-btn > svg:first-child {
    flex: 0 0 auto;
    color: inherit;
}

body.workspace-mode-image .image-option-btn > span,
body.workspace-mode-video .image-option-btn > span,
body.workspace-mode-video #videoBgmBtn > span {
    overflow: hidden;
    max-width: 92px;
    color: inherit;
    font: inherit;
    line-height: normal;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.workspace-mode-image .image-option-chevron,
body.workspace-mode-video .image-option-chevron {
    width: 12px;
    height: 12px;
    margin-left: 1px;
    color: inherit;
    opacity: 0.55;
}

/* --------------------------------------------------------------------------
   4. 发送 / 停止：紫色渐变圆钮，全区唯一焦点
   -------------------------------------------------------------------------- */
body.workspace-mode-chat .send-btn,
body.workspace-mode-image .send-btn,
body.workspace-mode-video .send-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #9486ff 0%, #6d5ce4 58%, #5847cf 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 8px 22px rgba(109, 92, 228, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.18s var(--fxc-ease), box-shadow 0.18s var(--fxc-ease),
        filter 0.18s var(--fxc-ease);
}

body.workspace-mode-chat .send-btn:not(:disabled):hover,
body.workspace-mode-image .send-btn:not(:disabled):hover,
body.workspace-mode-video .send-btn:not(:disabled):hover {
    transform: translateY(-1px) scale(1.05);
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 12px 30px rgba(109, 92, 228, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.28);
}

body.workspace-mode-chat .send-btn:not(:disabled):active,
body.workspace-mode-image .send-btn:not(:disabled):active,
body.workspace-mode-video .send-btn:not(:disabled):active {
    transform: scale(0.96);
}

body.workspace-mode-chat .send-btn:disabled,
body.workspace-mode-image .send-btn:disabled,
body.workspace-mode-video .send-btn:disabled {
    color: rgba(240, 240, 246, 0.24);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: none;
    filter: none;
}

body.workspace-mode-chat .stop-btn,
body.workspace-mode-image .stop-btn,
body.workspace-mode-video .stop-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: rgba(244, 245, 250, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

body.workspace-mode-chat .stop-btn:hover,
body.workspace-mode-image .stop-btn:hover,
body.workspace-mode-video .stop-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* --------------------------------------------------------------------------
   5. 上拉框：深色玻璃面板，选中紫色软底
   -------------------------------------------------------------------------- */
.thinking-level-picker {
    position: relative;
    flex: 0 0 auto;
}

.thinking-level-picker.open .thinking-level-chevron {
    transform: rotate(180deg);
}

.thinking-level-chevron {
    transition: transform 0.18s ease;
}

#thinkingBtn.is-locked .thinking-level-chevron {
    display: none;
}

.image-option-btn {
    position: relative;
}

.image-option-chevron {
    flex: 0 0 auto;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.image-option-btn.popup-open .image-option-chevron {
    transform: rotate(180deg);
    opacity: 0.95;
}

.thinking-level-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 420;
    width: 232px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
    backdrop-filter: blur(32px) saturate(1.15);
    -webkit-backdrop-filter: blur(32px) saturate(1.15);
    animation: composerOptionMenuIn 140ms ease-out;
    transform-origin: bottom left;
}

.thinking-level-title {
    padding: 6px 9px 8px;
    color: rgba(240, 240, 246, 0.4);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thinking-level-option {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    color: rgba(240, 240, 246, 0.78);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.thinking-level-option:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.thinking-level-option.active {
    color: var(--fxc-accent-strong);
    background: var(--fxc-accent-soft);
}

.thinking-level-option > span {
    display: grid;
    gap: 3px;
}

.thinking-level-option strong {
    font-size: 12.5px;
    font-weight: 650;
}

.thinking-level-option small {
    color: rgba(240, 240, 246, 0.42);
    font-size: 10.5px;
    font-weight: 400;
}

.thinking-level-option > svg {
    flex: 0 0 auto;
    color: var(--fxc-accent-strong);
    opacity: 0;
}

.thinking-level-option.active > svg {
    opacity: 1;
}

@media (max-width: 768px) {
    .thinking-level-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: calc(100vh - 124px);
        overflow-y: auto;
    }

    .image-options-popup[data-option-type="videoSpecs"] {
        position: fixed;
        left: 12px !important;
        right: 12px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 116px);
    }

    body.workspace-mode-video #videoSpecsBtn {
        max-width: min(210px, 48vw);
    }

    body.workspace-mode-video #videoSpecsBtn #videoSpecsLabel {
        max-width: min(150px, 34vw);
    }
}

.image-options-popup {
    min-width: 220px;
    max-width: min(280px, calc(100vw - 24px));
    max-height: 320px;
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    color: #f4f5fa;
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
    backdrop-filter: blur(32px) saturate(1.15);
    -webkit-backdrop-filter: blur(32px) saturate(1.15);
    animation: composerOptionMenuIn 140ms ease-out;
    transform-origin: bottom left;
}

.image-option-popup-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.image-option-popup-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    border-radius: 8px;
    color: var(--fxc-accent-strong) !important;
    background: var(--fxc-accent-soft) !important;
}

.image-option-popup-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.image-option-popup-copy strong {
    color: #f4f5fa;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.image-option-popup-copy small {
    overflow: hidden;
    color: rgba(240, 240, 246, 0.45);
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-option-popup-list {
    display: grid;
    gap: 2px;
    padding: 7px;
}

.image-option-item {
    width: 100%;
    border: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 9px;
    color: rgba(240, 240, 246, 0.72);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: left;
}

.image-option-item + .image-option-item {
    margin-top: 2px;
}

/* 视频生成模式只有两个选项，用紧凑菜单，避免厚重标题挡住输入内容。 */
.image-options-popup[data-compact-mode="true"] {
    min-width: 190px;
    width: 190px;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.image-options-popup[data-compact-mode="true"] .image-option-popup-list {
    gap: 3px;
    padding: 6px;
}

.image-options-popup[data-compact-mode="true"] .image-option-item {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 8px;
}

.image-options-popup[data-compact-mode="true"] .image-option-item + .image-option-item {
    margin-top: 0;
}

.image-options-popup[data-compact-mode="true"] .image-option-item-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    background: rgba(255, 255, 255, 0.045);
}

.image-options-popup[data-compact-mode="true"] .image-option-item.active {
    color: #c9c3ff;
    background: rgba(124, 108, 255, 0.11);
    box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.12);
}

.image-options-popup[data-compact-mode="true"] .image-option-item.active .image-option-item-icon {
    color: #b9b1ff;
    background: rgba(124, 108, 255, 0.1);
}

/* 视频规格与时长：紧贴按钮上方的紧凑分段浮层 */
body.workspace-mode-video #videoSpecsBtn {
    max-width: 220px;
}

body.workspace-mode-video #videoSpecsBtn #videoSpecsLabel {
    max-width: 166px;
}

.video-specs-dot {
    display: none;
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    margin-left: -1px;
    border-radius: 50%;
    background: var(--fxc-accent-strong);
    box-shadow: 0 0 0 3px var(--fxc-accent-soft);
}

body.workspace-mode-video #videoReferenceBtn {
    width: 30px;
    min-width: 30px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    font-size: 17px;
    font-weight: 650;
}

.image-options-popup[data-option-type="videoSpecs"] {
    z-index: 1200 !important;
    width: min(338px, calc(100vw - 24px));
    max-width: min(338px, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - 100px));
    overflow: auto;
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
}

.video-specs-body {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.video-specs-section {
    display: grid;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.video-specs-section:last-child {
    border-bottom: 0;
}

.video-specs-section-title {
    color: rgba(142, 223, 247, 0.82);
    font-size: 11px;
    font-weight: 550;
}

.video-specs-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 3px;
    border: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
}

.video-specs-option {
    min-width: 0;
    height: 49px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 3px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(239, 239, 244, 0.64);
    background: transparent;
    font: inherit;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.video-specs-option:hover {
    color: var(--fxc-text);
    border-color: rgba(124, 108, 255, 0.2);
    background: rgba(124, 108, 255, 0.075);
    transform: none;
}

.video-specs-option:disabled {
    color: rgba(245, 245, 248, 0.18);
    cursor: not-allowed;
    opacity: 0.6;
}

.video-specs-option:disabled .video-ratio-icon {
    opacity: 0.32;
}

.video-specs-option.active {
    color: var(--fxc-accent-strong);
    border-color: rgba(124, 108, 255, 0.38);
    background: rgba(124, 108, 255, 0.11);
    box-shadow:
        0 4px 12px rgba(38, 28, 104, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
    transform: none;
}

.video-ratio-icon {
    display: block;
    width: 15px;
    aspect-ratio: var(--ratio, 16/9);
    max-height: 12px;
    min-height: 5px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    opacity: 0.82;
    transition: opacity 0.18s ease, filter 0.18s ease;
}

.video-specs-option.active .video-ratio-icon {
    opacity: 1;
    filter: none;
}

.video-specs-section.is-resolution .video-specs-options,
.video-specs-section.is-count .video-specs-options,
.video-specs-options.is-compact {
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
}

.video-specs-section.is-resolution .video-specs-option,
.video-specs-section.is-count .video-specs-option,
.video-specs-options.is-compact .video-specs-option {
    height: 36px;
    flex-direction: row;
    font-size: 10.5px;
}

.video-specs-advanced-list,
.video-specs-setting-block {
    display: grid;
    gap: 8px;
}

.video-specs-setting-label,
.video-specs-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.video-specs-setting-label span,
.video-specs-setting-row > span:first-child {
    color: rgba(245, 245, 248, 0.68);
    font-size: 10px;
}

.video-specs-setting-label strong {
    color: rgba(245, 245, 248, 0.42);
    font-size: 9px;
    font-weight: 500;
}

.video-specs-setting-row {
    width: 100%;
    min-height: 28px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.video-specs-toggle {
    position: relative;
    width: 32px;
    height: 18px;
    flex: 0 0 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
}

.video-specs-toggle i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.16s ease;
}

.video-specs-toggle.active {
    background: rgba(124, 108, 255, 0.7);
}

.video-specs-toggle.active i {
    transform: translateX(14px);
    background: #fff;
}

.image-options-popup[data-option-type="videoDuration"] {
    z-index: 1200 !important;
    width: min(390px, calc(100vw - 24px));
    max-width: min(390px, calc(100vw - 24px));
    overflow: visible;
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
}

.video-duration-panel {
    padding: 15px 16px 16px;
}

.video-duration-title {
    margin: 0 0 15px;
    color: rgba(142, 223, 247, 0.82);
    font-size: 11px;
    font-weight: 550;
}

.video-duration-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
    gap: 14px;
}

.video-duration-slider-wrap {
    display: grid;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.video-duration-range {
    width: 100%;
    height: 4px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fxc-accent) 0 var(--range-fill, 0%), rgba(255, 255, 255, 0.12) var(--range-fill, 0%) 100%);
    box-shadow: none;
    cursor: pointer;
}

.video-duration-range::-webkit-slider-thumb {
    width: 4px;
    height: 18px;
    appearance: none;
    border: 0;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.2), 0 3px 8px rgba(0, 0, 0, 0.28);
}

.video-duration-range::-moz-range-thumb {
    width: 4px;
    height: 18px;
    border: 0;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.2), 0 3px 8px rgba(0, 0, 0, 0.28);
}

.video-duration-scale {
    display: flex;
    justify-content: space-between;
    color: rgba(226, 223, 242, 0.45);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.video-duration-value {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(124, 108, 255, 0.26);
    border-radius: 10px;
    color: #fff;
    background: rgba(124, 108, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.video-duration-value strong {
    font-size: 16px;
    font-weight: 680;
    font-variant-numeric: tabular-nums;
}

.video-duration-value small {
    color: var(--fxc-accent-strong);
    font-size: 10px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .image-options-popup[data-option-type="videoSpecs"],
    .image-options-popup[data-option-type="videoDuration"] {
        position: fixed;
        left: 12px !important;
        right: 12px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 116px);
    }

    .image-options-popup[data-option-type="videoDuration"] {
        overflow: hidden;
    }

    .video-duration-row {
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 10px;
    }
}

.image-option-item-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    border-radius: 6px;
    color: rgba(240, 240, 246, 0.55);
    background: rgba(255, 255, 255, 0.06);
}

.image-option-item-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-option-item-check {
    flex: 0 0 15px;
    opacity: 0;
}

.image-option-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.image-option-item.active {
    color: var(--fxc-accent-strong);
    background: var(--fxc-accent-soft);
}

.image-option-item.active .image-option-item-icon {
    color: var(--fxc-accent-strong);
    background: rgba(124, 108, 255, 0.14);
}

.image-option-item.active .image-option-item-check {
    color: var(--fxc-accent-strong);
    opacity: 1;
}

@keyframes composerOptionMenuIn {
    from { opacity: 0; transform: translateY(4px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 路由策略弹窗与参数弹窗同肤 */
.route-strategy-popup {
    width: 366px;
    max-width: calc(100vw - 24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: var(--fxc-popup-bg);
    box-shadow: var(--fxc-popup-shadow);
    backdrop-filter: blur(32px) saturate(1.15);
    -webkit-backdrop-filter: blur(32px) saturate(1.15);
    color: #f4f5fa;
}

.route-strategy-popup::before {
    background: radial-gradient(circle at 18% 0%, rgba(124, 108, 255, 0.16), transparent 66%);
}

.route-strategy-popup .route-popup-card {
    padding: 0 16px 16px;
}

.route-strategy-popup .route-popup-header-top {
    min-height: 48px;
    margin: 0 -16px 12px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.route-strategy-popup .route-popup-title-main {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.route-strategy-popup .route-popup-help-link,
.route-strategy-popup .route-popup-section-title,
.route-strategy-popup .route-popup-badge-teal {
    color: #8edff7;
}

.route-strategy-popup .route-popup-section-title {
    gap: 5px;
}

.route-strategy-popup .route-popup-badge-teal {
    border-color: rgba(77, 205, 239, 0.24);
    background: rgba(77, 205, 239, 0.09);
}

.route-strategy-popup .route-popup-estimate {
    margin: 0 0 12px;
    padding: 10px 11px;
    border: 1px solid rgba(124, 108, 255, 0.22);
    border-radius: 10px;
    background: rgba(124, 108, 255, 0.09);
}

.route-strategy-popup .route-popup-estimate span,
.route-strategy-popup .route-popup-estimate strong {
    display: block;
}

.route-strategy-popup .route-popup-estimate span {
    margin-bottom: 3px;
    color: var(--fxc-accent-strong);
    font-size: 11px;
    font-weight: 500;
}

.route-strategy-popup .route-popup-estimate strong {
    color: var(--fxc-text);
    font-size: 12px;
    font-weight: 550;
}

.route-strategy-popup .route-popup-option {
    border-radius: 9px;
}

.route-strategy-popup .route-popup-option:not(:disabled):hover {
    border-color: rgba(124, 108, 255, 0.28);
    background: rgba(124, 108, 255, 0.08);
}

.route-strategy-popup .route-popup-option.active {
    border-color: var(--fxc-accent-ring);
    background: var(--fxc-accent-soft);
}

.route-strategy-popup .route-popup-option.active .route-popup-option-title,
.route-strategy-popup .route-popup-option.active .route-popup-option-check {
    color: var(--fxc-accent-strong);
}

.route-strategy-popup .route-popup-channel {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.route-strategy-popup .route-popup-channel-bottom {
    display: block;
}

.route-strategy-popup .route-token-pricing {
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.route-strategy-popup .route-token-pricing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: rgba(244, 245, 250, 0.68);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.route-strategy-popup .route-token-pricing-head small {
    color: rgba(165, 154, 255, 0.82);
    font-size: 9px;
    font-weight: 550;
}

.route-strategy-popup .route-token-table {
    display: grid;
    width: 100%;
    gap: 0;
}

.route-strategy-popup .route-token-table-row {
    display: grid;
    grid-template-columns: 44px repeat(4, minmax(0, 1fr));
    align-items: center;
    column-gap: 5px;
    min-height: 24px;
}

.route-strategy-popup .route-token-table-row + .route-token-table-row {
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.route-strategy-popup .route-token-table-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.route-strategy-popup .route-token-table-head .route-token-table-cell {
    color: rgba(244, 245, 250, 0.38);
    font-size: 9px;
    font-weight: 500;
}

.route-strategy-popup .route-token-table-head .route-token-table-cell:not(.route-token-table-label),
.route-strategy-popup .route-token-table-value {
    text-align: right;
}

.route-strategy-popup .route-token-table-label {
    color: #d8d2ff;
    font-weight: 650;
}

.route-strategy-popup .route-token-table-value {
    color: #eab308;
    font-weight: 620;
}

.route-strategy-popup .route-popup-channel-price-summary {
    color: #eab308;
}

.route-strategy-popup .route-popup-channel:not(:disabled):hover,
.route-strategy-popup .route-popup-channel.active {
    border-color: rgba(124, 108, 255, 0.38);
    background: rgba(124, 108, 255, 0.1);
}

.route-strategy-popup .route-popup-channel-badge {
    color: var(--fxc-accent-strong);
    border: 1px solid rgba(124, 108, 255, 0.26);
    border-radius: 999px;
    padding: 2px 6px;
    background: rgba(124, 108, 255, 0.1);
    font-size: 9px;
    font-weight: 600;
}

.route-strategy-popup .route-popup-channel-empty {
    padding: 14px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    color: var(--fxc-text-faint);
    background: rgba(255, 255, 255, 0.018);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

body.theme-light .route-strategy-popup .route-popup-channel-empty {
    border-color: rgba(24, 25, 39, 0.1);
    color: rgba(24, 25, 39, 0.46);
    background: rgba(24, 25, 39, 0.025);
}

body.theme-light .route-strategy-popup .route-token-pricing {
    border-top-color: rgba(33, 29, 54, 0.08);
}

body.theme-light .route-strategy-popup .route-token-pricing-head {
    color: rgba(29, 27, 46, 0.58);
}

body.theme-light .route-strategy-popup .route-token-pricing-head small {
    color: #6657e8;
}

body.theme-light .route-strategy-popup .route-token-table-row + .route-token-table-row {
    border-top-color: rgba(33, 29, 54, 0.08);
}

body.theme-light .route-strategy-popup .route-token-table-head .route-token-table-cell {
    color: rgba(29, 27, 46, 0.46);
}

body.theme-light .route-strategy-popup .route-token-table-label {
    color: #6657e8;
}

body.theme-light .route-strategy-popup .route-token-table-value {
    color: #b7791f;
}

/* --------------------------------------------------------------------------
   6. 上传区
   -------------------------------------------------------------------------- */
/* 6.1 聊天模式：附件占位卡常驻输入框内左侧，悬停显示当前模型支持的附件类型 */
body.workspace-mode-chat .reference-stage {
    display: block !important;
    top: 12px;
    left: 12px;
    width: 84px;
    height: 88px;
    pointer-events: none;
}

body.workspace-mode-chat .reference-stage.has-images {
    width: 134px;
}

body.workspace-mode-chat .reference-stage .empty-reference-trigger {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 62px;
    height: 58px;
    padding: 4px 2px 3px;
    border: 1px dashed var(--fxc-dash-border);
    border-radius: 10px;
    color: var(--fxc-text-dim);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.18s var(--fxc-ease), border-color 0.18s var(--fxc-ease),
        background 0.18s var(--fxc-ease), box-shadow 0.18s var(--fxc-ease);
}

body.workspace-mode-chat .reference-stage .empty-reference-trigger:hover,
body.workspace-mode-chat .reference-stage .empty-reference-trigger:focus-visible {
    color: var(--fxc-text);
    border-color: var(--fxc-accent-ring);
    background: var(--fxc-btn-hover-bg);
    box-shadow: 0 5px 14px var(--fxc-accent-glow);
}

body.workspace-mode-chat .reference-stage .empty-reference-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
    color: inherit;
}

body.workspace-mode-chat .reference-stage .empty-reference-icon {
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    color: inherit;
    background: transparent;
}

body.workspace-mode-chat .reference-stage .empty-reference-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

body.workspace-mode-chat .reference-stage .empty-reference-label {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.workspace-mode-chat .reference-stage .chat-attachment-count {
    max-width: 100%;
    overflow: hidden;
    color: var(--fxc-text-faint);
    font-size: 8px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
}

body.workspace-mode-chat .reference-stage .empty-reference-badge,
body.workspace-mode-chat .reference-stage .preview-item-add {
    display: none !important;
}

body.workspace-mode-chat .reference-stage.has-images .preview-area {
    display: block;
    position: absolute;
    top: 0;
    left: 70px;
    width: 62px;
    height: 58px;
    overflow: visible;
}

body.workspace-mode-chat .reference-stage.has-images .preview-item {
    top: 0;
    left: 0;
    width: 58px;
    height: 58px;
    border-radius: 10px;
    transform: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

body.workspace-mode-chat .reference-stage.has-images .preview-item-file {
    width: 60px;
    height: 48px;
    top: 5px;
}

body.workspace-mode-chat .reference-stage.has-images .preview-item .preview-floating-name,
body.workspace-mode-chat .reference-stage.has-images .preview-item .preview-name {
    display: none;
}

body.workspace-mode-chat .reference-stage.has-images .preview-remove {
    display: grid;
    place-items: center;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    opacity: 1;
    border: 2px solid var(--chat-surface, #17181f);
    font-size: 11px;
}

body.workspace-mode-chat .chat-input-box .rich-input,
body.workspace-mode-chat .chat-input-box textarea {
    min-height: 76px;
    padding-left: 104px;
}

body.workspace-mode-chat .chat-input-box.has-reference-stage .rich-input,
body.workspace-mode-chat .chat-input-box.has-reference-stage textarea {
    padding-left: 148px;
}

/* 6.2 图片/视频：参考图槽位内嵌在输入框左侧 */
body.workspace-mode-image .chat-input-box.has-reference-stage,
body.workspace-mode-video .chat-input-box.has-reference-stage,
body.workspace-mode-video .input-container:has(.frame-upload-panel.visible) .chat-input-box {
    min-height: 146px;
}

body.workspace-mode-image .chat-input-box.has-reference-stage .rich-input,
body.workspace-mode-video .chat-input-box.has-reference-stage .rich-input {
    height: 88px;
    min-height: 88px;
    padding: 10px 8px 4px 104px;
}

body.workspace-mode-chat .reference-stage,
body.workspace-mode-image .reference-stage,
body.workspace-mode-video .reference-stage,
body.workspace-mode-chat .reference-stage.has-images,
body.workspace-mode-image .reference-stage.has-images,
body.workspace-mode-video .reference-stage.has-images {
    top: 12px;
    left: 12px;
    width: 84px;
    height: 88px;
    border: 0;
    border-radius: 0;
    background: transparent;
    contain: layout;
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-trigger,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-trigger,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-trigger {
    inset: 8px auto auto 13px;
    width: 52px;
    height: 68px;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 2px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025));
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
    transform: rotate(-7deg);
    transition: border-color 0.2s var(--fxc-ease), box-shadow 0.2s var(--fxc-ease),
        transform 0.2s var(--fxc-ease), background 0.2s var(--fxc-ease);
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-trigger:hover,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-trigger:hover,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-trigger:hover {
    border-color: var(--fxc-accent-ring);
    background: linear-gradient(155deg, rgba(124, 108, 255, 0.14), rgba(255, 255, 255, 0.035));
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.22), 0 0 0 3px var(--fxc-accent-glow);
    transform: translateY(-2px) rotate(-4deg);
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-content,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-content,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-content {
    flex-direction: column;
    gap: 8px;
    color: var(--fxc-text-dim);
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-icon,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-icon,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border-radius: 0;
    color: var(--fxc-text-faint);
    background: transparent;
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-icon svg,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-icon svg,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-content span,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-content span,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-content span {
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

body.workspace-mode-chat .reference-stage:not(.has-images) .empty-reference-badge,
body.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-badge,
body.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-badge {
    display: none;
}

/* Chat keeps the wider preview rail once an attachment has been added. */
body.workspace-mode-chat .reference-stage.has-images {
    width: 134px;
}

body.workspace-mode-image .reference-stage.has-images .preview-item,
body.workspace-mode-video .reference-stage.has-images .preview-item {
    top: 7px;
    left: 7px;
    width: 58px;
    height: 74px;
    padding: 3px;
    border-radius: 10px;
}

body.workspace-mode-image .reference-stage.has-images .empty-reference-trigger,
body.workspace-mode-video .reference-stage.has-images .empty-reference-trigger {
    display: none !important;
}

body.workspace-mode-image .reference-stage.is-expanded,
body.workspace-mode-video .reference-stage.is-expanded {
    width: calc(var(--expanded-items, 2) * 64px + 30px);
    contain: none;
}

body.workspace-mode-image .reference-stage.is-expanded .preview-area,
body.workspace-mode-video .reference-stage.is-expanded .preview-area {
    width: 100%;
    height: 100%;
}

/* 6.3 视频：首尾帧槽位（内嵌输入框左侧） */
body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible {
    position: absolute !important;
    inset: 14px auto auto 18px !important;
    z-index: 6;
    box-sizing: border-box;
    width: 116px !important;
    height: 70px !important;
    display: grid !important;
    grid-template-columns: 48px 16px 48px !important;
    align-items: center;
    gap: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot {
    position: relative;
    box-sizing: border-box;
    width: 48px !important;
    height: 68px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 3px !important;
    color: var(--fxc-text-dim);
    background: rgba(255, 255, 255, 0.075) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13) !important;
    cursor: pointer;
    transition: border-color 0.18s var(--fxc-ease), background 0.18s var(--fxc-ease),
        box-shadow 0.18s var(--fxc-ease), transform 0.18s var(--fxc-ease);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:first-child {
    transform: rotate(-5deg);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:last-child {
    transform: rotate(4deg);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:hover {
    border-color: rgba(160, 151, 255, 0.42) !important;
    color: var(--fxc-text);
    background: rgba(124, 108, 255, 0.1) !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18) !important;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:first-child:hover {
    transform: rotate(-5deg) translateY(-1px);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:last-child:hover {
    transform: rotate(4deg) translateY(-1px);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot.has-image {
    border-style: solid !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-placeholder {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 5px !important;
    color: inherit;
    font-family: inherit;
    font-size: 10px !important;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-placeholder svg {
    width: 15px !important;
    height: 15px !important;
    opacity: 0.62 !important;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-arrow {
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center !important;
    color: rgba(240, 240, 246, 0.34);
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-arrow svg {
    width: 14px !important;
    height: 14px !important;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-label {
    bottom: 0;
    padding: 10px 0 4px;
    border-radius: 0 0 9px 9px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-remove {
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    background: rgba(17, 19, 24, 0.78);
    font-size: 10px;
    line-height: 16px;
}

body.workspace-mode-video .chat-input-box:has(> .frame-upload-panel.visible) > .reference-stage {
    display: none !important;
}

body.workspace-mode-video .chat-input-box:has(> .frame-upload-panel.visible) > .rich-input {
    box-sizing: border-box;
    width: 100%;
    height: var(--composer-input-height, 88px) !important;
    min-height: 88px !important;
    max-height: min(58vh, 420px) !important;
    padding: 9px 8px 4px 154px !important;
}

/* --------------------------------------------------------------------------
   7. 折叠态 / 价格徽章 / 响应式
   -------------------------------------------------------------------------- */
body.workspace-mode-chat .chat-input-box.composer-collapsed,
body.workspace-mode-image .chat-input-box.composer-collapsed,
body.workspace-mode-video .chat-input-box.composer-collapsed {
    width: min(620px, 100%);
    max-width: 620px;
    min-height: 72px !important;
    height: 72px !important;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
}

body.workspace-mode-chat .chat-input-box.composer-collapsed .rich-input,
body.workspace-mode-image .chat-input-box.composer-collapsed .rich-input,
body.workspace-mode-video .chat-input-box.composer-collapsed .rich-input,
body.workspace-mode-image .chat-input-box.composer-collapsed.has-reference-stage .rich-input,
body.workspace-mode-video .chat-input-box.composer-collapsed.has-reference-stage .rich-input,
body.workspace-mode-video .input-container:has(.frame-upload-panel.visible) .chat-input-box.composer-collapsed .rich-input {
    box-sizing: border-box;
    min-height: 70px !important;
    height: 70px !important;
    max-height: 70px !important;
    padding: 0 76px 0 24px !important;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    line-height: 70px !important;
}

body.workspace-mode-image .chat-input-box.composer-collapsed .reference-stage,
body.workspace-mode-video .chat-input-box.composer-collapsed .reference-stage,
body.workspace-mode-video .input-area.composer-collapsed .frame-upload-panel.visible,
body.workspace-mode-video .chat-input-box.composer-collapsed > .frame-upload-panel.visible {
    display: none !important;
}

body.workspace-mode-chat .chat-input-box.composer-collapsed .input-toolbar,
body.workspace-mode-image .chat-input-box.composer-collapsed .input-toolbar,
body.workspace-mode-video .chat-input-box.composer-collapsed .input-toolbar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 11px 0 0;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
}

body.workspace-mode-chat .chat-input-box.composer-collapsed .input-toolbar-right,
body.workspace-mode-image .chat-input-box.composer-collapsed .input-toolbar-right,
body.workspace-mode-video .chat-input-box.composer-collapsed .input-toolbar-right {
    display: flex;
    align-items: center;
    transform: none;
    pointer-events: auto;
}

body.workspace-mode-chat .chat-input-box.composer-collapsed .send-btn,
body.workspace-mode-chat .chat-input-box.composer-collapsed .stop-btn,
body.workspace-mode-image .chat-input-box.composer-collapsed .send-btn,
body.workspace-mode-image .chat-input-box.composer-collapsed .stop-btn,
body.workspace-mode-video .chat-input-box.composer-collapsed .send-btn,
body.workspace-mode-video .chat-input-box.composer-collapsed .stop-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    border-radius: 50%;
}

/* 价格控件：放进底部工具栏，默认只显示总价，悬停或聚焦时展示明细。 */
body.workspace-mode-chat .chat-price-control,
body.workspace-mode-image .chat-price-control,
body.workspace-mode-video .chat-price-control {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin-right: 2px;
    z-index: 14;
}

body.workspace-mode-chat .chat-price-control.hidden,
body.workspace-mode-image .chat-price-control.hidden,
body.workspace-mode-video .chat-price-control.hidden,
body.workspace-mode-chat .chat-input-box.composer-collapsed .chat-price-control,
body.workspace-mode-image .chat-input-box.composer-collapsed .chat-price-control,
body.workspace-mode-video .chat-input-box.composer-collapsed .chat-price-control {
    display: none !important;
}

body.workspace-mode-chat .chat-price-badge,
body.workspace-mode-image .chat-price-badge,
body.workspace-mode-video .chat-price-badge {
    position: static;
    inset: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    max-width: 160px;
    margin: 0;
    padding: 0 8px;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    color: rgba(239, 237, 248, 0.72);
    background: transparent;
    box-shadow: none;
    font: inherit;
    line-height: 1;
    white-space: nowrap;
    cursor: help;
    opacity: 1;
    pointer-events: auto;
    transition: color 0.18s ease, background 0.18s ease;
}

body.workspace-mode-chat .chat-price-badge:hover,
body.workspace-mode-chat .chat-price-badge:focus-visible,
body.workspace-mode-image .chat-price-badge:hover,
body.workspace-mode-image .chat-price-badge:focus-visible,
body.workspace-mode-video .chat-price-badge:hover,
body.workspace-mode-video .chat-price-badge:focus-visible {
    color: rgba(249, 247, 255, 0.94);
    background: rgba(255, 255, 255, 0.055);
    outline: none;
}

.chat-price-label {
    color: rgba(235, 232, 246, 0.48);
    font-size: 11px;
    font-weight: 500;
}

.chat-price-value {
    overflow: hidden;
    color: #f1d27d;
    font-size: 13px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1px;
    text-overflow: ellipsis;
}

.chat-price-info {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid rgba(235, 232, 246, 0.24);
    border-radius: 50%;
    color: rgba(235, 232, 246, 0.48);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 9px;
    font-weight: 700;
}

.chat-price-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 232px;
    box-sizing: border-box;
    padding: 13px 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    color: rgba(245, 243, 251, 0.9);
    background: rgba(20, 20, 27, 0.97);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px) scale(0.985);
    transform-origin: right bottom;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.chat-price-popover::after {
    position: absolute;
    right: 20px;
    bottom: -5px;
    width: 9px;
    height: 9px;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(20, 20, 27, 0.97);
    content: '';
    transform: rotate(45deg);
}

.chat-price-control:hover .chat-price-popover,
.chat-price-control:focus-within .chat-price-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-price-popover-title {
    margin-bottom: 8px;
    color: rgba(249, 247, 255, 0.96);
    font-size: 12px;
    font-weight: 650;
}

.chat-price-summary,
.chat-price-formula {
    font-size: 11px;
    line-height: 1.55;
}

.chat-price-summary {
    color: rgba(239, 236, 248, 0.72);
}

.chat-price-formula {
    margin-top: 2px;
    color: rgba(239, 236, 248, 0.48);
}

.chat-price-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(239, 236, 248, 0.56);
    font-size: 11px;
}

.chat-price-total strong {
    color: #f1d27d;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* 输入区外边距 */
body.workspace-mode-image .input-area,
body.workspace-mode-video .input-area {
    padding-right: 24px;
    padding-bottom: 18px;
    padding-left: 24px;
}

@media (max-width: 900px) {
    body.workspace-mode-chat .input-container,
    body.workspace-mode-image .input-container,
    body.workspace-mode-video .input-container {
        width: min(680px, calc(100% - 32px));
    }
}

@media (max-width: 768px) {
    body.workspace-mode-chat .input-container,
    body.workspace-mode-image .input-container,
    body.workspace-mode-video .input-container {
        width: 100%;
        max-width: none;
    }

    body.workspace-mode-chat .input-toolbar-left,
    body.workspace-mode-image .input-toolbar-left,
    body.workspace-mode-video .input-toolbar-left {
        flex-wrap: wrap;
        overflow: visible !important;
    }

    body.workspace-mode-chat .asset-entry-label,
    body.workspace-mode-chat #webSearchBtn > span {
        display: none;
    }

    body.workspace-mode-chat .role-entry-btn {
        width: 32px;
        padding: 0;
        justify-content: center;
    }

    .chat-price-label,
    .chat-price-info {
        display: none;
    }

    body.workspace-mode-chat .chat-price-badge,
    body.workspace-mode-image .chat-price-badge,
    body.workspace-mode-video .chat-price-badge {
        max-width: 92px;
        padding: 0 6px;
    }

    body.workspace-mode-chat .send-btn,
    body.workspace-mode-chat .stop-btn,
    body.workspace-mode-image .send-btn,
    body.workspace-mode-image .stop-btn,
    body.workspace-mode-video .send-btn,
    body.workspace-mode-video .stop-btn {
        min-width: 44px;
        min-height: 44px;
    }

    body.workspace-mode-image #assetSelectorBtn,
    body.workspace-mode-video #assetSelectorBtn {
        width: 44px;
        min-width: 44px;
        padding: 0;
        justify-content: center;
    }

    body.workspace-mode-image .input-area,
    body.workspace-mode-video .input-area {
        padding-right: 10px;
        padding-bottom: 10px;
        padding-left: 10px;
    }

    body.workspace-mode-video .chat-input-box:has(> .frame-upload-panel.visible) {
        min-height: 140px;
    }

    body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible {
        inset: 12px auto auto 14px !important;
        width: 108px !important;
        height: 64px !important;
        grid-template-columns: 44px 16px 44px !important;
        gap: 2px !important;
    }

    body.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot {
        width: 44px !important;
        height: 62px !important;
    }

    body.workspace-mode-video .chat-input-box:has(> .frame-upload-panel.visible) > .rich-input {
        min-height: 82px !important;
        height: var(--composer-input-height, 82px) !important;
        max-height: min(58vh, 420px) !important;
        padding: 8px 8px 4px 138px !important;
    }
}

@media (min-width: 769px) {
    body.workspace-mode-image #imageModeBtn {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.workspace-mode-chat .chat-input-box,
    body.workspace-mode-image .chat-input-box,
    body.workspace-mode-video .chat-input-box,
    body.workspace-mode-chat .send-btn,
    body.workspace-mode-image .send-btn,
    body.workspace-mode-video .send-btn,
    body.workspace-mode-image .reference-stage .empty-reference-trigger,
    body.workspace-mode-video .frame-upload-panel.visible .frame-slot {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   8. 浅色主题覆盖
   -------------------------------------------------------------------------- */
body.chat-shell.theme-light {
    --fxc-accent: #6657e8;
    --fxc-accent-strong: #5648d3;
    --fxc-accent-soft: rgba(102, 87, 232, 0.1);
    --fxc-accent-ring: rgba(102, 87, 232, 0.38);
    --fxc-accent-glow: rgba(102, 87, 232, 0.08);
    --fxc-box-border: rgba(33, 29, 54, 0.12);
    --fxc-box-bg:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 100%),
        rgba(250, 250, 253, 0.9);
    --fxc-box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 20px 52px rgba(42, 38, 70, 0.14),
        0 3px 10px rgba(42, 38, 70, 0.05);
    --fxc-text: #1d1b2e;
    --fxc-text-dim: rgba(29, 27, 46, 0.55);
    --fxc-text-faint: rgba(29, 27, 46, 0.38);
    --fxc-btn-hover-bg: rgba(102, 87, 232, 0.06);
    --fxc-btn-hover-ring: rgba(33, 29, 54, 0.08);
    --fxc-popup-bg: rgba(255, 255, 255, 0.97);
    --fxc-popup-shadow: 0 24px 60px rgba(42, 38, 70, 0.2);
    --fxc-dash-border: rgba(33, 29, 54, 0.2);
}

body.theme-light.workspace-mode-chat .chat-input-box:focus-within,
body.theme-light.workspace-mode-image .chat-input-box:focus-within,
body.theme-light.workspace-mode-video .chat-input-box:focus-within {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 4px var(--fxc-accent-glow),
        0 12px 40px rgba(102, 87, 232, 0.12),
        0 20px 52px rgba(42, 38, 70, 0.14);
}

body.theme-light.workspace-mode-image .image-option-btn {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

body.theme-light.workspace-mode-image .tool-btn,
body.theme-light.workspace-mode-image .image-option-btn,
body.theme-light.workspace-mode-image #routeStrategyBtn,
body.theme-light.workspace-mode-video .tool-btn,
body.theme-light.workspace-mode-video .image-option-btn,
body.theme-light.workspace-mode-video #routeStrategyBtn {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

body.theme-light.workspace-mode-image .tool-btn:hover,
body.theme-light.workspace-mode-image .image-option-btn:hover,
body.theme-light.workspace-mode-image .image-option-btn.popup-open,
body.theme-light.workspace-mode-image #routeStrategyBtn:hover,
body.theme-light.workspace-mode-image #routeStrategyBtn.active,
body.theme-light.workspace-mode-video .tool-btn:hover,
body.theme-light.workspace-mode-video .image-option-btn:hover,
body.theme-light.workspace-mode-video .image-option-btn.popup-open,
body.theme-light.workspace-mode-video #routeStrategyBtn:hover,
body.theme-light.workspace-mode-video #routeStrategyBtn.active {
    color: var(--fxc-text);
    border: 0 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 7px 18px rgba(42, 38, 70, 0.14) !important;
}

body.theme-light.workspace-mode-chat .send-btn:not(:disabled),
body.theme-light.workspace-mode-image .send-btn:not(:disabled),
body.theme-light.workspace-mode-video .send-btn:not(:disabled) {
    color: #fff;
    background: linear-gradient(145deg, #8578f5 0%, #6657e8 58%, #5546d6 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 18px rgba(102, 87, 232, 0.34),
        0 2px 5px rgba(42, 38, 70, 0.12);
}

body.theme-light.workspace-mode-chat .send-btn:disabled,
body.theme-light.workspace-mode-image .send-btn:disabled,
body.theme-light.workspace-mode-video .send-btn:disabled {
    color: rgba(29, 27, 46, 0.24);
    background: rgba(29, 27, 46, 0.06);
    box-shadow: inset 0 0 0 1px rgba(29, 27, 46, 0.06);
}

body.theme-light.workspace-mode-chat .stop-btn,
body.theme-light.workspace-mode-image .stop-btn,
body.theme-light.workspace-mode-video .stop-btn {
    color: rgba(29, 27, 46, 0.66);
    background: rgba(29, 27, 46, 0.06);
    box-shadow: inset 0 0 0 1px rgba(29, 27, 46, 0.08);
}

body.theme-light.workspace-mode-chat .stop-btn:hover,
body.theme-light.workspace-mode-image .stop-btn:hover,
body.theme-light.workspace-mode-video .stop-btn:hover {
    color: #1d1b2e;
    background: rgba(29, 27, 46, 0.1);
    box-shadow: inset 0 0 0 1px rgba(29, 27, 46, 0.12);
}

body.theme-light .thinking-level-menu,
body.theme-light .image-options-popup,
body.theme-light .route-strategy-popup {
    border-color: rgba(33, 29, 54, 0.09);
    color: #1d1b2e;
}

body.theme-light .thinking-level-title,
body.theme-light .image-option-popup-copy small,
body.theme-light .thinking-level-option small {
    color: rgba(29, 27, 46, 0.46);
}

body.theme-light .thinking-level-option,
body.theme-light .image-option-item {
    color: rgba(29, 27, 46, 0.7);
}

body.theme-light .thinking-level-option:hover,
body.theme-light .image-option-item:hover {
    color: #1d1b2e;
    background: rgba(102, 87, 232, 0.06);
}

body.theme-light .image-option-item-icon {
    color: rgba(29, 27, 46, 0.5);
    background: rgba(29, 27, 46, 0.055);
}

body.theme-light .image-option-item.active .image-option-item-icon {
    color: var(--fxc-accent-strong);
    background: rgba(102, 87, 232, 0.1);
}

body.theme-light .image-options-popup[data-compact-mode="true"] .image-option-item.active {
    color: #5548c8;
    background: rgba(102, 87, 232, 0.075);
    box-shadow: inset 0 0 0 1px rgba(102, 87, 232, 0.09);
}

body.theme-light .image-option-popup-head {
    border-bottom-color: rgba(33, 29, 54, 0.08);
}

body.theme-light .image-option-popup-copy strong,
body.theme-light .video-specs-head strong {
    color: #1d1b2e;
}

body.theme-light .video-specs-head,
body.theme-light .video-specs-section,
body.theme-light .video-specs-setting-block + .video-specs-setting-block,
body.theme-light .video-specs-setting-row + .video-specs-setting-block,
body.theme-light .video-specs-setting-block + .video-specs-setting-row {
    border-color: rgba(33, 29, 54, 0.08);
}

body.theme-light .video-specs-head small,
body.theme-light .video-specs-section-title,
body.theme-light .video-specs-setting-label strong {
    color: #62bfd2;
}

body.theme-light .image-options-popup[data-option-type="videoSpecs"],
body.theme-light .image-options-popup[data-option-type="videoDuration"] {
    border-color: rgba(33, 29, 54, 0.09);
    background: rgba(255, 255, 255, 0.985);
    box-shadow:
        0 24px 60px rgba(42, 38, 70, 0.16),
        0 4px 14px rgba(42, 38, 70, 0.05);
}

body.theme-light .video-specs-options {
    border: 1px solid rgba(33, 29, 54, 0.035);
    background: rgba(29, 27, 46, 0.045);
}

body.theme-light .video-specs-option {
    color: rgba(29, 27, 46, 0.68);
    border-color: transparent;
    background: transparent;
}

body.theme-light .video-specs-option:hover {
    color: #1d1b2e;
    border-color: rgba(102, 87, 232, 0.1);
    background: rgba(255, 255, 255, 0.62);
}

body.theme-light .video-specs-option.active {
    color: #1d1b2e;
    border-color: rgba(102, 87, 232, 0.2);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 4px 12px rgba(61, 52, 125, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.theme-light .video-specs-option:disabled {
    color: rgba(29, 27, 46, 0.22);
    background: transparent;
}

body.theme-light .video-duration-title {
    color: #62bfd2;
}

body.theme-light .video-duration-range {
    background: linear-gradient(90deg, #7668e8 0 var(--range-fill, 0%), rgba(29, 27, 46, 0.12) var(--range-fill, 0%) 100%);
}

body.theme-light .video-duration-range::-webkit-slider-thumb {
    border: 1px solid rgba(102, 87, 232, 0.24);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 87, 232, 0.1), 0 3px 8px rgba(42, 38, 70, 0.15);
}

body.theme-light .video-duration-range::-moz-range-thumb {
    border: 1px solid rgba(102, 87, 232, 0.24);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 87, 232, 0.1), 0 3px 8px rgba(42, 38, 70, 0.15);
}

body.theme-light .video-duration-scale {
    color: rgba(29, 27, 46, 0.46);
}

body.theme-light .video-duration-value {
    color: #1d1b2e;
    border-color: rgba(102, 87, 232, 0.16);
    background: rgba(102, 87, 232, 0.065);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light .video-duration-value small {
    color: #6657e8;
}

body.theme-light .video-specs-setting-label span,
body.theme-light .video-specs-setting-row > span:first-child {
    color: rgba(29, 27, 46, 0.72);
}

body.theme-light .video-specs-toggle {
    background: rgba(29, 27, 46, 0.14);
}

body.theme-light .reference-asset-library-btn {
    color: rgba(29, 27, 46, 0.58);
    border-color: rgba(33, 29, 54, 0.13);
    background: rgba(255, 255, 255, 0.92);
}

body.theme-light .route-strategy-popup .route-popup-option:not(:disabled):hover {
    background: rgba(102, 87, 232, 0.06);
}

body.theme-light.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-trigger,
body.theme-light.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-trigger {
    border-color: rgba(29, 27, 46, 0.1);
    background: linear-gradient(155deg, #ffffff, #f1f1f3);
    box-shadow: 0 7px 16px rgba(42, 38, 70, 0.1);
}

body.theme-light.workspace-mode-image .reference-stage:not(.has-images) .empty-reference-trigger:hover,
body.theme-light.workspace-mode-video .reference-stage:not(.has-images) .empty-reference-trigger:hover {
    border-color: rgba(102, 87, 232, 0.3);
    background: linear-gradient(155deg, #ffffff, #f3f1ff);
    box-shadow: 0 9px 18px rgba(42, 38, 70, 0.13), 0 0 0 3px rgba(102, 87, 232, 0.06);
}

body.theme-light.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot {
    border-color: rgba(39, 37, 48, 0.06) !important;
    color: rgba(55, 53, 63, 0.48);
    background: #f0f0f2 !important;
    box-shadow: 0 3px 9px rgba(35, 33, 44, 0.08) !important;
}

body.theme-light.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot:hover {
    border-color: rgba(102, 87, 232, 0.22) !important;
    color: rgba(42, 39, 54, 0.72);
    background: #eceaf8 !important;
}

body.theme-light.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot.has-image {
    border-color: rgba(33, 29, 54, 0.22) !important;
}

body.theme-light.workspace-mode-video .chat-input-box > .frame-upload-panel.visible .frame-slot-arrow {
    color: rgba(29, 27, 46, 0.35);
}

body.theme-light.workspace-mode-chat .chat-price-badge,
body.theme-light.workspace-mode-image .chat-price-badge,
body.theme-light.workspace-mode-video .chat-price-badge {
    color: rgba(39, 35, 66, 0.72);
    background: transparent;
    box-shadow: none;
}

body.theme-light .chat-price-badge:hover,
body.theme-light .chat-price-badge:focus-visible {
    color: rgba(30, 27, 53, 0.92);
    background: rgba(50, 43, 92, 0.055);
}

body.theme-light .chat-price-label,
body.theme-light .chat-price-info {
    color: rgba(48, 42, 82, 0.48);
}

body.theme-light .chat-price-info {
    border-color: rgba(48, 42, 82, 0.2);
}

body.theme-light .chat-price-value,
body.theme-light .chat-price-total strong {
    color: #8b6519;
}

body.theme-light .chat-price-popover {
    border-color: rgba(48, 42, 82, 0.11);
    color: rgba(31, 28, 50, 0.9);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(42, 36, 76, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light .chat-price-popover::after {
    border-color: rgba(48, 42, 82, 0.11);
    background: rgba(255, 255, 255, 0.98);
}

body.theme-light .chat-price-popover-title {
    color: rgba(31, 28, 50, 0.94);
}

body.theme-light .chat-price-summary {
    color: rgba(48, 42, 82, 0.68);
}

body.theme-light .chat-price-formula,
body.theme-light .chat-price-total {
    color: rgba(48, 42, 82, 0.48);
}

body.theme-light .chat-price-total {
    border-top-color: rgba(48, 42, 82, 0.09);
}

/* --------------------------------------------------------------------------
   9. 侧边栏紧凑模型导航（保留，未改动）
   -------------------------------------------------------------------------- */
/* Compact model navigator. */
@media (min-width: 769px) {

    body.chat-shell .sidebar {
        width: 300px;
        flex: 0 0 300px;
        background: #0b0c11;
        border-right: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: none;
    }

    body.chat-shell.theme-light .sidebar {
        background: #f7f8fa;
        border-right-color: rgba(15, 23, 42, 0.09);
    }

    body.chat-shell .sidebar-header {
        min-height: 66px;
        padding: 0 16px;
        gap: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    body.chat-shell .sidebar-header::after {
        content: "";
        position: absolute;
        right: 14px;
        bottom: -1px;
        left: 14px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.32), transparent);
    }

    body.chat-shell .nav-logo {
        gap: 9px;
    }

    body.chat-shell .logo-mark-shell {
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        box-shadow: none;
    }

    body.chat-shell .logo-img {
        border-radius: 8px;
        filter: saturate(1.06);
    }

    body.chat-shell .logo-text {
        color: #f2f4f8;
        font-size: 15px;
        font-weight: 650;
        letter-spacing: 0.1px;
    }

    body.chat-shell.theme-light .logo-text {
        color: #1b1e28;
    }

    body.chat-shell .toggle-sidebar {
        top: 0;
        right: 0;
        width: 30px;
        height: 30px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 8px;
        color: #9aa3b2;
        background: transparent;
        box-shadow: none;
    }

    body.chat-shell .toggle-sidebar:hover {
        color: #f2f4f7;
        background: rgba(255, 255, 255, 0.07);
        border-color: rgba(255, 255, 255, 0.16);
    }

    body.chat-shell.theme-light .toggle-sidebar {
        color: #5f6675;
        background: transparent;
        border-color: rgba(15, 23, 42, 0.1);
    }

    body.chat-shell.theme-light .toggle-sidebar:hover {
        color: #24283a;
        background: rgba(15, 23, 42, 0.06);
        border-color: rgba(15, 23, 42, 0.12);
    }

    body.sidebar-collapsed .sidebar {
        width: 0;
        overflow: visible;
        border-right: 0;
        box-shadow: none;
    }

    body.sidebar-collapsed .sidebar-header {
        display: block;
        min-height: 0;
        padding: 0;
        border: 0;
    }

    body.sidebar-collapsed .nav-logo,
    body.sidebar-collapsed .logo-text,
    body.sidebar-collapsed .model-tabs,
    body.sidebar-collapsed .model-search-wrap,
    body.sidebar-collapsed .model-info,
    body.sidebar-collapsed .model-list {
        display: none !important;
    }

    body.sidebar-collapsed .toggle-sidebar {
        position: fixed;
        top: 14px;
        left: 12px;
        z-index: 310;
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        background: var(--bg-sidebar);
        box-shadow: 0 5px 16px rgba(15, 23, 42, 0.14);
    }

    body.sidebar-collapsed .top-left-console {
        left: 60px;
    }

    body.sidebar-collapsed .sidebar-toggle-chevron {
        transform: rotate(180deg);
        transform-origin: center;
    }

}

/* Compact reference tokens inside sent video prompts. */
.message.user .video-reference-chip {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    margin: 0 2px;
    padding: 2px 6px;
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 6px;
    color: #dce2ff;
    background: rgba(99, 102, 241, 0.14);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0;
    vertical-align: middle;
    white-space: nowrap;
}

.message.user button.video-reference-chip {
    cursor: pointer;
    appearance: none;
}

.message.user .video-reference-chip:hover {
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.22);
}

.message.user .video-reference-chip.is-audio {
    border-color: rgba(45, 212, 191, 0.3);
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.13);
}

.message.user .video-reference-chip svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.message.user .video-reference-chip .video-reference-chip-thumb {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 4px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.24);
}

body.theme-light .message.user .video-reference-chip .video-reference-chip-thumb {
    background: rgba(15, 23, 42, 0.08);
}

body.theme-light .message.user .video-reference-chip {
    border-color: rgba(79, 70, 229, 0.2);
    color: #4338ca;
    background: rgba(99, 102, 241, 0.08);
}

body.theme-light .message.user .video-reference-chip:hover {
    border-color: rgba(79, 70, 229, 0.34);
    background: rgba(99, 102, 241, 0.13);
}

body.theme-light .message.user .video-reference-chip.is-audio {
    border-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
    background: rgba(20, 184, 166, 0.08);
}

.message.user .message-img.is-reference-highlighted,
.message.user .video-message-attachment.is-reference-highlighted {
    outline: 2px solid #6366f1;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.13);
}

/* --------------------------------------------------------------------------
   10. 浅色工作区与 API 弹窗（保留，未改动）
   -------------------------------------------------------------------------- */
body.theme-light.chat-shell,
body.theme-light .app-container,
body.theme-light .main-content,
body.theme-light .content-area {
    background: #f6f8fb;
}

body.theme-light .top-left-console,
body.theme-light .top-action-btn,
body.theme-light .top-model-capsule {
    color: #334155;
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(30, 50, 80, 0.1);
    box-shadow: 0 6px 20px rgba(36, 52, 77, 0.08);
}

body.theme-light .top-model-capsule .current-model-name,
body.theme-light .top-left-console .console-btn,
body.theme-light .top-action-btn {
    color: #334155;
}

body.theme-light .top-left-console:hover,
body.theme-light .top-action-btn:hover,
body.theme-light .top-model-capsule:hover {
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.18);
    box-shadow: 0 8px 24px rgba(36, 52, 77, 0.12);
}

body.theme-light .input-area {
    background: linear-gradient(180deg, rgba(246, 248, 251, 0) 0%, rgba(246, 248, 251, 0.86) 42%, #f6f8fb 100%);
}

/* API connection modal: the original premium skin is dark-first. Keep that
   skin in dark mode and provide explicit readable tokens for light mode. */
body.theme-light .ultra-premium-modal {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.theme-light .up-modal-header::after {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.12), transparent) !important;
}

body.theme-light .up-header-titles h3,
body.theme-light .up-modal-body h4 {
    color: #172033 !important;
}

body.theme-light .up-header-titles p,
body.theme-light .up-status-indicator,
body.theme-light .up-key-meta,
body.theme-light .up-empty-state p,
body.theme-light .up-link-muted {
    color: #64748b !important;
}

body.theme-light .up-close-btn,
body.theme-light .up-input-icon-btn {
    color: #64748b !important;
}

body.theme-light .up-close-btn:hover,
body.theme-light .up-input-icon-btn:hover {
    color: #172033 !important;
    background: rgba(15, 23, 42, 0.06) !important;
}

body.theme-light .up-status-card,
body.theme-light .up-key-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

body.theme-light .up-key-item:hover,
body.theme-light .up-key-item.active {
    background: #f1f5ff !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .up-status-value,
body.theme-light .up-key-name,
body.theme-light .up-empty-state h4 {
    color: #172033 !important;
}

body.theme-light .up-key-tag {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

body.theme-light .up-key-list {
    scrollbar-color: #cbd5e1 transparent;
}

body.theme-light .up-modal-body > div[style*="linear-gradient"] {
    background: linear-gradient(90deg, transparent 0%, rgba(15, 23, 42, 0.12) 50%, transparent 100%) !important;
}

body.theme-light .up-form-group > div[style*="font-size"] {
    color: #64748b !important;
}

body.theme-light .up-input {
    background: #f8fafc !important;
    border-color: #d7dee9 !important;
    color: #172033 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

body.theme-light .up-input:focus {
    background: #fff !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
}

body.theme-light .up-input::placeholder {
    color: #94a3b8 !important;
}

/* Keep the action cards inside the popover. Hover lift must not enlarge the
   pseudo-border beyond the parent panel. */
.action-popover {
    box-sizing: border-box;
    overflow: hidden;
}

.action-menu-grid {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.action-menu-item {
    min-width: 0;
    box-sizing: border-box;
    transform-origin: center;
}

.action-menu-item:hover {
    transform: translateY(-1px) !important;
}

@media (max-width: 768px) {
    .action-popover {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* --------------------------------------------------------------------------
   11. 角色状态条（保留，未改动）
   -------------------------------------------------------------------------- */
/* The active role is a separate context label above the composer. It never
   changes the input box height or the text's starting position. */
.input-container > .role-status-chip {
    position: relative !important;
    inset: auto !important;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: min(320px, 100%);
    min-height: 30px;
    margin: 0 0 8px 2px !important;
    padding: 0 8px 0 9px;
    gap: 7px;
    border: 1px solid rgba(129, 140, 248, .28);
    border-radius: 10px;
    background: rgba(99, 102, 241, .12);
    box-shadow: 0 5px 16px rgba(30, 41, 59, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform-origin: left bottom;
    animation: roleStatusEnter .2s ease-out;
}

.input-container > .role-status-chip .role-status-dot {
    width: 6px;
    height: 6px;
    background: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.input-container > .role-status-chip .role-status-label {
    color: #4f46e5;
    font-size: 11px;
    font-weight: 650;
}

.input-container > .role-status-chip .role-status-name {
    max-width: 170px;
    color: #1e1b4b;
    font-size: 12px;
    font-weight: 700;
}

.input-container > .role-status-chip .role-status-close {
    width: 20px;
    height: 20px;
    border: 0;
    color: #6366f1;
    background: rgba(99, 102, 241, .09);
}

.input-container > .role-status-chip .role-status-close:hover {
    color: #3730a3;
    background: rgba(99, 102, 241, .18);
}

/* Moving the chip outside means the original input metrics remain
   authoritative, including when the composer is collapsed. */
.chat-input-box.has-role-status > .rich-input,
.chat-input-box.has-role-status > textarea {
    padding: 20px 20px 4px !important;
}

.chat-input-box.composer-collapsed.has-role-status > .rich-input,
.chat-input-box.composer-collapsed.has-role-status > textarea {
    padding: 24px 84px 18px 24px !important;
}

body.theme-dark .input-container > .role-status-chip,
body:not(.theme-light) .input-container > .role-status-chip {
    border-color: rgba(165, 180, 252, .26);
    background: rgba(49, 46, 129, .26);
    box-shadow: 0 8px 20px rgba(2, 6, 23, .28);
}

body.theme-dark .input-container > .role-status-chip .role-status-label,
body:not(.theme-light) .input-container > .role-status-chip .role-status-label {
    color: #c7d2fe;
}

body.theme-dark .input-container > .role-status-chip .role-status-name,
body:not(.theme-light) .input-container > .role-status-chip .role-status-name {
    color: #eef2ff;
}

body.theme-dark .input-container > .role-status-chip .role-status-close,
body:not(.theme-light) .input-container > .role-status-chip .role-status-close {
    color: #c7d2fe;
    background: rgba(165, 180, 252, .1);
}

@keyframes roleStatusEnter {
    from { opacity: 0; transform: translateY(3px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    .input-container > .role-status-chip {
        max-width: calc(100% - 4px);
        margin-left: 0 !important;
    }
    .input-container > .role-status-chip .role-status-name { max-width: 130px; }
}
