#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) {
    --tb-h: 50px;
    --lp-w: 104px;
    --rp-w: 240px;
    --ft-h: 46px;
}

#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) .imgcanvas-toolbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 40;
    min-height: var(--tb-h);
    box-sizing: border-box;
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) .imgcanvas-body {
    position: relative;
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) .imgcanvas-left {
    position: relative;
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) #sketch-layers-panel {
    position: absolute;
    top: var(--tb-h); left: 0; bottom: 0;
    width: var(--lp-w);
    z-index: 30;
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) .imgcanvas-right {
    position: absolute;
    top: var(--tb-h); right: 0; bottom: 0;
    z-index: 30;
    max-width: max(240px, calc(100% - var(--lp-w) - 320px));
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) #imgcanvas-right-sep {
    position: absolute;
    top: var(--tb-h); bottom: 0;
    right: var(--rp-w);
    z-index: 31;
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) .imgcanvas-viewport {
    box-sizing: border-box;
    padding-top: var(--tb-h);
    padding-left: var(--lp-w);
    padding-right: var(--rp-w);
}
#image-editor-workspace:is(.is-sketch, .has-layers, .uses-ai-panel) #imgcanvas-zoom-control {
    left: calc(var(--lp-w) + 14px);
}

#image-editor-workspace:is(.is-sketch, .uses-ai-panel) .imgcanvas-timeline {
    position: absolute;
    left: 0; right: var(--rp-w); bottom: 0;
    z-index: 30;
    min-height: var(--ft-h);
    box-sizing: border-box;
}
#image-editor-workspace:is(.is-sketch, .uses-ai-panel) .imgcanvas-viewport {
    padding-bottom: var(--ft-h);
}
#image-editor-workspace:is(.is-sketch, .uses-ai-panel) #sketch-layers-panel .sk-layers-list {
    padding-bottom: calc(var(--ft-h) + 8px);
    scroll-padding-bottom: calc(var(--ft-h) + 8px);
}
#sketch-layers-panel .sk-layer.sk-flash {
    animation: sk-flash 1.4s ease-out both;
}
@keyframes sk-flash {
    0%, 45% { border-color: var(--ui-accent); box-shadow: 0 0 0 2px var(--ui-accent), 0 0 14px var(--ui-accent-glow); background: var(--ui-accent-glow); }
    100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
    #sketch-layers-panel .sk-layer.sk-flash { animation: none; box-shadow: 0 0 0 2px var(--ui-accent); }
}
#image-editor-workspace:is(.is-sketch, .uses-ai-panel) #imgcanvas-zoom-control {
    bottom: calc(var(--ft-h) + 14px);
}

#image-editor-workspace.has-layers:not(.is-sketch):not(.uses-ai-panel) {
    --sb-h: 154px;
}
#image-editor-workspace.has-layers:not(.is-sketch):not(.uses-ai-panel) #sketch-layers-panel {
    bottom: var(--sb-h);
}
#image-editor-workspace.has-layers:not(.is-sketch):not(.uses-ai-panel) .imgcanvas-timeline,
#image-editor-workspace.has-layers:not(.is-sketch):not(.uses-ai-panel) .pt-bar {
    margin-right: var(--rp-w);
    position: relative;
    z-index: 35;
}
#image-editor-workspace.has-layers:not(.is-sketch):not(.uses-ai-panel) .tl-split {
    margin-right: var(--rp-w);
}

#image-editor-workspace .imgcanvas-toolbar {
    background: rgba(17, 17, 17, 0.56) !important;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#image-editor-workspace #sketch-layers-panel {
    background: rgba(14, 14, 14, 0.52);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#image-editor-workspace .imgcanvas-right {
    background: rgba(20, 20, 20, 0.93) !important;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

#image-editor-workspace .imgcanvas-timeline {
    background: rgba(17, 17, 17, 0.56) !important;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

#image-editor-workspace:not(.is-sketch):not(.uses-ai-panel) .imgcanvas-timeline:not(.is-montage) {
    background: #141414 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#vid-side {
    background: rgba(20, 20, 20, 0.93) !important;
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

#tl-params .aig-h, #image-editor-workspace .aig-h,
#vid-side .vai-h {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ui-text-muted, #666);
    margin-bottom: 8px;
}

#tl-params .aig-sec, #image-editor-workspace .aig-sec {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#vid-side .vai-sec { gap: 8px; }

#tl-params .aig-panel select, #tl-params .aig-panel textarea, #tl-params .aig-panel input:not([type=checkbox]):not([type=radio]), #image-editor-workspace .aig-panel select,
#image-editor-workspace .aig-panel textarea,
#image-editor-workspace .aig-panel input:not([type=checkbox]):not([type=radio]),
#vid-side .vai-select,
#vid-side .vai-prompt {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    transition: border-color 0.15s, background 0.15s;
}
#tl-params .aig-panel select:hover, #tl-params .aig-panel textarea:hover, #image-editor-workspace .aig-panel select:hover,
#image-editor-workspace .aig-panel textarea:hover,
#vid-side .vai-select:hover,
#vid-side .vai-prompt:hover { border-color: rgba(255, 255, 255, 0.16); }
#tl-params .aig-panel select:focus, #tl-params .aig-panel textarea:focus, #tl-params .aig-panel input:focus, #image-editor-workspace .aig-panel select:focus,
#image-editor-workspace .aig-panel textarea:focus,
#image-editor-workspace .aig-panel input:focus,
#vid-side .vai-select:focus,
#vid-side .vai-prompt:focus {
    border-color: var(--ui-accent, #48827e);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

#image-editor-workspace .aig-model-hint,
#image-editor-workspace .aig-size-cur,
#vid-side .vai-hint {
    font-size: 9.5px;
    line-height: 1.45;
    color: var(--ui-text-muted, #666);
    opacity: 0.55;
    transition: opacity 0.15s;
}
#image-editor-workspace .aig-sec:hover .aig-model-hint,
#image-editor-workspace .aig-sec:hover .aig-size-cur,
#vid-side .vai-sec:hover .vai-hint { opacity: 0.9; }

#image-editor-workspace .aig-chip,
#vid-side .vai-chip {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: border-color 0.15s, background 0.15s;
}
#image-editor-workspace .aig-chip:hover,
#vid-side .vai-chip:hover { border-color: rgba(255, 255, 255, 0.2); }

#image-editor-workspace .aig-refinfo,
#image-editor-workspace .aig-analyze-row {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
}

#image-editor-workspace .cab-btn {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 7px;
}

#tl-params .aig-body::-webkit-scrollbar, #image-editor-workspace .aig-body::-webkit-scrollbar,
#image-editor-workspace .scene-list-scroll::-webkit-scrollbar,
#vid-side .vai-body::-webkit-scrollbar,
#image-editor-workspace #sketch-layers-panel::-webkit-scrollbar { width: 7px; }
#tl-params .aig-body::-webkit-scrollbar-track, #image-editor-workspace .aig-body::-webkit-scrollbar-track,
#image-editor-workspace .scene-list-scroll::-webkit-scrollbar-track,
#vid-side .vai-body::-webkit-scrollbar-track,
#image-editor-workspace #sketch-layers-panel::-webkit-scrollbar-track { background: transparent; }
#tl-params .aig-body::-webkit-scrollbar-thumb, #image-editor-workspace .aig-body::-webkit-scrollbar-thumb,
#image-editor-workspace .scene-list-scroll::-webkit-scrollbar-thumb,
#vid-side .vai-body::-webkit-scrollbar-thumb,
#image-editor-workspace #sketch-layers-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
#tl-params .aig-body::-webkit-scrollbar-thumb:hover, #image-editor-workspace .aig-body::-webkit-scrollbar-thumb:hover,
#image-editor-workspace .scene-list-scroll::-webkit-scrollbar-thumb:hover,
#vid-side .vai-body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

#home-screen {
    background: rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(22px) saturate(1.1);
    -webkit-backdrop-filter: blur(22px) saturate(1.1);
}

#home-screen .hs-window {
    background: rgba(25, 25, 25, 0.74) !important;
    backdrop-filter: blur(30px) saturate(1.25);
    -webkit-backdrop-filter: blur(30px) saturate(1.25);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.05),
                0 32px 90px rgba(0, 0, 0, 0.6);
}

#home-screen .hs-main,
#home-screen .hs-list {
    background: transparent !important;
}

#home-screen .hs-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

#home-screen .hs-card-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
}
#home-screen .hs-card:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}
#home-screen .hs-card:active {
    background: rgba(255, 255, 255, 0.04);
}
#home-screen .hs-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
}

#tl-params .aig-sec, #image-editor-workspace .aig-sec {
    padding: 10px 12px 11px;
    border-bottom: 1px solid var(--aig-veil-weak);
}
#tl-params .aig-sec.aig-foldable > .aig-h, #image-editor-workspace .aig-sec.aig-foldable > .aig-h { height: 30px; margin-bottom: 2px; }
#tl-params .aig-h, #image-editor-workspace .aig-h {
    font-size: 10px; font-weight: 600; letter-spacing: .085em;
    text-transform: uppercase; color: var(--ui-text-dim);
}
#tl-params .aig-h .n, #image-editor-workspace .aig-h .n {
    font: 9.5px var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-text-muted);
    background: var(--aig-veil); border-radius: 20px; padding: 1px 6px;
    margin-left: auto;
}

#tl-params .aig-panel input[type="text"], #tl-params .aig-panel input[type="number"], #tl-params .aig-panel select, #image-editor-workspace .aig-panel input[type="text"],
#image-editor-workspace .aig-panel input[type="number"],
#image-editor-workspace .aig-panel select,
#image-editor-workspace .aig-model select {
    height: 26px; padding: 0 8px;
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
    color: var(--ui-text);
    font: 11.5px var(--ui-font);
    outline: none;
    transition: border-color .13s;
}
#tl-params .aig-panel input:hover, #tl-params .aig-panel select:hover, #image-editor-workspace .aig-panel input:hover,
#image-editor-workspace .aig-panel select:hover { border-color: var(--aig-veil-strong); }
#tl-params .aig-panel input:focus, #tl-params .aig-panel select:focus, #image-editor-workspace .aig-panel input:focus,
#image-editor-workspace .aig-panel select:focus { border-color: var(--ui-border-focus); }
#image-editor-workspace .aig-prompt {
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
    color: var(--ui-text);
    font: 11.5px/1.5 var(--ui-font);
    padding: 7px 8px;
}
#image-editor-workspace .aig-prompt:focus { border-color: var(--ui-border-focus); }

#tl-params .aig-size-custom button, #image-editor-workspace .aig-size-custom button {
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
}
#image-editor-workspace .aig-size-lock.on {
    background: var(--aig-accent-tint);
    border-color: var(--ui-accent);
    color: var(--ui-accent-hover);
}

#image-editor-workspace .aig-chip {
    font: 500 10.5px var(--ui-font); color: var(--ui-text-dim);
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 20px; padding: 3px 9px 3px 3px; gap: 5px;
}
#image-editor-workspace .aig-chip.on {
    background: var(--aig-accent-tint);
    border-color: var(--ui-accent);
    color: var(--ui-accent-hover);
}

#image-editor-workspace .aig-sb-list {
    background: var(--aig-scrim);
    border: 1px solid var(--aig-veil);
    border-radius: 6px; padding: 4px; gap: 3px;
}
#image-editor-workspace .aig-sb {
    background: var(--aig-veil-weak); border-radius: 4px; padding: 5px 6px;
    border: 0;
}
#image-editor-workspace .aig-sb.on { background: var(--aig-accent-tint); }
#image-editor-workspace .aig-sb-type {
    font: 700 7.5px var(--ui-font); letter-spacing: .1em;
    color: var(--ui-accent-hover); background: var(--aig-accent-tint);
    border-radius: 3px; padding: 1px 4px;
}
#image-editor-workspace .aig-sb-text {
    font: 11px/1.45 var(--ui-font); color: var(--ui-text-dim);
}

#image-editor-workspace .aig-ref {
    border-radius: 5px; border: 1px solid var(--aig-veil);
    background-color: var(--aig-veil-weak);
}

#image-editor-workspace .aig-orbit-slider input[type="range"] {
    -webkit-appearance: none; appearance: none;
    height: 3px; border-radius: 2px;
    background: var(--aig-veil); outline: none;
}
#image-editor-workspace .aig-orbit-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%;
    background: var(--ui-text); border: 0; cursor: pointer;
}
#image-editor-workspace .aig-orbit-slider .val {
    font: 600 10.5px var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-text-dim);
    text-align: right; min-width: 56px;
}

#image-editor-workspace .aig-hint,
#image-editor-workspace .aig-foot,
#image-editor-workspace .aig-model-hint {
    font-size: 10px; line-height: 1.5; color: var(--ui-text-muted);
}

#vid-side.vid-side { padding: 0; }
#vid-side .vai-title {
    padding: 10px 12px 8px;
    font-size: 10px; font-weight: 600; letter-spacing: .09em;
    color: var(--ui-text-dim);
    border-bottom: 1px solid var(--aig-veil-weak);
}
#vid-side .vai-refresh { color: var(--ui-text-muted); }
#vid-side .vai-refresh:hover { color: var(--ui-accent-hover); }
#vid-side .vai-body { padding-top: 0; gap: 0; }
#vid-side .vai-sec {
    flex: 0 0 auto;
    padding: 10px 12px 11px; gap: 6px;
    border-bottom: 1px solid var(--aig-veil-weak);
}
#vid-side .vai-h {
    font-size: 10px; font-weight: 600; letter-spacing: .085em;
    color: var(--ui-text-dim); margin: 0;
}

#vid-side .vai-select,
#vid-side .vai-input {
    height: 26px; padding: 0 8px;
    background: var(--aig-veil-weak) !important;
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
    color: var(--ui-text);
    font: 11.5px var(--ui-font);
    outline: none;
    transition: border-color .13s;
}
#vid-side .vai-select-sm { height: 26px; padding: 0 6px; font-size: 11px; }
#vid-side .vai-select:hover,
#vid-side .vai-input:hover { border-color: var(--aig-veil-strong); }
#vid-side .vai-select:focus,
#vid-side .vai-input:focus { border-color: var(--ui-border-focus); }
#vid-side .vai-prompt {
    background: var(--aig-veil-weak) !important;
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
    color: var(--ui-text);
    font: 11.5px/1.5 var(--ui-font);
    padding: 7px 8px;
}
#vid-side .vai-prompt:focus { border-color: var(--ui-border-focus); outline: none; }

#vid-side input[type="checkbox"] { accent-color: var(--ui-accent); }

#vid-side .vai-seg {
    border: 1px solid var(--aig-veil); border-radius: 5px;
}
#vid-side .vai-seg-btn {
    height: 26px; padding: 0 8px;
    background: transparent; color: var(--ui-text-dim);
    font: 500 11px var(--ui-font);
}
#vid-side .vai-seg-btn + .vai-seg-btn { border-left: 1px solid var(--aig-veil); }
#vid-side .vai-seg-btn.on {
    background: var(--aig-accent-tint);
    color: var(--ui-accent-hover);
}
#vid-side .vai-seg-btn:not(.on):not(.off):hover { background: var(--aig-veil-weak); color: var(--ui-text); }
#vid-side .vai-aud-basis { margin-top: 10px; }
#vid-side .vai-aud-row { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
#vid-side .vai-aud-eye {
    width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--aig-veil); border-radius: 5px; background: transparent; color: var(--ui-text-dim);
}
#vid-side .vai-aud-eye svg { width: 12px; height: 12px; }
#vid-side .vai-aud-eye.on { background: var(--aig-accent-tint); color: var(--ui-accent-hover); }
#vid-side .vai-aud-eye.off { opacity: .38; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--aig-veil-weak) 5px 6px); }
#vid-side .vai-aud-name {
    font: 500 11px var(--ui-font); color: var(--ui-text-dim);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

#vid-side .vai-seg-btn.off {
    opacity: .38;
    color: var(--ui-text-dim);
    background: repeating-linear-gradient(135deg, transparent 0 5px, var(--aig-veil-weak) 5px 6px);
}

#vid-side .vai-chip {
    font: 500 10.5px var(--ui-font); color: var(--ui-text-dim);
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 20px; padding: 3px 9px 3px 3px; gap: 5px;
}
#vid-side .vai-chip:hover { border-color: var(--aig-veil-strong); }
#vid-side .vai-chip.on {
    background: var(--aig-accent-tint);
    border-color: var(--ui-accent);
    color: var(--ui-accent-hover);
    font-weight: 600;
}
#vid-side .vai-av { width: 16px; height: 16px; }
#vid-side .vai-bgrp-h,
#vid-side .vai-kf-lab,
#vid-side .vai-hint {
    font-size: 10px; line-height: 1.5; color: var(--ui-text-muted);
}

#vid-side .vai-sb-list {
    background: var(--aig-scrim);
    border: 1px solid var(--aig-veil);
    border-radius: 6px; padding: 4px; gap: 3px;
}
#vid-side .vai-sb {
    background: var(--aig-veil-weak);
    border-top: 0; border-right: 0; border-bottom: 0;
    border-left-width: 2px; border-left-style: solid;
    border-radius: 4px; padding: 5px 6px;
}
#vid-side .vai-sb:hover { background: var(--aig-veil); }
#vid-side .vai-sb.on { background: var(--aig-accent-tint); }
#vid-side .vai-sb-type {
    font: 700 7.5px var(--ui-font); letter-spacing: .1em;
    color: var(--ui-accent-hover); background: var(--aig-accent-tint);
    border-radius: 3px; padding: 1px 4px;
}
#vid-side .vai-sb-char { font: 700 10px var(--ui-font); color: var(--ui-accent-hover); }
#vid-side .vai-sb-text { font: 11px/1.45 var(--ui-font); color: var(--ui-text-dim); }
#vid-side .vai-sb-rm { color: var(--ui-text-muted); }
#vid-side .vai-sb-rm:hover { background: var(--aig-veil); color: var(--ui-danger); }

#vid-side .vai-clip,
#vid-side .vai-kf-pick {
    border: 1px solid var(--aig-veil); border-radius: 5px;
}
#vid-side .vai-clip.on,
#vid-side .vai-kf-pick.on { border-color: var(--ui-accent); box-shadow: none; }
#vid-side .vai-clip:hover,
#vid-side .vai-kf-pick:hover { border-color: var(--aig-veil-strong); }
#vid-side .vai-kf-none { font: 500 10px var(--ui-font); color: var(--ui-text-dim); background: var(--aig-veil-weak); }
#vid-side .vai-kf-none.on { background: var(--aig-accent-tint); color: var(--ui-accent-hover); }
#vid-side .vai-clip-del:hover { background: var(--ui-danger); }

#vid-side .vai-opt-row,
#vid-side .vai-mod-tx { font-size: 11px; color: var(--ui-text-dim); }
#vid-side .vai-enhance-row {
    background: var(--aig-veil-weak);
    border: 1px solid var(--aig-veil);
    border-radius: 5px; padding: 6px 8px;
    font: 500 11px var(--ui-font); color: var(--ui-text-dim);
}
#vid-side .vai-enhance-row:hover { border-color: var(--aig-veil-strong); color: var(--ui-text); }
#vid-side .vai-empty {
    font-size: 10px; color: var(--ui-text-muted);
    border: 1px dashed var(--aig-veil); border-radius: 5px; padding: 10px;
}
#vid-side .aig-folder button {
    height: 26px; padding: 0 10px;
    background: var(--aig-veil-weak); border: 1px solid var(--aig-veil);
    border-radius: 5px; color: var(--ui-text-dim); font: 500 11px var(--ui-font);
}
#vid-side .aig-folder button:hover { border-color: var(--aig-veil-strong); color: var(--ui-text); }
#vid-side .aig-folder .cur { font-size: 10px; color: var(--ui-text-muted); }

#vid-side .vai-dock {
    flex: 0 0 auto;
    padding: 9px 12px 11px;
    border-top: 1px solid var(--aig-veil);
    background: linear-gradient(to bottom, var(--aig-scrim), var(--aig-scrim-hard));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#vid-side .vai-dock-row { display: flex; align-items: center; gap: 9px; }
#vid-side .vai-price-badge {
    flex: 0 0 auto; margin: 0;
    font: 500 10.5px var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-text-muted);
}
#vid-side .vai-gen {
    flex: 1; margin: 0; height: 38px;
    white-space: nowrap;
}
#vid-side .vai-busy {
    margin: 0; padding: 9px 10px;
    background: var(--aig-veil-weak); border: 1px solid var(--aig-veil);
    border-radius: 7px;
}
#vid-side .vai-busy-tx { font-size: 11px; color: var(--ui-text-dim); }
#vid-side .vai-stop {
    height: 26px; padding: 0 12px;
    border: 1px solid var(--ui-danger); background: transparent;
    color: var(--ui-danger); border-radius: 5px; font: 600 11px var(--ui-font);
}
#vid-side .vai-stop:hover { background: var(--ui-danger); color: var(--ui-bg-deep); }
#vid-side .vai-spin { border-color: var(--aig-veil-strong); border-top-color: var(--ui-accent); }

#image-editor-workspace .aig-orbit-slider {
    display: flex; align-items: center; gap: 8px;
    height: 24px; margin-top: 5px;
}
#image-editor-workspace .aig-orbit-slider .nm {
    flex: 0 0 68px; font: 11px var(--ui-font); color: var(--ui-text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#image-editor-workspace .aig-orbit-slider .val {
    flex: 0 0 56px; min-width: 0; text-align: right; white-space: nowrap;
    font: 600 10.5px var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-text-dim);
}

#image-editor-workspace .aig-orbit-slider input[type="range"] {
    -webkit-appearance: none; appearance: none;
    flex: 1; min-width: 0;
    height: 3px; padding: 0; border: 0; border-radius: 2px;
    background: var(--aig-veil-strong) !important;
    outline: none;
}
#image-editor-workspace .aig-orbit-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--ui-text); border: 0; cursor: pointer;
}
#image-editor-workspace .aig-orbit-slider input[type="range"]::-moz-range-thumb {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--ui-text); border: 0; cursor: pointer;
}

#image-editor-workspace .aig-sub {
    font: 600 9px var(--ui-font); letter-spacing: .09em; text-transform: uppercase;
    color: var(--ui-text-muted); margin: 9px 0 3px;
}

#image-editor-workspace .aig-angles {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px;
}
#image-editor-workspace .aig-angles button {
    padding: 6px 0; border-radius: 5px;
    font: 500 10px var(--ui-font); color: var(--ui-text-dim);
    background: var(--aig-veil-weak); border: 1px solid var(--aig-veil);
    transition: border-color .13s, background .13s, color .13s;
}
#image-editor-workspace .aig-angles button:hover {
    border-color: var(--aig-veil-strong); color: var(--ui-text); background: var(--aig-veil-weak);
}
#image-editor-workspace .aig-angles button.on {
    background: var(--aig-accent-tint); border-color: var(--ui-accent); color: var(--ui-accent-hover);
}

#image-editor-workspace .aig-orbit-desc {
    background: transparent; padding: 0; min-height: 0; gap: 4px; margin-top: 8px;
}
#image-editor-workspace .aig-orbit-desc .ru {
    font: 10px/1.5 var(--ui-font); font-weight: 400; color: var(--ui-text-muted);
}
#image-editor-workspace .aig-orbit-desc code {
    font: 10px/1.4 var(--ui-font); font-variant-numeric: tabular-nums; color: var(--ui-accent-hover);
}

#image-editor-workspace .aig-analyze-row {
    padding: 6px 8px; border-radius: 5px;
    background: var(--aig-veil-weak); border: 1px solid var(--aig-veil);
    font: 500 11px var(--ui-font); color: var(--ui-text-dim);
}
#image-editor-workspace .aig-analyze-row:hover { border-color: var(--aig-veil-strong); color: var(--ui-text); }
#image-editor-workspace .aig-turntable {
    height: 28px; padding: 0; margin-top: 7px; border-radius: 6px;
    border: 1px dashed var(--aig-veil-strong); background: transparent;
    font: 500 11px var(--ui-font); color: var(--ui-text-dim);
}
#image-editor-workspace .aig-turntable:hover { border-color: var(--ui-accent); color: var(--ui-accent-hover); }

#image-editor-workspace .aig-panel input[type="text"],
#image-editor-workspace .aig-panel input[type="number"],
#image-editor-workspace .aig-panel select,
#image-editor-workspace .aig-prompt {
    background: var(--aig-veil-weak) !important;
}

#image-editor-workspace .aig-orbit-reset {
    width: 22px; height: 22px; border-radius: 5px;
    border: 1px solid var(--aig-veil); color: var(--ui-text-muted); background: transparent;
}
#image-editor-workspace .aig-orbit-reset:hover {
    border-color: var(--ui-accent); color: var(--ui-accent-hover); background: var(--aig-accent-tint);
}

#image-editor-workspace .aig-vf-fs {
    position: fixed; inset: 0; z-index: 6200;
    display: flex; align-items: center; justify-content: center;
    background: var(--aig-scrim-hard);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
#image-editor-workspace .aig-vf-fs-box {
    width: min(760px, 88vw);
    max-height: 92vh; overflow-y: auto;
    padding: 16px 18px 18px;
    background: var(--ui-bg);
    border: 1px solid var(--aig-veil);
    border-radius: 10px;
    box-shadow: var(--ui-shadow);
}
#image-editor-workspace .aig-vf-fs-box .aig-orbit { gap: 10px; }
#image-editor-workspace .aig-vf-fs-box .aig-orbit-slider { height: 26px; }
#image-editor-workspace .aig-vf-fs-x {
    position: fixed; top: 18px; right: 20px;
    width: 30px; height: 30px; display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 6px; border: 1px solid var(--aig-veil);
    background: var(--aig-veil-weak); color: var(--ui-text-dim); cursor: pointer;
}
#image-editor-workspace .aig-vf-fs-x:hover {
    border-color: var(--ui-accent); color: var(--ui-accent-hover); background: var(--aig-accent-tint);
}

#vid-side .aig-switch-row {
    display: flex; align-items: center; gap: 8px;
    min-height: 26px;
}
#vid-side .aig-switch-row .aig-switch-label {
    font: 500 11px var(--ui-font); color: var(--ui-text-dim); cursor: pointer;
}
#vid-side .aig-switch-row:hover .aig-switch-label { color: var(--ui-text); }
#vid-side .vai-enhance-row {
    margin-top: 7px; padding: 6px 8px;
    background: var(--aig-veil-weak); border: 1px solid var(--aig-veil);
    border-radius: 5px;
}
#vid-side .vai-enhance-row:hover { border-color: var(--aig-veil-strong); }

#vid-side .vai-dock { flex: 0 0 auto; min-height: 60px; }
#vid-side .vai-gen { flex: 1 1 auto; height: auto; min-height: 38px; white-space: nowrap; }
#vid-side .vai-price-badge { min-height: 0; }

#image-editor-workspace .aig-outpaint {
    margin-top: 6px;
    font: 500 10px var(--ui-font); color: var(--ui-text-muted);
}
#image-editor-workspace .aig-outpaint.warn { color: var(--ui-danger); }

body .aig-ref-note-pop,
body .vai-ref-note-pop {
    width: 240px; padding: 9px 10px;
    background: var(--ui-bg);
    border: 1px solid var(--aig-veil);
    border-radius: 8px;
    box-shadow: var(--ui-shadow);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
body .aig-ref-note-pop .head,
body .vai-ref-note-head {
    font: 600 9px var(--ui-font); letter-spacing: .09em; text-transform: uppercase;
    color: var(--ui-text-muted); opacity: 1; margin-bottom: 6px;
}
body .aig-ref-note-pop textarea,
body .vai-ref-note-pop textarea {
    background: var(--aig-veil-weak) !important;
    border: 1px solid var(--aig-veil);
    border-radius: 5px;
    color: var(--ui-text);
    font: 11.5px/1.5 var(--ui-font);
    padding: 7px 8px;
}
body .aig-ref-note-pop textarea:focus,
body .vai-ref-note-pop textarea:focus { border-color: var(--ui-border-focus); outline: none; }
body .aig-ref-note-pop .row,
body .vai-ref-note-row { display: flex; gap: 6px; margin-top: 7px; }
body .aig-ref-note-pop .row button,
body .vai-ref-note-row button {
    flex: 1; height: 26px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--ui-accent);
    background: var(--aig-accent-tint); color: var(--ui-accent-hover);
    font: 600 11px var(--ui-font); cursor: pointer;
}
body .aig-ref-note-pop .row button.ghost,
body .vai-ref-note-row button.ghost {
    border-color: var(--aig-veil); background: var(--aig-veil-weak); color: var(--ui-text-dim); font-weight: 500;
}

button.ds-genbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 34px; padding: 0 16px;
    border-radius: 9px; border: 1px solid #2ea582;
    font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: #0a1f17; background: linear-gradient(180deg, #7ce9c4, #46c79a);
    box-shadow: 0 2px 10px rgba(70, 199, 154, .32);
    cursor: pointer; user-select: none;
    transition: filter .12s, background .15s, color .15s, box-shadow .15s, opacity .12s;
}
button.ds-genbtn:hover:not(:disabled) { filter: brightness(1.06); }
button.ds-genbtn:disabled, button.ds-genbtn.off {
    background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .4);
    border-color: rgba(255, 255, 255, .1); box-shadow: none; cursor: default; filter: none;
}
button.ds-genbtn.busy {
    color: #dff7ee; background: linear-gradient(180deg, #1f7a60, #155b48);
    border-color: #2ea582; box-shadow: 0 2px 10px rgba(46, 165, 130, .3);
}
button.ds-genbtn.stop, button.ds-genbtn.loading {
    color: #fff; background: linear-gradient(180deg, var(--ui-danger-text), #e0413f);
    border-color: #c0302e; box-shadow: 0 2px 12px rgba(224, 65, 63, .4);
}
button.ds-genbtn.stop:hover, button.ds-genbtn.loading:hover { filter: brightness(1.05); }
button.ds-genbtn .genbtn-ic { display: inline-flex; align-items: center; }

.ds-view-only #save-indicator { display: none; }
.ds-vo-head { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: 360px; }
.ds-vo-chip {
    display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
    padding: 4px 8px 4px 10px; cursor: pointer; white-space: nowrap;
    border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ui-accent) 45%, transparent);
    background: color-mix(in srgb, var(--ui-accent) 12%, var(--ui-bg-deep)); color: var(--ui-text);
    font: 600 12px/1.3 var(--ui-font);
}
.ds-vo-chip:hover, .ds-vo-chip[aria-expanded="true"] { border-color: var(--ui-accent); }
.ds-vo-head[data-mode="lost"] .ds-vo-chip, .ds-vo-head[data-mode="closed"] .ds-vo-chip {
    border-color: color-mix(in srgb, var(--ui-warn) 55%, transparent); background: color-mix(in srgb, var(--ui-warn) 12%, var(--ui-bg-deep));
}
.ds-vo-chip .ds-vo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ds-vo-caret { display: inline-flex; flex: 0 0 auto; color: var(--ui-text-dim); }
.ds-vo-ic { display: inline-flex; flex: 0 0 auto; color: var(--ui-accent-text); }
.ds-vo-head[data-mode="lost"] .ds-vo-ic, .ds-vo-head[data-mode="closed"] .ds-vo-ic,
.ds-vo-card[data-mode="lost"] .ds-vo-ic, .ds-vo-card[data-mode="closed"] .ds-vo-ic,
.ds-vo-pill[data-mode="lost"] .ds-vo-ic, .ds-vo-pill[data-mode="closed"] .ds-vo-ic { color: var(--ui-warn); }
.ds-vo-btn {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 32px; padding: 6px 14px;
    border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-border); background: transparent; color: var(--ui-text);
    font: 600 12px/1.3 var(--ui-font); text-align: center; cursor: pointer;
    transition: background .14s, border-color .14s, color .14s;
}
.ds-vo-btn.is-primary { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.ds-vo-btn.is-primary:hover { background: var(--ui-accent-hover); border-color: var(--ui-accent-hover); }
.ds-vo-btn.is-secondary:hover { background: var(--ui-bg-hover); }
.ds-vo-btn.is-risk { border-color: var(--ui-danger); color: var(--ui-danger-text); }
.ds-vo-btn.is-risk:hover { background: color-mix(in srgb, var(--ui-danger) 16%, transparent); }
.ds-vo-btn:disabled, .ds-vo-btn:disabled:hover { background: transparent; border-color: var(--ui-border); color: var(--ui-text-muted); cursor: not-allowed; }
.ds-vo-chip:focus-visible, .ds-vo-btn:focus-visible, .ds-vo-pill:focus-visible { outline: 2px solid var(--ui-border-focus); outline-offset: 2px; }
.ds-vo-menu {
    position: fixed; box-sizing: border-box; width: min(300px, calc(100vw - 16px));
    display: flex; flex-direction: column; gap: 8px; padding: 12px;
    background: var(--ui-bg-deep); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow);
    font: 400 12px/1.5 var(--ui-font); color: var(--ui-text);
}
.ds-vo-menu:focus { outline: none; }
.ds-vo-menu-text { margin: 0; color: var(--ui-text); }
.ds-vo-menu-acts > button, .ds-vo-card-btns > button { width: 100%; }
.ds-vo-menu-acts { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--ui-border); }
.ds-view-only .nle button:not(.ds-vo-head *, [data-graph-overlay] *, #logo-home-btn, #account-slot *, #lang-switcher-slot *, .topbar [data-act="gallery"], .topbar [data-act="gallery"] *, #easy-shell #easy-gallery, #easy-shell #easy-gallery *, #btn-project-info, #btn-project-info *, #btn-characters, #btn-characters *, #render-export-panel .rep-tab, #render-export-panel .rep-tab *, #rep-play-overlay, #rep-play-overlay *, #rep-player-controls, #rep-player-controls *, #rep-btn-export, #rep-btn-export *, #rep-btn-export-xml, #rep-btn-export-xml *, #rep-btn-export-script, #rep-btn-export-script *, #rep-btn-export-sb, #rep-btn-export-sb *, #rep-btn-export-images, #rep-btn-export-images *, #rep-btn-export-budget, #rep-btn-export-budget *, #rep-btn-export-bible, #rep-btn-export-bible *, #rep-btn-export-pres, #rep-btn-export-pres *, #rep-btn-export-video, #rep-btn-export-video *, #rep-btn-export-video-xml, #rep-btn-export-video-xml *, #rep-btn-collect, #rep-btn-collect *, #rep-script-format .rep-fps-btn, #rep-script-format .rep-fps-btn *, #rep-sb-orientation .rep-fps-btn, #rep-sb-orientation .rep-fps-btn *, #rep-sb-layout .rep-fps-btn, #rep-sb-layout .rep-fps-btn *, #rep-subs, #rep-subs *, #rep-logo, #rep-logo *, #rep-script-show-timing, #rep-script-show-timing *, #rep-sb-show-dialog, #rep-sb-show-dialog *, #rep-sb-show-time, #rep-sb-show-time *, #rep-sb-show-comments, #rep-sb-show-comments *, #rep-sb-page-per-scene, #rep-sb-page-per-scene *, #rep-sb-show-logo, #rep-sb-show-logo *, .rep-img-cell, .rep-img-cell *, .rep-img-lightbox, .rep-img-lightbox *, .bv-img, .bv-img *) { opacity: .35; cursor: not-allowed; }

.ds-view-only #easy-shell .easy-current-foot { display: none; }
.ds-vo-card {
    display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--ui-accent) 40%, transparent);
    font: 500 12px/1.4 var(--ui-font); color: var(--ui-text);
}
.ds-vo-card[data-mode="lost"], .ds-vo-card[data-mode="closed"] { border-top-color: color-mix(in srgb, var(--ui-warn) 55%, transparent); }
.ds-vo-card-line { display: flex; align-items: flex-start; gap: 6px; }
.ds-vo-card-line .ds-vo-ic { margin-top: 1px; }
.ds-vo-card-sub { color: var(--ui-text-muted); font-size: 11px; padding-left: 20px; }
.ds-vo-card-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.ds-vo-card-btns > button { white-space: normal; text-align: center; }
.ds-vo-pill { display: none; }
.ds-view-only #easy-shell :is(.easy-prompt, .easy-right) { opacity: .5; cursor: not-allowed; }
.ds-view-only #easy-shell :is([data-act="newsub"], [data-sub] [data-more]) { opacity: .35; cursor: not-allowed; }
@media (max-width: 860px) {
    .ds-vo-pill {
        position: absolute; top: 10px; left: 58px; right: 58px; z-index: 4; height: 38px; box-sizing: border-box;
        display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; cursor: pointer;
        border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ui-accent) 45%, transparent);
        background: color-mix(in srgb, var(--ui-accent) 14%, var(--ui-bg-deep)); color: var(--ui-text);
        font: 600 12px/1 var(--ui-font); white-space: nowrap; overflow: hidden;
    }
    .ds-vo-pill[data-mode="lost"], .ds-vo-pill[data-mode="closed"] { border-color: color-mix(in srgb, var(--ui-warn) 55%, transparent); background: color-mix(in srgb, var(--ui-warn) 14%, var(--ui-bg-deep)); }
    .ds-vo-pill .ds-vo-text { overflow: hidden; text-overflow: ellipsis; }
    #easy-shell.drawer-left .ds-vo-pill, #easy-shell.drawer-right .ds-vo-pill { opacity: 0; visibility: hidden; pointer-events: none; }
}

.ds-ava {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ui-accent-glow); border: 1px solid color-mix(in srgb, var(--ui-accent) 70%, transparent); color: var(--ui-text);
    font: 700 10.5px/1 var(--ui-font); letter-spacing: .04em;
}
.ds-ava.is-team { background: var(--ui-bg-hover); border-color: var(--ui-border); color: var(--ui-accent-text); }
.pb-modal.ds-share-modal, .pb-modal.pi-acc-modal, .pb-modal.pp-modal { position: relative; }
.ds-dlg-x { position: absolute; top: 6px; right: 8px; margin: 0; display: inline-flex; align-items: center; justify-content: center; }
.ds-share-modal .pb-modal-header, .pi-acc-modal .pb-modal-header, .pp-modal .pb-modal-header { padding-right: 48px; }
.ds-share-modal .pb-modal-title, .pi-acc-modal .pb-modal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }
.ds-dlg-hint { display: block; flex: 0 0 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-view-only #node-workspace :is(.tl-block, .node-group, .node-group-header) { cursor: default; }

.ds-ro-window::after { content: attr(data-ro-hint); position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 4px 12px; border-radius: var(--ui-radius-sm); background: var(--ui-bg-deep); border: 1px solid var(--ui-warn); color: var(--ui-warn); font-size: 11px; font-weight: 600; pointer-events: none; white-space: nowrap; }
.ds-ro-window input[readonly], .ds-ro-window textarea[readonly] { cursor: text; }
.ds-ro-window .pb-hdr-actions, .ds-ro-window .pb-gallery-add, .ds-ro-window .pb-add-btn, .ds-ro-window .pb-palette-bar, .ds-ro-window .pb-palette-del { display: none; }

.pa-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ui-bg-deep) 70%, transparent); }
.pa-box { width: 252px; padding: 16px; box-sizing: border-box; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-bg); box-shadow: var(--ui-shadow); }
.pa-title { margin: 0 0 10px; font-size: 11px; line-height: 1.45; color: var(--ui-text-dim); }
.pa-stage { position: relative; width: 220px; height: 220px; overflow: hidden; border-radius: var(--ui-radius); background: var(--ui-bg-deep); }
.pa-stage::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 220px color-mix(in srgb, var(--ui-bg-deep) 60%, transparent); pointer-events: none; }
.pa-view { display: block; cursor: grab; touch-action: none; }
.pa-view:active { cursor: grabbing; }
.pa-zoom { width: 100%; margin: 12px 0; accent-color: var(--ui-accent); }
.pa-foot { display: flex; justify-content: flex-end; gap: 8px; }


#image-editor-workspace .imgcanvas-timeline.is-montage {
    background: var(--ui-bg-input) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
