.vfx-lab {
    --vfx-accent-ink: color-mix(in srgb, rgb(var(--accent-rgb)), var(--ui-text-1) 52%);
    --vfx-check: color-mix(in srgb, var(--ui-card-media-bg) 78%, var(--ui-text-1) 22%);
    width: min(1320px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    padding: 18px clamp(12px, 2vw, 24px) 40px;
    color: var(--ui-text-1);
}

.vfx-lab[hidden],
.vfx-lab [hidden] {
    display: none !important;
}

.vfx-lab__shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vfx-lab__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 2px 8px;
}

.vfx-lab__eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: var(--vfx-accent-ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.vfx-lab__title {
    margin: 0;
    color: var(--ui-text-1);
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 750;
    letter-spacing: -.035em;
}

.vfx-lab__subtitle {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--ui-text-2);
    font-size: 12px;
    line-height: 1.5;
}

.vfx-lab__badge {
    flex: 0 0 auto;
    margin-top: 4px;
    padding: 6px 9px;
    border: 1px solid var(--accent-border);
    border-radius: 9px;
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.vfx-lab__layout {
    display: grid;
    grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.vfx-lab__panel {
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 15px;
    background: var(--ui-panel-bg);
    box-shadow: var(--ui-shadow);
}

.vfx-lab__panel-header {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 15px;
    border-bottom: 1px solid var(--ui-panel-divider, var(--ui-border));
}

.vfx-lab__panel-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--ui-text-1);
    font-size: 12px;
    font-weight: 750;
}

.vfx-lab__step-dot {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
    font-size: 10px;
    font-weight: 850;
}

.vfx-lab__panel-step {
    color: var(--ui-text-3);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.vfx-lab__panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.vfx-lab__video-dropzone {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 104px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 13px;
    background: var(--ui-card-media-bg);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.vfx-lab__video-dropzone:hover,
.vfx-lab__video-dropzone.is-dragover {
    border-color: var(--accent-border-strong);
    background: var(--ui-hover);
}

.vfx-lab__video-dropzone:focus-visible {
    outline: none;
    border-color: var(--accent-border-strong);
    box-shadow: 0 0 0 3px var(--ui-focus-ring);
}

.vfx-lab__video-dropzone input,
.vfx-lab__dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.vfx-lab__video-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: var(--ui-text-3);
    text-align: left;
    font-size: 10px;
}

.vfx-lab__video-empty > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vfx-lab__video-empty small {
    color: var(--ui-text-3);
    font-size: 9px;
}

.vfx-lab__video-empty strong {
    color: var(--ui-text-1);
    font-size: 11px;
    font-weight: 720;
}

.vfx-lab__prompt-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -4px;
}

.vfx-lab__prompt-suggestions button {
    min-height: 29px;
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    padding: 0 10px;
    background: var(--ui-surface-2);
    color: var(--ui-text-2);
    font-size: 9px;
    font-weight: 650;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.vfx-lab__prompt-suggestions button:hover {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
}

.vfx-lab__optional {
    margin-left: 5px;
    color: var(--ui-text-3);
    font-size: 9px;
    font-weight: 550;
}

.vfx-lab__preview-switch {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: var(--ui-surface-2);
}

.vfx-lab__preview-switch button {
    min-height: 25px;
    border: 0;
    border-radius: 6px;
    padding: 0 8px;
    background: transparent;
    color: var(--ui-text-3);
    font-size: 8px;
    font-weight: 750;
    cursor: pointer;
    text-transform: uppercase;
}

.vfx-lab__preview-switch button:hover:not(:disabled) {
    color: var(--ui-text-1);
}

.vfx-lab__preview-switch button.is-active {
    background: var(--ui-active);
    color: var(--ui-text-1);
}

.vfx-lab__preview-switch button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.vfx-lab__video-empty[hidden],
.vfx-lab__preview-switch[hidden] {
    display: none !important;
}

/*
 * Source upload is an escape hatch. The primary VFX flow stays focused on
 * prompt + optional reference, so this drop target remains intentionally compact.
 */
.vfx-lab__video-dropzone .vfx-lab__upload-icon {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.vfx-lab__upload-icon,
.vfx-lab__result-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
}

.vfx-lab__media-remove,
.vfx-lab__ref-remove {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--ui-border-strong);
    border-radius: 9px;
    background: var(--ui-panel-elevated-bg);
    color: var(--ui-text-1);
    cursor: pointer;
}

.vfx-lab__media-remove:hover,
.vfx-lab__ref-remove:hover {
    background: var(--ui-hover);
}

.vfx-lab__source-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    color: var(--ui-text-3);
    font-size: 10px;
}

.vfx-lab__source-meta > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.vfx-lab__source-meta b {
    overflow: hidden;
    color: var(--ui-text-2);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfx-lab__disclosure {
    overflow: clip;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: var(--ui-surface-2);
}

.vfx-lab__disclosure > summary {
    display: grid;
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    color: var(--ui-text-2);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.vfx-lab__disclosure > summary::-webkit-details-marker {
    display: none;
}

.vfx-lab__disclosure > summary:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.vfx-lab__disclosure > summary > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.vfx-lab__disclosure > summary b {
    color: var(--ui-text-1);
    font-size: 11px;
    font-weight: 720;
}

.vfx-lab__disclosure > summary small {
    overflow: hidden;
    max-width: 180px;
    color: var(--ui-text-3);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfx-lab__chevron {
    transition: transform .16s ease;
}

.vfx-lab__disclosure[open] > summary .vfx-lab__chevron {
    transform: rotate(180deg);
}

.vfx-lab__disclosure-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid var(--ui-panel-divider, var(--ui-border));
    background: var(--ui-panel-bg);
}

.vfx-lab__disclosure--seedance > summary {
    background: color-mix(in srgb, var(--ui-surface-2) 82%, rgb(var(--accent-rgb)) 18%);
}

.vfx-lab__disclosure--result {
    background: var(--ui-card-bg);
}

.vfx-lab__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vfx-lab__field--wide {
    grid-column: 1 / -1;
}

.vfx-lab__field-label {
    color: var(--ui-text-2);
    font-size: 10px;
    font-weight: 680;
}

.vfx-lab__field-hint {
    color: var(--ui-text-3);
    font-size: 9px;
    line-height: 1.45;
}

.vfx-lab__textarea,
.vfx-lab__select {
    width: 100%;
    border: 1px solid var(--ui-border);
    border-radius: 9px;
    outline: none;
    background: var(--ui-input-bg);
    color: var(--ui-text-1);
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.vfx-lab__textarea {
    min-height: 96px;
    padding: 10px 11px;
    resize: vertical;
    font-size: 11px;
    line-height: 1.5;
}

.vfx-lab__textarea--prompt {
    min-height: 168px;
    font-size: 12px;
    line-height: 1.6;
}

.vfx-lab__select {
    height: 36px;
    padding: 0 30px 0 10px;
    font-size: 10px;
}

.vfx-lab__textarea:focus,
.vfx-lab__select:focus {
    border-color: var(--accent-border-strong);
    box-shadow: 0 0 0 3px var(--ui-focus-ring);
}

.vfx-lab__dropzone {
    position: relative;
    display: grid;
    min-height: 92px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 10px;
    background: var(--ui-card-media-bg);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.vfx-lab__dropzone:hover,
.vfx-lab__dropzone.is-dragover {
    border-color: var(--accent-border-strong);
    background: var(--ui-hover);
}

.vfx-lab__drop-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    color: var(--ui-text-2);
    text-align: left;
    font-size: 10px;
}

.vfx-lab__drop-empty > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vfx-lab__drop-empty b {
    color: var(--ui-text-1);
    font-size: 10px;
    font-weight: 680;
}

.vfx-lab__drop-empty small {
    color: var(--ui-text-3);
    font-size: 9px;
}

.vfx-lab__drop-empty svg {
    color: var(--vfx-accent-ink);
}

.vfx-lab__ref-preview {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: var(--ui-card-media-bg);
}

.vfx-lab__grid-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.vfx-lab__button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    padding: 0 13px;
    background: var(--ui-surface-2);
    color: var(--ui-text-1);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, opacity .16s ease;
}

.vfx-lab__button:hover:not(:disabled) {
    background: var(--ui-hover);
    transform: translateY(-1px);
}

.vfx-lab__button--primary {
    border-color: var(--accent-border-strong);
    background: rgb(var(--accent-rgb));
    color: var(--accent-text, #111);
}

.vfx-lab__button--primary:hover:not(:disabled) {
    background: var(--accent-hover, rgb(var(--accent-rgb)));
}

.vfx-lab__button--large {
    min-height: 44px;
    font-size: 11px;
}

.vfx-lab__button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.vfx-lab__status {
    display: flex;
    min-height: 38px;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    padding: 9px 10px;
    background: var(--ui-surface-2);
    color: var(--ui-text-2);
    font-size: 10px;
    line-height: 1.45;
}

.vfx-lab__status[data-tone="active"] {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    color: var(--ui-text-1);
}

.vfx-lab__status[data-tone="error"] {
    border-color: color-mix(in srgb, var(--ui-border-strong), #ef4444 58%);
    color: #ef6a6a;
}

.vfx-lab__stage {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    background: var(--ui-card-bg);
}

.vfx-lab__stage-head {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid var(--ui-panel-divider, var(--ui-border));
    color: var(--ui-text-2);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.vfx-lab__media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background-color: var(--ui-card-media-bg);
    background-image:
        linear-gradient(45deg, var(--vfx-check) 25%, transparent 25%),
        linear-gradient(-45deg, var(--vfx-check) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--vfx-check) 75%),
        linear-gradient(-45deg, transparent 75%, var(--vfx-check) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.vfx-lab__media--animation {
    aspect-ratio: 1 / 1;
    min-height: 390px;
    max-height: 660px;
}

.vfx-lab__media video,
.vfx-lab__media img,
.vfx-lab__media canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
}

.vfx-lab__media video {
    background: var(--ui-card-media-bg);
}

.vfx-lab__media--atlas {
    aspect-ratio: 16 / 9;
    min-height: 230px;
    max-height: 480px;
    border-radius: 9px;
}

.vfx-lab__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 24px;
    color: var(--ui-text-3);
    text-align: center;
    font-size: 10px;
}

.vfx-lab__empty strong {
    color: var(--ui-text-2);
    font-size: 12px;
}

.vfx-lab__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.vfx-lab__link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--ui-border);
    border-radius: 9px;
    padding: 0 10px;
    background: var(--ui-surface-2);
    color: var(--ui-text-2);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

.vfx-lab__link:hover {
    color: var(--ui-text-1);
    background: var(--ui-hover);
}

.vfx-lab__link--primary {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
}

.vfx-lab__manifest {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--ui-text-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.vfx-lab__details-empty {
    margin: 0;
    color: var(--ui-text-3);
    font-size: 10px;
}

html.no-borders .vfx-lab__panel,
html.no-borders .vfx-lab__disclosure,
html.no-borders .vfx-lab__stage,
html.no-borders .vfx-lab__status {
    border-color: transparent;
}

html.no-borders .vfx-lab__video-dropzone:hover,
html.no-borders .vfx-lab__video-dropzone:focus-visible,
html.no-borders .vfx-lab__dropzone:hover,
html.no-borders .vfx-lab__status[data-tone="active"],
html.no-borders .vfx-lab__textarea:focus,
html.no-borders .vfx-lab__select:focus {
    border-color: var(--accent-border-strong) !important;
}

@media (max-width: 1000px) {
    .vfx-lab__layout {
        grid-template-columns: 1fr;
    }

    .vfx-lab__media--animation {
        aspect-ratio: 16 / 9;
        min-height: 320px;
    }
}

@media (max-width: 620px) {
    .vfx-lab {
        padding-inline: 10px;
    }

    .vfx-lab__header {
        flex-direction: column;
    }

    .vfx-lab__badge {
        display: none;
    }

    .vfx-lab__grid-fields {
        grid-template-columns: 1fr;
    }

    .vfx-lab__field--wide {
        grid-column: auto;
    }

    .vfx-lab__disclosure > summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .vfx-lab__disclosure > summary small {
        display: none;
    }

    .vfx-lab__media--animation {
        min-height: 260px;
    }
}

/* Persistent VFX library -------------------------------------------------- */
body.is-main-view-vfx-lab #gallery-grid,
body.is-main-view-vfx-lab #bottomControls,
body.is-main-view-vfx-lab #galleryTopBar,
body.is-main-view-vfx-lab #topRightControls,
body.is-main-view-vfx-lab #placeholder-msg {
    display: none !important;
}

body.is-main-view-vfx-lab #main-area {
    overflow: auto;
}

.vfx-lab__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.vfx-lab__panel--composer,
.vfx-lab__library,
.vfx-lab__panel--studio {
    grid-column: 1 / -1;
}

.vfx-lab__panel--composer .vfx-lab__panel-body {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
}

.vfx-lab__panel--composer .vfx-lab__panel-body > .vfx-lab__field:first-child {
    grid-column: 1 / 10;
    grid-row: 1;
}

.vfx-lab__panel--composer .vfx-lab__textarea--prompt {
    min-height: 104px;
}

.vfx-lab__panel--composer .vfx-lab__prompt-suggestions {
    grid-column: 1 / 10;
    grid-row: 2;
    margin: 0;
    align-self: start;
}

.vfx-lab__panel--composer .vfx-lab__field--reference {
    grid-column: 10 / 13;
    grid-row: 1 / 3;
    align-self: stretch;
}

.vfx-lab__panel--composer .vfx-lab__dropzone {
    height: 100%;
    min-height: 104px;
}

.vfx-lab__panel--composer #vfxGenerateBtn {
    grid-column: 10 / 13;
    grid-row: 3;
}

.vfx-lab__panel--composer #vfxStatus {
    grid-column: 1 / 10;
    grid-row: 3;
}

.vfx-lab__panel--composer .vfx-lab__disclosure {
    grid-column: span 6;
}

.vfx-lab__library {
    min-width: 0;
}

.vfx-lab__library-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.vfx-lab__library-head h2 {
    margin: 0;
    color: var(--ui-text-1);
    font-size: 16px;
    font-weight: 760;
    letter-spacing: -.02em;
}

.vfx-lab__library-head p {
    margin: 3px 0 0;
    color: var(--ui-text-3);
    font-size: 10px;
}

.vfx-lab__library-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.vfx-lab__library-count {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--ui-surface-2);
    color: var(--ui-text-2);
    font-size: 10px;
    font-weight: 750;
}

.vfx-lab__icon-button {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--ui-border);
    border-radius: 9px;
    background: var(--ui-surface-2);
    color: var(--ui-text-2);
    cursor: pointer;
}

.vfx-lab__icon-button:hover {
    background: var(--ui-hover);
    color: var(--ui-text-1);
}

.vfx-lab__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.vfx-lab__library-empty {
    display: flex;
    min-height: 190px;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 14px;
    background: var(--ui-surface-1);
    color: var(--ui-text-3);
    text-align: center;
    font-size: 10px;
}

.vfx-lab__library-empty strong {
    color: var(--ui-text-2);
    font-size: 12px;
}

.vfx-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-card-bg);
    box-shadow: var(--ui-shadow);
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.vfx-card:hover {
    border-color: var(--ui-border-strong);
    transform: translateY(-2px);
}

.vfx-card.is-selected {
    border-color: var(--accent-border-strong);
    box-shadow: 0 0 0 2px var(--ui-focus-ring), var(--ui-shadow);
}

.vfx-card__open {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.vfx-card__media {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    background: var(--ui-card-media-bg);
}

.vfx-card__media video,
.vfx-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vfx-card__media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    color: var(--ui-text-3);
    font-size: 10px;
    text-align: center;
}

.vfx-card__media-placeholder[data-status="failed"],
.vfx-card__media-placeholder[data-status="cancelled"] {
    color: var(--ui-danger, #ef6a6a);
}

.vfx-card__badges {
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.vfx-card__badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--ui-border-strong);
    border-radius: 999px;
    padding: 0 8px;
    background: var(--ui-panel-elevated-bg);
    color: var(--ui-text-2);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.vfx-card__badge--ready,
.vfx-card__badge--atlas {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    color: var(--vfx-accent-ink);
}

.vfx-card__body {
    padding: 11px 12px 12px;
}

.vfx-card__prompt {
    display: -webkit-box;
    min-height: 34px;
    margin: 0;
    overflow: hidden;
    color: var(--ui-text-1);
    font-size: 10px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.vfx-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
    color: var(--ui-text-3);
    font-size: 8px;
}

.vfx-lab__panel--studio .vfx-lab__panel-header {
    position: sticky;
    z-index: 3;
    top: 0;
    background: var(--ui-panel-bg);
}

.vfx-lab__panel--studio .vfx-lab__panel-body {
    display: grid;
    grid-template-columns: minmax(340px, .9fr) minmax(320px, 1.1fr);
    align-items: start;
}

.vfx-lab__panel--studio .vfx-lab__stage,
.vfx-lab__panel--studio .vfx-lab__actions {
    grid-column: 1;
}

.vfx-lab__panel--studio .vfx-lab__disclosure,
.vfx-lab__panel--studio #vfxConvertBtn {
    grid-column: 2;
}

.vfx-lab__panel--studio .vfx-lab__stage {
    grid-row: 1 / span 5;
}

.vfx-lab__panel--studio .vfx-lab__actions {
    grid-row: 6;
}

.vfx-lab__panel--studio .vfx-lab__media--animation {
    min-height: 420px;
}

html.no-borders .vfx-card,
html.no-borders .vfx-lab__library-empty,
html.no-borders .vfx-lab__icon-button {
    border-color: transparent;
}

html.no-borders .vfx-card.is-selected {
    border-color: var(--accent-border-strong);
}

@media (max-width: 900px) {
    .vfx-lab__panel--composer .vfx-lab__panel-body > .vfx-lab__field:first-child,
    .vfx-lab__panel--composer .vfx-lab__prompt-suggestions,
    .vfx-lab__panel--composer .vfx-lab__field--reference,
    .vfx-lab__panel--composer #vfxGenerateBtn,
    .vfx-lab__panel--composer #vfxStatus {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .vfx-lab__panel--composer .vfx-lab__disclosure {
        grid-column: 1 / -1;
    }

    .vfx-lab__panel--studio .vfx-lab__panel-body {
        grid-template-columns: 1fr;
    }

    .vfx-lab__panel--studio .vfx-lab__stage,
    .vfx-lab__panel--studio .vfx-lab__actions,
    .vfx-lab__panel--studio .vfx-lab__disclosure,
    .vfx-lab__panel--studio #vfxConvertBtn {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 560px) {
    .vfx-lab__cards {
        grid-template-columns: 1fr;
    }

    .vfx-lab__library-head {
        align-items: flex-start;
    }
}
