/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0a0a0a;
    --surface:   #141414;
    --surface2:  #1c1c1c;
    --border:    #2a2a2a;
    --accent:    #7c6aee;
    --accent2:   #5e4ecc;
    --text:      #f0f0f0;
    --muted:     #888;
    --radius:    12px;
    --nav-h:     56px;
    --safe-color: rgba(50, 220, 120, 0.18);
    --safe-border: rgba(50, 220, 120, 0.55);
}

html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Shared Buttons ───────────────────────────────────────── */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}
.btn-primary:hover  { background: var(--accent2); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.btn-secondary:hover  { background: #242424; border-color: #3a3a3a; }
.btn-secondary.active { border-color: var(--accent); color: var(--accent); }

/* ── Upload Page ──────────────────────────────────────────── */
.upload-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.upload-logo {
    margin-bottom: 40px;
    text-align: center;
}
.upload-logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}
.upload-logo span {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    display: block;
}

.upload-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 52px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(124, 106, 238, 0.05);
}
.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--muted);
}
.drop-zone h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.drop-zone p  { font-size: 13px; color: var(--muted); }
.drop-zone .formats { margin-top: 16px; font-size: 11px; color: #555; }

/* Upload progress */
.upload-progress { display: none; text-align: center; padding: 40px 0; }
.progress-bar-wrap {
    background: var(--surface2);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
    margin: 16px 0 12px;
}
.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    width: 0;
    transition: width 0.2s;
}
.progress-text { font-size: 13px; color: var(--muted); }

/* Success state */
.success-panel { display: none; padding-top: 28px; }
.success-panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.success-panel p  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.link-row {
    display: flex;
    gap: 8px;
}
.link-row input {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--text);
    font-size: 12px;
    outline: none;
    min-width: 0;
}
.link-row input:focus { border-color: var(--accent); }

.success-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.success-actions .btn-primary  { flex: 1; text-align: center; }
.success-actions .btn-secondary { flex: 1; text-align: center; }

.upload-another {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
}
.upload-another:hover { color: var(--text); }

/* ── Background overlay ───────────────────────────────────── */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    display: none;
}
.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}
.bg-overlay.active { display: block; }

/* ── Preview Page ─────────────────────────────────────────── */
.preview-page, .error-state {
    position: relative;
    z-index: 1;
}
.preview-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Toolbar */
.toolbar {
    height: var(--nav-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.toolbar-logo {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    color: var(--text);
}
.toolbar-logo span { color: var(--accent); }
.file-name {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Platform tabs */
.platform-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}
.platform-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.tab-btn:hover  { color: var(--text); background: var(--surface2); }
.tab-btn.active { color: var(--text); background: var(--surface2); position: relative; }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* View controls */
.view-controls {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg);
    align-items: center;
    flex-shrink: 0;
}
.view-label { font-size: 11px; color: var(--muted); margin-right: 4px; }
.view-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.view-btn.active { background: var(--surface); border-color: var(--accent); color: var(--text); }
.view-btn:hover:not(.active) { color: var(--text); }

/* Preview area */
.preview-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 40px;
    overflow: auto;
}

/* Device frame (phone mockup) */
.device-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-frame.phone-mode {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 44px;
    padding: 52px 12px 44px;
    box-shadow: 0 0 0 1px #444, 0 24px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}
.device-frame.phone-mode::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 7px;
    background: #2e2e2e;
    border-radius: 4px;
}
.device-frame.phone-mode::after {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #2e2e2e;
    border-radius: 3px;
}


/* Preview frame */
.preview-frame {
    position: relative;
    overflow: hidden;
    background: #000;
}

/* Per-platform sizing */
.preview-frame.platform-tiktok,
.preview-frame.platform-ig-stories,
.preview-frame.platform-ig-reels,
.preview-frame.platform-fb-stories,
.preview-frame.platform-fb-carousel {
    aspect-ratio: 9 / 16;
    width: 320px;
    border-radius: 2px;
}
.preview-frame.platform-ig-feed {
    aspect-ratio: 9 / 16;
    width: 320px;
    border-radius: 2px;
}
.preview-frame.platform-fb-feed {
    aspect-ratio: 9 / 16;
    width: 320px;
    border-radius: 2px;
}


/* Media inside frame */
.media-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.media-container video,
.media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Platform Overlays ────────────────────────────────────── */
.platform-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: none;
}
.platform-overlay.active { display: block; }

/* ── TikTok ──── */
.ov-tiktok .tt-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-top: 10px;
}
.tt-nav-item {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.3px;
}
.tt-nav-item.active {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.tt-nav-item.active::after {
    content: '';
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    margin-top: 2px;
}
.tt-search {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    font-size: 16px;
}

.ov-tiktok .tt-right {
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 32%;
    width: 15%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding-right: 4px;
}
.tt-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
}
.tt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface2);
    border: 2px solid #fff;
}
.tt-follow-plus {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: #fe2c55;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.tt-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.tt-action-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.tt-action-count {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ov-tiktok .tt-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 56px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
}
.tt-username {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.tt-caption {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
    margin-bottom: 8px;
    max-width: 92%;
}
.tt-sound-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
}
.tt-sound-icon { font-size: 13px; }

.ov-tiktok .tt-seekbar {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.2);
}
.tt-seek-progress {
    height: 100%;
    width: 35%;
    background: rgba(255,255,255,0.7);
}

/* ── Instagram Stories ──── */
.ov-ig-stories .igs-progress {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2%;
    min-height: 3px;
    padding: 6px 8px 0;
    display: flex;
    gap: 4px;
}
.igs-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}
.igs-bar.done  { background: rgba(255,255,255,0.9); }
.igs-bar.active::after {
    content: '';
    display: block;
    width: 60%;
    height: 100%;
    background: rgba(255,255,255,0.9);
}

.ov-ig-stories .igs-header {
    position: absolute;
    top: 0;
    left: 0; right: 0;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}
.igs-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #e55e8c, #a855f7, #3b82f6);
    flex-shrink: 0;
}
.igs-meta { flex: 1; min-width: 0; }
.igs-username { font-size: 12px; font-weight: 600; color: #fff; }
.igs-sponsored { font-size: 11px; color: rgba(255,255,255,0.7); }
.igs-more { font-size: 16px; color: rgba(255,255,255,0.8); margin-right: 4px; }
.igs-close { font-size: 16px; color: rgba(255,255,255,0.9); }

.ov-ig-stories .igs-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 14px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.igs-cta {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 8px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}
.igs-reply-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.igs-reply-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}
.igs-heart { font-size: 20px; }
.igs-send  { font-size: 18px; color: rgba(255,255,255,0.8); }

/* ── Facebook Stories ──── */
.ov-fb-stories .fbs-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
    padding: 8px 12px 20px;
}
.fbs-progress {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
}
.fbs-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}
.fbs-bar.done  { background: rgba(255,255,255,0.9); }
.fbs-bar.active::after {
    content: '';
    display: block;
    width: 45%;
    height: 100%;
    background: rgba(255,255,255,0.9);
}
.fbs-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fbs-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1877f2;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
}
.fbs-meta { flex: 1; }
.fbs-name  { font-size: 12px; font-weight: 700; color: #fff; }
.fbs-time  { font-size: 11px; color: rgba(255,255,255,0.65); }
.fbs-actions { display: flex; gap: 10px; font-size: 16px; color: rgba(255,255,255,0.8); }

.ov-fb-stories .fbs-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 14px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}
.fbs-reply {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 22px;
    padding: 9px 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 8px;
}
.fbs-react-row {
    display: flex;
    justify-content: space-around;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.fbs-react-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* ── Instagram Feed ──── */
.ov-ig-feed {
    flex-direction: column;
    background: #000;
    overflow: hidden;
}
.platform-overlay.active.ov-ig-feed {
    display: flex;
    flex-direction: column;
}
.igf-header {
    flex-shrink: 0;
    background: rgba(0,0,0,0.82);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.igf-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    flex-shrink: 0;
}
.igf-meta { flex: 1; }
.igf-username   { font-size: 12px; font-weight: 700; color: #fff; }
.igf-sponsored  { font-size: 11px; color: rgba(255,255,255,0.55); }
.igf-more { font-size: 18px; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
.igf-post-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
}
.igf-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.igf-post-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.igf-footer {
    flex-shrink: 0;
    background: rgba(0,0,0,0.82);
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.igf-actions {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.igf-actions-left  { display: flex; gap: 14px; flex: 1; }
.igf-actions-right { margin-left: auto; }
.igf-icon { font-size: 22px; color: rgba(255,255,255,0.85); }
.igf-likes    { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.igf-caption  { font-size: 12px; color: rgba(255,255,255,0.8); line-height: 1.4; }
.igf-cta-btn {
    display: block;
    margin-top: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 7px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* ── Facebook Feed ──── */
.ov-fb-feed {
    flex-direction: column;
    background: #18191a;
    overflow: hidden;
}
.platform-overlay.active.ov-fb-feed {
    display: flex;
    flex-direction: column;
}
.fbf-nav {
    flex-shrink: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #242526;
    border-bottom: 1px solid #3a3b3c;
}
.fbf-nav-logo {
    font-size: 24px;
    font-weight: 900;
    color: #1877f2;
    font-family: Georgia, serif;
    line-height: 1;
}
.fbf-nav-icons {
    display: flex;
    gap: 14px;
    font-size: 17px;
    color: rgba(255,255,255,0.65);
}
.fbf-post {
    background: #242526;
}
.fbf-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}
.fbf-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1877f2;
    flex-shrink: 0;
}
.fbf-post-meta { flex: 1; }
.fbf-page-name  { font-size: 13px; font-weight: 700; color: #fff; }
.fbf-post-sub   { font-size: 11px; color: rgba(255,255,255,0.45); }
.fbf-post-close { font-size: 15px; color: rgba(255,255,255,0.55); }
.fbf-post-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
}
.fbf-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fbf-post-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fbf-post-footer {
    padding: 8px 12px 10px;
}
.fbf-post-cta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 7px 10px;
    margin-bottom: 8px;
}
.fbf-post-copy      { flex: 1; min-width: 0; }
.fbf-post-headline  { font-size: 12px; font-weight: 700; color: #fff; }
.fbf-post-description { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 1px; }
.fbf-post-cta-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}
.fbf-post-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 8px;
}
.fbf-post-react-row {
    display: flex;
    justify-content: space-around;
}
.fbf-post-react-btn {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
}

/* ── Safe Zones ───────────────────────────────────────────── */
.safe-zone {
    display: none;
    position: absolute;
    background: var(--safe-color);
    border: 1px solid var(--safe-border);
    z-index: 3;
    pointer-events: none;
}
.safe-zone-label {
    display: none;
    position: absolute;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(50,220,120,0.9);
    z-index: 4;
    pointer-events: none;
    padding: 2px 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
}
.preview-frame.show-safe-zones .safe-zone,
.preview-frame.show-safe-zones .safe-zone-label { display: block; }
.preview-frame.show-safe-zones .safe-zone[data-res]::after {
    content: attr(data-res);
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(50, 220, 120, 0.95);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
    text-shadow: none;
}

/* Error state */
.error-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    gap: 12px;
    padding: 24px;
}
.error-state h2 { font-size: 18px; font-weight: 700; }
.error-state p  { font-size: 14px; color: var(--muted); }

/* ── Instagram Reels overlay ──── */
.ov-ig-reels .igr-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 9%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 0;
    font-size: 15px;
    color: #fff;
}
.igr-title { font-weight: 700; font-size: 14px; }

.ov-ig-reels .igr-right {
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 32%;
    width: 13%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding-right: 4px;
}
.igr-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.igr-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}
.igr-count { font-size: 10px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.ov-ig-reels .igr-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 52px 14px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
.igr-avatar-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}
.igr-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366);
    border: 2px solid #fff;
    flex-shrink: 0;
}
.igr-username { font-size: 12px; font-weight: 700; color: #fff; }
.igr-sponsored-badge {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    padding: 1px 5px;
}
.igr-follow {
    margin-left: auto;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    cursor: default;
}
.igr-caption { font-size: 11px; color: rgba(255,255,255,0.9); line-height: 1.4; margin-bottom: 6px; }
.igr-audio   { font-size: 11px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.igr-cta-bar { }
.igr-cta-btn {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    width: 100%;
}
.ov-ig-reels .igr-seekbar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.2);
}
.igr-seek-progress { height: 100%; width: 25%; background: rgba(255,255,255,0.7); }

/* ── Library page ─────────────────────────────────────────── */
.library-page { min-height: 100vh; display: flex; flex-direction: column; }

.lib-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.lib-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.lib-loading { color: var(--muted); font-size: 14px; }

.lib-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    text-align: center;
}
.lib-empty h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.lib-empty p  { font-size: 14px; color: var(--muted); }

.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.session-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
    cursor: default;
}
.session-card:hover { border-color: #3a3a3a; transform: translateY(-1px); }

.session-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface2);
    overflow: hidden;
}
.session-thumb img,
.session-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 13px;
}
.ratio-badges {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
}
.ratio-badge {
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.85);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.session-info {
    padding: 14px 16px 8px;
}
.session-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.session-date { font-size: 12px; color: var(--muted); }

.session-actions {
    display: flex;
    gap: 6px;
    padding: 8px 16px 14px;
}
.session-actions .btn-primary,
.session-actions .btn-secondary { font-size: 12px; padding: 7px 14px; flex: 1; text-align: center; }
.btn-danger {
    background: transparent;
    border: 1px solid #3a1a1a;
    border-radius: 8px;
    padding: 7px 12px;
    color: #e05555;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-danger:hover { background: rgba(224,85,85,0.1); border-color: #e05555; }

/* ── Create page ──────────────────────────────────────────── */
.create-page { min-height: 100vh; display: flex; flex-direction: column; }

.toolbar-sep   { color: var(--border); font-size: 16px; }
.toolbar-title { font-size: 14px; color: var(--muted); }

.create-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.create-name-row { margin-bottom: 28px; }
.name-input {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 16px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s;
}
.name-input:focus { border-color: var(--accent); }

.source-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.source-slot {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.slot-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.slot-ratio    { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.slot-platforms { font-size: 11px; color: var(--muted); line-height: 1.4; }

.slot-body { padding: 16px; }

.slot-drop {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    color: var(--muted);
}
.slot-drop:hover, .slot-drop.drag-over { border-color: var(--accent); background: rgba(124,106,238,0.05); color: var(--text); }
.slot-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.slot-drop svg { display: block; margin: 0 auto 10px; }
.slot-drop p { font-size: 13px; }

.slot-media-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}
.slot-media-inner { position: absolute; inset: 0; }
.slot-media-inner img,
.slot-media-inner video { width: 100%; height: 100%; object-fit: cover; display: block; }

.slot-file-info { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.slot-actions { display: flex; gap: 8px; }
.slot-actions .btn-secondary { font-size: 12px; padding: 7px 14px; }

.slot-progress-bar-wrap {
    background: var(--surface2);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.slot-progress-bar { height: 100%; background: var(--accent); border-radius: 4px; width: 0; transition: width 0.2s; }
.slot-progress-text { font-size: 12px; color: var(--muted); }

/* No-source placeholder in preview */
.no-source {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    pointer-events: none;
}
.no-source p  { font-size: 13px; color: var(--muted); }
.no-source a  { pointer-events: all; }

/* ── FB Carousel overlay ──────────────────────────────────── */
/* Specificity override: .platform-overlay.active sets display:block (0,2,0),
   so we need equal-or-higher specificity and later position to get display:flex */
.platform-overlay.active.ov-fb-carousel {
    display: flex;
    flex-direction: column;
}
.ov-fb-carousel {
    background: #f0f2f5;
}

/* FB top nav */
.fbc-nav {
    height: 44px;
    background: #1877f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
}
.fbc-nav-logo { font-size: 22px; font-weight: 900; font-style: italic; color: #fff; }
.fbc-nav-icons { display: flex; gap: 10px; color: rgba(255,255,255,0.9); font-size: 12px; }

/* Stub post above the ad */
.fbc-stub-post {
    background: #fff;
    margin-bottom: 6px;
    padding: 10px 12px 8px;
    flex-shrink: 0;
}
.fbc-stub-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fbc-stub-av { width: 28px; height: 28px; border-radius: 50%; background: #ddd; flex-shrink: 0; }
.fbc-stub-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.fbc-stub-line { height: 7px; background: #e8e8e8; border-radius: 4px; }
.fbc-stub-img {
    width: 100%;
    height: 52px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
    border-radius: 3px;
}

/* The ad post */
.fbc-ad-post {
    background: #fff;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.fbc-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px;
    flex-shrink: 0;
}
.fbc-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1877f2;
    flex-shrink: 0;
}
.fbc-post-meta { flex: 1; }
.fbc-page-name { font-size: 12px; font-weight: 700; color: #050505; }
.fbc-sponsored { font-size: 10px; color: #65676b; }
.fbc-dots-btn  { font-size: 14px; color: #65676b; letter-spacing: 1px; }
.fbc-caption   { font-size: 11px; color: #050505; padding: 2px 12px 8px; line-height: 1.4; flex-shrink: 0; }

/* Carousel scrollable area */
.fbc-carousel-wrap {
    border-top: 1px solid #e4e6eb;
    border-bottom: 1px solid #e4e6eb;
    overflow: hidden;
    flex-shrink: 0;
}

/* Carousel prev/next arrows outside the phone */
.scene-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, opacity 0.2s;
    padding: 0;
    outline: none;
}
.scene-arrow:hover { background: rgba(255, 255, 255, 0.2); }
.scene-arrow.carousel-active { display: flex; }
.scene-arrow.hidden { opacity: 0; pointer-events: none; }
.fbc-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    pointer-events: auto;
    padding: 8px 0 8px 8px;
    gap: 8px;
    align-items: stretch;
    cursor: grab;
    user-select: none;
}
.fbc-track::-webkit-scrollbar { display: none; }
.fbc-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.fbc-card {
    flex-shrink: 0;
    width: 270px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border: 1px solid #e4e6eb;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.fbc-card-media {
    width: 100%;
    aspect-ratio: 1;
    background: #e4e6eb;
    overflow: hidden;
    flex-shrink: 0;
}
.fbc-card-media video,
.fbc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fbc-card-ph { background: linear-gradient(135deg, #dde3ee 0%, #c8d0e0 100%); }
.fbc-card-body {
    flex-shrink: 0;
    padding: 8px 10px;
    border-top: 1px solid #e4e6eb;
    background: #f0f2f5;
}
.fbc-card-hl  { font-size: 11px; font-weight: 700; color: #050505; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbc-card-cta {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #1877f2;
    border: 1.5px solid #1877f2;
    border-radius: 4px;
    padding: 3px 8px;
}

/* Post actions */
.fbc-post-actions {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    flex-shrink: 0;
}
.fbc-action-btn { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #65676b; }

/* ── Carousel section on create page ──────────────────────── */
.carousel-section {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.carousel-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.carousel-section-title { font-size: 16px; font-weight: 700; color: var(--text); margin-right: 8px; }
.carousel-section-sub   { font-size: 11px; color: var(--muted); }
.carousel-count         { font-size: 12px; color: var(--muted); }

.carousel-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.carousel-thumb {
    position: relative;
    width: 88px;
    height: 88px;
    cursor: grab;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface2);
    flex-shrink: 0;
}
.carousel-thumb img,
.carousel-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.carousel-thumb-rm {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.65);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.carousel-thumb-rm:hover { background: rgba(224,85,85,0.9); }
.carousel-thumb.drag-over  { outline: 2px solid #1877f2; outline-offset: 2px; }
.carousel-thumb.drag-source { opacity: 0.35; }

.carousel-drop {
    padding: 20px 16px;
}

/* ── Appearance section on create page ───────────────────── */
.appearance-divider {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.appearance-divider-label { font-size: 14px; font-weight: 700; color: var(--text); }
.appearance-divider-sub   { font-size: 12px; color: var(--muted); }

.appearance-row {
    display: flex;
    gap: 16px;
}
.appearance-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    min-width: 0;
}
.appearance-card-head { margin-bottom: 12px; }
.appearance-card-title { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.appearance-card-sub   { font-size: 11px; color: var(--muted); }

.bg-drop { padding: 14px 12px; }
.bg-preview-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 8px;
}
.bg-thumb {
    width: 72px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface2);
}
.bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-thumb {
    width: 52px;
    height: 52px;
}
.logo-thumb img { object-fit: contain; background: var(--surface2); }
.bg-filename { font-size: 12px; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Logo on preview page ─────────────────────────────────── */
.preview-logo {
    position: fixed;
    bottom: 50px;
    right: 50px;
    max-width: 150px;
    width: auto;
    height: auto;
    z-index: 10;
    display: none;
    pointer-events: none;
}
.preview-logo.active { display: block; }

/* ── Scene wrappers ───────────────────────────────────────── */
.scene-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.scene-desktop {
    width: 100%;
    max-width: 1120px;
}

/* ── Desktop browser window ───────────────────────────────── */
.dbw {
    background: #111113;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}

/* Browser chrome bar */
.dbw-chrome {
    background: #252528;
    border-bottom: 1px solid #333;
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 14px;
}
.dbw-dots { display: flex; gap: 7px; flex-shrink: 0; }
.dbw-dot  { width: 12px; height: 12px; border-radius: 50%; }
.dbw-dot-r { background: #ff5f57; }
.dbw-dot-y { background: #febc2e; }
.dbw-dot-g { background: #28c840; }
.dbw-addr {
    flex: 1;
    max-width: 380px;
    margin: 0 auto;
    background: #1c1c1f;
    border: 1px solid #3a3a3a;
    border-radius: 7px;
    height: 26px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
    min-width: 0;
}
.dbw-lock { font-size: 10px; color: #666; flex-shrink: 0; }
.dbw-url  { font-size: 11px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbw-chrome-end { flex-shrink: 0; color: #555; font-size: 13px; letter-spacing: 2px; }

/* Portrait layout: phone centered in light page */
.dbw-portrait {
    min-height: 580px;
    background: #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.dbw-phone-slot {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feed layout: 3-col */
.dbw-feed {
    display: flex;
    min-height: 580px;
    background: #fafafa;
}

.dbw-sidebar-l {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #e5e5e5;
    background: #fff;
    padding: 24px 10px;
}
.dbw-brand {
    width: 90px;
    height: 26px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0 10px 28px;
}
.dbw-nav { display: flex; flex-direction: column; gap: 2px; }
.dbw-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: default;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.dbw-nav-item::before {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: #ddd;
    flex-shrink: 0;
}
.dbw-nav-item.active { font-weight: 700; background: #f0f0f0; }

.dbw-center {
    flex: 1;
    min-width: 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow-y: auto;
}
.dbw-stub-post {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 8px;
    overflow: hidden;
}
.dbw-stub-post::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(180deg, #e8e8e8 0%, #f0f0f0 100%);
}
.dbw-stub-post::after {
    content: '';
    display: block;
    height: 52px;
}
.dbw-ad-slot {
    width: 100%;
    max-width: 470px;
}
.dbw-ad-slot .preview-frame { width: 100% !important; }

.dbw-sidebar-r {
    width: 260px;
    flex-shrink: 0;
    border-left: 1px solid #e5e5e5;
    background: #fff;
    padding: 24px 16px;
}
.dbw-sug-title { font-size: 12px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.dbw-sug-item  { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13px; color: #333; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.dbw-sug-av    { width: 36px; height: 36px; border-radius: 50%; background: #e0e0e0; flex-shrink: 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .source-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .upload-card { padding: 28px 20px; }
    .drop-zone { padding: 40px 16px; }

    .preview-frame.platform-tiktok,
    .preview-frame.platform-ig-stories,
    .preview-frame.platform-ig-reels,
    .preview-frame.platform-fb-stories,
    .preview-frame.platform-fb-carousel {
        width: min(280px, calc(100vw - 80px));
    }
    .preview-frame.platform-ig-feed,
    .preview-frame.platform-fb-feed {
        width: min(280px, calc(100vw - 80px));
    }

    .toolbar-right .btn-secondary { display: none; }
    .file-name { max-width: 100px; }

    .source-grid { grid-template-columns: 1fr; }
    .lib-main { padding: 20px 16px; }
    .session-grid { grid-template-columns: 1fr; }
    .create-main { padding: 20px 16px; }
}
