/* 1. project variables */
.neuro-app {
    --neuro-bottom-nav-height: 68px;
    --neuro-aside-width: 300px;
    --neuro-sidebar-width: 400px;
    background: var(--bs-page-bg);
}

/* 2. layout overrides */
.neuro-app .page {
    min-height: 100vh;
}

/* Neuro background effect (WebGL canvas behind the whole cabinet).
   The canvas paints above the body base colour but below the app shell,
   so it shows through the transparent gaps around cards/header. Theme
   palette is driven from JS via the html[data-bs-theme] attribute. */
#neuro {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.78;
    transition: opacity 0.35s ease, filter 0.35s ease;
}

#neuro.is-disabled {
    display: none;
}

.neuro-app #kt_app_root {
    position: relative;
    z-index: 1;
}

.neuro-app .neuro-aside {
    width: var(--neuro-aside-width);
    min-width: var(--neuro-aside-width);
    background: var(--bs-aside-bg-color);
    border-right: 0;
}

.neuro-app .header {
    position: relative;
    top: auto;
    z-index: 97;
    min-height: 80px;
    background: transparent;
    border-bottom: 0;
}

.neuro-app .content {
    padding-top: 25px;
    padding-bottom: 32px;
}

.neuro-app .neuro-shell {
    width: 100%;
}

@media (min-width: 1200px) {
    .neuro-app #kt_header_container {
        flex-wrap: nowrap !important;
    }

    .neuro-app .page-title {
        min-width: 0;
        flex: 1 1 auto;
    }

    .neuro-app .page-title h1,
    .neuro-app .page-title span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .neuro-app .neuro-topbar-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* 3. Metronic adjustments */
.neuro-app .menu-link {
    cursor: pointer;
}

.neuro-app .menu-link.active {
    background-color: transparent;
    color: var(--bs-gray-900);
}

.neuro-app .menu-link.active .menu-icon,
.neuro-app .menu-link.active .menu-title {
    color: var(--bs-gray-900);
}

.neuro-app .menu-content {
    letter-spacing: 0;
}

.neuro-app .btn,
.neuro-app [data-neuro-route-link],
.neuro-app [data-neuro-lang],
.neuro-mobile-tile {
    cursor: pointer;
}

/* 4. page styles */
.neuro-app .neuro-route-surface {
    min-height: 320px;
}

.neuro-app .neuro-route-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.neuro-app .neuro-route-title,
.neuro-app .neuro-route-actions {
    min-width: 0;
}

.neuro-app #neuroRouteOutlet {
    min-height: 180px;
}

.neuro-app .neuro-dashboard {
    width: 100%;
}

.neuro-app .neuro-dashboard-metric,
.neuro-app .neuro-dashboard-panel,
.neuro-app .neuro-dashboard-account,
.neuro-app .neuro-dashboard-actions {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-dashboard-metric .card-body {
    min-height: 178px;
}

.neuro-app .neuro-dashboard-panel .card-header,
.neuro-app .neuro-dashboard-actions .card-header {
    min-height: 72px;
}

.neuro-app .neuro-dashboard-list,
.neuro-app .neuro-dashboard-checklist {
    display: grid;
    gap: 12px;
}

.neuro-app .neuro-dashboard-row,
.neuro-app .neuro-dashboard-check-item,
.neuro-app .neuro-dashboard-persona {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
    padding: 12px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-dashboard-row-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}

.neuro-app .neuro-dashboard-row-main strong,
.neuro-app .neuro-dashboard-row-main small,
.neuro-app .neuro-dashboard-row-main em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-dashboard-row-main strong {
    color: var(--bs-gray-900);
    font-weight: 700;
    white-space: nowrap;
}

.neuro-app .neuro-dashboard-row-main small,
.neuro-app .neuro-dashboard-row-main em {
    color: var(--bs-gray-500);
    font-size: 12px;
    font-style: normal;
}

.neuro-app .neuro-dashboard-thumb {
    display: inline-flex;
    overflow: hidden;
    width: 48px;
    min-width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-weight: 700;
    background: var(--bs-primary-light);
    border-radius: 8px;
}

.neuro-app .neuro-dashboard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-dashboard-empty {
    display: flex;
    min-height: 118px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    color: var(--bs-gray-500);
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-dashboard-control-menu {
    width: min(320px, calc(100vw - 32px));
}

.neuro-app .neuro-dashboard-chart-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-dashboard-chart-bars {
    display: grid;
    min-height: 185px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.neuro-app .neuro-dashboard-chart-item {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.neuro-app .neuro-dashboard-chart-bar {
    display: flex;
    min-height: 96px;
    align-items: flex-end;
    padding: 7px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-dashboard-chart-fill {
    display: block;
    width: 100%;
    height: var(--neuro-chart-height, 24%);
    min-height: 10px;
    background: linear-gradient(180deg, var(--bs-primary), var(--bs-info));
    border-radius: 6px;
}

.neuro-app .neuro-dashboard-chart-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.neuro-app .neuro-dashboard-chart-label strong,
.neuro-app .neuro-dashboard-chart-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-dashboard-chart-label strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-dashboard-chart-label span {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
}

.neuro-app .neuro-dashboard-action {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    color: var(--bs-gray-700);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.neuro-app .neuro-dashboard-action:hover,
.neuro-app .neuro-dashboard-action:focus {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-dashboard-rec-section + .neuro-dashboard-rec-section {
    margin-top: 28px;
}

.neuro-app .neuro-dashboard-rec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.neuro-app .neuro-dashboard-rec-card {
    overflow: hidden;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-dashboard-rec-cover {
    display: flex;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-weight: 700;
    text-decoration: none;
    background: var(--bs-primary-light);
}

.neuro-app .neuro-dashboard-rec-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-dashboard-rec-body {
    padding: 14px;
}

.neuro-app .neuro-dashboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.neuro-app .neuro-dashboard-tags span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    color: var(--bs-primary);
    font-size: 11px;
    font-weight: 700;
    background: var(--bs-primary-light);
    border-radius: 999px;
}

.neuro-app .neuro-rewards {
    width: 100%;
}

.neuro-app .neuro-rewards-metric,
.neuro-app .neuro-rewards-panel {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-rewards-metric .card-body {
    min-height: 178px;
}

.neuro-app .neuro-rewards-panel .card-header {
    min-height: 72px;
}

.neuro-app .neuro-rewards-compact,
.neuro-app .neuro-rewards-row,
.neuro-app .neuro-rewards-history-item {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
    padding: 12px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-rewards-compact.is-error {
    background: var(--bs-danger-light);
    border-color: var(--bs-danger);
}

.neuro-app .neuro-rewards-list {
    display: grid;
    gap: 12px;
}

.neuro-app .neuro-rewards-row-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}

.neuro-app .neuro-rewards-row-main strong,
.neuro-app .neuro-rewards-row-main small,
.neuro-app .neuro-rewards-row-main em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-rewards-row-main strong {
    color: var(--bs-gray-900);
    font-weight: 700;
    white-space: nowrap;
}

.neuro-app .neuro-rewards-row-main small,
.neuro-app .neuro-rewards-row-main em {
    color: var(--bs-gray-500);
    font-size: 12px;
    font-style: normal;
}

.neuro-app .neuro-rewards-icon,
.neuro-app .neuro-rewards-cosmetic-media {
    --reward-color: #64748b;
    display: inline-flex;
    overflow: hidden;
    width: 48px;
    min-width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    color: var(--reward-color);
    font-weight: 800;
    background: color-mix(in srgb, var(--reward-color) 12%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--reward-color) 26%, var(--bs-border-color));
    border-radius: 8px;
}

.neuro-app .neuro-rewards-icon img,
.neuro-app .neuro-rewards-cosmetic-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-rewards-progress {
    display: block;
    overflow: hidden;
    width: 100%;
    height: 8px;
    background: var(--bs-gray-200);
    border-radius: 999px;
}

.neuro-app .neuro-rewards-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
    border-radius: inherit;
}

.neuro-app .neuro-rewards-pills {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 6px;
}

.neuro-app .neuro-rewards-pills span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    color: var(--bs-primary);
    font-size: 11px;
    font-weight: 700;
    background: var(--bs-primary-light);
    border-radius: 999px;
}

.neuro-app .neuro-rewards-level,
.neuro-app .neuro-rewards-daily,
.neuro-app .neuro-rewards-wallet {
    display: grid;
    gap: 14px;
}

.neuro-app .neuro-rewards-level-head,
.neuro-app .neuro-rewards-level-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.neuro-app .neuro-rewards-level-foot {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-rewards-lots {
    display: grid;
    gap: 8px;
}

.neuro-app .neuro-rewards-lots span {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-rewards-lots em {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-style: normal;
}

.neuro-app .neuro-rewards-cosmetics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-rewards-cosmetic {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 8px;
    padding: 14px 10px;
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-rewards-cosmetic strong,
.neuro-app .neuro-rewards-cosmetic small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-rewards-cosmetic strong {
    color: var(--bs-gray-900);
}

.neuro-app .neuro-rewards-cosmetic small {
    color: var(--bs-gray-500);
    font-size: 11px;
}

.neuro-app .neuro-rewards-empty {
    display: flex;
    min-height: 118px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    color: var(--bs-gray-500);
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-catalog-toolbar,
.neuro-app .neuro-template-card,
.neuro-app .neuro-template-form,
.neuro-app .neuro-template-summary {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-template-card {
    overflow: hidden;
}

.neuro-app .neuro-template-card-cover,
.neuro-app .neuro-template-detail-cover,
.neuro-app .neuro-template-related-cover {
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-weight: 800;
    text-decoration: none;
    background: var(--bs-primary-light);
}

.neuro-app .neuro-template-card-cover {
    aspect-ratio: 3 / 4;
    width: 100%;
}

.neuro-app .neuro-template-detail-cover {
    aspect-ratio: 3 / 4;
    min-height: 320px;
    border-radius: 8px;
}

.neuro-app .neuro-template-related-cover {
    width: 64px;
    min-width: 64px;
    height: 64px;
    border-radius: 8px;
}

.neuro-app .neuro-template-card-cover img,
.neuro-app .neuro-template-detail-cover img,
.neuro-app .neuro-template-related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-template-cover-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 18px;
    border-radius: 8px;
}

.neuro-app .neuro-template-cover-fallback.is-large {
    width: 96px;
    height: 96px;
    font-size: 26px;
}

.neuro-app .neuro-template-card-description {
    display: -webkit-box;
    /* min-height: 62px; */
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.neuro-app .neuro-template-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.neuro-app .neuro-template-card-meta span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: var(--bs-gray-600);
    font-size: 12px;
    font-weight: 600;
}

.neuro-app .neuro-template-card-meta span:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.neuro-app .neuro-template-card-meta i {
    color: var(--bs-primary);
}

.neuro-app .neuro-empty-state {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    color: var(--bs-gray-600);
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-empty-state.is-compact {
    min-height: 110px;
    padding: 16px;
}

.neuro-app .neuro-template-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-template-facts span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-template-facts strong,
.neuro-app .neuro-template-facts small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-template-facts strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-template-facts small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-template-related-list {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-template-related-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 10px;
    color: var(--bs-gray-700);
    text-decoration: none;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.neuro-app .neuro-template-related-item:hover,
.neuro-app .neuro-template-related-item:focus {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-template-related-item strong,
.neuro-app .neuro-template-related-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-template-related-item strong {
    color: var(--bs-gray-900);
    font-weight: 700;
}

.neuro-app .neuro-template-related-item small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-template-form-section {
    padding-top: 22px;
    padding-bottom: 22px;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-template-form-section:first-child {
    padding-top: 0;
}

.neuro-app .neuro-template-form-section:last-of-type {
    border-bottom: 0;
}

.neuro-app .neuro-upload-dropzone {
    display: flex;
    min-height: 132px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    color: var(--bs-gray-700);
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.neuro-app .neuro-upload-dropzone:hover,
.neuro-app .neuro-upload-dropzone:focus-within {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary-active);
}

.neuro-app .neuro-upload-dropzone span {
    color: var(--bs-gray-900);
    font-weight: 700;
}

.neuro-app .neuro-upload-dropzone small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-template-preview-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-template-preview-item {
    position: relative;
    overflow: hidden;
    min-width: 0;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-template-preview-item img,
.neuro-app .neuro-template-preview-item video {
    display: block;
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: cover;
}

.neuro-app .neuro-template-preview-item button {
    position: absolute;
    top: 8px;
    right: 8px;
}

.neuro-app .neuro-template-preview-item span {
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 8px;
    color: var(--bs-gray-600);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-template-quality-list,
.neuro-app .neuro-template-option-grid {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-template-quality-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.neuro-app .neuro-template-quality-option,
.neuro-app .neuro-template-option {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
}

.neuro-app .neuro-template-quality-option.is-selected {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-template-quality-option strong,
.neuro-app .neuro-template-quality-option small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-template-quality-option strong {
    color: var(--bs-gray-900);
    white-space: nowrap;
}

.neuro-app .neuro-template-quality-option small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-generations-toolbar,
.neuro-app .neuro-generation-card,
.neuro-app .neuro-generation-detail-card,
.neuro-app .neuro-generation-detail-section,
.neuro-app .neuro-generation-metric {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-generation-card {
    overflow: hidden;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.neuro-app .neuro-generation-card.is-selected {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-generation-media {
    display: flex;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    align-items: center;
    width: 100%;
    justify-content: center;
    appearance: none;
    color: var(--bs-primary);
    border: 0;
    cursor: pointer;
    font-weight: 700;
    padding: 0;
    text-align: center;
    text-decoration: none;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-generation-title-button {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    color: var(--bs-gray-900);
    appearance: none;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.neuro-app .neuro-generation-title-button:hover,
.neuro-app .neuro-generation-title-button:focus-visible {
    color: var(--bs-primary);
}

.neuro-app .neuro-generation-media img,
.neuro-app .neuro-generation-media video,
.neuro-app .neuro-generation-result-item img,
.neuro-app .neuro-generation-result-item video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-generation-empty-media {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 160px;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--bs-gray-500);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.neuro-app .neuro-generation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.neuro-app .neuro-generation-tags span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    color: var(--bs-gray-700);
    font-size: 11px;
    font-weight: 700;
    background: var(--bs-gray-100);
    border-radius: 999px;
}

.neuro-app .neuro-generation-stack {
    display: grid;
    gap: 16px;
}

.neuro-app .neuro-generation-detail-card .card-header,
.neuro-app .neuro-generation-detail-section .card-header {
    min-height: 70px;
}

.neuro-app .neuro-generation-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.neuro-app .neuro-generation-result-item {
    overflow: hidden;
    min-width: 0;
    margin: 0;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-result-item img,
.neuro-app .neuro-generation-result-item video {
    aspect-ratio: 1 / 1;
}

.neuro-app .neuro-generation-result-item figcaption {
    min-height: 34px;
    padding: 8px 10px;
    color: var(--bs-gray-600);
    font-size: 11px;
    font-weight: 600;
}

.neuro-app .neuro-generation-text-result,
.neuro-app .neuro-generation-owner-input {
    overflow: auto;
    max-height: 360px;
    margin: 0;
    padding: 14px;
    color: var(--bs-gray-800);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.neuro-app .neuro-generation-detail-grid > div {
    min-width: 0;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-detail-grid dt,
.neuro-app .neuro-generation-detail-grid dd {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.neuro-app .neuro-generation-detail-grid dt {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.neuro-app .neuro-generation-detail-grid dd {
    color: var(--bs-gray-900);
    font-size: 13px;
    font-weight: 700;
}

.neuro-app .neuro-generation-detail-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.neuro-app .neuro-generation-detail-metrics span {
    min-width: 0;
    padding: 12px;
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-detail-metrics strong,
.neuro-app .neuro-generation-detail-metrics small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-generation-detail-metrics strong {
    color: var(--bs-gray-900);
    font-size: 18px;
}

.neuro-app .neuro-generation-detail-metrics small {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
}

.neuro-app .neuro-generation-owner-files {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.neuro-app .neuro-generation-owner-files span {
    min-width: 0;
    overflow: hidden;
    padding: 8px 10px;
    color: var(--bs-gray-700);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--bs-gray-100);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-compact {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-compact__head {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--bs-gray-600);
    font-size: 11px;
    font-weight: 700;
}

.neuro-app .neuro-generation-pipeline-compact__head span,
.neuro-app .neuro-generation-pipeline-compact__head strong {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-generation-pipeline-compact__head strong {
    color: var(--bs-gray-900);
}

.neuro-app .neuro-generation-pipeline-dots {
    display: grid;
    grid-auto-columns: minmax(16px, 1fr);
    grid-auto-flow: column;
    gap: 5px;
}

.neuro-app .neuro-generation-pipeline-dots span {
    display: block;
    min-width: 0;
    height: 6px;
    background: var(--bs-gray-300);
    border-radius: 999px;
}

.neuro-app .neuro-generation-pipeline-dots .is-approved,
.neuro-app .neuro-generation-pipeline-dots .is-success,
.neuro-app .neuro-generation-pipeline-dots .is-skipped {
    background: var(--bs-success);
}

.neuro-app .neuro-generation-pipeline-dots .is-running,
.neuro-app .neuro-generation-pipeline-dots .is-stage-running,
.neuro-app .neuro-generation-pipeline-dots .is-retry-requested,
.neuro-app .neuro-generation-pipeline-dots .is-stage-retry-requested {
    background: var(--bs-info);
}

.neuro-app .neuro-generation-pipeline-dots .is-waiting-user-approval {
    background: var(--bs-warning);
}

.neuro-app .neuro-generation-pipeline-dots .is-rejected,
.neuro-app .neuro-generation-pipeline-dots .is-failed,
.neuro-app .neuro-generation-pipeline-dots .is-cancelled,
.neuro-app .neuro-generation-pipeline-dots .is-stage-rejected {
    background: var(--bs-danger);
}

.neuro-app .neuro-generation-pipeline-timeline {
    display: grid;
    gap: 14px;
}

.neuro-app .neuro-generation-pipeline-stage {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
}

.neuro-app .neuro-generation-pipeline-stage__marker {
    position: relative;
    width: 12px;
    height: 12px;
    margin-top: 18px;
    background: var(--bs-gray-400);
    border: 2px solid var(--bs-body-bg);
    border-radius: 999px;
    box-shadow: 0 0 0 1px var(--bs-border-color);
}

.neuro-app .neuro-generation-pipeline-stage:not(:last-child) .neuro-generation-pipeline-stage__marker::after {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 1px;
    height: calc(100% + 42px);
    content: "";
    background: var(--bs-border-color);
    transform: translateX(-50%);
}

.neuro-app .neuro-generation-pipeline-stage.is-approved .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-success .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-skipped .neuro-generation-pipeline-stage__marker {
    background: var(--bs-success);
}

.neuro-app .neuro-generation-pipeline-stage.is-running .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-stage-running .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-stage-retry-requested .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-retry-requested .neuro-generation-pipeline-stage__marker {
    background: var(--bs-info);
}

.neuro-app .neuro-generation-pipeline-stage.is-waiting-user-approval .neuro-generation-pipeline-stage__marker {
    background: var(--bs-warning);
}

.neuro-app .neuro-generation-pipeline-stage.is-failed .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-rejected .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-cancelled .neuro-generation-pipeline-stage__marker,
.neuro-app .neuro-generation-pipeline-stage.is-stage-rejected .neuro-generation-pipeline-stage__marker {
    background: var(--bs-danger);
}

.neuro-app .neuro-generation-pipeline-stage__body {
    min-width: 0;
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-stage.is-current .neuro-generation-pipeline-stage__body {
    border-color: var(--bs-primary);
}

.neuro-app .neuro-generation-pipeline-stage__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.neuro-app .neuro-generation-pipeline-stage h4 {
    overflow: hidden;
    margin: 0 0 4px;
    color: var(--bs-gray-900);
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-generation-pipeline-assets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.neuro-app .neuro-generation-pipeline-asset {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-asset img,
.neuro-app .neuro-generation-pipeline-asset video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-generation-pipeline-empty {
    margin-top: 12px;
    padding: 12px;
    color: var(--bs-gray-600);
    font-size: 12px;
    font-weight: 600;
    background: var(--bs-body-bg);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.neuro-app .neuro-generation-pipeline-review {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-warning);
    border-radius: 8px;
}

.neuro-app .neuro-generation-pipeline-review.is-compact {
    margin: 12px 0 0;
}

.neuro-app .neuro-generation-pipeline-review__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.neuro-app .neuro-generation-pipeline-review__main strong,
.neuro-app .neuro-generation-pipeline-review__main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-generation-pipeline-review__main strong {
    color: var(--bs-gray-900);
    font-size: 13px;
    font-weight: 800;
}

.neuro-app .neuro-generation-pipeline-review__main small {
    color: var(--bs-gray-600);
    font-size: 12px;
    font-weight: 700;
}

.neuro-app .neuro-generation-pipeline-review .neuro-generation-pipeline-actions {
    margin-top: 0;
}

.neuro-app .neuro-generation-pipeline-action {
    min-height: 38px;
}

.neuro-app .neuro-generation-pipeline-review.is-viewer {
    margin: 8px 0 0;
    background: rgba(12, 16, 24, 0.78);
    border-color: rgba(255, 193, 7, 0.7);
    backdrop-filter: blur(10px);
}

.neuro-app .neuro-generation-pipeline-review.is-viewer .neuro-generation-pipeline-review__main strong,
.neuro-app .neuro-generation-pipeline-review.is-viewer .neuro-generation-pipeline-review__main small {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 575.98px) {
    .neuro-app .neuro-generation-pipeline-review__main {
        align-items: flex-start;
    }

    .neuro-app .neuro-generation-pipeline-action {
        min-height: 44px;
    }
}

body.neuro-generation-viewer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.neuro-app .neuro-generation-viewer[hidden] {
    display: none !important;
}

.neuro-app .neuro-generation-viewer {
    --neuro-generation-viewer-media-gap: 1rem;
    --neuro-generation-viewer-media-height: 100svh;
    --neuro-generation-viewer-media-left: 0px;
    --neuro-generation-viewer-media-width: 100vw;
    background: #000;
    color: #fff;
    height: 100svh;
    inset: 0;
    isolation: isolate;
    overflow: hidden;
    position: fixed;
    width: 100vw;
    z-index: 2000;
}

.neuro-app .neuro-generation-viewer:focus {
    outline: none;
}

.neuro-app .neuro-generation-viewer__viewport {
    background: #000;
    height: 100svh;
    min-height: 100svh;
    outline: none;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    touch-action: pan-y;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}

.neuro-app .neuro-generation-viewer__viewport::-webkit-scrollbar {
    display: none;
}

.neuro-app .neuro-generation-viewer__slide {
    height: 100svh;
    margin: 0;
    min-height: 100svh;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
}

.neuro-app .neuro-generation-viewer__media {
    align-items: center;
    background: #04070b;
    display: grid;
    height: 100%;
    inset: 0;
    justify-items: center;
    overflow: hidden;
    position: absolute;
    width: 100%;
}

.neuro-app .neuro-generation-viewer__asset,
.neuro-app .neuro-generation-viewer__fallback {
    display: block;
    height: 100%;
    width: 100%;
}

.neuro-app .neuro-generation-viewer__asset {
    object-fit: contain;
}

.neuro-app .neuro-generation-viewer__fallback,
.neuro-app .neuro-generation-viewer__state {
    align-items: center;
    color: rgba(255, 255, 255, 0.58);
    display: grid;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.neuro-app .neuro-generation-viewer__state {
    min-height: 100svh;
}

.neuro-app .neuro-generation-viewer__text {
    background: #090d14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin: 0;
    max-height: min(76svh, 760px);
    max-width: min(86vw, 980px);
    overflow: auto;
    padding: 18px;
    white-space: pre-wrap;
    width: 100%;
}

.neuro-app .neuro-generation-viewer__shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.72) 100%);
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.neuro-app .neuro-generation-viewer__close,
.neuro-app .neuro-generation-viewer__steps button,
.neuro-app .neuro-generation-viewer__action {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: grid;
    font: inherit;
    justify-content: center;
    padding: 0;
    position: relative;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.86);
}

.neuro-app .neuro-generation-viewer__close {
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    height: 44px;
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    top: max(14px, env(safe-area-inset-top));
    width: 44px;
    z-index: 2005;
}

.neuro-app .neuro-generation-viewer__close svg,
.neuro-app .neuro-generation-viewer__steps svg {
    height: 24px;
    width: 24px;
}

.neuro-app .neuro-generation-viewer__rail {
    align-items: center;
    bottom: calc(env(safe-area-inset-bottom) + 46px);
    display: grid;
    gap: clamp(6px, 1.2svh, 11px);
    position: absolute;
    right: max(12px, env(safe-area-inset-right));
    width: 48px;
    z-index: 4;
}

.neuro-app .neuro-generation-viewer__rail-divider {
    background: rgba(255, 255, 255, 0.22);
    height: 1px;
    margin: 2px auto;
    width: 28px;
}

.neuro-app .neuro-generation-viewer__action {
    border-radius: 999px;
    height: clamp(38px, 5.7svh, 46px);
    min-height: clamp(38px, 5.7svh, 46px);
    min-width: clamp(38px, 5.7svh, 46px);
    text-decoration: none;
    width: clamp(38px, 5.7svh, 46px);
}

.neuro-app .neuro-generation-viewer__action svg {
    filter: drop-shadow(0 1px 7px rgba(0, 0, 0, 0.82));
    height: clamp(21px, 3.1svh, 25px);
    width: clamp(21px, 3.1svh, 25px);
}

.neuro-app .neuro-generation-viewer__action:hover,
.neuro-app .neuro-generation-viewer__action:focus-visible,
.neuro-app .neuro-generation-viewer__action.is-active {
    background: rgba(255, 255, 255, 0.1);
}

.neuro-app .neuro-generation-viewer__action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.neuro-app .neuro-generation-viewer__tip {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: calc(100% + 10px);
    text-align: right;
    text-shadow: 0 1px 9px rgba(0, 0, 0, 0.95);
    top: 50%;
    transform: translate(6px, -50%);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}

.neuro-app .neuro-generation-viewer.is-tooltips-enabled .neuro-generation-viewer__action:hover .neuro-generation-viewer__tip,
.neuro-app .neuro-generation-viewer.is-tooltips-enabled .neuro-generation-viewer__action:focus-visible .neuro-generation-viewer__tip {
    opacity: 1;
    transform: translate(0, -50%);
}

.neuro-app .neuro-generation-viewer__caption {
    bottom: calc(env(safe-area-inset-bottom) + 42px);
    display: grid;
    gap: 6px;
    left: max(22px, env(safe-area-inset-left));
    max-width: min(560px, calc(100vw - 104px));
    position: absolute;
    right: 82px;
    text-shadow: 0 1px 9px rgba(0, 0, 0, 0.92);
    z-index: 3;
}

.neuro-app .neuro-generation-viewer__caption .badge {
    justify-self: start;
}

.neuro-app .neuro-generation-viewer__caption strong {
    display: -webkit-box;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.22;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.neuro-app .neuro-generation-viewer__caption small,
.neuro-app .neuro-generation-viewer__asset-meta {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 700;
}

.neuro-app .neuro-generation-viewer__asset-meta {
    left: 16px;
    margin: 0;
    position: absolute;
    top: 12px;
    z-index: 3;
}

.neuro-app .neuro-generation-viewer__steps {
    display: none;
}

@media (min-width: 1024px) {
    .neuro-app .neuro-generation-viewer {
        --neuro-generation-viewer-media-gap: 1.65rem;
        --neuro-generation-viewer-media-height: calc(100svh - 2.25rem);
        --neuro-generation-viewer-media-width: min(calc(var(--neuro-generation-viewer-media-height) * 0.75), calc(100vw - 25rem), 46rem);
        --neuro-generation-viewer-media-left: calc((100vw - var(--neuro-generation-viewer-media-width)) / 2);
        background: linear-gradient(90deg, #070b10 0, #090e14 24%, #101821 50%, #090e14 76%, #070b10 100%);
    }

    .neuro-app .neuro-generation-viewer__viewport,
    .neuro-app .neuro-generation-viewer__slide {
        background: transparent;
    }

    .neuro-app .neuro-generation-viewer__media {
        border-radius: 0;
        bottom: calc((100svh - var(--neuro-generation-viewer-media-height)) / 2);
        height: var(--neuro-generation-viewer-media-height);
        left: var(--neuro-generation-viewer-media-left);
        right: auto;
        top: auto;
        width: var(--neuro-generation-viewer-media-width);
    }

    .neuro-app .neuro-generation-viewer__shade {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.52) 100%);
        bottom: calc((100svh - var(--neuro-generation-viewer-media-height)) / 2);
        height: var(--neuro-generation-viewer-media-height);
        left: var(--neuro-generation-viewer-media-left);
        right: auto;
        top: auto;
        width: var(--neuro-generation-viewer-media-width);
    }

    .neuro-app .neuro-generation-viewer__rail {
        bottom: 3.2rem;
        left: calc((100vw + var(--neuro-generation-viewer-media-width)) / 2 + var(--neuro-generation-viewer-media-gap));
        right: auto;
    }

    .neuro-app .neuro-generation-viewer__caption {
        bottom: 1.55rem;
        left: clamp(7.2rem, 9vw, 11.6rem);
        max-width: 22rem;
        right: auto;
        width: clamp(12rem, calc((100vw - var(--neuro-generation-viewer-media-width)) / 2 - 8rem), 22rem);
    }

    .neuro-app .neuro-generation-viewer__asset-meta {
        left: calc(var(--neuro-generation-viewer-media-left) + 16px);
        top: calc((100svh - var(--neuro-generation-viewer-media-height)) / 2 + 12px);
    }

    .neuro-app .neuro-generation-viewer__steps {
        display: grid;
        gap: 10px;
        position: absolute;
        right: 1.8rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2003;
    }

    .neuro-app .neuro-generation-viewer__steps button {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 999px;
        height: 44px;
        width: 44px;
    }

    .neuro-app .neuro-generation-viewer__steps button:hover,
    .neuro-app .neuro-generation-viewer__steps button:focus-visible {
        background: rgba(255, 255, 255, 0.14);
    }
}

@media (max-width: 767.98px) {
    .neuro-app .neuro-generation-viewer__close {
        height: 40px;
        right: max(10px, env(safe-area-inset-right));
        top: max(10px, env(safe-area-inset-top));
        width: 40px;
    }

    .neuro-app .neuro-generation-viewer__rail {
        bottom: calc(env(safe-area-inset-bottom) + 40px);
        gap: 8px;
        right: max(8px, env(safe-area-inset-right));
        width: 42px;
    }

    .neuro-app .neuro-generation-viewer__action {
        height: 40px;
        min-height: 40px;
        min-width: 40px;
        width: 40px;
    }

    .neuro-app .neuro-generation-viewer__action svg {
        height: 22px;
        width: 22px;
    }

    .neuro-app .neuro-generation-viewer__caption {
        bottom: calc(env(safe-area-inset-bottom) + 42px);
        left: max(14px, env(safe-area-inset-left));
        max-width: calc(100vw - 72px);
        right: 58px;
    }

    .neuro-app .neuro-generation-viewer__caption strong {
        font-size: 15px;
    }

    .neuro-app .neuro-generation-viewer__asset-meta {
        display: none;
    }

    .neuro-app .neuro-generation-viewer__tip {
        display: none;
    }
}

.neuro-app .neuro-credits-page {
    width: 100%;
}

.neuro-app .neuro-credits-wallet,
.neuro-app .neuro-credit-package,
.neuro-app .neuro-credit-filter-card,
.neuro-app .neuro-credit-history-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-credits-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.neuro-app .neuro-credit-package {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.neuro-app .neuro-credit-package:hover,
.neuro-app .neuro-credit-package:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.neuro-app .neuro-credit-package-amount {
    display: grid;
    gap: 4px;
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-credit-package-amount strong {
    color: var(--bs-gray-900);
    font-size: 1.35rem;
    line-height: 1.2;
}

.neuro-app .neuro-credit-package-amount small {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--bs-gray-600);
    font-weight: 700;
}

.neuro-app .neuro-credit-package-old-price {
    color: var(--bs-gray-500);
    text-decoration: line-through;
}

.neuro-app .neuro-credit-history-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-credit-history-row:last-child {
    border-bottom: 0;
}

.neuro-app .neuro-credit-history-side {
    display: flex;
    min-width: 180px;
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.neuro-app .neuro-credit-history-side small {
    max-width: 260px;
    overflow: hidden;
    color: var(--bs-gray-500);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-credit-delta {
    color: var(--bs-gray-700);
    font-weight: 800;
    white-space: nowrap;
}

.neuro-app .neuro-credit-delta.is-positive {
    color: var(--bs-success);
}

.neuro-app .neuro-credit-delta.is-negative {
    color: var(--bs-danger);
}

/* 5. component styles */
.neuro-app .neuro-aside .aside-menu {
    min-height: 0;
}

.neuro-app .neuro-aside .menu-sub-indention .menu-item .menu-link {
    padding-top: 0.78rem;
    padding-bottom: 0.78rem;
}

.neuro-app .neuro-aside .menu-content {
    color: var(--bs-gray-500);
    font-weight: 700;
}

.neuro-app .neuro-aside-profile {
    min-height: 46px;
}

.neuro-app .neuro-aside-profile .symbol img {
    object-fit: cover;
}

.neuro-app .neuro-topbar-actions {
    min-width: 0;
}

.neuro-app .neuro-topbar-actions > .btn,
.neuro-app .neuro-topbar-actions > .dropdown > .btn,
.neuro-app .neuro-topbar-actions > a.btn,
.neuro-app .neuro-topbar-actions > div > .btn {
    border: 1px solid var(--bs-border-color);
}

.neuro-app .neuro-credit-pill {
    max-width: 260px;
    white-space: nowrap;
}

.neuro-app .neuro-credit-pill .badge {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-notification-badge {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
}

.neuro-app .neuro-lang-flag {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.neuro-app .neuro-sidebar {
    --bs-sidebar-bg-color: #192440;
}

.neuro-app .neuro-sidebar .sidebar-body {
    min-height: 100vh;
}

.neuro-app .neuro-sidebar .card-reset {
    background: transparent;
}

.neuro-app .neuro-sidebar .card-header {
    min-height: 48px;
    padding-right: 0;
    padding-left: 0;
}

.neuro-app .neuro-sidebar .card-body {
    padding-right: 0;
    padding-left: 0;
}

.neuro-app .neuro-sidebar-stat {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.15rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-sidebar [data-neuro-notification-count]:not([hidden]) + .neuro-sidebar-zero {
    display: none;
}

.neuro-app .neuro-sidebar-link-list {
    display: grid;
    gap: 18px;
}

.neuro-app .neuro-sidebar-link {
    display: flex;
    min-width: 0;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.neuro-app .neuro-sidebar-link:hover,
.neuro-app .neuro-sidebar-link:focus,
.neuro-app .neuro-sidebar-link.active {
    color: var(--bs-primary);
    opacity: 0.95;
}

.neuro-app .neuro-sidebar-link .symbol-label {
    transition: background-color 0.18s ease;
}

.neuro-app .neuro-sidebar-link:hover .symbol-label,
.neuro-app .neuro-sidebar-link:focus .symbol-label,
.neuro-app .neuro-sidebar-link.active .symbol-label {
    background-color: var(--bs-sidebar-tabs-link-bg-color-active);
}

.neuro-app .neuro-placeholder {
    min-height: 220px;
}

.neuro-app .neuro-runtime-card {
    border: 1px solid var(--bs-border-color);
}

.neuro-app .neuro-toast-host {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 1090;
    display: grid;
    width: min(360px, calc(100vw - 32px));
    gap: 12px;
}

.neuro-app .neuro-toast {
    width: 100%;
    margin: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.neuro-app .neuro-toast .toast-header {
    min-height: 44px;
}

.neuro-app .neuro-toast .btn-close {
    width: 0.75rem;
    height: 0.75rem;
}

.neuro-app .neuro-toast-hide {
    opacity: 0;
    transform: translateY(-4px);
}

.neuro-app .neuro-modal .modal-body {
    color: var(--bs-gray-700);
}

.neuro-app .neuro-is-blocked {
    position: relative;
}

.neuro-app .neuro-block-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    border-radius: inherit;
}

.neuro-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 105;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--neuro-bottom-nav-height);
    background: #ffffff;
    border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.neuro-bottom-nav a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: var(--bs-gray-600);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.neuro-bottom-nav a.active {
    color: var(--bs-primary);
}

.neuro-mobile-quick-nav {
    height: auto;
    max-height: 78vh;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.neuro-mobile-tile {
    display: flex;
    min-height: 84px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 14px 10px;
    color: var(--bs-gray-700);
    text-align: center;
    text-decoration: none;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.neuro-mobile-tile.active,
.neuro-mobile-tile:hover,
.neuro-mobile-tile:focus {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-crud-card {
    border: 1px solid var(--bs-border-color);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.neuro-app .neuro-crud-card:hover,
.neuro-app .neuro-crud-card:focus-within,
.neuro-app .neuro-crud-card.is-selected {
    border-color: var(--bs-primary);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.neuro-app .neuro-crud-editor {
    border: 1px solid var(--bs-border-color);
}

.neuro-app .neuro-template-store-panel,
.neuro-app .neuro-user-template-review,
.neuro-app .neuro-user-template-cover-editor,
.neuro-app .neuro-user-template-test-preview {
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-template-source-text {
    overflow: auto;
    max-height: 440px;
    margin: 0;
    padding: 14px;
    color: var(--bs-gray-800);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-user-template-cover-thumb,
.neuro-app .neuro-user-template-cover-preview {
    width: 100%;
    background-color: var(--bs-gray-100);
    background-position: center;
    background-size: cover;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-user-template-cover-thumb {
    aspect-ratio: 16 / 9;
}

.neuro-app .neuro-user-template-cover-preview {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-500);
    font-size: 12px;
    font-weight: 700;
}

.neuro-app .neuro-user-template-cover-preview.has-cover {
    border-style: solid;
}

.neuro-app .neuro-user-template-cover-editor {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
}

.neuro-app .neuro-user-template-test-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    margin-top: 10px;
}

.neuro-app .neuro-user-template-test-preview span {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 5px 9px;
    overflow: hidden;
    color: var(--bs-gray-700);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
}

.neuro-app .neuro-crud-list-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-crud-list-row[draggable="true"] {
    cursor: grab;
}

.neuro-app .neuro-crud-list-row.is-dragging {
    opacity: 0.55;
}

.neuro-app .neuro-crud-list-row.is-drop-target {
    background: var(--bs-primary-light);
    border-radius: 8px;
}

.neuro-app .neuro-crud-list-row:last-child {
    border-bottom: 0;
}

.neuro-app .neuro-inline-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.neuro-app .neuro-notification-row.is-unread {
    padding-right: 14px;
    padding-left: 14px;
    background: var(--bs-primary-light);
    border: 1px dashed rgba(var(--bs-primary-rgb), 0.35);
    border-radius: 8px;
}

.neuro-app .neuro-mini-metric {
    display: flex;
    min-height: 72px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-mini-metric strong {
    color: var(--bs-gray-900);
    font-size: 1.15rem;
    line-height: 1.2;
}

.neuro-app .neuro-mini-metric span {
    color: var(--bs-gray-600);
    font-size: 0.78rem;
}

.neuro-app .neuro-mini-metric small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-course-card {
    height: 100%;
}

.neuro-app .neuro-course-swatch {
    display: inline-flex;
    width: 14px;
    height: 44px;
    flex: 0 0 auto;
    background: var(--course-accent, var(--bs-primary));
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.neuro-app .neuro-course-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.neuro-app .neuro-course-media-grid.is-disabled {
    opacity: 0.72;
}

.neuro-app .neuro-course-media-slot {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-media-preview {
    display: flex;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    background: var(--bs-body-bg);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-media-preview.has-media {
    border-style: solid;
}

.neuro-app .neuro-course-media-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-course-block {
    padding: 16px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-sort-input {
    width: 76px;
}

.neuro-app .neuro-course-preview-card {
    overflow: hidden;
    color: var(--bs-gray-800);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-preview-hero {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px;
    background: var(--bs-gray-100);
    background-image: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.14), transparent 58%);
}

.neuro-app .neuro-course-preview-hero h3 {
    max-width: 100%;
    margin: 0;
    color: var(--bs-gray-900);
    font-size: 1.45rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.neuro-app .neuro-course-preview-hero p {
    max-width: 100%;
    margin: 0;
    color: var(--bs-gray-700);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.neuro-app .neuro-course-preview-media {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.neuro-app .neuro-course-preview-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.neuro-app .neuro-course-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.neuro-app .neuro-course-preview-meta em {
    padding: 5px 9px;
    color: var(--bs-gray-700);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
}

.neuro-app .neuro-course-preview-blocks {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.neuro-app .neuro-course-preview-blocks section {
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-preview-blocks strong,
.neuro-app .neuro-course-preview-blocks small,
.neuro-app .neuro-course-preview-blocks p {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.neuro-app .neuro-course-preview-blocks small {
    margin-top: 3px;
    color: var(--bs-gray-500);
}

.neuro-app .neuro-course-preview-blocks p,
.neuro-app .neuro-course-preview-blocks ul {
    margin: 8px 0 0;
    color: var(--bs-gray-700);
    font-size: 13px;
}

.neuro-app .neuro-course-preview-blocks ul {
    padding-left: 18px;
}

.neuro-app .neuro-course-stat-grid,
.neuro-app .neuro-course-analytics {
    display: grid;
    gap: 12px;
}

.neuro-app .neuro-course-analytics {
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-course-analytics > strong {
    color: var(--bs-gray-900);
}

.neuro-app .neuro-course-analytics span {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    gap: 10px;
    color: var(--bs-gray-700);
    font-size: 12px;
}

.neuro-app .neuro-course-analytics em {
    min-width: 0;
    overflow: hidden;
    font-style: normal;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-course-analytics small {
    color: var(--bs-gray-500);
    text-align: right;
}

.neuro-app .neuro-course-lead {
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-profile-preview-cover {
    display: flex;
    min-height: 160px;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-500);
    background: var(--bs-gray-100);
    background-position: center;
    background-size: cover;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-settings-card,
.neuro-app .neuro-settings-side-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-account-summary {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-account-summary-row,
.neuro-app .neuro-account-list-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-account-summary-row:last-child,
.neuro-app .neuro-account-list-row:last-child {
    border-bottom: 0;
}

.neuro-app .neuro-account-summary-row span,
.neuro-app .neuro-account-list-row small {
    color: var(--bs-gray-500);
    font-size: 12px;
    font-weight: 600;
}

.neuro-app .neuro-account-summary-row strong,
.neuro-app .neuro-account-list-row strong {
    min-width: 0;
    overflow: hidden;
    color: var(--bs-gray-900);
    font-weight: 700;
    text-overflow: ellipsis;
}

.neuro-app .neuro-account-list {
    display: grid;
    gap: 2px;
}

.neuro-app .neuro-account-list-row small,
.neuro-app .neuro-account-list-row strong {
    display: block;
    white-space: nowrap;
}

.neuro-app .neuro-account-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.neuro-app .neuro-account-inline-form[hidden] {
    display: none;
}

.neuro-auth-modal .neuro-auth-telegram {
    min-height: 46px;
}

.neuro-app .neuro-discovery-toolbar,
.neuro-app .neuro-discovery-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-discovery-card {
    overflow: hidden;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.neuro-app .neuro-discovery-card:hover,
.neuro-app .neuro-discovery-card:focus-within {
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

.neuro-app .neuro-discovery-media {
    aspect-ratio: 3 / 4;
    background: var(--bs-gray-100);
    display: grid;
    overflow: hidden;
    place-items: center;
}

.neuro-app .neuro-discovery-media img,
.neuro-app .neuro-discovery-media video {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.neuro-app .neuro-discovery-empty-media {
    color: var(--bs-gray-500);
    font-size: 13px;
    font-weight: 600;
}

.neuro-app .neuro-discovery-author-avatar img {
    height: 35px;
    object-fit: cover;
    width: 35px;
}

.neuro-app .neuro-discovery-description {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.neuro-app .neuro-discovery-metrics,
.neuro-app .neuro-remix-panel-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.neuro-app .neuro-discovery-metric,
.neuro-app .neuro-remix-panel-grid span {
    background: var(--bs-gray-100);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 10px 12px;
}

.neuro-app .neuro-discovery-metric strong,
.neuro-app .neuro-remix-panel-grid strong {
    color: var(--bs-gray-900);
    font-size: 15px;
    line-height: 1.1;
}

.neuro-app .neuro-discovery-metric small,
.neuro-app .neuro-remix-panel-grid small {
    color: var(--bs-gray-600);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-remix-panel {
    align-items: stretch;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-primary);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    padding: 16px;
}

.neuro-app .neuro-remix-panel-media {
    aspect-ratio: 1 / 1;
    background: var(--bs-body-bg);
    border-radius: 8px;
    display: grid;
    flex: 0 0 108px;
    overflow: hidden;
    place-items: center;
}

.neuro-app .neuro-remix-panel-media img,
.neuro-app .neuro-remix-panel-media video {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.neuro-app [data-neuro-discovery-page] {
    background: #05080b;
    color: #fff;
    margin: -1.25rem;
    min-height: calc(100svh - 96px);
    overflow: hidden;
    padding: 0 16px 32px;
}

.neuro-app .neuro-discovery-toolbar {
    border: 0;
    box-shadow: none;
    margin: 0 -16px 1px;
    padding: 0 16px 12px;
}

.neuro-app .neuro-discovery-topbar {
    background: #090d12;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 70px;
    margin: 0 -16px 12px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.neuro-app .neuro-discovery-topbar__button {
    align-items: center;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 70px;
    min-width: 0;
    padding: 0;
    position: relative;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.neuro-app .neuro-discovery-topbar__button svg {
    display: block;
    height: 30px;
    width: 30px;
}

.neuro-app .neuro-discovery-icon-cut {
    color: #090d12;
}

.neuro-app .neuro-discovery-topbar__button:hover,
.neuro-app .neuro-discovery-topbar__button:focus-visible,
.neuro-app .neuro-discovery-topbar__button.is-active {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.neuro-app .neuro-discovery-topbar__button.is-active::after {
    background: #fff;
    border-radius: 999px 999px 0 0;
    bottom: 0;
    content: "";
    height: 2px;
    left: 28%;
    position: absolute;
    right: 28%;
}

.neuro-app .neuro-discovery-toolbar__meta {
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 auto 10px;
    max-width: 92rem;
}

.neuro-app .neuro-discovery-toolbar .btn-group .btn,
.neuro-app .neuro-discovery-filter-form .btn {
    min-height: 34px;
}

.neuro-app .neuro-discovery-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
    max-width: 92rem;
}

.neuro-app .neuro-discovery-filter-form__field {
    color: rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 4px;
    min-width: min(180px, 100%);
}

.neuro-app .neuro-discovery-filter-form__field > span {
    font-size: 11px;
    font-weight: 700;
}

.neuro-app .neuro-discovery-filter-form .form-select {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.neuro-app .neuro-discovery-grid {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.neuro-app .neuro-discovery-cell {
    min-width: 0;
}

.neuro-app .neuro-discovery-card {
    aspect-ratio: 9 / 14;
    background: #111820;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    isolation: isolate;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.neuro-app .neuro-discovery-card:hover,
.neuro-app .neuro-discovery-card:focus-within {
    border-color: transparent;
    transform: none;
}

.neuro-app .neuro-discovery-card__open,
.neuro-app .neuro-discovery-media {
    bottom: 0;
    color: inherit;
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    text-decoration: none;
    top: 0;
}

.neuro-app .neuro-discovery-card__open {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
    z-index: 1;
}

.neuro-app .neuro-discovery-media {
    aspect-ratio: auto;
    background: #111820;
    overflow: hidden;
    place-items: initial;
}

.neuro-app .neuro-discovery-media img,
.neuro-app .neuro-discovery-media video,
.neuro-app .neuro-discovery-empty-media {
    display: block;
    height: 100%;
    max-height: none;
    object-fit: cover;
    width: 100%;
}

.neuro-app .neuro-discovery-empty-media {
    align-items: center;
    background: linear-gradient(135deg, #131d29, #070a0f);
    color: rgba(255, 255, 255, 0.38);
    display: grid;
    font-size: clamp(1.4rem, 5vw, 3.6rem);
    font-weight: 800;
    justify-content: center;
}

.neuro-app .neuro-discovery-card__open::after {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
    bottom: 0;
    content: "";
    height: 62%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 2;
}

.neuro-app .neuro-discovery-card__chrome {
    align-items: center;
    display: flex;
    gap: 8px;
    left: 10px;
    pointer-events: none;
    position: absolute;
    right: 10px;
    z-index: 3;
}

.neuro-app .neuro-discovery-card__chrome--top {
    justify-content: flex-end;
    top: 10px;
}

.neuro-app .neuro-discovery-card__chrome--bottom {
    right: 58px;
    top: 10px;
}

.neuro-app .neuro-discovery-card__kind,
.neuro-app .neuro-discovery-card__stat {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    gap: 6px;
    line-height: 1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.92);
}

.neuro-app .neuro-discovery-card__kind svg {
    filter: drop-shadow(0 1px 7px rgba(0, 0, 0, 0.82));
    height: 25px;
    width: 25px;
}

.neuro-app .neuro-discovery-card__stat {
    font-size: clamp(13px, 1.18vw, 20px);
}

.neuro-app .neuro-discovery-card__stat svg {
    filter: drop-shadow(0 1px 7px rgba(0, 0, 0, 0.82));
    flex: 0 0 auto;
    height: 20px;
    width: 20px;
}

.neuro-app .neuro-discovery-card__title,
.neuro-app .neuro-discovery-card__metric-cache {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.neuro-app .neuro-discovery-card__caption {
    bottom: 10px;
    color: #fff;
    display: grid;
    gap: 6px;
    left: 10px;
    min-width: 0;
    pointer-events: none;
    position: absolute;
    right: 58px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.92);
    z-index: 4;
}

.neuro-app .neuro-discovery-card__caption-author {
    align-items: center;
    display: flex;
    gap: 7px;
    min-width: 0;
}

.neuro-app .neuro-discovery-card__caption-avatar {
    align-items: center;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #fff;
    display: grid;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    line-height: 1;
    overflow: hidden;
    width: 24px;
}

.neuro-app .neuro-discovery-card__caption-avatar img,
.neuro-app .neuro-discovery-card__caption-avatar span {
    display: block;
    height: 100%;
    width: 100%;
}

.neuro-app .neuro-discovery-card__caption-avatar img {
    object-fit: cover;
}

.neuro-app .neuro-discovery-card__caption-avatar span {
    align-items: center;
    display: grid;
    justify-content: center;
}

.neuro-app .neuro-discovery-card__caption-name,
.neuro-app .neuro-discovery-card__caption-text strong,
.neuro-app .neuro-discovery-card__caption-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-discovery-card__caption-name {
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 750;
    line-height: 1.15;
    min-width: 0;
    white-space: nowrap;
}

.neuro-app .neuro-discovery-card__caption .badge {
    display: none;
}

.neuro-app .neuro-discovery-card__caption-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.neuro-app .neuro-discovery-card__caption-text strong {
    display: -webkit-box;
    font-size: clamp(12px, 0.95vw, 15px);
    font-weight: 800;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.neuro-app .neuro-discovery-card__caption-text span {
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    font-size: clamp(11px, 0.78vw, 13px);
    font-weight: 600;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.neuro-app .neuro-discovery-card__actions {
    bottom: 10px;
    display: grid;
    gap: 8px;
    position: absolute;
    right: 10px;
    z-index: 5;
}

.neuro-app .neuro-discovery-card__tool {
    align-items: center;
    background: rgba(4, 7, 12, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    width: 34px;
}

.neuro-app .neuro-discovery-card__tool svg {
    height: 19px;
    width: 19px;
}

.neuro-app .neuro-discovery-card__tool:hover,
.neuro-app .neuro-discovery-card__tool:focus-visible,
.neuro-app .neuro-discovery-card__tool.is-active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.68);
}

.neuro-app .neuro-discovery-card__tool.is-active {
    color: #ed4956;
}

.neuro-app .neuro-user-templates-page .neuro-discovery-toolbar {
    margin-bottom: 2px;
}

.neuro-app .neuro-user-template-toolbar .neuro-discovery-topbar__button {
    text-decoration: none;
}

.neuro-app .neuro-user-template-status-tabs {
    max-width: 100%;
}

.neuro-app .neuro-user-template-status-tabs .btn {
    white-space: nowrap;
}

.neuro-app .neuro-user-template-toolbar__cta {
    align-items: center;
    background: var(--bs-body-bg);
    border-top: 1px solid rgba(16, 24, 40, 0.08);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 18px 20px;
}

.neuro-app .neuro-user-template-card__top {
    justify-content: space-between;
}

.neuro-app .neuro-user-template-card__top .badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-user-template-card__stats {
    align-items: center;
}

.neuro-app .neuro-user-template-stat-tool {
    cursor: default;
    flex-direction: column;
    gap: 1px;
    height: auto;
    min-height: 40px;
    min-width: 40px;
    padding: 5px 0;
    pointer-events: none;
    width: 40px;
}

.neuro-app .neuro-user-template-stat-tool span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    max-width: 34px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-user-template-archive-tool {
    color: #ff8a8a;
}

.neuro-app .neuro-user-template-editor-page {
    width: 100%;
}

.neuro-app .neuro-user-template-editor-tools {
    max-width: 1120px;
    margin-inline: auto;
}

.neuro-app .neuro-user-template-editor-mobile-title {
    max-width: 1120px;
    margin-inline: auto;
}

.neuro-app .neuro-user-template-editor-mobile-title h2 {
    margin: 0;
    color: var(--bs-gray-900);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.neuro-app .neuro-user-template-editor-mobile-title p {
    margin: 6px 0 0;
    color: var(--bs-gray-600);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.neuro-app .neuro-user-template-editor-page .neuro-crud-editor {
    margin: 0 auto;
    max-width: 1120px;
}

.neuro-app .neuro-user-template-builder-card {
    overflow: hidden;
    border-radius: 12px;
}

.neuro-app .neuro-user-template-builder-body {
    padding: 24px 28px;
}

.neuro-app .neuro-user-template-section {
    min-width: 0;
    padding: 0 0 18px;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-user-template-section:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.neuro-app .neuro-user-template-section__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.neuro-app .neuro-user-template-section__step,
.neuro-app .neuro-user-template-section__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.neuro-app .neuro-user-template-section__step {
    color: var(--bs-primary);
    font-size: 12px;
    font-weight: 800;
    background: var(--bs-primary-light);
}

.neuro-app .neuro-user-template-section__icon {
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
}

.neuro-app .neuro-user-template-section__icon svg {
    width: 18px;
    height: 18px;
}

.neuro-app .neuro-user-template-section__head h4 {
    margin: 0;
    color: var(--bs-gray-900);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.neuro-app .neuro-user-template-section__head p {
    margin: 3px 0 0;
    color: var(--bs-gray-600);
    font-size: 12px;
    line-height: 1.45;
}

.neuro-app .neuro-user-template-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.neuro-app .neuro-user-template-mode-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 82px;
    gap: 10px;
    padding: 12px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.neuro-app .neuro-user-template-mode-card:hover,
.neuro-app .neuro-user-template-mode-card:focus-within {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-user-template-mode-card.is-active,
.neuro-app .neuro-user-template-mode-card:has(input:checked) {
    background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg));
    border-color: var(--bs-primary);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.neuro-app .neuro-user-template-mode-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.neuro-app .neuro-user-template-mode-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--bs-primary);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-user-template-mode-card__icon svg {
    width: 20px;
    height: 20px;
}

.neuro-app .neuro-user-template-mode-card__body {
    display: grid;
    min-width: 0;
    align-content: center;
    gap: 3px;
}

.neuro-app .neuro-user-template-mode-card__body strong,
.neuro-app .neuro-user-template-mode-card__body small,
.neuro-app .neuro-user-template-mode-card__body em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-user-template-mode-card__body strong {
    color: var(--bs-gray-900);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.neuro-app .neuro-user-template-mode-card__body small {
    color: var(--bs-gray-700);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.neuro-app .neuro-user-template-mode-card__body em {
    color: var(--bs-gray-500);
    font-size: 10px;
    font-style: normal;
    line-height: 1.35;
}

.neuro-app .neuro-user-template-basics-layout {
    display: grid;
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.neuro-app .neuro-user-template-basics-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px 16px;
    min-width: 0;
}

.neuro-app .neuro-user-template-basics-form__wide {
    grid-column: 1 / -1;
}

.neuro-app .neuro-user-template-basics-form textarea.form-control {
    min-height: 138px;
    resize: vertical;
}

.neuro-app .neuro-user-template-cover-panel {
    min-width: 0;
}

.neuro-app .neuro-user-template-cover-panel .form-text {
    margin-top: 10px;
    color: var(--bs-gray-500);
    font-size: 11px;
}

.neuro-app .neuro-user-template-cover-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.neuro-app .neuro-user-template-cover-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    gap: 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.neuro-app .neuro-user-template-cover-action__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.neuro-app .neuro-user-template-cover-action__icon svg {
    width: 18px;
    height: 18px;
}

.neuro-app .neuro-user-template-cover-generate-hint {
    margin-top: 6px;
    color: var(--bs-gray-600);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.neuro-app .neuro-user-template-builder-card .neuro-user-template-cover-preview {
    position: relative;
    isolation: isolate;
    display: grid;
    width: 100%;
    min-height: clamp(360px, 34vw, 520px);
    padding: 28px;
    overflow: hidden;
    place-items: center;
    color: #fff;
    text-align: center;
    background-color: #202126;
    background-position: center;
    background-size: cover;
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.neuro-app .neuro-user-template-builder-card .neuro-user-template-cover-preview:hover,
.neuro-app .neuro-user-template-builder-card .neuro-user-template-cover-preview:focus-visible {
    border-color: rgba(33, 150, 243, .75);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .13);
    transform: translateY(-1px);
}

.neuro-app .neuro-user-template-cover-preview::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(17, 18, 24, .42);
    opacity: 0;
    content: "";
    transition: opacity .18s ease;
}

.neuro-app .neuro-user-template-cover-preview.has-cover:hover::before,
.neuro-app .neuro-user-template-cover-preview.has-cover:focus-visible::before {
    opacity: 1;
    backdrop-filter: blur(5px);
}

.neuro-app .neuro-user-template-cover-preview__empty,
.neuro-app .neuro-user-template-cover-preview__replace {
    display: grid;
    justify-items: center;
    gap: 12px;
    transition: opacity .18s ease, transform .18s ease;
}

.neuro-app .neuro-user-template-cover-preview__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    color: var(--bs-gray-500);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
}

.neuro-app .neuro-user-template-cover-preview__icon svg {
    width: 26px;
    height: 26px;
}

.neuro-app .neuro-user-template-cover-preview strong {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.neuro-app .neuro-user-template-cover-preview small {
    color: rgba(255, 255, 255, .58);
    font-size: 13px;
    font-weight: 700;
}

.neuro-app .neuro-user-template-cover-preview__replace {
    position: absolute;
    inset: 0;
    z-index: 2;
    align-content: center;
    opacity: 0;
    transform: translateY(8px);
}

.neuro-app .neuro-user-template-cover-preview.has-cover .neuro-user-template-cover-preview__empty {
    opacity: 0;
}

.neuro-app .neuro-user-template-cover-preview.has-cover:hover .neuro-user-template-cover-preview__replace,
.neuro-app .neuro-user-template-cover-preview.has-cover:focus-visible .neuro-user-template-cover-preview__replace {
    opacity: 1;
    transform: translateY(0);
}

.neuro-app .neuro-user-template-advanced-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
}

.neuro-app .neuro-user-template-advanced-grid .form-label,
.neuro-app .neuro-user-template-basics-form .form-label {
    margin-bottom: 7px;
    color: var(--bs-gray-800);
    font-size: 13px;
    font-weight: 700;
}

.neuro-app .neuro-user-template-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--bs-gray-200);
    border-radius: 10px;
}

.neuro-app .neuro-user-template-chip {
    border-radius: 999px;
    font-weight: 600;
}

.neuro-app [data-neuro-user-template-mode]:not([data-neuro-user-template-mode="video_template"]) .neuro-user-template-video-setting,
.neuro-app [data-neuro-user-template-mode]:not([data-neuro-user-template-mode="video_template"]) .neuro-user-template-image-stage-field {
    display: none;
}

.neuro-app .neuro-user-template-prompt-block .ai-prompt-token-editor {
    min-height: 124px;
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot {
    min-height: 96px;
    padding: 14px;
    color: var(--bs-gray-700);
    background: var(--bs-gray-100);
    border-color: var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot:hover,
.neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot:focus-visible {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-icons {
    height: 34px;
    width: 82px;
}

.neuro-app .neuro-user-template-prompt-block .ai-media-upload-icons i {
    width: 34px;
    height: 34px;
    color: var(--bs-primary);
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.neuro-app .neuro-user-template-fields-panel {
    padding: 14px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
}

.neuro-app .neuro-user-template-fields-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.neuro-app .neuro-user-template-fields-toolbar__title {
    color: var(--bs-gray-900);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.neuro-app .neuro-user-template-fields-toolbar__caption {
    margin-top: 3px;
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}

.neuro-app .neuro-user-template-field-palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.neuro-app .neuro-user-template-field-palette .btn {
    height: 32px;
    padding-inline: 10px;
    font-size: 11px;
    font-weight: 800;
}

.neuro-app .neuro-user-template-field-builder {
    display: grid;
    gap: 14px;
}

.neuro-app .neuro-user-template-field-row {
    background: #fff;
    border: 1px solid #e6e9f2;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(30, 41, 59, .05);
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    padding: 16px;
}

.neuro-app .neuro-user-template-field-row .form-label {
    margin-bottom: 6px;
    color: var(--bs-gray-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.neuro-app .neuro-user-template-field-row .form-control,
.neuro-app .neuro-user-template-field-row .form-select {
    min-height: 42px;
    font-size: 13px;
}

.neuro-app .neuro-user-template-field-row .form-check {
    min-height: 42px;
    margin: 0;
    padding: 0 10px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-user-template-field-row .btn-icon {
    width: 40px;
    height: 40px;
    margin: 0 !important;
}

@media (max-width: 991px) {
    .neuro-app .neuro-user-template-builder-body {
        padding: 18px 16px 24px;
    }

    .neuro-app .neuro-user-template-mode-grid {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-mode-card {
        min-height: 70px;
        padding: 10px;
    }

    .neuro-app .neuro-user-template-basics-layout {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-basics-form,
    .neuro-app .neuro-user-template-advanced-grid {
        grid-template-columns: 1fr 1fr;
    }

    .neuro-app .neuro-user-template-builder-card .neuro-user-template-cover-preview {
        min-height: 260px;
        aspect-ratio: 16 / 10;
    }

    .neuro-app .neuro-user-template-section__head {
        margin-bottom: 12px;
    }

    .neuro-app .neuro-user-template-section__icon {
        display: none;
    }
}

@media (max-width: 575px) {
    .neuro-app .neuro-user-template-editor-page {
        padding-bottom: calc(var(--neuro-bottom-nav-height) + 24px);
    }

    .neuro-app .neuro-user-template-editor-page .neuro-crud-editor {
        border-radius: 10px;
    }

    .neuro-app .neuro-user-template-section {
        padding-bottom: 16px;
    }

    .neuro-app .neuro-user-template-basics-form,
    .neuro-app .neuro-user-template-advanced-grid {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-builder-card .neuro-user-template-cover-preview {
        min-height: 238px;
        border-radius: 12px;
    }

    .neuro-app .neuro-user-template-fields-toolbar {
        display: grid;
    }

    .neuro-app .neuro-user-template-field-palette {
        justify-content: flex-start;
    }

    .neuro-app .neuro-user-template-field-row {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-field-options-head,
    .neuro-app .neuro-user-template-field-option-row__top {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-field-options-head {
        display: grid;
    }

    .neuro-app .neuro-user-template-section__step,
    .neuro-app .neuro-user-template-section__icon {
        width: 30px;
        height: 30px;
    }

    .neuro-app .neuro-user-template-mode-card__body strong {
        font-size: 14px;
    }

    .neuro-app .neuro-user-template-mode-card__body em {
        display: none;
    }

    .neuro-app .neuro-user-template-prompt-block .ai-prompt-token-editor {
        min-height: 112px;
    }

    .neuro-app .neuro-user-template-prompt-block .ai-media-upload-slot {
        min-height: 82px;
    }
}

body.neuro-discovery-viewer-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.neuro-app .neuro-discovery-viewer[hidden] {
    display: none !important;
}

.neuro-app .neuro-discovery-viewer {
    --neuro-reel-media-height: 100svh;
    --neuro-reel-media-width: 100vw;
    --neuro-reel-media-left: 0px;
    --neuro-reel-media-gap: 1rem;
    background: #000;
    color: #fff;
    height: 100svh;
    inset: 0;
    isolation: isolate;
    overflow: hidden;
    position: fixed;
    width: 100vw;
    z-index: 2000;
}

.neuro-app .neuro-discovery-viewer.is-positioning {
    visibility: hidden;
}

.neuro-app .neuro-discovery-viewer__viewport {
    background: #000;
    height: 100svh;
    min-height: 100svh;
    outline: none;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    touch-action: pan-y;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}

.neuro-app .neuro-discovery-viewer__viewport::-webkit-scrollbar {
    display: none;
}

.neuro-app .neuro-discovery-reel {
    background: #000;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
}

.neuro-app .neuro-discovery-reel__media {
    background: #05080b;
    height: 100%;
    inset: 0;
    overflow: hidden;
    position: absolute;
    width: 100%;
}

.neuro-app .neuro-discovery-reel__asset,
.neuro-app .neuro-discovery-reel__fallback {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.neuro-app .neuro-discovery-reel__fallback {
    align-items: center;
    color: rgba(255, 255, 255, 0.34);
    display: grid;
    font-size: 3rem;
    font-weight: 800;
    justify-content: center;
}

.neuro-app .neuro-discovery-reel__shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.58) 100%);
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.neuro-app .neuro-discovery-reel__rail {
    align-items: center;
    bottom: calc(env(safe-area-inset-bottom) + 48px);
    display: grid;
    gap: 11px;
    position: absolute;
    right: max(11px, env(safe-area-inset-right));
    width: 47px;
    z-index: 4;
}

.neuro-app .neuro-discovery-reel__action,
.neuro-app .neuro-discovery-reel__thumb {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 4px;
    justify-items: center;
    min-height: 45px;
    min-width: 45px;
    padding: 0;
    text-align: center;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.86);
}

.neuro-app .neuro-discovery-reel__action svg {
    filter: drop-shadow(0 1px 7px rgba(0, 0, 0, 0.82));
    height: 26px;
    width: 26px;
}

.neuro-app .neuro-discovery-reel__action span {
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    min-width: 45px;
}

.neuro-app .neuro-discovery-reel__action.is-active {
    color: #ed4956;
}

.neuro-app .neuro-discovery-reel__action--plain {
    min-height: 22px;
}

.neuro-app .neuro-discovery-reel__action--plain svg {
    height: 17px;
    width: 17px;
}

.neuro-app .neuro-discovery-reel__thumb {
    border-radius: 8px;
    height: 36px;
    min-height: 36px;
    min-width: 36px;
    overflow: hidden;
    width: 36px;
}

.neuro-app .neuro-discovery-reel__thumb img,
.neuro-app .neuro-discovery-reel__thumb span {
    display: block;
    height: 100%;
    width: 100%;
}

.neuro-app .neuro-discovery-reel__thumb img {
    object-fit: cover;
}

.neuro-app .neuro-discovery-reel__thumb span {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    font-size: 11px;
    font-weight: 800;
    justify-content: center;
}

.neuro-app .neuro-discovery-reel__caption {
    bottom: calc(env(safe-area-inset-bottom) + 54px);
    display: grid;
    gap: 8px;
    left: max(24px, env(safe-area-inset-left));
    position: absolute;
    right: 82px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.88);
    z-index: 3;
}

.neuro-app .neuro-discovery-reel__author {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.neuro-app .neuro-discovery-reel__avatar {
    border-radius: 999px;
    color: inherit;
    display: grid;
    flex: 0 0 auto;
    height: 40px;
    overflow: hidden;
    place-items: center;
    text-decoration: none;
    width: 40px;
}

.neuro-app .neuro-discovery-reel__avatar img,
.neuro-app .neuro-discovery-reel__avatar span {
    display: block;
    height: 100%;
    width: 100%;
}

.neuro-app .neuro-discovery-reel__avatar img {
    object-fit: cover;
}

.neuro-app .neuro-discovery-reel__avatar span {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    font-weight: 800;
    justify-content: center;
}

.neuro-app .neuro-discovery-reel__name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-discovery-reel__author .btn {
    min-height: 30px;
    padding: 5px 10px;
}

.neuro-app .neuro-discovery-reel__text {
    display: grid;
    font-size: 14px;
    font-weight: 400;
    gap: 4px;
    line-height: 18px;
}

.neuro-app .neuro-discovery-reel__text strong,
.neuro-app .neuro-discovery-reel__text span,
.neuro-app .neuro-discovery-reel__text button {
    display: -webkit-box;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
}

.neuro-app .neuro-discovery-reel__text strong {
    font-weight: 700;
    -webkit-line-clamp: 2;
}

.neuro-app .neuro-discovery-reel__text span {
    color: rgba(255, 255, 255, 0.86);
    -webkit-line-clamp: 3;
}

.neuro-app .neuro-discovery-reel__text button {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 0;
    -webkit-line-clamp: 1;
}

.neuro-app .neuro-discovery-reel__progress {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    bottom: 0;
    height: 2px;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    z-index: 5;
}

.neuro-app .neuro-discovery-reel__progress span {
    background: #fff;
    display: block;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    width: 100%;
}

.neuro-app .neuro-discovery-viewer__close {
    align-items: center;
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: grid;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    top: max(14px, env(safe-area-inset-top));
    width: 44px;
    z-index: 2005;
}

.neuro-app .neuro-discovery-viewer__close svg {
    height: 24px;
    width: 24px;
}

.neuro-app .neuro-discovery-viewer__side-nav,
.neuro-app .neuro-discovery-viewer__steps {
    display: none;
}

@media (min-width: 1024px) {
    .neuro-app .neuro-discovery-viewer {
        --neuro-reel-media-height: calc(100svh - 2.25rem);
        --neuro-reel-media-width: min(calc(var(--neuro-reel-media-height) * 0.5625), calc(100vw - 25rem), 42rem);
        --neuro-reel-media-left: calc((100vw - var(--neuro-reel-media-width)) / 2);
        --neuro-reel-media-gap: 1.65rem;
        background: linear-gradient(90deg, #070b10 0, #090e14 24%, #101821 50%, #090e14 76%, #070b10 100%);
    }

    .neuro-app .neuro-discovery-viewer__viewport,
    .neuro-app .neuro-discovery-reel {
        background: transparent;
    }

    .neuro-app .neuro-discovery-reel__media {
        border-radius: 0;
        bottom: calc((100svh - var(--neuro-reel-media-height)) / 2);
        height: var(--neuro-reel-media-height);
        left: var(--neuro-reel-media-left);
        right: auto;
        top: auto;
        width: var(--neuro-reel-media-width);
    }

    .neuro-app .neuro-discovery-reel:not(.is-active) .neuro-discovery-reel__asset {
        opacity: 0.42;
    }

    .neuro-app .neuro-discovery-reel__shade {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.5) 100%);
        bottom: calc((100svh - var(--neuro-reel-media-height)) / 2);
        height: var(--neuro-reel-media-height);
        left: var(--neuro-reel-media-left);
        right: auto;
        top: auto;
        width: var(--neuro-reel-media-width);
    }

    .neuro-app .neuro-discovery-reel__rail {
        bottom: 3.2rem;
        left: calc((100vw + var(--neuro-reel-media-width)) / 2 + var(--neuro-reel-media-gap));
        right: auto;
    }

    .neuro-app .neuro-discovery-reel__caption {
        bottom: 1.55rem;
        left: clamp(7.2rem, 9vw, 11.6rem);
        max-width: 22rem;
        right: auto;
        width: clamp(12rem, calc((100vw - var(--neuro-reel-media-width)) / 2 - 8rem), 22rem);
    }

    .neuro-app .neuro-discovery-reel__progress {
        bottom: calc((100svh - var(--neuro-reel-media-height)) / 2);
        left: var(--neuro-reel-media-left);
        right: auto;
        width: var(--neuro-reel-media-width);
    }

    .neuro-app .neuro-discovery-viewer__side-nav {
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        left: 0;
        padding: 18px 12px;
        position: absolute;
        top: 0;
        width: 76px;
        z-index: 2003;
    }

    .neuro-app .neuro-discovery-viewer__nav-stack {
        display: grid;
        gap: 12px;
    }

    .neuro-app .neuro-discovery-viewer__nav-button {
        align-items: center;
        border-radius: 12px;
        color: rgba(255, 255, 255, 0.68);
        display: grid;
        height: 44px;
        justify-content: center;
        text-decoration: none;
        width: 44px;
    }

    .neuro-app .neuro-discovery-viewer__nav-button svg {
        height: 25px;
        width: 25px;
    }

    .neuro-app .neuro-discovery-viewer__nav-button:hover,
    .neuro-app .neuro-discovery-viewer__nav-button.is-active {
        background: rgba(255, 255, 255, 0.09);
        color: #fff;
    }

    .neuro-app .neuro-discovery-viewer__steps {
        display: grid;
        gap: 10px;
        position: absolute;
        right: 1.8rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2003;
    }

    .neuro-app .neuro-discovery-viewer__steps button {
        align-items: center;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 999px;
        color: #fff;
        cursor: pointer;
        display: grid;
        height: 44px;
        justify-content: center;
        width: 44px;
    }

    .neuro-app .neuro-discovery-viewer__steps svg {
        height: 24px;
        width: 24px;
    }
}

@media (max-width: 1199.98px) {
    .neuro-app .neuro-discovery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .neuro-app .neuro-discovery-card {
        aspect-ratio: 9 / 14.6;
    }

    .neuro-app .neuro-discovery-card__caption {
        right: 50px;
    }

    .neuro-app .neuro-discovery-card__actions {
        right: 8px;
    }

    .neuro-app .neuro-discovery-card__tool {
        height: 31px;
        min-height: 31px;
        min-width: 31px;
        width: 31px;
    }

    .neuro-app .neuro-discovery-card__tool svg {
        height: 17px;
        width: 17px;
    }

    .neuro-app .neuro-user-template-stat-tool {
        min-height: 34px;
        min-width: 34px;
        width: 34px;
    }

    .neuro-app .neuro-user-template-stat-tool span {
        font-size: 9px;
        max-width: 30px;
    }
}

@media (max-width: 767.98px) {
    .neuro-app [data-neuro-discovery-page] {
        margin: -0.75rem;
        min-height: calc(100svh - 64px);
        padding: 0 0 24px;
    }

    .neuro-app .neuro-discovery-toolbar {
        margin: 0 0 1px;
        padding: 0;
    }

    .neuro-app .neuro-discovery-topbar,
    .neuro-app .neuro-discovery-filter-form {
        display: none;
    }

    .neuro-app .neuro-discovery-toolbar__meta {
        background: #090d12;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 8px;
        margin: 0;
        max-width: none;
        padding: 9px 10px;
    }

    .neuro-app .neuro-discovery-toolbar__meta > span {
        font-size: 12px;
        font-weight: 700;
    }

    .neuro-app .neuro-discovery-toolbar__meta .btn-group .btn {
        font-size: 11px;
        min-height: 29px;
        padding: 5px 8px;
    }

    .neuro-app .neuro-discovery-grid {
        gap: 2px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .neuro-app .neuro-discovery-card {
        aspect-ratio: 9 / 15;
    }

    .neuro-app .neuro-discovery-card__open::after {
        height: 70%;
    }

    .neuro-app .neuro-discovery-card__chrome {
        left: 7px;
        right: 7px;
        top: 7px;
    }

    .neuro-app .neuro-discovery-card__chrome--bottom {
        right: 42px;
    }

    .neuro-app .neuro-discovery-card__stat {
        font-size: 12px;
        gap: 4px;
    }

    .neuro-app .neuro-discovery-card__stat svg,
    .neuro-app .neuro-discovery-card__kind svg {
        height: 16px;
        width: 16px;
    }

    .neuro-app .neuro-discovery-card__caption {
        bottom: 7px;
        gap: 4px;
        left: 7px;
        right: 42px;
    }

    .neuro-app .neuro-discovery-card__caption-author {
        gap: 5px;
    }

    .neuro-app .neuro-discovery-card__caption-avatar {
        font-size: 8px;
        height: 18px;
        width: 18px;
    }

    .neuro-app .neuro-discovery-card__caption-name {
        font-size: 10px;
    }

    .neuro-app .neuro-discovery-card__caption-text strong {
        font-size: 11px;
        line-height: 1.14;
        -webkit-line-clamp: 2;
    }

    .neuro-app .neuro-discovery-card__caption-text span {
        display: none;
    }

    .neuro-app .neuro-discovery-card__actions {
        bottom: 7px;
        gap: 6px;
        right: 6px;
    }

    .neuro-app .neuro-discovery-card__tool {
        background: rgba(3, 6, 10, 0.5);
        height: 28px;
        min-height: 28px;
        min-width: 28px;
        width: 28px;
    }

    .neuro-app .neuro-discovery-card__tool svg {
        height: 15px;
        width: 15px;
    }

    .neuro-app .neuro-user-template-toolbar__cta {
        align-items: stretch;
        border-bottom: 1px solid rgba(16, 24, 40, 0.1);
        flex-direction: column;
        padding: 14px 12px;
    }

    .neuro-app .neuro-user-template-toolbar__cta .btn {
        width: 100%;
    }

    .neuro-app .neuro-user-template-status-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .neuro-app .neuro-user-template-status-tabs::-webkit-scrollbar {
        display: none;
    }

    .neuro-app .neuro-user-template-stat-tool {
        min-height: 28px;
        min-width: 28px;
        padding: 3px 0;
        width: 28px;
    }

    .neuro-app .neuro-user-template-stat-tool span {
        font-size: 8px;
        max-width: 24px;
    }

    .neuro-app .neuro-user-template-archive-tool {
        display: none;
    }

    .neuro-app .neuro-discovery-viewer__close {
        height: 40px;
        right: max(10px, env(safe-area-inset-right));
        top: max(10px, env(safe-area-inset-top));
        width: 40px;
    }

    .neuro-app .neuro-discovery-reel__rail {
        bottom: calc(env(safe-area-inset-bottom) + 42px);
        gap: 9px;
        right: max(8px, env(safe-area-inset-right));
        width: 42px;
    }

    .neuro-app .neuro-discovery-reel__action,
    .neuro-app .neuro-discovery-reel__thumb {
        min-height: 40px;
        min-width: 40px;
    }

    .neuro-app .neuro-discovery-reel__action svg {
        height: 24px;
        width: 24px;
    }

    .neuro-app .neuro-discovery-reel__action span {
        font-size: 11px;
        line-height: 13px;
        min-width: 40px;
    }

    .neuro-app .neuro-discovery-reel__thumb {
        height: 34px;
        min-height: 34px;
        min-width: 34px;
        width: 34px;
    }

    .neuro-app .neuro-discovery-reel__caption {
        bottom: calc(env(safe-area-inset-bottom) + 48px);
        gap: 7px;
        left: max(14px, env(safe-area-inset-left));
        right: 62px;
    }

    .neuro-app .neuro-discovery-reel__avatar {
        height: 34px;
        width: 34px;
    }

    .neuro-app .neuro-discovery-reel__author {
        gap: 7px;
    }

    .neuro-app .neuro-discovery-reel__author .btn {
        min-height: 28px;
        padding: 4px 8px;
    }
}

[data-bs-theme="light"] .neuro-app [data-neuro-discovery-page] {
    background: #f6f8fb;
    color: #101828;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-toolbar {
    background: transparent;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar {
    background: #ffffff;
    border-bottom-color: rgba(16, 24, 40, 0.1);
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar__button {
    color: rgba(16, 24, 40, 0.58);
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-icon-cut {
    color: #ffffff;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar__button:hover,
[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar__button:focus-visible,
[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar__button.is-active {
    background: rgba(225, 29, 72, 0.06);
    color: #101828;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-topbar__button.is-active::after {
    background: #e11d48;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-toolbar__meta,
[data-bs-theme="light"] .neuro-app .neuro-discovery-filter-form__field {
    color: #475467;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-filter-form .form-select {
    background-color: #ffffff;
    border-color: rgba(16, 24, 40, 0.14);
    color: #101828;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-card,
[data-bs-theme="light"] .neuro-app .neuro-discovery-media {
    background: #e9edf3;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-empty-media {
    background: linear-gradient(135deg, #eef2f7, #dfe5ee);
    color: rgba(16, 24, 40, 0.42);
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-card__tool {
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(16, 24, 40, 0.16);
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.16);
    color: #101828;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-card__tool:hover,
[data-bs-theme="light"] .neuro-app .neuro-discovery-card__tool:focus-visible {
    background: #ffffff;
    border-color: rgba(225, 29, 72, 0.5);
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-card__tool.is-active {
    background: #ffffff;
    color: #e11d48;
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-card__caption-avatar {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .neuro-app .neuro-discovery-viewer__close {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(16, 24, 40, 0.16);
    color: #101828;
}

@media (min-width: 1024px) {
    [data-bs-theme="light"] .neuro-app .neuro-discovery-viewer {
        background: linear-gradient(90deg, #f7f9fc 0, #eef2f7 24%, #ffffff 50%, #eef2f7 76%, #f7f9fc 100%);
        color: #101828;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__media,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__fallback {
        background: #05080b;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-viewer__nav-button {
        color: rgba(16, 24, 40, 0.62);
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-viewer__nav-button:hover,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-viewer__nav-button.is-active {
        background: rgba(225, 29, 72, 0.08);
        color: #101828;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-viewer__steps button {
        background: rgba(255, 255, 255, 0.86);
        border-color: rgba(16, 24, 40, 0.14);
        box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
        color: #101828;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__caption,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__action,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__thumb {
        color: #101828;
        text-shadow: none;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__action svg {
        filter: none;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__action.is-active {
        color: #e11d48;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__name,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__text button,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__text strong {
        color: #101828;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__text span {
        color: #475467;
    }

    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__avatar span,
    [data-bs-theme="light"] .neuro-app .neuro-discovery-reel__thumb span {
        background: rgba(16, 24, 40, 0.08);
        color: #101828;
    }
}

@media (max-width: 767.98px) {
    [data-bs-theme="light"] .neuro-app .neuro-discovery-toolbar__meta {
        background: #ffffff;
        border-bottom-color: rgba(16, 24, 40, 0.1);
    }
}

.neuro-command-is-open {
    overflow: hidden;
}

.neuro-command-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 9vh 16px 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.neuro-command-overlay[hidden] {
    display: none;
}

.neuro-command-dialog {
    width: min(720px, 100%);
    overflow: hidden;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.neuro-command-head {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.neuro-command-head .input-group {
    min-width: 0;
}

.neuro-command-meta,
.neuro-command-hint {
    padding: 10px 16px;
    color: var(--bs-gray-500);
    font-size: 12px;
    font-weight: 700;
}

.neuro-command-results {
    display: grid;
    max-height: min(54vh, 520px);
    overflow: auto;
    gap: 8px;
    padding: 8px 16px 16px;
}

.neuro-command-result {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 10px;
    color: var(--bs-gray-700);
    text-align: left;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.neuro-command-result:hover,
.neuro-command-result:focus {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-command-result-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.neuro-command-result-main strong,
.neuro-command-result-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-command-result-main strong {
    color: var(--bs-gray-900);
}

.neuro-command-result-main small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-command-empty {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-500);
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-page {
    width: 100%;
}

.neuro-app .neuro-studio-card {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-studio-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-studio-mode {
    display: flex;
    min-width: 0;
    min-height: 84px;
    align-items: center;
    gap: 12px;
    padding: 14px;
    color: var(--bs-gray-700);
    text-align: left;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.neuro-app .neuro-studio-mode:hover,
.neuro-app .neuro-studio-mode:focus-visible,
.neuro-app .neuro-studio-mode.active {
    color: var(--bs-primary);
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-studio-mode:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.neuro-app .neuro-studio-mode span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.neuro-app .neuro-studio-mode strong,
.neuro-app .neuro-studio-mode small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-studio-mode strong {
    color: var(--bs-gray-900);
    font-weight: 700;
    white-space: nowrap;
}

.neuro-app .neuro-studio-mode small {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-studio-prompt {
    min-height: 170px;
    resize: vertical;
}

.neuro-app .neuro-studio-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.neuro-app .neuro-studio-examples .btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neuro-app .neuro-studio-attachments {
    padding: 14px;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-attachment-list {
    display: grid;
    gap: 8px;
}

.neuro-app .neuro-studio-attachment,
.neuro-app .neuro-studio-attachment-empty {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--bs-gray-700);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-attachment.is-pending {
    border-color: var(--bs-warning);
}

.neuro-app .neuro-studio-attachment > span {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
}

.neuro-app .neuro-studio-attachment strong,
.neuro-app .neuro-studio-attachment small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-studio-attachment strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-studio-attachment small,
.neuro-app .neuro-studio-attachment-empty {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-studio-result-empty {
    display: flex;
    min-height: 360px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--bs-gray-600);
    text-align: center;
}

.neuro-app .neuro-studio-result-empty strong {
    color: var(--bs-gray-900);
    font-size: 18px;
}

.neuro-app .neuro-studio-result-empty p {
    max-width: 300px;
    margin: 0;
}

.neuro-app .neuro-studio-result-pending {
    display: flex;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--bs-gray-600);
    text-align: center;
    background: var(--bs-gray-100);
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-media-result {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: contain;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-text-result {
    overflow: auto;
    max-height: 440px;
    margin: 0;
    padding: 14px;
    color: var(--bs-gray-800);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-result-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.neuro-app .neuro-studio-result-meta > div {
    min-width: 0;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-studio-result-meta dt,
.neuro-app .neuro-studio-result-meta dd {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.neuro-app .neuro-studio-result-meta dt {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.neuro-app .neuro-studio-result-meta dd {
    color: var(--bs-gray-900);
    font-size: 13px;
    font-weight: 700;
}

.neuro-app .neuro-studio-aspect-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.neuro-app .neuro-studio-aspect {
    align-items: center;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    color: var(--bs-gray-700);
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-end;
    min-width: 62px;
    min-height: 64px;
    padding: 8px 12px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.neuro-app .neuro-studio-aspect:hover,
.neuro-app .neuro-studio-aspect:focus-visible,
.neuro-app .neuro-studio-aspect.active {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.neuro-app .neuro-studio-aspect-glyph {
    background: currentColor;
    border-radius: 3px;
    display: block;
    opacity: .5;
}

.neuro-app .neuro-studio-aspect > span:last-child {
    font-size: 12px;
    font-weight: 600;
}

.neuro-app .neuro-studio-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.neuro-app .neuro-studio-gallery {
    margin-top: 22px;
}

.neuro-app .neuro-studio-gallery-title {
    color: var(--bs-gray-500);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.neuro-app .neuro-studio-gallery-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.neuro-app .neuro-studio-gallery-item {
    align-items: center;
    background: var(--bs-gray-100);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--bs-gray-500);
    display: flex;
    flex: 0 0 auto;
    height: 56px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 56px;
}

.neuro-app .neuro-studio-gallery-item img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.neuro-app .neuro-studio-gallery-item.active {
    border-color: var(--bs-primary);
}

.neuro-app .neuro-studio-gallery-badge {
    background: var(--bs-gray-400);
    border-radius: 999px;
    bottom: 4px;
    box-shadow: 0 0 0 2px var(--bs-body-bg);
    height: 8px;
    position: absolute;
    right: 4px;
    width: 8px;
}

.neuro-app .neuro-studio-gallery-item.status-success .neuro-studio-gallery-badge,
.neuro-app .neuro-studio-gallery-item.status-partial-success .neuro-studio-gallery-badge {
    background: var(--bs-success);
}

.neuro-app .neuro-studio-gallery-item.status-processing .neuro-studio-gallery-badge,
.neuro-app .neuro-studio-gallery-item.status-queued .neuro-studio-gallery-badge {
    background: var(--bs-warning);
}

.neuro-app .neuro-studio-gallery-item.status-failed .neuro-studio-gallery-badge,
.neuro-app .neuro-studio-gallery-item.status-cancelled .neuro-studio-gallery-badge {
    background: var(--bs-danger);
}

.neuro-app .neuro-cover-page {
    width: 100%;
}

.neuro-app .neuro-cover-hero {
    border-top: 3px solid var(--bs-primary);
}

.neuro-app .neuro-cover-toolbar,
.neuro-app .neuro-cover-list-card,
.neuro-app .neuro-cover-current,
.neuro-app .neuro-cover-generator {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-cover-list {
    display: grid;
    max-height: 720px;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.neuro-app .neuro-cover-template button {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    color: var(--bs-gray-700);
    text-align: left;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.neuro-app .neuro-cover-template button:hover,
.neuro-app .neuro-cover-template button:focus-visible,
.neuro-app .neuro-cover-template.active button {
    background: var(--bs-primary-light);
    border-color: var(--bs-primary);
}

.neuro-app .neuro-cover-template-thumb,
.neuro-app .neuro-cover-current-media,
.neuro-app .neuro-cover-variant-media,
.neuro-app .neuro-cover-reference-thumb {
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-500);
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-template-thumb {
    width: 82px;
    aspect-ratio: 3 / 4;
}

.neuro-app .neuro-cover-template-thumb img,
.neuro-app .neuro-cover-current-media img,
.neuro-app .neuro-cover-variant-media img,
.neuro-app .neuro-cover-reference-thumb img,
.neuro-app .neuro-cover-history-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neuro-app .neuro-cover-template-body {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 4px;
}

.neuro-app .neuro-cover-template-body strong,
.neuro-app .neuro-cover-template-body small,
.neuro-app .neuro-cover-template-body em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-cover-template-body strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-cover-template-body small,
.neuro-app .neuro-cover-template-body em {
    color: var(--bs-gray-500);
    font-size: 11px;
}

.neuro-app .neuro-cover-badges {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 5px;
}

.neuro-app .neuro-cover-current-grid {
    display: grid;
    grid-template-columns: minmax(180px, 380px) minmax(0, 1fr);
    gap: 20px;
}

.neuro-app .neuro-cover-current-media {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.neuro-app .neuro-cover-summary,
.neuro-app .neuro-studio-result-meta {
    margin: 0;
}

.neuro-app .neuro-cover-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.neuro-app .neuro-cover-summary > div {
    min-width: 0;
    padding: 10px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-summary dt,
.neuro-app .neuro-cover-summary dd {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.neuro-app .neuro-cover-summary dt {
    color: var(--bs-gray-500);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.neuro-app .neuro-cover-summary dd {
    color: var(--bs-gray-900);
    font-size: 13px;
    font-weight: 700;
}

.neuro-app .neuro-cover-section {
    margin-bottom: 22px;
}

.neuro-app .neuro-cover-reference-list {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-cover-reference {
    display: grid;
    min-width: 0;
    grid-template-columns: 72px minmax(0, 1fr) minmax(140px, 190px) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-reference.active {
    border-color: var(--bs-primary);
}

.neuro-app .neuro-cover-reference.is-uploaded {
    grid-template-columns: 72px minmax(0, 1fr) auto auto;
}

.neuro-app .neuro-cover-reference-thumb {
    width: 72px;
    aspect-ratio: 1 / 1;
    padding: 0;
}

.neuro-app .neuro-cover-reference strong,
.neuro-app .neuro-cover-reference small,
.neuro-app .neuro-cover-history-item strong,
.neuro-app .neuro-cover-history-item small,
.neuro-app .neuro-cover-history-item span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-cover-reference strong,
.neuro-app .neuro-cover-history-item strong {
    color: var(--bs-gray-900);
    font-size: 13px;
}

.neuro-app .neuro-cover-reference small,
.neuro-app .neuro-cover-history-item small,
.neuro-app .neuro-cover-history-item span {
    color: var(--bs-gray-500);
    font-size: 12px;
}

.neuro-app .neuro-cover-progress {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--bs-gray-700);
    background: var(--bs-primary-light);
    border: 1px dashed var(--bs-primary);
    border-radius: 8px;
}

.neuro-app .neuro-cover-progress strong,
.neuro-app .neuro-cover-progress span {
    display: block;
}

.neuro-app .neuro-cover-variant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.neuro-app .neuro-cover-variant {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-variant.is-current {
    border-color: var(--bs-success);
}

.neuro-app .neuro-cover-variant-media {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-width: 0 0 1px;
    border-radius: 0;
}

.neuro-app .neuro-cover-history {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-cover-history-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-history-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.neuro-app .neuro-cover-history-media button,
.neuro-app .neuro-cover-history-media span {
    display: flex;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-500);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.neuro-app .neuro-cover-image-modal img {
    display: block;
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-cover-image-modal figcaption {
    padding: 12px 16px;
    color: var(--bs-gray-600);
    font-size: 13px;
}

.neuro-app .neuro-creator-page {
    display: block;
}

.neuro-app .neuro-creator-hero {
    border-top: 3px solid var(--bs-primary);
}

.neuro-app .neuro-creator-metrics,
.neuro-app .neuro-creator-promo-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.neuro-app .neuro-creator-metric {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-creator-metric > div {
    min-width: 0;
}

.neuro-app .neuro-creator-metric strong,
.neuro-app .neuro-creator-metric small {
    overflow-wrap: anywhere;
}

.neuro-app .neuro-creator-copy-grid .form-control {
    min-width: 0;
}

.neuro-app .neuro-creator-rules {
    padding: 14px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-creator-onboarding .card-header {
    gap: 18px;
}

.neuro-app .neuro-creator-score {
    min-width: 128px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--bs-light-primary);
    text-align: right;
}

.neuro-app .neuro-creator-score strong {
    display: block;
    color: var(--bs-primary);
    font-size: 1.75rem;
    line-height: 1;
}

.neuro-app .neuro-creator-score span {
    display: block;
    margin-top: 4px;
    color: var(--bs-gray-700);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.neuro-app .neuro-creator-checklist,
.neuro-app .neuro-creator-list {
    display: grid;
    gap: 10px;
}

.neuro-app .neuro-creator-check-item,
.neuro-app .neuro-creator-list-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-creator-list-row {
    grid-template-columns: auto minmax(0, 1fr);
}

.neuro-app .neuro-creator-check-item.is-complete {
    border-color: rgba(var(--bs-success-rgb), 0.35);
    background: rgba(var(--bs-success-rgb), 0.06);
}

.neuro-app .neuro-creator-checkmark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bs-gray-100);
    color: var(--bs-success);
}

.neuro-app .neuro-creator-profile-preview {
    min-height: 100%;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-creator-preview-cover {
    height: 82px;
    background:
        linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.24), rgba(var(--bs-success-rgb), 0.18)),
        var(--bs-gray-100);
}

.neuro-app .neuro-creator-preview-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.neuro-app .neuro-creator-avatar {
    margin-top: -35px;
}

.neuro-app .neuro-creator-promo-code {
    display: grid;
    gap: 6px;
    min-height: 100%;
    padding: 18px;
    border-radius: 8px;
    background: var(--bs-light-primary);
}

.neuro-app .neuro-creator-promo-code span,
.neuro-app .neuro-creator-promo-code small {
    color: var(--bs-gray-700);
}

.neuro-app .neuro-creator-promo-code strong {
    color: var(--bs-primary);
    font-size: 2rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.neuro-app .neuro-creator-advanced-card .card-header {
    gap: 16px;
}

.neuro-app .neuro-creator-section {
    min-height: 100%;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-creator-section .neuro-creator-list-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.neuro-app .neuro-creator-trend {
    display: flex;
    min-height: 132px;
    align-items: end;
    gap: 6px;
    overflow-x: auto;
    padding: 12px 8px 4px;
    border-radius: 8px;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-creator-trend span {
    position: relative;
    display: inline-flex;
    width: 18px;
    min-width: 18px;
    justify-content: center;
    border-radius: 5px 5px 0 0;
    background: var(--bs-primary);
}

.neuro-app .neuro-creator-trend small {
    position: absolute;
    bottom: -22px;
    color: var(--bs-gray-600);
    font-size: 10px;
    line-height: 1;
    transform: rotate(-35deg);
    transform-origin: center;
    white-space: nowrap;
}

.neuro-app .neuro-creator-funnel {
    display: grid;
    gap: 12px;
}

.neuro-app .neuro-creator-funnel article {
    display: grid;
    gap: 8px;
}

.neuro-app .neuro-creator-funnel article > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.neuro-app .neuro-creator-funnel span {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bs-gray-200);
}

.neuro-app .neuro-creator-funnel i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bs-success);
}

.neuro-app .neuro-prompt-offers {
    display: grid;
    gap: 12px;
}

.neuro-app .neuro-prompt-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.35fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-prompt-offer-form {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr) minmax(0, 1.1fr) auto;
    gap: 10px;
    align-items: start;
}

.neuro-app .neuro-kit-form {
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-gray-100);
}

.neuro-app .neuro-kit-selected {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-kit-selected small {
    color: var(--bs-gray-600);
    overflow-wrap: anywhere;
}

.neuro-app .neuro-kit-options {
    display: grid;
    gap: 10px;
    max-height: 330px;
    overflow: auto;
}

.neuro-app .neuro-kit-option {
    display: grid;
    grid-template-columns: auto 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    cursor: pointer;
}

.neuro-app .neuro-kit-option span {
    width: 54px;
    height: 40px;
    border-radius: 6px;
    background-color: var(--bs-gray-200);
    background-position: center;
    background-size: cover;
}

.neuro-app .neuro-kit-option em {
    min-width: 0;
    font-style: normal;
}

.neuro-app .neuro-kit-option strong,
.neuro-app .neuro-kit-option small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-app .neuro-kit-option small {
    color: var(--bs-gray-600);
}

.neuro-app .neuro-kit-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.neuro-app .neuro-kit-card-media {
    aspect-ratio: 1.4 / 1;
    border-radius: 8px;
    background-position: center;
    background-size: cover;
}

.neuro-app .neuro-empty-compact {
    padding: 16px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
    color: var(--bs-gray-600);
    background: var(--bs-gray-100);
}

.neuro-app .neuro-creator-empty {
    min-height: 220px;
}

[data-bs-theme="dark"] .neuro-app {
    background: #111827;
}

[data-bs-theme="dark"] .neuro-app .neuro-aside,
[data-bs-theme="dark"] .neuro-app .header,
[data-bs-theme="dark"] .neuro-bottom-nav,
[data-bs-theme="dark"] .neuro-mobile-quick-nav,
[data-bs-theme="dark"] .neuro-app .neuro-dashboard-rec-card {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .neuro-app .neuro-block-overlay {
    background: rgba(17, 24, 39, 0.72);
}

[data-bs-theme="dark"] .neuro-app .neuro-sidebar {
    --bs-sidebar-bg-color: #1e1e2d;
}

[data-bs-theme="dark"] .neuro-app .neuro-skeleton-block {
    background: rgba(17, 24, 39, 0.9);
}

[data-bs-theme="dark"] .neuro-command-overlay {
    background: rgba(3, 7, 18, 0.62);
}

/* 6. skeleton styles */
.neuro-app {
    --neuro-skeleton-base: #e9edf5;
    --neuro-skeleton-muted: #f2f4f8;
    --neuro-skeleton-shine: rgba(255, 255, 255, 0.74);
}

.neuro-app .neuro-loading-spinner {
    min-height: 96px;
}

.neuro-app .neuro-skeleton-page {
    width: 100%;
}

.neuro-app .neuro-skeleton-card,
.neuro-app .neuro-skeleton-avatar,
.neuro-app .neuro-skeleton-button,
.neuro-app .neuro-skeleton-chip,
.neuro-app .neuro-skeleton-control,
.neuro-app .neuro-skeleton-detail-media,
.neuro-app .neuro-skeleton-icon,
.neuro-app .neuro-skeleton-image,
.neuro-app .neuro-skeleton-line,
.neuro-app .neuro-skeleton-row,
.neuro-app .neuro-skeleton-table {
    position: relative;
    overflow: hidden;
    display: block;
    background: var(--neuro-skeleton-base);
    border-radius: 8px;
}

.neuro-app .neuro-skeleton-shell {
    border: 1px solid var(--bs-border-color);
    box-shadow: none;
}

.neuro-app .neuro-skeleton-card {
    min-height: 110px;
}

.neuro-app .neuro-skeleton-avatar {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
}

.neuro-app .neuro-skeleton-button {
    width: 88px;
    height: 34px;
    border-radius: 6px;
}

.neuro-app .neuro-skeleton-button-sm {
    width: 56px;
    height: 28px;
}

.neuro-app .neuro-skeleton-button-lg {
    width: 140px;
    height: 42px;
}

.neuro-app .neuro-skeleton-chip {
    width: 72px;
    height: 22px;
    border-radius: 999px;
}

.neuro-app .neuro-skeleton-control {
    width: 150px;
    height: 42px;
    border-radius: 6px;
}

.neuro-app .neuro-skeleton-control-lg {
    width: min(420px, 100%);
}

.neuro-app .neuro-skeleton-control-fluid {
    width: 100%;
}

.neuro-app .neuro-skeleton-detail-media {
    min-height: 360px;
}

.neuro-app .neuro-skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.neuro-app .neuro-skeleton-image {
    aspect-ratio: 16 / 10;
    width: 100%;
}

.neuro-app .neuro-skeleton-line {
    display: block;
    height: 14px;
    margin-bottom: 12px;
}

.neuro-app .neuro-skeleton-line.mb-0 {
    margin-bottom: 0 !important;
}

.neuro-app .neuro-skeleton-line.w-15 {
    width: 15% !important;
}

.neuro-app .neuro-skeleton-line.w-35 {
    width: 35% !important;
}

.neuro-app .neuro-skeleton-line.w-40 {
    width: 40% !important;
}

.neuro-app .neuro-skeleton-line.w-45 {
    width: 45% !important;
}

.neuro-app .neuro-skeleton-line.w-60 {
    width: 60% !important;
}

.neuro-app .neuro-skeleton-line.w-85 {
    width: 85% !important;
}

.neuro-app .neuro-skeleton-line.w-125px {
    width: 125px !important;
    max-width: 100%;
}

.neuro-app .neuro-skeleton-line.w-200px {
    width: 200px !important;
    max-width: 100%;
}

.neuro-app .neuro-skeleton-chip.w-15 {
    width: 15% !important;
    min-width: 32px;
}

.neuro-app .neuro-skeleton-list-row,
.neuro-app .neuro-skeleton-table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

.neuro-app .neuro-skeleton-list-row:last-child,
.neuro-app .neuro-skeleton-table-row:last-child {
    border-bottom: 0;
}

.neuro-app .neuro-skeleton-table-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.7fr 0.4fr;
    gap: 18px;
}

.neuro-app .neuro-skeleton-table-head span,
.neuro-app .neuro-skeleton-row {
    position: relative;
    overflow: hidden;
    display: block;
    height: 12px;
    background: var(--neuro-skeleton-muted);
    border-radius: 999px;
}

.neuro-app .neuro-skeleton-table {
    min-height: 140px;
}

.neuro-app .neuro-skeleton-card::after,
.neuro-app .neuro-skeleton-avatar::after,
.neuro-app .neuro-skeleton-button::after,
.neuro-app .neuro-skeleton-chip::after,
.neuro-app .neuro-skeleton-control::after,
.neuro-app .neuro-skeleton-detail-media::after,
.neuro-app .neuro-skeleton-icon::after,
.neuro-app .neuro-skeleton-image::after,
.neuro-app .neuro-skeleton-line::after,
.neuro-app .neuro-skeleton-row::after,
.neuro-app .neuro-skeleton-table-head span::after,
.neuro-app .neuro-skeleton-table::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, transparent, var(--neuro-skeleton-shine), transparent);
    transform: translateX(-100%);
    animation: neuro-skeleton-wave 1.4s ease-in-out infinite;
}

.neuro-app .neuro-skeleton-block {
    display: grid;
    width: min(320px, calc(100% - 32px));
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.neuro-app .neuro-skeleton-block-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.neuro-app .neuro-skeleton-block-cards .neuro-skeleton-card {
    min-height: 74px;
}

.neuro-app .neuro-skeleton-block-detail,
.neuro-app .neuro-skeleton-block-compact {
    display: flex;
    align-items: center;
    gap: 14px;
}

.neuro-app .neuro-skeleton-block-table .neuro-skeleton-row {
    width: 100%;
}

@keyframes neuro-skeleton-wave {
    100% {
        transform: translateX(100%);
    }
}

/* 7. responsive fixes */
@media (max-width: 991.98px) {
    .neuro-app .neuro-aside {
        width: 280px;
        min-width: 280px;
    }

    .neuro-app .content {
        padding-top: 20px;
        padding-bottom: calc(var(--neuro-bottom-nav-height) + 24px);
    }

    .neuro-app .card-header {
        gap: 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .neuro-app .neuro-route-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .neuro-app .neuro-route-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .neuro-app .neuro-route-actions .btn {
        flex: 1 1 0;
    }

    .neuro-app .neuro-dashboard-rec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .neuro-app .neuro-template-facts,
    .neuro-app .neuro-generation-result-grid,
    .neuro-app .neuro-template-quality-list {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-crud-list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .neuro-app .neuro-crud-list-row > .d-flex {
        width: 100%;
        justify-content: flex-start !important;
    }

    .neuro-app .neuro-generation-detail-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .neuro-app .neuro-generation-pipeline-stage__head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-credits-metrics {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-credit-history-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .neuro-app .neuro-credit-history-side {
        width: 100%;
        min-width: 0;
        align-items: flex-start;
        text-align: left;
    }

    .neuro-app .neuro-credit-history-side small {
        max-width: 100%;
    }

    .neuro-app .neuro-rewards-row,
    .neuro-app .neuro-rewards-history-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .neuro-app .neuro-rewards-pills {
        width: 100%;
    }

    .neuro-app .neuro-template-preview-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .neuro-app .neuro-cover-list {
        display: flex;
        max-height: none;
        overflow-x: auto;
        padding: 0 0 6px;
        scroll-snap-type: x proximity;
    }

    .neuro-app .neuro-cover-template {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }

    .neuro-app .neuro-cover-current-grid,
    .neuro-app .neuro-cover-history-item {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-cover-reference,
    .neuro-app .neuro-cover-reference.is-uploaded {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .neuro-app .neuro-cover-reference .form-select,
    .neuro-app .neuro-cover-reference .badge,
    .neuro-app .neuro-cover-reference .btn {
        grid-column: 2;
        justify-self: flex-start;
    }

    .neuro-app .neuro-course-media-grid {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-prompt-offer,
    .neuro-app .neuro-prompt-offer-form {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-user-template-cover-editor {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-kit-card {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-toast-host {
        top: 76px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .neuro-app .header {
        min-height: 64px;
    }

    .neuro-app .neuro-credit-pill {
        max-width: 120px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .neuro-app .neuro-credit-pill .badge {
        max-width: 76px;
    }

    .neuro-app .neuro-dashboard-row,
    .neuro-app .neuro-dashboard-check-item,
    .neuro-app .neuro-dashboard-persona,
    .neuro-app .neuro-rewards-compact {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .neuro-app .neuro-dashboard-row .btn,
    .neuro-app .neuro-dashboard-check-item .btn,
    .neuro-app .neuro-dashboard-persona .btn,
    .neuro-app .neuro-rewards-compact .btn,
    .neuro-app .neuro-rewards-row .btn {
        width: 100%;
    }

    .neuro-app .neuro-dashboard-action-grid,
    .neuro-app .neuro-dashboard-chart-bars,
    .neuro-app .neuro-dashboard-rec-grid,
    .neuro-app .neuro-rewards-cosmetics,
    .neuro-app .neuro-studio-mode-tabs {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-inline-edit-grid {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-discovery-metrics,
    .neuro-app .neuro-remix-panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .neuro-app .neuro-remix-panel {
        flex-direction: column;
    }

    .neuro-app .neuro-remix-panel-media {
        flex-basis: auto;
        width: 100%;
    }

    .neuro-app .neuro-account-inline-form,
    .neuro-app .neuro-account-summary-row,
    .neuro-app .neuro-account-list-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .neuro-app .neuro-template-card-meta,
    .neuro-app .neuro-generation-detail-grid,
    .neuro-app .neuro-generation-detail-metrics,
    .neuro-app .neuro-generation-pipeline-assets,
    .neuro-app .neuro-studio-result-meta,
    .neuro-app .neuro-template-preview-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .neuro-app .neuro-creator-metrics,
    .neuro-app .neuro-creator-promo-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .neuro-app .neuro-cover-summary,
    .neuro-app .neuro-cover-variant-grid {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-creator-section .neuro-creator-list-row {
        grid-template-columns: 1fr;
    }

    .neuro-app .neuro-creator-section .neuro-creator-list-row .btn {
        width: 100%;
    }

    .neuro-app .neuro-creator-check-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .neuro-app .neuro-creator-check-item .badge,
    .neuro-app .neuro-creator-check-item .btn {
        grid-column: 2;
        justify-self: flex-start;
    }

    .neuro-app .neuro-template-detail-cover {
        min-height: 220px;
    }

    .neuro-app .neuro-course-media-slot,
    .neuro-app .neuro-course-analytics span {
        align-items: flex-start;
        flex-direction: column;
    }

    .neuro-app .neuro-course-media-slot .btn {
        width: 100%;
    }

    .neuro-app .neuro-course-media-slot > .d-flex {
        width: 100%;
    }

    .neuro-app .neuro-course-analytics small {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .neuro-app *,
    .neuro-bottom-nav * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
body.ai-media-library-open {
    overflow: hidden;
}

.ai-media-upload-slot {
    align-items: center;
    background: #171719;
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: 20px;
    color: #f5f5f7;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    min-height: 168px;
    padding: 22px;
    text-align: center;
    width: 100%;
}

.ai-media-upload-slot:hover,
.ai-media-upload-slot:focus-visible {
    background: #202023;
    border-color: rgba(255, 255, 255, .22);
}

.ai-media-upload-slot small,
.ai-media-upload-card small {
    color: #9b9ba3;
    font-size: 14px;
}

.ai-media-upload-icons {
    display: flex;
    height: 58px;
    justify-content: center;
    position: relative;
    width: 128px;
}

.ai-media-upload-icons i {
    align-items: center;
    background: #242428;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    position: absolute;
    top: 0;
    width: 52px;
}

.ai-media-upload-icons i:nth-child(1) {
    left: 8px;
}

.ai-media-upload-icons i:nth-child(2) {
    left: 38px;
    top: 0px;
}

.ai-media-upload-icons i:nth-child(3) {
    right: 8px;
}

.ai-media-library-overlay {
    inset: 0;
    position: fixed;
    z-index: 1080;
}

.ai-media-library-backdrop {
    background: rgba(6, 6, 8, .64);
    inset: 0;
    position: absolute;
}

.ai-media-library-dialog {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 26px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
    color: #f5f5f7;
    display: flex;
    flex-direction: column;
    left: 50%;
    max-height: 82vh;
    max-width: 920px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(920px, calc(100vw - 32px));
}

.ai-media-library-head,
.ai-media-library-footer {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 18px;
}

.ai-media-library-rail {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-media-library-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-media-library-tabs button {
    background: #1c1c20;
    border: 0;
    border-radius: 999px;
    color: #d7d7dc;
    font-size: 13px;
    font-weight: 700;
    min-height: 36px;
    padding: 0 14px;
}

.ai-media-library-tabs button.is-active {
    background: #fff;
    color: #111113;
}

.ai-media-library-body {
    overflow: auto;
    padding: 0 18px 18px;
}

.ai-media-library-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.ai-media-upload-card,
.ai-media-card {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.ai-media-upload-card {
    align-items: center;
    background: #1a1a1d;
    border: 1px dashed rgba(255, 255, 255, .18);
    color: #f5f5f7;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding: 14px;
    text-align: center;
}

.ai-media-card {
    background: #1a1a1d;
}

.ai-media-card-main {
    background: transparent;
    border: 0;
    display: block;
    height: 100%;
    padding: 0;
    width: 100%;
}

.ai-media-card-main img,
.ai-selected-media-thumb img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.ai-media-card-file {
    align-items: center;
    color: #f5f5f7;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    justify-content: center;
}

.ai-media-card-gradient {
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent 68%);
    bottom: 0;
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    inset-inline: 0;
    opacity: 0;
    padding: 12px;
    position: absolute;
    top: 0;
    transition: opacity .16s ease;
}

.ai-media-card:hover .ai-media-card-gradient,
.ai-media-card:focus-within .ai-media-card-gradient {
    opacity: 1;
}

.ai-media-card.is-not-eligible {
    filter: grayscale(.6);
    opacity: .58;
}

.ai-media-card.is-selected {
    outline: 3px solid #88b04b;
    outline-offset: -3px;
}

.ai-media-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    transition: opacity .16s ease;
}

.ai-media-card:hover .ai-media-card-actions,
.ai-media-card:focus-within .ai-media-card-actions {
    opacity: 1;
}

.ai-media-card-actions [data-ai-media-like].is-active {
    background: #e3506a;
    color: #fff;
}

.ai-media-card-actions [data-ai-media-like].is-active i {
    color: #fff;
}

.ai-media-kind-badge,
.ai-media-selected-badge {
    align-items: center;
    background: rgba(0, 0, 0, .68);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    left: 8px;
    position: absolute;
    top: 8px;
    width: 28px;
}

.ai-media-selected-badge {
    background: #88b04b;
    left: auto;
    right: 8px;
}

.ai-media-card-title {
    bottom: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    left: 10px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-selected-media-rail {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
}

.ai-selected-media-thumb,
.ai-selected-media-add {
    border-radius: 12px;
    flex: 0 0 68px;
    height: 68px;
    overflow: hidden;
    position: relative;
    width: 68px;
}

.ai-selected-media-thumb {
    background: #202023;
}

.ai-selected-media-thumb button {
    background: rgba(0, 0, 0, .72);
    border: 0;
    border-radius: 999px;
    color: #fff;
    height: 22px;
    line-height: 20px;
    opacity: 0;
    position: absolute;
    right: 5px;
    top: 5px;
    width: 22px;
}

.ai-selected-media-thumb:hover button,
.ai-selected-media-thumb:focus-within button {
    opacity: 1;
}

.ai-selected-media-add {
    align-items: center;
    background: #242428;
    border: 1px dashed rgba(255, 255, 255, .22);
    color: #fff;
    display: inline-flex;
    font-size: 28px;
    justify-content: center;
}

.ai-media-library-loading {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #1a1a1d, #26262a, #1a1a1d);
    background-size: 220% 100%;
    border-radius: 14px;
    animation: ai-media-loading 1.1s infinite linear;
}

.ai-media-empty {
    align-items: center;
    color: #a7a7ae;
    display: flex;
    min-height: 140px;
}

.ai-prompt-token-editor-shell {
    position: relative;
}

.ai-prompt-token-editor {
    background: var(--bs-gray-100, #f5f6f8);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--bs-gray-800, #252f4a);
    min-height: 148px;
    outline: 0;
    padding: 14px 16px;
    white-space: pre-wrap;
}

.ai-prompt-token-editor:focus {
    border-color: #88b04b;
    box-shadow: 0 0 0 .2rem rgba(136, 176, 75, .14);
}

.ai-prompt-token-editor:empty::before {
    color: var(--bs-gray-500, #99a1b7);
    content: attr(data-placeholder);
}

.ai-prompt-token-chip {
    align-items: center;
    background: #303033;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    height: 28px;
    margin: 0 2px;
    max-width: min(260px, 100%);
    padding: 2px 7px 2px 3px;
    position: relative;
    vertical-align: middle;
}

.ai-prompt-token-chip:hover,
.ai-prompt-token-chip:focus-within {
    border-color: #88b04b;
}

.ai-prompt-token-chip > img {
    border-radius: 6px;
    height: 22px;
    object-fit: cover;
    width: 22px;
}

.ai-prompt-token-chip > i {
    font-size: 13px;
}

.ai-prompt-token-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-prompt-token-chip.is-variable {
    background: #eef6e2;
    border-color: #88b04b;
    color: #3c4d22;
    padding-left: 7px;
}

.ai-prompt-token-chip.is-variable > i {
    color: #6f9a34;
}

.ai-prompt-token-chip.is-variable > button {
    background: rgba(0, 0, 0, .12);
    color: #3c4d22;
}

.ai-prompt-token-chip > button {
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: none;
    height: 18px;
    line-height: 16px;
    padding: 0;
    width: 18px;
}

.ai-prompt-token-chip:hover > button,
.ai-prompt-token-chip:focus-within > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-prompt-token-popover {
      background: #111113;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    bottom: calc(100% + 10px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
    color: #fff;
    display: none;
    gap: 10px;
    left: 0;
    padding: 10px;
    position: absolute;
    z-index: 97;
}

.ai-prompt-token-popover img {
    object-fit: contain;
    width: 100%;
}

.ai-prompt-token-popover button {
    background: #88b04b;
    border: 0;
    border-radius: 8px;
    color: #10120d;
    font-size: 12px;
    font-weight: 800;
    min-height: 32px;
}

.ai-prompt-token-chip:hover .ai-prompt-token-popover,
.ai-prompt-token-chip:focus-within .ai-prompt-token-popover {
    display: grid;
}

.ai-prompt-token-menu {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
    display: grid;
    gap: 6px;
    left: 12px;
    max-width: min(320px, calc(100vw - 48px));
    padding: 8px;
    position: absolute;
    top: 44px;
    z-index: 12;
}

.ai-prompt-token-menu[hidden] {
    display: none;
}

.ai-prompt-token-menu__search {
    align-items: center;
    background: #1d1d20;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #99a1b7;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
}

.ai-prompt-token-menu__search input {
    background: transparent;
    border: 0;
    color: #f5f5f7;
    flex: 1 1 auto;
    font-size: 13px;
    outline: 0;
}

.ai-prompt-token-menu__scroll {
    display: grid;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
}

.ai-prompt-token-menu__section {
    display: grid;
    gap: 2px;
}

.ai-prompt-token-menu__title {
    color: #7e8299;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 8px 8px 2px;
    text-transform: uppercase;
}

.ai-prompt-token-menu__item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #f5f5f7;
    display: grid;
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    min-height: 42px;
    padding: 5px 8px;
    text-align: left;
    width: 100%;
}

.ai-prompt-token-menu__item:hover,
.ai-prompt-token-menu__item:focus-visible {
    background: #222226;
}

.ai-prompt-token-menu__item > img {
    border-radius: 8px;
    height: 34px;
    object-fit: cover;
    width: 34px;
}

.ai-prompt-token-menu__icon {
    align-items: center;
    background: rgba(136, 176, 75, .16);
    border-radius: 8px;
    color: #aacb76;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.ai-prompt-token-menu__label {
    display: grid;
    min-width: 0;
}

.ai-prompt-token-menu__label strong {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-prompt-token-menu__label small {
    color: #7e8299;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Variable (text_value) items reveal the full prompt they insert on hover/focus,
   the same way media items show their picture. */
.ai-prompt-token-menu__hint {
    display: none;
}

.ai-prompt-token-menu__item.is-variable:hover .ai-prompt-token-menu__label small,
.ai-prompt-token-menu__item.is-variable:focus-visible .ai-prompt-token-menu__label small,
.ai-prompt-token-menu__item.is-variable:focus-within .ai-prompt-token-menu__label small {
    background: rgba(136, 176, 75, .12);
    border-radius: 6px;
    color: #c9d6b0;
    display: block;
    margin-top: 3px;
    overflow: visible;
    padding: 5px 7px;
    white-space: normal;
}

.ai-prompt-token-menu__item.is-variable:hover .ai-prompt-token-menu__hint,
.ai-prompt-token-menu__item.is-variable:focus-visible .ai-prompt-token-menu__hint,
.ai-prompt-token-menu__item.is-variable:focus-within .ai-prompt-token-menu__hint {
    color: #88b04b;
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.ai-prompt-token-menu__item > i {
    color: #7e8299;
    justify-self: end;
}

.ai-prompt-token-menu__empty {
    color: #99a1b7;
    font-size: 13px;
    padding: 18px 8px;
    text-align: center;
}

.ai-prompt-token-menu__upload {
    align-items: center;
    background: #1d1d20;
    border: 1px dashed rgba(255, 255, 255, .14);
    border-radius: 10px;
    color: #aacb76;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 6px;
    min-height: 40px;
    width: 100%;
}

.ai-prompt-token-menu__upload:hover {
    background: #222226;
}

.neuro-user-template-field-builder,
.neuro-user-template-test-form {
    display: grid;
    gap: 14px;
}

.neuro-user-template-field-row {
    background: #fff;
    border: 1px solid #e6e9f2;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(30, 41, 59, .05);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.neuro-user-template-field-row__head {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(220px, 1fr) auto auto;
}

.neuro-user-template-field-row__marker {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #dcecff;
    border-radius: 12px;
    color: #1b84ff;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.neuro-user-template-field-row__main {
    min-width: 0;
}

.neuro-user-template-field-row__label {
    font-weight: 600;
}

.neuro-user-template-field-row__token {
    align-items: center;
    background: #f3f6ff;
    border: 1px solid #dfe8ff;
    border-radius: 999px;
    color: #31508f;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    max-width: 240px;
    overflow: hidden;
    padding: 0 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-user-template-field-row__actions {
    display: inline-flex;
    gap: 8px;
}

.neuro-user-template-field-row__body {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(170px, .8fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
}

.neuro-user-template-field-row__required {
    align-self: end;
    min-height: 43px;
}

.neuro-user-template-field-row__default,
.neuro-user-template-field-row__options,
.neuro-user-template-field-row__toggle {
    display: none;
}

.neuro-user-template-field-row.has-default-value .neuro-user-template-field-row__default,
.neuro-user-template-field-row.has-options .neuro-user-template-field-row__options,
.neuro-user-template-field-row.has-toggle-options .neuro-user-template-field-row__toggle {
    display: grid;
    gap: 8px;
}

.neuro-user-template-field-options-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.neuro-user-template-field-option-list {
    display: grid;
    gap: 10px;
}

.neuro-user-template-field-option-row {
    background: #f8fafc;
    border: 1px solid #e3e9f4;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.neuro-user-template-field-option-row__top {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) auto;
}

.neuro-user-template-field-option-row__main {
    min-width: 0;
}

.neuro-user-template-field-option-row__prompt {
    display: grid;
    gap: 6px;
}

.neuro-user-template-field-option-row__prompt textarea {
    min-height: 82px;
    resize: vertical;
}

.neuro-user-template-field-row__toggle {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.neuro-user-template-field-row__toggle-default {
    align-self: end;
    min-height: 43px;
}

.neuro-user-template-field-row__preview {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #d9e1ef;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 10px 12px;
}

.neuro-user-template-field-row__preview span,
.neuro-user-template-field-row__preview small {
    color: #7e8299;
    font-size: 12px;
    font-weight: 600;
}

.neuro-user-template-field-row__preview strong {
    color: #1f2937;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neuro-user-template-field-row .tagify.form-control,
.neuro-user-template-field-row .tagify.form-control-solid {
    background-color: var(--bs-gray-100, #f5f8fa);
    border-color: transparent;
    border-radius: 10px;
    min-height: 44px;
    padding: 4px 8px;
}

.neuro-user-template-field-row .tagify__tag {
    margin-top: 3px;
}

.neuro-user-template-field-row .tagify__input {
    min-width: 160px;
}

.neuro-user-template-test-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.neuro-user-template-test-field {
    display: grid;
    gap: 8px;
}

@media (max-width: 991px) {
    .neuro-user-template-field-row__head,
    .neuro-user-template-field-row__body,
    .neuro-user-template-field-row__toggle,
    .neuro-user-template-field-row__preview {
        grid-template-columns: 1fr;
    }

    .neuro-user-template-field-row__marker {
        display: none;
    }

    .neuro-user-template-field-row__token,
    .neuro-user-template-field-row__actions {
        justify-self: start;
    }
}

@media (max-width: 575px) {
    .neuro-user-template-field-row,
    .neuro-user-template-test-form {
        grid-template-columns: 1fr;
    }
}

@keyframes ai-media-loading {
    from { background-position: 0 0; }
    to { background-position: -220% 0; }
}

@media (max-width: 767px) {
    .ai-media-library-dialog {
        border-radius: 24px 24px 0 0;
        bottom: 0;
        left: 0;
        max-height: 88vh;
        top: auto;
        transform: none;
        width: 100%;
    }

    .ai-media-library-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }

    .ai-media-upload-slot {
        min-height: 140px;
    }
}

/* ============================================================ Canvas (#canvas)
   Immersive node-graph pipeline editor inspired by higgsfield Canvas.
   Lives inside the cabinet content column via the --nc-top/--nc-left offsets. */
.neuro-canvas-app {
    --nc-top: 0px;
    --nc-left: 0px;
    --nc-bg: #0c0c0e;
    --nc-card: #18181b;
    --nc-card-2: #1f1f23;
    --nc-border: rgba(255, 255, 255, 0.09);
    --nc-text: #e7e7ea;
    --nc-muted: #8a8a92;
    position: fixed;
    top: var(--nc-top);
    left: var(--nc-left);
    right: 0;
    bottom: 0;
    z-index: 6;
    overflow: hidden;
    background: var(--nc-bg);
    color: var(--nc-text);
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

.neuro-canvas-stage {
    position: absolute;
    inset: 0;
    touch-action: none;
    cursor: default;
    background-color: var(--nc-bg);
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.10) 1px, transparent 1.4px);
    background-size: 24px 24px;
    background-position: 0 0;
}

.neuro-canvas-app[data-tool="pan"] .neuro-canvas-stage,
.neuro-canvas-app.space-pan .neuro-canvas-stage { cursor: grab; }
.neuro-canvas-stage.is-panning { cursor: grabbing; }

.neuro-canvas-world {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}
.neuro-canvas-world:not(.no-anim) { transition: transform 0.08s ease-out; }

.neuro-canvas-edges {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
}
.neuro-canvas-edge {
    fill: none;
    stroke: rgba(150, 170, 255, 0.55);
    stroke-width: 2;
    transition: stroke 0.1s ease;
}
.neuro-canvas-edge--temp { stroke-dasharray: 6 5; stroke: rgba(150, 170, 255, 0.8); }
.neuro-canvas-edge.is-selected { stroke: #c5f53a; stroke-width: 3; }
/* Wide invisible hit area so the thin connection is easy to click. */
.neuro-canvas-edge-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 16;
    pointer-events: stroke;
    cursor: pointer;
}

.neuro-canvas-nodes { position: absolute; left: 0; top: 0; }

/* ---- nodes ---- */
.neuro-canvas-node {
    position: absolute;
    --node-accent: #6aa6ff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.neuro-canvas-node-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 4px;
    color: var(--nc-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.neuro-canvas-node-ico { color: var(--node-accent); display: inline-flex; }
.neuro-canvas-node-card {
    position: relative;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 64px;
}
.neuro-canvas-node.is-selected .neuro-canvas-node-card {
    border-color: var(--node-accent);
    box-shadow: 0 0 0 1px var(--node-accent), 0 18px 44px rgba(0, 0, 0, 0.55);
}
.neuro-canvas-node.is-dragging { cursor: grabbing; }
.neuro-canvas-node.is-dragging .neuro-canvas-node-card { box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); }

.neuro-canvas-prompt,
.neuro-canvas-text,
.neuro-canvas-stickytext {
    outline: none;
    font-size: 14px;
    line-height: 1.5;
    color: var(--nc-text);
    min-height: 96px;
    white-space: pre-wrap;
    word-break: break-word;
}
.neuro-canvas-prompt:empty::before,
.neuro-canvas-text:empty::before,
.neuro-canvas-stickytext:empty::before {
    content: attr(data-placeholder);
    color: var(--nc-muted);
    pointer-events: none;
}
.neuro-canvas-node--prompt .neuro-canvas-prompt { min-height: 120px; }

.neuro-canvas-result {
    border-radius: 12px;
    background: var(--nc-card-2);
    border: 1px solid var(--nc-border);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--nc-muted);
}
.neuro-canvas-result img,
.neuro-canvas-result video { width: 100%; height: 100%; object-fit: cover; display: block; }
.neuro-canvas-result-hint { opacity: 0.5; }
.neuro-canvas-result-label { font-size: 13px; }

.neuro-canvas-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.neuro-canvas-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.neuro-canvas-chip {
    display: inline-flex;
    align-items: center;
    background: var(--nc-card-2);
    border: 1px solid var(--nc-border);
    border-radius: 9px;
    padding: 0 4px;
    height: 30px;
}
.neuro-canvas-chip select {
    background: transparent;
    border: 0;
    color: var(--nc-text);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding: 0 4px;
}
.neuro-canvas-chip select option { background: #1c1c20; color: var(--nc-text); }
.neuro-canvas-run {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--node-accent);
    color: #0b0b0d;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.neuro-canvas-run:hover { filter: brightness(1.08); }

.neuro-canvas-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--node-accent);
    animation: neuro-canvas-spin 0.7s linear infinite;
}
@keyframes neuro-canvas-spin { to { transform: rotate(360deg); } }

/* ---- ports ---- */
.neuro-canvas-port {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: #2a2a30;
    border: 2px solid var(--node-accent);
    cursor: crosshair;
    transition: transform 0.12s ease;
}
.neuro-canvas-port:hover,
.neuro-canvas-port.is-drop { transform: scale(1.35); background: var(--node-accent); }
.neuro-canvas-port--in { left: -7px; }
.neuro-canvas-port--out { right: -7px; }

/* sticky + text variants */
.neuro-canvas-node.is-sticky .neuro-canvas-node-card {
    background: #f7d774;
    border-color: rgba(0, 0, 0, 0.15);
    color: #3a2f06;
}
.neuro-canvas-node.is-sticky .neuro-canvas-stickytext { color: #3a2f06; }
.neuro-canvas-node.is-sticky .neuro-canvas-stickytext:empty::before { color: rgba(58, 47, 6, 0.5); }
.neuro-canvas-node.is-plain .neuro-canvas-node-card {
    background: transparent;
    border: 1px dashed transparent;
    box-shadow: none;
    padding: 6px 8px;
}
.neuro-canvas-node.is-plain.is-selected .neuro-canvas-node-card { border-color: var(--node-accent); }

/* ---- top bar ---- */
.neuro-canvas-topbar {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
    z-index: 20;
}
.neuro-canvas-topbar > * { pointer-events: auto; }
.neuro-canvas-brand,
.neuro-canvas-topbar-right { display: flex; align-items: center; gap: 8px; }
.neuro-canvas-brand {
    background: rgba(22, 22, 25, 0.85);
    border: 1px solid var(--nc-border);
    border-radius: 12px;
    padding: 6px 8px 6px 12px;
    backdrop-filter: blur(8px);
}
.neuro-canvas-brand-mark { color: #fff; display: inline-flex; }
.neuro-canvas-title-input {
    background: transparent;
    border: 0;
    color: var(--nc-text);
    font-size: 14px;
    font-weight: 700;
    outline: none;
    width: 140px;
}
.neuro-canvas-brand-caret,
.neuro-canvas-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--nc-border);
    background: rgba(22, 22, 25, 0.85);
    color: var(--nc-text);
    border-radius: 12px;
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.neuro-canvas-brand-caret { padding: 0 6px; border: 0; background: transparent; height: 28px; }
.neuro-canvas-top-btn:hover { border-color: rgba(255, 255, 255, 0.25); }
.neuro-canvas-top-btn.is-primary { background: #fff; color: #0b0b0d; border-color: #fff; }
.neuro-canvas-savestate { color: var(--nc-muted); font-size: 12px; margin-right: 4px; }

/* ---- bottom toolbar ---- */
.neuro-canvas-toolbar {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(22, 22, 25, 0.92);
    border: 1px solid var(--nc-border);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 20;
}
.neuro-canvas-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--nc-text);
    cursor: pointer;
}
.neuro-canvas-tool:hover { background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-tool.is-active { background: #fff; color: #0b0b0d; }
.neuro-canvas-tool.is-soon { opacity: 0.55; }
.neuro-canvas-toolbar-sep { width: 1px; height: 24px; background: var(--nc-border); margin: 0 4px; }

/* ---- zoom / history controls ---- */
.neuro-canvas-zoom {
    position: absolute;
    left: 16px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px;
    background: rgba(22, 22, 25, 0.9);
    border: 1px solid var(--nc-border);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    z-index: 20;
}
.neuro-canvas-zbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--nc-text);
    cursor: pointer;
}
.neuro-canvas-zbtn:hover { background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-zoom-sep { width: 22px; height: 1px; background: var(--nc-border); margin: 2px 0; }
.neuro-canvas-zoom-level { font-size: 11px; color: var(--nc-muted); font-weight: 600; padding: 2px 0; }

/* ---- node palette (context menu) ---- */
.neuro-canvas-menu {
    position: absolute;
    width: 226px;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    background: #161619;
    border: 1px solid var(--nc-border);
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
    z-index: 40;
}
.neuro-canvas-menu-section {
    color: var(--nc-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 8px 4px;
}
.neuro-canvas-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--nc-text);
    border-radius: 9px;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.neuro-canvas-menu-item:hover { background: rgba(255, 255, 255, 0.07); }
.neuro-canvas-menu-ico {
    --node-accent: #6aa6ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #0b0b0d;
    background: var(--node-accent);
}
.neuro-canvas-menu-label { flex: 1; }
.neuro-canvas-menu-soon {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--nc-muted);
    border: 1px solid var(--nc-border);
    border-radius: 6px;
    padding: 1px 5px;
}
.neuro-canvas-menu-item.is-soon { opacity: 0.6; }

/* ---- empty-state hint ---- */
.neuro-canvas-hint {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.5);
}
.neuro-canvas-hint h2 {
    font-size: clamp(28px, 4vw, 54px);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.32);
    margin: 0 0 14px;
}
.neuro-canvas-hint p { font-size: 14px; color: var(--nc-muted); margin: 0; }
.neuro-canvas-hint-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px 8px;
    color: var(--nc-text);
    font-weight: 600;
}

/* Reference image thumbnails inside generator nodes + inspector. */
.neuro-canvas-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 8px;
}
.neuro-canvas-ref {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--nc-border);
    background: var(--nc-card-2);
    flex: 0 0 auto;
}
.neuro-canvas-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.neuro-canvas-ref-del {
    position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff; cursor: pointer; padding: 0;
}

/* Inline generator node footer: model chip · batch · settings · generate. */
.neuro-canvas-modelchip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 130px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--nc-border);
    background: var(--nc-card-2);
    color: var(--nc-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.neuro-canvas-modelchip:hover { background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-modelchip-ico { color: var(--node-accent, #9bf); display: inline-flex; }
.neuro-canvas-modelchip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.neuro-canvas-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--nc-border);
    border-radius: 999px;
    background: var(--nc-card-2);
    padding: 1px;
}
.neuro-canvas-stepper button {
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--nc-text);
    border-radius: 50%; cursor: pointer; padding: 0;
}
.neuro-canvas-stepper button:hover { background: rgba(255, 255, 255, 0.1); }
.neuro-canvas-stepper-val { min-width: 18px; text-align: center; font-size: 12px; font-weight: 600; }

.neuro-canvas-iconbtn {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--nc-border); border-radius: 8px;
    background: var(--nc-card-2); color: var(--nc-muted);
    cursor: pointer; padding: 0;
}
.neuro-canvas-iconbtn:hover { color: var(--nc-text); background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-run-cost { font-weight: 700; }

/* Right-docked inspector panel. */
.neuro-canvas-inspector {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: 320px;
    z-index: 40;
    display: none;
    flex-direction: column;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.neuro-canvas-app.has-inspector .neuro-canvas-inspector { display: flex; }
.neuro-canvas-insp-head {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--nc-border);
}
.neuro-canvas-insp-ico { color: var(--nc-muted); display: inline-flex; }
.neuro-canvas-insp-title { font-weight: 700; font-size: 15px; flex: 1; }
.neuro-canvas-insp-close {
    width: 28px; height: 28px; border: none; background: transparent;
    color: var(--nc-muted); cursor: pointer; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
}
.neuro-canvas-insp-close:hover { color: var(--nc-text); background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-insp-prompt-wrap { padding: 12px 14px; border-bottom: 1px solid var(--nc-border); }
.neuro-canvas-insp-prompt {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    background: var(--nc-card-2);
    border: 1px solid var(--nc-border);
    border-radius: 10px;
    color: var(--nc-text);
    padding: 10px;
    font: inherit;
    font-size: 13px;
    outline: none;
}
.neuro-canvas-insp-prompt:focus { border-color: rgba(150, 170, 255, 0.55); }
.neuro-canvas-insp-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.neuro-canvas-insp-add {
    width: 46px; height: 46px;
    border: 1px dashed var(--nc-border); border-radius: 8px;
    background: var(--nc-card-2); color: var(--nc-muted);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.neuro-canvas-insp-add:hover { color: var(--nc-text); border-color: rgba(255, 255, 255, 0.3); }
.neuro-canvas-insp-rows { padding: 6px 14px; flex: 1; overflow-y: auto; }
.neuro-canvas-insp-row {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 2px;
    border: none; background: transparent;
    color: var(--nc-text); font: inherit; cursor: pointer;
    border-bottom: 1px solid var(--nc-border);
}
.neuro-canvas-insp-row:last-child { border-bottom: none; }
.neuro-canvas-insp-row.is-static { cursor: default; }
.neuro-canvas-insp-row[disabled] { cursor: default; opacity: 0.6; }
.neuro-canvas-insp-label { color: var(--nc-muted); font-size: 13px; }
.neuro-canvas-insp-value {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--nc-text);
}
.neuro-canvas-insp-value svg { color: var(--nc-muted); }
.neuro-canvas-insp-generate {
    margin: 12px 14px 16px;
    height: 46px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 12px;
    background: #c5f53a; color: #14140f;
    font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
    text-transform: uppercase; cursor: pointer;
}
.neuro-canvas-insp-generate:hover { filter: brightness(1.05); }
.neuro-canvas-insp-generate.is-busy { background: var(--nc-card-2); color: var(--nc-muted); cursor: default; }
.neuro-canvas-insp-cost { display: inline-flex; align-items: center; gap: 3px; }

/* Floating model / option popovers. */
.neuro-canvas-pop {
    position: absolute;
    z-index: 60;
    width: 300px;
    max-height: 420px;
    display: flex; flex-direction: column;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.neuro-canvas-pop--options { width: 200px; }
.neuro-canvas-pop-search {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid var(--nc-border);
    color: var(--nc-muted);
}
.neuro-canvas-pop-search input {
    flex: 1; border: none; background: transparent; color: var(--nc-text);
    font: inherit; font-size: 14px; outline: none;
}
.neuro-canvas-pop-section {
    padding: 8px 14px 4px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--nc-muted);
}
.neuro-canvas-pop-list { overflow-y: auto; padding: 4px; }
.neuro-canvas-pop-item {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border: none; background: transparent; color: var(--nc-text);
    border-radius: 10px; cursor: pointer; text-align: left; font: inherit;
}
.neuro-canvas-pop-item:hover { background: rgba(255, 255, 255, 0.06); }
.neuro-canvas-pop-item.is-active { background: rgba(197, 245, 58, 0.12); }
.neuro-canvas-pop-ico { color: var(--nc-muted); display: inline-flex; flex: 0 0 auto; }
.neuro-canvas-pop-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.neuro-canvas-pop-name { font-size: 13px; font-weight: 600; }
.neuro-canvas-pop-desc { font-size: 11px; color: var(--nc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neuro-canvas-pop-check { color: #c5f53a; display: inline-flex; }
.neuro-canvas-pop-empty { padding: 18px 14px; color: var(--nc-muted); font-size: 13px; text-align: center; }

/* Floating action bar above a selected generator node. */
.neuro-canvas-actionbar {
    position: absolute;
    z-index: 38;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px;
    padding: 5px;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.neuro-canvas-action-run {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: none; border-radius: 999px;
    background: #fff; color: #111; font-weight: 700; font-size: 13px; cursor: pointer;
}
.neuro-canvas-action-run b { color: #111; }
.neuro-canvas-action-ico {
    width: 32px; height: 32px; border: none; border-radius: 50%;
    background: transparent; color: var(--nc-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.neuro-canvas-action-ico:hover { color: var(--nc-text); background: rgba(255, 255, 255, 0.08); }

/* Delete button pinned to the midpoint of a selected connection. */
.neuro-canvas-edgebar {
    position: absolute;
    z-index: 39;
    transform: translate(-50%, -50%);
    display: flex;
}
.neuro-canvas-edgebar button {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--nc-border); border-radius: 50%;
    background: var(--nc-card); color: #ff6b6b; cursor: pointer; padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.neuro-canvas-edgebar button:hover { background: #ff6b6b; color: #fff; }

/* LLM Assistant: optional system prompt + text result. */
.neuro-canvas-sysprompt {
    margin: 0 12px 8px;
    padding: 8px 10px;
    min-height: 20px;
    border: 1px dashed var(--nc-border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--nc-text);
    outline: none;
}
.neuro-canvas-sysprompt:empty::before {
    content: attr(data-placeholder);
    color: var(--nc-muted);
}
.neuro-canvas-textresult {
    margin: 0 12px 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--nc-card-2);
    border: 1px solid var(--nc-border);
    font-size: 13px;
    line-height: 1.5;
    color: var(--nc-text);
    white-space: pre-wrap;
    max-height: 240px;
    overflow-y: auto;
}
.neuro-canvas-textresult.is-running {
    display: flex; align-items: center; gap: 8px;
    color: var(--nc-muted); white-space: normal;
}

/* Node context menu danger row + lock indicator. */
.neuro-canvas-nodemenu { width: 200px; }
.neuro-canvas-menu-item.is-danger { color: #ff6b6b; }
.neuro-canvas-menu-item.is-danger .neuro-canvas-menu-ico { color: #ff6b6b; }
.neuro-canvas-node.is-locked { opacity: 0.92; }
.neuro-canvas-node.is-locked .neuro-canvas-node-card { outline: 1px dashed rgba(255, 255, 255, 0.18); outline-offset: 2px; }
.neuro-canvas-node-lock { margin-left: auto; color: var(--nc-muted); display: inline-flex; }

/* Sequence (final cut) node. */
.neuro-canvas-node--sequence .neuro-canvas-node-card {
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 14px;
    padding: 10px;
}
.neuro-canvas-seq-empty {
    padding: 26px 14px;
    text-align: center;
    color: var(--nc-muted);
    font-size: 13px;
}
.neuro-canvas-seq-stage {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center;
}
.neuro-canvas-seq-stage:empty::before {
    content: "▶";
    color: rgba(255, 255, 255, 0.25);
    font-size: 28px;
}
.neuro-canvas-seq-stage img,
.neuro-canvas-seq-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.neuro-canvas-seq-strip {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
}
.neuro-canvas-seq-clip {
    position: relative; flex: 0 0 auto;
    width: 56px; height: 40px; padding: 0;
    border: 1px solid var(--nc-border); border-radius: 6px; overflow: hidden;
    background: var(--nc-card-2); cursor: pointer;
}
.neuro-canvas-seq-clip.is-active { border-color: #f59e0b; }
.neuro-canvas-seq-clip img,
.neuro-canvas-seq-clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.neuro-canvas-seq-num {
    position: absolute; top: 2px; left: 2px;
    min-width: 14px; height: 14px; padding: 0 3px;
    border-radius: 7px; background: rgba(0, 0, 0, 0.7); color: #fff;
    font-size: 9px; line-height: 14px; text-align: center;
}
.neuro-canvas-seq-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.neuro-canvas-seq-play {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: none; border-radius: 999px;
    background: #f59e0b; color: #1a1205; font-weight: 700; font-size: 12px; cursor: pointer;
}
.neuro-canvas-seq-play:hover { filter: brightness(1.05); }
.neuro-canvas-seq-count { font-size: 11px; color: var(--nc-muted); margin-right: auto; }

/* Run-pipeline busy state. */
.neuro-canvas-runall.is-busy { opacity: 0.6; pointer-events: none; }
.neuro-canvas-app.is-running .neuro-canvas-runall span::after { content: "…"; }

/* Assets / generations browser modal. */
.neuro-canvas-assets {
    position: absolute; inset: 0; z-index: 70;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}
.neuro-canvas-assets-panel {
    width: min(760px, 90%);
    height: min(560px, 84%);
    display: flex; flex-direction: column;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.neuro-canvas-assets-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--nc-border);
}
.neuro-canvas-assets-tabs { display: flex; gap: 6px; }
.neuro-canvas-assets-tabs button {
    padding: 7px 14px; border: none; border-radius: 999px;
    background: transparent; color: var(--nc-muted); font: inherit;
    font-weight: 600; font-size: 13px; cursor: pointer;
}
.neuro-canvas-assets-tabs button.is-active { background: var(--nc-card-2); color: var(--nc-text); }
.neuro-canvas-assets-close {
    width: 32px; height: 32px; border: none; border-radius: 8px;
    background: transparent; color: var(--nc-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.neuro-canvas-assets-close:hover { color: var(--nc-text); background: rgba(255, 255, 255, 0.08); }
.neuro-canvas-assets-grid {
    flex: 1; overflow-y: auto; padding: 14px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
    align-content: start;
}
.neuro-canvas-assets-loading {
    grid-column: 1 / -1; text-align: center; color: var(--nc-muted);
    padding: 40px 0; font-size: 14px;
}
.neuro-canvas-assets-card {
    aspect-ratio: 1; border: 1px solid var(--nc-border); border-radius: 10px;
    overflow: hidden; background: var(--nc-card-2); cursor: pointer; padding: 0;
}
.neuro-canvas-assets-card:hover { border-color: rgba(150, 170, 255, 0.6); }
.neuro-canvas-assets-card img,
.neuro-canvas-assets-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 991px) {
    .neuro-canvas-title-input { width: 96px; }
    .neuro-canvas-top-btn span { display: none; }
    .neuro-canvas-hint h2 { font-size: 30px; }
    .neuro-canvas-inspector { width: auto; left: 12px; }
}

/* =====================================================================
   Designer — Konva layered image editor (#designer route)
   Full-bleed app inside the cabinet content column via --nd-top/--nd-left.
   ===================================================================== */
.neuro-design-app {
    --nd-top: 0px;
    --nd-left: 0px;
    --nd-bg: #f4f4f7;
    --nd-panel: #ffffff;
    --nd-border: #e6e6ec;
    --nd-text: #1f1f23;
    --nd-muted: #8a8a92;
    --nd-accent: #7c5cff;
    position: fixed;
    top: var(--nd-top);
    left: var(--nd-left);
    right: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--nd-bg);
    color: var(--nd-text);
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

/* Top bar */
.nd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 52px;
    padding: 0 14px;
    background: var(--nd-panel);
    border-bottom: 1px solid var(--nd-border);
    flex: none;
}
.nd-brand { display: flex; align-items: center; gap: 8px; color: var(--nd-accent); }
.nd-title-input {
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--nd-text);
    padding: 4px 8px;
    border-radius: 8px;
    width: 220px;
    outline: none;
}
.nd-title-input:hover { border-color: var(--nd-border); }
.nd-title-input:focus { border-color: var(--nd-accent); background: #fff; }
.nd-top-right { display: flex; align-items: center; gap: 8px; }
.nd-status { font-size: 12px; color: var(--nd-muted); margin-right: 4px; }
.nd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--nd-border);
    border-radius: 8px;
    background: #fff;
    color: var(--nd-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
}
.nd-btn:hover { background: #f6f6fa; }
.nd-btn:disabled { opacity: .4; cursor: default; }
.nd-btn.is-primary { background: var(--nd-accent); border-color: var(--nd-accent); color: #fff; }
.nd-btn.is-primary:hover { background: #6a49f2; }

/* Body grid: tools | workspace | side panel */
.nd-body { flex: 1; display: flex; min-height: 0; }

.nd-tools {
    flex: none;
    width: 60px;
    background: var(--nd-panel);
    border-right: 1px solid var(--nd-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
}
.nd-tool {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--nd-text);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.nd-tool:hover { background: #f1f0fb; color: var(--nd-accent); }
.nd-tools-sep { width: 28px; height: 1px; background: var(--nd-border); margin: 4px 0; }

/* Center workspace */
.nd-stage-wrap { position: relative; flex: 1; min-width: 0; overflow: hidden; background: var(--nd-bg); }
.nd-stage { position: absolute; inset: 0; }
.neuro-design-app.nd-space .nd-stage { cursor: grab; }
.neuro-design-app.nd-panning .nd-stage { cursor: grabbing; }

/* Zoom controls */
.nd-zoom {
    position: absolute;
    left: 50%;
    bottom: 92px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: var(--nd-panel);
    border: 1px solid var(--nd-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.nd-zbtn {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; border-radius: 8px;
    color: var(--nd-text); cursor: pointer;
}
.nd-zbtn:hover { background: #f1f0fb; color: var(--nd-accent); }
.nd-zoom-level { font-size: 12px; font-weight: 600; min-width: 42px; text-align: center; color: var(--nd-muted); }
.nd-zoom-sep { width: 1px; height: 18px; background: var(--nd-border); }

/* Bottom generation dock */
.nd-dock {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 40px));
    background: var(--nd-panel);
    border: 1px solid var(--nd-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 10px;
}
.nd-dock-refs { display: none; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.nd-ref-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; background: #f1f0fb; color: var(--nd-text);
    padding: 3px 4px 3px 8px; border-radius: 6px;
}
.nd-ref-chip button { border: none; background: transparent; cursor: pointer; color: var(--nd-muted); display: inline-flex; padding: 2px; }
.nd-dock-row { display: flex; align-items: flex-end; gap: 8px; }
.nd-dock-upload {
    flex: none; width: 40px; height: 40px;
    border: 1px solid var(--nd-border); border-radius: 10px;
    background: #fff; color: var(--nd-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.nd-dock-upload:hover { color: var(--nd-accent); border-color: var(--nd-accent); }
.nd-dock-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--nd-border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    max-height: 120px;
    outline: none;
    color: var(--nd-text);
    background: #fff;
}
.nd-dock-input:focus { border-color: var(--nd-accent); }
.nd-dock-go {
    flex: none;
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 16px;
    border: none; border-radius: 10px;
    background: var(--nd-accent); color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.nd-dock-go:hover { background: #6a49f2; }
.nd-dock-go:disabled { opacity: .6; cursor: default; }

/* Right side panels */
.nd-side {
    flex: none;
    width: 280px;
    background: var(--nd-panel);
    border-left: 1px solid var(--nd-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.nd-panel { display: flex; flex-direction: column; min-height: 0; }
.nd-panel-props { flex: 1; border-top: 1px solid var(--nd-border); }
.nd-panel-head {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--nd-muted); padding: 12px 14px 8px;
}
.nd-layers { max-height: 38vh; overflow-y: auto; padding: 0 8px 10px; }
.nd-props { flex: 1; overflow-y: auto; padding: 0 14px 16px; }
.nd-empty { font-size: 12px; color: var(--nd-muted); padding: 8px 6px; line-height: 1.5; }

/* Layer rows */
.nd-layer-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.nd-layer-row:hover { background: #f6f6fa; }
.nd-layer-row.is-active { background: #f1f0fb; box-shadow: inset 0 0 0 1px var(--nd-accent); }
.nd-layer-row.is-hidden { opacity: .5; }
.nd-layer-ico { color: var(--nd-muted); display: inline-flex; flex: none; }
.nd-layer-name { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-layer-actions { display: none; align-items: center; gap: 2px; }
.nd-layer-row:hover .nd-layer-actions,
.nd-layer-row.is-active .nd-layer-actions { display: flex; }
.nd-layer-btn {
    width: 22px; height: 22px; border: none; background: transparent; border-radius: 6px;
    color: var(--nd-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.nd-layer-btn:hover { background: #e9e9f2; color: var(--nd-accent); }

/* Property rows */
.nd-prop-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 10px 0 8px; color: var(--nd-text); }
.nd-prop { display: block; margin-bottom: 12px; }
.nd-prop-label { display: block; font-size: 11px; color: var(--nd-muted); margin-bottom: 5px; }
.nd-input {
    width: 100%; border: 1px solid var(--nd-border); border-radius: 8px;
    padding: 7px 9px; font-size: 13px; font-family: inherit; color: var(--nd-text);
    background: #fff; outline: none; resize: vertical;
}
.nd-input:focus { border-color: var(--nd-accent); }
.nd-color { width: 100%; height: 34px; border: 1px solid var(--nd-border); border-radius: 8px; background: #fff; cursor: pointer; padding: 2px; }
.nd-range { display: flex; align-items: center; gap: 8px; }
.nd-range input[type="range"] { flex: 1; accent-color: var(--nd-accent); }
.nd-range-val { font-size: 12px; color: var(--nd-muted); min-width: 32px; text-align: right; }
.nd-seg-group { display: inline-flex; border: 1px solid var(--nd-border); border-radius: 8px; overflow: hidden; }
.nd-seg { border: none; background: #fff; padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--nd-text); text-transform: capitalize; }
.nd-seg + .nd-seg { border-left: 1px solid var(--nd-border); }
.nd-seg.is-active { background: var(--nd-accent); color: #fff; }
.nd-toggle { border: 1px solid var(--nd-border); background: #fff; border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--nd-text); }
.nd-toggle.is-active { background: var(--nd-accent); border-color: var(--nd-accent); color: #fff; }

/* Inline text editor overlay */
.nd-text-edit {
    position: absolute;
    z-index: 9999;
    margin: 0;
    padding: 0;
    border: 1px dashed var(--nd-accent);
    background: rgba(255,255,255,.92);
    outline: none;
    resize: none;
    overflow: hidden;
    line-height: 1;
}

/* Spinner */
.nd-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: nd-spin .7s linear infinite;
}
@keyframes nd-spin { to { transform: rotate(360deg); } }

/* Konva missing state */
.nd-missing { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--nd-bg, #f4f4f7); z-index: 6; }
.nd-missing-card { max-width: 420px; text-align: center; padding: 28px; background: #fff; border: 1px solid #e6e6ec; border-radius: 16px; }
.nd-missing-card h2 { font-size: 20px; margin-bottom: 8px; }
.nd-missing-card p { font-size: 14px; color: #6b6b73; line-height: 1.5; }

@media (max-width: 991px) {
    .nd-side { width: 220px; }
    .nd-title-input { width: 120px; }
    .nd-btn.is-primary span { display: none; }
}

/* ============================================================
   Reusable media slider (covers / generation galleries)
   Used everywhere a template/generation has more than one image.
   ============================================================ */
.media-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.media-slider:focus-visible {
    outline: 2px solid var(--bs-primary, #7239ea);
    outline-offset: -2px;
}
.media-slider__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}
.media-slider__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}
.media-slider__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.media-slider__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}
.media-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: rgba(20, 20, 25, .42);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.media-slider__arrow:hover {
    background: rgba(20, 20, 25, .68);
}
.media-slider__arrow[hidden] {
    display: none;
}
.media-slider__arrow--prev { left: 8px; }
.media-slider__arrow--next { right: 8px; }
.media-slider__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.media-slider__dot {
    pointer-events: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 2px rgba(0, 0, 0, .35);
    cursor: pointer;
    transition: background .15s ease, width .15s ease;
}
.media-slider__dot.is-active {
    width: 18px;
    border-radius: 4px;
    background: #fff;
}
.media-slider--fill {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.media-slider--contain {
    background: #0b0b0f;
}
.media-slider--contain .media-slider__img {
    object-fit: contain;
}
.neuro-generation-result-slider {
    width: 100%;
    height: min(70vh, 560px);
    border-radius: 12px;
    overflow: hidden;
}
.neuro-studio-result-slider {
    width: 100%;
    height: min(60vh, 520px);
    border-radius: 12px;
    overflow: hidden;
}
@media (max-width: 575px) {
    .media-slider__arrow { width: 32px; height: 32px; }
    .media-slider__arrow--prev { left: 6px; }
    .media-slider__arrow--next { right: 6px; }
    .neuro-generation-result-slider { height: min(60vh, 420px); }
}

/* ---------------------------------------------------------------------------
   BSM (bottom-sheet / desktop modal) — brand theming.
   bsm.css ships defaults on :root and [data-sheet-theme="dark"]; app.css loads
   AFTER it, so these overrides win. theme.js mirrors data-bs-theme onto
   <html data-sheet-theme> so sheets follow the cabinet light/dark toggle.
   Only accent/radius are re-skinned to Metronic — surface colours are left to
   bsm.css so its dark palette keeps working.
--------------------------------------------------------------------------- */
:root {
    --sheet-accent: var(--bs-primary, #2b7fff);
    --sheet-radius: 20px;
}
/* Keep the sheet/modal surface visually aligned with Metronic cards in dark. */
[data-sheet-theme="dark"] {
    --sheet-bg: var(--bs-body-bg, #1c1c1f);
    --sheet-color: var(--bs-body-color, #f2f2f5);
}
/* The full-sheet "Закрыть" text button reads as a primary action. */
.sheet .sheet__close-text { color: var(--sheet-accent); }
/* Generation viewer / cover preview sheets get edge-to-edge media. */
.sheet__body.neuro-sheet-flush { padding-left: 0; padding-right: 0; }
