/* 23-remix.css — Remix Engine styles — Studio-grade UX */

/* ── Page container ── */

/* #app has overflow:hidden + height:100% — so remix-page must be its own
   scroll container, same as other pages (chat-layout, avatar-page, etc.) */
.remix-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 80px;
    animation: remix-fadeIn 0.25s ease;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes remix-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */

.remix-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.remix-header h1 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0;
    flex: 1;
    letter-spacing: -0.01em;
}

.remix-back {
    color: var(--green);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.remix-back:hover {
    opacity: 0.7;
}

.remix-edit-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.remix-edit-link:hover {
    color: var(--green);
}

/* ── Stats bar (brief list header) ── */

.remix-stats-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 16px;
    padding: 0 2px;
}

.remix-stats-bar__count {
    font-weight: 600;
    color: var(--text);
}

/* ── CTA button ── */

.remix-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    margin-bottom: 20px;
    border: 2px dashed var(--green);
    background: rgba(var(--green-rgb), 0.04);
    color: var(--green);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remix-cta:hover {
    background: rgba(var(--green-rgb), 0.1);
    border-color: var(--green);
    transform: translateY(-1px);
}

.remix-cta:active {
    transform: translateY(0);
}

/* ── Brief cards ── */

.remix-brief-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remix-brief-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.remix-brief-card:hover {
    border-color: var(--green);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.remix-brief-card:active {
    transform: translateY(0);
}

.remix-brief-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.remix-brief-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.remix-brief-card__preview {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.remix-brief-card__meta {
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.remix-brief-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.remix-brief-card__meta-sep {
    color: var(--line);
}

.remix-brief-card__date {
    color: var(--muted);
}

.remix-brief-card__delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    z-index: 2;
}

.remix-brief-card:hover .remix-brief-card__delete {
    opacity: 1;
}

.remix-brief-card__delete:hover {
    background: rgba(var(--red-rgb), 0.12);
    border-color: rgba(var(--red-rgb), 0.3);
    color: var(--red);
}

/* ── Status filter chips ── */

.remix-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.remix-filter-chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remix-filter-chip:hover {
    border-color: var(--green);
    color: var(--green);
}

.remix-filter-chip.active {
    background: rgba(var(--green-rgb), 0.12);
    border-color: var(--green);
    color: var(--green);
}

/* ── Badges ── */

.remix-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.remix-badge--green {
    background: rgba(var(--green-rgb), 0.15);
    color: var(--green);
}

.remix-badge--amber {
    background: rgba(var(--amber-rgb), 0.15);
    color: var(--amber);
}

.remix-badge--amber.remix-badge--pulse {
    animation: remix-badgePulse 1.5s ease-in-out infinite;
}

@keyframes remix-badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.remix-badge--red {
    background: rgba(var(--red-rgb), 0.15);
    color: var(--red);
}

.remix-badge--muted {
    background: rgba(var(--green-rgb), 0.06);
    color: var(--muted);
}

.remix-badge--preset {
    background: rgba(var(--green-rgb), 0.1);
    color: var(--green);
    font-size: 0.7rem;
    padding: 1px 6px;
    text-transform: none;
    font-weight: 500;
}

/* ── Builder layout ── */

.remix-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.remix-builder__left,
.remix-builder__right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Inline editable title ── */

.remix-title-inline {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    padding: 6px 8px;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: text;
    transition: all 0.2s ease;
    outline: none;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.remix-title-inline:hover {
    background: rgba(var(--green-rgb), 0.04);
    border-color: var(--line);
}

.remix-title-inline:focus {
    background: var(--panel);
    border-color: var(--green);
}

.remix-title-inline::placeholder {
    color: var(--muted);
    font-weight: 400;
}

/* ── Inputs ── */

.remix-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.remix-input:focus {
    border-color: var(--green);
}

.remix-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.remix-textarea:focus {
    border-color: var(--green);
}

/* ── Buttons ── */

.remix-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.remix-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.remix-btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.remix-btn--primary {
    background: var(--green);
    color: var(--bg);
}

.remix-btn--primary:hover:not(:disabled) {
    opacity: 0.85;
    transform: translateY(-1px);
}

.remix-btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.remix-btn--accent {
    background: var(--green);
    color: var(--bg);
    font-weight: 600;
}

.remix-btn--accent:hover:not(:disabled) {
    opacity: 0.85;
    transform: translateY(-1px);
}

.remix-btn--accent:active:not(:disabled) {
    transform: translateY(0);
}

.remix-btn--outline {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.remix-btn--outline:hover:not(:disabled) {
    border-color: var(--green);
    color: var(--green);
}

.remix-btn--danger {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--red);
}

.remix-btn--danger:hover:not(:disabled) {
    border-color: var(--red);
    background: rgba(var(--red-rgb), 0.1);
}

.remix-btn--ghost {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 6px 10px;
}

.remix-btn--ghost:hover:not(:disabled) {
    color: var(--green);
    background: rgba(var(--green-rgb), 0.08);
}

.remix-btn--sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.remix-btn--lg {
    padding: 14px 24px;
    font-size: 1rem;
    width: 100%;
    margin-top: 12px;
    border-radius: 12px;
}

.remix-btn--loading {
    pointer-events: none;
}

.remix-btn--loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: remix-spin 0.6s linear infinite;
    margin-left: 6px;
}

@keyframes remix-spin {
    to { transform: rotate(360deg); }
}

/* ── Source cards ── */

.remix-source-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remix-source-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--line);
    border-radius: 12px;
    padding: 12px 12px 12px 14px;
    transition: all 0.2s ease;
}

.remix-source-card:hover {
    border-color: rgba(var(--green-rgb), 0.3);
}

.remix-source-card--ready {
    border-left-color: var(--green);
}

.remix-source-card--failed {
    border-color: rgba(var(--red-rgb), 0.3);
    border-left-color: var(--red);
    background: rgba(var(--red-rgb), 0.03);
}

.remix-source-card--processing {
    border-color: rgba(var(--amber-rgb), 0.3);
    border-left-color: var(--amber);
}

.remix-source-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--green-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.remix-source-card--failed .remix-source-card__icon {
    background: rgba(var(--red-rgb), 0.08);
}

.remix-source-card__body {
    flex: 1;
    min-width: 0;
}

.remix-source-card__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.remix-source-card__detail {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.4;
}

.remix-source-card__detail--preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.remix-source-card__status {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remix-source-card__error {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 4px;
}

.remix-source-card__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-self: center;
}

.remix-source-actions {
    position: relative;
}

/* Source empty drop zone */
.remix-source-dropzone {
    border: 2px dashed var(--line);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    color: var(--muted);
    transition: all 0.2s ease;
}

.remix-source-dropzone__icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.remix-source-dropzone__text {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Processing dots animation */
.remix-dots::after {
    content: '';
    animation: remix-dotsAnim 1.2s steps(4, end) infinite;
}

@keyframes remix-dotsAnim {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

/* ── Dropdown ── */

.remix-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 4px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px;
    min-width: 260px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    animation: remix-dropdown-in 0.15s ease-out;
}

.remix-dropdown--below {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 4px;
}

@keyframes remix-dropdown-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.remix-dropdown__item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.remix-dropdown__item:hover {
    background: rgba(var(--green-rgb), 0.08);
}

.remix-dropdown__item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.remix-dropdown__item-desc {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
    margin-left: 28px;
}

/* ── Summary panel ── */

.remix-summary-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.remix-summary-panel--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    gap: 8px;
}

.remix-summary-panel--empty .remix-muted {
    text-align: center;
}

.remix-summary-panel--generating {
    border-color: rgba(var(--amber-rgb), 0.3);
}

.remix-summary-panel h3 {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.remix-summary-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 8px;
}

.remix-summary-panel__charcount {
    font-size: 0.78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Typing animation for summary generation */
.remix-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    color: var(--amber);
    font-size: 0.9rem;
}

.remix-typing__dots {
    display: inline-flex;
    gap: 3px;
}

.remix-typing__dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    animation: remix-typingDot 1.2s ease-in-out infinite;
}

.remix-typing__dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.remix-typing__dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes remix-typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* ── Preset cards ── */

.remix-preset-area {
    animation: remix-fadeIn 0.25s ease;
    margin-top: 24px;
    width: 100%;
}

.remix-preset-area h3 {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.remix-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.remix-preset-card {
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.remix-preset-card:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

.remix-preset-card.selected {
    border-color: var(--green);
    background: rgba(var(--green-rgb), 0.06);
    box-shadow: 0 0 0 1px var(--green);
}

.remix-preset-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--green);
    color: var(--bg);
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.remix-preset-card__icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.remix-preset-card__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.remix-preset-card__desc {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.remix-preset-card__outputs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    margin-bottom: 8px;
}

.remix-preset-card__output-tag {
    font-size: 0.65rem;
    padding: 1px 5px;
    background: rgba(var(--green-rgb), 0.08);
    border-radius: 4px;
    color: var(--muted);
}

.remix-preset-card__price {
    font-size: 0.85rem;
    color: var(--amber);
    font-weight: 600;
}

.remix-preset-card__recommend {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bg);
    background: var(--green);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ── Custom kinds grid ── */

.remix-custom-kinds {
    margin-top: 16px;
    animation: remix-fadeIn 0.2s ease;
}

.remix-kinds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.remix-kind-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.remix-kind-tile:hover {
    border-color: rgba(var(--green-rgb), 0.4);
}

.remix-kind-tile.checked {
    border-color: var(--green);
    background: rgba(var(--green-rgb), 0.06);
}

.remix-kind-tile.checked .remix-kind-tile__check {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg);
}

.remix-kind-tile__check {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
}

.remix-kind-tile__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.remix-kind-tile__info {
    flex: 1;
    min-width: 0;
}

.remix-kind-tile__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.remix-kind-tile__price {
    font-size: 0.75rem;
    color: var(--amber);
}

/* ── Price total bar ── */

.remix-price-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 12px;
}

.remix-price-bar__total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--amber);
}

.remix-price-bar__balance {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── Output view header ── */

.remix-output-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.remix-output-header__info {
    flex: 1;
    min-width: 0;
}

.remix-output-header__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.remix-output-header__meta {
    font-size: 0.8rem;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Output cards ── */

.remix-output-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remix-pack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remix-pack__header {
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.remix-pack__name {
    font-weight: 700;
}

.remix-output-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.remix-output-card:hover {
    border-color: rgba(var(--green-rgb), 0.3);
}

.remix-output-card--failed {
    border-color: rgba(var(--red-rgb), 0.25);
}

.remix-output-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.remix-output-card__header:hover {
    background: rgba(var(--green-rgb), 0.03);
}

.remix-output-card__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remix-output-card__kind-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(var(--green-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.remix-output-card__kind-label {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.remix-output-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.remix-output-card__expand {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.remix-output-expanded .remix-output-card__expand {
    transform: rotate(180deg);
}

.remix-output-card__body {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    max-height: 0;
    opacity: 0;
}

.remix-output-expanded > .remix-output-card__body {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease 0.05s;
}

.remix-output-card__body-inner {
    padding: 0 16px 16px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    animation: remix-fadeIn 0.25s ease;
}

.remix-output-expanded > .remix-output-card__header {
    border-bottom: 1px solid var(--line);
}

/* ── Actions bar per output ── */

.remix-output-actions {
    display: flex;
    gap: 4px;
    padding: 12px 16px 4px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    flex-wrap: wrap;
}

.remix-output-actions .remix-btn {
    font-size: 0.78rem;
    padding: 5px 10px;
}

/* ── Output content types ── */

.remix-output-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.remix-output-text p {
    margin: 0.4em 0;
}

.remix-output-image {
    text-align: center;
}

.remix-output-image img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.remix-output-image img:hover {
    transform: scale(1.02);
}

.remix-output-image__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0;
}

.remix-output-image__prompt {
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(var(--green-rgb), 0.04);
    border-radius: 6px;
    text-align: left;
}

/* Thread view */
.remix-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remix-thread__tweet {
    padding: 12px 14px;
    background: var(--panel-2);
    border-radius: 10px;
    border-left: 3px solid var(--green);
    position: relative;
}

.remix-thread__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.remix-thread__num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--green);
    background: rgba(var(--green-rgb), 0.12);
    padding: 1px 6px;
    border-radius: 4px;
}

.remix-thread__charcount {
    font-size: 0.72rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.remix-thread__body {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Email view */
.remix-email {
    border-radius: 10px;
    overflow: hidden;
}

.remix-email__subject {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remix-email__preview {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-style: italic;
}

.remix-email__body {
    line-height: 1.7;
}

.remix-email__cta {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--green);
    color: var(--bg);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Shorts view */
.remix-shorts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remix-shorts__hook {
    padding: 10px 14px;
    background: rgba(var(--amber-rgb), 0.08);
    border-left: 3px solid var(--amber);
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    color: var(--amber);
}

.remix-shorts__synopsis {
    padding: 10px 14px;
    background: var(--panel-2);
    border-radius: 8px;
    line-height: 1.6;
}

.remix-shorts__caption {
    font-size: 0.82rem;
    color: var(--muted);
    font-style: italic;
}

/* Ad hooks */
.remix-hooks-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remix-hooks-list li {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: var(--panel-2);
    border-radius: 8px;
    line-height: 1.5;
    align-items: flex-start;
}

.remix-hook__num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(var(--green-rgb), 0.12);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.remix-hook__formula {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 6px;
}

.remix-hook__formula--pas { background: rgba(59,130,246,0.15); color: #3b82f6; }
.remix-hook__formula--aida { background: rgba(var(--green-rgb),0.15); color: var(--green); }
.remix-hook__formula--curiosity { background: rgba(var(--amber-rgb),0.15); color: var(--amber); }
.remix-hook__formula--benefit { background: rgba(168,85,247,0.15); color: #a855f7; }
.remix-hook__formula--fear { background: rgba(var(--red-rgb),0.15); color: var(--red); }

/* Article view */
.remix-article {
    line-height: 1.8;
}

.remix-article h1, .remix-article h2, .remix-article h3 {
    color: var(--green);
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

/* Telegram bubble */
.remix-tg-bubble {
    background: var(--panel-2);
    border-radius: 0 12px 12px 12px;
    padding: 12px 16px;
    max-width: 480px;
    line-height: 1.6;
    position: relative;
}

/* VK post */
.remix-vk-post {
    line-height: 1.7;
}

.remix-vk-post__hashtags {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--green);
}

/* ── Scenes table ── */

.remix-scenes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.85rem;
}

.remix-scenes-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--line);
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.remix-scenes-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    vertical-align: top;
}

.remix-drill-scene:hover {
    background: rgba(var(--green-rgb), 0.04);
}

/* ── Skeleton / shimmer ── */

.remix-skeleton {
    height: 60px;
    background: linear-gradient(
        90deg,
        var(--panel) 25%,
        var(--panel-2) 50%,
        var(--panel) 75%
    );
    background-size: 200% 100%;
    animation: remix-shimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
    margin-bottom: 8px;
}

.remix-skeleton--content {
    height: 100px;
    margin: 0 16px 16px;
    border-radius: 8px;
}

.remix-skeleton--lg {
    height: 80px;
}

.remix-skeleton-card {
    opacity: 0.7;
}

.remix-skeleton-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remix-skeleton-group__label {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    animation: remix-badgePulse 1.5s ease-in-out infinite;
}

@keyframes remix-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Empty state ── */

.remix-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.remix-empty__icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.remix-empty__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.remix-empty__desc {
    max-width: 340px;
    margin: 0 auto;
}

.remix-error {
    color: var(--red);
    font-size: 0.85rem;
    padding: 8px 12px;
    background: rgba(var(--red-rgb), 0.06);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remix-muted {
    color: var(--muted);
    font-size: 0.85rem;
}

/* ── Modals ── */

.remix-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: remix-modalIn 0.15s ease;
}

@keyframes remix-modalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.remix-modal {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    animation: remix-modalSlide 0.2s ease;
}

@keyframes remix-modalSlide {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.remix-modal h3 {
    margin: 0 0 14px 0;
    font-size: 1.1rem;
    color: var(--text);
}

.remix-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ── Modal close button ── */

.remix-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.15s ease;
}

.remix-modal__close:hover {
    background: rgba(var(--red-rgb), 0.18);
    color: var(--red);
    border-color: rgba(var(--red-rgb), 0.45);
}

/* ── Brand Voice settings ── */

.bv-field {
    margin-bottom: 16px;
}

.bv-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.bv-chip-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.bv-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 10px;
    background: rgba(var(--green-rgb), 0.12);
    border: 1px solid rgba(var(--green-rgb), 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
}

.bv-chip-remove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0 0 2px;
    transition: color 0.15s;
}

.bv-chip-remove:hover {
    color: var(--red);
}

.bv-chip-add {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bv-chip-input {
    flex: 1;
}

.bv-add-btn {
    flex-shrink: 0;
    width: 36px;
    padding: 0;
    font-size: 1.2rem;
}

.bv-analyze-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}

.bv-analyze-btn {
    width: 100%;
}

.bv-fingerprint {
    margin-top: 12px;
    padding: 12px;
    background: rgba(var(--green-rgb), 0.06);
    border: 1px solid rgba(var(--green-rgb), 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Step indicator ── */

.remix-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px 0;
    margin-bottom: 20px;
}

.remix-step {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.35;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.remix-step--active {
    opacity: 1;
    color: var(--green);
    font-weight: 700;
}

/* Clickable step link — highlight to show it's interactive */
.remix-step--has-link {
    cursor: pointer;
    opacity: 0.85;
    color: var(--green);
    text-decoration: none;
}

.remix-step--has-link:hover {
    opacity: 1;
    text-decoration: underline;
    background: rgba(var(--green-rgb), 0.08);
}

.remix-step--done {
    opacity: 0.65;
    color: var(--text);
}

.remix-step__num {
    font-size: 1rem;
}

.remix-step__arrow {
    color: var(--muted);
    opacity: 0.25;
    font-size: 12px;
    padding: 0 2px;
}

/* ── Progress bar ── */

.remix-progress {
    position: relative;
    height: 32px;
    background: var(--panel);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}

.remix-progress__bar {
    height: 100%;
    background: rgba(var(--green-rgb), 0.2);
    transition: width 0.5s ease;
    border-radius: 8px;
}

.remix-progress__text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 0.04em;
}

/* ── Drag-and-drop highlight ── */

.remix-builder__left.remix-dragover {
    outline: 2px dashed var(--green);
    outline-offset: -4px;
    background: rgba(var(--green-rgb), 0.06);
    border-radius: 12px;
}

/* ── Confirm dialog ── */

.remix-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: remix-modalIn 0.12s ease;
}

.remix-confirm {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    animation: remix-modalSlide 0.15s ease;
}

.remix-confirm__text {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.5;
}

.remix-confirm__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 720px) {
    .remix-builder {
        grid-template-columns: 1fr;
    }

    .remix-preset-grid {
        grid-template-columns: 1fr 1fr;
    }

    .remix-kinds-grid {
        grid-template-columns: 1fr;
    }

    .remix-header {
        flex-wrap: wrap;
    }

    .remix-scenes-table {
        font-size: 0.78rem;
    }

    .remix-scenes-table th,
    .remix-scenes-table td {
        padding: 6px 6px;
    }

    .remix-output-card__body-inner {
        padding: 0 12px 12px;
    }
}

@media (max-width: 480px) {
    .remix-preset-grid { grid-template-columns: 1fr !important; }
    .remix-kinds-grid { grid-template-columns: 1fr !important; }
    .remix-modal { padding: 14px; margin: 8px; }
    .remix-steps { flex-wrap: wrap; gap: 2px; }
    .remix-step__label { font-size: 0.65rem; }
    .remix-step__arrow { display: none; }
    .remix-brief-card__delete { opacity: 1; }
    .remix-output-actions { flex-wrap: wrap; }
    .remix-tg-bubble { max-width: 100%; }
}

/* ── Mini navigation bar ── */

.remix-mini-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--panel-2);
    border-radius: 10px;
    overflow-x: auto;
}

.remix-mini-nav__item {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.remix-mini-nav__item:hover {
    color: var(--text);
    background: rgba(var(--green-rgb), 0.06);
}

.remix-mini-nav__item--active {
    color: var(--green);
    background: rgba(var(--green-rgb), 0.12);
    font-weight: 600;
}

/* ── Generation action buttons ── */

.remix-gen-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ── Source card expand/collapse ── */

.remix-source-card--wrap {
    flex-direction: column;
    align-items: stretch;
}

.remix-source-card__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.remix-source-card__row .remix-source-card__body {
    flex: 1;
    min-width: 0;
}

.remix-source-card__row .remix-source-card__actions {
    flex-shrink: 0;
    align-self: center;
}

.remix-source-card--expandable {
    cursor: pointer;
}

.remix-source-card--expandable:hover {
    border-color: rgba(var(--green-rgb), 0.25);
}

.remix-source-card--expanded {
    border-color: rgba(var(--green-rgb), 0.35);
}

.remix-source-card__preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.remix-source-card__content {
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    background: var(--panel-2);
    padding: 12px;
    border-radius: 8px;
}

/* ── Instant Remix prefill banner ── */
.remix-prefill-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: rgba(var(--green-rgb), 0.1);
    border: 1px solid rgba(var(--green-rgb), 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.4;
}

/* ── Voice Brief ── */

.remix-source-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.remix-mic-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--line);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    touch-action: none;
}

.remix-mic-btn:hover {
    border-color: var(--green);
    background: rgba(var(--green-rgb), 0.08);
}

.remix-mic-btn.recording {
    background: rgba(var(--red-rgb), 0.15);
    border-color: var(--red);
    animation: remix-micPulse 1.1s ease-in-out infinite;
}

@keyframes remix-micPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--red-rgb), 0.2); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(var(--red-rgb), 0); }
}

.remix-rec-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 10px;
    background: rgba(var(--red-rgb), 0.1);
    border: 1px solid rgba(var(--red-rgb), 0.3);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--red);
    animation: remix-fadeIn 0.2s ease;
}

.remix-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
    animation: remix-recDotPulse 1s ease-in-out infinite;
}

@keyframes remix-recDotPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.remix-rec-stop {
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(var(--red-rgb), 0.15);
    border: 1px solid rgba(var(--red-rgb), 0.3);
    border-radius: 6px;
    color: var(--red);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease;
}

.remix-rec-stop:hover {
    background: rgba(var(--red-rgb), 0.25);
}

/* ── Live Preview — device-frame mockups ── */

/* Device frames */
.preview-device {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--line);
    background: #1a1a2e;
    max-width: 380px;
    margin: 0 auto;
}

.preview-device--phone {
    max-width: 340px;
    border-radius: 24px;
    border-width: 3px;
}

.preview-device--desktop {
    max-width: 520px;
}

.preview-device--feed {
    max-width: 480px;
}

.preview-device--dark {
    background: #000;
}

/* Telegram preview */
.preview-tg { padding: 12px; background: #0e1621; }
.preview-tg__header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.preview-tg__avatar { width: 36px; height: 36px; border-radius: 50%; background: #2b5278; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.preview-tg__name { font-size: 14px; font-weight: 600; color: #fff; }
.preview-tg__subs { font-size: 11px; color: #6c7883; }
.preview-tg__bubble { background: #182533; border-radius: 0 12px 12px 12px; padding: 10px 14px; margin-bottom: 8px; }
.preview-tg__text { font-size: 13px; color: #e4e6eb; line-height: 1.5; word-break: break-word; }
.preview-tg__time { font-size: 10px; color: #6c7883; text-align: right; margin-top: 4px; }
.preview-tg__reactions { display: flex; gap: 6px; }
.preview-tg__react { font-size: 12px; padding: 2px 8px; background: #1b2836; border-radius: 12px; color: #8bb4d9; }

/* X/Twitter preview */
.preview-x { background: #000; padding: 0; }
.preview-x__header { padding: 12px 16px; font-size: 18px; font-weight: 700; color: #e7e9ea; border-bottom: 1px solid #2f3336; }
.preview-x__tweet { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #2f3336; }
.preview-x__avatar { width: 40px; height: 40px; border-radius: 50%; background: #333; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.preview-x__body { flex: 1; min-width: 0; }
.preview-x__meta { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #71767b; margin-bottom: 4px; }
.preview-x__name { font-weight: 700; color: #e7e9ea; }
.preview-x__text { font-size: 14px; color: #e7e9ea; line-height: 1.4; word-break: break-word; }
.preview-x__thread-indicator { font-size: 13px; color: #1d9bf0; margin-top: 8px; }
.preview-x__thread-line { width: 2px; height: 20px; background: #333; margin: 0 0 0 36px; }
.preview-x__actions { display: flex; gap: 24px; margin-top: 10px; font-size: 12px; color: #71767b; }
.preview-x__more { padding: 12px 16px; text-align: center; color: #1d9bf0; font-size: 13px; }

/* VK preview */
.preview-vk { background: #141414; padding: 0; }
.preview-vk__header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.preview-vk__avatar { width: 36px; height: 36px; border-radius: 50%; background: #2787f5; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.preview-vk__name { font-size: 13px; font-weight: 600; color: #e1e3e6; }
.preview-vk__time { font-size: 12px; color: #76787a; }
.preview-vk__text { padding: 0 16px 12px; font-size: 13px; color: #e1e3e6; line-height: 1.5; word-break: break-word; }
.preview-vk__poll { margin: 0 16px 12px; background: #222; border-radius: 8px; padding: 10px; }
.preview-vk__poll-q { font-size: 13px; font-weight: 600; color: #e1e3e6; margin-bottom: 8px; }
.preview-vk__poll-opt { padding: 8px 12px; background: #333; border-radius: 6px; margin-bottom: 4px; font-size: 13px; color: #b0b1b3; }
.preview-vk__actions { display: flex; gap: 20px; padding: 8px 16px; border-top: 1px solid #2a2a2a; font-size: 13px; color: #76787a; }

/* Email preview (using -frame suffix to avoid clash with existing .remix-email / .preview-email) */
.preview-email-frame { background: #1e1e2e; }
.preview-email-frame__toolbar { padding: 8px 16px; font-size: 12px; color: #888; background: #16161e; border-bottom: 1px solid #2a2a3a; }
.preview-email-frame__row { padding: 12px 16px; border-bottom: 1px solid #2a2a3a; }
.preview-email-frame__row--unread { background: rgba(59, 130, 246, 0.08); }
.preview-email-frame__from { font-size: 13px; font-weight: 600; color: #e1e3e6; margin-bottom: 2px; }
.preview-email-frame__subject { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.preview-email-frame__snippet { font-size: 12px; color: #888; }
.preview-email-frame__body { padding: 16px; }
.preview-email-frame__body-from { font-size: 11px; color: #666; margin-bottom: 8px; }
.preview-email-frame__body-subject { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.preview-email-frame__body-text { font-size: 13px; color: #ccc; line-height: 1.6; word-break: break-word; }
.preview-email-frame__cta { display: inline-block; margin-top: 16px; padding: 10px 24px; background: #3b82f6; color: #fff; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Shorts preview */
.preview-shorts-frame { position: relative; background: #000; min-height: 500px; display: flex; flex-direction: column; }
.preview-shorts-frame__video { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); min-height: 400px; }
.preview-shorts-frame__hook { font-size: 22px; font-weight: 800; color: #fff; text-align: center; padding: 20px; text-shadow: 0 2px 8px rgba(0,0,0,0.8); max-width: 280px; line-height: 1.3; }
.preview-shorts-frame__duration { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.preview-shorts-frame__sidebar { position: absolute; right: 8px; bottom: 100px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.preview-shorts-frame__action { text-align: center; color: #fff; font-size: 11px; line-height: 1.2; }
.preview-shorts-frame__bottom { padding: 12px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }
.preview-shorts-frame__caption { font-size: 13px; color: #fff; margin-bottom: 4px; word-break: break-word; }
.preview-shorts-frame__hashtags { font-size: 12px; color: #8bb4d9; }

/* Preview shared */
.preview-hashtag { color: #1d9bf0; }

/* View toggle */
.remix-output__view-toggle {
    display: flex;
    background: var(--panel-2);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.remix-view-btn {
    padding: 4px 12px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    white-space: nowrap;
}

.remix-view-btn.active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.remix-view-btn:hover:not(.active) {
    color: var(--text);
}

.remix-output__preview {
    margin-bottom: 12px;
}

/* Responsive: preview fills width on mobile */
@media (max-width: 720px) {
    .preview-device--phone { max-width: 100%; }
    .preview-device--feed { max-width: 100%; }
    .preview-device--desktop { max-width: 100%; }
}

/* ── Image source thumbnail ── */

.remix-source-card__thumb {
    flex-shrink: 0;
    margin-right: 8px;
}

.remix-source-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    display: block;
}

/* ── Editable text source textarea ── */

.remix-source-edit {
    width: 100%;
    padding: 8px 10px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.remix-source-edit:focus {
    border-color: var(--green);
    outline: none;
}

/* ── Remix model config ── */

.remix-models-config {
    margin-top: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.remix-models-config__title {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remix-models-config__title:hover {
    color: var(--text);
}

.remix-models-config__arrow {
    margin-left: auto;
    font-size: 0.75rem;
}

.remix-models-config__body {
    padding: 0 16px 16px;
}

.remix-model-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.remix-model-slot:last-child {
    border-bottom: none;
}

.remix-model-slot__label {
    font-size: 0.85rem;
    color: var(--text);
}

.remix-model-slot__btn {
    padding: 6px 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remix-model-slot__btn:hover {
    border-color: var(--green);
    background: rgba(var(--green-rgb), 0.08);
}

/* ── Fix 2: Brief card action buttons ── */

.remix-brief-card__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.remix-brief-card__action-btn {
    text-decoration: none;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ── Fix 3: Builder section headers ── */

.remix-section-header {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

/* Summary button prominent state when sources ready */
.remix-btn--ready {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
    box-shadow: 0 2px 12px rgba(var(--green-rgb), 0.3);
}

.remix-btn--ready:hover {
    background: var(--green);
    opacity: 0.88;
    transform: translateY(-1px);
}

/* ── Fix 4: Preset card output icons row ── */

.remix-preset-card__output-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
    justify-content: center;
}

.remix-preset-card__output-icon {
    font-size: 1.1rem;
    line-height: 1;
    cursor: default;
}

/* ── Fix 5: Output card model label ── */

.remix-output-card__model {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 4px;
    white-space: nowrap;
}

/* ── Fix 8: Generation checklist ── */

.remix-gen-checklist {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.remix-gen-checklist__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--amber);
    margin-bottom: 12px;
}

.remix-gen-checklist__items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.remix-gen-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    padding: 4px 0;
}

.remix-gen-item__icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.remix-gen-item__label {
    color: var(--text);
}

.remix-gen-item--done .remix-gen-item__label {
    color: var(--green);
}

.remix-gen-item--failed .remix-gen-item__label {
    color: var(--red);
}

.remix-gen-item--pending .remix-gen-item__label {
    color: var(--muted);
}
