        /* ============================================
           DESIGN TOKENS (Light Mode — Knowledge Base System)
           ============================================ */
        :root {
            /* --- Brand & Accent --- */
            --primary: #0c3c60;
            --primary-hover: #3c6078;
            --accent: #181818;
            --soft-bg: #eceff2;
            --soft-border: #cad4dc;
            --on-primary: #ffffff;

            /* --- Surface --- */
            --canvas: #ffffff;
            --surface: #f7f9fc;
            --cloud: #f0f2f5;
            --border: #e0e4e8;
            --muted-border: #d0d5dd;

            /* --- Text --- */
            --ink: #2c3e50;
            --charcoal: #4a5568;
            --graphite: #6b7b8d;
            --muted: #9ca3af;

            /* --- Semantic --- */
            --success: #2ecc71;
            --error: #e74c3c;
            --warning: #ffe082;
            --info: #3498db;

            /* --- Layout --- */
            --header-height: 60px;
            --nav-width: 220px;

            /* --- Elevation --- */
            --shadow-soft: 0 1px 3px rgba(0,0,0,0.08);
            --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
            --shadow-modal: 0 20px 60px rgba(0,0,0,0.15);

            /* --- Border Radius --- */
            --radius-xs: 4px;
            --radius-sm: 6px;
            --radius-md: 8px;
            --radius-lg: 12px;
            --radius-xl: 16px;
            --radius-pill: 999px;
        }

        /* ============================================
           RESET & BASICS
           ============================================ */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--cloud);
            min-height: 100vh;
            color: var(--ink);
        }

        /* ============================================
           HEADER & NAVIGATION
           ============================================ */
        header {
            background: var(--canvas);
            padding: 15px 30px;
            border-bottom: 1px solid var(--border);
            box-shadow: var(--shadow-soft);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--primary);
        }

        .logo span {
            color: var(--ink);
        }

        /* Pipeline Sub-Navigation (6-Step Bar) */
        .pipeline-subnav {
            margin-left: 220px;
            background: var(--canvas);
            border-bottom: 1px solid var(--border);
            box-shadow: var(--shadow-soft);
            padding: 10px 24px;
            position: sticky;
            top: 0;
            z-index: 99;
        }
        @media (max-width: 900px) {
            .pipeline-subnav { margin-left: 0; }
        }

        .pipeline-subnav-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            gap: 0;
            align-items: center;
            justify-content: center;
        }

        .ps-connector {
            width: 28px;
            height: 2px;
            background: var(--border);
            flex-shrink: 0;
            transition: background 0.3s;
        }
        .ps-connector.reached {
            background: rgba(46, 204, 113, 0.4);
        }

        .progress-step {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            border-radius: 20px;
            font-size: 0.82rem;
            background: var(--canvas);
            color: #64748b;
            border: 1px solid transparent;
            transition: all 0.25s;
            cursor: pointer;
            white-space: nowrap;
            font-weight: 500;
        }
        .ps-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            font-size: 0.72rem;
            font-weight: 700;
            background: var(--border);
            color: #64748b;
            flex-shrink: 0;
            transition: all 0.25s;
        }

        .progress-step.active {
            background: var(--soft-bg);
            color: var(--primary);
            font-weight: 600;
            border-color: var(--soft-border);
        }
        .progress-step.active .ps-num {
            background: var(--primary);
            color: var(--on-primary);
        }

        .progress-step.completed {
            background: rgba(46, 204, 113, 0.08);
            color: #1a7a4a;
            border-color: rgba(46, 204, 113, 0.3);
        }
        .progress-step.completed .ps-num {
            background: rgba(46, 204, 113, 0.2);
            color: #1a7a4a;
        }

        .progress-step.skipped {
            background: var(--surface);
            color: var(--graphite);
            text-decoration: line-through;
            cursor: default;
        }

        .progress-step:hover:not(.active):not(.skipped) {
            background: var(--soft-bg);
            color: var(--ink);
        }

        @media (max-width: 720px) {
            .pipeline-subnav { padding: 8px 10px; }
            .pipeline-subnav-content { gap: 0; }
            .progress-step span:not(.ps-num) { display: none; }
            .progress-step { padding: 6px 10px; }
            .ps-connector { width: 12px; }
        }

        /* New Content Button (accent) */
        .btn-new-content {
            background: rgba(0, 212, 170, 0.12) !important;
            border-color: rgba(0, 212, 170, 0.4) !important;
            color: #00d4aa !important;
            font-weight: 600 !important;
        }

        .btn-new-content:hover {
            background: rgba(0, 212, 170, 0.22) !important;
            border-color: rgba(0, 212, 170, 0.6) !important;
        }

        /* ============================================
           MAIN CONTAINER
           ============================================ */
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 30px;
        }

        .screen {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .screen.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ============================================
           CARDS & PANELS
           ============================================ */
        .card {
            background: var(--canvas);
            border-radius: 16px;
            padding: 25px;
            margin-bottom: 20px;
            border: 1px solid var(--border);
        }

        .card h2 {
            color: var(--primary);
            margin-bottom: 20px;
            font-size: 1.3rem;
        }

        .card h3 {
            color: var(--ink);
            margin-bottom: 15px;
            font-size: 1.1rem;
        }

        /* ============================================
           FORM ELEMENTS
           ============================================ */
        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--graphite);
            font-size: 0.9rem;
        }

        .form-group label .required {
            color: #e74c3c;
        }

        input[type="text"],
        textarea {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid var(--muted-border);
            border-radius: 8px;
            background: var(--canvas);
            color: var(--ink);
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        input[type="text"]:focus,
        textarea:focus {
            outline: none;
            border-color: var(--primary);
        }

        textarea {
            min-height: 120px;
            resize: vertical;
        }

        .form-group .form-select {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid var(--muted-border);
            border-radius: 8px;
            background: var(--canvas);
            color: var(--ink);
            font-size: 1rem;
            transition: border-color 0.3s;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23aaa' d='M6 8L0 0h12z'/></svg>");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 40px;
            cursor: pointer;
        }

        .form-group .form-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* ============================================
           TIMERANGE PILLS (Segmented Control)
           ============================================ */
        .form-group label .label-text {
            display: inline-block;
            color: var(--graphite);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .form-group label .label-hint {
            display: inline-block;
            margin-left: 10px;
            color: #666;
            font-size: 0.78rem;
            font-weight: 400;
        }

        .timerange-pills {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            padding: 6px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
        }

        .timerange-pill {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            padding: 12px 8px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            color: var(--graphite);
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
            font-family: inherit;
            outline: none;
        }

        .timerange-pill .tr-icon {
            font-size: 1.1rem;
            line-height: 1;
            opacity: 0.75;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }

        .timerange-pill .tr-label {
            font-size: 0.92rem;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        .timerange-pill .tr-sub {
            font-size: 0.7rem;
            color: #6b7280;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            font-weight: 500;
        }

        .timerange-pill:hover {
            background: var(--canvas);
            color: var(--ink);
        }

        .timerange-pill:hover .tr-icon {
            opacity: 1;
            transform: translateY(-1px);
        }

        .timerange-pill:focus-visible {
            border-color: var(--soft-border);
            box-shadow: 0 0 0 3px rgba(12,60,96,0.08);
        }

        .timerange-pill.is-active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
            color: var(--primary);
            box-shadow: var(--shadow-soft);
        }

        .timerange-pill.is-active .tr-icon {
            opacity: 1;
            transform: translateY(-1px) scale(1.08);
        }

        .timerange-pill.is-active .tr-sub {
            color: var(--primary);
            font-weight: 600;
        }

        .timerange-pill:active {
            transform: scale(0.98);
        }

        @media (max-width: 600px) {
            .timerange-pills {
                grid-template-columns: repeat(2, 1fr);
            }
            .timerange-pill {
                padding: 10px 6px;
            }
            .timerange-pill .tr-sub {
                font-size: 0.66rem;
            }
            .form-group label .label-hint {
                display: block;
                margin-left: 0;
                margin-top: 2px;
            }
        }

        /* ============================================
           TOPIC DISPLAY META (Schritt-2-Header)
           ============================================ */
        .topic-display-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 8px;
        }

        .topic-display-meta .tdm-item {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 999px;
            font-size: 0.88rem;
        }

        .topic-display-meta .tdm-label {
            color: var(--graphite);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-weight: 500;
        }

        .topic-display-meta .tdm-value {
            color: var(--ink);
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .topic-display-meta .tdm-topic {
            color: var(--primary);
        }

        .topic-display-meta .tdm-timerange {
            color: var(--primary);
        }

        .topic-display-meta .tdm-tr-icon {
            font-size: 0.95rem;
            line-height: 1;
        }

        /* ============================================
           BUTTONS
           ============================================ */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--on-primary);
            border-radius: var(--radius-sm);
        }

        .btn-primary:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
        }

        .btn-primary:disabled {
            background: var(--muted-border);
            color: var(--graphite);
            cursor: not-allowed;
            transform: none;
        }

        .btn-secondary {
            background: var(--border);
            color: var(--ink);
            border: 1px solid var(--muted-border);
        }

        .btn-secondary:hover {
            background: var(--muted-border);
        }

        .btn-group {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            flex-wrap: wrap;
        }

        /* ============================================
           TRIGGER BUTTONS (Screen A)
           ============================================ */
        .trigger-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .trigger-btn {
            padding: 25px 20px;
            background: var(--canvas);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }

        .trigger-btn:hover {
            background: var(--border);
            border-color: var(--muted-border);
        }

        .trigger-btn.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .trigger-btn .icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .trigger-btn .title {
            font-weight: bold;
            color: var(--ink);
            margin-bottom: 5px;
        }

        .trigger-btn .desc {
            font-size: 0.8rem;
            color: var(--graphite);
        }

        .pipeline-badge {
            display: inline-block;
            margin-top: 8px;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: bold;
            background: var(--soft-bg);
            color: var(--primary);
            border: 1px solid var(--soft-border);
        }

        /* Pipeline Source Tabs */
        .pipeline-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
            border-bottom: 2px solid var(--border);
        }

        .pipeline-tab {
            padding: 12px 20px;
            cursor: pointer;
            color: var(--graphite);
            font-size: 0.9rem;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pipeline-tab:hover {
            color: var(--charcoal);
        }

        .pipeline-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .pipeline-tab .tab-count {
            background: var(--border);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
        }

        .pipeline-tab.active .tab-count {
            background: var(--soft-bg);
            color: var(--primary);
        }

        .pipeline-source {
            display: none;
        }

        .pipeline-source.active {
            display: block;
        }

        /* Pipeline Item Cards */
        .pipeline-item {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 14px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .pipeline-item:hover {
            background: var(--soft-bg);
            border-color: var(--muted-border);
        }

        .pipeline-item.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .pipeline-item-icon {
            font-size: 1.4rem;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .pipeline-item-body {
            flex: 1;
            min-width: 0;
        }

        .pipeline-item-title {
            font-weight: 600;
            color: var(--ink);
            margin-bottom: 4px;
        }

        .pipeline-item-meta {
            font-size: 0.82rem;
            color: var(--graphite);
        }

        .pipeline-item-badges {
            display: flex;
            gap: 6px;
            margin-top: 6px;
            flex-wrap: wrap;
        }

        .pipeline-item-actions {
            display: flex;
            gap: 6px;
            margin-top: 8px;
        }

        .pipeline-item-actions .btn-pip-action {
            padding: 4px 10px;
            font-size: 0.76rem;
            border-radius: 6px;
            border: 1px solid var(--muted-border);
            background: var(--canvas);
            color: var(--graphite);
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .pipeline-item-actions .btn-pip-action:hover {
            background: var(--border);
            color: var(--ink);
            border-color: var(--muted-border);
        }

        .pipeline-item-actions .btn-pip-summary {
            background: rgba(155, 89, 182, 0.08);
            color: #7c3aed;
            border-color: rgba(155, 89, 182, 0.25);
        }

        .pipeline-item-actions .btn-pip-summary:hover {
            background: rgba(155, 89, 182, 0.16);
            color: #6d28d9;
            border-color: #7c3aed;
        }

        .pipeline-item-actions .btn-pip-summary.loaded {
            background: rgba(46, 204, 113, 0.1);
            color: #15803d;
            border-color: rgba(46, 204, 113, 0.35);
        }

        .pipeline-item-actions .btn-pip-summary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pipeline-item-actions .btn-pip-link {
            background: rgba(52, 152, 219, 0.08);
            color: var(--primary);
            border-color: rgba(52, 152, 219, 0.25);
            text-decoration: none;
        }

        .pipeline-item-actions .btn-pip-link:hover {
            background: rgba(52, 152, 219, 0.14);
            color: #1d4e89;
            border-color: var(--primary);
        }

        .pipeline-item-inline-summary {
            margin-top: 8px;
            padding: 10px 12px;
            background: rgba(155, 89, 182, 0.06);
            border: 1px solid rgba(155, 89, 182, 0.15);
            border-radius: 8px;
            font-size: 0.82rem;
            color: var(--charcoal);
            display: none;
        }

        .pipeline-item-inline-summary .pip-summary-loading {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #7c3aed;
        }

        .pipeline-item-inline-summary .pip-summary-loading .spinner-small {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(155, 89, 182, 0.2);
            border-top-color: #7c3aed;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .pipeline-item-inline-summary .pip-summary-text {
            line-height: 1.5;
        }

        .pipeline-item-inline-summary .pip-summary-keypoints {
            margin-top: 6px;
            padding-left: 16px;
        }

        .pipeline-item-inline-summary .pip-summary-keypoints li {
            margin-bottom: 3px;
            color: var(--graphite);
        }

        .pipeline-item-inline-summary .pip-summary-relevance {
            margin-top: 6px;
            padding: 6px 8px;
            background: var(--soft-bg);
            border-radius: 6px;
            color: var(--primary);
            font-size: 0.78rem;
        }

        .pipeline-empty {
            text-align: center;
            padding: 30px 20px;
            color: #666;
        }

        .pipeline-empty .empty-icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .pipeline-list {
            max-height: 350px;
            overflow-y: auto;
        }

        /* ============================================
           OUTPUT TILES (Screen A)
           ============================================ */
        .output-tiles {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }

        .output-tile {
            padding: 20px;
            background: var(--canvas);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }

        .output-tile:hover {
            background: var(--border);
        }

        .output-tile.selected {
            background: rgba(46, 204, 113, 0.2);
            border-color: #2ecc71;
        }

        .output-tile.disabled {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
        }

        .output-tile .subtitle {
            font-size: 0.75rem;
            color: #666;
            margin-top: 5px;
        }

        .output-tile .icon {
            font-size: 1.8rem;
            margin-bottom: 8px;
        }

        .output-tile .title {
            font-weight: bold;
            color: var(--ink);
        }

        /* ============================================
           TOPIC CARDS (Screen B)
           ============================================ */
        .topics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .topic-card {
            padding: 20px;
            background: var(--canvas);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        .topic-card:hover {
            background: var(--border);
            border-color: var(--muted-border);
        }

        .topic-card.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .topic-card.top-pick {
            border-color: rgba(46, 204, 113, 0.5);
            background: rgba(46, 204, 113, 0.06);
        }
        .topic-card.top-pick:hover {
            border-color: rgba(46, 204, 113, 0.7);
        }
        .topic-card.top-pick.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .topic-rank-badge {
            position: absolute;
            top: -10px;
            right: 16px;
            padding: 2px 10px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .topic-rank-badge.gold   { background: var(--primary); color: var(--cloud); }
        .topic-rank-badge.silver { background: #95a5a6; color: var(--cloud); }
        .topic-rank-badge.bronze { background: #cd7f32; color: var(--cloud); }

        .topic-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }

        .topic-gesamt-score {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1rem;
            color: var(--cloud);
        }
        .topic-gesamt-score.score-high   { background: #2ecc71; }
        .topic-gesamt-score.score-medium { background: var(--primary); }
        .topic-gesamt-score.score-low    { background: #e74c3c; }

        .topic-card .topic-title {
            font-weight: bold;
            color: var(--ink);
            font-size: 1rem;
            margin: 0;
        }

        .topic-card .topic-rationale {
            color: var(--graphite);
            font-size: 0.85rem;
            margin-bottom: 12px;
        }

        .topic-source-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            margin: 12px 0 4px;
        }

        .topic-source-kicker {
            color: var(--graphite);
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.07em;
            text-transform: uppercase;
        }

        .topic-source-pill {
            display: inline-flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid rgba(52, 152, 219, 0.24);
            background: rgba(52, 152, 219, 0.12);
            color: var(--primary);
            font-size: 0.76rem;
            font-weight: 700;
            line-height: 1;
        }

        .topic-source-pill.is-derived {
            border-color: var(--soft-border);
            background: var(--soft-bg);
            color: var(--charcoal);
        }

        .topic-source-detail {
            flex: 1 1 220px;
            min-width: 0;
            color: var(--graphite);
            font-size: 0.8rem;
            line-height: 1.45;
        }

        .topic-source-link-inline {
            color: var(--primary);
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
        }

        .topic-source-link-inline:hover {
            text-decoration: underline;
        }

        .topic-scores {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .score-badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            background: var(--border);
        }

        .score-badge.high {
            background: rgba(46, 204, 113, 0.3);
            color: #2ecc71;
        }

        .score-badge.medium {
            background: var(--soft-bg);
            color: var(--primary);
        }

        .score-badge.low {
            background: rgba(231, 76, 60, 0.25);
            color: #e74c3c;
        }

        .score-tooltip {
            position: relative;
            cursor: help;
        }

        .score-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 50%;
            bottom: calc(100% + 8px);
            transform: translateX(-50%) translateY(4px);
            width: max-content;
            max-width: 280px;
            padding: 8px 10px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 10px;
            background: rgba(16, 24, 44, 0.86);
            color: rgba(255, 255, 255, 0.92);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
            font-size: 0.72rem;
            font-weight: 500;
            line-height: 1.35;
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
            z-index: 20;
            white-space: normal;
        }

        .score-tooltip:hover::after,
        .score-tooltip:focus-visible::after {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .topic-evidence-toggle {
            margin-top: 8px;
            padding: 0;
            border: none;
            background: none;
            color: #666;
            font-size: 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            transition: color 0.2s;
        }
        .topic-evidence-toggle:hover { color: var(--graphite); }

        .topic-evidence-panel {
            display: none;
            margin-top: 8px;
            padding: 10px 12px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.75rem;
            color: var(--graphite);
        }
        .topic-evidence-panel.open { display: block; }

        .evidence-section { margin-bottom: 6px; }
        .evidence-section:last-child { margin-bottom: 0; }
        .evidence-label {
            color: var(--graphite);
            font-weight: 600;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 2px;
        }
        .evidence-items {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }
        .evidence-tag {
            padding: 2px 8px;
            border-radius: 8px;
            background: var(--surface);
            font-size: 0.7rem;
            color: var(--graphite);
            max-width: 220px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .rss-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 0.8rem;
            background: rgba(52, 152, 219, 0.2);
            color: #3498db;
            margin-bottom: 15px;
        }

        .rss-badge.loading {
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .rss-source-link {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 0.75rem;
            color: #3498db;
            text-decoration: none;
            margin-top: 6px;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        .rss-source-link:hover {
            opacity: 1;
            text-decoration: underline;
        }

        /* ============================================
           RSS EXPLORER — 3-Panel Layout
           ============================================ */
        .rss-explorer-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100vw; height: 100vh;
            background: var(--cloud);
            z-index: 200;
            animation: fadeIn 0.25s ease;
        }
        .rss-explorer-overlay.active { display: flex; }

        .rss-explorer {
            display: flex;
            width: 100%; height: 100%;
            overflow: hidden;
        }

        /* --- Sidebar (left) --- */
        .rss-sidebar {
            width: 300px;
            min-width: 200px;
            max-width: 500px;
            background: var(--canvas);
            border-right: 2px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }
        .rss-sidebar-resize {
            position: absolute;
            top: 0; right: -3px;
            width: 6px; height: 100%;
            cursor: col-resize;
            z-index: 10;
            background: transparent;
            transition: background 0.15s;
        }
        .rss-sidebar-resize:hover,
        .rss-sidebar-resize.dragging {
            background: var(--soft-bg);
        }
        .rss-sidebar-header {
            padding: 16px 16px 10px;
            border-bottom: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex-shrink: 0;
        }
        .rss-sidebar-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .rss-sidebar-header h2 {
            color: var(--primary);
            font-size: 1.05rem;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .rss-sidebar-subtitle {
            font-size: 0.72rem;
            color: #555;
            padding-left: 2px;
        }
        .rss-sidebar-close {
            background: none;
            border: none;
            color: #666;
            font-size: 1.3rem;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: all 0.15s;
        }
        .rss-sidebar-close:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }

        .rss-sidebar-body {
            flex: 1;
            overflow-y: auto;
            padding: 10px 12px;
        }
        .rss-sidebar-section-title {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #555;
            margin: 18px 0 6px;
            padding: 4px 8px;
            background: var(--surface);
            border-radius: 4px;
        }
        .rss-sidebar-section-title:first-child { margin-top: 4px; }
        .rss-sidebar-section-hint {
            font-size: 0.7rem;
            color: #444;
            font-weight: 400;
            text-transform: none;
            letter-spacing: 0;
            margin-top: 1px;
        }

        /* --- Explorer Tree: Folders --- */
        .rss-folder-sidebar {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }
        .rss-folder-node { margin-bottom: 1px; }

        .rss-folder-header {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 9px 10px;
            border-radius: 7px;
            cursor: pointer;
            transition: all 0.15s;
            background: transparent;
            border: 1px solid transparent;
        }
        .rss-folder-header:hover {
            background: var(--canvas);
            border-color: var(--border);
        }
        .rss-folder-header.active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
        }
        .rss-folder-header .folder-chevron {
            font-size: 0.6rem;
            color: #666;
            transition: transform 0.2s;
            width: 12px;
            text-align: center;
            flex-shrink: 0;
        }
        .rss-folder-header.expanded .folder-chevron { transform: rotate(90deg); }
        .rss-folder-header .folder-icon { font-size: 1.15rem; flex-shrink: 0; }
        .rss-folder-header .folder-name {
            flex: 1;
            color: #ddd;
            font-weight: 600;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .rss-folder-header .folder-count {
            font-size: 0.7rem;
            color: #777;
            background: var(--surface);
            padding: 2px 8px;
            border-radius: 8px;
            flex-shrink: 0;
        }
        .rss-folder-header .folder-actions {
            display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s;
            flex-shrink: 0;
        }
        .rss-folder-header:hover .folder-actions { opacity: 1; }
        .rss-folder-header .folder-action-btn {
            background: none; border: none; color: #666;
            cursor: pointer; font-size: 0.78rem; padding: 3px 5px;
            border-radius: 4px; transition: all 0.15s;
        }
        .rss-folder-header .folder-action-btn:hover { color: var(--ink); background: var(--border); }
        .rss-folder-header .folder-action-btn.search-btn:hover { color: var(--primary); }
        .rss-folder-header .folder-action-btn.rename-btn:hover { color: #3498db; }
        .rss-folder-header .folder-action-btn.delete-btn:hover { color: #e74c3c; }

        /* Inline rename */
        .folder-rename-input {
            flex: 1;
            padding: 4px 8px;
            background: var(--border);
            border: 1px solid var(--soft-border);
            border-radius: 5px;
            color: var(--ink);
            font-size: 0.88rem;
            font-weight: 600;
            outline: none;
        }

        /* Folder children (feeds inside folder) */
        .rss-folder-children {
            display: none;
            padding-left: 20px;
            margin-top: 1px;
        }
        .rss-folder-node.expanded > .rss-folder-children { display: block; }

        .rss-folder-feed {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            font-size: 0.78rem;
            color: var(--graphite);
            border-radius: 5px;
            transition: all 0.15s;
        }
        .rss-folder-feed:hover { background: var(--surface); color: var(--charcoal); }
        .rss-folder-feed .feed-dot {
            width: 5px; height: 5px;
            border-radius: 50%;
            background: #555;
            flex-shrink: 0;
        }
        .rss-folder-feed .feed-label {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .rss-folder-feed .feed-actions {
            display: flex; gap: 2px;
            opacity: 0; transition: opacity 0.15s;
            flex-shrink: 0;
        }
        .rss-folder-feed:hover .feed-actions { opacity: 1; }
        .rss-folder-feed .feed-move-btn,
        .rss-folder-feed .feed-remove-btn {
            background: none; border: none;
            cursor: pointer;
            font-size: 0.7rem; padding: 2px 4px;
            border-radius: 3px; transition: all 0.15s;
        }
        .rss-folder-feed .feed-move-btn { color: var(--graphite); }
        .rss-folder-feed .feed-move-btn:hover { color: var(--primary); background: var(--soft-bg); }
        .rss-folder-feed .feed-remove-btn { color: #e74c3c; }
        .rss-folder-feed .feed-remove-btn:hover { background: rgba(231,76,60,0.1); }

        .feed-move-dropdown {
            position: absolute;
            right: 0; top: 100%;
            min-width: 160px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.14);
            z-index: 50;
            padding: 4px 0;
            animation: fadeIn 0.15s ease;
        }
        .feed-move-dropdown-item {
            display: flex; align-items: center; gap: 6px;
            padding: 7px 12px;
            font-size: 0.78rem; color: var(--charcoal);
            cursor: pointer; transition: background 0.12s;
            border: none; background: none; width: 100%;
            text-align: left;
        }
        .feed-move-dropdown-item:hover { background: var(--soft-bg); color: var(--primary); }
        .feed-move-dropdown-item.current { color: #555; cursor: default; }
        .feed-move-dropdown-item.current:hover { background: none; color: #555; }
        .rss-folder-feed-add {
            display: flex; gap: 4px;
            padding: 4px 10px; margin-top: 2px;
        }
        .rss-folder-feed-add input {
            flex: 1; padding: 4px 8px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 5px; color: var(--ink); font-size: 0.75rem;
        }
        .rss-folder-feed-add button {
            padding: 4px 8px;
            background: rgba(52,152,219,0.15); color: #3498db;
            border: 1px solid rgba(52,152,219,0.2);
            border-radius: 5px; cursor: pointer; font-size: 0.72rem;
            transition: all 0.15s;
        }
        .rss-folder-feed-add button:hover { background: rgba(52,152,219,0.25); }

        .rss-folder-create {
            display: flex; gap: 5px; margin-top: 10px; padding: 0 4px;
        }
        .rss-folder-create input {
            flex: 1; padding: 8px 10px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 7px; color: var(--ink); font-size: 0.84rem;
        }
        .rss-folder-create button {
            padding: 8px 14px;
            background: rgba(46,204,113,0.12);
            color: #2ecc71;
            border: 1px solid rgba(46,204,113,0.25);
            border-radius: 7px; cursor: pointer;
            font-size: 0.84rem; transition: all 0.15s;
            white-space: nowrap;
        }
        .rss-folder-create button:hover { background: rgba(46,204,113,0.22); }

        /* --- Sidebar View-Switcher --- */
        .sidebar-view-switch {
            display: flex;
            gap: 2px;
            margin-bottom: 10px;
            background: var(--surface);
            border-radius: 8px;
            padding: 3px;
        }
        .sidebar-view-btn {
            flex: 1;
            padding: 7px 8px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 6px;
            color: #777;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            text-align: center;
        }
        .sidebar-view-btn:hover { color: var(--charcoal); background: var(--canvas); }
        .sidebar-view-btn.active {
            color: var(--primary);
            background: var(--soft-bg);
            border-color: var(--soft-border);
        }
        .sidebar-view-btn.active.ideas-active {
            color: #7c3aed;
            background: rgba(155,89,182,0.08);
            border-color: rgba(155,89,182,0.2);
        }
        .sidebar-view-content { display: none; }
        .sidebar-view-content.active { display: block; }

        /* --- Ideen-Ordner Sidebar --- */
        .idea-folder-sidebar {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }
        .idea-folder-node { margin-bottom: 1px; }
        .idea-folder-header {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 9px 10px;
            border-radius: 7px;
            cursor: pointer;
            transition: all 0.15s;
            background: transparent;
            border: 1px solid transparent;
        }
        .idea-folder-header:hover {
            background: rgba(155,89,182,0.07);
            border-color: rgba(155,89,182,0.15);
        }
        .idea-folder-header.active {
            background: rgba(155,89,182,0.12);
            border-color: rgba(155,89,182,0.3);
        }
        .idea-folder-header .folder-chevron {
            font-size: 0.6rem; color: #666;
            transition: transform 0.2s; width: 12px;
            text-align: center; flex-shrink: 0;
        }
        .idea-folder-header.expanded .folder-chevron { transform: rotate(90deg); }
        .idea-folder-header .folder-icon { font-size: 1.05rem; flex-shrink: 0; }
        .idea-folder-header .folder-name {
            flex: 1; color: var(--charcoal); font-weight: 600;
            font-size: 0.85rem; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis;
        }
        .idea-folder-header .folder-count {
            font-size: 0.7rem; color: #7c3aed;
            background: rgba(155,89,182,0.08);
            padding: 2px 8px; border-radius: 8px; flex-shrink: 0;
        }
        .idea-folder-header .folder-actions {
            display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; flex-shrink: 0;
        }
        .idea-folder-header:hover .folder-actions { opacity: 1; }
        .idea-folder-header .folder-action-btn {
            background: none; border: none; color: #666;
            cursor: pointer; font-size: 0.78rem; padding: 3px 5px;
            border-radius: 4px; transition: all 0.15s;
        }
        .idea-folder-header .folder-action-btn:hover { color: var(--ink); background: var(--border); }
        .idea-folder-header .folder-action-btn.rename-btn:hover { color: #7c3aed; }
        .idea-folder-header .folder-action-btn.delete-btn:hover { color: #e74c3c; }

        .idea-folder-children {
            display: none;
            padding-left: 16px;
            margin-top: 2px;
        }
        .idea-folder-node.expanded > .idea-folder-children { display: block; }

        .idea-folder-idea {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 8px;
            font-size: 0.76rem;
            color: var(--graphite);
            border-radius: 5px;
            transition: all 0.15s;
            cursor: default;
            position: relative;
        }
        .idea-folder-idea:hover { background: rgba(155,89,182,0.06); color: var(--charcoal); }
        .idea-folder-idea .idea-dot {
            width: 16px; height: 16px;
            flex-shrink: 0;
            font-size: 0.7rem;
            text-align: center;
            line-height: 16px;
        }
        .idea-folder-idea .idea-label {
            flex: 1; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis;
        }
        .idea-folder-idea .idea-actions {
            display: flex; gap: 2px;
            opacity: 0; transition: opacity 0.15s;
            flex-shrink: 0;
        }
        .idea-folder-idea:hover .idea-actions { opacity: 1; }
        .idea-folder-idea .idea-move-btn,
        .idea-folder-idea .idea-remove-btn {
            background: none; border: none;
            cursor: pointer; font-size: 0.7rem;
            padding: 2px 4px; border-radius: 3px;
            transition: all 0.15s;
        }
        .idea-folder-idea .idea-move-btn { color: var(--graphite); position: relative; }
        .idea-folder-idea .idea-move-btn:hover { color: #7c3aed; background: rgba(155,89,182,0.08); }
        .idea-folder-idea .idea-remove-btn { color: #e74c3c; }
        .idea-folder-idea .idea-remove-btn:hover { background: rgba(231,76,60,0.1); }

        .idea-move-dropdown {
            position: absolute;
            right: 0; top: 100%;
            min-width: 170px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.14);
            z-index: 50;
            padding: 4px 0;
            animation: fadeIn 0.15s ease;
        }
        .idea-move-dropdown-item {
            display: flex; align-items: center; gap: 6px;
            padding: 7px 12px;
            font-size: 0.78rem; color: var(--charcoal);
            cursor: pointer; transition: background 0.12s;
            border: none; background: none; width: 100%;
            text-align: left;
        }
        .idea-move-dropdown-item:hover { background: var(--soft-bg); color: var(--primary); }

        /* --- Main panel (center) --- */
        .rss-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
            background: var(--canvas);
        }

        /* Tab-Navigation im Hauptbereich */
        .rss-main-tabs {
            display: flex;
            border-bottom: 2px solid var(--border);
            flex-shrink: 0;
            padding: 0 12px;
            gap: 0;
            background: var(--surface);
            align-items: stretch;
        }
        .rss-main-tab {
            padding: 13px 22px 11px;
            font-size: 0.9rem;
            font-weight: 600;
            color: #666;
            cursor: pointer;
            border: none;
            background: none;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }
        .rss-main-tab:hover { color: var(--graphite); background: var(--surface); }
        .rss-main-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
        .rss-main-tab.active[data-tab="discover"] { color: #7c3aed; border-bottom-color: #7c3aed; }
        .rss-main-tab.active[data-tab="research"] { color: #6d28d9; border-bottom-color: #6d28d9; }
        .rss-main-tab .tab-icon { font-size: 1.05rem; }
        .rss-main-tab .tab-hint {
            font-size: 0.68rem; font-weight: 400; color: #555;
        }
        .rss-main-tab.active .tab-hint { color: var(--graphite); }
        .rss-main-tab.active[data-tab="discover"] .tab-hint { color: #7c3aed; }
        .rss-main-tab.active[data-tab="research"] .tab-hint { color: #6d28d9; }
        .rss-main-tab-spacer { flex: 1; }
        .rss-main-tab-close {
            padding: 6px 10px;
            background: none; border: none;
            color: #555; font-size: 1.15rem;
            cursor: pointer; border-radius: 4px;
            display: flex; align-items: center;
        }
        .rss-main-tab-close:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }

        /* Push-News Badge */
        .rss-pushnews-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 7px;
            font-size: 0.7rem;
            font-weight: 700;
            color: #fff;
            background: #e74c3c;
            border-radius: 10px;
            min-width: 18px;
            text-align: center;
            line-height: 1.4;
        }
        .rss-main-tab.active[data-tab="pushnews"] { color: #e74c3c; border-bottom-color: #e74c3c; }

        /* Push-News Karten */
        .pushnews-card { transition: background 0.15s ease; }
        .pushnews-card:hover { background: var(--canvas) !important; }

        /* =======================================================
           RSS Start-Screen — Modern Cards
           ======================================================= */
        .rss-start-container {
            padding: 28px 20px 20px;
            max-width: 860px;
            margin: 0 auto;
        }
        .rss-start-header {
            text-align: center;
            margin-bottom: 28px;
        }
        .rss-start-hero-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            margin: 0 auto 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgba(231,76,60,0.18), rgba(187,143,206,0.18));
            color: #e74c3c;
            box-shadow: 0 6px 20px -8px rgba(231,76,60,0.6);
        }
        .rss-start-header h3 {
            font-size: 1.35rem;
            font-weight: 700;
            margin: 0 0 6px 0;
            letter-spacing: -0.01em;
            color: var(--text, #f1f5f9);
        }
        .rss-start-header p {
            color: var(--graphite);
            line-height: 1.55;
            font-size: 0.92rem;
            max-width: 540px;
            margin: 0 auto;
        }
        .rss-start-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
            gap: 16px;
        }

        .rss-start-card {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 20px 18px 16px;
            text-align: left;
            border-radius: 14px;
            border: 1px solid var(--border);
            background:
                
                var(--surface);
            color: var(--ink);
            cursor: pointer;
            overflow: hidden;
            isolation: isolate;
            transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
        }
        .rss-start-card::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(140deg, transparent 40%, rgba(255,255,255,0.12) 100%);
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
                mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
                    mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.25s ease;
            pointer-events: none;
            z-index: 2;
        }
        .rss-start-card::after {
            content: "";
            position: absolute;
            top: -40%;
            right: -30%;
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: radial-gradient(circle, var(--accent, rgba(231,76,60,0.18)) 0%, transparent 70%);
            filter: blur(8px);
            opacity: 0.6;
            transition: opacity 0.3s ease, transform 0.3s ease;
            pointer-events: none;
            z-index: 0;
        }
        .rss-start-card > * { position: relative; z-index: 1; }

        .rss-start-card:hover {
            transform: translateY(-3px);
            border-color: rgba(255,255,255,0.18);
            box-shadow: 0 14px 32px -12px rgba(0,0,0,0.6), 0 0 0 1px var(--accent-border, rgba(231,76,60,0.25));
        }
        .rss-start-card:hover::before { opacity: 1; }
        .rss-start-card:hover::after { opacity: 1; transform: scale(1.15); }
        .rss-start-card:active { transform: translateY(-1px); }
        .rss-start-card:focus-visible {
            outline: none;
            border-color: var(--accent-solid, #e74c3c);
            box-shadow: 0 0 0 3px var(--accent-focus, rgba(231,76,60,0.25));
        }

        /* Farbvarianten pro Karte */
        .rss-start-card[data-variant="pushnews"] {
            --accent: rgba(231,76,60,0.22);
            --accent-border: rgba(231,76,60,0.35);
            --accent-focus: rgba(231,76,60,0.25);
            --accent-solid: #e74c3c;
        }
        .rss-start-card[data-variant="feeds"] {
            --accent: rgba(12,60,96,0.12);
            --accent-border: rgba(12,60,96,0.25);
            --accent-focus: rgba(12,60,96,0.15);
            --accent-solid: var(--primary);
        }
        .rss-start-card[data-variant="discover"] {
            --accent: rgba(155,107,237,0.22);
            --accent-border: rgba(155,107,237,0.38);
            --accent-focus: rgba(155,107,237,0.25);
            --accent-solid: #9b6bed;
        }

        .rss-start-card-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .rss-start-card-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--accent-solid), color-mix(in srgb, var(--accent-solid) 70%, #000));
            color: #fff;
            box-shadow: 0 6px 18px -6px var(--accent-border);
        }
        @supports not (background: color-mix(in srgb, red, blue)) {
            .rss-start-card-icon { background: var(--accent-solid); }
        }

        .rss-start-card-badge {
            font-size: 0.68rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 4px 8px;
            border-radius: 999px;
            background: var(--accent);
            color: var(--accent-solid);
            border: 1px solid var(--accent-border);
            white-space: nowrap;
        }

        .rss-start-card-body {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1;
        }
        .rss-start-card-body h4 {
            margin: 0;
            font-size: 1.02rem;
            font-weight: 700;
            line-height: 1.25;
            letter-spacing: -0.01em;
            color: var(--text, #f1f5f9);
        }
        .rss-start-card-body p {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.5;
            color: var(--graphite);
            font-weight: 400;
        }

        .rss-start-card-cta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--accent-solid);
            padding-top: 4px;
            border-top: 1px dashed var(--border);
            margin-top: 2px;
            padding-top: 12px;
        }
        .rss-start-card-cta svg {
            transition: transform 0.2s ease;
        }
        .rss-start-card:hover .rss-start-card-cta svg {
            transform: translateX(3px);
        }

        /* Light-Mode-Anpassungen (falls aktiv) */
        body.light-mode .rss-start-card {
            background:
                linear-gradient(160deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.005) 100%),
                #ffffff;
            border-color: rgba(0,0,0,0.08);
            color: #1e293b;
        }
        body.light-mode .rss-start-header h3,
        body.light-mode .rss-start-card-body h4 { color: var(--canvas); }
        body.light-mode .rss-start-header p,
        body.light-mode .rss-start-card-body p { color: #64748b; }
        body.light-mode .rss-start-card-cta { border-top-color: rgba(0,0,0,0.08); }

        /* Ordner-Picker Popup */
        .folder-picker-popup {
            position: absolute; z-index: 9999;
            background: var(--canvas); border: 1px solid var(--border);
            border-radius: 10px; box-shadow: var(--shadow-modal);
            min-width: 200px; max-width: 280px; padding: 6px 0;
            max-height: 60vh; overflow-y: auto;
            animation: fpFadeIn 0.12s ease;
        }
        @keyframes fpFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
        .folder-picker-popup .fp-title {
            padding: 8px 14px 6px; font-size: 0.72rem; color: var(--graphite);
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .folder-picker-popup .fp-item {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 14px; cursor: pointer; font-size: 0.82rem;
            color: var(--charcoal); transition: background 0.1s;
        }
        .folder-picker-popup .fp-item:hover { background: rgba(155,89,182,0.12); color: var(--ink); }
        .folder-picker-popup .fp-item .fp-icon { flex-shrink: 0; }

        /* Tab-Content */
        .rss-tab-content { display: none; flex: 1; flex-direction: column; overflow: hidden; min-height: 0; }
        .rss-tab-content.active { display: flex; }
        #rss-tab-content-start { overflow-y: auto; }
        #rss-tab-content-discover { overflow-y: auto; padding: 10px; }

        /* Feed Discovery Tab */
        .rss-discover-tab-toolbar {
            display: flex; gap: 8px; align-items: center;
            padding: 16px 24px; flex-shrink: 0;
            border-bottom: 1px solid var(--border);
        }
        .rss-discover-tab-toolbar input {
            flex: 1; min-width: 200px;
            padding: 11px 14px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 8px; color: var(--ink); font-size: 0.92rem;
        }
        .rss-discover-tab-toolbar input:focus {
            border-color: rgba(155,89,182,0.5); outline: none;
        }
        .rss-discover-search-btn {
            padding: 11px 22px;
            background: rgba(155,89,182,0.08);
            color: #7c3aed;
            border: 1px solid rgba(155,89,182,0.3);
            border-radius: 8px; cursor: pointer;
            font-size: 0.88rem; font-weight: 600;
            transition: all 0.15s; white-space: nowrap;
        }
        .rss-discover-search-btn:hover { background: rgba(155,89,182,0.16); }
        .rss-discover-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .rss-discover-results-area {
            flex: 1; overflow-y: auto; padding: 16px 24px;
        }
        .rss-discover-results-info {
            font-size: 0.82rem; color: var(--graphite); margin-bottom: 12px;
        }
        .rss-discover-results-info strong { color: var(--charcoal); }
        .discover-feed-card-lg {
            display: flex; align-items: flex-start; justify-content: space-between;
            gap: 14px; padding: 14px 16px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px; margin-bottom: 8px;
            transition: border-color 0.15s;
        }
        .discover-feed-card-lg:hover { border-color: rgba(155,89,182,0.3); }
        .discover-feed-card-lg.kind-search {
            background: rgba(59,130,246,0.04);
            border-color: rgba(59,130,246,0.18);
        }
        .discover-feed-card-lg.kind-topic {
            background: rgba(34,197,94,0.04);
            border-color: rgba(34,197,94,0.18);
        }
        .discover-feed-info-lg { flex: 1; min-width: 0; }
        .discover-feed-title-lg {
            font-size: 0.92rem; color: var(--ink); font-weight: 600; margin-bottom: 3px;
        }
        .discover-feed-desc-lg { font-size: 0.8rem; color: var(--graphite); margin-bottom: 4px; }
        .discover-feed-url-lg {
            font-size: 0.72rem; color: var(--muted);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .discover-feed-meta-lg {
            display: flex; gap: 12px; margin-top: 6px; font-size: 0.72rem; color: var(--muted);
            flex-wrap: wrap;
        }
        .discover-feed-meta-lg span { display: flex; align-items: center; gap: 3px; }
        .discover-feed-kind {
            padding: 2px 7px;
            border-radius: 999px;
            font-weight: 700;
            line-height: 1.35;
        }
        .discover-feed-kind.search {
            color: #075985;
            background: #e0f2fe;
        }
        .discover-feed-kind.topic {
            color: #166534;
            background: #dcfce7;
        }

        /* --- Discover Accordion --- */
        .rss-discover-accordion {
            margin: 0 22px 8px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--surface);
            overflow: visible;
            scroll-margin-top: 78px;
            scroll-margin-bottom: 28px;
        }
        .rss-discover-accordion[open] {
            border-color: rgba(155,89,182,0.25);
        }
        .rss-discover-accordion-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 12px 16px;
            cursor: pointer;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--ink);
            list-style: none;
            transition: background 0.15s;
        }
        .rss-discover-accordion-header::-webkit-details-marker { display: none; }
        .rss-discover-accordion-header::before {
            content: '▸';
            display: inline-block;
            transition: transform 0.2s;
            font-size: 0.75rem;
            color: var(--graphite);
        }
        .rss-discover-accordion[open] > .rss-discover-accordion-header::before {
            transform: rotate(90deg);
        }
        .rss-discover-accordion-header:hover {
            background: rgba(155,89,182,0.06);
        }
        .rss-discover-accordion-hint {
            font-size: 0.76rem;
            font-weight: 400;
            color: var(--graphite);
        }
        .rss-discover-accordion-body {
            padding: 0 16px 14px;
        }
        .rss-discover-accordion-copy {
            margin: 0 0 10px;
            font-size: 0.82rem;
            line-height: 1.45;
            color: var(--graphite);
        }
        .rss-discover-accordion-body .rss-direct-source-panel,
        .rss-discover-accordion-body .rss-template-source-panel,
        .rss-discover-accordion-body .rss-migration-panel {
            margin: 0;
            padding: 0;
            border: none;
            background: transparent;
        }

        /* --- Compact Project Context --- */
        .rss-ctx-compact .rss-ctx-details {
            display: none;
        }
        .rss-ctx-compact:hover .rss-ctx-details {
            display: inline;
        }

        /* --- Empty State CTA --- */
        .rss-cta-discover {
            margin-top: 8px;
        }

        /* --- Mobile: Feed actions always visible --- */
        @media (max-width: 900px) {
            .rss-folder-feed .folder-actions,
            .rss-source-item .rss-pushnews-badge {
                opacity: 1 !important;
            }
        }
        .btn-add-discovered-lg {
            padding: 8px 18px;
            background: rgba(155,89,182,0.08);
            color: #7c3aed; border: 1px solid rgba(155,89,182,0.25);
            border-radius: 8px; cursor: pointer;
            font-size: 0.82rem; font-weight: 600;
            white-space: nowrap; flex-shrink: 0;
            transition: all 0.15s; align-self: center;
        }
        .btn-add-discovered-lg:hover { background: rgba(155,89,182,0.16); }
        .btn-add-discovered-lg.added {
            background: rgba(46,204,113,0.15); color: #2ecc71;
            border-color: rgba(46,204,113,0.3); cursor: default;
        }

        /* --- Discover: Results Header + Filter Chips --- */
        .rss-discover-results-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 2px 10px; gap: 10px;
        }
        .rss-discover-results-count {
            font-size: 0.82rem; color: var(--graphite);
        }
        .rss-discover-results-count strong { color: var(--charcoal); }
        .rss-discover-reset-btn {
            padding: 4px 10px;
            background: transparent;
            color: var(--graphite);
            border: 1px solid var(--border);
            border-radius: 6px; cursor: pointer;
            font-size: 0.75rem; font-weight: 500;
            transition: all 0.15s; white-space: nowrap;
        }
        .rss-discover-reset-btn:hover {
            background: rgba(220,38,38,0.08); color: #dc2626;
            border-color: rgba(220,38,38,0.25);
        }
        .rss-discover-filter-chips {
            display: flex; gap: 6px; flex-wrap: wrap;
            padding-bottom: 10px;
        }
        .rss-discover-filter-chip {
            padding: 4px 10px;
            background: var(--canvas); color: var(--graphite);
            border: 1px solid var(--border);
            border-radius: 999px; cursor: pointer;
            font-size: 0.76rem; font-weight: 500;
            display: flex; align-items: center; gap: 4px;
            transition: all 0.15s;
        }
        .rss-discover-filter-chip:hover {
            border-color: rgba(124,58,237,0.35); color: var(--ink);
        }
        .rss-discover-filter-chip.active {
            background: rgba(124,58,237,0.12); color: #7c3aed;
            border-color: rgba(124,58,237,0.4); font-weight: 600;
        }
        .rss-dfc-count {
            display: inline-block;
            background: rgba(0,0,0,0.07);
            border-radius: 999px;
            padding: 0 5px; font-size: 0.7rem; font-weight: 600;
            min-width: 18px; text-align: center;
        }
        .rss-discover-filter-chip.active .rss-dfc-count {
            background: rgba(124,58,237,0.18);
        }

        .rss-discover-empty-filter {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 28px 22px;
            color: var(--graphite);
            font-size: 0.85rem;
        }

        .rss-discover-show-all-btn {
            background: transparent;
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 4px 12px;
            font-size: 0.8rem;
            cursor: pointer;
            color: #7c3aed;
            font-weight: 600;
            white-space: nowrap;
        }
        .rss-discover-show-all-btn:hover {
            background: rgba(124,58,237,0.08);
            border-color: rgba(124,58,237,0.4);
        }

        .rss-main-header {
            padding: 14px 20px 6px;
            flex-shrink: 0;
            display: flex;
            align-items: baseline;
            gap: 12px;
        }
        .rss-main-header h3 {
            color: var(--ink);
            font-size: 1rem;
            margin: 0;
            white-space: nowrap;
        }
        .rss-main-header-hint {
            font-size: 0.75rem;
            color: #555;
        }
        .rss-main-toolbar {
            padding: 8px 20px 14px;
            border-bottom: 1px solid var(--border);
            display: flex;
            gap: 8px;
            align-items: center;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .rss-main-toolbar input,
        .rss-main-toolbar select {
            padding: 9px 12px;
            background: var(--canvas);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 8px;
            color: var(--ink);
            font-size: 0.88rem;
        }
        .rss-main-toolbar input:focus,
        .rss-main-toolbar select:focus {
            border-color: var(--soft-border);
            outline: none;
        }
        .rss-main-toolbar input { flex: 1; min-width: 140px; }
        .rss-main-search-btn {
            padding: 9px 18px;
            background: var(--soft-bg);
            color: var(--primary);
            border: 1px solid var(--soft-border);
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.88rem;
            font-weight: 600;
            transition: all 0.15s;
            white-space: nowrap;
        }
        .rss-main-search-btn:hover { background: var(--soft-bg); }
        .rss-main-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .rss-main-results-bar {
            padding: 8px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .rss-main-results-info { font-size: 0.8rem; color: var(--graphite); }
        .rss-main-results-info strong { color: var(--charcoal); }
        .rss-sort-select {
            padding: 5px 10px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--graphite); font-size: 0.78rem;
            cursor: pointer;
        }

        .rss-main-body {
            flex: 1;
            overflow-y: auto;
            padding: 12px 16px;
        }
        .rss-article-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .rss-article-card {
            display: flex;
            flex-direction: column;
            padding: 12px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s;
            border: 1px solid transparent;
            background: transparent;
        }
        .rss-article-card:hover {
            background: var(--surface);
            border-color: var(--border);
        }
        .rss-article-card.active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
        }
        .rss-article-title {
            font-weight: 600;
            color: var(--ink);
            font-size: 0.88rem;
            margin-bottom: 4px;
            line-height: 1.35;
        }
        .rss-article-meta {
            font-size: 0.73rem;
            color: #777;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }
        .rss-article-snippet {
            font-size: 0.78rem;
            color: var(--graphite);
            margin-top: 4px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* --- Preview panel (right) --- */
        .rss-preview {
            width: 400px;
            min-width: 400px;
            background: var(--surface);
            border-left: 2px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .rss-preview-header {
            padding: 18px 20px 14px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .rss-preview-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--ink);
            line-height: 1.4;
            margin-bottom: 8px;
        }
        .rss-preview-meta {
            display: flex; flex-wrap: wrap; gap: 10px;
            font-size: 0.78rem; color: var(--graphite);
            align-items: center;
        }
        .rss-preview-meta a { color: #3498db; text-decoration: none; }
        .rss-preview-meta a:hover { text-decoration: underline; }

        .rss-preview-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
        }
        .rss-preview-summary {
            font-size: 0.88rem;
            color: var(--charcoal);
            line-height: 1.65;
        }
        .rss-preview-kb {
            margin-top: 14px;
            padding: 10px 12px;
            background: rgba(46,204,113,0.06);
            border-left: 3px solid rgba(46,204,113,0.4);
            border-radius: 6px;
            font-size: 0.82rem;
            color: #2ecc71;
        }
        .rss-preview-actions {
            padding: 14px 20px;
            border-top: 1px solid var(--border);
            display: flex;
            gap: 8px;
            align-items: center;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .rss-preview-placeholder {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #444;
            text-align: center;
            padding: 40px 20px;
        }
        .rss-preview-placeholder .ph-icon { font-size: 2.5rem; margin-bottom: 12px; }
        .rss-preview-placeholder p { font-size: 0.85rem; max-width: 240px; }

        .btn-save-idea {
            padding: 7px 16px;
            border: 1px solid rgba(46,204,113,0.4);
            border-radius: 8px;
            background: rgba(46,204,113,0.12);
            color: #2ecc71;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 600;
            transition: all 0.15s;
        }
        .btn-save-idea:hover { background: rgba(46,204,113,0.22); }
        .btn-save-idea.saved {
            background: rgba(46,204,113,0.25);
            border-color: #2ecc71; cursor: default;
        }
        .btn-open-article {
            padding: 7px 14px;
            border: 1px solid rgba(52,152,219,0.3);
            border-radius: 8px;
            background: rgba(52,152,219,0.1);
            color: #3498db;
            cursor: pointer;
            font-size: 0.82rem;
            text-decoration: none;
            transition: all 0.15s;
        }
        .btn-open-article:hover { background: rgba(52,152,219,0.2); }

        .kb-badge-small {
            padding: 3px 8px; border-radius: 10px;
            font-size: 0.72rem; font-weight: 600;
        }
        .kb-badge-small.match { background: rgba(46,204,113,0.2); color: #2ecc71; }
        .kb-badge-small.no-match { background: var(--surface); color: #666; }

        .relevance-badge {
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 0.72rem;
            font-weight: 600;
        }
        .relevance-badge.rel-high   { background: rgba(46,204,113,0.2); color: #2ecc71; }
        .relevance-badge.rel-medium { background: var(--soft-bg); color: var(--primary); }
        .relevance-badge.rel-low    { background: rgba(231,76,60,0.15); color: #e74c3c; }
        .relevance-badge.rel-none   { background: var(--surface); color: #666; }

        /* Responsive: hide preview <1200px */
        @media (max-width: 1200px) {
            .rss-preview { display: none; }
            .rss-preview-mobile-overlay {
                display: flex !important;
                position: fixed;
                top: 0; left: 0; width: 100vw; height: 100vh;
                background: rgba(0,0,0,0.7);
                z-index: 250;
                justify-content: flex-end;
            }
            .rss-preview-mobile-overlay .rss-preview {
                display: flex;
                width: 420px; max-width: 90vw;
                min-width: auto;
                animation: slideInRight 0.25s ease;
            }
        }
        @keyframes slideInRight {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* Responsive: sidebar drawer <900px */
        @media (max-width: 900px) {
            .rss-sidebar { display: none; }
            .rss-sidebar.mobile-open {
                display: flex;
                position: fixed;
                top: 0; left: 0;
                height: 100vh; z-index: 260;
                animation: slideInLeft 0.2s ease;
            }
            .rss-mobile-sidebar-toggle {
                display: flex !important;
            }
        }
        @keyframes slideInLeft {
            from { transform: translateX(-100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        .rss-mobile-sidebar-toggle {
            display: none;
            padding: 9px 12px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--charcoal); cursor: pointer;
            font-size: 0.82rem; transition: all 0.15s;
        }
        .rss-mobile-sidebar-toggle:hover { background: var(--border); color: var(--primary); }

        .rss-modal-shell {
            display: flex;
            flex-direction: column;
            gap: 16px;
            padding: 20px 24px 18px;
        }

        .rss-modal-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }

        .rss-modal-kicker {
            margin: 0;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--graphite);
        }

        .rss-modal-header-copy {
            min-width: 0;
            display: flex;
            flex-direction: column;
        }

        .rss-modal-header h3 {
            margin: 6px 0 0;
            font-size: 1.4rem;
            color: var(--ink);
        }

        .rss-modal-project-bar {
            margin-top: 12px;
            border: 1px solid rgba(99, 102, 241, 0.24);
            border-radius: 14px;
            background: linear-gradient(90deg,
                rgba(99, 102, 241, 0.10) 0%,
                rgba(99, 102, 241, 0.05) 40%,
                rgba(99, 102, 241, 0.00) 100%);
            overflow: hidden;
            max-width: 100%;
        }

        .rss-project-context-inner {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px 14px;
            padding: 10px 14px;
            font-size: 0.82rem;
            color: var(--graphite);
            max-width: 100%;
        }

        .rss-project-context-inner > * {
            flex-shrink: 0;
        }

        .rss-ctx-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
            animation: ctx-pulse 2.4s infinite;
            flex-shrink: 0;
        }

        .rss-ctx-label {
            color: var(--graphite);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-size: 0.72rem;
            font-weight: 600;
        }

        .rss-ctx-project-name {
            color: var(--ink);
            font-weight: 700;
            font-size: 0.92rem;
            letter-spacing: 0.01em;
        }

        .rss-ctx-divider {
            color: rgba(148, 163, 184, 0.4);
            font-weight: 300;
            margin: 0 4px;
        }

        .rss-ctx-item {
            display: inline-flex;
            gap: 6px;
            align-items: baseline;
        }

        .rss-ctx-key {
            color: var(--graphite);
            font-size: 0.74rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .rss-ctx-item > span:last-child {
            color: var(--ink);
            font-weight: 500;
        }

        .rss-ctx-spacer {
            flex: 1 1 auto;
            min-width: 8px;
        }

        .rss-ctx-hint {
            font-size: 0.7rem;
            color: var(--graphite);
            padding: 2px 8px;
            border: 1px solid rgba(99, 102, 241, 0.35);
            border-radius: 10px;
            background: rgba(99, 102, 241, 0.08);
            white-space: nowrap;
            cursor: help;
        }

        .rss-project-context-bar[data-state="empty"] {
            background: linear-gradient(90deg,
                rgba(239, 68, 68, 0.12) 0%,
                rgba(239, 68, 68, 0.04) 60%,
                rgba(239, 68, 68, 0.00) 100%);
            border-color: rgba(239, 68, 68, 0.35);
        }

        .rss-project-context-bar[data-state="empty"] .rss-ctx-dot {
            background: #ef4444;
            animation: none;
        }

        .rss-modal-header-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .rss-workspace {
            flex: 1;
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(260px, 320px) 4px minmax(0, 1fr) minmax(320px, 420px);
            border: 1px solid var(--border);
            border-radius: 18px;
            overflow: hidden;
            background: rgba(12, 16, 33, 0.9);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
        }

        .rss-modal-shell .rss-sidebar {
            width: auto;
            min-width: 0;
            max-width: none;
            border-right: 1px solid var(--border);
            background: var(--surface);
            padding: 18px 14px 14px;
            gap: 0;
            overflow-y: auto;
            overflow-y: auto;
        }

        .rss-modal-shell .rss-sidebar-resize {
            position: relative;
            top: auto;
            right: auto;
            width: 4px;
            height: auto;
            background: var(--surface);
        }

        .rss-sidebar-intro {
            padding: 0 4px 14px;
            border-bottom: 1px solid var(--border);
        }

        .rss-sidebar-intro strong {
            display: block;
            font-size: 0.92rem;
            color: var(--ink);
            margin-bottom: 4px;
        }

        .rss-sidebar-intro p {
            margin: 0;
            font-size: 0.8rem;
            line-height: 1.5;
            color: var(--graphite);
        }

        .rss-source-nav {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 16px 0 18px;
        }

        .rss-source-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid transparent;
            border-left: 3px solid transparent;
            background: var(--surface);
            color: var(--ink);
            cursor: pointer;
            text-align: left;
            transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, border-left-color 0.18s ease;
        }

        .rss-source-item:hover {
            background: var(--canvas);
            border-color: var(--border);
            transform: translateY(-1px);
        }

        .rss-source-item.active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
            border-left-color: #7c3aed;
            box-shadow: var(--shadow-card);
        }

        .rss-source-item-push.active {
            background: rgba(231,76,60,0.12);
            border-color: rgba(231,76,60,0.28);
        }

        .rss-source-item-discover.active {
            background: rgba(155,89,182,0.14);
            border-color: rgba(155,89,182,0.28);
        }

        .rss-source-item-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 12px;
            background: var(--surface);
            font-size: 1.05rem;
            flex-shrink: 0;
        }

        .rss-source-item-copy {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .rss-source-item-copy strong {
            font-size: 0.9rem;
            color: var(--ink);
        }

        .rss-source-item-copy small {
            font-size: 0.76rem;
            line-height: 1.45;
            color: var(--graphite);
        }

        .rss-source-item-count,
        .rss-source-item-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 9px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 700;
            background: var(--border);
            color: var(--charcoal);
            flex-shrink: 0;
        }

        .rss-source-item-pill {
            background: rgba(155,89,182,0.16);
            color: #7c3aed;
        }

        .rss-source-item .rss-pushnews-badge {
            margin-left: 0;
        }

        .rss-folder-create-inline {
            margin-top: 14px;
            padding: 0;
        }

        .rss-content-stage {
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: var(--canvas);
        }

        .rss-stage-panel {
            display: none;
            flex: 1;
            min-height: 0;
        }

        .rss-stage-panel.active {
            display: flex;
            flex-direction: column;
        }

        .rss-panel-header {
            padding: 20px 22px 14px;
            border-bottom: 1px solid var(--border);
            background: var(--surface);
        }

        .rss-panel-eyebrow {
            display: inline-block;
            margin-bottom: 6px;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--graphite);
        }

        .rss-panel-header h4 {
            margin: 0 0 6px;
            font-size: 1.08rem;
            color: var(--ink);
        }

        .rss-panel-header p {
            margin: 0;
            font-size: 0.84rem;
            line-height: 1.55;
            color: var(--graphite);
            max-width: 58ch;
        }

        .rss-active-folder-indicator {
            padding: 12px 22px 0;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .rss-feed-scope-notice {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin: 14px 22px 0;
            padding: 14px 16px;
            border-radius: 14px;
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
        }

        .rss-feed-scope-notice-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            border-radius: 12px;
            background: var(--soft-bg);
            font-size: 1rem;
            flex-shrink: 0;
        }

        .rss-feed-scope-notice-copy {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .rss-feed-scope-notice-copy strong {
            font-size: 0.92rem;
            color: var(--ink);
        }

        .rss-feed-scope-notice-copy p {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.55;
            color: var(--charcoal);
        }

        .rss-active-folder-prefix {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--graphite);
        }

        .rss-active-folder-chip {
            display: inline-flex;
            align-items: center;
            background: rgba(124,58,237,0.1);
            color: #7c3aed;
            border: 1px solid rgba(124,58,237,0.35);
            border-radius: 999px;
            padding: 2px 10px;
            font-size: 0.78rem;
            font-weight: 600;
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .rss-active-folder-clear {
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--graphite);
            font-size: 0.85rem;
            padding: 0 2px;
            line-height: 1;
            opacity: 0.6;
        }
        .rss-active-folder-clear:hover {
            opacity: 1;
            color: #e74c3c;
        }

        .rss-search-toolbar {
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 16px 22px 18px;
            border-bottom: 1px solid var(--border);
            background: var(--surface);
        }

        /* Compact single-row variant */
        .rss-search-toolbar-compact {
            padding: 12px 22px 14px;
            gap: 0;
        }
        .rss-search-row {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        .rss-search-row #rss-search-seed { flex: 2; min-width: 160px; }
        .rss-search-row #rss-search-keywords { flex: 1; min-width: 130px; }
        .rss-search-row #rss-search-folder { flex: 0 1 155px; min-width: 120px; }
        .rss-search-row .rss-search-submit { flex: 0 0 auto; white-space: nowrap; }

        .rss-search-toolbar-main {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 12px;
        }

        .rss-search-toolbar-secondary {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .rss-search-toolbar-actions {
            display: flex;
            justify-content: flex-start;
        }

        .rss-search-question {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .rss-search-label {
            font-size: 0.83rem;
            font-weight: 700;
            color: var(--ink);
        }

        .rss-search-help {
            font-size: 0.74rem;
            line-height: 1.5;
            color: var(--graphite);
        }

        .rss-search-submit {
            min-height: 44px;
            white-space: nowrap;
            min-width: 220px;
        }

        .rss-search-toolbar .form-input {
            width: 100%;
            min-width: 0;
        }

        .rss-search-toolbar select.form-input,
        .rss-results-header select.form-input {
            min-height: 44px;
            border: 1px solid rgba(255,255,255,0.16);
            border-radius: 8px;
            background: var(--canvas);
            color: var(--ink);
        }

        .rss-results-header {
            padding: 0 22px 14px;
            font-size: 0.83rem;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            color: var(--graphite);
        }

        .rss-results-source-hint {
            color: var(--graphite);
        }

        .rss-stage-list {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 14px 18px 18px;
        }

        .rss-stage-list-push {
            padding-top: 8px;
        }

        .rss-stage-empty {
            max-width: 360px;
            margin: auto;
            text-align: center;
            color: var(--graphite);
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
            padding: 24px;
        }

        .rss-stage-empty h5 {
            margin: 0;
            font-size: 1rem;
            color: var(--ink);
        }

        .rss-stage-empty p {
            margin: 0;
            font-size: 0.84rem;
            line-height: 1.6;
        }

        .rss-stage-empty-icon {
            width: 58px;
            height: 58px;
            border-radius: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--canvas);
            font-size: 1.5rem;
        }

        .rss-stage-empty-onboarding .rss-stage-empty-icon {
            background: rgba(155,89,182,0.14);
            color: #7c3aed;
        }

        .rss-active-folder-indicator {
            align-items: center;
            gap: 8px;
            margin: 14px 22px 0;
            padding: 8px 12px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--graphite);
            flex-shrink: 0;
        }

        .rss-pushnews-toolbar {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            padding: 14px 22px;
            border-bottom: 1px solid var(--border);
        }

        .rss-pushnews-meta {
            font-size: 0.88rem;
            line-height: 1.5;
            color: var(--charcoal);
            margin-right: auto;
        }

        .rss-pushnews-meta span {
            color: var(--graphite);
            margin-left: 4px;
        }

        .rss-discover-searchbar {
            display: flex;
            gap: 10px;
            padding: 14px 22px 10px;
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--canvas);
            border-bottom: 1px solid transparent;
        }

        #rss-panel-discover {
            overflow-y: auto;
            padding-bottom: 96px;
            scroll-padding-top: 78px;
            scroll-padding-bottom: 96px;
        }

        /* The discover panel is a flex column; without this rule its children
           get flex-shrink: 1 by default, which squashes opened accordions so
           their bodies overflow and get clipped instead of expanding the
           scroll area. */
        #rss-panel-discover > * {
            flex-shrink: 0;
        }

        .rss-discover-searchbar .form-input {
            flex: 1;
            min-width: 0;
        }

        .rss-discover-suggestions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding: 0 22px 16px;
            border-bottom: 1px solid var(--border);
        }

        .rss-discover-results-main {
            display: none;
            flex: 0 0 auto;
            max-height: none;
            overflow-y: visible;
            padding: 0 22px;
            border-bottom: 1px solid var(--border);
            background: var(--canvas);
        }

        .rss-sidecar-health {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 10px;
            min-width: 0;
        }

        .rss-sidecar-chip {
            display: inline-flex;
            align-items: center;
            min-width: 0;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid rgba(148,163,184,0.35);
            background: var(--canvas);
            color: var(--graphite);
            font-size: 0.75rem;
            font-weight: 600;
            line-height: 1.35;
            white-space: nowrap;
        }

        .rss-sidecar-chip.ok {
            border-color: rgba(34,197,94,0.35);
            background: rgba(34,197,94,0.08);
            color: #166534;
        }

        .rss-sidecar-chip.disabled,
        .rss-sidecar-chip.error {
            border-color: rgba(148,163,184,0.35);
            background: rgba(148,163,184,0.08);
            color: var(--graphite);
        }

        .rss-direct-source-panel,
        .rss-template-source-panel {
            min-width: 0;
        }

        .rss-direct-source-form {
            display: grid;
            grid-template-columns: minmax(130px, 170px) minmax(240px, 1fr) minmax(150px, 210px) auto;
            gap: 8px;
            align-items: start;
            min-width: 0;
        }

        .rss-direct-source-form .form-input,
        .rss-template-source-panel .form-input {
            width: 100%;
            min-width: 0;
        }

        #rss-direct-label,
        #btn-rss-direct-add {
            grid-column: auto;
        }

        #btn-rss-direct-add,
        #btn-rss-template-add {
            justify-self: start;
        }

        .rss-template-source-panel {
            display: grid;
            gap: 10px;
        }

        .rss-template-source-head,
        .rss-template-fields {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 8px;
            min-width: 0;
        }

        .rss-template-field {
            display: grid;
            gap: 5px;
            min-width: 0;
            font-size: 0.8rem;
            color: var(--graphite);
        }

        .rss-template-preview-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: start;
            min-width: 0;
        }

        .rss-template-preview {
            display: block;
            min-width: 0;
            padding: 8px 10px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--canvas);
            color: var(--graphite);
            font-size: 0.78rem;
            line-height: 1.45;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .rss-discover-results-main.is-active {
            display: block;
            padding: 16px 22px 20px;
        }

        #rss-discover-results-main.is-active ~ .rss-discover-suggestions {
            display: none;
        }

        .rss-preview-rail {
            min-width: 0;
            display: flex;
            flex-direction: column;
            background: var(--surface);
            border-left: 1px solid var(--border);
        }

        .rss-preview-rail-header {
            padding: 20px 20px 14px;
            border-bottom: 1px solid var(--border);
        }

        .rss-preview-rail-kicker {
            display: inline-block;
            margin-bottom: 6px;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--graphite);
        }

        .rss-preview-rail-header h4 {
            margin: 0 0 6px;
            font-size: 1rem;
            color: var(--ink);
        }

        .rss-preview-rail-header p {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.55;
            color: var(--graphite);
        }

        .rss-preview-rail-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 18px 20px;
        }

        .rss-preview-rail-content .rss-preview-header {
            padding: 0 0 14px;
            border-bottom: 1px solid var(--border);
        }

        .rss-preview-rail-content .rss-preview-body {
            padding: 16px 0;
        }

        .rss-preview-rail-content .rss-preview-actions {
            padding: 16px 0 0;
            border-top: 1px solid var(--border);
        }

        .rss-preview-placeholder-guided {
            gap: 8px;
        }

        .rss-preview-placeholder-guided p {
            max-width: 320px;
            color: var(--graphite);
            line-height: 1.6;
        }

        .rss-preview-placeholder-guided strong {
            color: var(--ink);
        }

        .rss-modal-footer {
            display: flex;
            justify-content: flex-end;
            padding-top: 12px;
            border-top: 1px solid var(--border);
            flex-shrink: 0;
        }

        @media (max-width: 1500px) {
            .rss-workspace {
                grid-template-columns: minmax(250px, 300px) 4px minmax(0, 1fr);
            }

            .rss-preview-rail {
                display: none;
            }

            .rss-search-toolbar-secondary {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        @media (max-width: 700px) {
            .rss-discover-searchbar,
            .rss-template-preview-row {
                grid-template-columns: minmax(0, 1fr);
            }

            .rss-discover-searchbar {
                display: grid;
            }

            .rss-direct-source-form {
                grid-template-columns: minmax(0, 1fr);
            }

            #rss-direct-label,
            #btn-rss-direct-add {
                grid-column: auto;
            }
        }

        @media (max-width: 900px) {
            .rss-modal-shell {
                padding: 16px;
                gap: 14px;
            }

            .rss-modal-header {
                flex-direction: column;
                align-items: stretch;
            }

            .rss-modal-header-actions {
                justify-content: space-between;
            }

            .rss-project-context-inner {
                padding: 10px 12px;
            }

            .rss-workspace {
                grid-template-columns: minmax(0, 1fr);
            }

            .rss-modal-shell .rss-sidebar {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: min(340px, calc(100vw - 32px));
                height: 100vh;
                z-index: 260;
                box-shadow: 14px 0 40px rgba(0,0,0,0.45);
                border-right: 1px solid var(--border);
            }

            .rss-modal-shell .rss-sidebar.mobile-open {
                display: flex;
            }

            .rss-modal-shell .rss-sidebar-resize {
                display: none;
            }

            .rss-search-toolbar,
            .rss-search-toolbar-main,
            .rss-search-toolbar-secondary,
            .rss-feed-scope-notice,
            .rss-discover-searchbar {
                display: flex;
                flex-direction: column;
            }

            .rss-search-toolbar-actions {
                display: flex;
            }

            .rss-search-toolbar .btn {
                width: 100%;
            }

            .rss-search-submit {
                min-width: 0;
            }
        }

        .feed-category-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
            background: rgba(52, 152, 219, 0.15);
            color: #5dade2;
            border: 1px solid rgba(52, 152, 219, 0.25);
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.2s;
        }

        .feed-category-badge:hover {
            background: rgba(52, 152, 219, 0.25);
        }

        .feed-category-badge.empty {
            background: var(--canvas);
            color: #666;
            border-color: var(--border);
        }

        /* (Legacy category-filter and add-row styles removed — replaced by Recherche-Center sidebar styles) */

        /* ============================================
           RESEARCH PROGRESS
           ============================================ */
        .research-step {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            margin-bottom: 6px;
            border-radius: 8px;
            background: var(--surface);
            transition: all 0.3s ease;
        }

        .research-step.active {
            background: var(--soft-bg);
            border-left: 3px solid var(--primary);
        }

        .research-step.done {
            background: rgba(46, 204, 113, 0.08);
            border-left: 3px solid #2ecc71;
        }

        .research-step.error {
            background: rgba(231, 76, 60, 0.08);
            border-left: 3px solid #e74c3c;
        }

        .rs-icon {
            font-size: 1.1rem;
            width: 24px;
            text-align: center;
        }

        .rs-label {
            flex: 1;
            color: var(--charcoal);
            font-size: 0.9rem;
        }

        .research-step.active .rs-label {
            color: var(--primary);
            font-weight: 600;
        }

        .research-step.done .rs-label {
            color: #2ecc71;
        }

        .rs-count {
            font-size: 0.8rem;
            color: var(--graphite);
            min-width: 60px;
            text-align: right;
        }

        .research-step.done .rs-count {
            color: #2ecc71;
        }

        .research-stat-tile {
            background: var(--canvas);
            border-radius: 8px;
            padding: 12px;
            text-align: center;
        }

        .research-stat-tile .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
        }

        .research-stat-tile .stat-label {
            font-size: 0.75rem;
            color: var(--graphite);
            margin-top: 4px;
        }

        .research-stat-tile.stat-ai {
            background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
            border: 1px solid rgba(99,102,241,0.25);
        }
        .research-stat-tile.stat-ai .stat-value {
            color: var(--primary);
        }
        .research-stat-tile.stat-ai .stat-label {
            color: var(--graphite);
        }

        @keyframes researchPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .research-step.active .rs-icon {
            animation: researchPulse 1s infinite;
        }

        /* ============================================
           POSITIONING (Screen C)
           ============================================ */
        .positioning-card {
            max-width: 1180px;
            margin-left: auto;
            margin-right: auto;
        }

        .positioning-hero {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 24px;
            padding: 4px 2px 18px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 18px;
        }

        .step-eyebrow,
        .positioning-choice-kicker,
        .positioning-topic-label {
            color: var(--primary);
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .positioning-hero h2 {
            margin: 5px 0 8px;
        }

        .positioning-intro {
            color: var(--graphite);
            line-height: 1.55;
            max-width: 620px;
            margin: 0;
        }

        .positioning-step-hint {
            flex-shrink: 0;
            max-width: 260px;
            padding: 10px 12px;
            border: 1px solid var(--soft-border);
            border-radius: 12px;
            background: var(--soft-bg);
            color: var(--charcoal);
            font-size: 0.82rem;
            font-weight: 600;
            line-height: 1.4;
        }

        .positioning-topic-panel {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 14px 18px;
            padding: 18px 20px;
            margin-bottom: 18px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: var(--canvas);
        }

        .positioning-topic-main {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 0;
        }

        .positioning-topic-main strong {
            color: var(--ink);
            font-size: 1.08rem;
            line-height: 1.35;
        }

        .positioning-topic-copy {
            margin: 4px 0 0;
            max-width: 720px;
            color: var(--charcoal);
            font-size: 0.92rem;
            line-height: 1.58;
        }

        .positioning-score-row {
            display: inline-flex;
            align-items: flex-start;
            justify-content: flex-end;
            gap: 6px;
            flex-wrap: wrap;
        }

        .positioning-topic-source {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px 10px;
            padding: 11px 12px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--surface);
        }

        .positioning-topic-source-detail {
            flex: 1 1 260px;
            min-width: 0;
            color: var(--charcoal);
            font-size: 0.86rem;
            line-height: 1.5;
        }

        .positioning-rationale-box {
            grid-column: 1 / -1;
            padding: 12px 14px;
            border-radius: 10px;
            background: var(--soft-bg);
            border-left: 3px solid var(--primary);
        }

        .positioning-rationale-box p {
            margin: 0;
            color: var(--charcoal);
            font-size: 0.88rem;
            line-height: 1.55;
        }

        .positioning-topic-actions {
            grid-column: 1 / -1;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .positioning-workspace {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .positioning-decision-column {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .positioning-choice-panel {
            margin-top: 0;
            padding: 18px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: var(--canvas);
        }

        .positioning-choice-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 18px;
            margin-bottom: 10px;
        }

        .positioning-choice-header h3 {
            color: var(--ink);
            margin: 4px 0 0;
            font-size: 1.05rem;
        }

        .positioning-choice-copy {
            margin: 0;
            color: var(--graphite);
            font-size: 0.86rem;
            line-height: 1.5;
            max-width: 620px;
        }

        .positioning-choice-status {
            flex-shrink: 0;
            min-width: 180px;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
        }

        .positioning-choice-status-label,
        .positioning-mode-kicker {
            display: block;
            color: var(--primary);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .positioning-choice-status strong {
            display: block;
            margin-top: 5px;
            color: var(--ink);
            font-size: 0.94rem;
            line-height: 1.35;
        }

        .positioning-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .positioning-option {
            padding: 18px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
            text-align: left;
            min-height: 158px;
            display: flex;
            flex-direction: column;
        }

        .positioning-option:hover {
            background: var(--canvas);
            border-color: var(--soft-border);
            transform: translateY(-1px);
        }

        .positioning-option.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(12,60,96,0.08), 0 4px 12px rgba(0,0,0,0.06);
        }

        .positioning-option .icon {
            font-size: 1.8rem;
            margin-bottom: 12px;
        }

        .positioning-option .title {
            font-weight: bold;
            color: var(--ink);
            margin-bottom: 8px;
        }

        .positioning-option .desc {
            color: var(--graphite);
            font-size: 0.9rem;
            line-height: 1.45;
            margin-top: auto;
        }

        .positioning-mode-panel {
            padding: 18px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: var(--surface);
        }

        .positioning-mode-panel-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 16px;
        }

        .positioning-mode-panel-head h3 {
            margin: 4px 0 0;
            color: var(--ink);
            font-size: 1.02rem;
        }

        .positioning-mode-panel-head p {
            margin: 0;
            max-width: 360px;
            color: var(--graphite);
            font-size: 0.88rem;
            line-height: 1.55;
        }

        .positioning-content {
            display: none;
            margin-top: 0;
            padding: 16px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--soft-bg);
        }

        .positioning-content.active {
            display: block;
        }

        .positioning-helper-text {
            color: var(--graphite);
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .positioning-block-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .positioning-skip-card {
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--surface);
        }

        .positioning-skip-card h4 {
            margin: 0 0 8px;
            color: var(--ink);
            font-size: 0.98rem;
        }

        .positioning-skip-card p {
            margin: 0;
            color: var(--graphite);
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .positioning-context-panel {
            padding: 18px;
            border: 1px solid rgba(52, 152, 219, 0.18);
            border-radius: 16px;
            background: linear-gradient(180deg, rgba(52, 152, 219, 0.06), rgba(52, 152, 219, 0.02));
        }

        .positioning-context-header {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 14px;
        }

        .positioning-context-header h3 {
            margin: 4px 0 0;
            color: var(--ink);
            font-size: 1.02rem;
        }

        .positioning-context-header p {
            margin: 0;
            color: var(--graphite);
            font-size: 0.88rem;
            line-height: 1.52;
        }

        .positioning-context-glance {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .positioning-glance-item {
            padding: 13px 14px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: var(--surface);
        }

        .positioning-glance-item strong {
            display: block;
            margin-bottom: 5px;
            color: var(--ink);
            font-size: 0.9rem;
        }

        .positioning-glance-item span {
            color: var(--graphite);
            font-size: 0.84rem;
            line-height: 1.5;
        }

        .positioning-context-details {
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin: 0 0 18px;
            animation: summaryFadeIn 0.22s ease;
        }

        .positioning-context-details[hidden] {
            display: none;
        }

        .positioning-briefing {
            margin-top: 0;
            margin-bottom: 0;
        }

        .positioning-confirmed {
            border: 1px solid #2ecc71;
            border-radius: 12px;
            padding: 16px 20px;
            background: rgba(46, 204, 113, 0.08);
        }

        .positioning-confirmed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .positioning-confirmed-badge {
            font-weight: 600;
            color: #2ecc71;
            font-size: 0.95rem;
        }

        .positioning-confirmed-preview {
            color: var(--charcoal);
            font-size: 0.9rem;
            line-height: 1.6;
            white-space: pre-wrap;
            max-height: 150px;
            overflow-y: auto;
            padding: 10px 14px;
            background: var(--soft-bg);
            border-radius: 8px;
        }

        .btn-sm {
            font-size: 0.8rem !important;
            padding: 6px 12px !important;
        }

        .kb-preview {
            background: rgba(46, 204, 113, 0.1);
            border: 1px solid rgba(46, 204, 113, 0.3);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }

        .kb-preview h4 {
            color: #2ecc71;
            margin-bottom: 10px;
        }

        .positioning-recap-card {
            margin-bottom: 16px;
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
        }

        .positioning-recap-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 12px;
        }

        .positioning-recap-head h3 {
            margin: 4px 0 0;
            color: var(--ink);
            font-size: 1.05rem;
        }

        .positioning-recap-mode {
            flex-shrink: 0;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: var(--canvas);
            color: var(--charcoal);
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1;
        }

        .positioning-recap-text {
            margin: 0;
            padding: 14px 16px;
            border-radius: 12px;
            background: var(--canvas);
            border: 1px solid var(--border);
            color: var(--ink);
            white-space: pre-wrap;
            line-height: 1.65;
            font-size: 0.94rem;
        }

        .briefing-reference-card {
            padding: 20px 22px;
        }

        .briefing-reference-toggle {
            width: 100%;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            gap: 14px;
            align-items: center;
            padding: 0;
            border: 0;
            background: none;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }

        .briefing-reference-copy h3 {
            margin: 5px 0 6px;
            color: var(--ink);
            font-size: 1.02rem;
        }

        .briefing-reference-copy p {
            margin: 0;
            max-width: 760px;
            color: var(--graphite);
            font-size: 0.89rem;
            line-height: 1.55;
        }

        .briefing-reference-state {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 88px;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
            color: var(--charcoal);
            font-size: 0.79rem;
            font-weight: 700;
            line-height: 1;
        }

        .briefing-reference-chevron {
            color: var(--graphite);
            font-size: 0.95rem;
            transition: transform 0.2s ease, color 0.2s ease;
        }

        .briefing-reference-toggle[aria-expanded="true"] .briefing-reference-chevron {
            transform: rotate(180deg);
            color: var(--ink);
        }

        .briefing-reference-toggle:hover .briefing-reference-copy h3 {
            color: var(--primary);
        }

        .briefing-reference-collapse {
            margin-top: 18px;
        }

        .briefing-reference-collapse[hidden] {
            display: none;
        }

        .briefing-reference-collapse .topic-briefing {
            margin: 0;
        }

        /* Artikel-Vorschau */
        .topic-preview-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 16px;
        }

        .topic-rss-link {
            color: #3498db;
            text-decoration: none;
            font-size: 0.9rem;
            white-space: nowrap;
            padding: 6px 12px;
            border: 1px solid rgba(52, 152, 219, 0.3);
            border-radius: 6px;
            transition: all 0.3s;
            flex-shrink: 0;
        }

        .topic-rss-link:hover {
            background: rgba(52, 152, 219, 0.15);
            border-color: #3498db;
        }

        .topic-rationale-box {
            background: var(--canvas);
            border-left: 3px solid var(--primary);
            padding: 16px 20px;
            border-radius: 0 8px 8px 0;
            margin-bottom: 16px;
        }

        .topic-preview-actions {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-shrink: 0;
        }

        .btn-article-summary {
            background: rgba(155, 89, 182, 0.15);
            color: #bb8fce;
            border: 1px solid rgba(155, 89, 182, 0.3);
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .btn-article-summary:hover {
            background: rgba(124, 58, 237, 0.15);
            border-color: #7c3aed;
            color: #7c3aed;
        }

        .btn-article-summary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .btn-article-summary.loaded {
            background: rgba(21, 128, 61, 0.08);
            color: #15803d;
            border-color: rgba(21, 128, 61, 0.25);
        }

        .article-summary-box {
            background: rgba(155, 89, 182, 0.06);
            border: 1px solid rgba(155, 89, 182, 0.15);
            border-radius: 8px;
            padding: 16px 20px;
            margin-bottom: 16px;
            animation: summaryFadeIn 0.3s ease;
        }

        @keyframes summaryFadeIn {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .article-summary-loading {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #bb8fce;
            font-size: 0.9rem;
        }

        .summary-spinner {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(155, 89, 182, 0.2);
            border-top-color: #9b59b6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .article-summary-content .summary-section {
            margin-bottom: 12px;
        }

        .article-summary-content .summary-section:last-child {
            margin-bottom: 0;
        }

        .summary-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: #bb8fce;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 6px;
        }

        .article-summary-content p {
            color: #ddd;
            line-height: 1.6;
            margin: 0;
            font-size: 0.92rem;
        }

        .article-summary-content ul {
            color: var(--charcoal);
            margin: 0;
            padding-left: 18px;
            line-height: 1.7;
            font-size: 0.9rem;
        }

        .article-summary-content ul li {
            margin-bottom: 4px;
        }

        .topic-scores-preview {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* KB-Status-Banner */
        .kb-status-banner {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 16px;
            font-size: 0.9rem;
        }

        .kb-status-banner.no-match {
            background: rgba(231, 76, 60, 0.1);
            border: 1px solid rgba(231, 76, 60, 0.3);
            color: #e74c3c;
        }

        .kb-status-banner.has-match {
            background: rgba(46, 204, 113, 0.1);
            border: 1px solid rgba(46, 204, 113, 0.3);
            color: #2ecc71;
        }

        .kb-status-banner.neutral {
            background: rgba(52, 152, 219, 0.1);
            border: 1px solid rgba(52, 152, 219, 0.3);
            color: #74b9ff;
        }

        /* KB Status-Pill (dezent, in Sidebar-Footer) */
        .kb-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            margin-bottom: 16px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 999px;
            font-size: 0.8rem;
            color: var(--charcoal);
            line-height: 1.4;
            transition: background 0.2s, border-color 0.2s;
            cursor: pointer;
        }

        /* Variante fuer Sidebar-Footer: volle Breite, kompakter Text */
        .sidebar-kb-pill {
            display: flex;
            width: 100%;
            box-sizing: border-box;
            padding: 8px 12px;
            margin-bottom: 10px;
            justify-content: flex-start;
            gap: 8px;
            font-size: 0.75rem;
        }

        .sidebar-kb-pill .kb-pill-label {
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .sidebar-kb-pill .kb-pill-state {
            margin-left: auto;
            font-size: 0.72rem;
        }

        .kb-status-pill .kb-pill-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #888;
            flex-shrink: 0;
            transition: background 0.3s;
        }

        .kb-status-pill .kb-pill-label {
            color: var(--graphite);
            font-weight: 500;
        }

        .kb-status-pill .kb-pill-state {
            color: var(--charcoal);
            font-weight: 600;
        }

        .kb-status-pill.connected {
            background: rgba(46, 204, 113, 0.08);
            border-color: rgba(46, 204, 113, 0.25);
        }

        .kb-status-pill.connected .kb-pill-dot {
            background: #2ecc71;
            box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
        }

        .kb-status-pill.connected .kb-pill-state {
            color: #2ecc71;
        }

        .kb-status-pill.disconnected {
            background: rgba(231, 76, 60, 0.08);
            border-color: rgba(231, 76, 60, 0.25);
        }

        .kb-status-pill.disconnected .kb-pill-dot {
            background: #e74c3c;
        }

        .kb-status-pill.disconnected .kb-pill-state {
            color: #e74c3c;
        }

        /* KB-Option deaktiviert */
        .positioning-option.disabled {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
        }

        /* Skip-Info */
        .skip-info {
            background: var(--soft-bg);
            border: 1px solid var(--soft-border);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }

        /* ============================================
           CONTENT BRIEF (Screen D)
           ============================================ */
        .brief-card {
            background: var(--canvas);
            border-radius: 12px;
            padding: 25px;
            margin-bottom: 20px;
        }

        .brief-field {
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border);
        }

        .brief-field:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .brief-field .label {
            color: var(--primary);
            font-size: 0.85rem;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .brief-field .value {
            color: var(--ink);
            line-height: 1.6;
        }

        .brief-field .value strong {
            color: var(--ink);
            font-weight: 700;
        }

        .correction-box {
            background: var(--canvas);
            border-radius: 12px;
            padding: 20px;
        }

        .correction-box h4 {
            color: var(--ink);
            margin-bottom: 15px;
        }

        .correction-counter {
            display: inline-block;
            padding: 6px 16px;
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
            border-radius: 15px;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 15px;
            border: 1px solid rgba(231, 76, 60, 0.3);
        }

        .correction-counter.ok {
            background: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
            border-color: rgba(46, 204, 113, 0.3);
        }

        /* ============================================
           OUTPUT DISPLAY (Screen E)
           ============================================ */
        .output-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .output-tab {
            padding: 10px 20px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            color: var(--graphite);
        }

        .output-tab:hover {
            background: var(--border);
        }

        .output-tab.active {
            background: var(--primary);
            color: var(--cloud);
            border-color: var(--primary);
        }

        .length-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .length-tab {
            padding: 8px 16px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 6px;
            cursor: pointer;
            color: var(--graphite);
            font-size: 0.9rem;
        }

        .length-tab.active {
            background: var(--soft-bg);
            color: var(--primary);
            border-color: var(--primary);
        }

        /* ============================================
           PLATFORM SELECTOR (Step 5 Social)
           ============================================ */
        .platform-selector {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 16px;
        }

        .platform-controls-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
            gap: 16px;
            align-items: start;
        }

        .platform-controls-layout .platform-selector {
            margin-bottom: 0;
        }

        .platform-selector-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            transition: all 0.2s;
        }

        .platform-selector-item.active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
        }

        .platform-selector-item.disabled {
            opacity: 0.4;
        }

        .platform-selector-item.disabled .output-tab {
            pointer-events: none;
        }

        .platform-selector-item.disabled .platform-length-tabs {
            pointer-events: none;
            opacity: 0.3;
        }

        /* Toggle Switch */
        .platform-toggle {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            min-width: 180px;
            flex: 1 1 220px;
            cursor: pointer;
            color: var(--ink);
            font-weight: 600;
        }

        .platform-toggle-switch {
            position: relative;
            display: inline-block;
            width: 38px;
            height: 20px;
            flex-shrink: 0;
        }

        .platform-toggle-text {
            display: inline-flex;
            align-items: center;
            line-height: 1.2;
            white-space: nowrap;
        }

        .platform-toggle-cb {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .platform-toggle-slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background: var(--muted-border);
            border-radius: 20px;
            transition: all 0.25s;
        }

        .platform-toggle-slider::before {
            content: '';
            position: absolute;
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background: #888;
            border-radius: 50%;
            transition: all 0.25s;
        }

        .platform-toggle-cb:checked + .platform-toggle-slider {
            background: rgba(0, 212, 170, 0.3);
        }

        .platform-toggle-cb:checked + .platform-toggle-slider::before {
            transform: translateX(18px);
            background: #00d4aa;
        }

        /* Per-Platform Length Tabs */
        .platform-length-tabs {
            display: flex;
            gap: 4px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .plat-len-tab {
            padding: 4px 10px;
            font-size: 0.78rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--graphite);
            cursor: pointer;
            transition: all 0.15s;
        }

        .plat-len-tab:hover {
            color: var(--charcoal);
            border-color: var(--muted-border);
        }

        .plat-len-tab.active {
            background: var(--soft-bg);
            color: var(--primary);
            border-color: var(--soft-border);
        }

        /* Variant Chips (Summary) */
        .variant-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: rgba(0, 212, 170, 0.08);
            border: 1px solid rgba(0, 212, 170, 0.2);
            border-radius: 20px;
            color: #00d4aa;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .variant-chip-remove {
            cursor: pointer;
            font-size: 0.75rem;
            opacity: 0.6;
            transition: opacity 0.15s;
            margin-left: 2px;
        }

        .variant-chip-remove:hover {
            opacity: 1;
            color: #e74c3c;
        }

        .source-text-option-layout {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
        }

        .source-text-option-copy h3 {
            margin: 6px 0 8px 0;
        }

        .source-text-option-copy p {
            color: var(--graphite);
            line-height: 1.55;
            max-width: 720px;
        }

        .source-text-option-control {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }

        .source-text-option-label {
            color: var(--graphite);
            font-size: 0.88rem;
            font-weight: 600;
        }

        .source-text-option-status {
            margin-top: 14px;
            color: var(--charcoal);
            font-size: 0.85rem;
        }

        @media (max-width: 760px) {
            .source-text-option-layout {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        .selected-variants-preview-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 18px;
        }

        .selected-variants-preview-header--stacked {
            align-items: center;
            gap: 20px;
        }

        .selected-variants-preview-header p {
            margin-top: 6px;
            color: var(--graphite);
            font-size: 0.92rem;
            line-height: 1.5;
        }

        .selected-variant-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .selected-variant-tab {
            appearance: none;
            border: 1px solid var(--border);
            background: var(--canvas);
            color: var(--charcoal);
            border-radius: 12px;
            padding: 10px 14px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            font: inherit;
            font-size: 0.9rem;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }

        .selected-variant-tab:hover {
            background: var(--soft-bg);
            border-color: var(--soft-border);
            color: var(--ink);
            transform: translateY(-1px);
        }

        .selected-variant-tab.active {
            background: var(--soft-bg);
            border-color: var(--soft-border);
            color: var(--ink);
        }

        .selected-variant-tab-label {
            font-weight: 600;
        }

        .selected-variant-tab-length {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 64px;
            padding: 4px 8px;
            border-radius: 999px;
            background: var(--border);
            color: var(--charcoal);
            font-size: 0.78rem;
            font-weight: 700;
        }

        .output-feedback-card {
            border-color: rgba(79, 140, 255, 0.22);
            background: linear-gradient(135deg, rgba(79, 140, 255, 0.08), rgba(0, 212, 170, 0.05));
        }

        .output-feedback-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 14px;
        }

        .output-feedback-header h3 {
            margin: 4px 0 0 0;
        }

        .output-feedback-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
        }

        .output-feedback-chip {
            appearance: none;
            border: 1px solid var(--border);
            background: var(--canvas);
            color: var(--charcoal);
            border-radius: 999px;
            min-height: 36px;
            padding: 7px 12px;
            font: inherit;
            font-size: 0.84rem;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .output-feedback-chip:hover,
        .output-feedback-chip.active {
            background: rgba(12, 60, 96, 0.08);
            border-color: var(--primary);
            color: var(--primary);
        }

        .output-feedback-input {
            width: 100%;
            resize: vertical;
            min-height: 92px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--ink);
            padding: 12px 14px;
            line-height: 1.5;
            font: inherit;
        }

        .output-feedback-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(12, 60, 96, 0.10);
        }

        .output-feedback-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 12px;
        }

        .output-feedback-status {
            color: var(--graphite);
            font-size: 0.86rem;
        }

        .source-text-inline-option {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 14px;
            border-radius: 14px;
            border: 1px solid var(--border);
            background: var(--surface);
            flex-wrap: wrap;
        }

        .source-text-inline-copy {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .source-text-inline-copy h3 {
            margin: 0;
            color: var(--ink);
            font-size: 1rem;
            line-height: 1.3;
        }

        .source-text-inline-status {
            color: var(--charcoal);
            font-size: 0.82rem;
            line-height: 1.45;
        }

        .source-text-inline-control {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-left: 0;
            width: 100%;
            justify-content: center;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }

        .source-text-inline-option--output {
            min-height: 0;
            justify-content: flex-start;
            align-items: stretch;
            flex-direction: column;
            gap: 16px;
            padding: 14px 16px;
        }

        .source-text-inline-option.is-loading {
            opacity: 0.78;
        }

        .source-text-inline-option--output .source-text-inline-copy {
            width: 100%;
        }

        .source-text-option-label {
            min-width: 68px;
            text-align: center;
            transition: color 0.2s ease, opacity 0.2s ease;
        }

        .source-text-option-label.is-active {
            color: var(--ink);
        }

        .source-text-option-label[data-source-option="on"].is-active {
            color: var(--primary);
        }

        .source-text-option-label[data-source-option="off"].is-active {
            color: var(--graphite);
        }

        .selected-variants-preview-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 16px;
        }

        .selected-variant-preview-card {
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            min-height: 100%;
            transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }

        .selected-variant-preview-card:hover {
            border-color: var(--soft-border);
            transform: translateY(-1px);
            box-shadow: var(--shadow-card);
        }

        .selected-variant-preview-card.is-active {
            border-color: var(--soft-border);
            background: var(--soft-bg);
        }

        .selected-variant-preview-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
        }

        .selected-variant-preview-meta {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .selected-variant-preview-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            color: var(--ink);
        }

        .selected-variant-preview-subline {
            font-size: 0.82rem;
            color: var(--graphite);
        }

        .selected-variant-preview-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            border-radius: 999px;
            font-size: 0.76rem;
            font-weight: 600;
            color: var(--primary);
            background: var(--soft-bg);
            border: 1px solid var(--soft-border);
        }

        .selected-variant-preview-status.is-muted {
            color: var(--graphite);
            background: var(--canvas);
            border-color: var(--border);
        }

        .selected-variant-preview-text {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px;
            color: var(--ink);
            line-height: 1.65;
            white-space: pre-wrap;
            font-size: 0.92rem;
            min-height: 170px;
            max-height: 280px;
            overflow: auto;
        }

        .selected-variant-preview-tags {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .selected-variant-preview-label {
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: var(--graphite);
        }

        .selected-variant-preview-hashtags {
            color: var(--primary);
            font-size: 0.87rem;
            line-height: 1.5;
            word-break: break-word;
        }

        .selected-variant-preview-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-top: auto;
        }

        .selected-variant-preview-source {
            font-size: 0.8rem;
            color: var(--graphite);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
        }

        .selected-variant-preview-open {
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
            color: var(--primary);
            border-radius: 999px;
            padding: 8px 12px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .selected-variant-preview-open:hover {
            background: var(--canvas);
            border-color: var(--primary);
            color: var(--primary-hover);
        }

        @media (max-width: 720px) {
            .selected-variants-preview-header--stacked {
                align-items: flex-start;
            }

            .platform-controls-layout {
                grid-template-columns: 1fr;
            }

            .selected-variant-tab {
                width: 100%;
                justify-content: space-between;
            }

            .source-text-inline-option {
                width: 100%;
            }

            .source-text-inline-control {
                margin-left: 0;
            }

            .selected-variants-preview-grid {
                grid-template-columns: 1fr;
            }

            .selected-variant-preview-footer {
                flex-direction: column;
                align-items: stretch;
            }

            .selected-variant-preview-open {
                width: 100%;
            }
        }

        /* ============================================
           FINALIZE VARIANT TABS (Step 6)
           ============================================ */
        .finalize-variant-tab {
            padding: 8px 16px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--canvas);
            color: var(--graphite);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }

        .finalize-variant-tab:hover {
            background: var(--border);
            color: var(--charcoal);
        }

        .finalize-variant-tab.active {
            background: rgba(79, 140, 255, 0.12);
            border-color: rgba(79, 140, 255, 0.3);
            color: var(--primary);
        }

        .variant-tab-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #e74c3c;
            color: #fff;
            font-size: 0.65rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .output-content {
            background: var(--canvas);
            border-radius: 12px;
            padding: 25px;
            white-space: pre-wrap;
            line-height: 1.8;
            font-size: 0.95rem;
        }

        .output-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        /* ============================================
           COPYABLE SECTIONS (Copy & Paste Ready)
           ============================================ */
        .copyable-section {
            position: relative;
            cursor: pointer;
            transition: all 0.3s;
        }

        .copyable-section:hover {
            border-color: #2ecc71;
            background: rgba(46, 204, 113, 0.05);
        }

        .copyable-section:hover .copy-hint {
            opacity: 1;
        }

        .copyable-section.copied {
            border-color: #2ecc71;
        }

        .copy-hint {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(46, 204, 113, 0.2);
            color: #2ecc71;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.75rem;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .copy-content {
            background: var(--canvas);
            border-radius: 8px;
            padding: 20px;
            white-space: pre-wrap;
            line-height: 1.7;
            font-size: 0.95rem;
            color: var(--ink);
        }

        .copy-content.hashtags {
            color: #3498db;
            font-size: 0.9rem;
            word-spacing: 5px;
        }

        .copy-content.blog-title {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--primary);
        }

        .copy-content.meta-desc {
            color: var(--graphite);
            font-style: italic;
        }

        .copy-content.blog-article h2 {
            color: var(--primary);
            margin: 20px 0 10px 0;
            font-size: 1.1rem;
        }

        .image-suggestion {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            padding: 15px;
            border-left: 3px solid #9b59b6;
        }

        .image-suggestion .suggestion-title {
            color: #9b59b6;
            font-weight: bold;
            margin-bottom: 8px;
        }

        /* Ads Badge (Paket-Info) */
        .ads-badge {
            background: var(--soft-bg);
            color: var(--primary);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
        }

        /* Facebook Ad Feed-Vorschau */
        .fb-ad-card {
            background: #242424;
            border-radius: 8px;
            margin-bottom: 28px;
            cursor: pointer;
            transition: all 0.25s;
            overflow: hidden;
            position: relative;
            border: 1px solid #3a3a3a;
            max-width: 500px;
        }

        .fb-ad-card:hover {
            border-color: rgba(46, 204, 113, 0.5);
            box-shadow: 0 2px 16px rgba(46, 204, 113, 0.08);
        }

        .fb-ad-card:hover .fb-ad-badge {
            opacity: 1;
        }

        .fb-ad-card.copied {
            border-color: #2ecc71;
        }

        .fb-ad-card.copied .fb-ad-badge {
            opacity: 1;
            color: #2ecc71;
        }

        .fb-ad-top {
            padding: 12px 16px 0;
        }

        .fb-ad-page-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .fb-ad-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary);
            flex-shrink: 0;
        }

        .fb-ad-page-info {
            flex: 1;
        }

        .fb-ad-page-name {
            font-weight: 600;
            font-size: 0.88rem;
            color: var(--ink);
        }

        .fb-ad-meta {
            font-size: 0.75rem;
            color: var(--graphite);
        }

        .fb-ad-globe {
            font-size: 0.7rem;
        }

        .fb-ad-dots {
            color: #b0b3b8;
            font-size: 1.2rem;
            letter-spacing: 2px;
            cursor: default;
            padding: 4px;
        }

        .fb-ad-text-wrap {
            padding-bottom: 12px;
        }

        .fb-ad-text-collapsed,
        .fb-ad-text-full {
            font-size: 0.93rem;
            line-height: 1.45;
            color: #e4e6eb;
        }

        .fb-ad-pretext {
            white-space: pre-line;
            word-break: break-word;
        }

        .fb-ad-mehr {
            color: #b0b3b8;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.93rem;
            white-space: nowrap;
        }

        .fb-ad-wordcount {
            font-size: 0.7rem;
            color: #666;
            text-align: right;
            padding: 2px 0 6px;
        }

        .fb-ad-media {
            width: 100%;
            aspect-ratio: 1.91 / 1;
            background: var(--cloud);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .fb-ad-media-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            background: var(--soft-bg);
            padding: 20px;
            text-align: center;
        }

        .fb-ad-media-placeholder > span {
            font-size: 2.5rem;
        }

        .fb-ad-creative-hint {
            font-size: 0.78rem;
            color: #666;
            line-height: 1.5;
            font-style: italic;
        }

        .fb-ad-link-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: #3a3b3c;
            gap: 12px;
        }

        .fb-ad-link-info {
            flex: 1;
            min-width: 0;
        }

        .fb-ad-domain {
            font-size: 0.72rem;
            color: #b0b3b8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 2px;
        }

        .fb-ad-link-headline {
            font-weight: 600;
            font-size: 0.92rem;
            color: #e4e6eb;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .fb-ad-link-desc {
            font-size: 0.78rem;
            color: #b0b3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .fb-ad-cta {
            background: #e4e6eb;
            color: #050505;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.82rem;
            font-weight: 600;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .fb-ad-reactions {
            padding: 4px 16px 8px;
        }

        .fb-ad-reaction-icons {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 8px 0 4px;
            border-bottom: 1px solid #3a3a3a;
            font-size: 0.85rem;
        }

        .fb-ad-action-row {
            display: flex;
            justify-content: space-around;
            padding: 8px 0 4px;
        }

        .fb-ad-action {
            color: #b0b3b8;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: default;
        }

        .fb-ad-badge {
            position: absolute;
            top: 12px;
            right: 50px;
            font-size: 0.7rem;
            color: #666;
            opacity: 0;
            transition: opacity 0.25s;
            background: rgba(0,0,0,0.5);
            padding: 2px 8px;
            border-radius: 4px;
        }

        /* ============================================
           SOCIAL FEED PREVIEW CARDS
           ============================================ */
        .social-feed-card {
            background: #242424;
            border-radius: 8px;
            margin-bottom: 16px;
            cursor: pointer;
            transition: all 0.25s;
            overflow: hidden;
            position: relative;
            border: 1px solid #3a3a3a;
            max-width: 500px;
        }

        .social-feed-card:hover {
            border-color: rgba(46, 204, 113, 0.5);
            box-shadow: 0 2px 16px rgba(46, 204, 113, 0.08);
        }

        .social-feed-card.copied {
            border-color: #2ecc71;
        }

        .sf-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
        }

        .sf-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .sf-avatar-fb {
            background: linear-gradient(135deg, #1877f2, #0d65d9);
        }

        .sf-avatar-ig {
            background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
        }

        .sf-avatar-li {
            background: linear-gradient(135deg, #0a66c2, #004182);
        }

        .sf-header-info {
            flex: 1;
        }

        .sf-page-name {
            font-weight: 600;
            font-size: 0.88rem;
            color: #e4e6eb;
        }

        .sf-meta {
            font-size: 0.73rem;
            color: #b0b3b8;
        }

        .sf-dots {
            color: #b0b3b8;
            font-size: 1.2rem;
            letter-spacing: 2px;
            cursor: default;
            padding: 4px;
        }

        .sf-text-wrap {
            padding: 0 16px 12px;
        }

        .sf-text-collapsed,
        .sf-text-full {
            font-size: 0.93rem;
            line-height: 1.45;
            color: #e4e6eb;
        }

        .sf-pretext {
            white-space: pre-line;
            word-break: break-word;
        }

        .sf-pretext-inline {
            white-space: pre-line;
            word-break: break-word;
        }

        .sf-mehr {
            color: #b0b3b8;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.93rem;
            white-space: nowrap;
        }

        .sf-mehr:hover {
            text-decoration: underline;
        }

        .sf-media-placeholder {
            width: 100%;
            aspect-ratio: 1.91 / 1;
            background: var(--soft-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            color: #666;
        }

        .sf-media-ig {
            aspect-ratio: 1 / 1;
        }

        .sf-wordcount {
            font-size: 0.7rem;
            color: #666;
            text-align: right;
            padding: 4px 16px 8px;
        }

        /* Facebook specific */
        .sf-fb-reactions {
            padding: 4px 16px 8px;
        }

        .sf-fb-reaction-icons {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 8px 0 4px;
            border-bottom: 1px solid #3a3a3a;
            font-size: 0.85rem;
        }

        .sf-reaction-count {
            font-size: 0.78rem;
            color: #b0b3b8;
            margin-left: 6px;
        }

        .sf-fb-action-row {
            display: flex;
            justify-content: space-around;
            padding: 8px 0 4px;
        }

        .sf-fb-action {
            color: #b0b3b8;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: default;
        }

        /* Instagram specific */
        .sf-ig-actions {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 10px 16px 4px;
            font-size: 1.3rem;
        }

        .sf-ig-bookmark {
            margin-left: auto;
        }

        .sf-ig-likes {
            font-size: 0.82rem;
            font-weight: 600;
            color: #e4e6eb;
            padding: 2px 16px 6px;
        }

        .sf-ig-caption {
            padding: 0 16px 4px;
            font-size: 0.88rem;
            line-height: 1.45;
            color: #e4e6eb;
        }

        .sf-ig-username {
            font-weight: 600;
            margin-right: 6px;
        }

        .sf-ig-hashtags {
            font-size: 0.8rem;
            color: var(--primary);
            padding: 2px 16px 8px;
            word-break: break-word;
        }

        /* LinkedIn specific */
        .sf-li-reactions {
            padding: 4px 16px 8px;
        }

        .sf-li-reaction-icons {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 8px 0 4px;
            border-bottom: 1px solid #3a3a3a;
            font-size: 0.85rem;
        }

        .sf-li-action-row {
            display: flex;
            justify-content: space-around;
            padding: 8px 0 4px;
        }

        .sf-li-action {
            color: #b0b3b8;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: default;
        }

        /* Ads einzelne Items (Headlines, Creatives, Hooks) */
        .ads-item {
            background: var(--canvas);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        .ads-text-body {
            line-height: 1.6;
        }

        .ads-item:hover {
            background: rgba(46, 204, 113, 0.1);
            border-left: 3px solid #2ecc71;
        }

        .ads-item:hover::after {
            content: '📋 Kopieren';
            position: absolute;
            right: 10px;
            top: 15px;
            background: rgba(46, 204, 113, 0.3);
            color: #2ecc71;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
        }

        .ads-item .item-number {
            color: var(--primary);
            font-weight: bold;
            margin-right: 10px;
        }

        .ads-char-count {
            float: right;
            font-size: 0.72rem;
            color: #666;
            font-weight: normal;
        }

        .ads-item.copied {
            border-left: 3px solid #2ecc71;
        }

        /* ============================================
           POST PREVIEW (Social Media Ready)
           ============================================ */
        .post-preview {
            background: var(--cloud);
            border: 1px solid #333;
            max-width: 500px;
            margin: 0 auto;
        }

        .post-preview-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 15px;
        }

        .post-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            font-size: 1rem;
        }

        .post-meta .post-name {
            font-weight: bold;
            color: var(--ink);
        }

        .post-meta .post-time {
            font-size: 0.8rem;
            color: var(--graphite);
        }

        .post-text-area {
            padding: 15px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            margin-bottom: 15px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        .post-text-area:hover {
            background: rgba(46, 204, 113, 0.1);
            border: 1px solid rgba(46, 204, 113, 0.3);
        }

        .post-text-area .copy-content {
            background: transparent;
            padding: 0;
            white-space: pre-wrap;
            line-height: 1.6;
        }

        .post-media {
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 15px;
            background: #000;
        }

        .post-media img,
        .post-media video {
            width: 100%;
            max-height: 400px;
            object-fit: contain;
            display: block;
        }

        .post-hashtags {
            padding: 10px 15px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            margin-bottom: 15px;
            cursor: pointer;
            position: relative;
        }

        .post-hashtags:hover {
            background: rgba(46, 204, 113, 0.1);
        }

        .post-hashtags .copy-content {
            background: transparent;
            padding: 0;
            color: #3498db;
        }

        .post-actions-preview {
            display: flex;
            justify-content: space-around;
            padding-top: 15px;
            border-top: 1px solid #333;
            color: var(--graphite);
            font-size: 0.9rem;
        }

        .post-actions-preview span {
            cursor: default;
            padding: 8px 15px;
            border-radius: 5px;
        }

        /* Alternative Text Items */
        .text-alternative {
            background: var(--canvas);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid transparent;
        }

        .text-alternative:hover {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .text-alternative.selected {
            border-color: #2ecc71;
            background: rgba(46, 204, 113, 0.1);
        }

        .text-alternative .alt-label {
            font-size: 0.75rem;
            color: var(--primary);
            margin-bottom: 8px;
            font-weight: bold;
        }

        /* Platform Tips */
        .platform-tips {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .platform-tip {
            padding: 12px 15px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            font-size: 0.9rem;
            color: var(--graphite);
        }

        .platform-tip strong {
            color: var(--ink);
        }

        /* ============================================
           ALERTS & STATUS
           ============================================ */
        .alert {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .alert-success {
            background: rgba(46, 204, 113, 0.2);
            border: 1px solid rgba(46, 204, 113, 0.3);
            color: #2ecc71;
        }

        .alert-info {
            background: rgba(52, 152, 219, 0.2);
            border: 1px solid rgba(52, 152, 219, 0.3);
            color: #3498db;
        }

        .status-widget {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            background: rgba(46, 204, 113, 0.2);
            border-radius: 20px;
            font-size: 0.85rem;
            color: #2ecc71;
            transition: background 0.3s, color 0.3s;
        }

        .status-widget.status-error {
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
        }

        .status-widget.status-unknown {
            background: rgba(136, 136, 136, 0.2);
            color: var(--graphite);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #2ecc71;
        }

        /* ============================================
           SEASON SELECT (Screen B2)
           ============================================ */
        .season-select {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .season-btn {
            padding: 10px 20px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            color: var(--graphite);
            transition: all 0.3s;
        }

        /* ============================================
           INDIVIDUAL MODE SELECT
           ============================================ */
        .individual-mode-select {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 25px;
        }

        .individual-mode-btn {
            padding: 20px;
            background: var(--canvas);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            text-align: center;
            transition: all 0.3s;
        }

        .individual-mode-btn:hover {
            background: var(--border);
            border-color: var(--muted-border);
        }

        .individual-mode-btn.selected {
            background: var(--soft-bg);
            border-color: var(--primary);
        }

        .individual-mode-btn .icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .individual-mode-btn .title {
            font-weight: bold;
            color: var(--ink);
            margin-bottom: 5px;
        }

        .individual-mode-btn .desc {
            font-size: 0.8rem;
            color: var(--graphite);
        }

        /* ============================================
           MEDIA UPLOAD
           ============================================ */
        .media-upload-area {
            margin-bottom: 20px;
        }

        .upload-zone {
            border: 2px dashed rgba(255, 255, 255, 0.3);
            border-radius: 12px;
            padding: 40px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .upload-zone:hover,
        .upload-zone.dragover {
            border-color: var(--primary);
            background: var(--soft-bg);
        }

        .upload-zone .upload-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }

        .upload-zone p {
            color: var(--graphite);
            margin: 0;
        }

        .upload-actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 14px;
        }

        .upload-action-btn {
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 8px;
            border: 1px solid var(--soft-border);
            background: var(--soft-bg);
            color: var(--primary);
            font-size: 0.95rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
        }

        .upload-action-btn:hover,
        .upload-action-btn:focus-visible {
            border-color: var(--primary);
            background: var(--soft-bg);
            outline: none;
        }

        .upload-camera-btn {
            font-family: inherit;
        }

        .upload-link {
            color: var(--primary);
            cursor: pointer;
        }

        .upload-link:hover {
            color: var(--primary-hover);
        }

        @media (max-width: 520px) {
            .upload-actions {
                align-items: stretch;
                flex-direction: column;
            }

            .upload-action-btn {
                width: 100%;
            }
        }

        #media-preview {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            background: var(--canvas);
        }

        #media-preview img,
        #media-preview video {
            width: 100%;
            max-height: 300px;
            object-fit: contain;
            display: block;
        }

        #media-preview .remove-media {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(231, 76, 60, 0.9);
            color: white;
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #media-preview .remove-media:hover {
            background: #c0392b;
        }

        .season-btn:hover {
            background: var(--border);
        }

        .season-btn.active {
            background: var(--soft-bg);
            color: var(--primary);
            border-color: var(--primary);
        }

        /* ============================================
           LOADING ANIMATION
           ============================================ */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px;
        }

        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ============================================
           STEP TRANSITION LOADING OVERLAY
           ============================================ */
        .step-loading-overlay {
            display: flex;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.4);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            gap: 18px;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.25s ease, visibility 0.25s ease;
        }

        .step-loading-overlay.visible {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .step-loading-overlay .slo-spinner {
            width: 52px;
            height: 52px;
            border: 4px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .step-loading-overlay .slo-text {
            color: var(--primary);
            font-size: 1.1rem;
            font-weight: 600;
            text-align: center;
        }

        .step-loading-overlay .slo-sub {
            color: var(--graphite);
            font-size: 0.85rem;
            text-align: center;
            max-width: 320px;
        }

        .step-loading-overlay .slo-dots::after {
            content: '';
            animation: stepDots 1.5s steps(4, end) infinite;
        }

        @keyframes stepDots {
            0%   { content: ''; }
            25%  { content: '.'; }
            50%  { content: '..'; }
            75%  { content: '...'; }
            100% { content: ''; }
        }

        /* ============================================
           OUTPUT GENERATION PROGRESS OVERLAY
           ============================================ */
        .output-progress-overlay {
            display: flex;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(10, 12, 28, 0.92);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .output-progress-overlay.visible {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .opg-container {
            width: 420px;
            max-width: 90vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .opg-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
        }

        .opg-icon-ring {
            position: relative;
            width: 80px;
            height: 80px;
        }

        .opg-icon-ring-track {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 4px solid rgba(255, 255, 255, 0.06);
        }

        .opg-icon-ring-fill {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 4px solid transparent;
            border-top-color: var(--primary);
            border-right-color: var(--primary);
            animation: opgRingSpin 2s linear infinite;
            transition: border-color 0.4s ease;
        }

        .opg-icon-ring-fill.complete {
            border-color: #2ecc71;
            animation: none;
        }

        @keyframes opgRingSpin {
            to { transform: rotate(360deg); }
        }

        .opg-icon-center {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            animation: opgPulse 2s ease-in-out infinite;
        }

        @keyframes opgPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.12); }
        }

        .opg-title {
            color: var(--ink);
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0;
            text-align: center;
        }

        .opg-subtitle {
            color: var(--graphite);
            font-size: 0.88rem;
            margin: 0;
            text-align: center;
            max-width: 340px;
        }

        /* opg-progress-bar-wrap / opg-progress-bar removed: HTML uses opg-progress-track / opg-progress-fill */

        .opg-percent {
            color: var(--primary);
            font-size: 0.82rem;
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            transition: color 0.3s ease;
        }

        .opg-percent.complete {
            color: #2ecc71;
        }

        .opg-steps {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 0;
            background: var(--surface);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            overflow: hidden;
        }

        .opg-step {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            transition: background 0.3s ease, opacity 0.3s ease;
            opacity: 0.4;
        }

        .opg-step:last-child {
            border-bottom: none;
        }

        .opg-step.active {
            opacity: 1;
            background: var(--soft-bg);
        }

        .opg-step.done {
            opacity: 0.7;
            background: rgba(46, 204, 113, 0.04);
        }

        .opg-step-icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.82rem;
            flex-shrink: 0;
            background: var(--canvas);
            color: #666;
            transition: all 0.3s ease;
        }

        .opg-step.active .opg-step-icon {
            background: var(--soft-bg);
            color: var(--primary);
            animation: opgStepPulse 1.5s ease-in-out infinite;
        }

        @keyframes opgStepPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(12, 60, 96, 0.2); }
            50% { box-shadow: 0 0 0 6px rgba(12, 60, 96, 0); }
        }

        .opg-step.done .opg-step-icon {
            background: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
            animation: none;
        }

        .opg-step-body {
            flex: 1;
            min-width: 0;
        }

        .opg-step-label {
            font-size: 0.88rem;
            font-weight: 500;
            color: var(--graphite);
            transition: color 0.3s ease;
        }

        .opg-step.active .opg-step-label {
            color: var(--ink);
        }

        .opg-step.done .opg-step-label {
            color: var(--graphite);
        }

        .opg-step-detail {
            font-size: 0.75rem;
            color: #666;
            margin-top: 2px;
            transition: color 0.3s ease;
        }

        .opg-step.active .opg-step-detail {
            color: var(--graphite);
        }

        .opg-step-check {
            font-size: 0.75rem;
            color: transparent;
            flex-shrink: 0;
            transition: color 0.3s ease;
        }

        .opg-step.done .opg-step-check {
            color: #2ecc71;
        }

        .opg-elapsed {
            font-size: 0.75rem;
            color: #555;
            font-variant-numeric: tabular-nums;
        }

        /* ============================================
           WEB-RECHERCHE TAB
           ============================================ */
        .wr-stats-bar {
            display: flex; gap: 4px; padding: 8px 20px;
            border-bottom: 1px solid var(--border);
            flex-wrap: wrap; flex-shrink: 0;
        }
        .wr-stat {
            font-size: 0.78rem; color: var(--graphite); padding: 5px 12px;
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 6px; cursor: pointer; transition: all 0.15s;
        }
        .wr-stat:hover { background: rgba(155,89,182,0.08); border-color: rgba(155,89,182,0.2); color: var(--charcoal); }
        .wr-stat strong { color: #9b59b6; font-weight: 700; margin-right: 3px; }
        .wr-results-scroll {
            flex: 1; overflow-y: auto; padding: 16px 20px;
            display: flex; flex-direction: column; gap: 20px;
        }
        .wr-section { display: flex; flex-direction: column; gap: 8px; }
        .wr-section-header {
            display: flex; align-items: center; gap: 10px;
            cursor: pointer; user-select: none; padding: 6px 0;
        }
        .wr-section-header h4 {
            margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--charcoal);
        }
        .wr-section-header .wr-section-count {
            font-size: 0.72rem; color: #9b59b6; background: rgba(155,89,182,0.12);
            padding: 2px 8px; border-radius: 10px;
        }
        .wr-section-header .wr-section-toggle {
            margin-left: auto; font-size: 0.7rem; color: #666; transition: transform 0.2s;
        }
        .wr-section.collapsed .wr-section-body { display: none; }
        .wr-section.collapsed .wr-section-toggle { transform: rotate(-90deg); }
        .wr-section-body { display: flex; flex-direction: column; gap: 6px; }

        .wr-serp-card {
            display: flex; flex-direction: column; gap: 4px;
            padding: 10px 14px; background: var(--surface);
            border: 1px solid var(--border); border-radius: 8px;
            cursor: pointer; transition: all 0.15s;
        }
        .wr-serp-card:hover { background: rgba(155,89,182,0.06); border-color: rgba(155,89,182,0.15); }
        .wr-serp-card.active { background: rgba(155,89,182,0.1); border-color: rgba(155,89,182,0.3); }
        .wr-serp-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .wr-serp-title { font-size: 0.88rem; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; }
        .wr-serp-date { font-size: 0.72rem; color: #8a8a8a; white-space: nowrap; flex-shrink: 0; }
        .wr-serp-url { font-size: 0.7rem; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .wr-serp-snippet { font-size: 0.78rem; color: var(--graphite); line-height: 1.4; }

        .wr-paa-card {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 14px; background: rgba(52,152,219,0.04);
            border: 1px solid rgba(52,152,219,0.1); border-radius: 8px;
            cursor: pointer; transition: all 0.15s;
        }
        .wr-paa-card:hover { background: rgba(52,152,219,0.08); border-color: rgba(52,152,219,0.2); }
        .wr-paa-card.active { background: rgba(52,152,219,0.12); border-color: rgba(52,152,219,0.3); }
        .wr-paa-q { font-size: 0.85rem; color: var(--primary); flex: 1; }
        .wr-paa-save {
            font-size: 0.7rem; padding: 4px 10px; background: rgba(46,204,113,0.1);
            border: 1px solid rgba(46,204,113,0.2); border-radius: 6px;
            color: #2ecc71; cursor: pointer; white-space: nowrap; flex-shrink: 0;
        }
        .wr-paa-save:hover { background: rgba(46,204,113,0.2); }
        .wr-paa-save.saved { color: var(--graphite); background: var(--surface); border-color: var(--border); pointer-events: none; }

        .wr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
        .wr-chip {
            font-size: 0.78rem; padding: 5px 12px;
            background: rgba(155,89,182,0.08); border: 1px solid rgba(155,89,182,0.15);
            border-radius: 16px; color: #b388d0; cursor: default; transition: all 0.15s;
        }
        .wr-chip:hover { background: rgba(155,89,182,0.14); }
        .wr-chip.wr-chip-click {
            cursor: pointer; position: relative;
        }
        .wr-chip.wr-chip-click::after {
            content: ' 🔬'; font-size: 0.65rem; opacity: 0; transition: opacity 0.15s;
        }
        .wr-chip.wr-chip-click:hover::after { opacity: 1; }
        .wr-chip.wr-chip-click:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(155,89,182,0.2); }
        .wr-chip.trend {
            background: rgba(46,204,113,0.08); border-color: rgba(46,204,113,0.15); color: #6fcf97;
        }
        .wr-chip.trend:hover { background: rgba(46,204,113,0.14); }
        .wr-chip.trend.wr-chip-click:hover { box-shadow: 0 2px 8px rgba(46,204,113,0.2); }

        /* ============================================
           RSS SEARCH LOADING ANIMATION (Inline)
           ============================================ */
        .rss-search-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 48px 24px;
            gap: 20px;
            animation: rssLoadFadeIn 0.3s ease;
        }
        @keyframes rssLoadFadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .rss-search-loading .rsl-spinner {
            width: 44px;
            height: 44px;
            border: 3px solid rgba(155,89,182,0.12);
            border-top-color: #9b59b6;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }
        .rss-search-loading.article-mode .rsl-spinner {
            border-top-color: var(--primary);
        }

        .rss-search-loading .rsl-title {
            color: #bb8fce;
            font-size: 1.05rem;
            font-weight: 600;
            text-align: center;
        }
        .rss-search-loading.article-mode .rsl-title {
            color: var(--primary);
        }
        .rss-search-loading .rsl-title .rsl-dots::after {
            content: '';
            animation: stepDots 1.5s steps(4, end) infinite;
        }

        .rss-search-loading .rsl-steps {
            display: flex;
            flex-direction: column;
            gap: 6px;
            width: 100%;
            max-width: 340px;
        }

        .rss-search-loading .rsl-step {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 0.82rem;
            color: #555;
            background: var(--surface);
            border: 1px solid transparent;
            transition: all 0.4s ease;
            opacity: 0.4;
        }

        .rss-search-loading .rsl-step.active {
            color: #bb8fce;
            background: rgba(155,89,182,0.08);
            border-color: rgba(155,89,182,0.2);
            opacity: 1;
        }
        .rss-search-loading.article-mode .rsl-step.active {
            color: var(--primary);
            background: var(--soft-bg);
            border-color: var(--soft-border);
        }

        .rss-search-loading .rsl-step.done {
            color: #2ecc71;
            opacity: 0.7;
        }

        .rss-search-loading .rsl-step-icon {
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.9rem;
        }

        .rss-search-loading .rsl-step.active .rsl-step-icon {
            animation: rslPulse 1.2s ease-in-out infinite;
        }
        @keyframes rslPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }

        .rss-search-loading .rsl-step-text {
            flex: 1;
        }

        .rss-search-loading .rsl-step .rsl-step-check {
            font-size: 0.75rem;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .rss-search-loading .rsl-step.done .rsl-step-check {
            opacity: 1;
        }

        .rss-search-loading .rsl-sub {
            color: #666;
            font-size: 0.78rem;
            text-align: center;
            max-width: 300px;
        }

        /* ============================================
           RESPONSIVE
           ============================================ */
        @media (max-width: 768px) {
            .trigger-buttons,
            .output-tiles,
            .positioning-options {
                grid-template-columns: 1fr;
            }

            .positioning-context-glance {
                grid-template-columns: 1fr;
            }

            .positioning-topic-source,
            .topic-source-row {
                align-items: flex-start;
            }

            .topics-grid {
                grid-template-columns: 1fr;
            }

            .pipeline-subnav-content {
                flex-wrap: wrap;
                gap: 6px;
            }

            .header-content {
                flex-direction: column;
                gap: 15px;
            }
        }

        /* ============================================
           LOGIN SCREEN
           ============================================ */
        .login-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--cloud);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .login-overlay.hidden { display: none; }

        .login-card {
            background: var(--surface);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 16px;
            padding: 40px;
            width: 100%;
            max-width: 400px;
        }

        .login-card h2 {
            text-align: center;
            margin-bottom: 8px;
            color: var(--primary);
        }

        .login-card p {
            text-align: center;
            color: var(--graphite);
            font-size: 0.9rem;
            margin-bottom: 25px;
        }

        .login-card .form-group { margin-bottom: 16px; }

        .login-card label {
            display: block;
            margin-bottom: 6px;
            color: var(--graphite);
            font-size: 0.85rem;
        }

        .login-card input {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--muted-border);
            border-radius: 10px;
            background: var(--canvas);
            color: var(--ink);
            font-size: 1rem;
        }

        .login-card input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .login-card .btn-login {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 10px;
            background: var(--primary);
            color: var(--cloud);
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            margin-top: 8px;
            transition: background 0.2s;
        }

        .login-card .btn-login:hover { background: var(--primary-hover); }
        .login-card .btn-login:disabled { opacity: 0.5; cursor: not-allowed; }

        .login-error {
            color: #e74c3c;
            text-align: center;
            font-size: 0.85rem;
            margin-top: 12px;
            min-height: 1.2em;
        }

        .logout-btn {
            background: none;
            border: 1px solid var(--muted-border);
            color: var(--graphite);
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .logout-btn:hover {
            border-color: #e74c3c;
            color: #e74c3c;
        }

        /* ============================================
           UTILITY NAV BUTTONS (RSS, Ideen, neben Logo)
           ============================================ */
        .header-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-icon-btn {
            background: var(--surface);
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--charcoal);
            padding: 7px 14px;
            border-radius: 18px;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .nav-icon-btn:hover {
            background: rgba(255,255,255,0.12);
            color: var(--primary);
            border-color: var(--soft-border);
        }

        .nav-icon-btn .badge-count {
            background: var(--primary);
            color: var(--cloud);
            border-radius: 50%;
            min-width: 18px;
            height: 18px;
            font-size: 0.7rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* ============================================
           MODAL / OVERLAY (shared)
           ============================================ */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: var(--cloud);
            backdrop-filter: none;
            z-index: 9500;
            justify-content: stretch;
            align-items: stretch;
            overflow: hidden;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-overlay.modal-overlay-sidebar-aware {
            left: 220px;
            width: calc(100vw - 220px);
        }

        @media (max-width: 900px) {
            .modal-overlay.modal-overlay-sidebar-aware {
                left: 0;
                width: 100vw;
            }
        }

        .modal-content {
            background: var(--canvas);
            border: none !important;
            border-radius: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            height: 100% !important;
            max-height: 100% !important;
            overflow-y: auto;
            padding: 24px 32px;
            position: relative;
            animation: none;
        }

        .modal-close {
            position: absolute;
            top: 16px;
            right: 20px;
            background: none;
            border: none;
            color: var(--graphite);
            font-size: 1.4rem;
            cursor: pointer;
        }

        .modal-close:hover {
            color: #e74c3c;
        }

        /* --- Login-Modal: zentriert, nicht Vollbild --- */
        .modal-overlay.login-overlay {
            display: flex;
            background: rgba(0,0,0,0.7);
            justify-content: center;
            align-items: center;
        }
        .modal-overlay.login-overlay.hidden {
            display: none;
        }
        .modal-card.login-card {
            width: auto !important;
            max-width: 440px !important;
            height: auto !important;
            max-height: 80vh !important;
            border-radius: 16px !important;
            padding: 40px !important;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }

        /* --- Legacy fullscreen-modal class (kept for compat) --- */
        .modal-overlay.fullscreen-modal {
            background: var(--cloud) !important;
            padding-top: 0 !important;
            overflow: hidden !important;
            align-items: stretch !important;
            justify-content: stretch !important;
        }
        .modal-overlay.fullscreen-modal .modal-content {
            width: 100% !important;
            max-width: 100% !important;
            height: 100% !important;
            max-height: 100% !important;
            border: none !important;
            border-radius: 0 !important;
            padding: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            background: var(--canvas) !important;
            overflow: hidden !important;
        }
        .fullscreen-modal .fm-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 32px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
            background: var(--canvas);
        }
        .fullscreen-modal .fm-header h2 {
            margin: 0;
            font-size: 1.3rem;
        }
        .fullscreen-modal .fm-header-subtitle {
            color: var(--graphite);
            font-size: 0.85rem;
            margin-left: 12px;
        }
        .fullscreen-modal .fm-close {
            background: none;
            border: none;
            color: var(--graphite);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 4px 10px;
            border-radius: 6px;
            transition: all 0.2s;
        }
        .fullscreen-modal .fm-close:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }
        .fullscreen-modal .fm-body {
            flex: 1;
            overflow-y: auto;
            padding: 24px 32px;
        }

        /* (Panel styles moved to Recherche-Center section above) */

        /* ============================================
           IDEENSAMMLUNG
           ============================================ */
        .ideas-toolbar {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            align-items: center;
        }

        .ideas-toolbar input,
        .ideas-toolbar select {
            padding: 8px 12px;
            border: 1px solid var(--muted-border);
            border-radius: 8px;
            background: var(--canvas);
            color: var(--ink);
            font-size: 0.85rem;
        }

        .ideas-toolbar select {
            min-width: 130px;
        }

        .ideas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 16px;
        }

        .idea-card {
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 18px;
            transition: all 0.2s;
            position: relative;
        }

        .idea-card:hover {
            border-color: var(--soft-border);
        }

        .idea-card.kb-recommended {
            border-color: var(--soft-border);
            box-shadow: var(--shadow-card);
        }

        .idea-title {
            font-weight: 600;
            color: var(--ink);
            margin-bottom: 6px;
            font-size: 1rem;
        }

        .idea-rationale {
            font-size: 0.85rem;
            color: var(--graphite);
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .idea-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }

        .idea-badge {
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.72rem;
            font-weight: 600;
        }

        .idea-badge.source-topic { background: rgba(155,89,182,0.2); color: #9b59b6; }
        .idea-badge.source-rss { background: rgba(52,152,219,0.2); color: #3498db; }
        .idea-badge.source-manual { background: var(--soft-bg); color: var(--primary); }
        .idea-badge.status-new { background: rgba(46,204,113,0.15); color: #2ecc71; }
        .idea-badge.status-planned { background: rgba(52,152,219,0.15); color: #3498db; }
        .idea-badge.status-used { background: var(--border); color: var(--graphite); }
        .idea-badge.status-discarded { background: rgba(231,76,60,0.15); color: #e74c3c; }
        .idea-badge.kb-match { background: rgba(46,204,113,0.2); color: #2ecc71; }
        .idea-badge.kb-unchecked { background: var(--surface); color: #666; }
        .idea-badge.kb-recommended { background: var(--soft-bg); color: var(--primary); }

        .idea-kb-snippet {
            font-size: 0.78rem;
            color: var(--graphite);
            background: rgba(46,204,113,0.06);
            border-radius: 6px;
            padding: 8px 10px;
            margin-bottom: 10px;
            border-left: 3px solid rgba(46,204,113,0.4);
        }

        .idea-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .idea-action-btn {
            padding: 5px 10px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--canvas);
            color: var(--graphite);
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
        }

        .idea-action-btn:hover {
            background: var(--border);
            color: var(--ink);
        }

        .idea-action-btn.kb {
            border-color: rgba(46,204,113,0.3);
            color: #2ecc71;
        }

        .idea-action-btn.kb:hover {
            background: rgba(46,204,113,0.15);
        }

        .idea-action-btn.use {
            border-color: var(--soft-border);
            color: var(--primary);
        }

        .idea-action-btn.use:hover {
            background: var(--soft-bg);
        }

        .idea-action-btn.delete:hover {
            border-color: rgba(231,76,60,0.4);
            color: #e74c3c;
            background: rgba(231,76,60,0.1);
        }

        .idea-action-btn.loading {
            opacity: 0.5;
            pointer-events: none;
        }

        .ideas-empty {
            text-align: center;
            padding: 40px;
            color: #666;
            font-size: 0.95rem;
        }

        .topic-card-actions {
            display: flex;
            gap: 6px;
            margin-top: 8px;
        }

        .btn-select-topic {
            padding: 5px 14px;
            border: 1px solid rgba(46,204,113,0.4);
            border-radius: 12px;
            background: rgba(46,204,113,0.1);
            color: #2ecc71;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            transition: all 0.2s;
        }
        .btn-select-topic:hover {
            background: rgba(46,204,113,0.25);
        }
        .topic-card.selected .btn-select-topic {
            background: #2ecc71;
            color: var(--cloud);
            border-color: #2ecc71;
        }

        .btn-bookmark-topic {
            padding: 4px 10px;
            border: 1px solid var(--soft-border);
            border-radius: 12px;
            background: var(--soft-bg);
            color: var(--primary);
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
        }

        .btn-bookmark-topic:hover {
            background: var(--soft-bg);
        }

        .btn-bookmark-topic.saved {
            background: rgba(46,204,113,0.2);
            border-color: rgba(46,204,113,0.4);
            color: #2ecc71;
            cursor: default;
        }

        .toast-msg {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: #2ecc71;
            color: var(--cloud);
            padding: 12px 24px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 0.9rem;
            z-index: 500;
            display: none;
            animation: fadeIn 0.3s ease;
        }

        /* (Legacy discover-feed styles removed — now in Recherche-Center section) */

        /* ============================================
           INTEGRATIONS OVERLAY — v2 (Split-Pane Redesign)
           ============================================ */
        .integrations-v2 {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9500;
            background: var(--cloud);
            flex-direction: column;
            color: var(--ink);
            font-size: 14px;
            animation: fadeIn 0.18s ease;
        }
        .integrations-v2.open { display: flex; }

        /* ---- Top Bar ---- */
        .intv2-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 24px;
            background: var(--canvas);
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
            margin-left: 0;
        }
        .intv2-topbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .intv2-topbar-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: var(--primary);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .intv2-topbar h2 {
            margin: 0;
            font-size: 1.05rem;
            font-weight: 600;
            color: var(--ink);
            letter-spacing: 0.2px;
        }
        .intv2-topbar-summary {
            font-size: 0.78rem;
            color: var(--graphite);
            padding: 4px 10px;
            background: var(--canvas);
            border-radius: 999px;
            border: 1px solid var(--border);
        }
        .intv2-topbar-summary.has-connection {
            color: #16a34a;
            background: rgba(22,163,74,0.08);
            border-color: rgba(22,163,74,0.25);
        }
        .intv2-topbar-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .intv2-search {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 12px;
            background: var(--soft-bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--graphite);
            transition: border-color 0.15s, background 0.15s;
            min-width: 260px;
        }
        .intv2-search:focus-within {
            border-color: var(--primary);
            background: var(--surface);
        }
        .intv2-search input {
            background: transparent;
            border: none;
            outline: none;
            color: var(--ink);
            font-size: 0.85rem;
            width: 100%;
        }
        .intv2-search input::placeholder {
            color: var(--muted);
        }
        .intv2-close {
            width: 34px;
            height: 34px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 8px;
            color: var(--graphite);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }
        .intv2-close:hover {
            color: #ff6b6b;
            border-color: rgba(255,107,107,0.3);
            background: rgba(255,107,107,0.08);
        }

        /* ---- Body Layout ---- */
        .intv2-body {
            flex: 1;
            display: grid;
            grid-template-columns: 320px 1fr;
            min-height: 0;
        }

        /* ---- Sidebar (Left) ---- */
        .intv2-sidebar {
            background: var(--surface);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .intv2-cats {
            padding: 14px 12px 10px;
            display: flex;
            flex-direction: column;
            gap: 2px;
            border-bottom: 1px solid var(--border);
        }
        .intv2-cat {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 7px 12px;
            background: transparent;
            border: none;
            border-radius: 7px;
            color: var(--graphite);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            text-align: left;
            transition: all 0.12s;
        }
        .intv2-cat:hover {
            background: var(--canvas);
            color: var(--charcoal);
        }
        .intv2-cat.active {
            background: rgba(12,60,96,0.08);
            color: var(--primary);
        }
        .intv2-cat-count {
            font-size: 0.72rem;
            padding: 2px 8px;
            background: var(--canvas);
            border-radius: 999px;
            color: var(--muted);
            min-width: 28px;
            text-align: center;
        }
        .intv2-cat.active .intv2-cat-count {
            background: rgba(12,60,96,0.12);
            color: var(--primary);
        }

        .intv2-list {
            flex: 1;
            overflow-y: auto;
            padding: 10px 10px 24px;
        }
        .intv2-list-loading,
        .intv2-list-empty {
            padding: 24px 16px;
            text-align: center;
            color: var(--muted);
            font-size: 0.82rem;
        }

        .intv2-list-item {
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 9px 11px;
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid transparent;
            margin-bottom: 2px;
            transition: background 0.12s, border-color 0.12s;
            position: relative;
        }
        .intv2-list-item:hover {
            background: var(--soft-bg);
        }
        .intv2-list-item.selected {
            background: rgba(12,60,96,0.07);
            border-color: var(--soft-border);
        }
        .intv2-list-logo {
            width: 32px;
            height: 32px;
            border-radius: 7px;
            background: var(--soft-bg);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            border: 1px solid var(--border);
            overflow: hidden;
        }
        .intv2-list-logo svg {
            width: 20px;
            height: 20px;
            display: block;
        }
        .intv2-list-meta {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .intv2-list-name {
            font-size: 0.86rem;
            color: var(--ink);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .intv2-list-desc {
            font-size: 0.72rem;
            color: var(--graphite);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .intv2-list-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--muted-border);
            flex-shrink: 0;
        }
        .intv2-list-dot.connected {
            background: #34d399;
            box-shadow: 0 0 0 3px rgba(52,211,153,0.15);
        }
        .intv2-cat-group-label {
            font-size: 0.68rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--muted);
            padding: 14px 12px 6px;
        }
        .intv2-cat-group-label:first-child { padding-top: 6px; }

        /* ---- Detail (Right) ---- */
        .intv2-detail {
            overflow-y: auto;
            padding: 0;
            background: var(--cloud);
            min-height: 0;
        }
        .intv2-empty {
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 40px;
            color: var(--graphite);
        }
        .intv2-empty-icon {
            width: 80px;
            height: 80px;
            border-radius: 16px;
            background: var(--soft-bg);
            border: 1px solid var(--border);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            margin-bottom: 20px;
        }
        .intv2-empty h3 {
            margin: 0 0 8px;
            color: var(--ink);
            font-size: 1.05rem;
            font-weight: 600;
        }
        .intv2-empty p {
            max-width: 380px;
            line-height: 1.55;
            font-size: 0.85rem;
            margin: 0;
        }

        /* Detail View */
        .intv2-detail-view {
            padding: 28px 36px 48px;
            max-width: 820px;
        }
        .intv2-detail-header {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 22px;
        }
        .intv2-detail-logo {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            background: var(--soft-bg);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            flex-shrink: 0;
        }
        .intv2-detail-logo svg {
            width: 32px;
            height: 32px;
        }
        .intv2-detail-head-main {
            flex: 1;
            min-width: 0;
        }
        .intv2-detail-title-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 6px;
        }
        .intv2-detail-title {
            margin: 0;
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--ink);
        }
        .intv2-detail-badge {
            font-size: 0.7rem;
            padding: 3px 10px;
            border-radius: 999px;
            background: var(--surface);
            color: var(--graphite);
            border: 1px solid var(--border);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-weight: 500;
        }
        .intv2-detail-badge.connected {
            background: rgba(22,163,74,0.08);
            color: #16a34a;
            border-color: rgba(22,163,74,0.25);
        }
        .intv2-detail-badge .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
        }
        .intv2-detail-desc {
            margin: 0;
            color: var(--graphite);
            font-size: 0.88rem;
            line-height: 1.5;
        }
        .intv2-detail-head-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .intv2-detail-section {
            margin-bottom: 20px;
            background: var(--canvas);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            padding: 16px 20px;
        }
        .intv2-detail-section-title {
            font-size: 0.72rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--graphite);
            margin: 0 0 12px;
        }

        /* Masked Keys */
        .intv2-masked-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .intv2-masked-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 14px;
            background: rgba(52,211,153,0.04);
            border: 1px solid rgba(52,211,153,0.18);
            border-radius: 8px;
        }
        .intv2-masked-label {
            font-size: 0.8rem;
            color: var(--graphite);
        }
        .intv2-masked-value {
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 0.82rem;
            color: #2ecc71;
            background: var(--soft-bg);
            padding: 3px 10px;
            border-radius: 5px;
        }

        /* OAuth Button */
        .intv2-oauth {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .intv2-btn-oauth {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px 20px;
            background: linear-gradient(135deg, #4f8cff 0%, #6366f1 100%);
            color: #fff;
            border: none;
            border-radius: 10px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
            box-shadow: 0 2px 10px rgba(79,140,255,0.25);
            width: 100%;
        }
        .intv2-btn-oauth svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        .intv2-btn-oauth:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(79,140,255,0.35);
        }
        .intv2-btn-oauth:active { transform: translateY(0); }
        .intv2-btn-oauth:disabled {
            opacity: 0.6;
            cursor: wait;
            transform: none;
        }
        .intv2-oauth-or {
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--muted);
            font-size: 0.74rem;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }
        .intv2-oauth-or::before,
        .intv2-oauth-or::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--surface);
        }
        .intv2-oauth-note {
            margin: 0;
            color: var(--graphite);
            font-size: 0.82rem;
            line-height: 1.5;
        }

        /* Form */
        .intv2-form {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .intv2-form-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .intv2-form-field label {
            font-size: 0.78rem;
            color: var(--graphite);
            font-weight: 500;
        }
        .intv2-form-field select,
        .intv2-form-field input {
            padding: 10px 14px;
            background: var(--soft-bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--ink);
            font-size: 0.88rem;
            outline: none;
            transition: border-color 0.15s, background 0.15s;
            font-family: inherit;
        }
        .intv2-form-field select {
            appearance: none;
        }
        .intv2-form-field input::placeholder {
            color: var(--muted);
        }
        .intv2-form-field select:focus,
        .intv2-form-field input:focus {
            border-color: var(--primary);
            background: var(--surface);
            box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
        }
        .intv2-selection-card {
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--surface);
        }
        .intv2-connection-card {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 14px;
            border: 1px solid rgba(79,140,255,0.18);
            border-radius: 10px;
            background: rgba(79,140,255,0.06);
        }
        .intv2-connection-card.needs-reauth {
            border-color: rgba(248,113,113,0.26);
            background: rgba(239,68,68,0.08);
        }
        .intv2-connection-name {
            color: var(--ink);
            font-size: 0.96rem;
            font-weight: 600;
        }
        .intv2-connection-meta {
            color: var(--graphite);
            font-size: 0.8rem;
            line-height: 1.45;
        }
        .intv2-connection-warning {
            color: var(--error);
            font-size: 0.82rem;
            line-height: 1.45;
        }

        /* Buttons */
        .intv2-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 8px;
            border: 1px solid transparent;
            font-size: 0.84rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.12s;
            font-family: inherit;
        }
        .intv2-btn-primary {
            background: var(--primary);
            color: #fff;
        }
        .intv2-btn-primary:hover { background: var(--primary-hover); }
        .intv2-btn-secondary {
            background: var(--canvas);
            color: var(--charcoal);
            border-color: var(--border);
        }
        .intv2-btn-secondary:hover {
            background: var(--soft-bg);
            color: var(--ink);
        }
        .intv2-btn-danger {
            background: rgba(220,38,38,0.06);
            color: #b91c1c;
            border-color: rgba(220,38,38,0.2);
        }
        .intv2-btn-danger:hover {
            background: rgba(220,38,38,0.12);
            color: #991b1b;
        }
        .intv2-form-actions {
            display: flex;
            gap: 8px;
            margin-top: 4px;
        }

        /* Tabs for Guides */
        .intv2-tabs {
            display: flex;
            gap: 2px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 14px;
        }
        .intv2-tab {
            padding: 8px 14px;
            background: transparent;
            border: none;
            color: var(--graphite);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: color 0.12s, border-color 0.12s;
            font-family: inherit;
        }
        .intv2-tab:hover { color: var(--charcoal); }
        .intv2-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        .intv2-tab-panel {
            display: none;
        }
        .intv2-tab-panel.active {
            display: block;
        }
        .intv2-guide-body {
            padding: 14px 18px;
            background: var(--surface);
            border-left: 3px solid var(--primary);
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
        }
        .intv2-guide-body ol {
            margin: 0;
            padding-left: 22px;
            font-size: 0.85rem;
            color: var(--ink);
            line-height: 1.7;
        }
        .intv2-guide-body li {
            margin-bottom: 6px;
        }
        .intv2-guide-body a {
            color: var(--primary);
            text-decoration: none;
            border-bottom: 1px dashed var(--soft-border);
        }
        .intv2-guide-body a:hover {
            color: var(--primary-hover);
            border-bottom-style: solid;
        }
        .intv2-guide-body code {
            background: var(--border);
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 0.8rem;
            color: var(--ink);
            font-family: 'Consolas', 'Monaco', monospace;
        }
        .intv2-guide-body strong { color: var(--ink); }
        .intv2-guide-body em { color: var(--charcoal); font-style: italic; }
        .intv2-guide-body p {
            margin: 10px 0 0;
            font-size: 0.82rem;
            color: var(--graphite);
            line-height: 1.6;
        }
        .intv2-guide-body p strong { color: var(--ink); }

        /* Status messages */
        .intv2-msg {
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.84rem;
            display: none;
            margin-top: 12px;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .intv2-msg.success {
            display: flex;
            background: rgba(52,211,153,0.1);
            color: #34d399;
            border: 1px solid rgba(52,211,153,0.25);
        }
        .intv2-msg.error {
            display: flex;
            background: rgba(239,68,68,0.1);
            color: #f87171;
            border: 1px solid rgba(239,68,68,0.25);
            line-height: 1.5;
        }
        .intv2-msg-text {
            flex: 1;
            min-width: 0;
            overflow-wrap: anywhere;
        }
        .intv2-msg-copy {
            flex: 0 0 auto;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--soft-bg);
            color: var(--charcoal);
            padding: 5px 9px;
            font-size: 0.78rem;
            cursor: pointer;
        }
        .intv2-msg-copy:hover {
            background: var(--cloud);
        }

        /* Responsive: stack on narrow screens */
        @media (max-width: 900px) {
            .intv2-body {
                grid-template-columns: 1fr;
            }
            .intv2-sidebar {
                border-right: none;
                border-bottom: 1px solid var(--border);
                max-height: 45vh;
            }
            .intv2-search { min-width: 160px; }
            .intv2-detail-view { padding: 20px; }
        }

        /* ============================================
           LIBRARY — Accordion-Ansicht
           ============================================ */
        .lib-accordion-item {
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 10px;
            background: var(--surface);
            overflow: hidden;
            transition: border-color 0.2s;
        }
        .lib-accordion-item:hover {
            border-color: var(--muted-border);
        }
        .lib-accordion-item.open {
            border-color: rgba(0,212,170,0.3);
        }

        .lib-accordion-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 18px;
            background: transparent;
            border: none;
            color: var(--ink);
            cursor: pointer;
            text-align: left;
            font-size: 0.92rem;
            gap: 12px;
            transition: background 0.15s;
        }
        .lib-accordion-header:hover {
            background: var(--surface);
        }

        .lib-acc-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
        }
        .lib-acc-chevron {
            font-size: 0.7rem;
            color: var(--graphite);
            transition: transform 0.25s ease;
            flex-shrink: 0;
        }
        .lib-accordion-item.open .lib-acc-chevron {
            transform: rotate(90deg);
        }
        .lib-acc-topic {
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 300px;
        }
        .lib-acc-badges {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }
        .lib-badge {
            font-size: 0.72rem;
            padding: 2px 8px;
            border-radius: 6px;
            white-space: nowrap;
        }
        .lib-badge-trigger {
            background: var(--soft-bg);
            color: var(--primary);
        }
        .lib-badge-output {
            background: rgba(12,60,96,0.08);
            color: var(--primary);
        }
        .lib-badge-count {
            background: var(--surface);
            color: var(--graphite);
        }
        .lib-acc-right {
            flex-shrink: 0;
        }
        .lib-acc-date {
            font-size: 0.78rem;
            color: #666;
        }

        /* Accordion Body */
        .lib-accordion-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease;
        }
        .lib-accordion-item.open .lib-accordion-body {
            max-height: 2000px;
        }
        .lib-accordion-body-inner {
            padding: 0 18px 18px;
        }

        /* Run Actions */
        .lib-run-actions {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }
        .lib-action-btn {
            padding: 6px 14px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.12);
            background: transparent;
            color: var(--accent-color, #00d4aa);
            cursor: pointer;
            font-size: 0.82rem;
            transition: all 0.15s;
        }
        .lib-action-btn:hover {
            background: rgba(0,212,170,0.08);
            border-color: rgba(0,212,170,0.3);
        }
        .lib-action-btn.lib-action-primary {
            background: var(--accent-color, #00d4aa);
            color: #111;
            font-weight: 600;
            border-color: transparent;
        }
        .lib-action-btn.lib-action-primary:hover {
            background: #00e8bb;
        }
        .lib-action-btn:disabled {
            opacity: 0.5;
            cursor: wait;
        }

        /* Variant (Channel/Platform) Tabs */
        .lib-variant-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 12px;
            border-bottom: 1px solid var(--border);
            padding-bottom: 0;
        }
        .lib-variant-tab {
            padding: 8px 16px;
            border: none;
            background: transparent;
            color: var(--graphite);
            cursor: pointer;
            font-size: 0.85rem;
            border-bottom: 2px solid transparent;
            transition: all 0.15s;
        }
        .lib-variant-tab:hover {
            color: var(--charcoal);
        }
        .lib-variant-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        .lib-variant-panel {
            display: none;
        }
        .lib-variant-panel.active {
            display: block;
        }

        /* Length Tabs */
        .lib-length-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 10px;
        }
        .lib-length-tab {
            padding: 5px 12px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--graphite);
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.15s;
        }
        .lib-length-tab:hover {
            color: var(--charcoal);
            border-color: var(--muted-border);
        }
        .lib-length-tab.active {
            background: var(--soft-bg);
            color: var(--primary);
            border-color: var(--soft-border);
        }
        .lib-content-block {
            display: none;
        }
        .lib-content-block.active {
            display: block;
        }

        /* Content Display */
        .lib-content-actions {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 8px;
        }
        .lib-copy-btn {
            padding: 4px 12px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.12);
            background: transparent;
            color: var(--charcoal);
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.15s;
        }
        .lib-copy-btn:hover {
            background: rgba(0,212,170,0.1);
            color: #00d4aa;
            border-color: rgba(0,212,170,0.3);
        }
        .lib-content-text {
            white-space: pre-wrap;
            word-break: break-word;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            font-size: 0.88rem;
            line-height: 1.65;
            color: var(--ink);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 16px;
            max-height: 500px;
            overflow-y: auto;
        }
        .lib-content-text::-webkit-scrollbar {
            width: 6px;
        }
        .lib-content-text::-webkit-scrollbar-thumb {
            background: var(--soft-border);
            border-radius: 3px;
        }

        .lib-acc-thumb {
            width: 40px;
            height: 40px;
            border-radius: 6px;
            object-fit: cover;
            flex-shrink: 0;
            border: 1px solid var(--border);
        }

        .lib-image-preview {
            margin-bottom: 14px;
            text-align: center;
        }
        .lib-image-preview img {
            max-width: 100%;
            max-height: 220px;
            border-radius: 10px;
            object-fit: contain;
            border: 1px solid var(--border);
        }

        @media (max-width: 640px) {
            .lib-acc-badges { display: none; }
            .lib-acc-topic { max-width: 180px; }
            .lib-run-actions { flex-wrap: wrap; }
            .lib-acc-thumb { width: 32px; height: 32px; }
        }

/* ============================================
   IMAGE PIPELINE
   ============================================ */
.image-source-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--surface);
    padding: 4px;
    border-radius: 10px;
}
.image-source-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--graphite);
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: all 0.15s;
    text-align: center;
}
.image-source-tab:hover {
    color: var(--charcoal);
    background: var(--canvas);
}
.image-source-tab.active {
    color: var(--ink);
    background: var(--border);
    font-weight: 600;
}
.image-source-content {
    display: none;
}
.image-source-content.active {
    display: block;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    overflow-y: auto;
    padding: 8px 4px;
}
.image-gallery-grid::-webkit-scrollbar {
    width: 6px;
}
.image-gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}

/* --- Gallery Item: Card-Layout mit Infos darunter --- */
.gallery-item {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--canvas);
    display: flex;
    flex-direction: column;
}
.gallery-item:hover {
    border-color: rgba(0,212,170,0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.gallery-item.selected {
    border-color: var(--accent-color, #00d4aa);
    box-shadow: 0 0 0 2px rgba(0,212,170,0.25);
}
.gallery-item.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-color, #00d4aa);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 5;
}
.gallery-item-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: var(--canvas);
}
.gallery-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-item-info {
    padding: 10px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gallery-item-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gallery-item-name {
    font-size: 0.78rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-weight: 500;
}
.gallery-item-name-input {
    font-size: 0.78rem;
    color: var(--ink);
    background: var(--border);
    border: 1px solid rgba(79,140,255,0.5);
    border-radius: 4px;
    padding: 2px 6px;
    flex: 1;
    min-width: 0;
    outline: none;
    font-weight: 500;
}
.gallery-item-rename-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
}
.gallery-item:hover .gallery-item-rename-btn {
    opacity: 1;
}
.gallery-item-rename-btn:hover {
    color: var(--primary);
}
.gallery-item-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gallery-item-meta {
    font-size: 0.68rem;
    color: var(--graphite);
}
.gallery-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.gallery-toolbar-select {
    font-size: 0.82rem;
    color: var(--charcoal);
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    min-width: 130px;
}
.gallery-toolbar-select:hover {
    border-color: rgba(79,140,255,0.4);
    background: var(--border);
}
.gallery-toolbar-select:focus {
    border-color: rgba(79,140,255,0.6);
    background: var(--border);
}
.gallery-toolbar-select option {
            background: var(--canvas);
    padding: 6px 10px;
}

.gallery-folder-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(12,60,96,0.08);
    color: var(--primary);
    border: 1px solid rgba(79,140,255,0.25);
}
.gallery-item-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #e74c3c;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    z-index: 5;
    padding: 0;
    line-height: 1;
}
.gallery-item:hover .gallery-item-delete {
    opacity: 1;
}
.gallery-item-delete:hover {
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
}

/* --- Gallery Folders --- */
.gallery-folder-item {
    border: 2px dashed var(--soft-border);
    border-radius: 12px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--surface);
    min-height: 100px;
}
.gallery-folder-item:hover {
    border-color: rgba(79,140,255,0.4);
    background: rgba(79,140,255,0.06);
}
.gallery-folder-item .folder-icon {
    font-size: 2rem;
}
.gallery-folder-item .folder-name {
    font-size: 0.8rem;
    color: var(--charcoal);
    font-weight: 500;
}
.gallery-folder-item .folder-count {
    font-size: 0.68rem;
    color: #666;
}
.gallery-folder-item.add-folder {
    border-color: var(--soft-border);
    color: var(--primary);
}
.gallery-folder-item.add-folder:hover {
    border-color: var(--primary);
    background: rgba(79,140,255,0.08);
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--graphite);
}
.gallery-folder {
    background: var(--soft-bg);
    border-color: var(--soft-border);
}
.gallery-folder:hover {
    border-color: var(--soft-border);
}

.cloud-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--graphite);
    flex-wrap: wrap;
}
.cloud-crumb:hover {
    color: var(--primary);
}

.cloud-provider-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
}

.image-gen-results {
    margin-top: 12px;
}

/* ========== OVERLAY SUGGESTION CHIPS ========== */
.overlay-suggestion-chip {
    border: 1px solid rgba(255,255,255,0.12) !important;
    background: var(--canvas) !important;
    color: var(--charcoal) !important;
    font-weight: 500;
    transition: all 0.15s ease !important;
}
.overlay-suggestion-chip:hover {
    background: rgba(0,212,170,0.08) !important;
    border-color: rgba(0,212,170,0.25) !important;
    color: #00d4aa !important;
}
.overlay-suggestion-chip.selected {
    background: rgba(0,212,170,0.15) !important;
    border-color: rgba(0,212,170,0.4) !important;
    color: #00d4aa !important;
    font-weight: 600;
}

.overlay-mode-btn {
    transition: all 0.15s ease;
}
.overlay-mode-btn.active {
    background: rgba(0,212,170,0.1);
    border-color: rgba(0,212,170,0.3);
    color: #00d4aa;
}

/* Finalize Preview (Step 6) */
.fp-card {
    max-width: 440px;
    margin: 0 auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.fp-text {
    word-break: break-word;
}

#finalize-text-content {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
}

#finalize-text-content:empty::before {
    content: 'Kein Text vorhanden.';
    color: var(--graphite);
}

.fp-mehr {
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}
.fp-mehr:hover {
    opacity: 1;
}
.finalize-text-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.finalize-platform-badge {
    margin-left: 0;
}

.finalize-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px !important;
    border-radius: 999px !important;
    border: 1px solid var(--primary) !important;
    background: var(--canvas) !important;
    color: var(--primary) !important;
    font-size: 0.8rem !important;
    font-weight: 700;
    line-height: 1;
    box-shadow: var(--shadow-soft);
    transition: all 0.15s ease;
}

.finalize-copy-btn:hover {
    background: var(--soft-bg) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.finalize-copy-btn:focus-visible {
    outline: 2px solid rgba(12,60,96,0.35);
    outline-offset: 2px;
}

/* ============================================
   FINALIZE WIZARD
   ============================================ */
.finalize-wizard-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.wiz-connector {
    width: 30px;
    height: 2px;
    background: var(--muted-border);
}
.finalize-wiz-panel {
    margin-top: 15px;
}

/* ============================================
   UTILITY CLASSES (referenced in HTML)
   ============================================ */
.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--cloud);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
}
.alert-warning {
    background: var(--soft-bg);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--primary);
}
.project-select {
    padding: 6px 10px;
    border: 1px solid var(--muted-border);
    border-radius: 6px;
    background: var(--canvas);
    color: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.project-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   Projekt-Picker im Header (Label + Info + Dropdown + Zahnrad)
   ============================================ */
.project-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.project-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.55);
    cursor: default;
    user-select: none;
}
.project-picker-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    cursor: help;
    transition: color 0.15s;
}
.project-picker-info:hover,
.project-picker-info:focus {
    color: var(--primary);
    outline: none;
}
.project-picker .project-select {
    background: transparent;
    border: none;
    padding: 6px 4px;
    color: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    max-width: 180px;
}
.project-picker .project-select:focus {
    outline: none;
    border: none;
}
.project-picker-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.4s;
}
.project-picker-gear:hover {
    background: var(--border);
    color: #fff;
    transform: rotate(45deg);
}
.project-picker-gear:focus {
    outline: 2px solid #4f8cff;
    outline-offset: 1px;
}

/* ============================================
   Projekt-Verwaltungs-Modal
   ============================================ */
.projects-modal {
    position: fixed;
    inset: 0;
    left: 220px;
    z-index: 9600;
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
}
@media (max-width: 900px) {
    .projects-modal { left: 0; }
}
.projects-modal.is-open {
    display: flex;
}
.projects-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.projects-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: auto;
    max-height: calc(100vh - 48px);
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (max-height: 600px) {
    .projects-modal { padding: 8px; }
    .projects-modal-dialog {
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }
}
.projects-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--border);
}
.projects-modal-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    color: #fff;
}
.projects-modal-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    max-width: 560px;
    line-height: 1.5;
}
.projects-modal-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    transition: background 0.15s, color 0.15s;
}
.projects-modal-close:hover {
    background: var(--border);
    color: #fff;
}
.projects-modal-body {
    padding: 20px 26px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.projects-modal-create h3,
.projects-modal-list-section h3 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.projects-modal-create-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 10px;
}
.projects-modal-create-row input[type="text"] {
    padding: 10px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
}
.projects-modal-create-row input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(79,140,255,0.05);
}
.projects-modal-msg {
    margin-top: 10px;
    font-size: 0.85rem;
    min-height: 0;
    color: rgba(255,255,255,0.7);
}
.projects-modal-msg.is-error {
    color: #ff6b6b;
}
.projects-modal-msg.is-success {
    color: #4ade80;
}
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.projects-list-loading,
.projects-list-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    background: var(--surface);
    border-radius: 8px;
}
.projects-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.projects-list-item:hover {
    border-color: rgba(255,255,255,0.12);
    background: var(--canvas);
}
.projects-list-item.is-active {
    border-color: rgba(79,140,255,0.4);
    background: rgba(79,140,255,0.06);
}
.projects-list-item-main {
    flex: 1;
    min-width: 0;
}
.projects-list-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.projects-list-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.projects-list-item-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(12,60,96,0.10);
    padding: 2px 8px;
    border-radius: 999px;
}
.projects-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}
.projects-list-meta-sep {
    color: var(--muted-border);
    font-size: 0.7rem;
}
.projects-list-item-id {
    font-family: monospace;
    cursor: help;
}
.projects-list-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.projects-list-item-actions .btn {
    padding: 5px 10px;
    font-size: 0.78rem;
}
.projects-list-item-actions .btn-danger {
    background: rgba(255,107,107,0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255,107,107,0.25);
}
.projects-list-item-actions .btn-danger:hover {
    background: rgba(255,107,107,0.2);
    border-color: rgba(255,107,107,0.4);
}
@media (max-width: 700px) {
    .projects-modal-create-row {
        grid-template-columns: 1fr;
    }
    .projects-list-item {
        flex-direction: column;
        align-items: stretch;
    }
    .projects-list-item-actions {
        flex-wrap: wrap;
    }
}

/* slo-card / slo-dots (supplements Block 1 step-loading) */
.step-loading-overlay {
    background: radial-gradient(ellipse at center, rgba(12, 60, 96, 0.28) 0%, rgba(10, 12, 28, 0.55) 100%) !important;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
}
.slo-card {
    position: relative;
    text-align: center;
    padding: 38px 44px 32px;
    min-width: 320px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow:
        0 24px 60px -12px rgba(12, 60, 96, 0.35),
        0 8px 20px -8px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    animation: slo-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.slo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.06) 0%, rgba(0, 212, 170, 0.04) 100%);
    pointer-events: none;
}
.slo-card::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #4f8cff 30%, #00d4aa 70%, transparent 100%);
    background-size: 200% 100%;
    animation: slo-shimmer 1.8s linear infinite;
}
.slo-card .loading-spinner {
    width: 56px;
    height: 56px;
    margin: 4px auto 8px;
    border: 3px solid rgba(79, 140, 255, 0.15);
    border-top-color: #4f8cff;
    border-right-color: #00d4aa;
    border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.6, 0.1, 0.4, 0.9) infinite;
    position: relative;
    z-index: 1;
}
.slo-card #slo-text,
.slo-card .slo-text {
    position: relative;
    z-index: 1;
    margin-top: 18px !important;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary, #0c3c60);
    letter-spacing: 0.01em;
}
.slo-card #slo-sub,
.slo-card .slo-sub {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    color: #6b7785 !important;
    font-size: 0.85rem;
    line-height: 1.5;
}
@keyframes slo-card-in {
    from { opacity: 0; transform: translateY(12px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slo-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
.slo-dots::after {
    content: '';
    animation: slo-dots 1.4s steps(4,end) infinite;
}
@keyframes slo-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

/* opg-progress-track/fill (supplements Block 1 opg styles -- matches HTML markup) */
.opg-progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}
.opg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f8cff, #00d4aa);
    border-radius: 3px;
    transition: width 0.6s ease;
}
.opg-progress-fill.complete {
    background: #00d4aa;
}

.modal-card {
    background: var(--canvas);
    border-radius: 0 !important;
    padding: 24px 32px;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto;
    box-shadow: none;
}

/* ============================================
   LEFT APP SIDEBAR
   ============================================ */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: var(--primary);
    border-right: 1px solid rgba(12,60,96,0.2);
    display: flex;
    flex-direction: column;
    z-index: 9000;
    padding: 0;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand-icon {
    font-size: 1.3rem;
}
.sidebar-brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--on-primary);
    letter-spacing: 0.5px;
}
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}
.sidebar-section-label {
    padding: 8px 20px 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    border-left: 3px solid transparent;
}
.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--on-primary);
}
.sidebar-nav-item.active {
    background: rgba(255,255,255,0.16);
    color: var(--on-primary);
    border-left-color: var(--on-primary);
}
.sidebar-nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 8px 0;
}
.sidebar-logout {
    color: rgba(255,255,255,0.45);
}
.sidebar-logout:hover {
    color: var(--error);
    background: rgba(231,76,60,0.15);
}

.mobile-sidebar-toggle,
.mobile-sidebar-close {
    display: none;
}

.app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8990;
    background: rgba(0, 0, 0, 0.52);
}

.app-sidebar-backdrop[hidden] {
    display: none;
}

.output-error-state {
    padding: 16px;
    border: 1px solid rgba(231, 76, 60, 0.28);
    border-radius: 8px;
    background: rgba(231, 76, 60, 0.08);
    color: var(--error);
    line-height: 1.45;
}

/* Offset header + main for sidebar */
header { margin-left: 220px; }
main   { margin-left: 220px; }

@media (max-width: 900px) {
    header { margin-left: 0; }
    main   { margin-left: 0; }
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 44px;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        color: var(--ink);
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--canvas);
        color: var(--charcoal);
        font-size: 1.4rem;
        cursor: pointer;
    }
}

/* ============================================
   SIDEBAR OVERLAYS (Right slide-in panels)
   ============================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: var(--cloud);
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.sidebar-overlay.sidebar-overlay-sidebar-aware {
    left: 220px;
    width: calc(100vw - 220px);
}
@media (max-width: 900px) {
    .sidebar-overlay.sidebar-overlay-sidebar-aware {
        left: 0;
        width: 100vw;
    }
}
.sidebar-panel {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh;
    background: var(--canvas);
    padding: 24px 32px;
    overflow-y: auto;
    transform: none !important;
    transition: none;
    box-shadow: none;
}
.sidebar-overlay.open .sidebar-panel {
    transform: none;
}
.alert-info {
    background: var(--blue-50, #ebf8ff);
    border-left: 4px solid var(--blue-500, #4299e1);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.form-input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-card, #fff);
    color: var(--text, #1a202c);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary, #4361ee);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
}

/* KB Modal Tabs */
.kb-tab {
    background: var(--canvas);
    border: 1px solid var(--border);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
}
.kb-tab.active {
    background: var(--primary);
    color: var(--cloud);
    border-color: var(--primary);
    font-weight: 600;
}
.kb-tab:hover:not(.active) {
    background: var(--border);
}

/* ============================================
   PROJECT CONTEXT BAR (v22)
   ============================================ */
.project-context-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin-left: 220px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
    .project-context-bar { margin-left: 0; }
}
.project-context-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 8px 24px;
    font-size: 0.82rem;
    color: var(--graphite);
    max-width: 100%;
}
.project-context-inner > * { flex-shrink: 0; }

.ctx-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: ctx-pulse 2.4s infinite;
    flex-shrink: 0;
}
@keyframes ctx-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ctx-label {
    color: var(--graphite);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    font-weight: 600;
}
.ctx-project-name {
    color: var(--ink);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}
.ctx-divider {
    color: var(--muted-border);
    font-weight: 300;
    margin: 0 4px;
}
.ctx-item { display: inline-flex; gap: 6px; align-items: baseline; }
.ctx-key {
    color: var(--graphite);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ctx-item > span:last-child {
    color: var(--ink);
    font-weight: 500;
}
.ctx-spacer { flex: 1 1 auto; min-width: 8px; }
.ctx-hint {
    font-size: 0.7rem;
    color: var(--graphite);
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--soft-bg);
    white-space: nowrap;
    cursor: help;
}

@media (max-width: 720px) {
    .project-context-inner { gap: 8px; padding: 8px 12px; font-size: 0.75rem; }
    .ctx-divider { display: none; }
    .ctx-hint { display: none; }
}

/* States: warnender Rahmen, wenn kein Projekt aktiv ist */
.project-context-bar[data-state="empty"] {
    background: rgba(220,38,38,0.04);
    border-bottom-color: rgba(220,38,38,0.25);
}
.project-context-bar[data-state="empty"] .ctx-dot {
    background: #ef4444;
    animation: none;
}

/* ============================================
   INLINE DIALOG (prompt/confirm Replacement)
   ============================================ */
.inline-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.inline-dialog-backdrop.is-open { opacity: 1; }
.inline-dialog {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: min(440px, 92vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(8px);
    transition: transform 0.15s ease;
    overflow: hidden;
}
.inline-dialog-backdrop.is-open .inline-dialog { transform: translateY(0); }
.inline-dialog-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.inline-dialog-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
    font-weight: 600;
}
.inline-dialog-body { padding: 18px 20px; }
.inline-dialog-label {
    display: block;
    font-size: 0.82rem;
    color: var(--graphite);
    margin-bottom: 6px;
}
.inline-dialog-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.92rem;
    transition: border-color 0.15s;
}
.inline-dialog-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(12, 60, 96, 0.1);
}
.inline-dialog-input.is-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}
.inline-dialog-message {
    color: var(--charcoal);
    font-size: 0.9rem;
    line-height: 1.5;
}
.inline-dialog-message p { margin: 0 0 10px 0; }
.inline-dialog-message p:last-child { margin-bottom: 0; }
.inline-dialog-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--soft-bg);
}
.inline-dialog-footer .btn { min-width: 100px; }
.inline-dialog-footer .btn-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}
.inline-dialog-footer .btn-danger:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
}

/* ============================================
   TOAST NOTIFICATION SYSTEM
   ============================================ */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
}
.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--ink);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast-notification.toast-visible {
    opacity: 1;
    transform: translateX(0);
}
.toast-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.4; }
.toast-text { flex: 1; word-break: break-word; }
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.toast-close:hover { color: var(--ink); }

.toast-success {
    background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.05));
    border-color: rgba(34,197,94,0.3);
}
.toast-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.05));
    border-color: rgba(245,158,11,0.3);
    color: #92400e;
}
.toast-error {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.05));
    border-color: rgba(239,68,68,0.3);
    color: #991b1b;
}
.toast-info {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(99,102,241,0.05));
    border-color: rgba(99,102,241,0.3);
}

@media (max-width: 600px) {
    #toast-container {
        top: auto;
        bottom: 16px;
        right: 8px;
        left: 8px;
        max-width: none;
    }
}

/* ============================================
   LOADING PLACEHOLDER (reusable)
   ============================================ */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    color: var(--graphite);
    font-size: 0.88rem;
}
.loading-placeholder .spinner-small {
    width: 28px;
    height: 28px;
}

/* ============================================
   TOPIC BRIEFING (Screen C / D)
   ============================================ */
.topic-briefing {
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.02) 100%);
    border: 1px solid rgba(52, 152, 219, 0.22);
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 18px;
    margin-bottom: 18px;
    animation: briefingFadeIn 0.35s ease;
}

.topic-briefing--readonly {
    background: rgba(148, 163, 184, 0.05);
    border-color: rgba(148, 163, 184, 0.18);
}

@keyframes briefingFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.briefing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.briefing-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.briefing-header-title h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: 0.2px;
}
.briefing-subtitle {
    margin: 2px 0 0;
    color: var(--graphite);
    font-size: 0.82rem;
}
.briefing-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}
.briefing-header-actions {
    flex-shrink: 0;
}

.briefing-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.briefing-top-grid,
.briefing-secondary-grid {
    display: grid;
    gap: 14px;
}

.briefing-top-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    align-items: start;
}

.briefing-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.briefing-panel {
    min-width: 0;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.briefing-panel--summary {
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.08), rgba(52, 152, 219, 0.03));
    border-color: rgba(52, 152, 219, 0.18);
}

.briefing-panel--angles {
    background: rgba(46, 204, 113, 0.04);
    border-color: rgba(46, 204, 113, 0.16);
}

.briefing-panel--questions {
    background: var(--soft-bg);
    border-color: var(--soft-border);
}

.briefing-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.briefing-panel-head h4 {
    margin: 4px 0 0;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--ink);
}

.briefing-panel-badge {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--charcoal);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
}

.briefing-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--graphite);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.briefing-summary p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--charcoal);
}

.briefing-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.briefing-list li {
    position: relative;
    padding: 10px 12px 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--charcoal);
    font-size: 0.9rem;
    line-height: 1.55;
}

.briefing-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: rgba(52, 152, 219, 0.7);
}

.briefing-list--questions li {
    color: var(--charcoal);
}

.briefing-list--questions li::before {
    background: var(--soft-bg);
}

.briefing-angles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.briefing-angle-card {
    height: 100%;
    background: rgba(46, 204, 113, 0.07);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 10px;
    padding: 13px 14px;
}
.briefing-angle-title {
    font-weight: 600;
    color: #15803d;
    margin-bottom: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
}
.briefing-angle-desc {
    color: var(--graphite);
    font-size: 0.85rem;
    line-height: 1.5;
}

.briefing-sources {
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.briefing-sources-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.briefing-sources-collapsed .briefing-section-title {
    margin-bottom: 4px;
}
.briefing-sources-collapsed p {
    margin: 0;
    color: var(--graphite);
    font-size: 0.85rem;
    line-height: 1.45;
}
.briefing-sources-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.briefing-sources-list[hidden] {
    display: none;
}
.briefing-source-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.2s;
}
.briefing-source-card:hover {
    border-color: rgba(52, 152, 219, 0.35);
}
.briefing-source-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.briefing-source-kind {
    background: rgba(12, 60, 96, 0.08);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.briefing-source-host {
    color: var(--graphite);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
}
.briefing-source-date {
    color: var(--graphite);
    font-size: 0.75rem;
    margin-left: auto;
}
.briefing-source-title {
    display: block;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}
.briefing-source-title:hover {
    color: var(--primary);
    text-decoration: underline;
}
.briefing-source-snippet {
    margin: 4px 0 8px;
    color: var(--graphite);
    font-size: 0.85rem;
    line-height: 1.55;
}
.briefing-source-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.briefing-source-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(12, 60, 96, 0.06);
    border: 1px solid rgba(12, 60, 96, 0.15);
    transition: all 0.15s;
}
.briefing-source-link:hover {
    background: rgba(12, 60, 96, 0.12);
    border-color: rgba(12, 60, 96, 0.3);
}
.briefing-source-summarize {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.briefing-source-summarize.loaded {
    background: rgba(21, 128, 61, 0.08) !important;
    color: #15803d !important;
    border-color: rgba(21, 128, 61, 0.25) !important;
}

.briefing-source-summary {
    margin-top: 10px;
    background: rgba(155, 89, 182, 0.05);
    border: 1px solid rgba(155, 89, 182, 0.18);
    border-radius: 6px;
    padding: 12px 14px;
    animation: briefingFadeIn 0.25s ease;
}
.briefing-source-summary-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--graphite);
    font-size: 0.85rem;
}
.briefing-source-summary-error {
    color: #e74c3c;
    font-size: 0.85rem;
}
.briefing-source-summary-text {
    margin: 0 0 8px;
    line-height: 1.6;
    color: var(--charcoal);
    font-size: 0.9rem;
}
.briefing-source-summary-kp {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--graphite);
}
.briefing-source-summary-kp strong {
    color: #7c3aed;
}
.briefing-source-summary-kp ul {
    margin: 4px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.briefing-source-summary-rel {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--graphite);
    font-style: italic;
}
.briefing-source-summary-rel strong {
    color: #7c3aed;
    font-style: normal;
}

.briefing-empty,
.briefing-error {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px dashed var(--muted-border);
    border-radius: 8px;
    color: var(--graphite);
    font-size: 0.9rem;
    line-height: 1.55;
}
.briefing-error {
    border-color: rgba(220, 38, 38, 0.3);
    color: #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

.briefing-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}
.briefing-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, var(--border) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: briefingSkeletonShimmer 1.4s ease-in-out infinite;
}
.briefing-skeleton-line.wide { width: 92%; }
.briefing-skeleton-line.narrow { width: 56%; }
.briefing-skeleton-spacer {
    height: 8px;
}
@keyframes briefingSkeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive */
@media (max-width: 700px) {
    .positioning-hero,
    .positioning-choice-header,
    .positioning-mode-panel-head,
    .positioning-recap-head,
    .briefing-sources-collapsed,
    .briefing-reference-toggle,
    .briefing-panel-head {
        flex-direction: column;
        align-items: stretch;
    }
    .briefing-reference-toggle {
        display: flex;
    }
    .briefing-top-grid,
    .briefing-secondary-grid,
    .briefing-angles-grid {
        grid-template-columns: 1fr;
    }
    .positioning-step-hint,
    .positioning-choice-copy,
    .positioning-mode-panel-head p {
        max-width: none;
    }
    .positioning-topic-panel {
        grid-template-columns: 1fr;
    }
    .positioning-score-row {
        justify-content: flex-start;
    }
    .positioning-options {
        grid-template-columns: 1fr;
    }
    .positioning-choice-status {
        min-width: 0;
    }
    .topic-briefing {
        padding: 16px 14px;
    }
    .briefing-header {
        flex-direction: column;
        align-items: stretch;
    }
    .briefing-header-actions {
        display: flex;
        justify-content: flex-end;
    }
    .platform-selector-item {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .platform-toggle {
        min-width: 0;
        flex: 1 1 100%;
    }
    .platform-length-tabs {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    .briefing-source-head {
        gap: 6px;
    }
    .briefing-source-date {
        margin-left: 0;
    }
    .briefing-angles-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MOBILE USABILITY HARDENING (Smartphone)
   ============================================ */
@media (max-width: 480px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    header {
        padding: 10px 12px;
    }

    .header-content {
        width: 100%;
        max-width: 100%;
        align-items: stretch;
        gap: 10px;
    }

    .logo {
        font-size: 1.16rem;
        line-height: 1.2;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .project-picker {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) 44px;
        align-items: center;
        gap: 6px;
        padding: 4px 4px 4px 10px;
    }

    .project-picker .project-select {
        width: 100%;
        min-width: 0;
        max-width: none;
        font-size: 0.86rem;
    }

    .project-picker-gear {
        width: 44px;
        height: 44px;
    }

    #btn-new-content,
    .btn {
        min-height: 44px;
    }

    #btn-new-content {
        width: 100%;
    }

    .project-context-bar,
    .pipeline-subnav {
        position: static;
    }

    .project-context-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 6px 8px;
        padding: 8px 12px;
    }

    .ctx-label,
    .ctx-item,
    .ctx-divider,
    .ctx-spacer,
    .ctx-hint {
        display: none;
    }

    .ctx-project-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pipeline-subnav {
        padding: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .pipeline-subnav::-webkit-scrollbar {
        display: none;
    }

    .pipeline-subnav-content {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .progress-step {
        min-width: 44px;
        min-height: 40px;
        padding: 6px 9px;
        border-radius: 12px;
    }

    .ps-connector {
        width: 10px;
    }

    main {
        width: 100%;
        max-width: 100%;
        padding: 14px 10px 28px;
    }

    .card {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .card h2 {
        font-size: 1.08rem;
        margin-bottom: 14px;
    }

    .card h3 {
        font-size: 1rem;
        line-height: 1.35;
    }

    input[type="text"],
    input[type="datetime-local"],
    textarea,
    select,
    .form-input,
    .form-group .form-select,
    .gallery-toolbar-select,
    .gallery-item-name-input {
        max-width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    textarea {
        min-height: 132px;
    }

    .btn-group,
    .output-actions,
    .topic-card-actions,
    .briefing-source-actions,
    .lib-run-actions,
    .projects-list-item-actions,
    .inline-dialog-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .btn-group .btn,
    .output-actions .btn,
    .topic-card-actions .btn,
    .briefing-source-actions .btn,
    .briefing-source-actions a,
    .lib-action-btn,
    .projects-list-item-actions .btn,
    .inline-dialog-footer .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .trigger-buttons,
    .output-tiles,
    .topics-grid,
    .selected-variants-preview-grid,
    .briefing-top-grid,
    .briefing-secondary-grid,
    .briefing-angles-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .trigger-btn,
    .output-tile {
        min-height: 96px;
        padding: 18px 14px;
    }

    .topic-card {
        padding: 16px 14px;
    }

    .topic-header,
    .topic-display-meta,
    .topic-source-row,
    .selected-variants-preview-header,
    .output-feedback-header,
    .selected-variant-preview-top,
    .source-text-option-layout,
    .source-text-inline-option,
    .briefing-header,
    .briefing-sources-collapsed,
    .projects-modal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .topic-display-meta .tdm-item,
    .selected-variant-tab,
    .finalize-variant-tab,
    .lib-variant-tab,
    .lib-length-tab,
    .image-source-tab,
    .length-tab,
    .platform-toggle {
        min-height: 44px;
    }

    .selected-variant-tabs,
    #finalize-variant-tabs,
    .lib-variant-tabs,
    .lib-length-tabs,
    .length-tabs,
    .image-source-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .selected-variant-tabs::-webkit-scrollbar,
    #finalize-variant-tabs::-webkit-scrollbar,
    .lib-variant-tabs::-webkit-scrollbar,
    .lib-length-tabs::-webkit-scrollbar,
    .length-tabs::-webkit-scrollbar,
    .image-source-tabs::-webkit-scrollbar {
        display: none;
    }

    .selected-variant-tab,
    .finalize-variant-tab,
    .lib-variant-tab,
    .lib-length-tab,
    .length-tab,
    .image-source-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .selected-variant-tab {
        min-width: 180px;
        justify-content: space-between;
    }

    .platform-selector-item,
    .platform-toggle,
    .platform-length-tabs {
        width: 100%;
        min-width: 0;
    }

    .platform-length-tabs {
        margin-left: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .copy-content,
    .output-content,
    .selected-variant-preview-text,
    .lib-content-text,
    #finalize-text-content,
    #blog-content {
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 0.9rem;
    }

    .fb-ad-card,
    .social-feed-card {
        max-width: 100%;
    }

    .fb-ad-link-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .fb-ad-cta {
        text-align: center;
    }

    .modal-overlay,
    .modal-overlay.fullscreen-modal,
    .sidebar-overlay {
        overflow: hidden;
    }

    .modal-content,
    .modal-card,
    .sidebar-panel {
        padding: 16px 12px;
        overflow-x: hidden;
    }

    .intv2-topbar {
        padding: 10px 12px;
        gap: 8px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .intv2-topbar-left {
        min-width: 0;
        flex: 1 1 100%;
    }

    .intv2-topbar h2 {
        min-width: 0;
        font-size: 0.98rem;
    }

    .intv2-topbar-summary {
        display: none;
    }

    .intv2-topbar-right {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
    }

    .intv2-search {
        min-width: 0;
        width: 100%;
    }

    .intv2-close {
        width: 44px;
        height: 44px;
    }

    .modal-card.login-card {
        width: min(100% - 20px, 420px) !important;
        padding: 24px 18px !important;
        max-height: calc(100vh - 20px) !important;
    }

    .projects-modal {
        padding: 8px;
    }

    .projects-modal-dialog {
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }

    .projects-modal-header,
    .projects-modal-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .projects-list-item {
        flex-direction: column;
        align-items: stretch;
    }

    .projects-list-item-head,
    .projects-list-item-meta {
        min-width: 0;
    }

    .projects-list-item-badge,
    .projects-list-item-id {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lib-accordion-header {
        align-items: flex-start;
        padding: 12px 14px;
    }

    .lib-acc-left,
    .lib-acc-right {
        min-width: 0;
    }

    .lib-acc-right {
        display: none;
    }

    .lib-acc-topic {
        max-width: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .lib-accordion-body-inner {
        padding: 0 14px 14px;
    }

    .lib-content-text,
    .selected-variant-preview-text {
        max-height: 320px;
    }

    .gallery-item {
        min-width: 0;
    }

    #gallery-modal .modal-card,
    #image-detail-modal .modal-card,
    #auto-prompt-modal .modal-card {
        height: 100% !important;
        max-height: 100% !important;
    }

    #gallery-modal [style*="min-width: 200px"],
    #gallery-new-folder-input,
    #modal-image-gen-grid,
    #publish-details,
    #publish-providers-list {
        min-width: 0 !important;
        width: 100%;
    }

    #gallery-modal-search,
    #gallery-modal-filter-source,
    #gallery-modal-filter-folder,
    #gallery-folder-name-input,
    #publish-schedule-datetime {
        width: 100% !important;
        min-width: 0 !important;
    }

    .finalize-wizard-progress {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .finalize-wizard-progress::-webkit-scrollbar {
        display: none;
    }

    .wiz-step {
        flex: 0 0 auto;
    }

    .wiz-connector {
        width: 14px;
        flex: 0 0 14px;
    }
}

@media (max-width: 390px) {
    header {
        padding-left: 8px;
        padding-right: 8px;
    }

    main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .card,
    .topic-briefing,
    .briefing-panel,
    .briefing-sources {
        padding-left: 12px;
        padding-right: 12px;
    }

    .project-picker {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .project-picker-label {
        display: none;
    }

    .progress-step {
        padding-left: 8px;
        padding-right: 8px;
    }

    .modal-content,
    .modal-card,
    .sidebar-panel {
        padding-left: 10px;
        padding-right: 10px;
    }
}
