/* Scoped studio palette and geometry. Existing shell/navigation keep their own theme. */
.container:has(> .vd-root, > .tab-pane.active .vd-root){max-width:none;padding:14px 16px 24px;}
.vd-root.vd-studio{--vd-bg:var(--workspace-bg,#f4f5f7);--vd-panel:var(--workspace-surface,#fff);--vd-line:var(--workspace-border,#e3e5eb);--vd-muted:var(--workspace-muted,#788297);--vd-text:var(--workspace-text,#202634);position:relative;min-height:calc(100vh - 164px);padding:0 0 12px;background:var(--vd-bg);border-radius:14px;color:var(--vd-text);font-size:14px;overflow:visible;}
.vd-studio #vdBody{padding:16px 16px 6px;}
.vd-studio svg,.vd-modal svg{width:20px;height:20px;display:block;flex:none;}
.vd-studio button,.vd-modal button{font-family:inherit;cursor:pointer;}
.vd-studio button:disabled,.vd-modal button:disabled{cursor:not-allowed;opacity:.4;}
.vd-studio button:focus-visible,.vd-studio input:focus-visible,.vd-studio textarea:focus-visible,.vd-modal :focus-visible{outline:2px solid #6cd9b6;outline-offset:3px;}
.vd-studio button,.vd-studio input,.vd-studio select,.vd-studio textarea{color:var(--vd-text);}
.vd-studio [hidden]{display:none!important;}
.vd-studio .vd-filters{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 30px;padding:0;}
.vd-studio .vd-dropdown{position:relative;flex:none;}
.vd-studio .vd-filter-btn,.vd-studio .vd-example-btn{display:flex;align-items:center;justify-content:center;gap:12px;height:38px;padding:0 16px;border:1px solid var(--vd-line);border-radius:10px;background:transparent;color:var(--vd-text);font-size:14px;line-height:1;white-space:nowrap;}
.vd-studio .vd-filter-btn svg{width:16px;height:16px;color:var(--vd-muted);}
.vd-studio .vd-filter-btn:hover,.vd-studio .vd-filter-btn[aria-expanded=true],.vd-studio .vd-example-btn:hover{background:var(--workspace-soft);}
.vd-studio .vd-view-switch{display:flex;align-items:center;border-radius:12px;background:var(--workspace-soft);padding:3px;}
.vd-studio .vd-history .vd-filter-btn{height:36px;background:var(--vd-bg);border-color:transparent;padding:0 12px;}
.vd-studio .vd-example-btn{border:0;height:36px;color:var(--vd-muted);padding:0 14px;background:transparent;}
.vd-studio .vd-example-btn.active{color:var(--vd-text);background:var(--vd-bg);}
.vd-studio .vd-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:176px;max-height:min(680px,75vh);overflow-y:auto;padding:8px;background:var(--vd-bg);border:1px solid var(--workspace-soft);border-radius:10px;box-shadow:0 16px 40px #0006;z-index:85;}
.vd-studio .vd-menu-item{display:flex;align-items:center;gap:10px;min-height:38px;width:100%;padding:8px 12px;border:0;background:transparent;color:var(--vd-text);font-size:14px;text-align:left;border-radius:7px;white-space:nowrap;}
.vd-studio .vd-menu-item:hover{background:var(--workspace-soft);}
.vd-studio .vd-menu-item svg{width:18px;height:18px;}
.vd-studio .vd-menu-item small{margin-left:auto;color:var(--vd-muted);font-size:11px;}
.vd-studio .vd-option-dot{width:14px;text-align:center;font-size:12px;}
.vd-studio .vd-input-dropdown .vd-menu{width:290px;}
.vd-studio .vd-input-filter{padding:8px 6px 12px;}
.vd-studio .vd-input-filter>div:first-child{font-size:12px;color:var(--vd-muted);margin-bottom:9px;}
.vd-studio .vd-input-separator{margin-top:8px;padding-top:20px;border-top:1px solid var(--vd-line);}
.vd-studio .vd-tristate{display:flex;gap:6px;}
.vd-studio .vd-tristate button{border:1px solid var(--workspace-soft);background:transparent;color:var(--vd-text);flex:1;height:36px;border-radius:9px;}
.vd-studio .vd-tristate button.active{background:var(--vd-line);border-color:var(--vd-line);}
.vd-studio .vd-filter-dot{width:5px;height:5px;border-radius:50%;background:#42cc9a;}
.vd-studio .vd-search{display:flex;align-items:center;gap:10px;height:38px;min-width:180px;width:260px;border:1px solid var(--vd-line);border-radius:10px;padding:0 12px;color:#909090;}
.vd-studio .vd-search svg{width:17px;height:17px;}
.vd-studio .vd-search input{background:transparent;border:0;border-radius:0;padding:0;outline:none;font-size:14px;color:var(--vd-text);width:100%;min-width:0;}
.vd-studio .vd-search:focus-within{border-color:var(--vd-text);}
.vd-studio .vd-search input::placeholder{color:#8b8b8b;}
.vd-studio .vd-multi-toggle{margin-left:auto;width:38px;height:38px;border:1px solid var(--vd-line);border-radius:10px;background:transparent;color:var(--vd-muted);display:grid;place-items:center;}
.vd-studio .vd-multi-toggle:hover,.vd-studio .vd-multi-toggle.active{color:var(--vd-text);background:var(--workspace-soft);}
.vd-studio .vd-selection-bar{display:flex;align-items:center;gap:16px;background:var(--vd-panel);border:1px solid var(--workspace-soft);border-radius:12px;padding:14px 18px;margin-top:-8px;margin-bottom:18px;color:var(--vd-muted);}
.vd-studio .vd-selection-actions{margin-left:auto;display:flex;align-items:center;gap:8px;}
.vd-studio .vd-select-all{display:flex;align-items:center;gap:6px;color:#ccc;border:0;background:none;font-size:12px;}
.vd-white-btn,.vd-secondary-btn,.vd-danger-btn,.vd-text-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--vd-line);border-radius:10px;padding:9px 14px;font-size:13px;background:var(--workspace-soft);color:var(--vd-text);}
.vd-white-btn{background:#f5f5f5;color:var(--vd-bg);border-color:#f5f5f5;font-weight:600;}
.vd-danger-btn{background:#352626;color:#d47474;border-color:#352626;}
.vd-text-btn{border-color:transparent;background:transparent;}
.vd-studio .vd-danger{color:#e06060;}
.vd-studio .vd-grid{grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:20px;padding:0 0 240px;align-items:start;}
.vd-studio .vd-empty{grid-column:1/-1;min-height:calc(100vh - 540px);padding:90px 16px 50px;font-size:14px;color:#929292;}
.vd-studio .vd-empty p{margin:10px 0 20px;color:#646464;font-size:13px;}
.vd-studio .vd-card{position:relative;overflow:visible;border:1px solid var(--workspace-soft);border-radius:20px;background:var(--vd-panel);padding:18px 18px 13px;min-width:0;}
.vd-studio .vd-card.selected{outline:2px solid #46caa5;outline-offset:-2px;background:#202a26;}
.vd-studio .vd-card-head{display:flex;align-items:center;gap:7px;min-height:25px;font-size:12px;white-space:nowrap;}
.vd-studio .vd-card-head time{font-weight:600;flex:none;}
.vd-studio .vd-card-head input{appearance:none;flex:none;width:18px;height:18px;border:1.5px solid var(--vd-muted);border-radius:6px;margin:0 3px 0 0;cursor:pointer;}
.vd-studio .vd-card-head input:checked{background:#47c49a;border-color:#47c49a;}
.vd-studio .vd-card-head input:checked:after{content:'✓';display:grid;place-items:center;height:100%;color:#132018;line-height:1;}
.vd-studio .vd-model-badge{border-radius:8px;background:var(--workspace-soft);padding:3px 7px;font-weight:600;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.vd-studio .vd-status-badge{margin-left:auto;flex:none;padding:4px 9px;border-radius:10px;font-size:12px;color:var(--vd-muted);background:#313131;max-width:130px;overflow:hidden;text-overflow:ellipsis;}
.vd-studio .vd-status-badge.completed{color:#31c99a;background:#193b2e;}
.vd-studio .vd-status-badge.failed{color:#ed9393;background:#422626;}
.vd-studio .vd-status-badge.running,.vd-studio .vd-status-badge.queued,.vd-studio .vd-status-badge.submitting{color:#d6c59a;background:#3c3424;}
.vd-studio .vd-status-badge.unknown,.vd-studio .vd-status-badge.completed_remote{color:#e4b878;background:#3a2e1b;}
.vd-studio .vd-card-meta{display:flex;align-items:center;gap:7px;margin:8px 0;color:var(--vd-muted);font-size:12px;white-space:nowrap;min-width:0;}
.vd-studio .vd-card-meta>span{display:flex;align-items:center;gap:3px;}
.vd-studio .vd-card-meta>span svg{width:12px;height:12px;}
.vd-studio .vd-card-shortcuts{display:flex;gap:5px;margin-left:auto;}
.vd-studio .vd-card-shortcuts .vd-tool{width:23px;height:24px;}
.vd-studio .vd-card-shortcuts .vd-tool svg{width:17px;height:17px;}
.vd-studio .vd-card-prompt{display:flex;align-items:center;gap:10px;min-height:45px;margin:9px 0 18px;}
.vd-studio .vd-task-refs{display:flex;gap:7px;flex:none;max-width:43%;overflow:hidden;}
.vd-task-ref{width:44px;height:44px;border-radius:9px;overflow:hidden;background:var(--vd-text);border:0;padding:0;flex:none;}
.vd-task-ref img,.vd-task-ref video{width:100%;height:100%;object-fit:cover;display:block;}
.vd-studio .vd-card-prompt-text{font-size:13px;color:#9c9c9c;line-height:1.65;padding:0;text-align:left;border:0;background:transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-width:0;max-height:44px;}
.vd-studio .vd-thumb{display:block;position:relative;border:0;padding:0;width:100%;aspect-ratio:9/16;border-radius:17px;background:var(--vd-bg);overflow:hidden;cursor:pointer;}
.vd-studio .vd-thumb video,.vd-studio .vd-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.vd-studio .vd-card-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:64px;height:64px;border-radius:50%;background:#161616ba;color:var(--vd-text);display:grid;place-items:center;opacity:0;transition:opacity .15s;}
.vd-studio .vd-card-play svg{width:28px;height:28px;margin-left:4px;}
.vd-studio .vd-thumb:hover .vd-card-play,.vd-studio .vd-thumb:focus-visible .vd-card-play{opacity:1;}
.vd-studio .vd-downloaded-badge{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#3339;color:white;}
.vd-studio .vd-video-state{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:20px;box-sizing:border-box;color:var(--vd-muted);}
.vd-studio .vd-video-state>svg{width:38px;height:38px;color:var(--vd-muted);}
.vd-studio .vd-video-state strong{font-size:13px;font-weight:500;}
.vd-studio .vd-video-state p{margin:0;text-align:center;font-size:12px;line-height:1.6;color:var(--vd-muted);}
.vd-studio .vd-video-state.running>svg{animation:vdPulse 1.5s infinite;}
.vd-studio .vd-card-tools{display:flex;gap:8px;align-items:center;margin-top:16px;}
.vd-studio .vd-card-tools>span{flex:1;}
.vd-tool{position:relative;width:25px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:0;padding:3px;color:var(--vd-muted);background:transparent;border-radius:6px;}
.vd-tool:hover:not(:disabled),.vd-tool.active{color:var(--vd-text);background:var(--workspace-soft);}
.vd-tool::after{content:attr(data-tip);display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:#f5f5f5;color:var(--vd-bg);font-weight:400;font-size:12px;white-space:normal;width:max-content;max-width:240px;line-height:1.5;padding:6px 10px;border-radius:8px;box-shadow:0 4px 10px #0002;z-index:110;pointer-events:none;}
.vd-tool:hover::after,.vd-tool:focus-visible::after{display:block;}
.vd-studio .vd-card-more .vd-menu{left:auto;right:0;top:auto;bottom:calc(100% + 8px);min-width:180px;}
.vd-studio .vd-feedback-tools{display:flex;gap:5px;padding:5px 8px;}
.vd-studio .vd-feedback-tools .vd-tool{width:30px;}
.vd-studio .vd-genpanel{position:fixed;left:calc(50% + 118px);transform:translateX(-50%);bottom:30px;width:min(1080px,calc(100vw - 320px));border:1px solid var(--workspace-soft);border-radius:27px;background:#191919f5;backdrop-filter:blur(16px);box-shadow:0 10px 30px #0008;padding:17px 19px 18px;z-index:45;box-sizing:border-box;color:var(--vd-text);}
body.side-collapsed .vd-studio .vd-genpanel{left:calc(50% + 30px);width:min(1080px,calc(100vw - 110px));}
.vd-studio .vd-composer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:15px;}
.vd-studio .vd-composer-tabs{display:flex;align-items:center;background:#262626;padding:3px;border-radius:22px;}
.vd-studio .vd-composer-tabs button{display:flex;align-items:center;gap:7px;border:0;border-radius:20px;padding:7px 12px;color:#939393;background:none;font-size:13px;white-space:nowrap;}
.vd-studio .vd-composer-tabs button.active{background:var(--vd-bg);color:var(--vd-text);}
.vd-studio .vd-composer-tabs button svg{width:18px;height:18px;}
.vd-studio .vd-composer-head-tools{display:flex;gap:9px;}
.vd-studio .vd-composer-head-tools .vd-tool{color:var(--vd-muted);}
.vd-studio .vd-gp-input{display:flex;align-items:flex-start;gap:18px;min-height:63px;}
.vd-studio .vd-composer-media{display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:45%;flex:none;}
.vd-studio .vd-add-media{width:48px;height:63px;border:1px dashed var(--vd-muted);border-radius:11px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;background:none;color:var(--vd-muted);font-size:10px;}
.vd-studio .vd-add-media svg{width:23px;height:23px;}
.vd-studio .vd-add-media:hover:not(:disabled){border-color:var(--vd-muted);color:var(--vd-text);}
.vd-studio .vd-add-dropdown .vd-menu{top:auto;bottom:calc(100% + 7px);}
.vd-studio .vd-gp-input textarea{min-width:0;width:100%;flex:1;height:63px;min-height:63px;max-height:230px;resize:none;background:transparent;border:0;border-radius:0;outline:none;padding:9px 0;color:var(--vd-text);font-size:14px;line-height:1.65;box-shadow:none;}
.vd-studio .vd-gp-input textarea::placeholder{color:var(--vd-muted);}
.vd-studio .vd-gp-input textarea:focus{border:0;}
.vd-studio .vd-gp-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:16px;}
.vd-studio .vd-gp-row .vd-filter-btn,.vd-studio .vd-composer-pill{display:flex;align-items:center;gap:7px;height:38px;border:0;border-radius:22px;padding:0 13px;color:var(--vd-text);background:#262626;font-size:12px;white-space:nowrap;}
.vd-studio .vd-gp-row .vd-filter-btn:hover,.vd-studio .vd-composer-pill:hover{background:var(--workspace-soft);}
.vd-studio .vd-gp-row .vd-filter-btn>svg:first-child,.vd-studio .vd-composer-pill svg{width:18px;height:18px;color:var(--vd-muted);}
.vd-studio .vd-gp-row .vd-filter-btn>svg:last-child{width:14px;height:14px;}
.vd-studio .vd-gp-row .vd-menu{top:auto;bottom:calc(100% + 8px);}
.vd-studio .vd-composer-model .vd-menu{min-width:290px;}
.vd-studio .vd-composer-model .vd-filter-btn span{max-width:200px;text-overflow:ellipsis;overflow:hidden;}
.vd-studio .vd-composer-params .vd-menu{min-width:350px;max-width:430px;}
.vd-studio .vd-parameter-group{padding:10px 10px 12px;}
.vd-studio .vd-parameter-group label{display:block;margin:0 0 9px;color:var(--vd-muted);font-size:12px;}
.vd-studio .vd-parameter-choices{display:flex;flex-wrap:wrap;gap:6px;}
.vd-studio .vd-parameter-choices button{border:1px solid var(--workspace-soft);background:none;border-radius:9px;padding:7px 11px;color:var(--vd-text);font-size:12px;}
.vd-studio .vd-parameter-choices button.active{background:var(--vd-text);border-color:var(--vd-text);color:#111;}
.vd-studio .vd-duration-choices button{min-width:45px;}
.vd-studio .vd-composer-count .vd-filter-btn{background:var(--vd-panel);}
.vd-studio .vd-composer-send{display:flex;align-items:center;gap:10px;margin-left:auto;}
.vd-studio .vd-config-footer{--ps-clear-ink:#cc3e4c;--ps-clear-tint:#ef44440a;--ps-clear-border:#ef444426;display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:7px;min-width:0}
html[data-workspace-theme="dark"] .vd-studio .vd-config-footer{--ps-clear-ink:#fa8793;--ps-clear-tint:#fb718512;--ps-clear-border:#fb718536}
html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;min-height:28px;padding:3px 7px;border:1px solid var(--ps-clear-border);border-radius:7px;background:var(--ps-clear-tint);color:var(--ps-clear-ink);font-size:11px;font-weight:550;line-height:18px;white-space:nowrap;box-shadow:0 1px 2px #00000003;transition:background .15s,border-color .15s,box-shadow .15s}
.vd-studio .vd-config-footer>.vd-clear-config>svg{display:block;flex:none;width:21px;height:21px;padding:3px;border-radius:5px;background:color-mix(in srgb,var(--ps-clear-ink) 9%,transparent);stroke-width:1.8}
html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config:enabled:hover{background:color-mix(in srgb,var(--ps-clear-ink) 9%,var(--workspace-surface,#fff));border-color:color-mix(in srgb,var(--ps-clear-ink) 32%,transparent);box-shadow:0 2px 7px color-mix(in srgb,var(--ps-clear-ink) 10%,transparent)}
html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config:enabled:active{background:color-mix(in srgb,var(--ps-clear-ink) 14%,var(--workspace-surface,#fff));box-shadow:none}
html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config:focus-visible{outline:2px solid var(--ps-clear-ink)!important;outline-offset:2px}
html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config:disabled{opacity:.42;cursor:not-allowed;box-shadow:none}
.vd-studio .vd-config-footer>.vd-composer-send{min-width:0;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:520px){.vd-studio .vd-config-footer{align-items:flex-end;gap:6px}.vd-studio .vd-config-footer>.vd-composer-send{gap:6px}.vd-studio .vd-config-footer .vd-price-estimate{max-width:150px}html[data-workspace-theme] body:not(.is-editor) .container .tab-pane .vd-root.vd-studio .vd-config-footer>.vd-clear-config{padding-left:5px;padding-right:6px;font-size:10px;gap:4px}}
.vd-studio #vdPromptCount{font-size:12px;color:#929292;white-space:nowrap;}
.vd-studio .vd-send{display:flex;align-items:center;justify-content:center;gap:5px;min-width:77px;height:38px;border:0;border-radius:22px;background:#f0f0f0;color:var(--vd-bg);font-size:13px;font-weight:600;padding:0 13px;}
.vd-studio .vd-send>svg{color:#258065;width:19px;height:19px;}
.vd-studio .vd-ref{width:52px;height:63px;border-radius:10px;border:1px solid var(--vd-line);background:#262626;}
.vd-studio .vd-ref .vd-ref-tag{top:auto;bottom:0;left:0;border:0;border-radius:0 0 8px 8px;padding:3px 0;font-size:9px;min-height:18px;width:100%;color:white;background:#0009;}
.vd-studio .vd-ref .vd-ref-x{right:2px;top:2px;height:16px;width:16px;padding:0;color:var(--vd-text);}
.vd-mode-hint{font-size:12px;line-height:1.6;color:#909090;margin:10px 0 0;}
.vd-studio .vd-composer-expanded .vd-gp-input textarea{min-height:210px;max-height:50vh;}
.vd-studio .vd-composer-expanded{width:min(1240px,calc(100vw - 320px));}
.vd-studio .vd-composer-collapsed{width:min(480px,calc(100vw - 330px));padding:0;border-radius:40px;bottom:30px;}
.vd-studio .vd-composer-collapsed>button{display:flex;align-items:center;gap:16px;width:100%;height:50px;padding:0 18px;border:0;border-radius:40px;background:transparent;color:var(--vd-muted);font-size:14px;}
.vd-studio .vd-composer-collapsed>button span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;}
.vd-studio .vd-date-menu{width:590px;max-width:calc(100vw - 100px);padding:15px 16px 13px;left:50%;transform:translateX(-50%);overflow:visible;}
.vd-studio .vd-two-months{display:grid;grid-template-columns:1fr 1fr;gap:22px;}
.vd-studio .vd-month-title{display:flex;align-items:center;justify-content:space-between;padding:8px 4px 20px;}
.vd-studio .vd-month-title button,.vd-studio .vd-month-title>span{width:25px;height:25px;}
.vd-studio .vd-month-title button{border:0;padding:3px;background:transparent;color:#ccc;}
.vd-studio .vd-month-title strong{font-size:14px;font-weight:500;}
.vd-studio .vd-date-days{display:grid;grid-template-columns:repeat(7,1fr);gap:5px 0;}
.vd-studio .vd-weekday{padding:5px 0 12px;font-size:12px;text-align:center;color:var(--vd-muted);}
.vd-studio .vd-date-day{border:0;padding:0;width:31px;height:34px;border-radius:9px;color:#ccc;background:none;text-align:center;font-size:13px;margin:auto;}
.vd-studio .vd-date-day:hover{background:var(--workspace-soft);}
.vd-studio .vd-date-day.outside{color:var(--vd-muted);}
.vd-studio .vd-date-day.today{background:var(--workspace-soft);}
.vd-studio .vd-date-day.selected{background:var(--vd-text);color:var(--vd-bg);}
.vd-studio .vd-date-day.between{background:var(--workspace-soft);border-radius:0;width:100%;}
.vd-studio .vd-date-day:disabled{color:var(--vd-line);opacity:1;}
.vd-studio .vd-calendar-footer{display:flex;gap:8px;align-items:center;border-top:1px solid var(--workspace-soft);padding-top:17px;margin-top:15px;}
.vd-studio .vd-calendar-footer>div{display:flex;gap:4px;margin-right:auto;}
.vd-studio .vd-calendar-footer>div button{border:0;background:none;color:var(--vd-text);font-size:12px;padding:8px 6px;white-space:nowrap;}
.vd-modal{background:#080808d9;backdrop-filter:blur(12px);z-index:260;color:var(--vd-text);}
.vd-modal .vd-modal-card{position:relative;background:var(--vd-bg);border:1px solid var(--workspace-soft);color:var(--vd-text);padding:24px;max-height:88vh;border-radius:18px;width:min(780px,94vw);box-shadow:0 30px 90px #0006;}
.vd-modal h4{font-size:17px;color:var(--vd-text);margin:0 40px 18px 0;}
.vd-modal .vd-modal-close{position:absolute;top:13px;right:13px;width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--workspace-soft);color:#ccc;z-index:5;}
.vd-modal p{color:var(--vd-muted);}
.vd-modal .vd-wizard{gap:15px;}
.vd-modal .vd-wizard label{display:flex;flex-direction:column;gap:7px;color:#b4b4b4;font-size:13px;}
.vd-modal .vd-wizard input,.vd-modal .vd-wizard textarea,.vd-modal .vd-wizard select,.vd-modal .vd-copy-input{background:var(--vd-panel);color:var(--vd-text);border:1px solid var(--workspace-soft);border-radius:9px;padding:10px 12px;font-size:13px;width:100%;box-sizing:border-box;}
.vd-modal .vd-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;}
.vd-modal .vd-modal-tabs{display:flex;gap:3px;background:var(--vd-panel);border-radius:10px;padding:3px;}
.vd-modal .vd-modal-tabs button{border:0;background:none;color:var(--vd-muted);border-radius:8px;padding:7px 13px;}
.vd-modal .vd-modal-tabs button.active{background:var(--vd-bg);color:var(--vd-text);}
.vd-modal .vd-preset-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:15px;}
.vd-modal .vd-presets{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;}
.vd-modal .vd-preset-wrap{position:relative;min-width:0;}
.vd-modal .vd-preset{height:100%;width:100%;border:1px solid var(--workspace-soft);background:var(--vd-panel);color:var(--vd-text);border-radius:12px;padding:15px;}
.vd-modal .vd-preset:hover{border-color:var(--vd-muted);}
.vd-modal .vd-pt{font-weight:600;color:var(--vd-text);}
.vd-modal .vd-pd{font-size:12px;color:#919191;line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-top:6px;}
.vd-modal .vd-preset-delete{position:absolute;right:5px;top:5px;border:0;border-radius:6px;background:#222b;color:var(--vd-muted);width:24px;height:24px;display:grid;place-items:center;}
.vd-modal .vd-preset-delete svg{width:14px;height:14px;}
.vd-modal .vd-preset-empty{grid-column:1/-1;padding:30px 10px;text-align:center;}
.vd-modal .vd-media-preview{display:block;max-height:75vh;max-width:100%;margin:auto;border-radius:10px;}
.vd-modal .vd-detail-card{width:min(1500px,95vw);max-height:94vh;background:transparent;border:0;box-shadow:none;padding:5px;display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,440px);gap:35px;overflow:visible;}
.vd-modal .vd-detail-card>.vd-modal-close{right:470px;top:3px;}
.vd-modal .vd-detail-video{display:flex;align-items:center;justify-content:center;min-width:0;height:calc(100vh - 80px);}
.vd-modal .vd-detail-video>video{height:100%;max-width:100%;object-fit:contain;border-radius:18px;box-shadow:0 20px 40px #0004;background:#111;}
.vd-modal .vd-detail-info{display:flex;flex-direction:column;background:var(--vd-bg);border:1px solid var(--workspace-soft);border-radius:20px;padding:22px;min-width:0;max-height:calc(100vh - 100px);}
.vd-modal .vd-detail-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--vd-muted);font-size:12px;margin-bottom:18px;}
.vd-modal .vd-detail-chips>span{padding:4px 9px;border:1px solid var(--workspace-soft);border-radius:8px;color:#ccc;}
.vd-modal .vd-detail-refs{display:flex;gap:10px;margin-bottom:18px;}
.vd-modal .vd-detail-refs .vd-task-ref{width:51px;height:51px;}
.vd-modal .vd-detail-prompt{white-space:pre-wrap;background:var(--vd-panel);border:1px solid var(--workspace-soft);border-radius:14px;padding:16px;font-size:14px;line-height:1.85;overflow:auto;color:#a2a2a2;flex:1;min-height:120px;}
.vd-modal .vd-detail-actions{display:flex;gap:10px;align-items:center;margin-top:16px;}
.vd-modal .vd-detail-actions>.vd-white-btn{flex:1;}
.vd-modal .vd-detail-actions .vd-card-tools{display:flex;gap:8px;align-items:center;margin:0;}
.vd-modal .vd-detail-actions .vd-card-tools .vd-dropdown{display:none;}
.vd-modal .vd-detail-actions .vd-card-tools>span{display:none;}
.vd-modal .vd-detail-actions .vd-tool{height:36px;width:34px;border-radius:9px;background:var(--workspace-soft);}
.vd-modal .vd-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px;}
.vd-modal .vd-library-item{border:1px solid var(--workspace-soft);background:var(--vd-panel);border-radius:12px;overflow:hidden;padding:0;color:var(--vd-muted);}
.vd-modal .vd-library-item img,.vd-modal .vd-library-item video{width:100%;height:140px;object-fit:cover;display:block;}
.vd-modal .vd-library-item span{display:block;padding:9px 10px;font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.vd-modal .vd-library-item:hover{border-color:var(--vd-muted);}
.vd-modal .vd-process-video{display:block;max-height:46vh;width:100%;background:#101010;border-radius:12px;margin-bottom:20px;}
.vd-modal .vd-process-times{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.vd-modal .vd-wizard .vd-checkbox-label{display:flex;flex-direction:row;align-items:center;}
.vd-modal .vd-checkbox-label input{width:16px;height:16px;margin:0;accent-color:#59ba9a;}
@media(min-width:1700px){.vd-studio .vd-grid{grid-template-columns:repeat(5,minmax(0,1fr));}.vd-studio .vd-card{padding:20px 20px 14px;}.vd-studio .vd-card-head{font-size:13px;}.vd-studio .vd-card-meta{font-size:13px;}.vd-studio .vd-card-prompt-text{font-size:14px;max-height:46px;}.vd-studio .vd-task-ref{width:47px;height:47px;}.vd-studio .vd-genpanel{width:min(1160px,calc(100vw - 400px));}.vd-studio .vd-gp-row .vd-filter-btn,.vd-studio .vd-composer-pill{font-size:13px;height:40px;}}
@media(max-width:1150px){.vd-studio .vd-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}.vd-studio .vd-card{padding:14px 12px 12px;}.vd-studio .vd-genpanel{left:calc(50% + 118px);width:calc(100vw - 290px);bottom:25px;}.vd-studio .vd-gp-row{gap:6px;}.vd-studio .vd-composer-model .vd-filter-btn span{max-width:150px;}.vd-studio .vd-composer-send{margin-left:auto;}.vd-studio .vd-grid{padding-bottom:290px;}.vd-studio .vd-filters{gap:7px;}.vd-studio .vd-filter-btn{padding:0 11px;}.vd-studio .vd-search{width:220px;}.vd-studio .vd-date-menu{left:auto;right:-90px;transform:none;}.vd-modal .vd-detail-card{gap:18px;grid-template-columns:minmax(0,1fr) minmax(260px,360px);}.vd-modal .vd-detail-card>.vd-modal-close{right:390px;}}
@media(max-width:800px){.container:has(> .vd-root, > .tab-pane.active .vd-root){padding:10px 10px 20px;}.vd-studio #vdBody{padding:12px 10px 6px;}.vd-studio .vd-filters{margin-bottom:20px;gap:7px;}.vd-studio .vd-search{flex:1;width:auto;min-width:150px;}.vd-studio .vd-filter-btn{font-size:12px;height:34px;padding:0 10px;gap:7px;}.vd-studio .vd-multi-toggle{height:34px;width:34px;}.vd-studio .vd-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));}.vd-studio .vd-genpanel,body.side-collapsed .vd-studio .vd-genpanel{left:50%;width:calc(100vw - 32px);bottom:18px;padding:13px 14px;border-radius:22px;}.vd-studio .vd-composer-collapsed{width:min(440px,calc(100vw - 32px));padding:0;}.vd-studio .vd-gp-row .vd-filter-btn,.vd-studio .vd-composer-pill{font-size:11px;padding:0 10px;height:34px;}.vd-studio .vd-selection-bar{align-items:flex-start;gap:8px;flex-wrap:wrap;padding:12px;}.vd-studio .vd-selection-actions{width:100%;margin:0;justify-content:flex-end;flex-wrap:wrap;}.vd-studio .vd-date-menu{position:fixed;top:160px;left:50%;right:auto;transform:translateX(-50%);width:min(590px,calc(100vw - 36px));max-width:none;}.vd-modal .vd-detail-card{display:flex;flex-direction:column;gap:16px;background:var(--vd-bg);padding:18px;overflow:auto;max-height:94vh;}.vd-modal .vd-detail-card>.vd-modal-close{top:8px;right:8px;position:sticky;margin-left:auto;}.vd-modal .vd-detail-video{height:auto;min-height:180px;max-height:60vh;}.vd-modal .vd-detail-video>video{width:100%;max-height:60vh;height:auto;}.vd-modal .vd-detail-info{max-height:none;min-height:200px;padding:14px;}.vd-modal .vd-detail-prompt{max-height:32vh;flex:none;}}
@media(max-width:520px){.vd-studio .vd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}.vd-studio .vd-card{padding:10px 8px;border-radius:13px;}.vd-studio .vd-card-head{flex-wrap:wrap;gap:3px;font-size:10px;}.vd-studio .vd-status-badge{font-size:9px;padding:3px 5px;margin-left:auto;}.vd-studio .vd-model-badge{font-size:9px;max-width:90px;}.vd-studio .vd-card-meta{font-size:9px;gap:3px;margin:7px 0;flex-wrap:wrap;}.vd-studio .vd-card-meta>span svg{width:10px;height:10px;}.vd-studio .vd-card-shortcuts{gap:2px;}.vd-studio .vd-card-shortcuts .vd-tool{width:18px;height:20px;}.vd-studio .vd-card-shortcuts .vd-tool svg{width:13px;height:13px;}.vd-studio .vd-task-ref{width:27px;height:30px;border-radius:6px;}.vd-studio .vd-task-refs{gap:3px;max-width:38%;}.vd-studio .vd-card-prompt{min-height:35px;gap:5px;margin:7px 0 10px;}.vd-studio .vd-card-prompt-text{font-size:10px;max-height:34px;}.vd-studio .vd-thumb{border-radius:10px;}.vd-studio .vd-card-tools{gap:2px;margin-top:9px;}.vd-studio .vd-tool{width:21px;height:23px;}.vd-studio .vd-tool svg{width:15px;height:15px;}.vd-studio .vd-card-more .vd-menu{min-width:145px;}.vd-studio .vd-card-more .vd-menu-item{font-size:12px;}.vd-studio .vd-composer-tabs button{padding:6px 9px;font-size:11px;gap:5px;}.vd-studio .vd-composer-tabs button svg{width:14px;height:14px;}.vd-studio .vd-composer-head-tools{gap:4px;}.vd-studio .vd-gp-input{gap:12px;}.vd-studio .vd-composer-media{max-width:40%;gap:4px;}.vd-studio .vd-add-media{height:52px;width:38px;}.vd-studio .vd-gp-input textarea{font-size:12px;min-height:55px;height:55px;}.vd-studio .vd-ref{width:38px;height:52px;}.vd-studio .vd-gp-row{gap:5px;margin-top:12px;}.vd-studio .vd-composer-model .vd-filter-btn span{max-width:124px;}.vd-studio .vd-composer-params .vd-menu{position:fixed;bottom:180px;left:18px;right:18px;min-width:0;max-width:none;}.vd-studio .vd-composer-send{gap:7px;}.vd-studio #vdPromptCount{font-size:10px;}.vd-studio .vd-send{min-width:65px;height:34px;font-size:11px;padding:0 9px;}.vd-studio .vd-date-menu{padding:9px 7px;top:180px;}.vd-studio .vd-two-months{gap:8px;}.vd-studio .vd-month-title{padding:8px 0 10px;}.vd-studio .vd-month-title strong{font-size:11px;}.vd-studio .vd-date-day{width:23px;height:28px;font-size:11px;}.vd-studio .vd-weekday{font-size:10px;}.vd-studio .vd-calendar-footer{gap:5px;flex-wrap:wrap;padding-top:8px;margin-top:8px;}.vd-studio .vd-calendar-footer>div button{font-size:10px;padding:8px 4px;}.vd-studio .vd-calendar-footer .vd-white-btn,.vd-studio .vd-calendar-footer .vd-secondary-btn{padding:7px 9px;font-size:11px;}.vd-modal .vd-modal-card{padding:18px;}.vd-modal .vd-preset-top{flex-wrap:wrap;}.vd-modal .vd-detail-actions{flex-wrap:wrap;}.vd-modal .vd-detail-actions>.vd-white-btn{flex-basis:100%;}}
@media(prefers-reduced-motion:reduce){.vd-studio *{animation:none!important;transition:none!important;}}
.vd-studio .vd-reshoot-banner{display:flex;align-items:center;gap:10px;border:1px solid #375547;background:#1e2c25;border-radius:12px;padding:10px 12px;margin:0 0 13px;color:#b8d9c8;}
.vd-studio .vd-reshoot-banner>svg{color:#6cbe97;flex:none;}
.vd-studio .vd-reshoot-banner>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}
.vd-studio .vd-reshoot-banner strong{font-size:12px;font-weight:600;}
.vd-studio .vd-reshoot-banner span{font-size:11px;color:#8cab9b;line-height:1.5;}
.vd-studio .vd-reshoot-banner button{font-size:11px;padding:6px 9px;white-space:nowrap;}
.vd-modal .vd-reshoot-params{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:10px;}
@media(max-width:650px){.vd-modal .vd-reshoot-params{grid-template-columns:1fr 1fr;}.vd-studio .vd-reshoot-banner{flex-wrap:wrap;}.vd-studio .vd-reshoot-banner>div{flex-basis:80%;}.vd-studio .vd-reshoot-banner button:first-of-type{margin-left:auto;}}

/* Large displays use the reference's readable density; compact layouts retain their sizes. */
@media(min-width:1800px){
  .vd-studio .vd-filters .vd-filter-btn,.vd-studio .vd-example-btn{font-size:16px;height:42px;}
  .vd-studio .vd-history .vd-filter-btn{height:40px;}
  .vd-studio .vd-search{height:42px;}
  .vd-studio .vd-search input{font-size:16px;}
  .vd-studio .vd-card-head,.vd-studio .vd-card-meta,.vd-studio .vd-status-badge{font-size:14px;}
  .vd-studio .vd-card-prompt{min-height:52px;}
  .vd-studio .vd-card-prompt-text{font-size:16px;line-height:1.6;max-height:52px;}
  .vd-studio .vd-genpanel{width:min(1240px,calc(100vw - 380px));}
  body.side-collapsed .vd-studio .vd-genpanel{width:min(1240px,calc(100vw - 110px));}
  .vd-studio .vd-gp-input textarea{font-size:16px;}
  .vd-studio .vd-gp-row .vd-filter-btn,.vd-studio .vd-composer-pill,.vd-studio .vd-composer-tabs button{font-size:14px;}
  .vd-studio .vd-composer-collapsed{width:min(480px,calc(100vw - 380px));}
}

/* The real shell reserves only an icon rail on narrow video pages. Expanded navigation overlays it. */
@media(max-width:1150px) and (min-width:801px){
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root){--vd-nav-space:var(--side-w);}
  body.side-collapsed:has(#app > .vd-root, #app > .tab-pane.active .vd-root){--vd-nav-space:var(--side-w-min);}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-genpanel{left:calc((100% + var(--vd-nav-space))/2);width:calc(100vw - var(--vd-nav-space) - 48px);}
}
@media(max-width:800px){
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root){--vd-nav-space:56px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .main-wrap{margin-left:56px;max-width:calc(100% - 56px);}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .sidebar{width:224px;max-width:calc(100vw - 48px);box-shadow:10px 0 30px #0004;}
  body.side-collapsed:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .sidebar{width:56px;box-shadow:none;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .side-collapse-btn{min-width:34px;min-height:34px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .side-nav{padding-inline:8px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .topbar{padding-inline:10px;gap:6px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .topbar-right{gap:5px;min-width:0;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .top-actions{gap:2px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .top-icon-btn{width:29px;height:32px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .env-badge{margin-left:0;padding-inline:7px;white-space:nowrap;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .account-badge{gap:5px;padding-inline:3px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .account-name{max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .tabbar{min-width:0;max-width:100%;gap:4px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .wtab-list{overflow:hidden;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .tabbar-actions{gap:2px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .footer{padding:14px 10px;font-size:11px;overflow-wrap:anywhere;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-genpanel{left:calc(50% + 28px);width:calc(100vw - 76px);max-width:calc(100vw - 76px);}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-composer-collapsed{width:min(440px,calc(100vw - 76px));}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-composer-head{flex-wrap:wrap;gap:6px;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-composer-head-tools{margin-left:auto;}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-composer-model .vd-menu{min-width:0;width:280px;max-width:calc(100vw - 92px);}
  body:has(#app > .vd-root, #app > .tab-pane.active .vd-root) .vd-studio .vd-input-dropdown .vd-menu{position:fixed;top:160px;left:calc(50% + 28px);right:auto;transform:translateX(-50%);width:260px;max-width:calc(100vw - 92px);max-height:calc(100vh - 220px);}
}

/* Phone cards keep prompts readable and give each action a usable touch target. */
@media(max-width:520px){
  .vd-studio .vd-grid{grid-template-columns:minmax(0,1fr);gap:14px;}
  .vd-studio .vd-card{padding:14px 12px;border-radius:16px;}
  .vd-studio .vd-card-head{font-size:12px;gap:6px;min-height:28px;}
  .vd-studio .vd-card-head input{width:24px;height:24px;}
  .vd-studio .vd-model-badge{font-size:12px;max-width:118px;}
  .vd-studio .vd-status-badge{font-size:12px;padding:4px 7px;}
  .vd-studio .vd-card-meta{font-size:12px;gap:6px;margin:9px 0;}
  .vd-studio .vd-card-meta>span svg{width:13px;height:13px;}
  .vd-studio .vd-card-shortcuts{gap:3px;}
  .vd-studio .vd-card-shortcuts .vd-tool{width:30px;height:32px;}
  .vd-studio .vd-card-shortcuts .vd-tool svg{width:17px;height:17px;}
  .vd-studio .vd-task-ref{width:39px;height:42px;border-radius:8px;}
  .vd-studio .vd-task-refs{gap:5px;max-width:38%;}
  .vd-studio .vd-card-prompt{min-height:44px;gap:8px;margin:9px 0 13px;}
  .vd-studio .vd-card-prompt-text{font-size:13px;line-height:1.65;max-height:44px;}
  .vd-studio .vd-thumb{border-radius:13px;}
  .vd-studio .vd-card-tools{gap:5px;margin-top:12px;}
  .vd-studio .vd-card-tools .vd-tool{width:34px;height:34px;}
  .vd-studio .vd-card-tools .vd-tool svg{width:18px;height:18px;}
}

.vd-modal{--vd-bg:var(--workspace-bg);--vd-panel:var(--workspace-surface);--vd-line:var(--workspace-border);--vd-muted:var(--workspace-muted);--vd-text:var(--workspace-text)}.vd-studio .vd-send,.vd-modal .vd-white-btn{background:var(--workspace-accent);color:var(--workspace-accent-text)}
.vd-studio .vd-genpanel{background:color-mix(in srgb,var(--workspace-surface) 96%,transparent);border-color:var(--workspace-border);box-shadow:var(--shadow-lg)}
.vd-studio .vd-composer-tabs,.vd-studio .vd-composer-pill{background:var(--workspace-soft);color:var(--workspace-text)}
.vd-studio .vd-composer-tabs button{color:var(--workspace-muted)}
.vd-studio .vd-composer-tabs button.active{background:var(--workspace-surface);color:var(--workspace-text)}
.vd-studio .vd-gp-input textarea{background:transparent!important;color:var(--workspace-text)}

.vd-studio .vd-card-operator{color:var(--vd-muted,var(--workspace-muted));font-size:12px;margin:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5;}
