#redaktionsbot {
    max-width: 1000px;
    margin: 40px auto;
    font-family: inherit;
}

#rb-dropzone {
    border: 2px dashed #999;
    border-radius: 10px;
    padding: 65px 30px;
    text-align: center;
    cursor: default;
    transition: all 0.2s ease;
    background: #fafafa;
}

#rb-dropzone strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 10px;
}

#rb-dropzone span {
    display: block;
    font-size: 16px;
}

#rb-dropzone.rb-dragover {
    border-color: #222;
    background: #f0f0f0;
    transform: scale(1.005);
}

#rb-status {
    margin-top: 25px;
}

.rb-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 16px;
}

.rb-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #bbb;
    border-top-color: #222;
    border-radius: 50%;
    animation: rb-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

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

.rb-error {
    background: #fff1f1;
    border-left: 4px solid #b00020;
    padding: 18px 20px;
    border-radius: 4px;
}

.rb-success {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.rb-info-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.rb-info-label {
    font-weight: 600;
}

.rb-info-value {
    overflow-wrap: anywhere;
}

.rb-details {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 7px;
    overflow: hidden;
}

.rb-details summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    background: #f7f7f7;
}

.rb-mailbody,
.rb-document-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    padding: 20px;
    max-height: 500px;
    overflow: auto;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;
}

#rb-result h3 {
    margin-top: 35px;
    margin-bottom: 15px;
}

.rb-image-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(210px, 1fr)
    );
    gap: 18px;
}

.rb-image-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    padding-bottom: 12px;
}

.rb-image-card img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #f4f4f4;
}

.rb-image-name {
    padding: 12px 12px 3px;
    font-weight: 600;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.rb-image-size {
    padding: 0 12px 8px;
    font-size: 12px;
    color: #777;
}

.rb-badge {
    display: inline-block;
    margin: 0 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.rb-badge-good {
    background: #e8f5e9;
    color: #22662a;
}

.rb-badge-muted {
    background: #eee;
    color: #666;
}

.rb-warning {
    margin-top: 25px;
    padding: 15px;
    background: #fff8df;
    border-left: 4px solid #c79700;
}

.rb-ready {
    margin-top: 30px;
    padding: 20px;
    background: #f2f2f2;
    border-radius: 7px;
    font-weight: 600;
}

@media (max-width: 600px) {

    #rb-dropzone {
        padding: 45px 20px;
    }

    #rb-dropzone strong {
        font-size: 23px;
    }

    .rb-info-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .rb-image-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   KI-Analyse
   ========================================================= */

.rb-ai-panel {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #222;
}

.rb-ai-panel h2,
.rb-article-panel h2 {
    margin-top: 0;
}

.rb-analysis-summary {
    font-size: 17px;
    line-height: 1.55;
}

.rb-recommendation {
    margin: 25px 0;
    padding: 24px;
    background: #f4f4f4;
    border-radius: 8px;
}

.rb-recommendation-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.rb-recommendation-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.rb-recommendation-format {
    margin-top: 3px;
    font-weight: 600;
}

.rb-recommendation-reason {
    margin-top: 12px;
    line-height: 1.5;
}

.rb-keyfacts {
    margin: 0;
    padding: 18px 25px 18px 40px;
}

.rb-keyfacts li {
    margin-bottom: 6px;
}


/* =========================================================
   Längenauswahl
   ========================================================= */

.rb-length-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rb-length-button,
.rb-custom-length button,
.rb-article-actions button {
    appearance: none;
    border: 1px solid #222;
    background: #fff;
    color: #111;
    padding: 11px 16px;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
}

.rb-length-button:hover,
.rb-custom-length button:hover,
.rb-article-actions button:hover {
    background: #eee;
}

.rb-length-recommended {
    background: #222;
    color: #fff;
}

.rb-length-recommended:hover {
    background: #444;
}

.rb-length-button:disabled,
.rb-custom-length button:disabled {
    opacity: 0.45;
    cursor: wait;
}

.rb-custom-length {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.rb-custom-length input {
    max-width: 190px;
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    font: inherit;
}

.rb-ai-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 7px;
}


/* =========================================================
   Artikel
   ========================================================= */

.rb-article-panel {
    margin-top: 45px;
    padding-top: 30px;
    border-top: 2px solid #222;
    scroll-margin-top: 40px;
}

.rb-article-text {
    display: block;
    width: 100%;
    min-height: 420px;
    resize: vertical;
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid #bbb;
    border-radius: 7px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
}

.rb-character-count {
    margin-top: 7px;
    font-size: 13px;
    color: #666;
    text-align: right;
}

.rb-article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.rb-image-notes {
    display: grid;
    gap: 10px;
}

.rb-image-note {
    padding: 14px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    line-height: 1.45;
}

@media (max-width: 600px) {

    .rb-length-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rb-length-button {
        width: 100%;
    }

    .rb-custom-length {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rb-custom-length input {
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }
}