/* ===== Lumyntra Studio — barra inferior (estilo Dreamina) + galería justificada (estilo Flow) ===== */
.lm-studio .pro-studio-shell{grid-template-columns:minmax(0,1fr)!important}
.lm-studio .pro-studio-main{grid-template-rows:52px minmax(0,1fr) auto!important}

/* Galería (selectores con peso para ganar al CSS viejo) */
.lumyntra-pro-studio.lm-studio .pro-creation-canvas #recent-list{display:flex!important;flex-wrap:wrap!important;align-content:flex-start!important;gap:6px!important;padding:12px 16px 24px!important;box-sizing:border-box}
.lumyntra-pro-studio.lm-studio .pro-creation-canvas #recent-list .recent-item:not(.recent-item-generating):not(.recent-item-failed) img,
.lumyntra-pro-studio.lm-studio .pro-creation-canvas #recent-list .recent-item:not(.recent-item-generating):not(.recent-item-failed) video{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:cover!important}
.lumyntra-pro-studio.lm-studio .pro-creation-canvas #recent-list .recent-item:not(.recent-item-generating):not(.recent-item-failed){width:auto!important;min-width:0!important;max-width:none!important}

/* Galería: filas justificadas, misma altura, de lado a lado */
.lm-studio .recent-list{display:flex!important;flex-wrap:wrap!important;align-content:flex-start!important;gap:6px!important;padding:12px 16px 24px!important;height:100%!important;box-sizing:border-box}
.lm-studio .recent-list::after{content:"";flex:9999 1 0}
.lm-studio .recent-list .recent-item{margin:0!important;box-sizing:border-box;border-radius:8px!important;overflow:hidden!important}
.lm-studio .recent-list .recent-item img,.lm-studio .recent-list .recent-item video{width:100%!important;height:100%!important;object-fit:cover!important;display:block}
.lm-studio .recent-list .recent-empty{flex:1 1 100%!important;width:100%!important;height:auto!important;min-height:50vh}

/* Visor: deja ver la barra */
.lm-studio .pro-result-viewer{inset:52px 0 0 0!important}

/* Contenedor de la barra */
.lm-composer{position:relative;z-index:30;padding:0 clamp(10px,3vw,40px) 14px;display:flex;justify-content:center;background:linear-gradient(180deg,transparent,rgba(6,6,9,.92) 40%)}
.lm-dock{width:100%;max-width:1040px;background:#14151d;border:1px solid rgba(255,255,255,.09);border-radius:20px;padding:12px 14px 10px;box-shadow:0 18px 50px rgba(0,0,0,.5);display:flex;flex-direction:column;gap:8px;box-sizing:border-box}
.lm-dock:focus-within{border-color:rgba(139,92,255,.45)}

/* Referencias dentro del prompt */
.lm-refs{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start}
.lm-refs:not(:has(.upload-area:not([style*="none"]))){display:none}
.lm-dock .lm-ref{margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;min-width:0}
.lm-dock .lm-ref .card-title{display:none!important}
.lm-dock .reference-type-uploads,.lm-dock .frame-uploads{display:flex!important;flex-direction:row!important;gap:8px!important;grid-template-columns:none!important;flex-wrap:wrap}
.lm-dock .lm-ref,.lm-dock .reference-type-uploads>*,.lm-dock .frame-uploads>*{flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important}
.lm-dock .reference-type-column,.lm-dock .frame-upload,.lm-dock .lm-veo-row{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;width:auto!important;min-width:0}
.lm-dock .lm-ref .upload-area{width:60px!important;min-width:60px!important;height:66px!important;min-height:66px!important;padding:0!important;border-radius:11px!important;gap:1px!important;flex:0 0 60px;background:#1b1c26}
.lm-dock .lm-ref .upload-area:hover{border-color:#8b5cff;color:#fff}
.lm-dock .lm-ref .upload-area .upload-icon{font-size:17px!important;line-height:1;margin:0!important;width:auto!important;height:auto!important;background:none!important}
.lm-dock .lm-ref .upload-area strong{font-size:10px!important;font-weight:600}
.lm-dock .lm-ref .upload-area span:not(.upload-icon){display:none!important}
.lm-dock .lm-ref .frame-label{display:none!important}
.lm-dock #reference-card [id$="-preview"],.lm-dock [id$="-preview"]{grid-template-columns:none!important;width:auto!important;display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0!important}
.lm-dock [id$="-preview"] img,.lm-dock [id$="-preview"] video{width:60px!important;height:60px!important;object-fit:cover;border-radius:10px}
.lm-dock [id$="-preview"]>*{max-width:60px}
.lm-dock [id$="-preview"] .reference-thumb,.lm-dock [id$="-preview"] [class*="reference-"]{width:60px!important;height:60px!important;min-height:0!important;margin:0!important;border-radius:10px!important;overflow:hidden}

/* Contadores 0/30 como insignia pequeña abajo */
.lm-dock #reference-card .upload-area::after,.lm-dock #veo-reference-card label[for="veo-reference-upload"]::after{top:auto!important;bottom:4px!important;right:auto!important;left:50%!important;transform:translateX(-50%);padding:1px 4px!important;font-size:9px!important;white-space:nowrap}
.lm-dock .lm-ref .upload-area{justify-content:flex-start!important;padding-top:7px!important}

/* Prompt */
.lm-dock #studio-prompt{width:100%;min-height:52px;max-height:200px;resize:none;border:0!important;outline:0!important;background:transparent!important;color:#f2f2f7;font-size:15px;line-height:1.5;padding:6px 4px!important;box-shadow:none!important;box-sizing:border-box;font-family:inherit}

/* Barra de controles */
.lm-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.06)}
.lm-bar>.setting-block{margin:0!important;padding:0!important;position:relative;display:flex;align-items:center;min-width:0}
.lm-bar>.setting-block[style*="display: none"],.lm-bar>.setting-block[style*="display:none"]{display:none!important}
.lm-bar>.setting-block>label:not(.audio-toggle){display:none!important}
.lm-bar>.lm-toggle{gap:6px;align-items:center!important;display:flex!important}
.lm-bar>.lm-toggle[style*="display: none"],.lm-bar>.lm-toggle[style*="display:none"]{display:none!important}
#audio-setting::before{content:"Audio"}
#minimax-prompt-optimizer-setting::before{content:"Optimizador"}
#minimax-fast-pretreatment-setting::before{content:"Pretratamiento"}
.lm-bar>.lm-toggle::before{font-size:12px;color:#a8a8b8;margin-right:2px}
.lm-bar>.lm-toggle[style*="display: none"]{display:none!important}
.lm-bar select{appearance:none;-webkit-appearance:none;background:#1d1e29 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a8a8b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;color:#e6e6f0;border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:8px 28px 8px 12px;font-size:13px;height:36px;width:auto!important;max-width:170px;cursor:pointer;font-family:inherit;margin:0!important}
.lm-bar select:hover{border-color:rgba(139,92,255,.5)}
.lm-bar .model-select-hidden{display:none!important}

/* Tipo */
.lm-bar .type-selector{display:flex!important;gap:0;background:#1d1e29;border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:2px;margin:0!important}
.lm-bar .type-button{border:0!important;background:transparent!important;padding:6px 14px!important;border-radius:8px!important;font-size:13px;color:#a8a8b8;height:30px;font-family:inherit}
.lm-bar .type-button.active{background:rgba(139,92,255,.22)!important;color:#fff}

/* Modelo: menú hacia arriba */
.lm-bar .model-dropdown{position:relative;width:auto;margin:0}
.lm-bar .model-dropdown-trigger{display:flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:#1d1e29;color:#e6e6f0;font-size:13px;cursor:pointer;min-width:120px;max-width:190px;justify-content:space-between;font-family:inherit}
.lm-bar .model-dropdown-trigger:hover{border-color:rgba(139,92,255,.5)}
.lm-bar .model-dropdown-trigger #model-dropdown-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lm-bar .model-dropdown-menu{top:auto!important;bottom:calc(100% + 8px)!important;left:0!important;right:auto!important;min-width:280px;max-height:min(55vh,420px)!important;z-index:2000}

.lm-spacer{flex:1 1 auto}
.lm-bar .studio-generate{min-width:0!important;width:auto!important;height:40px;padding:0 24px!important;border-radius:12px!important;margin:0!important;font-size:14px;white-space:nowrap}

/* Barra de selección sobre el compositor */
.lumyntra-selection-toolbar{bottom:210px!important}

/* Móvil */
@media(max-width:760px){
  .lumyntra-pro-studio.lm-studio.create-page{height:calc(100dvh - 72px)!important;min-height:0!important;overflow:hidden!important}
  .lm-studio .pro-studio-shell,.lm-studio .pro-studio-main{height:100%!important;min-height:0!important;overflow:hidden!important}
  .lumyntra-pro-studio.lm-studio .pro-creation-canvas #recent-list{padding:8px 8px 16px!important}
  .lm-composer{padding:0 8px 8px}
  .lm-dock{border-radius:16px;padding:10px}
  .lm-bar{gap:6px}
  .lm-bar>.lm-type-block{order:-1}
  .lm-bar .lm-model-block{flex:1 1 100%}
  .lm-bar .model-dropdown,.lm-bar .model-dropdown-trigger{width:100%;max-width:none}
  .lm-bar select{max-width:none;height:34px;font-size:12px;padding:6px 24px 6px 10px}
  .lm-bar .studio-generate{flex:1 1 auto}
  .lm-spacer{display:none}
  .lm-bar .model-dropdown-menu{min-width:0;width:calc(100vw - 36px)}
  .pro-studio-retention-notice{display:none!important}
  .lumyntra-selection-toolbar{bottom:260px!important}
}


/* ===== Tipografía del Studio ===== */
.lumyntra-pro-studio.lm-studio .lm-dock,
.lumyntra-pro-studio.lm-studio .lm-dock button,
.lumyntra-pro-studio.lm-studio .lm-dock select,
.lumyntra-pro-studio.lm-studio .lm-dock textarea,
.lumyntra-pro-studio.lm-studio .pro-canvas-topbar,
.lumyntra-pro-studio.lm-studio .pro-canvas-topbar button{font-family:"Inter","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",sans-serif!important;-webkit-font-smoothing:antialiased}
.lm-bar select{font-size:13.5px!important;font-weight:500!important;letter-spacing:.1px}
.lm-bar .type-button{font-size:13.5px!important;font-weight:600!important}
.lm-bar .model-dropdown-trigger{font-size:13.5px!important;font-weight:600!important}
.lm-bar .model-dropdown-arrow{font-size:0!important;width:10px;height:6px;flex:0 0 10px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a8a8b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center}
.lm-bar .model-dropdown-menu{min-width:360px!important;padding:6px!important;border-radius:14px!important;background:#171823!important;border:1px solid rgba(255,255,255,.1)!important}
.lm-bar .model-dropdown-option{display:block!important;width:100%!important;text-align:left!important;padding:11px 14px!important;border-radius:10px!important;font-size:14px!important;font-weight:500!important;line-height:1.3!important;color:#dcdce8!important;background:transparent!important;border:0!important;white-space:nowrap!important;cursor:pointer;font-family:inherit!important}
.lm-bar .model-dropdown-option:hover{background:rgba(139,92,255,.16)!important;color:#fff!important}
.lm-bar .model-dropdown-option.active,.lm-bar .model-dropdown-option.selected,.lm-bar .model-dropdown-option[aria-selected="true"]{background:rgba(139,92,255,.26)!important;color:#fff!important;font-weight:600!important}
.lm-dock #studio-prompt{font-size:15.5px!important;line-height:1.55}
.lm-dock #studio-prompt::placeholder{color:#7d7d92}
.lm-bar .studio-generate{font-size:14.5px!important;font-weight:700!important;letter-spacing:.2px;margin-left:auto!important}

/* ===== Prompt IA: protagonista, arriba a la derecha del cuadro ===== */
.lm-dock{position:relative}
.lm-dock #studio-prompt{padding-right:4px!important}
.lumyntra-pro-studio.lm-studio .lm-dock #studio-ai-button{position:absolute!important;top:12px!important;right:14px!important;z-index:5;display:flex!important;align-items:center;gap:10px;height:auto!important;min-height:0!important;width:auto!important;margin:0!important;padding:9px 16px 9px 11px!important;border-radius:14px!important;border:1px solid rgba(168,122,255,.55)!important;background:linear-gradient(135deg,rgba(139,92,255,.30),rgba(82,109,255,.22))!important;box-shadow:0 0 0 1px rgba(139,92,255,.12),0 6px 24px rgba(111,79,255,.28)!important;color:#fff;cursor:pointer;transition:transform .15s,box-shadow .2s,border-color .2s}
.lumyntra-pro-studio.lm-studio .lm-dock #studio-ai-button:hover{transform:translateY(-1px);border-color:rgba(190,150,255,.9)!important;box-shadow:0 0 0 1px rgba(168,122,255,.3),0 10px 32px rgba(111,79,255,.45)!important}
.lm-dock #studio-ai-button .studio-ai-button-icon{display:flex!important;align-items:center;justify-content:center;width:34px!important;height:34px!important;border-radius:10px!important;background:rgba(10,10,18,.55)!important;border:1px solid rgba(168,122,255,.45)!important;padding:0!important;flex:0 0 34px}
.lm-dock #studio-ai-button img{width:22px!important;height:22px!important;object-fit:contain}
.lm-dock #studio-ai-button .studio-ai-button-copy{display:flex!important;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}
.lm-dock #studio-ai-button .studio-ai-button-copy strong{font-size:14px!important;font-weight:700!important;color:#fff!important;line-height:1.1;letter-spacing:.2px}
.lm-dock #studio-ai-button .studio-ai-button-copy small{display:block!important;font-size:11px!important;color:#cdbdff!important;line-height:1.1;font-weight:500;white-space:nowrap}
.lm-dock .lm-refs{min-height:66px;padding-right:290px}

/* ===== Barra superior (aviso, tamaños, +) ===== */
.lumyntra-pro-studio.lm-studio .pro-canvas-topbar{height:56px;gap:14px!important}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice{display:flex!important;align-items:center;gap:9px;padding:8px 14px;border-radius:999px;background:rgba(139,92,255,.08);border:1px solid rgba(139,92,255,.2);font-size:12.5px!important;line-height:1.3;color:#b9b9cc!important;font-weight:500;flex:0 1 auto;min-width:0;max-width:44%;white-space:normal}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice::before{content:"i";flex:0 0 18px;height:18px;border-radius:50%;background:rgba(139,92,255,.3);color:#e4d9ff;font:700 11px/18px Georgia,serif;text-align:center}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice span{font-size:12.5px!important;color:#b9b9cc!important}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice strong{color:#fff;font-weight:700}
.lumyntra-pro-studio.lm-studio .lumyntra-size-selector{display:inline-flex!important;gap:2px;padding:3px!important;border-radius:12px!important;background:#14151d!important;border:1px solid rgba(255,255,255,.09)!important;height:auto!important}
.lumyntra-pro-studio.lm-studio .lumyntra-size-button{height:32px!important;padding:0 16px!important;border-radius:9px!important;font-size:13px!important;font-weight:600!important;letter-spacing:.2px;color:#a9a9bd!important;background:transparent!important;border:0!important;min-width:0!important}
.lumyntra-pro-studio.lm-studio .lumyntra-size-button:hover{color:#fff!important}
.lumyntra-pro-studio.lm-studio .lumyntra-size-button.active{background:linear-gradient(135deg,rgba(139,92,255,.42),rgba(82,109,255,.32))!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(168,122,255,.4)}
.lumyntra-pro-studio.lm-studio .lumyntra-studio-upload-button{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;font-size:22px!important;font-weight:400!important;line-height:1;color:#fff!important;background:linear-gradient(135deg,rgba(139,92,255,.35),rgba(82,109,255,.25))!important;border:1px solid rgba(168,122,255,.5)!important;display:grid!important;place-items:center;padding:0!important;cursor:pointer;transition:transform .15s,box-shadow .2s}
.lumyntra-pro-studio.lm-studio .lumyntra-studio-upload-button:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(111,79,255,.4)}

@media(max-width:760px){
  .lumyntra-pro-studio.lm-studio .pro-canvas-topbar{padding:0 10px!important;gap:8px!important;justify-content:center!important}
  .lumyntra-pro-studio.lm-studio .lumyntra-size-button{padding:0 11px!important;font-size:12px!important}
  .lumyntra-pro-studio.lm-studio .lumyntra-studio-upload-button{width:36px!important;height:36px!important;min-width:36px!important}
  .lm-dock .lm-refs{padding-right:0;min-height:0}
  .lumyntra-pro-studio.lm-studio .lm-dock #studio-ai-button{position:static!important;order:-1;flex:1 1 100%;justify-content:center}
  .lm-dock{display:flex}
  .lumyntra-pro-studio.lm-studio .pro-studio-retention-notice{display:none!important}
  .lm-bar .model-dropdown-menu{min-width:0!important;width:calc(100vw - 36px)}
}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice{max-width:calc(50% - 200px)!important;border-radius:14px!important;padding:6px 12px!important}
.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:12px!important;line-height:1.3}
@media(max-width:1100px){.lumyntra-pro-studio.lm-studio .pro-studio-retention-notice{display:none!important}}

/* ===== Barra lateral delgada (estilo Flow) ===== */
.lm-studio .pro-studio-shell{grid-template-columns:64px minmax(0,1fr)!important}
.lm-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 0;background:#0a0a0f;border-right:1px solid rgba(255,255,255,.06);z-index:35;min-height:0}
.lm-rail-item{position:relative;width:44px;height:44px;border-radius:13px;display:grid;place-items:center;color:#9a9ab0;text-decoration:none;transition:background .15s,color .15s}
.lm-rail-item:hover{background:rgba(255,255,255,.07);color:#fff}
.lm-rail-item.active{background:rgba(139,92,255,.2);color:#fff;box-shadow:inset 0 0 0 1px rgba(168,122,255,.35)}
.lm-rail-item::after{content:attr(data-tip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:6px 10px;border-radius:8px;background:#1c1d29;border:1px solid rgba(255,255,255,.1);color:#fff;font:600 12px/1 "Inter","Segoe UI",system-ui,sans-serif;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s;z-index:60}
.lm-rail-item:hover::after{opacity:1}
@media(max-width:760px){.lm-rail{display:none}.lm-studio .pro-studio-shell{grid-template-columns:minmax(0,1fr)!important}}

/* ===== Respeta lo que oculta app.js según el modelo (display:none inline) ===== */
.lm-dock .reference-type-column[style*="none"],
.lm-dock .frame-upload[style*="none"],
.lm-dock .lm-ref[style*="none"],
.lm-dock .lm-veo-row[style*="none"]{display:none!important}

/* Barra lateral: solo Studio y Paquetes */
.lm-rail-item:nth-child(2),.lm-rail-item:nth-child(3),.lm-rail-item:nth-child(4){display:none!important}

/* ===== Referencias unificadas (estilo Dreamina): todo junto, filtros, arrastrar, varias filas ===== */
.lm-dock .lm-refs{display:flex!important;flex-wrap:wrap;gap:8px;align-items:flex-start;max-height:236px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(139,92,255,.35) transparent;padding-right:290px}
/* Los contenedores por tipo desaparecen: sus elementos se mezclan en una sola fila */
.lm-dock #reference-card,.lm-dock #reference-card .reference-type-uploads,.lm-dock #reference-card .reference-type-column,.lm-dock #reference-card [id$="-preview"]{display:contents!important}
.lm-dock #reference-card .reference-type-column[style*="none"]{display:none!important}
.lm-dock #reference-card[style*="none"]{display:none!important}
.lm-dock #reference-card .reference-type-column .upload-area{order:1000}
.lm-dock #reference-actions-area{display:none!important}

/* Pestañas */
.lm-ref-tabs{order:-1;flex:0 0 100%;display:flex;align-items:center;gap:4px;margin-bottom:2px}
.lm-ref-tabs[hidden]{display:none!important}
.lm-ref-tab{border:0;background:transparent;color:#a9a9bd;font:600 13px/1 "Inter","Segoe UI",system-ui,sans-serif;padding:9px 13px;border-radius:10px;cursor:pointer;transition:background .15s,color .15s}
.lm-ref-tab:hover{color:#fff}
.lm-ref-tab.active{background:rgba(139,92,255,.22);color:#fff}
.lm-ref-tabs-spacer{flex:1}
.lm-ref-clear{border:0;background:transparent;color:#9a9ab0;font:500 12.5px/1 "Inter","Segoe UI",system-ui,sans-serif;padding:8px 6px;cursor:pointer}
.lm-ref-clear:hover{color:#fff;text-decoration:underline}

/* Miniaturas */
.lm-dock .reference-item{position:relative;width:64px;height:64px;flex:0 0 64px;border-radius:11px;overflow:hidden;background:#1b1c26;border:1px solid rgba(255,255,255,.1);cursor:grab;min-width:0}
.lm-dock .reference-item:active{cursor:grabbing}
.lm-dock .reference-item img,.lm-dock .reference-item video{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:0!important;display:block;margin:0!important;pointer-events:none}
.lm-dock .reference-item img{pointer-events:auto;-webkit-user-drag:none}
.lm-dock .reference-item video::-webkit-media-controls{display:none!important}
.lm-dock .reference-item audio{display:none!important}
.lm-dock .reference-item[data-kind="audio"]{background:linear-gradient(135deg,#34385f,#262a49)}
.lm-dock .reference-item[data-kind="audio"]::before{content:"♪";position:absolute;inset:0;display:grid;place-items:center;font-size:24px;color:#cfd3ff}
.lm-dock .reference-item[data-kind="video"]::before{content:"▶";position:absolute;left:5px;bottom:5px;font-size:9px;padding:2px 5px;border-radius:6px;background:rgba(0,0,0,.6);color:#fff;z-index:2}
.lm-dock .reference-item strong{position:absolute;left:0;right:0;bottom:0;margin:0!important;padding:10px 4px 3px;font-size:9px!important;font-weight:600;color:#fff;background:linear-gradient(0deg,rgba(0,0,0,.7),transparent);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;z-index:1}
.lm-dock .reference-item[data-kind="video"] strong{padding-left:30px}
.lm-dock .reference-item .remove-reference{position:absolute;top:3px;right:3px;width:20px;height:20px;min-width:0;padding:0;border-radius:50%;font-size:14px;line-height:1;display:grid;place-items:center;background:rgba(10,10,16,.8);border:1px solid rgba(255,255,255,.2);color:#fff;opacity:0;transition:opacity .15s;z-index:3;cursor:pointer}
.lm-dock .reference-item:hover .remove-reference{opacity:1}
.lm-ref-hidden{display:none!important}
.lm-ref-dragging{opacity:.35}
.lm-ref-dragover{outline:2px solid #a87aff;outline-offset:2px}
.lm-dock .reference-item.lm-ref-dragover{transform:scale(1.04)}

/* Botones "+" de agregar: mismo tamaño que las miniaturas */
.lm-dock .lm-ref .upload-area{width:64px!important;min-width:64px!important;height:64px!important;min-height:64px!important;flex:0 0 64px}
@media(max-width:760px){.lm-dock .lm-refs{padding-right:0;max-height:200px}}

/* ===== Un solo botón "Referencias"; pestañas siempre visibles ===== */
.lm-dock #reference-card .reference-type-column .upload-area{display:none!important}
.lm-ref-add{order:1000;flex:0 0 64px;width:64px;height:64px;border:1px dashed rgba(255,255,255,.22);border-radius:11px;background:#1b1c26;color:#b3b3c6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;font:600 10px/1.1 "Inter","Segoe UI",system-ui,sans-serif;transition:border-color .15s,color .15s,background .15s}
.lm-ref-add:hover{border-color:#a87aff;color:#fff;background:#222338}
.lm-ref-add-plus{font-size:20px;line-height:1;font-weight:400}
.lm-ref-add[hidden]{display:none!important}

/* ===== Visor ampliado de video / audio de referencia ===== */
.lm-dock .reference-item[data-kind="video"],.lm-dock .reference-item[data-kind="audio"],.lm-dock .reference-item[data-kind="image"]{cursor:pointer}
.reference-viewer video{max-width:92vw;max-height:86vh;border-radius:14px;background:#000;box-shadow:0 20px 70px rgba(0,0,0,.7);outline:0}
.lm-viewer-audio{display:flex;flex-direction:column;align-items:center;gap:14px;padding:30px 36px;border-radius:18px;background:linear-gradient(135deg,#2b2f55,#1c1f3a);border:1px solid rgba(168,122,255,.35);box-shadow:0 20px 70px rgba(0,0,0,.7);max-width:92vw}
.lm-viewer-audio-icon{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;font-size:34px;color:#dcd8ff;background:rgba(139,92,255,.25)}
.lm-viewer-audio strong{color:#fff;font:600 14px/1.3 "Inter","Segoe UI",system-ui,sans-serif;max-width:480px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lm-viewer-audio audio{width:min(480px,80vw)}

/* LM-DOCK v5: Veo dentro de la misma fila + miniaturas 9:16 */
.lm-dock #veo-reference-card,.lm-dock #veo-reference-card .lm-veo-row,.lm-dock #veo-reference-card #veo-reference-preview,.lm-dock #veo-reference-card .reference-grid{display:contents!important}
.lm-dock #veo-reference-card[style*="none"]{display:none!important}
.lm-dock #veo-reference-card .upload-area{display:none!important}
.lm-dock .reference-item,.lm-dock #veo-reference-card .reference-item{width:36px!important;height:64px!important;flex:0 0 36px!important;aspect-ratio:9/16}
.lm-ref-add{width:54px!important;height:64px!important;flex:0 0 54px!important;font-size:9px!important}
.lm-dock .lm-refs{max-height:236px}
@media(max-width:760px){.lm-dock .lm-refs{max-height:200px}}
.lm-dock #reference-card .reference-item,.lm-dock [id$="-preview"] .reference-item{width:36px!important;height:64px!important;flex:0 0 36px!important;aspect-ratio:9/16}
.lm-dock #reference-card .reference-item,.lm-dock [id$="-preview"] .reference-item{max-width:none!important;min-width:0!important}
.lm-dock [id$="-preview"] .reference-item img,.lm-dock [id$="-preview"] .reference-item video,.lm-dock #reference-card .reference-item img,.lm-dock #reference-card .reference-item video{width:100%!important;height:100%!important;border-radius:0!important}
.lm-dock .reference-item .remove-reference{width:16px;height:16px;font-size:12px;top:2px;right:2px}
.lm-dock .reference-item strong{display:none!important}
.lm-dock .reference-item[data-kind="video"]::before{left:3px;bottom:3px;font-size:8px;padding:1px 3px}
.lm-dock .reference-item[data-kind="audio"]::before{font-size:18px}

/* LM-DOCK v6: listas desplegables propias */
.lm-select{position:relative;display:inline-block}
.lm-select>select{display:none!important}
.lm-select-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;height:36px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:#1d1e29;color:#e6e6f0;font:500 13.5px/1 "Inter","Segoe UI",system-ui,sans-serif;cursor:pointer;white-space:nowrap;min-width:64px}
.lm-select-btn:hover,.lm-select.open .lm-select-btn{border-color:rgba(139,92,255,.5)}
.lm-select-btn i{width:10px;height:6px;flex:0 0 10px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a8a8b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;transition:transform .15s}
.lm-select.open .lm-select-btn i{transform:rotate(180deg)}
.lm-select.disabled .lm-select-btn{opacity:.5;cursor:not-allowed}
.lm-select-menu{display:none;position:absolute;left:0;bottom:calc(100% + 8px);min-width:100%;max-height:min(50vh,340px);overflow-y:auto;padding:6px;border-radius:14px;background:#171823;border:1px solid rgba(255,255,255,.1);box-shadow:0 16px 50px rgba(0,0,0,.6);z-index:2000;scrollbar-width:thin;scrollbar-color:rgba(139,92,255,.4) transparent}
.lm-select.open .lm-select-menu{display:block}
.lm-select-option{display:block;width:100%;text-align:left;border:0;background:transparent;color:#dcdce8;font:500 13.5px/1.3 "Inter","Segoe UI",system-ui,sans-serif;padding:9px 14px;border-radius:9px;cursor:pointer;white-space:nowrap}
.lm-select-option:hover{background:rgba(139,92,255,.16);color:#fff}
.lm-select-option.active{background:rgba(139,92,255,.26);color:#fff;font-weight:600}
@media(max-width:760px){.lm-select{flex:1 1 calc(50% - 6px)}.lm-select-btn{width:100%;height:34px;font-size:12.5px}}

/* LM-DOCK v7: sin Optimizador / Pretratamiento (quedan con su valor por defecto) */
#minimax-prompt-optimizer-setting,#minimax-fast-pretreatment-setting{display:none!important}

/* LM-DOCK v8: avisos con el estilo de Lumyntra */
.lm-dialog-overlay{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:20px;background:rgba(6,6,12,.62);backdrop-filter:blur(6px);animation:lmDialogFade .15s ease}
.lm-dialog{width:min(440px,100%);border-radius:18px;background:linear-gradient(180deg,#1b1c2b,#14151f);border:1px solid rgba(139,92,255,.35);box-shadow:0 24px 80px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.03);padding:22px 22px 18px;font-family:"Inter","Segoe UI",system-ui,sans-serif;color:#e8e8f2;animation:lmDialogPop .18s ease}
.lm-dialog-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.lm-dialog-head strong{font-size:15px;font-weight:700;letter-spacing:.2px}
.lm-dialog-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:rgba(139,92,255,.22);color:#c9b2ff;font-weight:800;font-size:15px}
.lm-dialog-body{max-height:50vh;overflow:auto}
.lm-dialog-text{margin:0 0 8px;font-size:14px;line-height:1.5;color:#d6d6e4;white-space:pre-line;overflow-wrap:anywhere}
.lm-dialog-actions{display:flex;justify-content:flex-end;margin-top:10px}
.lm-dialog-ok{border:0;border-radius:11px;padding:10px 22px;font:600 14px/1 "Inter","Segoe UI",system-ui,sans-serif;color:#fff;background:linear-gradient(135deg,#8b5cff,#6d4aff);cursor:pointer;box-shadow:0 6px 18px rgba(109,74,255,.4)}
.lm-dialog-ok:hover{filter:brightness(1.1)}
.lm-dialog-ok:focus-visible{outline:2px solid #c9b2ff;outline-offset:2px}
@keyframes lmDialogFade{from{opacity:0}to{opacity:1}}
@keyframes lmDialogPop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}

/* LM-DOCK v9: arrastrar creaciones a la tarjeta de referencias */
.lm-dock.lm-drop-active{outline:2px dashed #a87aff;outline-offset:-7px;background:#191a27}
.lm-dock.lm-drop-active::after{content:"Suelta aquí para usar como referencia";position:absolute;inset:0;display:grid;place-items:center;border-radius:inherit;background:rgba(22,19,40,.82);color:#e9ddff;font:600 15px/1 "Inter","Segoe UI",system-ui,sans-serif;pointer-events:none;z-index:5}
.recent-item[draggable="true"]{cursor:grab}
.lm-ref-loading{order:900;flex:0 0 36px;width:36px;height:64px;border-radius:11px;background:#1b1c26;border:1px solid rgba(139,92,255,.35);display:grid;place-items:center}
.lm-ref-loading::after{content:"";width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.15);border-top-color:#a87aff;animation:lmSpin .7s linear infinite}
@keyframes lmSpin{to{transform:rotate(360deg)}}

/* LM-DOCK v10: cuadro "Generando" con animación Lumyntra */
.recent-item.recent-item-generating{position:relative!important;overflow:hidden!important;border-radius:14px!important;background:#10111a!important;border:1px solid rgba(139,92,255,.32)!important;isolation:isolate;animation:lmGenGlow 2.6s ease-in-out infinite}
.recent-item.recent-item-generating::before{content:"";position:absolute;inset:-35%;z-index:0;pointer-events:none;background:radial-gradient(38% 38% at 24% 30%,rgba(139,92,255,.62),transparent 70%),radial-gradient(36% 36% at 80% 22%,rgba(236,72,153,.30),transparent 70%),radial-gradient(44% 44% at 62% 82%,rgba(59,130,246,.40),transparent 70%);filter:blur(26px);animation:lmGenAurora 8s ease-in-out infinite alternate}
.recent-item.recent-item-generating::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background-image:radial-gradient(circle,rgba(255,255,255,.9) 1.1px,transparent 1.7px);background-size:15px 15px;-webkit-mask-image:linear-gradient(115deg,transparent 25%,#000 48%,transparent 72%);mask-image:linear-gradient(115deg,transparent 25%,#000 48%,transparent 72%);-webkit-mask-size:280% 100%;mask-size:280% 100%;animation:lmGenSweep 2.8s ease-in-out infinite}
.recent-item.recent-item-generating .lumyntra-generating{z-index:2;gap:9px!important;background:transparent!important}
.recent-item.recent-item-generating .lumyntra-generating::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:radial-gradient(circle,rgba(255,255,255,.16) 1.1px,transparent 1.7px);background-size:15px 15px}
.recent-item.recent-item-generating .lumyntra-loader{width:38px;height:38px;border:0;margin:0;border-radius:50%;background:conic-gradient(from 0deg,#8b5cff,#ec4899,#3b82f6,#8b5cff);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 calc(100% - 3px));animation:lmSpin 1.1s linear infinite;filter:drop-shadow(0 0 8px rgba(139,92,255,.8))}
.recent-item.recent-item-generating .lumyntra-generating strong{font-size:12.5px!important;font-weight:650;letter-spacing:.3px;color:#f1eaff!important;text-shadow:0 1px 10px rgba(10,8,24,.8)}
.recent-item.recent-item-generating .lm-gen-time{font:600 11px/1 "Inter","Segoe UI",system-ui,sans-serif!important;color:#c9b8ff!important;font-variant-numeric:tabular-nums;padding:4px 9px;border-radius:999px;background:rgba(10,8,24,.55);border:1px solid rgba(139,92,255,.3)}
@keyframes lmGenGlow{0%,100%{box-shadow:0 0 0 rgba(139,92,255,0)}50%{box-shadow:0 0 22px rgba(139,92,255,.28)}}
@keyframes lmGenAurora{0%{transform:translate(-6%,-4%) rotate(0deg) scale(1)}100%{transform:translate(6%,5%) rotate(25deg) scale(1.12)}}
@keyframes lmGenSweep{0%{-webkit-mask-position:120% 0;mask-position:120% 0}100%{-webkit-mask-position:-20% 0;mask-position:-20% 0}}
@media(prefers-reduced-motion:reduce){.recent-item.recent-item-generating,.recent-item.recent-item-generating::before,.recent-item.recent-item-generating::after{animation:none}}
