/* [JM-COMPOSER-LAYOUT-V1] jm11: jimeng-style chat composer layout (chat mode only) */
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip{left:18px!important;right:auto!important;top:14px!important;height:64px!important;padding:0!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp{right:18px!important;top:10px!important;height:130px!important;overflow:visible!important;padding:0 4px!important}
html body[data-mode] #composerWrap #composer .prompt-input{left:98px!important;right:18px!important;top:14px!important;bottom:62px!important;width:auto!important;height:auto!important;border:0!important;background:transparent!important;box-shadow:none!important;resize:none!important}
html body[data-mode] #composerWrap:has(.jm-rs-stack) #composer .prompt-input{left:262px!important}
html body[data-mode] #composerWrap:has(.jm-rs-exp) #composer .prompt-input{left:19px!important;top:146px!important}
html body[data-mode] #composerWrap #composer .prompt-input textarea{width:100%!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;resize:none!important}
html body[data-mode] #composerWrap #composer::after{border-color:transparent!important;border-style:none!important;outline:0!important}
/* [JM-STACK2-V1] jm12: fanned stack (chat mode collapsed) */
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm2{height:96px!important;top:10px!important;overflow:visible!important;z-index:60!important;padding:0!important}
html body[data-mode] #composerWrap:has(.jm2) #composer .prompt-input{left:112px!important}
.jm2-w{position:relative;width:80px;height:92px;flex-shrink:0}
.jm2-c{position:absolute;top:6px;left:10px;width:60px;height:78px;border-radius:7px;overflow:hidden;background:#2b2b2b;border:2px solid #e8e8e8;box-sizing:border-box;box-shadow:0 2px 8px rgba(0,0,0,.45);transition:transform .2s ease,left .2s ease,opacity .2s;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:rgba(255,255,255,.75);font-size:20px;user-select:none}
.jm2-c img,.jm2-c video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.jm2-back{left:4px;transform:rotate(-7deg)}
.jm2-front{transform:rotate(3deg);z-index:2}
.jm2-plus{position:absolute;z-index:4;left:52px;top:62px;width:26px;height:26px;border-radius:50%;background:#3d3d3d;border:2px solid #1c1c1c;color:#fff;font-size:16px;line-height:22px;text-align:center;cursor:pointer;transition:opacity .15s}
.jm2-x{position:absolute;z-index:5;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:rgba(0,0,0,.7);color:#fff;font-size:12px;line-height:18px;text-align:center;display:none}
.jm2-ex,.jm2-add{border-color:rgba(255,255,255,.15);background:#3a3a3a;opacity:0;pointer-events:none;font-size:11px}
.jm2-ex{font-size:22px}
.jm2-w:hover .jm2-back{opacity:0}
.jm2-w:hover .jm2-front{transform:rotate(-4deg) scale(1.06)}
.jm2-w:hover .jm2-front .jm2-x{display:block}
.jm2-w:hover .jm2-plus{opacity:0;pointer-events:none}
.jm2-w:hover .jm2-ex{opacity:1;pointer-events:auto;left:70px;transform:rotate(4deg);z-index:3}
.jm2-w:hover .jm2-add{opacity:1;pointer-events:auto;left:130px;transform:rotate(9deg);z-index:4}
.jm2-ex:hover,.jm2-add:hover{background:#4a4a4a}
.jm2-tip{position:fixed;z-index:99999;width:220px;border-radius:14px;overflow:hidden;background:#111;box-shadow:0 10px 30px rgba(0,0,0,.6);pointer-events:none;display:none}
.jm2-tip img{display:block;width:100%;height:240px;object-fit:cover}
.jm2-tip div{position:absolute;left:0;right:0;top:0;padding:10px 12px 20px;font-size:13px;color:#fff;background:linear-gradient(rgba(0,0,0,.65),transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jm2-tip.noimg div{position:static;background:none;padding:10px 12px}
html body[data-mode]:has(.jm2-w:hover) #promptRich{clip-path:polygon(120px 0,100% 0,100% 100%,0 100%,0 96px,120px 96px)!important}
/* [JM-TOOLBAR-V1] jm13: placeholder + borderless toolbar + round send (chat mode only) */
html body[data-mode]:has(#composer:not(.agnes-has-prompt)) #promptRich::before{content:"\4f7f\7528 @ \5feb\901f\8c03\7528\53c2\8003\5185\5bb9\ff0c\4f8b\5982\ff1a@\56fe\7247\31  \6a21\4eff @\89c6\9891\31  \7684\52a8\4f5c\ff0c\97f3\8272\53c2\8003 @\97f3\9891\31 ";position:absolute;left:0;top:18px;right:12px;color:rgba(255,255,255,.32);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-param,html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-toggle,html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-at{border:0!important;background:transparent!important;height:32px!important;min-height:32px!important;padding:0 10px!important;border-radius:8px!important;color:rgba(255,255,255,.72)!important;box-shadow:none!important}
html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-param:hover,html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-toggle:hover,html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-at:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-toggle.is-on{color:#7aa7ff!important;background:rgba(77,141,255,.14)!important}
html body[data-mode] #composerWrap #composer .bottom-bar .param.jm-chat-toggle.is-on:hover{background:rgba(77,141,255,.22)!important}
html body[data-mode] #composerWrap #composer .bottom-bar .jm-chat-btn:not(.jm-chat-btn-primary){background:transparent!important;color:rgba(255,255,255,.45)!important;padding:0 8px!important;min-height:32px!important}
html body[data-mode] #composerWrap #composer .bottom-bar .jm-chat-btn:not(.jm-chat-btn-primary):hover{color:#fff!important}
html body[data-mode] #composerWrap #composer .bottom-bar .jm-chat-btn.jm-chat-btn-primary{width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border-radius:50%!important;font-size:0!important;background:rgba(255,255,255,.22)!important;color:#111!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
html body[data-mode] #composerWrap #composer .bottom-bar .jm-chat-btn.jm-chat-btn-primary::before{content:"\2191";font-size:18px;font-weight:700;line-height:1;color:#111}
html body[data-mode]:has(#composer.agnes-has-prompt) #composerWrap #composer .bottom-bar .jm-chat-btn.jm-chat-btn-primary{background:#f4f4f2!important}
/* [JM18] all modes: add-card style (0 images) + hover layout by image count */
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip:not(.jm-rs-exp):not(.jm2){height:96px!important;top:10px!important;overflow:visible!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip:not(.jm-rs-exp):not(.jm2) .jm-rs-dashed{width:60px!important;height:78px!important;margin:6px 0 0 10px!important;border:none!important;border-radius:6px!important;background:#3a3a3a!important;color:rgba(255,255,255,.5)!important;transform:rotate(-6deg)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;font-size:11px!important;box-shadow:0 2px 8px rgba(0,0,0,.35)!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip:not(.jm-rs-exp):not(.jm2) .jm-rs-dashed:hover{background:#4a4a4a!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip:not(.jm-rs-exp):not(.jm2) .jm-rs-dashed>div:first-child,.jm2-add>div:first-child{font-size:20px!important;line-height:1!important}
.jm2-add{border-color:transparent!important;border-radius:6px!important;color:rgba(255,255,255,.5)!important;gap:2px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm2[data-jm-n="1"] .jm2-w:hover .jm2-add{left:70px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm2[data-jm-n="2"] .jm2-w:hover .jm2-back{opacity:1!important;left:70px!important;transform:rotate(4deg)!important;z-index:3!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm2[data-jm-n="2"] .jm2-w:hover .jm2-front .jm2-x{display:none!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm2[data-jm-n="2"] .jm2-w:hover .jm2-c:hover .jm2-x{display:block!important}
/* [JM24] image/video bottom bar = chat style: flat param buttons + round send */
html body:not([data-mode="chat"]) #composerWrap .bottom-bar{gap:10px!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar>.param,html body:not([data-mode="chat"]) #composerWrap .bottom-bar>.jm-img-param{height:32px!important;background:transparent!important;border:0!important;border-radius:8px!important;padding:0 10px!important;font-size:14px!important;font-weight:400!important;color:rgba(255,255,255,.72)!important;box-shadow:none!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar .jm-img-generate,html body:not([data-mode="chat"]) #composerWrap .bottom-bar .generate{width:36px!important;min-width:36px!important;height:36px!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgb(244,244,242)!important;color:rgb(17,17,17)!important;font-size:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:none!important;opacity:1!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar .jm-img-generate>span,html body:not([data-mode="chat"]) #composerWrap .bottom-bar .generate>span{display:none!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar .jm-img-generate::after,html body:not([data-mode="chat"]) #composerWrap .bottom-bar .generate::after{content:"\2191";font-size:18px;font-weight:700;line-height:1}
/* [JM30] image/video: hover box, centered arrow, clear button next to send */
html body:not([data-mode="chat"]) #composerWrap .bottom-bar>.param:hover,html body:not([data-mode="chat"]) #composerWrap .bottom-bar>.jm-img-param:hover{background:rgba(255,255,255,.08)!important;color:rgb(255,255,255)!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar .jm-img-generate,html body:not([data-mode="chat"]) #composerWrap .bottom-bar .generate{position:relative!important;gap:0!important;text-indent:0!important;letter-spacing:0!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar .jm-img-generate::after,html body:not([data-mode="chat"]) #composerWrap .bottom-bar .generate::after{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;display:block!important;height:18px!important;line-height:18px!important;margin:0!important;font-family:"Microsoft YaHei UI","Microsoft YaHei","Segoe UI",Arial,sans-serif!important;font-size:18px!important;font-weight:700!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar>[data-jm-gen-clear]{margin-left:auto!important}
html body:not([data-mode="chat"]) #composerWrap .bottom-bar>[data-jm-gen-clear]+.generate,html body:not([data-mode="chat"]) #composerWrap .bottom-bar>[data-jm-gen-clear]+.jm-img-generate{margin-left:0!important}

/* [JM68] expanded state (JM45 preview) */
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-bar{height:24px!important;min-height:24px!important;align-items:center!important;gap:4px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-tab{padding:3px 8px!important;border-radius:6px!important;line-height:16px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-tab.on{background:rgba(255,255,255,.1)!important;color:#fff!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-act.jm-rs-fold{font-size:13px!important;letter-spacing:-2px!important;padding:2px 4px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-row{height:96px!important;min-height:96px!important;align-items:flex-end!important;gap:8px!important;overflow:visible!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-card{width:64px!important;height:84px!important;border-radius:6px!important;flex:0 0 auto!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-card>img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:6px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-card:not(.jm-rs-dashed):hover{transform:translateY(-4px)!important}
html body[data-mode] #composerWrap#composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-card:not(.jm-rs-dashed){transition:transform .15s!important} /* [JM68] hover lift animation; transform only, exempt from JM66 */
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-dashed{border:0!important;background:#3a3a3a!important;transform:none!important;color:rgba(255,255,255,.5)!important;font-size:11px!important;gap:2px!important}
html body[data-mode] #composerWrap .agnes-inline-ref-preview-strip.jm-rs-exp .jm-rs-dashed:hover{background:#4a4a4a!important}
