/*
 * Trends / AI Ads Creative cabinet page styles.
 * Loaded from resources/views/cabinet/ai-ads-creative/index.blade.php.
 */
/* ---------- Page chrome: single accent, compact head ---------- */
:root {
    --aac-accent: #089970;
    --aac-accent-rgb: 8, 153, 112;
    --aac-accent-contrast: #fff;
}
[data-bs-theme="dark"] {
    --aac-accent: #0acf97;
    --aac-accent-rgb: 10, 207, 151;
    --aac-accent-contrast: #0f172a;
}
.aac-topbar-tools { margin-left: .15rem; flex-shrink: 0; }
.aac-project-select {
    width: auto;
    min-width: 140px;
    max-width: 220px;
    background-color: transparent;
    color: inherit;
    border-color: var(--ct-border-color, rgba(108, 117, 125, .35));
}
.aac-project-select:focus {
    color: inherit;
    background-color: transparent;
    border-color: var(--aac-accent);
    box-shadow: 0 0 0 .15rem rgba(var(--aac-accent-rgb), .2);
}
.aac-balance-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .4rem;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: var(--ct-topbar-item-color, var(--ct-body-color, #6c757d));
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1;
}
.aac-balance-btn:hover,
.aac-balance-btn:focus {
    color: var(--ct-topbar-item-hover-color, var(--ct-emphasis-color, #fff));
    background: rgba(108, 117, 125, .12);
}
.aac-balance-btn .uil-wallet { font-size: 1.15rem; }
.aac-balance-btn .aac-balance-amt {
    font-weight: 600;
    font-size: .8rem;
}
.aac-balance-btn.is-low {
    color: #d97706;
}
[data-bs-theme="dark"] .aac-balance-btn.is-low {
    color: #e8b86d;
}
.aac-balance-btn.is-low:hover,
.aac-balance-btn.is-low:focus {
    color: #b45309;
    background: rgba(217, 119, 6, .12);
}
[data-bs-theme="dark"] .aac-balance-btn.is-low:hover,
[data-bs-theme="dark"] .aac-balance-btn.is-low:focus {
    color: #f0c98a;
    background: rgba(232, 184, 109, .12);
}
@media (max-width: 767.98px) {
    .navbar-custom:has(.aac-topbar-tools) .topbar-page-title {
        display: none !important;
    }
    .aac-project-select {
        min-width: 112px;
        max-width: min(46vw, 200px);
    }
}
#aacTabs .nav-link { padding: .45rem .8rem; font-size: .85rem; }
#aacTabs .nav-link.active {
    color: var(--aac-accent);
    border-bottom-color: var(--aac-accent);
}

/* ---------- Trends summary (category board) ---------- */
.trends-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.trends-hot {
    border: 1px solid var(--ct-border-color, #e2e6ea);
    border-radius: 0.5rem;
    background: var(--ct-secondary-bg, #fff);
    padding: 1rem 1.05rem 0.9rem;
    margin-bottom: 1rem;
}
.trends-hot-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.trends-hot-head h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.trends-hot-head p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--ct-secondary-color, #8a969c);
}
.trends-ad-strip {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

/* ---------- Market movers ---------- */
.mm-block { padding-bottom: 0.35rem; }
.mm-head { align-items: flex-start; }
.mm-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.mm-period-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ct-secondary-color, #6c757d);
    white-space: nowrap;
}
.mm-filters {
    display: inline-flex;
    padding: 0.15rem;
    border-radius: 999px;
    background: var(--ct-tertiary-bg, #f1f3f5);
}
.mm-filter {
    border: 0;
    background: none;
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ct-secondary-color, #6c757d);
    cursor: pointer;
}
.mm-filter.is-active {
    background: var(--ct-body-color, #313a46);
    color: #fff;
}
[data-bs-theme="dark"] .mm-filter.is-active {
    background: #f8f9fa;
    color: #212529;
}
.mm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.mm-table thead th {
    padding: 0.5rem 0.65rem;
    background: var(--ct-tertiary-bg, #f6f7f9);
    border-bottom: 1px solid var(--ct-border-color, #e2e6ea);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ct-secondary-color, #6c757d);
    text-align: left;
    white-space: nowrap;
}
.mm-table thead th:first-child { border-top-left-radius: 0.4rem; }
.mm-table thead th:last-child { border-top-right-radius: 0.4rem; }
.mm-table tbody tr {
    border-bottom: 1px solid var(--ct-border-color, #eef1f4);
    cursor: pointer;
}
.mm-table tbody tr:hover { background: var(--ct-tertiary-bg, #f8f9fa); }
.mm-table td {
    padding: 0.55rem 0.65rem;
    vertical-align: middle;
}
.mm-num { text-align: right; white-space: nowrap; }
.mm-num.is-up { color: #0a8f5b; font-weight: 600; }
.mm-num.is-down { color: #d64550; font-weight: 600; }
.mm-brand-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.mm-page-image {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ct-tertiary-bg, #f1f3f5);
}
.mm-page-image-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mm-page-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--ct-secondary-color, #6c757d);
    font-size: 0.8rem;
    font-weight: 700;
}
.mm-brand-copy { min-width: 0; }
.mm-brand { font-weight: 600; }
.mm-category {
    font-size: 0.75rem;
    color: var(--ct-secondary-color, #8a969c);
}
.mm-trend-col { width: 90px; text-align: left; }
.mm-sort {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.mm-sort.is-active { color: var(--ct-body-color, #313a46); }
.mm-spark.is-up { color: #0a8f5b; }
.mm-spark.is-down { color: #d64550; }
.mm-more { text-align: center; padding: 0.7rem 0 0.2rem; }
.mm-show-more {
    border: 1px solid var(--ct-border-color, #e2e6ea);
    background: var(--ct-secondary-bg, #fff);
    border-radius: 999px;
    padding: 0.3rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ct-body-color, #313a46);
    cursor: pointer;
}
.mm-show-more:hover { background: var(--ct-tertiary-bg, #f1f3f5); }
.mm-table-wrap { overflow-x: auto; }
.trends-cat-ads .trends-ad-strip {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(96px, 1fr);
    overflow-x: auto;
    padding-bottom: 0;
}
.trends-ad-tile {
    flex: 0 0 112px;
    width: 112px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
}
.trends-cat-ads .trends-ad-tile {
    flex: none;
    width: auto;
    min-width: 0;
}
.trends-ad-tile .creative-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 0.4rem;
    overflow: hidden;
    background: #1e1e1e;
}
.trends-ad-tile .creative-thumb img,
.trends-ad-tile .creative-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.trends-ad-tile .creative-thumb .no-preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.4rem;
}
.trends-ad-tile .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    background: rgba(0, 0, 0, .18);
    pointer-events: none;
}
.trends-ad-copies {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.68rem;
    color: var(--ct-secondary-color, #8a969c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trends-cat-card {
    border: 1px solid var(--ct-border-color, #e2e6ea);
    border-radius: 0.5rem;
    background: var(--ct-secondary-bg, #fff);
    padding: 1rem 1.05rem 0.9rem;
    width: 100%;
}
.trends-cat-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: start;
}
@media (max-width: 767.98px) {
    .trends-cat-layout { grid-template-columns: 1fr; }
}
.trends-cat-side {
    min-width: 0;
}
.trends-cat-ads {
    min-width: 0;
}
.trends-cat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.trends-cat-head h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.trends-cat-meta {
    font-size: 0.72rem;
    color: var(--ct-secondary-color, #8a969c);
    white-space: nowrap;
}
.trends-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ct-secondary-color, #8a969c);
    margin: 0 0 0.4rem;
}
.trends-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.trends-see-more {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 0;
    background: transparent;
    padding: 0.15rem 0;
    margin: 0 0 0.75rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--aac-accent);
    cursor: pointer;
}
.trends-see-more:hover {
    text-decoration: underline;
}
.trends-domains {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.15rem;
}
.trends-brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    border: 1px solid var(--ct-border-color, #e2e6ea);
    border-radius: 999px;
    padding: 0.2rem 0.55rem 0.2rem 0.25rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1.2;
    color: inherit;
}
.trends-brand-chip:hover {
    border-color: var(--aac-accent);
    color: var(--aac-accent);
}
.trends-brand-chip img,
.trends-brand-chip .trends-brand-fallback {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.trends-brand-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--aac-accent-rgb), .12);
    color: var(--aac-accent);
    font-size: 0.65rem;
    font-weight: 700;
}
.trends-brand-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.trends-domain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.35rem 0.4rem;
    border-radius: 0.35rem;
    text-align: left;
    cursor: pointer;
    color: inherit;
}
.trends-domain-row:hover {
    background: rgba(var(--aac-accent-rgb), .08);
}
.trends-domain-row .trends-domain-name {
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.trends-domain-row .trends-domain-meta {
    font-size: 0.7rem;
    color: var(--ct-secondary-color, #8a969c);
    flex-shrink: 0;
}
.trends-empty-inline {
    font-size: 0.78rem;
    color: var(--ct-secondary-color, #8a969c);
}
#domainPagesModal .dp-page-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--ct-border-color, #e2e6ea);
}
#domainPagesModal .dp-page-row:last-child { border-bottom: 0; }
#domainPagesModal .dp-page-url {
    font-size: 0.84rem;
    font-weight: 600;
    word-break: break-all;
}
#domainPagesModal .dp-page-brands {
    font-size: 0.72rem;
    color: var(--ct-secondary-color, #8a969c);
}
#domainPagesModal .dp-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
#domainPagesModal .dp-fb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
}
#domainPagesModal .dp-fb-chip .trends-brand-chip {
    max-width: calc(100% - 2rem);
}
#domainPagesModal .dp-fb-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid var(--ct-border-color, #d7dde3);
    color: var(--ct-secondary-color, #6c757d);
    background: var(--ct-secondary-bg, #fff);
    flex-shrink: 0;
    text-decoration: none;
}
#domainPagesModal .dp-fb-ext:hover {
    border-color: var(--aac-accent);
    color: var(--aac-accent);
}
/* Trends category browse (See more) */
#trendsBrowseModal .tb-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
#trendsBrowseModal .tb-tab {
    border: 1px solid var(--ct-border-color, #e2e6ea);
    background: transparent;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
}
#trendsBrowseModal .tb-tab.active {
    border-color: var(--aac-accent);
    color: var(--aac-accent);
    background: rgba(var(--aac-accent-rgb), .08);
}
#trendsBrowseModal .tb-table-wrap {
    overflow: auto;
    max-height: min(60vh, 520px);
}
#trendsBrowseModal .tb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
#trendsBrowseModal .tb-table th {
    position: sticky;
    top: 0;
    background: var(--ct-secondary-bg, #fff);
    text-align: left;
    font-size: 0.68rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ct-secondary-color, #8a969c);
    font-weight: 700;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--ct-border-color, #e2e6ea);
    white-space: nowrap;
}
#trendsBrowseModal .tb-table td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid var(--ct-border-color, #eef1f4);
    vertical-align: middle;
}
#trendsBrowseModal .tb-table tr:last-child td { border-bottom: 0; }
#trendsBrowseModal .tb-table th.tb-num,
#trendsBrowseModal .tb-table td.tb-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
#trendsBrowseModal .tb-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    max-width: 100%;
}
#trendsBrowseModal .tb-row-btn:hover { color: var(--aac-accent); }
#trendsBrowseModal .tb-row-btn img,
#trendsBrowseModal .tb-row-btn .trends-brand-fallback {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
#trendsBrowseModal .tb-row-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#trendsBrowseModal .tb-meta {
    font-size: 0.72rem;
    color: var(--ct-secondary-color, #8a969c);
}
#trendsBrowseModal .tb-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    border: 1px solid var(--ct-border-color, #d7dde3);
    color: var(--ct-secondary-color, #6c757d);
    text-decoration: none;
    margin-left: 0.2rem;
}
#trendsBrowseModal .tb-ext:hover {
    border-color: var(--aac-accent);
    color: var(--aac-accent);
}
.creative-card {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    overflow: hidden;
}
.creative-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.creative-card .creative-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #1e1e1e;
    overflow: hidden;
}
.creative-card .creative-thumb img,
.creative-card .creative-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.creative-card .creative-thumb video {
    object-fit: contain;
    background: #000;
}
.creative-card .creative-thumb .no-preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
}
.creative-card .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.creative-card .play-overlay i {
    font-size: 2.6rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    opacity: .85;
}
.creative-card .media-badge {
    position: absolute;
    top: 8px;
    left: 8px;
}
.creative-card .active-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}
.creative-card .winner-score-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(17, 24, 39, .82);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
}
.creative-card .winner-score-badge.is-high {
    background: rgba(5, 120, 85, .9);
}
.creative-card .winner-score-badge.is-mid {
    background: rgba(180, 120, 20, .88);
}
.creative-page-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 18px;
    background: #eef2f7;
}
.creative-page-icon--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    color: #1877f2;
    background: #e8f0fe;
}
.creative-card-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    gap: .25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.creative-card:hover .creative-card-actions,
.batch-card:hover .creative-card-actions {
    opacity: 1;
    pointer-events: auto;
}
@media (hover: none) {
    .creative-card-actions {
        opacity: 1;
        pointer-events: auto;
    }
}
.creative-card-action {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(17, 24, 39, .72);
    backdrop-filter: blur(6px);
    cursor: pointer;
    line-height: 1;
    font-size: .95rem;
}
.creative-card-action:hover {
    background: rgba(17, 24, 39, .9);
    color: #fff;
}
/* Instant tooltip — the native title only appears after a browser delay. */
.creative-card-action[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    z-index: 5;
    padding: .25rem .4rem;
    border-radius: 6px;
    background: rgba(17, 24, 39, .95);
    color: #fff;
    font-size: .68rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.creative-card-action[data-tip]:hover::after,
.creative-card-action[data-tip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
}
@media (hover: none) {
    .creative-card-action[data-tip]::after {
        content: none;
    }
}
.creative-card-action.is-favorited {
    color: #fa5c7c;
    background: rgba(17, 24, 39, .88);
}
.creative-card-action.is-in-refs {
    color: #ffc35a;
    background: rgba(17, 24, 39, .88);
}
.brand-card {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    height: 100%;
}
.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.brand-card .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: #e9ecef;
    flex-shrink: 0;
}
.brand-card .brand-icon-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6c757d;
    flex-shrink: 0;
}
.brand-card .stat-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #98a6ad;
}
.brand-card .stat-value {
    font-weight: 700;
}
/* ---------- Brand analytics (Inspiration Feed, brand filter) ---------- */
#brand-analytics-panel { display: none; }
#brand-analytics-panel.is-visible { display: block; }
.ba-panel { border: 1px solid rgba(15, 23, 42, .08); border-radius: 12px; background: #fff; }
[data-bs-theme="dark"] .ba-panel { background: var(--bs-body-bg); border-color: rgba(255,255,255,.08); }
.ba-head { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-start; justify-content: space-between; }
.ba-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.ba-brand-icon, .ba-brand-icon-placeholder {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e9ecef; flex-shrink: 0;
}
.ba-brand-icon-placeholder {
    display: flex; align-items: center; justify-content: center; font-weight: 700; color: #6c757d;
}
.ba-brand-name { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.2; }
.ba-brand-meta { color: #6c757d; font-size: .85rem; margin-top: .15rem; }
.ba-category {
    display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .02em;
    padding: .15rem .55rem; border-radius: 999px; background: rgba(var(--aac-accent-rgb), .12);
    color: var(--aac-accent); margin-left: .4rem; vertical-align: middle;
}
.ba-period { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.ba-period .btn {
    border-radius: 999px; font-size: .78rem; padding: .25rem .75rem; border-color: rgba(15,23,42,.12);
}
.ba-period .btn.active {
    background: var(--aac-accent); border-color: var(--aac-accent); color: var(--aac-accent-contrast);
}
.ba-pages-label {
    font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #98a6ad; font-weight: 700;
    margin-bottom: .4rem;
}
.ba-pages { display: flex; flex-wrap: wrap; gap: .5rem; }
.ba-page-card {
    display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem;
    border: 1px solid rgba(15,23,42,.08); border-radius: 10px; background: #f8fafc; min-width: 180px;
}
[data-bs-theme="dark"] .ba-page-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.ba-page-card img, .ba-page-card .ba-page-placeholder {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #e9ecef;
}
.ba-page-card .ba-page-placeholder {
    display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #6c757d;
}
.ba-page-name { font-weight: 600; font-size: .82rem; line-height: 1.2; }
.ba-page-ads { font-size: .72rem; color: #6c757d; }
.ba-page-ads-library {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    height: 26px; padding: 0 .55rem; border-radius: 999px; flex-shrink: 0;
    color: #1877f2; background: rgba(24, 119, 242, .1); text-decoration: none;
    font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.ba-page-ads-library i { font-size: .85rem; line-height: 1; }
.ba-page-ads-library:hover { background: rgba(24, 119, 242, .2); color: #0d65d9; }
[data-bs-theme="dark"] .ba-page-ads-library { background: rgba(24, 119, 242, .18); color: #6aa8ff; }
[data-bs-theme="dark"] .ba-page-ads-library:hover { background: rgba(24, 119, 242, .28); color: #9bc4ff; }
.ba-current {
    font-size: .65rem; font-weight: 700; color: #fff; background: #3b82f6;
    border-radius: 999px; padding: .1rem .4rem; margin-left: .25rem;
}
.ba-chart-card {
    border: 1px solid rgba(15,23,42,.08); border-radius: 12px; padding: .9rem 1rem 1rem; height: 100%;
    background: #fff;
}
[data-bs-theme="dark"] .ba-chart-card { background: var(--bs-body-bg); border-color: rgba(255,255,255,.08); }
.ba-chart-title { font-size: .82rem; font-weight: 700; margin-bottom: .15rem; }
.ba-chart-sub { font-size: .72rem; color: #6c757d; margin-bottom: .5rem; }
.ba-chart-wrap { position: relative; width: 100%; height: 220px; }
.ba-chart-wrap.ba-chart-sm { height: 160px; }
.ba-format-bar {
    display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: #eef2f7; margin: .75rem 0 .5rem;
}
.ba-format-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .72rem; font-weight: 700; min-width: 0; }
.ba-format-seg.is-video { background: #3b82f6; }
.ba-format-seg.is-image { background: #eab308; color: #1f2937; }
.ba-format-legend { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; font-size: .78rem; color: #495057; }
.ba-format-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; }
.ba-traffic-domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 1.5rem; margin-top: .75rem; }
.ba-domain-block { min-width: 0; }
.ba-domain-head { font-weight: 700; font-size: .85rem; margin-bottom: .15rem; }
.ba-domain-meta { font-size: .72rem; color: #6c757d; margin-bottom: .35rem; }
.ba-url-list { list-style: none; padding: 0; margin: 0; }
.ba-url-list li {
    display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0;
    border-bottom: 1px solid rgba(15,23,42,.05); font-size: .78rem;
}
.ba-url-list a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-url-list a:hover { color: var(--aac-accent); }
.ba-url-list .ba-url-ads { color: #6c757d; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ba-legend {
    display: flex; flex-wrap: wrap; gap: .35rem .85rem; margin-top: .55rem; font-size: .72rem; color: #6c757d;
}
.ba-legend-item { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; }
.ba-legend-swatch { width: .55rem; height: .55rem; border-radius: 2px; flex-shrink: 0; }
.ba-legend-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ba-empty { color: #6c757d; font-size: .85rem; margin: 0; }
/* ---------- Similar brands (after first creative page) ---------- */
#similar-brands-panel { display: none; }
#similar-brands-panel.is-visible { display: block; }
.sb-panel {
    margin-top: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 12px;
    background: #f4f6f8;
    border-top: 3px solid var(--aac-accent);
}
[data-bs-theme="dark"] .sb-panel { background: rgba(255,255,255,.04); }
.sb-title { font-size: .95rem; font-weight: 700; margin: 0 0 .85rem; }
.sb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: .65rem;
}
.sb-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .35rem; padding: .7rem .5rem .65rem;
    background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 10px;
    cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
    min-height: 100%;
}
[data-bs-theme="dark"] .sb-card { background: var(--bs-body-bg); border-color: rgba(255,255,255,.08); }
.sb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.sb-card img, .sb-card .sb-icon-fallback {
    width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #e9ecef;
}
.sb-card .sb-icon-fallback {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; color: #6c757d;
}
.sb-card .sb-name {
    font-size: .78rem; font-weight: 600; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; max-width: 100%;
}
.sb-card .sb-ads { font-size: .7rem; color: #6c757d; }
#creativeModal video,
#creativeModal .modal-media img {
    width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    background: #000;
    object-fit: contain;
}
#creativeModal .modal-media.cm-trend-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 70vh;
    background: #111;
    overflow: hidden;
    border-radius: 8px;
}
#creativeModal .modal-media.cm-trend-media.cm-trend-embed-active {
    aspect-ratio: auto;
    height: min(520px, 70vh);
}
#creativeModal .modal-media.cm-trend-media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}
#creativeModal .modal-media.cm-trend-media iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}
#creativeModal .modal-media.cm-trend-media .no-preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
}
/* Trend detail: full-width stacked body (media → actions → metrics → copy) */
#creativeModal.cm-mode-trend .modal-dialog {
    max-width: min(960px, 96vw);
}
#creativeModal.cm-mode-trend #cm-media-col,
#creativeModal.cm-mode-trend #cm-details-col {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}
#creativeModal.cm-mode-trend .modal-media.cm-trend-media {
    max-width: 100%;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    height: min(560px, 72vh);
}
#cm-trend-media-actions .btn {
    min-height: 34px;
}
.cm-trend-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}
@media (max-width: 575.98px) {
    .cm-trend-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.cm-trend-metric {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    border-radius: 8px;
    padding: .45rem .6rem;
    min-width: 0;
}
.cm-trend-metric-label {
    display: block;
    font-size: .68rem;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #98a6ad;
    margin-bottom: .15rem;
}
.cm-trend-metric-value {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.25;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-grid-loader {
    min-height: 60px;
}
.trend-card .velocity-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(17, 24, 39, .82);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
}
.trend-card .velocity-badge.is-rising {
    background: rgba(5, 120, 85, .9);
}
.ot-findings-list {
    font-size: .78rem;
    margin-bottom: 0;
    padding-left: 1.1rem;
}
.ot-findings-list li {
    margin-bottom: .2rem;
}
.ot-report-board {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ot-report-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, .9fr);
    gap: 12px;
    align-items: stretch;
}
@media (max-width: 991.98px) {
    .ot-report-hero { grid-template-columns: 1fr; }
}
.ot-report-hero-main,
.ot-report-today {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(99, 102, 241, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.97) 100%);
    color: #e2e8f0;
    padding: 1rem 1.05rem .95rem;
    min-width: 0;
}
.ot-report-today {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(52, 211, 153, 0.12), transparent 50%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.97) 100%);
}
.ot-report-kicker {
    margin: 0 0 .4rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.ot-report-headline,
.ot-report-today-copy {
    margin: 0;
    font-size: .95rem;
    line-height: 1.45;
    color: #f1f5f9;
    font-weight: 550;
}
.ot-report-today-copy {
    font-size: .82rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: .7rem;
}
.ot-report-hero .ot-volume-chart {
    border-bottom-color: transparent;
    margin: .75rem 0 0;
    height: auto;
    padding: 0;
}
.ot-volume-caption {
    width: 100%;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 .45rem;
}
.ot-volume-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
    height: 92px;
    padding: .2rem .1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.ot-volume-bar-value {
    font-size: .62rem;
    line-height: 1;
    color: #cbd5e1;
    margin-bottom: 4px;
    min-height: .62rem;
}
.ot-mix-chart {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin: .75rem 0 0;
}
.ot-mix-row {
    display: grid;
    grid-template-columns: minmax(72px, 34%) minmax(0, 1fr) auto;
    gap: .4rem .55rem;
    align-items: center;
}
.ot-mix-label {
    font-size: .75rem;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ot-mix-track {
    height: 8px;
    border-radius: 99px;
    background: rgba(148, 163, 184, .18);
    overflow: hidden;
}
.ot-mix-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #5b8def, #0d6efd);
}
.ot-mix-val {
    font-size: .72rem;
    color: #94a3b8;
    white-space: nowrap;
    text-align: right;
    min-width: 2.4rem;
}
.ot-report-hero .ot-volume-bar-label {
    color: #94a3b8;
}
.ot-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.ot-cat-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    color: #e2e8f0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    padding: 0;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ot-cat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.ot-cat-media {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #020617;
    min-height: 72px;
}
.ot-cat-media img,
.ot-cat-media .ot-cat-media-fallback {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #1e293b;
}
.ot-cat-media .ot-cat-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 232, 240, 0.7);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.ot-cat-body {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: .8rem .85rem .85rem;
    flex: 1;
}
.ot-cat-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
}
.ot-cat-topline h6 {
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -.015em;
}
.ot-cat-meta {
    font-size: .68rem;
    color: #94a3b8;
    white-space: nowrap;
}
.ot-cat-headline {
    margin: 0;
    font-size: .78rem;
    line-height: 1.35;
    color: #cbd5e1;
}
.ot-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.ot-cat-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    border-radius: 999px;
    padding: .14rem .5rem;
    font-size: .68rem;
    font-weight: 550;
    line-height: 1.25;
    cursor: pointer;
}
.ot-cat-chip:hover {
    border-color: rgba(96, 165, 250, 0.45);
    color: #dbeafe;
}
.ot-cat-rising {
    font-size: .7rem;
    color: #6ee7b7;
}
.ot-today-movers {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.ot-today-mover {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.28);
    color: inherit;
    border-radius: 10px;
    padding: .45rem .55rem;
    text-align: left;
    cursor: pointer;
}
.ot-today-mover:hover {
    border-color: rgba(52, 211, 153, 0.35);
}
.ot-today-mover strong {
    font-size: .8rem;
    font-weight: 700;
    color: #f8fafc;
}
.ot-today-mover span {
    font-size: .68rem;
    color: #94a3b8;
    white-space: nowrap;
}
.ot-report-empty {
    margin: 0;
    font-size: .8rem;
    color: #94a3b8;
}
/* Detected Trends — modern media-first grid (dark UI friendly) */
.ot-clusters-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: none;
    overflow: visible;
    padding: 0;
}
@media (max-width: 991.98px) {
    .ot-clusters-list { grid-template-columns: 1fr; }
}
.ot-cluster-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(99, 102, 241, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    color: #e2e8f0;
    overflow: hidden;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ot-cluster-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.ot-cluster-card.is-niche {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.ot-cluster-card.is-scenario {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(52, 211, 153, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.ot-cluster-card.is-audio {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(244, 114, 182, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.ot-cluster-card.is-pattern {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(251, 191, 36, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
}
.ot-cluster-media {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: #020617;
    min-height: 88px;
}
.ot-cluster-media img,
.ot-cluster-media .ot-cluster-media-fallback {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #1e293b;
    cursor: pointer;
}
.ot-cluster-media .ot-cluster-media-fallback {
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 232, 240, 0.75);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    background:
        linear-gradient(145deg, rgba(51, 65, 85, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
}
.ot-cluster-media .ot-cluster-media-fallback[data-platform="tiktok"] {
    background: linear-gradient(145deg, #1f2937 0%, #111827 55%, #0f172a 100%);
}
.ot-cluster-media .ot-cluster-media-fallback[data-platform="instagram"] {
    background: linear-gradient(145deg, #7c3aed 0%, #db2777 55%, #f59e0b 120%);
    color: rgba(255, 255, 255, 0.9);
}
.ot-cluster-body {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .85rem .9rem .9rem;
    flex: 1;
}
.ot-cluster-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.ot-cluster-type {
    display: inline-flex;
    align-items: center;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: .2rem .55rem;
    line-height: 1.2;
}
.ot-cluster-card.is-niche .ot-cluster-type { color: #bae6fd; background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.22); }
.ot-cluster-card.is-scenario .ot-cluster-type { color: #a7f3d0; background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.22); }
.ot-cluster-card.is-audio .ot-cluster-type { color: #fbcfe8; background: rgba(244, 114, 182, 0.14); border-color: rgba(244, 114, 182, 0.22); }
.ot-cluster-card.is-pattern .ot-cluster-type { color: #fde68a; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.22); }
.ot-cluster-share-pill {
    font-size: .78rem;
    font-weight: 750;
    color: #f8fafc;
    background: rgba(37, 99, 235, 0.28);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
    padding: .18rem .55rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.ot-cluster-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    color: #f8fafc;
    letter-spacing: -0.02em;
}
.ot-cluster-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.ot-cluster-chip {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 550;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: .14rem .5rem;
    line-height: 1.25;
    text-transform: capitalize;
}
.ot-cluster-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    margin-top: .1rem;
}
.ot-cluster-stat {
    padding: .4rem .45rem;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-width: 0;
}
.ot-cluster-stat b {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ot-cluster-stat span {
    display: block;
    margin-top: .1rem;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
}
.ot-cluster-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .15rem;
}
.ot-cluster-match {
    font-size: .7rem;
    color: #94a3b8;
}
.ot-cluster-card .trend-cluster-generate-btn {
    border-radius: 999px;
    padding: .32rem .9rem;
    font-weight: 650;
    border-color: rgba(52, 211, 153, 0.45);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.08);
}
.ot-cluster-card .trend-cluster-generate-btn:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.7);
    color: #a7f3d0;
}
.ot-cluster-card {
    cursor: pointer;
}
.ot-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .9rem;
}
.ot-type-tab {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.35);
    color: #cbd5e1;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 650;
    padding: .28rem .7rem;
    line-height: 1.2;
}
.ot-type-tab:hover {
    border-color: rgba(148, 163, 184, 0.4);
    color: #f1f5f9;
}
.ot-type-tab.is-active {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.45);
    color: #dbeafe;
}
.ot-type-tab .ot-type-count {
    opacity: .7;
    margin-left: .25rem;
    font-weight: 500;
}
.ot-region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}
.ot-region-tab {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.25);
    color: #94a3b8;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 650;
    padding: .35rem .65rem;
    line-height: 1.2;
    text-align: left;
}
.ot-region-tab small {
    display: block;
    font-size: .62rem;
    font-weight: 500;
    opacity: .75;
    margin-top: .1rem;
}
.ot-region-tab:hover {
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}
.ot-region-tab.is-active {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}
.ot-keyword-panel {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    background: rgba(2, 6, 23, 0.18);
}
#otc-items-grid .otc-item-card {
    cursor: pointer;
}
#otc-items-grid .otc-item-card .creative-thumb {
    aspect-ratio: 3 / 4;
}
#otc-opening {
    font-size: .85rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    padding: .55rem .7rem;
}
.ot-volume-chart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    margin: .5rem 0 .75rem;
    padding: 0;
    border-bottom: 0;
}
.ot-volume-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    min-width: 0;
}
.ot-volume-bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, #5b8def, #0d6efd);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
}
.ot-volume-bar-label {
    font-size: .65rem;
    color: #98a6ad;
    margin-top: 4px;
    white-space: nowrap;
}
.ref-thumb {
    position: relative;
    width: 40px;
    height: 40px;
}
.ref-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    background: #e9ecef;
}
.ref-thumb .ref-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    border-radius: 50%;
    background: #fa5c7c;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    border: none;
    padding: 0;
}
.ref-add-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    width: 72px;
    min-height: 40px;
    padding: .25rem .3rem;
    border: 1px dashed rgba(var(--aac-accent-rgb), .55);
    border-radius: 6px;
    background: rgba(var(--aac-accent-rgb), .08);
    color: var(--aac-accent);
    font-size: .62rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
}
.ref-add-tile:hover,
.ref-add-tile:focus {
    background: rgba(var(--aac-accent-rgb), .16);
    border-color: var(--aac-accent);
    color: var(--aac-accent);
}
.ref-add-tile:disabled {
    opacity: .45;
    cursor: default;
}
.ref-add-tile i { font-size: .85rem; line-height: 1; }
/* Batch generation window */
.gen-ref-card {
    border: 1px solid var(--ct-border-color, #e3e6ea);
    border-radius: 8px;
    padding: 10px;
}
.gen-ref-card .gen-ref-thumb {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--ct-tertiary-bg, #e9ecef);
    flex-shrink: 0;
}
.tag-chip {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px;
    border-radius: 12px;
    border: 1px solid var(--ct-border-color, #ced4da);
    background: var(--ct-secondary-bg, #fff);
    color: var(--ct-body-color, #495057);
    font-size: .72rem;
    cursor: pointer;
    user-select: none;
    transition: all .1s ease;
}
.tag-chip:not(.active):hover {
    border-color: var(--ct-secondary-color, #98a6ad);
    color: #313a46;
}
.tag-chip.active {
    background: var(--aac-accent);
    border-color: var(--aac-accent);
    color: var(--aac-accent-contrast);
}
.tag-chip.tag-chip-mode.active {
    background: var(--aac-accent);
    border-color: var(--aac-accent);
    color: var(--aac-accent-contrast);
}
.gen-axis {
    border: 1px solid var(--ct-border-color, #e3e6ea);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
}
.gen-axis .gen-axis-modes {
    display: none;
    margin-top: 4px;
}
.gen-axis.active {
    border-color: var(--aac-accent);
    /* Accent tint over the theme background — keeps inherited text readable. */
    background: rgba(var(--aac-accent-rgb), .08);
}
.gen-axis.active .gen-axis-modes {
    display: block;
}
/* Dark theme (Hyper): default borders/muted text are too dim on the dark
   modal background — lift secondary text to a readable light gray while
   keeping it visually secondary. */
[data-bs-theme="dark"] .tag-chip {
    border-color: #4a5b76;
    color: #ced9e4;
}
[data-bs-theme="dark"] .tag-chip:not(.active):hover {
    border-color: #7d8ea8;
    color: #eef2f7;
    background: rgba(255, 255, 255, .06);
}
[data-bs-theme="dark"] .gen-axis.active {
    background: rgba(var(--aac-accent-rgb), .12);
}
[data-bs-theme="dark"] .creative-chat-gen .text-muted,
[data-bs-theme="dark"] .gen-axis .text-muted {
    color: #a8b6c7 !important;
}
/* Batch cards in Your creatives */
.batch-card .variant-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
}
.batch-card .variant-thumb img,
.batch-card .variant-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.batch-card .variant-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.batch-card .variant-thumb .play-overlay i {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    opacity: .85;
}
.creative-thumb video.inline-preview,
.variant-thumb video.inline-preview,
.batch-ref-thumb video.inline-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}
.batch-card .variant-spec-badge {
    font-size: .68rem;
    white-space: normal;
    text-align: left;
}
/* Like / Dislike — hover overlay on the preview, not a permanent footer row */
.rework-feedback {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    gap: .25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.creative-card:hover .rework-feedback,
.batch-card:hover .rework-feedback,
.rework-feedback.is-voted {
    opacity: 1;
    pointer-events: auto;
}
.rework-feedback.is-voted .btn:not(.active-like):not(.active-dislike) {
    display: none;
}
.creative-card:hover .rework-feedback.is-voted .btn,
.batch-card:hover .rework-feedback.is-voted .btn {
    display: inline-flex;
}
.rework-feedback .btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    line-height: 1;
    color: #fff;
    background: rgba(17, 24, 39, .72);
    border-color: rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
}
.rework-feedback .btn.active-like {
    color: #fff;
    background-color: #0acf97;
    border-color: #0acf97;
}
.rework-feedback .btn.active-dislike {
    color: #fff;
    background-color: #fa5c7c;
    border-color: #fa5c7c;
}
.rework-export {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
.rework-export .btn {
    flex: 1 1 auto;
    padding: .2rem .4rem;
    font-size: .75rem;
    line-height: 1.2;
}
#created-drive-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
#created-drive-bar .drive-folder-name {
    max-width: 280px;
}
/* Google Picker renders its own dialog outside our DOM and positions it against
   the document, so on a scrolled page it lands off screen. Pin it to the viewport. */
.picker-dialog-bg {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1090 !important;
}
.picker-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 2rem) !important;
    z-index: 1091 !important;
}
.picker-dialog-content {
    max-height: calc(100vh - 2rem) !important;
}
#cm-feedback .btn.active-like {
    color: #fff;
    background-color: #0acf97;
    border-color: #0acf97;
}
#cm-feedback .btn.active-dislike {
    color: #fff;
    background-color: #fa5c7c;
    border-color: #fa5c7c;
}
/* Batch references popup */
.batch-ref-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
}
.batch-ref-thumb img,
.batch-ref-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.batch-ref-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.batch-ref-thumb .play-overlay i {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    opacity: .85;
}
.batch-ref-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a6ad;
    font-size: 1.5rem;
    background: var(--ct-tertiary-bg, #e9ecef);
}
.batch-refs-link {
    text-decoration: none;
}
.batch-refs-link:hover {
    text-decoration: underline;
}
/* ---------- Chat tab: compact, ChatGPT-like ---------- */
.cchat {
    --cchat-border: var(--ct-border-color, #e2e6ea);
    --cchat-muted: var(--ct-secondary-color, #8a969c);
    --cchat-soft: var(--ct-tertiary-bg, #f4f5f7);
    /* NB: --ct-card-bg only exists on .card in Hyper, so it must not be
       used here — its #fff fallback is what made the chat pane glow white
       against the dark shell. Secondary-bg is defined on :root in both
       themes and matches the card surfaces used elsewhere on the page. */
    --cchat-surface: var(--ct-secondary-bg, #fff);
    display: flex;
    align-items: stretch;
    /* Fill the viewport under topbar + compact head + tabs; only the
       message list scrolls, the composer/gen panel stays pinned. */
    height: calc(100vh - 182px);
    height: calc(100dvh - 182px);
    min-height: 460px;
    border: 1px solid var(--cchat-border);
    border-radius: .75rem;
    overflow: hidden;
    background: var(--cchat-surface);
}
/* Left: conversations */
.cchat-side {
    flex: 0 0 208px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--cchat-border);
    /* One step below the chat surface (ChatGPT-style recessed sidebar). */
    background: var(--ct-body-bg, #f8f9fa);
}
.cchat-side-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem .75rem .45rem;
}
.cchat-side-head span {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--cchat-muted);
}
.cchat-side-list { flex: 1; overflow-y: auto; padding: 0 .4rem .5rem; }
.cchat-session-group {
    font-size: .68rem;
    font-weight: 600;
    color: var(--cchat-muted);
    padding: .7rem .55rem .2rem;
    letter-spacing: .01em;
}
.cchat-session-group:first-child { padding-top: .35rem; }
.cchat-session {
    /* Opaque twin of the row background so the archive button can float over
       the title without reserving a gap for it. */
    --cchat-row-bg: var(--ct-body-bg, #f8f9fa);
    position: relative;
    display: flex; align-items: center; gap: .4rem; width: 100%; text-align: left;
    border: 0; background: transparent; color: inherit;
    font-size: .8rem; line-height: 1.25;
    padding: .42rem .55rem; margin-bottom: 1px; border-radius: .45rem;
    cursor: pointer;
}
.cchat-session-title {
    flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cchat-session-archive {
    position: absolute; top: 50%; right: .3rem; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.45rem; height: 1.45rem; padding: 0;
    border: 0; border-radius: .35rem; background: var(--cchat-row-bg);
    color: var(--cchat-muted); cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity .12s ease, color .12s ease, background-color .12s ease;
}
/* Fades the title out under the button instead of cutting it off. */
.cchat-session-archive::before {
    content: '';
    position: absolute; right: 100%; top: 0; bottom: 0; width: 1.4rem;
    background: linear-gradient(to right, transparent, var(--cchat-row-bg));
    pointer-events: none;
}
.cchat-session:hover .cchat-session-archive,
.cchat-session:focus-within .cchat-session-archive {
    opacity: 1; pointer-events: auto;
}
.cchat-session-archive:hover,
.cchat-session-archive:focus-visible {
    color: inherit;
    background: color-mix(in srgb, #8c96a0 30%, var(--cchat-row-bg));
    outline: none;
}
.cchat-session-archive:disabled { opacity: .45; cursor: wait; }
.cchat-session.is-renaming .cchat-session-archive { display: none; }
.cchat-session.is-renaming { cursor: text; }
.cchat-session-rename {
    flex: 1 1 auto; min-width: 0; width: 100%;
    border: 1px solid color-mix(in srgb, var(--cchat-border, #8a969c) 80%, transparent);
    background: var(--cchat-soft, transparent);
    color: inherit; font: inherit; font-weight: 600; line-height: 1.25;
    padding: .08rem .3rem; border-radius: .3rem; outline: none;
}
.cchat-session-rename:focus {
    border-color: var(--aac-accent, #556ee6);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aac-accent, #556ee6) 28%, transparent);
}
.cchat-session-working {
    flex: 0 0 auto;
    width: .65rem; height: .65rem;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: .7;
    animation: cchat-session-spin .7s linear infinite;
}
@keyframes cchat-session-spin {
    to { transform: rotate(360deg); }
}
.cchat-session:hover {
    background: rgba(140, 150, 160, .14);
    --cchat-row-bg: color-mix(in srgb, #8c96a0 14%, var(--ct-body-bg, #f8f9fa));
}
.cchat-session.active {
    background: rgba(140, 150, 160, .22); font-weight: 600;
    --cchat-row-bg: color-mix(in srgb, #8c96a0 22%, var(--ct-body-bg, #f8f9fa));
}
.cchat-session.active:hover {
    --cchat-row-bg: color-mix(in srgb, #8c96a0 33%, var(--ct-body-bg, #f8f9fa));
}
.cchat-session.is-working .cchat-session-working { opacity: 1; color: var(--aac-accent, #556ee6); }
/* Keep the spinner visible next to the floating archive button. */
.cchat-session.is-working:hover .cchat-session-working,
.cchat-session.is-working:focus-within .cchat-session-working {
    margin-right: 1.5rem;
}
.cchat-side-empty { padding: .75rem .6rem; font-size: .78rem; color: var(--cchat-muted); }
.cchat-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: .45rem; margin: 0;
    border: 0; background: transparent; color: var(--cchat-muted); cursor: pointer;
    font-size: 1rem;
}
.cchat-icon-btn:hover { background: rgba(140, 150, 160, .16); color: inherit; }
.cchat-icon-btn:disabled { opacity: .45; cursor: not-allowed; }
/* Center: transcript + panels + composer */
.cchat-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cchat-scroll { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem 0; }
.cchat-thread { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.cchat-msg { margin-bottom: 1rem; font-size: .875rem; line-height: 1.55; }
.cchat-time-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin: .85rem 0 1rem;
    font-size: .68rem;
    font-weight: 600;
    color: var(--cchat-muted);
    letter-spacing: .01em;
    text-align: center;
    user-select: none;
}
.cchat-time-sep::before,
.cchat-time-sep::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--cchat-border);
    max-width: 72px;
    opacity: .85;
}
.cchat-time-sep.is-relative {
    font-weight: 500;
    font-style: italic;
}
.cchat-msg-user { display: flex; justify-content: flex-end; }
.cchat-msg-user .cchat-user-wrap {
    display: flex; flex-direction: column; align-items: flex-end; max-width: 78%;
}
.cchat-msg-user .cchat-role {
    font-size: .66rem; font-weight: 700; text-transform: none;
    letter-spacing: .01em; color: var(--cchat-muted); margin-bottom: .2rem;
    padding: 0 .15rem; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cchat-msg-user .cchat-bubble {
    max-width: 100%;
    background: var(--cchat-soft);
    border-radius: 1rem;
    padding: .55rem .9rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.cchat-msg-assistant .cchat-content { max-width: 100%; white-space: pre-wrap; word-break: break-word; }
.cchat-msg-assistant .cchat-role {
    font-size: .66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--cchat-muted); margin-bottom: .15rem;
}
.cchat-thinking {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--cchat-muted); font-style: italic; white-space: nowrap;
}
.cchat-thinking.cchat-replying { font-style: normal; }
.cchat-thinking-dots { display: inline-flex; gap: 3px; }
.cchat-thinking-dots span {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--cchat-muted); opacity: .35;
    animation: cchat-think 1.1s ease-in-out infinite;
}
.cchat-thinking-dots span:nth-child(2) { animation-delay: .18s; }
.cchat-thinking-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes cchat-think {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}
/* Welcome (empty state) */
.creative-chat-welcome { max-width: 560px; margin: 14vh auto 0; text-align: center; }
.creative-chat-welcome h4 { letter-spacing: -.02em; font-size: 1.15rem; }
.creative-chat-welcome p { font-size: .82rem; }
.creative-chat-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.creative-chat-action {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--cchat-border); background: transparent;
    border-radius: 999px; padding: .38rem .85rem;
    font-size: .8rem; color: inherit;
}
.creative-chat-action:hover, .creative-chat-action:focus { background: var(--cchat-soft); border-color: var(--cchat-muted); }
.creative-chat-action i { font-size: .95rem; color: var(--cchat-muted); }
/* Billing onboarding landing (no balance yet) */
.creative-chat-landing {
    max-width: 720px; margin: 6vh auto 0; text-align: center;
    padding: 1.75rem 1.35rem 2rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(var(--aac-accent-rgb), .2), transparent 55%),
        linear-gradient(180deg, rgba(148, 163, 184, .08), transparent 70%);
    border: 1px solid var(--cchat-border);
}
.creative-chat-landing-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .65rem; border-radius: 999px;
    font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--aac-accent); background: rgba(var(--aac-accent-rgb), .12);
    border: 1px solid rgba(var(--aac-accent-rgb), .22);
    margin-bottom: .85rem;
}
.creative-chat-landing h3 {
    letter-spacing: -.03em; font-size: 1.55rem; font-weight: 700; margin-bottom: .55rem;
    line-height: 1.2;
}
.creative-chat-landing .lead {
    font-size: .92rem; color: var(--cchat-muted); max-width: 36rem; margin: 0 auto 1.25rem;
    line-height: 1.55;
}
.creative-chat-landing-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem;
    text-align: left; max-width: 34rem; margin: 0 auto 1.25rem;
}
@media (max-width: 575.98px) {
    .creative-chat-landing-grid { grid-template-columns: 1fr; }
}
.creative-chat-landing-feature {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .65rem .75rem; border-radius: .75rem;
    background: rgba(148, 163, 184, .06);
    border: 1px solid rgba(148, 163, 184, .12);
    font-size: .8rem; line-height: 1.4;
}
[data-bs-theme="dark"] .creative-chat-landing-feature {
    background: rgba(15, 23, 42, .35);
    border-color: rgba(148, 163, 184, .14);
}
.creative-chat-landing-feature i {
    flex: 0 0 auto;
    color: var(--aac-accent); font-size: 1.1rem; margin-top: .05rem;
}
.creative-chat-landing-feature strong {
    display: block; font-size: .82rem; margin-bottom: .1rem;
}
.creative-chat-landing-price {
    display: inline-flex; align-items: baseline; gap: .25rem;
    padding: .45rem .85rem; border-radius: .65rem;
    background: rgba(var(--aac-accent-rgb), .1);
    border: 1px solid rgba(var(--aac-accent-rgb), .2);
    font-size: .82rem; color: var(--cchat-muted); margin-bottom: 1rem;
}
.creative-chat-landing-price .amt {
    font-size: 1.35rem; font-weight: 700; color: var(--aac-accent);
}
/* Subscribe modal — sales landing + checkout */
#creativesSubscribeModal .modal-dialog { max-width: 920px; }
#creativesSubscribeModal .modal-header {
    position: absolute; top: 0; right: 0; z-index: 2;
    border: 0; padding: .85rem 1rem;
}
#creativesSubscribeModal .modal-body { padding: 1.35rem 1.35rem 1.4rem; }
.cs-landing-grid {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1.35rem;
    align-items: start;
}
@media (max-width: 767.98px) {
    .cs-landing-grid { grid-template-columns: 1fr; gap: 1rem; }
    #creativesSubscribeModal .modal-body { padding-top: 2.5rem; }
}
.cs-landing-hero {
    padding: .25rem .15rem 0;
}
.cs-landing-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .22rem .6rem; border-radius: 999px;
    font-size: .65rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
    color: var(--aac-accent); background: rgba(var(--aac-accent-rgb), .12);
    border: 1px solid rgba(var(--aac-accent-rgb), .22);
    margin-bottom: .75rem;
}
.cs-landing-title {
    font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em;
    line-height: 1.18; margin-bottom: .55rem;
}
.cs-landing-lead {
    font-size: .88rem; color: var(--bs-secondary-color, #64748b);
    line-height: 1.55; margin-bottom: 1rem; max-width: 34rem;
}
.cs-context-banner {
    display: flex; gap: .55rem; align-items: flex-start;
    padding: .65rem .8rem; border-radius: .65rem; margin-bottom: 1rem;
    font-size: .82rem; line-height: 1.45;
    color: #92400e; background: rgba(251, 191, 36, .14);
    border: 1px solid rgba(251, 191, 36, .28);
}
[data-bs-theme="dark"] .cs-context-banner {
    color: #fcd34d; background: rgba(251, 191, 36, .1);
    border-color: rgba(251, 191, 36, .22);
}
.cs-context-banner i { font-size: 1rem; margin-top: .1rem; flex-shrink: 0; }
.cs-features {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem;
    margin-bottom: 1rem;
}
@media (max-width: 575.98px) {
    .cs-features { grid-template-columns: 1fr; }
}
.cs-feature {
    display: flex; gap: .55rem; align-items: flex-start;
    padding: .62rem .7rem; border-radius: .7rem;
    background: rgba(148, 163, 184, .07);
    border: 1px solid rgba(148, 163, 184, .14);
    font-size: .78rem; line-height: 1.4;
}
[data-bs-theme="dark"] .cs-feature {
    background: rgba(15, 23, 42, .4);
    border-color: rgba(148, 163, 184, .16);
}
.cs-feature i {
    flex: 0 0 auto; color: var(--aac-accent); font-size: 1.05rem; margin-top: .05rem;
}
.cs-feature strong { display: block; font-size: .8rem; margin-bottom: .08rem; }
.cs-pricing-strip {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .65rem;
    padding: .7rem .85rem; border-radius: .75rem;
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(var(--aac-accent-rgb), .14), transparent 60%),
        rgba(var(--aac-accent-rgb), .06);
    border: 1px solid rgba(var(--aac-accent-rgb), .2);
}
.cs-price {
    font-size: 1.65rem; font-weight: 700; color: var(--aac-accent);
    letter-spacing: -.02em; line-height: 1;
}
.cs-price-period { font-size: .9rem; font-weight: 600; color: var(--bs-body-color); }
.cs-price-note { font-size: .75rem; color: var(--bs-secondary-color, #64748b); width: 100%; }
.cs-checkout {
    padding: 1rem 1rem 1.05rem; border-radius: .85rem;
    background: rgba(148, 163, 184, .06);
    border: 1px solid rgba(148, 163, 184, .16);
}
[data-bs-theme="dark"] .cs-checkout {
    background: rgba(15, 23, 42, .45);
    border-color: rgba(148, 163, 184, .18);
}
.cs-checkout-title {
    font-size: 1rem; font-weight: 700; margin-bottom: .25rem;
}
.cs-checkout-sub {
    font-size: .78rem; color: var(--bs-secondary-color, #64748b);
    line-height: 1.45; margin-bottom: .85rem;
}
#creativesBalanceModal .cb-tx-list {
    max-height: 220px; overflow: auto; font-size: .8rem;
}
#creativesBalanceModal .cb-tx-row {
    display: flex; justify-content: space-between; gap: .75rem;
    padding: .4rem 0; border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.06));
}
#creativesBalanceModal .cb-tx-row:last-child { border-bottom: 0; }
#creativesBalanceModal .cb-amount-pos { color: #059669; font-weight: 600; }
#creativesBalanceModal .cb-amount-neg { color: #dc2626; font-weight: 600; }
#creativesBalanceModal .cb-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
#creativesSubscribeModal .cs-express {
    min-height: 48px;
    margin-bottom: .75rem;
}
#creativesSubscribeModal .cs-express:empty { display: none; min-height: 0; margin: 0; }
#creativesSubscribeModal .cs-payment {
    min-height: 180px;
    margin-bottom: .75rem;
}
#creativesSubscribeModal .cs-divider {
    display: flex; align-items: center; gap: .75rem;
    color: #94a3b8; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
    margin: .25rem 0 .85rem;
}
#creativesSubscribeModal .cs-divider::before,
#creativesSubscribeModal .cs-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--bs-border-color, #e2e8f0);
}
#creativesSubscribeModal .cs-footnote {
    font-size: .78rem; color: #64748b; line-height: 1.45; margin-top: .85rem;
}
#creativesSubscribeModal .cs-saved-card-row {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .7rem .8rem; border-radius: .7rem; margin-bottom: .75rem;
    background: rgba(148, 163, 184, .1);
    border: 1px solid rgba(148, 163, 184, .22);
}
[data-bs-theme="dark"] #creativesSubscribeModal .cs-saved-card-row {
    background: rgba(15, 23, 42, .5);
    border-color: rgba(148, 163, 184, .2);
}
#creativesSubscribeModal .cs-saved-card-row i {
    flex: 0 0 auto; font-size: 1.1rem; color: var(--aac-accent); margin-top: .1rem;
}
#creativesSubscribeModal .cs-saved-card-row strong {
    display: block; font-size: .85rem; margin-bottom: .1rem;
}
#creativesSubscribeModal .cs-saved-card-row span {
    font-size: .76rem; color: var(--bs-secondary-color, #64748b); line-height: 1.4;
}
#creativesSubscribeModal .cs-saved-alt {
    margin-top: .35rem; font-size: .78rem; text-decoration: none;
}
/* Stripe mandate text fallback (Appearance API terms.card=never is primary) */
#creativesSubscribeModal .TermsText,
#creativesSubscribeModal [class*="TermsText"] {
    display: none !important;
}
/* Composer */
.cchat-composer { flex: 0 0 auto; padding: .65rem 1.25rem .9rem; }
.cchat-composer-box {
    display: flex; align-items: flex-end; gap: .3rem;
    max-width: 760px; margin: 0 auto;
    border: 1px solid var(--cchat-border);
    border-radius: 1.4rem;
    background: var(--cchat-soft);
    padding: .3rem .35rem .3rem .5rem;
}
.cchat-composer-box:focus-within {
    border-color: rgba(var(--aac-accent-rgb), .55);
    box-shadow: 0 0 0 3px rgba(var(--aac-accent-rgb), .08);
}
.cchat-composer-box textarea {
    flex: 1; border: 0; outline: none; box-shadow: none; resize: none;
    background: transparent; color: inherit;
    font-size: .875rem; line-height: 1.45;
    padding: .35rem .25rem; max-height: 160px;
}
.cchat-send {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; border: 0;
    background: #1f2937; color: #fff; font-size: 1rem; cursor: pointer;
}
.cchat-send:hover:not(:disabled) { opacity: .85; }
.cchat-send:disabled { opacity: .45; cursor: not-allowed; }
[data-bs-theme="dark"] .cchat-send { background: #e5e7eb; color: #111827; }
.cchat-voice {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; border: 0;
    background: transparent; color: var(--cchat-muted);
    font-size: 1.05rem; cursor: pointer; padding: 0;
}
.cchat-voice:hover:not(:disabled) { background: rgba(140, 150, 160, .16); color: inherit; }
.cchat-voice.is-recording {
    color: #fff;
    background: #dc2626;
    animation: cchat-voice-pulse 1.2s ease-in-out infinite;
}
.cchat-voice.is-busy { opacity: .55; cursor: wait; }
.cchat-voice:disabled { opacity: .45; cursor: not-allowed; }
@keyframes cchat-voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); }
    50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
/* Pending attachments strip above the composer */
.cchat-attachments {
    display: flex; flex-wrap: wrap; gap: .5rem;
    max-width: 760px; margin: 0 auto .45rem;
}
.cchat-attachment {
    position: relative; display: flex; align-items: center; gap: .45rem;
    border: 1px solid var(--cchat-border); background: var(--cchat-soft);
    border-radius: .65rem; padding: .3rem .55rem .3rem .3rem;
    max-width: 220px;
}
.cchat-attachment-thumb {
    width: 42px; height: 42px; border-radius: .45rem; overflow: hidden;
    flex: 0 0 auto; position: relative; background: #0f172a;
}
.cchat-attachment-thumb img, .cchat-attachment-thumb video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.cchat-attachment-thumb .cchat-attachment-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .85rem; background: rgba(15, 23, 42, .35); pointer-events: none;
}
.cchat-attachment-name {
    font-size: .72rem; max-width: 140px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cchat-attachment-remove {
    position: absolute; top: -7px; right: -7px;
    width: 18px; height: 18px; border-radius: 50%; border: 0;
    background: rgba(15, 23, 42, .8); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; line-height: 1; cursor: pointer; padding: 0;
}
.cchat-attachment-remove:hover { background: rgba(220, 38, 38, .9); }
/* Sticky edit-target chip above the composer */
.cchat-edit-target {
    max-width: 760px; margin: 0 auto .45rem;
}
.cchat-edit-target-chip {
    display: flex; align-items: center; gap: .55rem;
    border: 1px solid var(--aac-accent, #0d9488);
    background: color-mix(in srgb, var(--aac-accent, #0d9488) 10%, var(--cchat-surface, #fff));
    border-radius: .75rem; padding: .35rem .55rem .35rem .35rem;
}
.cchat-edit-target-thumb {
    width: 40px; height: 52px; border-radius: .45rem; overflow: hidden;
    flex: 0 0 auto; background: #0f172a;
}
.cchat-edit-target-thumb img, .cchat-edit-target-thumb video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.cchat-edit-target-meta { flex: 1 1 auto; min-width: 0; }
.cchat-edit-target-meta strong { display: block; font-size: .78rem; }
.cchat-edit-target-meta span { font-size: .68rem; color: var(--cchat-muted, #6b7280); }
.cchat-edit-target-clear {
    border: 0; background: transparent; color: var(--cchat-muted, #6b7280);
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.cchat-edit-target-clear:hover { background: rgba(15, 23, 42, .06); color: #111; }
.cchat-edit-target-actions {
    display: flex; align-items: center; gap: .3rem; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end;
}
.cchat-edit-target-edit {
    border: 0; cursor: pointer; white-space: nowrap;
    background: var(--aac-accent, #0d9488); color: #fff;
    font-size: .72rem; font-weight: 600; line-height: 1.2;
    border-radius: 999px; padding: .28rem .7rem;
}
.cchat-edit-target-edit:hover { filter: brightness(1.08); }
.scene-editor { min-width: 0; }
.scene-editor-rail {
    display: flex; gap: .55rem; overflow-x: auto; padding: .15rem .1rem .55rem;
    scrollbar-width: thin;
}
.scene-editor-tile {
    position: relative;
    flex: 0 0 108px; width: 108px; border: 1px solid var(--ct-border-color, rgba(100, 116, 139, .18));
    background: var(--ct-tertiary-bg, var(--cchat-soft, transparent)); color: inherit; border-radius: 12px;
    padding: .4rem; text-align: left; cursor: pointer;
}
.scene-editor-tile:hover { border-color: var(--aac-accent, #0d9488); }
.scene-editor-tile.is-active {
    border-color: var(--aac-accent, #0d9488);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aac-accent, #0d9488) 35%, transparent);
}
.scene-editor-thumb {
    display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px;
    overflow: hidden; background: #0f172a; margin-bottom: .4rem;
}
.scene-editor-thumb img, .scene-editor-thumb video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.scene-editor-thumb .scene-editor-empty {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 1.35rem;
}
.scene-editor-thumb.is-vo,
.scene-editor-thumb.is-add {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
}
.scene-editor-thumb.is-vo { background: color-mix(in srgb, var(--aac-accent, #0d9488) 16%, #0f172a); color: #fff; }
.scene-editor-tile-label { display: block; font-size: .72rem; font-weight: 700; line-height: 1.2; }
.scene-editor-tile-meta { display: block; font-size: .65rem; color: var(--cchat-muted, #6b7280); }
.scene-editor-tile-excerpt {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: .62rem; line-height: 1.3; margin-top: .2rem;
    color: var(--cchat-muted, #6b7280);
}
.scene-editor-tile[draggable="true"] { cursor: grab; }
.scene-editor-tile.is-dragging { opacity: .42; cursor: grabbing; }
.scene-editor-tile.drag-over-before {
    box-shadow: inset 3px 0 0 var(--aac-accent, #0d9488);
}
.scene-editor-tile.drag-over-after {
    box-shadow: inset -3px 0 0 var(--aac-accent, #0d9488);
}
.scene-editor-tile--add .scene-editor-thumb,
.scene-editor-thumb.is-add {
    background: transparent; border: 1.5px dashed rgba(100, 116, 139, .4);
    color: var(--aac-accent, #0d9488);
}
.scene-editor-hint {
    font-size: .68rem; color: var(--cchat-muted, #6b7280); margin: -.1rem 0 .5rem;
}
.scene-editor-pane {
    border: 1px solid var(--ct-border-color, rgba(100, 116, 139, .18));
    border-radius: 14px; padding: .85rem .95rem;
    background: var(--ct-tertiary-bg, var(--ct-secondary-bg, transparent));
    color: inherit;
}
[data-bs-theme="dark"] .scene-editor-pane {
    background: rgba(15, 23, 42, .55);
    border-color: rgba(148, 163, 184, .2);
}
.scene-editor-pane .form-label,
.scene-editor-pane strong { color: inherit; }
.scene-editor-pane textarea, .scene-editor-pane input, .scene-editor-pane select { font-size: .82rem; line-height: 1.45; }
.scene-prompt-field { position: relative; }
.scene-prompt-field textarea { padding-bottom: 2.15rem; }
.scene-clip-preview {
    display: flex; align-items: flex-start; gap: .65rem; margin-top: .55rem;
}
.scene-clip-preview video {
    width: 72px; height: 96px; object-fit: cover; border-radius: 8px;
    background: #0f172a; flex: 0 0 auto;
}
[data-bs-theme="dark"] .scene-clip-preview video { background: #020617; }
.scene-prompt-mic {
    position: absolute; right: .4rem; bottom: .35rem;
    width: 28px; height: 28px;
}
.scene-editor-tile-delete {
    position: absolute; top: .28rem; right: .28rem; z-index: 2;
    width: 20px; height: 20px; border: 0; border-radius: 999px;
    background: rgba(15, 23, 42, .72); color: #fff;
    font-size: .7rem; line-height: 1; display: none;
    align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
.scene-editor-tile:hover .scene-editor-tile-delete,
.scene-editor-tile.is-active .scene-editor-tile-delete { display: inline-flex; }
.scene-editor-tile-delete:hover { background: #dc2626; }
.scene-ctx-menu {
    position: fixed; z-index: 1080; min-width: 196px;
    padding: .3rem; border-radius: 10px;
    background: var(--ct-secondary-bg, #fff);
    border: 1px solid var(--ct-border-color, rgba(100, 116, 139, .2));
    box-shadow: 0 16px 40px -18px rgba(15, 23, 42, .45);
}
[data-bs-theme="dark"] .scene-ctx-menu {
    background: #1e293b; border-color: rgba(148, 163, 184, .22);
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .65);
}
.scene-ctx-menu button {
    display: block; width: 100%; text-align: left;
    border: 0; background: transparent; color: inherit;
    font-size: .8rem; padding: .4rem .55rem; border-radius: 7px; cursor: pointer;
}
.scene-ctx-menu button:hover { background: rgba(var(--aac-accent-rgb), .12); }
.scene-ctx-menu button.is-danger { color: #dc2626; }
.scene-ctx-menu button:disabled { opacity: .45; cursor: not-allowed; }
.scene-editor-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .7rem;
}
.scene-editor-actions .form-check { margin-right: auto; }
#cm-scene-panel { margin-top: .25rem; }
#creativeModal.cm-mode-rework .modal-dialog { max-width: 1080px; }
/* Right: Target audiences library */
.cchat-memory {
    flex: 0 0 280px;
    width: 280px;
    min-width: 0;
    border-left: 1px solid var(--cchat-border);
    overflow: hidden;
    background: var(--cchat-surface);
    display: flex;
    flex-direction: column;
    transition: flex-basis .18s ease, width .18s ease;
}
.cchat-memory.is-collapsed {
    flex-basis: 42px;
    width: 42px;
}
.cchat-audiences-head {
    display: flex; align-items: center; gap: .3rem;
    padding: .65rem .7rem .65rem .55rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--cchat-muted);
    border-bottom: 1px solid var(--cchat-border);
    flex: 0 0 auto;
}
.cchat-audiences-title {
    flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cchat-audiences-head-actions {
    display: flex; align-items: center; gap: .1rem;
    flex: 0 0 auto; margin-left: auto;
}
.cchat-audiences-head .cchat-icon-btn { width: 1.6rem; height: 1.6rem; }
.cchat-audiences-toggle i { transition: transform .15s ease; }
.cchat-memory.is-collapsed .cchat-audiences-head {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: .4rem .2rem;
    gap: .25rem;
    border-bottom: 0;
}
.cchat-memory.is-collapsed .cchat-audiences-title { display: none; }
.cchat-memory.is-collapsed .cchat-audiences-head-actions { margin-left: 0; }
.cchat-memory.is-collapsed .cchat-audiences-toggle i { transform: rotate(180deg); }
.cchat-memory.is-collapsed .cchat-audiences-list { display: none; }
.cchat-audiences-list {
    padding: .5rem .55rem .85rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.cchat-audience-card {
    position: relative;
    border: 1px solid var(--cchat-border);
    border-radius: .55rem;
    background: var(--cchat-soft);
    margin-bottom: .45rem;
    overflow: hidden;
}
.cchat-audience-card.is-generating {
    pointer-events: none;
    animation: cchat-audience-pulse 1.4s ease-in-out infinite;
}
.cchat-audience-generating {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .75rem;
    background: color-mix(in srgb, var(--cchat-soft) 82%, transparent);
    font-size: .75rem;
    font-weight: 600;
    color: var(--cchat-muted);
    text-align: center;
}
.cchat-audience-generating .spinner-border {
    width: 1.35rem;
    height: 1.35rem;
    border-width: .15rem;
}
@keyframes cchat-audience-pulse {
    0%, 100% { opacity: .88; }
    50% { opacity: 1; }
}
.cchat-audience-card.active {
    border-color: color-mix(in srgb, var(--aac-accent, #4f46e5) 55%, var(--cchat-border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--aac-accent, #4f46e5) 25%, transparent);
}
.cchat-audience-card.is-dragging {
    opacity: .45;
}
.cchat-audience-card.drag-over-before {
    box-shadow: inset 0 2px 0 0 var(--aac-accent, #4f46e5);
}
.cchat-audience-card.drag-over-after {
    box-shadow: inset 0 -2px 0 0 var(--aac-accent, #4f46e5);
}
.cchat-audience-card-head {
    display: flex; align-items: flex-start; gap: .35rem;
    padding: .45rem .5rem;
    cursor: grab;
}
.cchat-audience-card.is-dragging .cchat-audience-card-head { cursor: grabbing; }
.cchat-audience-card-head .cchat-audience-title {
    flex: 1 1 auto; min-width: 0;
    font-size: .8rem; font-weight: 600; line-height: 1.25;
}
.cchat-audience-card-head .cchat-audience-meta {
    display: block; font-size: .68rem; font-weight: 400; color: var(--cchat-muted);
    margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cchat-audience-actions { display: flex; gap: .15rem; flex: 0 0 auto; }
.cchat-audience-actions button {
    border: 0; background: transparent; color: var(--cchat-muted);
    width: 1.45rem; height: 1.45rem; border-radius: .35rem; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.cchat-audience-actions button:hover { background: rgba(140, 150, 160, .18); color: inherit; }
.cchat-audience-body { padding: 0 .55rem .55rem; border-top: 1px dashed var(--cchat-border); }
.cchat-audience-body .form-label { font-size: .68rem; margin: .45rem 0 .1rem; color: var(--cchat-muted); }
.cchat-audience-body .form-control { font-size: .78rem; }
.cchat-audience-label-row {
    display: flex; align-items: center; justify-content: space-between; gap: .35rem;
    margin: .45rem 0 .1rem;
}
.cchat-audience-label-row .form-label { margin: 0; }
.cchat-audience-voice,
.cchat-audience-infer {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.45rem; height: 1.45rem; border-radius: .35rem; border: 0;
    background: transparent; color: var(--cchat-muted); padding: 0; cursor: pointer;
    font-size: .95rem;
}
.cchat-audience-voice:hover:not(:disabled),
.cchat-audience-infer:hover:not(:disabled) { background: rgba(140, 150, 160, .18); color: inherit; }
.cchat-audience-voice.is-recording {
    color: #fff; background: #dc2626;
    animation: cchat-voice-pulse 1.2s ease-in-out infinite;
}
.cchat-audience-voice.is-busy,
.cchat-audience-infer.is-busy { opacity: .55; cursor: wait; }
.cchat-audience-infer-actions { display: inline-flex; gap: .15rem; align-items: center; }
.cchat-audience-empty { font-size: .78rem; color: var(--cchat-muted); padding: .75rem .35rem; text-align: center; }
.cchat-audience-use {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.15rem; height: 1.15rem; margin-left: .25rem; vertical-align: -0.1em;
    border-radius: 50%;
    background: var(--aac-accent, #0acf97);
    color: var(--aac-accent-contrast, #0f172a);
    font-size: .72rem; line-height: 1;
}
.cchat-audience-use i { line-height: 1; }
@media (max-width: 991.98px) {
    .cchat { flex-direction: column; height: auto; min-height: 0; }
    .cchat-side { flex: 0 0 auto; max-height: 160px; border-right: 0; border-bottom: 1px solid var(--cchat-border); }
    .cchat-main { min-height: 420px; }
    .cchat-scroll { max-height: 55vh; }
    .cchat-memory { flex: 0 0 auto; width: auto; border-left: 0; border-top: 1px solid var(--cchat-border); max-height: 320px; }
    .cchat-memory.is-collapsed { flex-basis: auto; width: auto; max-height: none; }
    .cchat-memory.is-collapsed .cchat-audiences-head {
        flex-direction: row;
        align-items: center;
        padding: .65rem .7rem .65rem .55rem;
        gap: .3rem;
    }
    .cchat-memory.is-collapsed .cchat-audiences-title { display: block; flex: 1 1 auto; }
    .cchat-memory.is-collapsed .cchat-audiences-head-actions { margin-left: auto; }
}
/* Attached creative card in the transcript */
.creative-chat-attached { border-color: var(--cchat-border) !important; background: var(--cchat-surface) !important; }
.creative-chat-attached summary { cursor: pointer; }
.creative-chat-attached textarea { background: var(--cchat-soft); }
/* Chat-native generation setup (replaces the old Start Generation modal) */
.creative-chat-gen { background: var(--cchat-surface); flex: 0 0 auto; display: flex; flex-direction: column; min-height: 0; }
.creative-chat-gen .creative-chat-gen-body { max-height: 44vh; overflow: auto; }
.creative-chat-gen .creative-chat-gen-body .form-label,
.creative-chat-gen .creative-chat-gen-body small { font-size: .74rem; }
.creative-chat-gen .creative-chat-gen-reco {
    border: 1px dashed var(--cchat-border);
    border-radius: .5rem;
    background: var(--cchat-soft);
}
.creative-chat-gen .gen-ref-card { padding: 6px; }
.creative-chat-gen .gen-ref-card .gen-ref-thumb { width: 48px; height: 60px; }
.creative-chat-gen summary { cursor: pointer; }
/* Create Original — scenario structure as light selectable tags */
.co-scenario-wrap { width: 100%; }
.co-scenario-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.co-scenario-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 1px solid var(--cchat-border, #ced4da);
    background: transparent;
    color: var(--ct-secondary-color, #8a969c);
    border-radius: 999px;
    padding: .22rem .65rem .22rem .5rem;
    font-size: .72rem;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.co-scenario-tag i { font-size: .85rem; opacity: .85; }
.co-scenario-tag:hover {
    color: var(--ct-emphasis-color, #313a46);
    border-color: var(--ct-emphasis-color, #98a6ad);
}
.co-scenario-tag.is-active {
    color: var(--aac-accent, #0d9488);
    border-color: var(--aac-accent, #0d9488);
    background: color-mix(in srgb, var(--aac-accent, #0d9488) 10%, transparent);
}
.co-scenario-tag.is-active i { opacity: 1; }
.co-scenario-tag:disabled {
    opacity: .55;
    cursor: default;
}
[data-bs-theme="dark"] .co-scenario-tag {
    border-color: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .55);
}
[data-bs-theme="dark"] .co-scenario-tag:hover {
    color: rgba(255, 255, 255, .85);
    border-color: rgba(255, 255, 255, .28);
}
[data-bs-theme="dark"] .co-scenario-tag.is-active {
    color: #5eead4;
    border-color: #0d9488;
    background: rgba(13, 148, 136, .16);
}
.co-scenario-status {
    font-size: .7rem;
    color: var(--cchat-muted, #8a969c);
}
.co-format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: .55rem;
}
.co-format-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    border: 1px solid var(--cchat-border, #ced4da);
    background: transparent;
    color: inherit;
    border-radius: 12px;
    padding: .35rem;
    cursor: pointer;
    text-align: left;
    min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.co-format-card:hover { border-color: var(--aac-accent, #0d9488); }
.co-format-card.is-active {
    border-color: var(--aac-accent, #0d9488);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aac-accent, #0d9488) 35%, transparent);
}
.co-format-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #111827;
    pointer-events: none;
}
.co-format-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}
.co-format-label {
    font-size: .68rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--ct-emphasis-color, #313a46);
}
[data-bs-theme="dark"] .co-format-card {
    border-color: rgba(255, 255, 255, .14);
}
[data-bs-theme="dark"] .co-format-label { color: rgba(255, 255, 255, .82); }
/* Launch panels own the whole transcript column — empty chat above is wasted. */
.cchat-main.cchat-main--gen-open > .cchat-scroll {
    display: none;
}
.cchat-main.cchat-main--gen-open > .creative-chat-gen:not(.d-none) {
    flex: 1 1 auto;
    border-top: 0;
    min-height: 0;
}
.cchat-main.cchat-main--gen-open > .creative-chat-gen:not(.d-none) .creative-chat-gen-body {
    max-height: none;
    flex: 1 1 auto;
    overflow: auto;
}
/* Trend context chip in the Create Original panel */
.creative-chat-trend-chip {
    display: inline-block;
    font-size: .78rem;
    padding: .3rem .6rem;
    border: 1px solid var(--cchat-border);
    border-radius: 999px;
    background: var(--cchat-soft);
}
.creative-chat-trend-chip i { color: var(--ct-danger, #fa5c7c); }
/* Persisted trend identity under the first generation message */
.creative-chat-trend-card {
    margin-top: .55rem;
    padding: .55rem .7rem;
    border: 1px solid var(--cchat-border);
    border-radius: .5rem;
    background: var(--cchat-soft);
    font-size: .78rem;
    line-height: 1.45;
    max-width: 520px;
}
.creative-chat-trend-card-title { font-weight: 600; margin-bottom: .15rem; }
.creative-chat-trend-card-meta { color: var(--cchat-muted); margin-bottom: .2rem; }
.creative-chat-trend-card-summary { margin-bottom: .2rem; white-space: pre-wrap; word-break: break-word; }
.creative-chat-trend-card a { font-size: .76rem; }
[data-bs-theme="dark"] #chat-original-panel .alert-light {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(152, 166, 173, .3);
    color: #ced9e4;
}
/* Reference strip on batch_started messages */
.creative-chat-ref-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .5rem;
    max-width: 100%;
}
.creative-chat-ref-card {
    flex: 0 0 auto;
    width: 58px;
    cursor: pointer;
}
.creative-chat-ref-card:hover .creative-chat-ref-thumb { border-color: var(--aac-accent); }
.creative-chat-ref-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: .35rem;
    overflow: hidden;
    border: 1px solid rgba(152, 166, 173, .3);
    background: var(--ct-tertiary-bg, #e9ecef);
}
.creative-chat-ref-thumb img,
.creative-chat-ref-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.creative-chat-ref-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.creative-chat-ref-thumb .play-overlay i {
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
    opacity: .9;
}
.creative-chat-ref-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cchat-muted);
    font-size: 1rem;
}
.creative-chat-ref-label {
    margin-top: .15rem;
    font-size: .58rem;
    line-height: 1.2;
    color: var(--cchat-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58px;
}
/* Batch progress inside the transcript */
.creative-chat-batch { max-width: 100%; }
/* Equal cards that wrap 2-up (2x2 for 4 variants) and collapse to a
   single column on narrow panes — never a strip of tiny thumbs. */
.creative-chat-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .5rem;
    max-width: 460px;
}
.creative-chat-variant {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: .4rem;
    overflow: hidden;
    border: 1px solid rgba(152, 166, 173, .3);
    background: var(--ct-tertiary-bg, #e9ecef);
}
.creative-chat-variant[role="button"] { cursor: pointer; }
.creative-chat-variant[role="button"]:hover { border-color: var(--aac-accent); }
.creative-chat-variant img { width: 100%; height: 100%; object-fit: cover; display: block; }
.creative-chat-variant.failed img { opacity: .35; }
.creative-chat-variant .creative-chat-variant-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #98a6ad; font-size: 1.3rem;
}
.creative-chat-variant .creative-chat-variant-status {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2px 4px;
    font-size: .62rem;
    text-align: center;
    color: #fff;
    background: rgba(33, 37, 41, .72);
}
.creative-chat-variant .creative-chat-variant-status.failed { background: rgba(250, 92, 124, .85); }
/* Multi-select on the batch results grid: checkbox in the tile corner,
   selected tiles get an accent ring. */
.creative-chat-variant.selected {
    border-color: var(--aac-accent);
    box-shadow: 0 0 0 2px var(--aac-accent);
}
.creative-chat-variant .creative-chat-variant-pick {
    position: absolute;
    top: 4px; left: 4px;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: .3rem;
    font-size: .95rem;
    color: #fff;
    background: rgba(33, 37, 41, .55);
    cursor: pointer;
    z-index: 2;
}
.creative-chat-variant .creative-chat-variant-pick:hover { background: rgba(33, 37, 41, .8); }
.creative-chat-variant .creative-chat-variant-pick.active { background: var(--aac-accent); }
/* Inline creative preview under assistant completion text (not beside it) */
.creative-chat-result {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    max-width: 140px;
    margin-top: .55rem;
    border: 1px solid var(--cchat-border);
    border-radius: .55rem;
    overflow: hidden;
    background: var(--cchat-surface);
    cursor: pointer;
    transition: border-color .15s ease;
}
.creative-chat-result:hover { border-color: var(--aac-accent); }
.creative-chat-result-thumb {
    width: 140px;
    height: 186px;
    object-fit: cover;
    display: block;
    background: #111;
}
.creative-chat-result-caption {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    padding: 0 .45rem .4rem;
}
.creative-chat-result-caption .small { color: var(--cchat-muted); font-size: .72rem; }
.creative-chat-result-open { font-size: .72rem !important; }
/* ---------- Chat tab: remap Bootstrap "primary" (indigo) to the single
   teal accent so no purple leaks in from static or JS-built markup. ---------- */
#tab-chat .text-primary { color: var(--aac-accent) !important; }
#tab-chat .badge.bg-primary {
    background-color: var(--aac-accent) !important;
    color: var(--aac-accent-contrast);
}
#tab-chat .badge.bg-soft-primary { background: rgba(var(--aac-accent-rgb), .16) !important; }
#tab-chat .btn-primary,
#tab-chat .btn-warning {
    --ct-btn-bg: var(--aac-accent);
    --ct-btn-border-color: var(--aac-accent);
    --ct-btn-color: var(--aac-accent-contrast);
    --ct-btn-hover-bg: var(--aac-accent);
    --ct-btn-hover-border-color: var(--aac-accent);
    --ct-btn-hover-color: var(--aac-accent-contrast);
    --ct-btn-active-bg: var(--aac-accent);
    --ct-btn-active-border-color: var(--aac-accent);
    --ct-btn-active-color: var(--aac-accent-contrast);
}
#tab-chat .btn-primary:hover, #tab-chat .btn-warning:hover { filter: brightness(1.08); }
#tab-chat .btn-outline-primary {
    --ct-btn-color: var(--aac-accent);
    --ct-btn-border-color: var(--aac-accent);
    --ct-btn-hover-bg: var(--aac-accent);
    --ct-btn-hover-border-color: var(--aac-accent);
    --ct-btn-hover-color: var(--aac-accent-contrast);
    --ct-btn-active-bg: var(--aac-accent);
    --ct-btn-active-border-color: var(--aac-accent);
    --ct-btn-active-color: var(--aac-accent-contrast);
}
#tab-chat .btn-check:checked + .btn-outline-primary {
    background-color: var(--aac-accent);
    border-color: var(--aac-accent);
    color: var(--aac-accent-contrast);
}
/* Success buttons already sit in the teal family in dark mode; align the
   light-mode shade with the same accent so the chat has one green. */
#tab-chat .btn-success {
    --ct-btn-bg: var(--aac-accent);
    --ct-btn-border-color: var(--aac-accent);
    --ct-btn-color: var(--aac-accent-contrast);
    --ct-btn-hover-bg: var(--aac-accent);
    --ct-btn-hover-border-color: var(--aac-accent);
    --ct-btn-hover-color: var(--aac-accent-contrast);
    --ct-btn-active-bg: var(--aac-accent);
    --ct-btn-active-border-color: var(--aac-accent);
    --ct-btn-active-color: var(--aac-accent-contrast);
}
#tab-chat .btn-success:hover { filter: brightness(1.08); }
#tab-chat .btn-outline-success {
    --ct-btn-color: var(--aac-accent);
    --ct-btn-border-color: var(--aac-accent);
    --ct-btn-hover-bg: var(--aac-accent);
    --ct-btn-hover-border-color: var(--aac-accent);
    --ct-btn-hover-color: var(--aac-accent-contrast);
    --ct-btn-active-bg: var(--aac-accent);
    --ct-btn-active-border-color: var(--aac-accent);
    --ct-btn-active-color: var(--aac-accent-contrast);
}
#tab-chat .btn-check:checked + .btn-outline-success {
    background-color: var(--aac-accent);
    border-color: var(--aac-accent);
    color: var(--aac-accent-contrast);
}
#tab-chat .text-success { color: var(--aac-accent) !important; }
#tab-chat .btn-link { color: var(--aac-accent); }
#tab-chat .btn-link:hover { color: var(--aac-accent); filter: brightness(1.1); }
#tab-chat a:not(.btn):not(.cchat-session) { color: var(--aac-accent); }
/* ---------- Modals: one soft, brand-consistent surface system ----------
   Shared by every popup on this page (.ai-ads-modal). Soft slate backdrop,
   generous radius, low-contrast borders, single teal accent — matches the
   web2wave.com marketing look instead of stock Bootstrap chrome. */
.modal-backdrop { background-color: #101827; }
.modal-backdrop.show { opacity: .48; }
.ai-ads-modal .modal-content {
    border: 1px solid var(--ct-border-color, #e6eaef);
    border-radius: 18px;
    background: var(--ct-secondary-bg, #fff);
    box-shadow:
        0 32px 72px -20px rgba(15, 23, 42, .28),
        0 6px 20px -8px rgba(15, 23, 42, .12);
    overflow: hidden;
}
[data-bs-theme="dark"] .ai-ads-modal .modal-content {
    border-color: rgba(148, 163, 184, .18);
    box-shadow: 0 32px 72px -20px rgba(0, 0, 0, .65);
}
.ai-ads-modal .modal-header {
    align-items: flex-start;
    padding: 1.15rem 1.3rem .9rem;
    border-bottom: 1px solid rgba(100, 116, 139, .12);
}
.ai-ads-modal .modal-title {
    font-weight: 700;
    letter-spacing: -.015em;
}
#creativeModal .cm-header-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    flex: 1;
}
#creativeModal .cm-header-brand-meta { min-width: 0; }
#creativeModal .cm-header-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem .85rem;
}
#creativeModal .cm-brand-creatives-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-top: .2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--aac-accent);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
#creativeModal .cm-brand-creatives-link:hover,
#creativeModal .cm-brand-creatives-link:focus {
    color: var(--aac-accent);
    text-decoration: underline;
}
#creativeModal .cm-download-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .55rem;
    color: var(--aac-accent);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
#creativeModal .cm-download-link:hover,
#creativeModal .cm-download-link:focus {
    color: var(--aac-accent);
    text-decoration: underline;
}
#creativeModal .cm-download-link.is-disabled,
#creativeModal .cm-download-link.disabled {
    opacity: .45;
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}
.ai-ads-modal .modal-body { padding: 1.1rem 1.3rem 1.25rem; }
.ai-ads-modal .modal-footer {
    padding: .8rem 1.3rem;
    border-top: 1px solid rgba(100, 116, 139, .12);
}
.ai-ads-modal .btn-close {
    width: 30px;
    height: 30px;
    padding: 0;
    margin: -.15rem -.35rem -.15rem auto;
    border-radius: 9px;
    background-size: .75em;
    opacity: .5;
    transition: opacity .15s ease, background-color .15s ease;
}
.ai-ads-modal .btn-close:hover {
    opacity: .95;
    background-color: rgba(100, 116, 139, .12);
}
.ai-ads-modal .btn-close:focus { box-shadow: 0 0 0 3px rgba(var(--aac-accent-rgb), .18); }
.ai-ads-modal .btn { border-radius: 9px; }
.ai-ads-modal .form-control,
.ai-ads-modal .form-select { border-radius: 9px; }
.ai-ads-modal .form-control:focus,
.ai-ads-modal .form-select:focus {
    border-color: rgba(var(--aac-accent-rgb), .55);
    box-shadow: 0 0 0 3px rgba(var(--aac-accent-rgb), .1);
}
/* One accent inside popups: remap Bootstrap primary/success/warning
   (indigo, green, yellow) to the page's teal so every CTA matches. */
.ai-ads-modal .btn-primary,
.ai-ads-modal .btn-success,
.ai-ads-modal .btn-warning {
    --ct-btn-bg: var(--aac-accent);
    --ct-btn-border-color: var(--aac-accent);
    --ct-btn-color: var(--aac-accent-contrast);
    --ct-btn-hover-bg: var(--aac-accent);
    --ct-btn-hover-border-color: var(--aac-accent);
    --ct-btn-hover-color: var(--aac-accent-contrast);
    --ct-btn-active-bg: var(--aac-accent);
    --ct-btn-active-border-color: var(--aac-accent);
    --ct-btn-active-color: var(--aac-accent-contrast);
}
.ai-ads-modal .btn-primary:hover,
.ai-ads-modal .btn-success:hover,
.ai-ads-modal .btn-warning:hover { filter: brightness(1.08); }
.ai-ads-modal .text-primary { color: var(--aac-accent) !important; }
.ai-ads-modal .alert-primary {
    color: inherit;
    background: rgba(var(--aac-accent-rgb), .08);
    border: 1px solid rgba(var(--aac-accent-rgb), .25);
    border-radius: 10px;
}
/* ---------- References action chooser: modern choice cards ---------- */
.ref-action-modal .modal-dialog { max-width: 430px; }
.ref-action-modal #ref-action-subtitle {
    font-size: .8rem;
    margin: -.25rem 0 .85rem;
}
.ref-action-modal #ref-action-options { gap: .55rem !important; }
.ref-action-option {
    display: flex;
    align-items: center;
    gap: .85rem;
    width: 100%;
    padding: .8rem .95rem;
    text-align: left;
    border: 1px solid var(--ct-border-color, #e6eaef);
    border-radius: 14px;
    background: var(--ct-secondary-bg, #fff);
    color: inherit;
    transition: border-color .15s ease, background-color .15s ease,
        box-shadow .15s ease, transform .15s ease;
}
.ref-action-option:hover:not(:disabled) {
    border-color: rgba(var(--aac-accent-rgb), .4);
    background: rgba(var(--aac-accent-rgb), .05);
    box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .14);
    transform: translateY(-1px);
}
.ref-action-option:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}
.ref-action-option:focus-visible {
    outline: none;
    border-color: rgba(var(--aac-accent-rgb), .55);
    box-shadow: 0 0 0 3px rgba(var(--aac-accent-rgb), .15);
}
.ref-action-option:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.ref-action-option-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(var(--aac-accent-rgb), .1);
    color: var(--aac-accent);
    font-size: 1.1rem;
    transition: background-color .15s ease;
}
.ref-action-option:hover:not(:disabled) .ref-action-option-icon {
    background: rgba(var(--aac-accent-rgb), .16);
}
.ref-action-option-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.ref-action-option-label {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.005em;
}
.ref-action-option-hint {
    font-size: .755rem;
    line-height: 1.35;
    color: var(--ct-secondary-color, #8a969c);
}
.ref-action-option-arrow {
    flex: 0 0 auto;
    font-size: 1rem;
    color: var(--ct-secondary-color, #b6bfc8);
    transition: transform .15s ease, color .15s ease;
}
.ref-action-option:hover:not(:disabled) .ref-action-option-arrow {
    color: var(--aac-accent);
    transform: translateX(2px);
}
[data-bs-theme="dark"] .ref-action-option {
    border-color: rgba(148, 163, 184, .2);
}
[data-bs-theme="dark"] .ref-action-option:hover:not(:disabled) {
    background: rgba(var(--aac-accent-rgb), .09);
    box-shadow: none;
}

/* Guest conversion: mini-landing heroes + signup CTAs */
.aac-hero {
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(85, 110, 230, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 20%, rgba(10, 207, 151, 0.12), transparent 50%),
        var(--ct-secondary-bg, #fff);
    border: 1px solid var(--ct-border-color, #e2e6ea);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}
[data-bs-theme="dark"] .aac-hero {
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(85, 110, 230, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 20%, rgba(10, 207, 151, 0.1), transparent 50%),
        var(--ct-secondary-bg, #2a303c);
}
.aac-hero-body { padding: 1.25rem 1.35rem; }
.aac-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #556ee6;
    margin-bottom: 0.35rem;
}
.aac-hero h2, .aac-hero h1 {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}
.aac-hero-lead {
    font-size: 0.98rem;
    max-width: 40rem;
    color: var(--ct-secondary-color, #6c757d);
    margin-bottom: 0.85rem;
}
.aac-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.aac-guest-signup-strip {
    text-align: center;
    padding: 1.25rem 1rem 1.5rem;
    margin-top: 0.5rem;
}
.aac-guest-signup-strip p {
    color: var(--ct-secondary-color, #6c757d);
    margin-bottom: 0.75rem;
}
.aac-guest-ai-landing {
    display: flex;
    flex-direction: column;
    min-height: min(70vh, 640px);
}
.aac-guest-ai-landing .aac-hero { flex: 0 0 auto; }
.aac-guest-chat-tease {
    margin-top: auto;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.06)),
        var(--ct-secondary-bg, #fff);
    border: 1px solid var(--ct-border-color, #e2e6ea);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}
[data-bs-theme="dark"] .aac-guest-chat-tease {
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.06), rgba(15, 23, 42, 0.35)),
        var(--ct-secondary-bg, #1e2530);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.aac-guest-chat-tease-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ct-secondary-color, #8a969c);
    margin-bottom: 0.45rem;
}
.aac-guest-chat-input {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--ct-border-color, #dee2e6);
    border-radius: 999px;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    cursor: text;
}
[data-bs-theme="dark"] .aac-guest-chat-input {
    background: rgba(15, 23, 42, 0.45);
}
.aac-guest-chat-input span {
    flex: 1 1 auto;
    color: var(--ct-secondary-color, #8a969c);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aac-guest-chat-input .btn { border-radius: 999px; flex: 0 0 auto; }

/* Paid Ads filter bar — Select2 (match cabinet quiz index) */
#tab-inspiration .aac-feed-filter-select {
    visibility: hidden;
    height: 38px;
}
#tab-inspiration .aac-feed-filter-select + .select2-container {
    visibility: visible;
    width: 100% !important;
    max-width: 100%;
}
#tab-inspiration .aac-feed-filter-select + .select2-container .select2-selection--single {
    height: 38px;
}
#tab-inspiration .aac-feed-filter-select + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
}
#tab-inspiration .aac-feed-filter-select + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
#tab-inspiration .select2-dropdown {
    max-width: min(600px, calc(100vw - 2rem)) !important;
    box-sizing: border-box;
}
#tab-inspiration .select2-results__option {
    white-space: normal;
    word-break: break-word;
}

/* Request Creatives Pack landing */
.cp-landing {
    max-width: 920px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
}
.cp-hero .aac-hero-lead {
    max-width: 42rem;
}
.cp-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}
@media (max-width: 767.98px) {
    .cp-features { grid-template-columns: 1fr; }
}
.cp-feature {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border-radius: 0.65rem;
    background: var(--ct-secondary-bg, #fff);
    border: 1px solid var(--ct-border-color, #e2e6ea);
}
[data-bs-theme="dark"] .cp-feature {
    background: rgba(15, 23, 42, 0.35);
}
.cp-feature i {
    flex: 0 0 auto;
    font-size: 1.35rem;
    color: #0acf97;
    margin-top: 0.1rem;
}
.cp-feature strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}
.cp-feature span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ct-secondary-color, #6c757d);
}
.cp-footnote {
    font-size: 0.85rem;
    margin: 0;
    max-width: 40rem;
}
