/* === GLOBALE & BASIS-STYLES === */
#neelix-app-container {
    max-width: 1000px;
    margin: 16px auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    box-sizing: border-box;
}

h2 {
    text-align: center;
    color: #005a87;
    font-weight: 600;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ERWEITERTE KOMPASS STYLES FÜR GOOGLE AI INTEGRATION === */

/* Welcome Screen & Hero Section */
.kompass-welcome {
    text-align: center;
    padding: 40px 20px;
}

.kompass-hero {
    margin-bottom: 40px;
}

.kompass-hero h1 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #005a87, #0073aa, #00b4d8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.kompass-subtitle {
    font-size: 1.2em;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.kompass-input-section {
    max-width: 600px;
    margin: 0 auto;
}

.input-container {
    position: relative;
    margin: 20px 0 30px 0;
}

.location-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1em;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.location-input:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 8px 30px rgba(0, 90, 135, 0.15);
    transform: translateY(-2px);
}

.input-hint {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    opacity: 0.8;
}

.primary-cta {
    padding: 16px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, #005a87 0%, #0073aa 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(0, 90, 135, 0.25);
    opacity: 0.7;
    transform: scale(0.98);
}

.primary-cta.ready {
    opacity: 1;
    box-shadow: 0 8px 35px rgba(0, 90, 135, 0.35);
    transform: translateY(-2px) scale(1);
}

.primary-cta:hover:not(.ready) {
    transform: scale(0.98);
}

.primary-cta.ready:hover {
    background: linear-gradient(135deg, #004c73 0%, #005a87 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 90, 135, 0.4);
}

/* Progress Indicator */
.step-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #005a87, #0073aa);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.progress-fill.animated {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.step-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 1.05em;
}

/* Enhanced Cards */
.karten-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.karte {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.karte.modern {
    border-radius: 20px;
    padding: 30px 25px;
}

.karte::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #005a87, #0073aa);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.karte:hover::before {
    transform: scaleX(1);
}

.karte:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 90, 135, 0.15);
    border-color: #005a87;
}

.karte.modern:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 90, 135, 0.2);
}

.karte.modern.selected {
    background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%);
    border-color: #005a87;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 90, 135, 0.25);
}

.karte-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.karte h3, .karte h4 {
    color: #005a87;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.karte.modern h3 {
    font-size: 1.3em;
}

.karte p {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

.karte.modern p {
    font-size: 1em;
    line-height: 1.5;
}

.karte-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.karte-badge.popular { background: linear-gradient(45deg, #28a745, #20c997); }
.karte-badge.urgent { background: linear-gradient(45deg, #e74c3c, #c0392b); animation: urgentPulse 2s infinite; }
.karte-badge:not(.popular):not(.urgent) { background: linear-gradient(45deg, #6c757d, #495057); }

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px 10px rgba(231, 76, 60, 0); }
}

/* Advanced Loading Animation */
.advanced-loading {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.loading-hero { margin-bottom: 50px; }
.loading-icon { font-size: 4em; margin-bottom: 20px; animation: spin 3s linear infinite; }
.loading-hero h2 { color: #005a87; margin: 0 0 15px 0; font-size: 2em; }
.loading-hero p { color: #666; font-size: 1.1em; margin: 0; }

.loading-steps { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; max-width: 500px; margin-left: auto; margin-right: auto; }
.loading-step { display: flex; align-items: center; padding: 20px; background: #f8f9fa; border-radius: 15px; border-left: 4px solid #e9ecef; transition: all 0.3s ease; }
.loading-step.active { background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%); border-left-color: #0073aa; }
.loading-step.completed { background: linear-gradient(135deg, #e8f5e9 0%, #dcedc8 100%); border-left-color: #28a745; }
.step-icon { font-size: 1.5em; margin-right: 15px; min-width: 40px; }
.step-text { flex: 1; font-weight: 500; color: #333; text-align: left; }
.step-loader { width: 20px; height: 20px; border: 2px solid #e9ecef; border-top: 2px solid #0073aa; border-radius: 50%; animation: spin 1s linear infinite; display: none; }
.loading-step.active .step-loader { display: block; }
.loading-step.completed .step-icon::after { content: '✓'; color: #28a745; font-weight: bold; }

/* Google-Style Results */
.results-container { max-width: 1000px; margin: 0 auto; padding: 20px; }
.results-header { margin-bottom: 30px; border-bottom: 1px solid #e9ecef; padding-bottom: 20px; }
.results-header h1 { color: #005a87; margin: 0 0 10px 0; font-size: 2.2em; font-weight: 600; }
.results-stats { color: #666; font-size: 0.9em; }

.ai-overview { background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); border: 1px solid #e9ecef; border-radius: 15px; padding: 25px; margin-bottom: 30px; border-left: 4px solid #0073aa; }
.overview-header { margin-bottom: 15px; }
.ai-badge { background: linear-gradient(45deg, #0073aa, #005a87); color: white; padding: 6px 12px; border-radius: 20px; font-size: 0.8em; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.overview-content { font-size: 1.05em; line-height: 1.6; color: #333; }

.google-style-result { background: #ffffff; border: 1px solid #e9ecef; border-radius: 15px; margin-bottom: 25px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; opacity: 0; transform: translateY(20px); }
.google-style-result.fade-in { opacity: 1; transform: translateY(0); }
.google-style-result:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); transform: translateY(-2px); }

.result-header { padding: 25px 25px 15px 25px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); border-bottom: 1px solid #e9ecef; }
.result-title { margin: 0 0 10px 0; font-size: 1.4em; color: #005a87; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.result-number { background: linear-gradient(45deg, #005a87, #0073aa); color: white; padding: 4px 8px; border-radius: 50%; font-size: 0.8em; min-width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.result-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.verified-badge, .local-badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75em; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; color: white; }
.verified-badge { background: linear-gradient(45deg, #28a745, #20c997); }
.local-badge { background: linear-gradient(45deg, #007bff, #0056b3); }

.result-content { padding: 25px; font-size: 1.05em; line-height: 1.7; color: #333; }
.result-content p { margin: 0 0 15px 0; }
.result-content p:last-child { margin-bottom: 0; }
.result-content ul { list-style-type: none; padding-left: 0; margin: 15px 0; }
.result-content li { padding: 8px 0; border-bottom: 1px solid #f8f9fa; position: relative; padding-left: 25px; }
.result-content li::before { content: '✓'; position: absolute; left: 0; color: #28a745; font-weight: bold; }
.result-content strong { color: #005a87; font-weight: 600; }
.result-content a { color: #0073aa; text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.result-content a:hover { border-bottom-color: #0073aa; }

.ai-recommendation { background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); border: 2px solid #ffd700; border-radius: 20px; padding: 30px; margin: 30px 0; box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3); }
.recommendation-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.ai-avatar { font-size: 2em; background: linear-gradient(45deg, #ffd700, #ffed4e); border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
.recommendation-header h3 { color: #b8860b; margin: 0; font-size: 1.3em; font-weight: 600; }
.recommendation-content { font-size: 1.05em; line-height: 1.7; color: #8b4513; }

.no-results { text-align: center; padding: 60px 20px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); border-radius: 20px; border: 2px dashed #dee2e6; }
.no-results-icon { font-size: 4em; margin-bottom: 20px; opacity: 0.5; }
.no-results h3 { color: #495057; margin: 0 0 15px 0; font-size: 1.5em; }
.no-results p { color: #6c757d; margin: 0 0 30px 0; font-size: 1.1em; }
.fallback-search-btn { display: inline-block; padding: 15px 30px; background: linear-gradient(135deg, #28a745, #20c997); color: white; text-decoration: none; border-radius: 25px; font-weight: 600; transition: all 0.3s ease; }
.fallback-search-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3); }

/* Advanced Toolbox */
.advanced-toolbox { margin: 40px 0; padding: 30px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); border-radius: 20px; border: 1px solid #e9ecef; }
.advanced-toolbox-content h3 { color: #005a87; margin: 0 0 20px 0; font-size: 1.3em; text-align: center; }
.toolbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.tool-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 15px; border: 2px solid #e9ecef; border-radius: 15px; background: #ffffff; cursor: pointer; transition: all 0.3s ease; font-size: 1.5em; color: #005a87; }
.tool-btn span { font-size: 0.6em; font-weight: 500; }
.tool-btn:hover { border-color: #0073aa; background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 115, 170, 0.2); }
.tool-btn.success { border-color: #28a745; background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); color: #155724; }
.tool-btn.error { border-color: #e74c3c; background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%); color: #721c24; }

/* ======================================================================== */
/* SUCHT-KOMPASS v2.0 */
/* ======================================================================== */
.kp-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(16px, 2.2vw, 28px);
    border: 1px solid #dbeafe;
    border-radius: 24px;
    background:
        radial-gradient(1100px 420px at 100% -15%, rgba(14, 165, 233, 0.14), transparent 64%),
        radial-gradient(820px 340px at -8% -22%, rgba(56, 189, 248, 0.16), transparent 66%),
        #ffffff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.kp-fade-in {
    animation: kpFadeIn 0.3s ease-out;
}

@keyframes kpFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kp-progress {
    margin-bottom: 14px;
}

.kp-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.kp-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
    transition: width 0.3s ease;
}

.kp-progress-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #475569;
    font-size: 0.84rem;
}

.kp-summary {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kp-summary-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.kp-panel h2 {
    margin: 0 0 12px 0;
    color: #0f172a;
    text-align: left;
    font-size: clamp(1.24rem, 2vw, 1.85rem);
}

.kp-panel p {
    margin: 0;
    color: #334155;
}

.kp-hero {
    margin-bottom: 14px;
}

.kp-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0c4a6e;
    background: linear-gradient(135deg, #bae6fd 0%, #dbeafe 100%);
}

.kp-input-block {
    margin-top: 12px;
}

.kp-input-block label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
    font-size: 0.92rem;
}

.kp-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kp-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.23);
}

.kp-input.invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.kp-hint {
    margin-top: 7px;
    color: #64748b;
    font-size: 0.8rem;
}

.kp-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.kp-grid.kp-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kp-card {
    appearance: none;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(170deg, #ffffff 0%, #f8fafc 100%);
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.kp-card:hover {
    transform: translateY(-2px);
    border-color: #7dd3fc;
    box-shadow: 0 14px 26px rgba(14, 116, 144, 0.15);
}

.kp-card.selected {
    border-color: #0284c7;
    background: linear-gradient(170deg, #e0f2fe 0%, #f8fbff 100%);
}

.kp-card-icon {
    font-size: 1.3rem;
    display: inline-block;
    margin-bottom: 6px;
}

.kp-card h3 {
    margin: 0 0 6px 0;
    color: #0f172a;
    font-size: 1rem;
}

.kp-card p {
    margin: 0;
    color: #475569;
    line-height: 1.4;
    font-size: 0.88rem;
}

.kp-nav {
    margin-top: 14px;
}

.kp-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.kp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kp-btn-primary {
    margin-top: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.kp-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.kp-btn-secondary {
    color: #0f172a;
    background: #e2e8f0;
}

.kp-btn-ghost {
    color: #0c4a6e;
    background: #e0f2fe;
}

.kp-loading {
    text-align: center;
    padding: 12px 0 6px 0;
}

.kp-loading h2 {
    text-align: center;
    color: #0f172a;
    margin-bottom: 6px;
}

.kp-loading-icon {
    font-size: 2.3rem;
    margin-bottom: 6px;
    animation: kpSpin 2.5s linear infinite;
}

@keyframes kpSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.kp-load-list {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.kp-load-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    align-items: center;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 11px;
    background: #f8fafc;
}

.kp-load-item span {
    grid-row: 1 / span 2;
    font-size: 1.12rem;
}

.kp-load-item strong {
    color: #0f172a;
    font-size: 0.9rem;
}

.kp-load-item small {
    color: #64748b;
    font-size: 0.78rem;
}

.kp-load-item.active {
    border-color: #7dd3fc;
    background: #eff6ff;
}

.kp-load-item.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.kp-results-head p {
    margin-top: 6px;
    color: #475569;
}

.kp-results-grid {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.kp-result-card {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.kp-result-head {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 14px 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.kp-result-index {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%);
}

.kp-result-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.kp-result-content {
    padding: 13px 14px;
    color: #334155;
    line-height: 1.6;
}

.kp-result-content ul {
    margin: 0;
    padding-left: 1.1em;
}

.kp-result-content li {
    margin: 0.3em 0;
}

.kp-result-content a {
    color: #0369a1;
}

.kp-recommendation {
    margin-top: 14px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    padding: 13px 14px;
}

.kp-recommendation h3 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 0.96rem;
}

.kp-recommendation div {
    color: #78350f;
    line-height: 1.55;
}

.kp-error {
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff1f2;
    padding: 16px;
}

.kp-error h2 {
    text-align: left;
    margin-bottom: 8px;
    color: #991b1b;
}

.kp-error p {
    color: #7f1d1d;
}

.kp-toolbox-wrap {
    margin-top: 16px;
}

.kp-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 820px) {
    .kp-shell {
        border-radius: 18px;
        padding: 14px;
    }

    .kp-grid.kp-grid-2 {
        grid-template-columns: 1fr;
    }

    .kp-actions {
        flex-direction: column;
    }

    .kp-btn {
        width: 100%;
    }
}

/* === BUTTONS & WERKZEUGLEISTE === */
.senden-button, .weiter-button, .abschluss-button, .speichern-button, 
.notfallplan-erstellen-button, .werkzeug-button {
    background: linear-gradient(135deg, #005a87 0%, #0073aa 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(0, 90, 135, 0.2);
}

.senden-button:hover, .weiter-button:hover, .abschluss-button:hover,
.speichern-button:hover, .notfallplan-erstellen-button:hover, .werkzeug-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 90, 135, 0.3);
    background: linear-gradient(135deg, #004c73 0%, #005a87 100%);
}

.senden-button:disabled, .weiter-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-button {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: 20px;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.werkzeug-leiste {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border-top: 1px solid #e9ecef;
}

/* === DIALOG/TRAINER/ANKER INTERFACE === */
.dialog-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}
.dialog-nachricht {
    padding: 15px 20px;
    border-radius: 18px;
    margin-bottom: 15px;
    max-width: 85%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: messageSlideIn 0.3s ease-out;
}
@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.ki-nachricht {
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    margin-right: auto;
    border-bottom-left-radius: 4px;
    color: #2e7d32;
}
.nutzer-nachricht {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    margin-left: auto;
    border-bottom-right-radius: 4px;
    color: #1565c0;
}
textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95em;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}
textarea:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 90, 135, 0.1);
}
.consent-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}
.consent-container input[type="checkbox"] { margin-top: 4px; transform: scale(1.2); }
.consent-container label { font-size: 0.9em; line-height: 1.4; color: #555; }
.consent-container a { color: #005a87; text-decoration: none; }
.consent-container a:hover { text-decoration: underline; }

/* === FORTSCHRITTSBALKEN & MEHRSTUFIGE TOOLS === */
.fortschritt-container { margin: 30px 0; text-align: center; }
.progress-bar { width: 100%; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-bar-inner { height: 100%; background: linear-gradient(90deg, #005a87, #0073aa); transition: width 0.5s ease; }
.fortschritt-text { font-size: 0.9em; color: #666; font-weight: 500; }

.schritt { display: none; animation: fadeIn 0.5s ease-in; }
.schritt.aktiv { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === NOTFALLPLAN & CRAFT INTERFACE === */
.notfallplan-interface, .craft-interface, .emotionen-interface, .tages-anker-form, .akut-anker-step, .akut-anker-intro, .akut-anker-result {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}
.form-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #0073aa;
}
.form-section h3 { color: #005a87; margin-top: 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 15px 0; }
.checkbox-grid label { display: flex; align-items: center; padding: 10px; background: #f8f9fa; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.checkbox-grid label:hover { background: #e9ecef; }
.checkbox-grid input[type="checkbox"] { margin-right: 8px; transform: scale(1.1); }

/* ======================================================================== */
/* GLOBAL CHAT UI SYSTEM v4 (Desktop + Mobile)                              */
/* Einheitlicher Messenger-Look fuer alle KI-Chatmodule                     */
/* ======================================================================== */

/* Chat headers: avatar + status */
.cc-chat-head > div:first-child,
.rk-chat-head > div:first-child,
.dt-chat-header > div:first-child {
    position: relative;
    min-width: 0;
    padding-left: 48px;
}

.cc-chat-head > div:first-child::before,
.rk-chat-head > div:first-child::before,
.dt-chat-header > div:first-child::before {
    position: absolute;
    left: 0;
    top: 1px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    content: "💬";
}

.cc-chat-head > div:first-child::before {
    content: "🧠";
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.rk-chat-head > div:first-child::before {
    content: "🔄";
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.dt-chat-header > div:first-child::before {
    content: "💬";
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.cc-chat-head > div:first-child::after,
.rk-chat-head > div:first-child::after,
.dt-chat-header > div:first-child::after {
    content: "● Online";
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
}

/* Chat panels */
.cc-chat,
.rk-chat,
.rr-chat,
.dt-chat.dialog-container {
    border-radius: 22px;
    border: 1px solid #dbeafe;
    background:
        radial-gradient(circle at 16% 20%, rgba(186, 230, 253, 0.30), transparent 38%),
        radial-gradient(circle at 84% 78%, rgba(233, 213, 255, 0.23), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Message layout + pseudo avatars */
.cc-msg,
.rk-msg,
.rr-msg {
    position: relative;
    padding-left: 34px;
}

.cc-user,
.rk-user,
.rr-user {
    padding-left: 0;
    padding-right: 34px;
}

.cc-msg::before,
.rk-msg::before,
.rr-msg::before,
.dt-chat .dialog-nachricht::before {
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
    content: "AI";
}

.cc-msg::before { content: "🧠"; }
.rk-msg::before { content: "🔄"; }
.rr-msg::before { content: "📝"; }
.dt-chat .dialog-nachricht::before { content: "💬"; }

.cc-user::before,
.rk-user::before,
.rr-user::before,
.dt-chat .dialog-nachricht.nutzer-nachricht::before {
    left: auto;
    right: 0;
    content: "DU";
    color: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.65);
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.dt-chat .dialog-nachricht {
    position: relative;
    padding-left: 34px;
}

.dt-chat .dialog-nachricht.nutzer-nachricht {
    padding-left: 15px;
    padding-right: 34px;
}

/* Message time pills */
.cc-time,
.rk-time,
.rr-msg-head,
.dt-msg-time {
    margin-bottom: 5px;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.58);
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    padding: 2px 8px;
}

.cc-user .cc-time,
.rk-user .rk-time,
.rr-user .rr-msg-head {
    margin-left: auto;
}

/* Bubble polish */
.cc-body,
.rk-body,
.rr-msg-body {
    position: relative;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.cc-user .cc-body,
.rk-user .rk-body,
.rr-user .rr-msg-body {
    border-bottom-right-radius: 4px;
}

.cc-ai .cc-body,
.rk-ai .rk-body,
.rr-ai .rr-msg-body {
    border-bottom-left-radius: 4px;
}

.cc-user .cc-body::after,
.rk-user .rk-body::after,
.rr-user .rr-msg-body::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
}

.cc-user .cc-body::after { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.rk-user .rk-body::after { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.rr-user .rr-msg-body::after { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }

.cc-ai .cc-body::after,
.rk-ai .rk-body::after,
.rr-ai .rr-msg-body::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
}

.cc-ai .cc-body::after { background: rgba(255, 255, 255, 0.96); }
.rk-ai .rk-body::after { background: rgba(255, 255, 255, 0.96); }
.rr-ai .rr-msg-body::after { background: #ffffff; }

/* Prompt chips: no horizontal swipe */
.cc-chip-row,
.rk-chip-row,
.rr-quick-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cc-chip,
.rk-chip,
.rr-chip {
    width: 100%;
    text-align: left;
    min-height: 40px;
    border-radius: 14px;
    line-height: 1.35;
}

/* Composer style */
.cc-input-wrap,
.rk-input-wrap,
.rr-input-wrap,
.dt-input-wrap {
    border-radius: 18px;
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

#cc-send,
#rk-send,
#rr-send,
#dt-send {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#cc-send::before,
#rk-send::before,
#rr-send::before,
#dt-send::before {
    content: "➤";
    font-size: 1.02rem;
    line-height: 1;
    transform: translateX(1px);
}

/* Mobile refinements */
@media (max-width: 780px) {
    .cc-shell,
    .rk-shell,
    .rr-shell,
    .dt-shell {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .cc-chat-head > div:first-child,
    .rk-chat-head > div:first-child,
    .dt-chat-header > div:first-child {
        padding-left: 42px;
    }

    .cc-chat-head > div:first-child::before,
    .rk-chat-head > div:first-child::before,
    .dt-chat-header > div:first-child::before {
        width: 34px;
        height: 34px;
        font-size: 0.86rem;
    }

    .cc-chat-head > div:first-child::after,
    .rk-chat-head > div:first-child::after,
    .dt-chat-header > div:first-child::after {
        font-size: 0.62rem;
        padding: 2px 7px;
    }

    .cc-chat,
    .rk-chat,
    .rr-chat,
    .dt-chat.dialog-container {
        min-height: 50vh;
        max-height: 58vh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 12px 10px;
    }

    .cc-msg,
    .rk-msg,
    .rr-msg {
        width: 90%;
        padding-left: 30px;
    }

    .cc-user,
    .rk-user,
    .rr-user {
        padding-right: 30px;
    }

    .dt-chat .dialog-nachricht {
        padding-left: 30px;
    }

    .dt-chat .dialog-nachricht.nutzer-nachricht {
        padding-right: 30px;
    }

    .cc-msg::before,
    .rk-msg::before,
    .rr-msg::before,
    .dt-chat .dialog-nachricht::before {
        width: 23px;
        height: 23px;
        font-size: 0.58rem;
    }

    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #cc-send,
    #rk-send,
    #rr-send,
    #dt-send {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 430px) {
    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================== */
/* CRAVING-COACH v1.0 */
/* ======================================================================== */
.cc-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(16px, 2.2vw, 28px);
    border-radius: 24px;
    border: 1px solid #ddd6fe;
    background:
        radial-gradient(980px 360px at 100% -18%, rgba(139, 92, 246, 0.16), transparent 64%),
        radial-gradient(760px 310px at -8% -20%, rgba(6, 182, 212, 0.12), transparent 66%),
        #ffffff;
    box-shadow: 0 22px 44px rgba(76, 29, 149, 0.10);
}

.cc-fade-in {
    animation: ccFadeUp 0.3s ease-out;
}

@keyframes ccFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cc-hero h2 { margin: 0; color: #1e1b4b; text-align: left; }
.cc-hero p { margin: 6px 0 0 0; color: #475569; }

.cc-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4c1d95;
    background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%);
}

.cc-consent {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #d8b4fe;
    border-radius: 14px;
    padding: 11px 12px;
    background: rgba(245, 243, 255, 0.7);
}

.cc-consent input[type="checkbox"] { margin-top: 2px; transform: scale(1.1); }
.cc-consent label { margin: 0; color: #475569; font-size: 0.9rem; }
.cc-consent a { color: #5b21b6; }

.cc-grid {
    margin-top: 13px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.cc-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    padding: 10px;
    background: #faf5ff;
}

.cc-grid label span { font-size: 0.82rem; color: #5b21b6; font-weight: 700; }
.cc-grid strong { color: #1e1b4b; }
.cc-grid input[type="range"] { width: 100%; }

.cc-grid select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 10px;
    font: inherit;
    box-sizing: border-box;
}

.cc-grid select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.cc-chat-head {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cc-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    color: #7c3aed;
    margin-bottom: 4px;
}

.cc-chat-head h3 {
    margin: 0;
    color: #1e1b4b;
    font-size: clamp(1.2rem, 2.1vw, 1.55rem);
}

.cc-chat-head p {
    margin: 5px 0 0 0;
    color: #475569;
}

.cc-chat {
    border-radius: 16px;
    border: 1px solid #ddd6fe;
    background: linear-gradient(180deg, #faf5ff 0%, #f8fafc 100%);
    min-height: 320px;
    max-height: 560px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-msg { width: min(88%, 690px); }
.cc-user { align-self: flex-end; }
.cc-ai { align-self: flex-start; }

.cc-time { margin-bottom: 4px; font-size: 0.75rem; color: #64748b; }

.cc-body {
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.5;
    box-shadow: 0 3px 10px rgba(30, 27, 75, 0.08);
}

.cc-user .cc-body {
    color: #ffffff;
    border-bottom-right-radius: 5px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.cc-ai .cc-body {
    color: #1f2937;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
    background: #ffffff;
}

.cc-typing .cc-body {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}

.cc-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8;
    animation: ccDotPulse 1.1s ease-in-out infinite;
}

.cc-dot:nth-child(2) { animation-delay: 0.15s; }
.cc-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes ccDotPulse {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.cc-chip-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-chip {
    border: 1px solid #d8b4fe;
    border-radius: 999px;
    background: #faf5ff;
    color: #4c1d95;
    padding: 6px 12px;
    font-size: 0.83rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cc-chip:hover {
    border-color: #a78bfa;
    transform: translateY(-1px);
}

.cc-input-wrap {
    margin-top: 12px;
    border: 1px solid #ddd6fe;
    border-radius: 15px;
    background: #ffffff;
    padding: 10px;
}

.cc-input {
    display: block;
    width: 100%;
    min-height: 104px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.cc-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.cc-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.cc-hint { font-size: 0.76rem; color: #64748b; }

.cc-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.cc-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cc-btn-primary { color: #fff; background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); box-shadow: 0 10px 22px rgba(109, 40, 217, 0.25); }
.cc-btn-secondary { color: #1f2937; background: #e2e8f0; }

/* ======================================================================== */
/* RUECKFALL-KOMPASS v1.0 */
/* ======================================================================== */
.rk-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(16px, 2.2vw, 28px);
    border-radius: 24px;
    border: 1px solid #fecaca;
    background:
        radial-gradient(980px 360px at 100% -18%, rgba(239, 68, 68, 0.14), transparent 64%),
        radial-gradient(760px 310px at -8% -20%, rgba(245, 158, 11, 0.10), transparent 66%),
        #ffffff;
    box-shadow: 0 22px 44px rgba(127, 29, 29, 0.08);
}

.rk-fade-in { animation: rkFadeUp 0.3s ease-out; }
@keyframes rkFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.rk-hero h2 { margin: 0; color: #7f1d1d; text-align: left; }
.rk-hero p { margin: 6px 0 0 0; color: #475569; }

.rk-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #991b1b;
    background: linear-gradient(135deg, #fee2e2 0%, #ffedd5 100%);
}

.rk-consent {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 11px 12px;
    background: #fff7ed;
}

.rk-consent input[type="checkbox"] { margin-top: 2px; transform: scale(1.1); }
.rk-consent label { margin: 0; color: #475569; font-size: 0.9rem; }
.rk-consent a { color: #991b1b; }

.rk-grid {
    margin-top: 13px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rk-card {
    appearance: none;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: linear-gradient(170deg, #ffffff 0%, #fff7ed 100%);
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rk-card:hover {
    transform: translateY(-2px);
    border-color: #fca5a5;
    box-shadow: 0 12px 24px rgba(127, 29, 29, 0.12);
}

.rk-card.active {
    border-color: #ef4444;
    background: linear-gradient(170deg, #fee2e2 0%, #fff7ed 100%);
}

.rk-icon { font-size: 1.26rem; display: inline-block; margin-bottom: 6px; }
.rk-card h3 { margin: 0 0 6px 0; color: #7f1d1d; font-size: 1rem; }
.rk-card p { margin: 0; color: #475569; font-size: 0.88rem; line-height: 1.42; }

.rk-inline-form {
    margin-top: 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rk-inline-form label { font-size: 0.85rem; color: #7f1d1d; font-weight: 700; }

.rk-inline-form input {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 10px;
    font: inherit;
    box-sizing: border-box;
}

.rk-inline-form input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.17);
}

.rk-chat-head {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.rk-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    color: #b91c1c;
    margin-bottom: 4px;
}

.rk-chat-head h3 { margin: 0; color: #7f1d1d; font-size: clamp(1.2rem, 2.1vw, 1.55rem); }
.rk-chat-head p { margin: 5px 0 0 0; color: #475569; }

.rk-chat {
    border-radius: 16px;
    border: 1px solid #fecaca;
    background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 100%);
    min-height: 320px;
    max-height: 560px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rk-msg { width: min(88%, 690px); }
.rk-user { align-self: flex-end; }
.rk-ai { align-self: flex-start; }
.rk-time { margin-bottom: 4px; font-size: 0.75rem; color: #64748b; }

.rk-body {
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.5;
    box-shadow: 0 3px 10px rgba(127, 29, 29, 0.08);
}

.rk-user .rk-body {
    color: #ffffff;
    border-bottom-right-radius: 5px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.rk-ai .rk-body {
    color: #1f2937;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
    background: #ffffff;
}

.rk-typing .rk-body {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}

.rk-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8;
    animation: rkDotPulse 1.1s ease-in-out infinite;
}

.rk-dot:nth-child(2) { animation-delay: 0.15s; }
.rk-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes rkDotPulse {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.rk-chip-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rk-chip {
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff1f2;
    color: #991b1b;
    padding: 6px 12px;
    font-size: 0.83rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rk-chip:hover {
    border-color: #f87171;
    transform: translateY(-1px);
}

.rk-input-wrap {
    margin-top: 12px;
    border: 1px solid #fecaca;
    border-radius: 15px;
    background: #ffffff;
    padding: 10px;
}

.rk-input {
    display: block;
    width: 100%;
    min-height: 104px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.rk-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.rk-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.rk-hint { font-size: 0.76rem; color: #64748b; }

.rk-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.rk-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.rk-btn-primary { color: #fff; background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); box-shadow: 0 10px 22px rgba(185, 28, 28, 0.25); }
.rk-btn-secondary { color: #1f2937; background: #e2e8f0; }

@media (max-width: 860px) {
    .cc-grid, .rk-grid {
        grid-template-columns: 1fr;
    }
    .cc-actions, .rk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .cc-btn, .rk-btn {
        width: 100%;
    }
}

/* === ANKER FUER ANGEHOERIGE (V2) === */
.af-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(18px, 2.4vw, 30px);
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    background:
        radial-gradient(1200px 420px at 100% -10%, rgba(56, 189, 248, 0.18), transparent 62%),
        radial-gradient(900px 360px at -10% -30%, rgba(236, 72, 153, 0.14), transparent 65%),
        #ffffff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.af-fade-in {
    animation: af-fade-up 0.34s ease-out;
}

@keyframes af-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.af-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.15;
}

.af-hero p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
}

.af-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    background: linear-gradient(135deg, #fbcfe8 0%, #bae6fd 100%);
}

.af-consent {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: rgba(248, 250, 252, 0.9);
}

.af-consent input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
}

.af-consent label {
    margin: 0;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.af-consent a {
    color: #0369a1;
    text-decoration: underline;
}

.af-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 13px;
}

.af-card {
    appearance: none;
    width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.af-card:hover {
    transform: translateY(-2px);
    border-color: #7dd3fc;
    box-shadow: 0 14px 28px rgba(14, 116, 144, 0.14);
}

.af-card.disabled {
    opacity: 0.48;
    pointer-events: none;
    filter: grayscale(0.12);
}

.af-card.af-new::after {
    content: "Neu";
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #831843;
    background: #fce7f3;
}

.af-card-icon {
    font-size: 1.24rem;
}

.af-card strong,
.af-card h3 {
    display: block;
    margin: 8px 0 0 0;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
}

.af-card span,
.af-card p {
    display: block;
    margin: 6px 0 0 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.4;
}

.af-card p {
    max-width: 46ch;
}

.af-chat-header {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.af-chat-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.af-head-main {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.af-head-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.af-head-meta p {
    margin: 4px 0 0 0;
    color: #64748b;
}

.af-head-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.af-head-avatar-trainer {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.26);
}

.af-head-status {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    padding: 3px 9px;
}

.af-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.af-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    color: #0369a1;
    margin-bottom: 4px;
}

.af-chat {
    border-radius: 22px;
    border: 1px solid #dbeafe;
    background:
        radial-gradient(circle at 18% 22%, rgba(186, 230, 253, 0.38), transparent 38%),
        radial-gradient(circle at 88% 74%, rgba(233, 213, 255, 0.28), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    min-height: 320px;
    max-height: 560px;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.af-msg {
    width: min(84%, 680px);
    display: flex;
    flex-direction: column;
}

.af-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.af-msg-user {
    align-self: flex-end;
    align-items: flex-end;
}

.af-msg-ai {
    align-self: flex-start;
    align-items: flex-start;
}

.af-msg-user .af-msg-row {
    flex-direction: row-reverse;
}

.af-msg-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.af-msg-user .af-msg-stack {
    align-items: flex-end;
}

.af-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.af-avatar-ai {
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
}

.af-avatar-user {
    color: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.65);
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.af-msg-time {
    margin-bottom: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.69rem;
    letter-spacing: 0.02em;
    color: #64748b;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(203, 213, 225, 0.58);
}

.af-msg-body {
    position: relative;
    padding: 11px 13px;
    border-radius: 16px;
    line-height: 1.5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(2px);
}

.af-msg-user .af-msg-body {
    color: #ffffff;
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.af-msg-user .af-msg-body::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
}

.af-msg-ai .af-msg-body {
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    background: rgba(255, 255, 255, 0.96);
}

.af-msg-ai .af-msg-body::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e2e8f0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
}

.af-typing .af-msg-body {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}

.af-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #94a3b8;
    animation: af-dot-bounce 1.1s ease-in-out infinite;
}

.af-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.af-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes af-dot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.af-chip-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.af-chip {
    width: 100%;
    min-height: 42px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    border-radius: 14px;
    padding: 9px 11px;
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: all 0.17s ease;
}

.af-chip:hover {
    border-color: #93c5fd;
    color: #1e3a8a;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    transform: translateY(-1px);
}

.af-input-wrap {
    margin-top: 12px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    padding: 10px;
}

.af-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.af-compose .af-input {
    margin: 0;
    flex: 1 1 auto;
}

.af-input {
    display: block;
    width: 100%;
    min-height: 110px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.af-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.af-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.af-hint {
    font-size: 0.76rem;
    color: #64748b;
}

.af-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.af-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.af-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.af-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.af-send-round {
    width: 46px;
    height: 46px;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.af-send-icon {
    font-size: 1.02rem;
    line-height: 1;
    transform: translateX(1px);
}

.af-btn-secondary {
    color: #0f172a;
    background: #e2e8f0;
}

.af-btn-ghost {
    color: #0c4a6e;
    background: #e0f2fe;
}

.af-feedback-card {
    margin-top: 14px;
    border: 1px solid #fbcfe8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff1f6 0%, #ffffff 95%);
    padding: 14px;
}

.af-feedback-card h4 {
    margin: 0 0 10px 0;
    color: #831843;
}

.af-feedback-content {
    color: #334155;
    line-height: 1.5;
}

.af-feedback-content h3,
.af-feedback-content h4 {
    color: #0f172a;
}

.af-feedback-content ul {
    margin: 0.4em 0 0.8em 1.1em;
}

.af-feedback-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.af-form-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.af-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
}

.af-form-grid textarea {
    min-height: 120px;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.af-form-grid textarea:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

#af-np-result {
    margin-top: 12px;
}

.af-error {
    margin-top: 10px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 11px 12px;
    color: #991b1b;
    background: #fff1f2;
}

/* ── Mobile App-like overhaul ── */
@media (max-width: 780px) {
    #neelix-app-container {
        margin: 0;
        padding: 0;
        border-radius: 0;
    }

    .af-shell {
        border-radius: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: #ffffff;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .af-hero {
        padding: 20px 16px 16px;
    }

    .af-hero h2 {
        font-size: 1.4rem;
    }

    .af-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .af-consent {
        margin: 12px 16px;
        padding: 12px;
        border-radius: 12px;
    }

    .af-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 12px;
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    .af-card {
        padding: 14px 12px;
        border-radius: 14px;
        box-sizing: border-box;
        overflow: hidden;
        word-break: break-word;
        min-width: 0;
    }

    .af-card-icon {
        font-size: 1.5rem;
    }

    .af-card strong,
    .af-card h3 {
        font-size: 0.88rem;
        margin-top: 6px;
    }

    .af-card span,
    .af-card p {
        font-size: 0.78rem;
        line-height: 1.35;
        margin-top: 4px;
    }

    /* Chat: vollbild-artig */
    .af-chat-header {
        flex-direction: row;
        align-items: center;
        padding: 12px 16px;
        margin-bottom: 0;
        background: #fff;
        border-bottom: 1px solid #f1f5f9;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .af-chat-header h3 {
        font-size: 1.1rem;
    }

    .af-head-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .af-kicker {
        font-size: 0.68rem;
    }

    .af-head-status {
        font-size: 0.64rem;
        padding: 2px 7px;
    }

    .af-status-dot {
        width: 7px;
        height: 7px;
    }

.af-chat {
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: 50vh;
        max-height: 58vh;
        padding: 12px 10px;
        background:
            radial-gradient(circle at 15% 18%, rgba(186, 230, 253, 0.28), transparent 40%),
            radial-gradient(circle at 85% 80%, rgba(233, 213, 255, 0.24), transparent 35%),
            #f5f9ff;
        box-sizing: border-box;
    }

    .af-msg {
        width: 89%;
    }

    .af-msg-row {
        gap: 6px;
    }

    .af-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .af-msg-body {
        padding: 10px 13px;
        border-radius: 18px;
        font-size: 0.92rem;
        box-shadow: 0 4px 11px rgba(0, 0, 0, 0.07);
    }

    .af-msg-user .af-msg-body {
        border-bottom-right-radius: 6px;
    }

    .af-msg-ai .af-msg-body {
        border-bottom-left-radius: 6px;
    }

    .af-msg-time {
        font-size: 0.66rem;
    }

    .af-chip-row {
        padding: 8px 12px 2px;
        margin-top: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        box-sizing: border-box;
        width: 100%;
    }

    .af-chip {
        min-height: 40px;
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    /* Input: iOS/Android Messenger Style */
    .af-input-wrap {
        margin: 0;
        border: none;
        border-top: 1px solid #e2e8f0;
        border-radius: 0;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        background: #fff;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }

    .af-input {
        min-height: 44px;
        max-height: 120px;
        padding: 10px 13px;
        border-radius: 22px;
        font-size: 0.95rem;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
    }

    .af-actions {
        flex-direction: row;
        margin-top: 8px;
        justify-content: space-between;
    }

    .af-hint {
        display: none;
    }

    .af-btn {
        width: auto;
        padding: 10px 16px;
        font-size: 0.82rem;
    }

    .af-send-round {
        width: 42px;
        height: 42px;
        padding: 0;
        font-size: 0.9rem;
    }

    .af-btn-primary {
        box-shadow: none;
    }

    .af-form-grid {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }

    .af-feedback-card {
        margin: 10px 12px;
        border-radius: 14px;
    }

    .af-feedback-actions {
        flex-direction: column;
    }

    .af-feedback-actions .af-btn {
        width: 100%;
    }

    .af-error {
        margin: 10px 12px;
    }
}

@media (max-width: 430px) {
    .af-chip-row {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================== */
/* AKUT-ANKER v2.0 — Modernes UI */
/* ======================================================================== */
.aa-container {
    --aa-blue: #1d4ed8;
    --aa-blue-dark: #1e40af;
    --aa-slate: #0f172a;
    --aa-slate-soft: #334155;
    --aa-bg: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
    max-width: 880px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #dbe3f0;
    background: var(--aa-bg);
    box-shadow: 0 18px 44px rgba(29, 78, 216, 0.10);
}

.aa-fade-in {
    animation: aaFadeIn 0.35s ease-out;
}

@keyframes aaFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aa-hero {
    text-align: center;
    margin-bottom: 20px;
}

.aa-hero-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.aa-hero-title {
    margin: 0 0 4px;
    color: var(--aa-slate);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 800;
}

.aa-hero-sub {
    margin: 0;
    color: var(--aa-slate-soft);
    font-size: 1rem;
}

.aa-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.aa-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d7def0;
    background: #fff;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
}

.aa-feature-icon {
    font-size: 1.05rem;
}

.aa-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #d7def0;
    background: rgba(255, 255, 255, 0.95);
    color: #334155;
}

.aa-consent input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.15);
}

.aa-consent label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.aa-consent a {
    color: var(--aa-blue);
    text-decoration: underline;
}

.aa-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.aa-btn:hover {
    transform: translateY(-1px);
}

.aa-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.aa-btn-primary {
    width: 100%;
    color: #fff;
    background: linear-gradient(135deg, var(--aa-blue), var(--aa-blue-dark));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.aa-btn-primary:hover {
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.aa-btn-secondary {
    color: #1e293b;
    background: #e2e8f0;
}

.aa-btn-outline {
    color: var(--aa-blue-dark);
    border: 1px solid #c7d2fe;
    background: #eef2ff;
}

.aa-progress {
    margin-bottom: 16px;
}

.aa-progress-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}

.aa-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.35s ease;
}

.aa-progress-text {
    margin-top: 6px;
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.aa-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #d7def0;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.aa-card-title {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

.aa-card-sub {
    margin: 0 0 14px;
    color: #475569;
}

.aa-slider-wrap {
    display: grid;
    gap: 12px;
}

.aa-slider-value {
    margin: 0 auto;
    min-width: 150px;
    text-align: center;
    border-radius: 14px;
    padding: 10px 14px;
}

.aa-val-num {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
}

.aa-val-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.95;
}

.aa-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #f59e0b, #ef4444);
}

.aa-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #1e293b;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.aa-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #1e293b;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.aa-slider-labels {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.aa-loading {
    padding: 8px 0;
}

.aa-pulse {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 4px solid rgba(59, 130, 246, 0.18);
    border-top-color: #2563eb;
    animation: aaSpin 1s linear infinite;
}

@keyframes aaSpin {
    to {
        transform: rotate(360deg);
    }
}

.aa-loading-text {
    color: #334155;
    font-weight: 600;
}

.aa-skill-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.aa-skill-badge,
.aa-skill-level {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d7def0;
    background: #fff;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 700;
}

.aa-skill-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #d7def0;
    background: #fff;
    color: #0f172a;
}

.aa-skill-card p:first-child {
    margin-top: 0;
}

.aa-skill-card p:last-child {
    margin-bottom: 0;
}

.akut-anker-actions,
.aa-action-fallback {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aa-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.aa-compare-before,
.aa-compare-after {
    display: grid;
    gap: 6px;
    justify-items: center;
}

.aa-compare-label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 700;
}

.aa-compare-arrow {
    color: #64748b;
    font-weight: 700;
}

.aa-compare-val {
    min-width: 46px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aa-check-actions,
.aa-nochange-options,
.aa-breath-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.aa-nochange-options {
    grid-template-columns: 1fr;
}

.aa-breath-wrap {
    margin: 18px auto 10px;
    width: 200px;
    height: 200px;
    position: relative;
    display: grid;
    place-items: center;
}

.aa-breath-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #60a5fa;
    transition: transform 4s ease, background 0.3s ease;
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.25);
}

.aa-breath-text {
    position: absolute;
    text-align: center;
    font-weight: 800;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 4px 10px;
    backdrop-filter: blur(4px);
}

.aa-success {
    text-align: center;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #d7def0;
    background: #fff;
}

.aa-success-icon {
    font-size: 2.6rem;
    margin-bottom: 4px;
}

.aa-success-title {
    margin: 0 0 6px;
    color: #0f172a;
}

.aa-success-text {
    margin: 0 auto 14px;
    max-width: 640px;
    color: #334155;
}

.aa-success-visual {
    margin: 0 auto 12px;
    max-width: 560px;
    display: grid;
    gap: 6px;
}

.aa-bar-before,
.aa-bar-after {
    min-height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    color: #fff;
    font-size: 0.83rem;
    font-weight: 700;
}

.aa-success-stats {
    margin: 10px 0 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.aa-stat {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 8px;
}

.aa-stat-val {
    display: block;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
}

.aa-stat-label {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .aa-container {
        padding: 16px;
        border-radius: 18px;
    }
    .aa-features {
        grid-template-columns: 1fr;
    }
    .aa-skill-header {
        flex-direction: column;
        align-items: stretch;
    }
    .akut-anker-actions,
    .aa-action-fallback,
    .aa-check-actions,
    .aa-breath-actions {
        grid-template-columns: 1fr;
    }
    .aa-success-stats {
        grid-template-columns: 1fr;
    }
    .aa-breath-wrap {
        width: 170px;
        height: 170px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aa-fade-in,
    .aa-pulse,
    .aa-btn,
    .aa-progress-fill,
    .aa-breath-circle {
        animation: none !important;
        transition: none !important;
    }
}

/* ======================================================================== */
/* REFLEXIONSRAUM v2.0 */
/* ======================================================================== */
.rr-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #dbe3f0;
    background: radial-gradient(circle at 0% 0%, #eef4ff 0%, #f8fbff 40%, #ffffff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.rr-fade-in {
    animation: rrFadeIn 0.35s ease-out;
}

@keyframes rrFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rr-hero {
    margin-bottom: 14px;
}

.rr-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.rr-title {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: clamp(1.4rem, 2.7vw, 1.95rem);
    font-weight: 800;
}

.rr-subtitle {
    margin: 0;
    color: #475569;
    max-width: 740px;
}

.rr-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.rr-chat {
    min-height: 340px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dbe3f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    padding: 14px;
    margin-bottom: 12px;
}

.rr-msg {
    max-width: 88%;
    margin-bottom: 10px;
}

.rr-msg-head {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

.rr-msg-body {
    border-radius: 14px;
    padding: 10px 12px;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    word-wrap: break-word;
}

.rr-ai {
    margin-right: auto;
}

.rr-ai .rr-msg-body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.rr-user {
    margin-left: auto;
}

.rr-user .rr-msg-head {
    text-align: right;
}

.rr-user .rr-msg-body {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #312e81;
    border: 1px solid #c7d2fe;
}

.rr-typing .rr-msg-body {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rr-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0284c7;
    display: inline-block;
    animation: rrBlink 1.2s infinite ease-in-out;
}

.rr-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.rr-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes rrBlink {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

.rr-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.rr-chip {
    border: 1px solid #dbe3f0;
    background: #ffffff;
    color: #334155;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rr-chip:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
    color: #075985;
}

.rr-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rr-input-wrap {
    border: 1px solid #dbe3f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px;
}

.rr-input {
    width: 100%;
    min-height: 120px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.96rem;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.rr-input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.rr-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.rr-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 70%;
    color: #475569;
    font-size: 0.82rem;
}

.rr-consent input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
}

.rr-consent label {
    line-height: 1.35;
}

.rr-consent a {
    color: #1d4ed8;
    text-decoration: underline;
}

.rr-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.rr-hint {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

.rr-send {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    transition: all 0.2s ease;
}

.rr-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.rr-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rr-shell .werkzeug-leiste-container {
    margin-top: 14px;
}

@media (max-width: 768px) {
    .rr-shell {
        padding: 16px;
        border-radius: 18px;
    }
    .rr-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .rr-chat {
        min-height: 280px;
        padding: 10px;
    }
    .rr-msg {
        max-width: 95%;
    }
    .rr-input-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .rr-consent {
        max-width: 100%;
    }
    .rr-actions {
        justify-items: stretch;
    }
    .rr-send {
        width: 100%;
    }
}

/* ======================================================================== */
/* DIALOG-TRAINER v2.0 */
/* ======================================================================== */
.dt-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(170deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.08);
}

.dt-fade-in {
    animation: dtFadeIn 0.35s ease-out;
}

@keyframes dtFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dt-hero h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.9vw, 2.05rem);
    font-weight: 800;
}

.dt-hero p {
    margin: 0;
    color: #475569;
    max-width: 760px;
}

.dt-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    margin-bottom: 10px;
}

.dt-consent {
    margin: 14px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.dt-consent input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.12);
}

.dt-consent label {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.35;
}

.dt-consent a {
    color: #1d4ed8;
    text-decoration: underline;
}

.dt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dt-card {
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    padding: 14px;
    transition: all 0.2s ease;
}

.dt-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.dt-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dt-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dt-card-icon {
    font-size: 1.35rem;
}

.dt-card-level {
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
}

.dt-card-title {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 1rem;
}

.dt-card-desc {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.35;
}

.dt-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.dt-chat-kicker {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dt-chat-title {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

.dt-chat-meta {
    display: grid;
    gap: 4px;
    text-align: right;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.dt-chat {
    min-height: 320px;
    border-radius: 16px;
}

.dt-user {
    border: 1px solid #c7d2fe;
}

.dt-ai {
    border: 1px solid #bfdbfe;
}

.dt-msg-time {
    font-size: 0.72rem;
    margin-bottom: 5px;
    color: #475569;
    font-weight: 700;
    opacity: 0.9;
}

.dt-input-wrap {
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
}

.dt-input {
    width: 100%;
    min-height: 110px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
}

.dt-input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.dt-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.dt-btn {
    border: 0;
    border-radius: 11px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dt-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.dt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.dt-btn-secondary {
    color: #1e293b;
    background: #e2e8f0;
}

.dt-btn-ghost {
    color: #0f172a;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
}

.dt-typing .dt-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0284c7;
    display: inline-block;
    margin-right: 5px;
    animation: dtBlink 1.2s infinite ease-in-out;
}

.dt-typing .dt-dot:nth-child(2) { animation-delay: 0.15s; }
.dt-typing .dt-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes dtBlink {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

#dt-feedback-box {
    margin-top: 12px;
}

.dt-feedback-card {
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    padding: 14px;
}

.dt-feedback-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.05rem;
}

.dt-feedback-content {
    color: #1e293b;
    line-height: 1.45;
}

.dt-feedback-content h3 {
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.dt-feedback-content ul {
    margin-top: 0;
    margin-bottom: 8px;
}

.dt-feedback-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .dt-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dt-shell {
        padding: 16px;
        border-radius: 18px;
    }
    .dt-chat-header {
        flex-direction: column;
    }
    .dt-chat-meta {
        text-align: left;
    }
    .dt-actions {
        flex-direction: column;
    }
    .dt-btn {
        width: 100%;
    }
    .dt-feedback-actions {
        justify-content: stretch;
    }
}

/* ======================================================================== */
/* TAGES-ANKER v2.0 */
/* ======================================================================== */
.ta-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #dbe3f0;
    background: linear-gradient(165deg, #f8fafc 0%, #eef6ff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.ta-fade-in {
    animation: taFadeIn 0.3s ease-out;
}

@keyframes taFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ta-hero h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
}

.ta-hero p {
    margin: 0;
    color: #475569;
    max-width: 720px;
}

.ta-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.ta-cards {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ta-mini-card {
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
    display: grid;
    gap: 2px;
}

.ta-mini-card span {
    font-size: 1.1rem;
}

.ta-mini-card strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.ta-mini-card small {
    color: #64748b;
    font-size: 0.78rem;
}

.ta-consent {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.ta-consent input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.15);
}

.ta-consent label {
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.35;
}

.ta-consent a {
    color: #1d4ed8;
    text-decoration: underline;
}

.ta-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ta-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.ta-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.ta-btn-secondary {
    color: #1e293b;
    background: #e2e8f0;
}

.ta-card {
    border: 1px solid #dbe3f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
}

.ta-card h3 {
    margin: 0 0 6px;
    color: #0f172a;
}

.ta-card p {
    margin: 0 0 12px;
    color: #64748b;
}

.ta-card label {
    display: block;
    color: #334155;
    font-weight: 700;
    margin-bottom: 6px;
}

.ta-card input[type="text"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.ta-card input[type="text"]:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.ta-slider-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.ta-slider-badge {
    margin: 0 auto;
    color: #fff;
    border-radius: 12px;
    min-width: 150px;
    text-align: center;
    padding: 8px 10px;
}

.ta-slider-badge span {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.ta-slider-badge small {
    display: block;
    font-size: 0.78rem;
    opacity: 0.95;
}

.ta-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #2563eb);
}

.ta-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.ta-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.ta-slider-legend {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.ta-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.ta-progress {
    margin-bottom: 12px;
}

.ta-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #dbeafe;
}

.ta-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.3s ease;
}

.ta-progress-text {
    margin-top: 6px;
    display: block;
    text-align: right;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.ta-loading-card,
.ta-error-card {
    text-align: center;
    border: 1px solid #dbe3f0;
    border-radius: 16px;
    background: #fff;
    padding: 24px 18px;
}

.ta-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #2563eb;
    margin: 0 auto 12px;
    animation: taSpin 1s linear infinite;
}

@keyframes taSpin {
    to { transform: rotate(360deg); }
}

.ta-error-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.ta-result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.ta-result-head h3 {
    margin: 0;
    color: #0f172a;
}

.ta-result-meta {
    display: grid;
    gap: 4px;
    text-align: right;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.ta-plan-wrapper {
    border: 1px solid #dbe3f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
}

.ta-plan-wrapper h3 {
    color: #0f172a;
    margin-top: 0;
}

.ta-plan-wrapper ol,
.ta-plan-wrapper ul {
    padding-left: 18px;
}

.ta-emergency-cta {
    margin-top: 14px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    background: #f8fbff;
    padding: 14px;
}

.ta-emergency-cta h4 {
    margin: 0 0 6px;
    color: #0f172a;
}

.ta-emergency-cta p {
    margin: 0 0 10px;
    color: #475569;
}

@media (max-width: 900px) {
    .ta-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ta-shell {
        padding: 16px;
        border-radius: 18px;
    }
    .ta-slider-legend {
        flex-direction: column;
        gap: 4px;
    }
    .ta-result-head {
        flex-direction: column;
    }
    .ta-result-meta {
        text-align: left;
    }
    .ta-actions {
        flex-direction: column;
    }
    .ta-btn {
        width: 100%;
    }
}

/* === TAGES-ANKER & AKUT-ANKER SPEZIFISCH === */
.tages-anker-form label, .akut-anker-step h3, .akut-anker-intro h2, .akut-anker-result h2 {
    display: block;
    font-weight: 600;
    color: #005a87;
    margin-bottom: 15px;
}
.tages-anker-form input[type="text"], .tages-anker-form input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
}
#tagesplan-zum-speichern h3 {
    color: #005a87;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}
#tagesplan-zum-speichern ul {
    list-style-type: none;
    padding-left: 0;
}
#tagesplan-zum-speichern li {
    background: #f8f9fa;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    #neelix-app-container { padding: 15px; }
    .karten-wrapper, .checkbox-grid { grid-template-columns: 1fr; gap: 15px; }
    .werkzeug-leiste { flex-direction: column; align-items: center; }
    .werkzeug-button { width: 100%; max-width: 250px; }
    .dialog-nachricht { max-width: 95%; }
}

@media (max-width: 768px) {
    .neelix-shortcode-container.tool-ui-native #neelix-app-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Zusätzliche Stile für andere Tools */
.dialog-container { max-height: 500px; overflow-y: auto; padding: 20px; background: #ffffff; border-radius: 15px; margin: 20px 0; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05); border: 1px solid #e9ecef; }
.dialog-nachricht { padding: 15px 20px; border-radius: 18px; margin-bottom: 15px; max-width: 85%; word-wrap: break-word; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); animation: messageSlideIn 0.3s ease-out; }
@keyframes messageSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ki-nachricht { background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%); margin-right: auto; border-bottom-left-radius: 4px; color: #2e7d32; }
.nutzer-nachricht { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); margin-left: auto; border-bottom-right-radius: 4px; color: #1565c0; }
textarea { width: 100%; min-height: 100px; padding: 15px; border: 2px solid #e9ecef; border-radius: 12px; font-family: inherit; font-size: 0.95em; line-height: 1.5; resize: vertical; transition: all 0.3s ease; background: #ffffff; box-sizing: border-box; }
textarea:focus { outline: none; border-color: #005a87; box-shadow: 0 0 0 3px rgba(0, 90, 135, 0.1); }
.consent-container { display: flex; align-items: flex-start; gap: 10px; margin: 15px 0; padding: 15px; background: #f8f9fa; border-radius: 10px; border-left: 4px solid #ffc107; }
.consent-container input[type="checkbox"] { margin-top: 4px; transform: scale(1.2); }
.consent-container label { font-size: 0.9em; line-height: 1.4; color: #555; }
.consent-container a { color: #005a87; text-decoration: none; }
.consent-container a:hover { text-decoration: underline; }
.werkzeug-leiste { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin: 30px 0; padding: 20px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); border-radius: 15px; border-top: 1px solid #e9ecef; }
.werkzeug-button { background: linear-gradient(135deg, #6c757d 0%, #495057 100%); color: white; border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; text-decoration: none; }
.werkzeug-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3); }
.senden-button { background: linear-gradient(135deg, #005a87 0%, #0073aa 100%); color: white; border: none; padding: 12px 24px; border-radius: 25px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95em; box-shadow: 0 4px 15px rgba(0, 90, 135, 0.2); }
.senden-button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 90, 135, 0.3); background: linear-gradient(135deg, #004c73 0%, #005a87 100%); }
.senden-button:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.back-button { background: linear-gradient(135deg, #6c757d 0%, #495057 100%); color: white; border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; margin-top: 20px; }
.back-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3); }

/* Spezifische Tool-Stile */
.form-section { background: #ffffff; padding: 25px; border-radius: 15px; margin: 20px 0; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); border-top: 4px solid #0073aa; }
.form-section h3 { color: #005a87; margin-top: 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 15px 0; }
.checkbox-grid label { display: flex; align-items: center; padding: 10px; background: #f8f9fa; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.checkbox-grid label:hover { background: #e9ecef; }
.checkbox-grid input[type="checkbox"] { margin-right: 8px; transform: scale(1.1); }

/* ======================================================================== */
/* CHAT UX ROLLOUT v5 - FINAL OVERRIDES (Desktop + Mobile)                 */
/* ======================================================================== */

/* Shared messenger surface */
.cc-chat,
.rk-chat,
.rr-chat,
.dt-chat.dialog-container,
.af-chat {
    border-radius: 22px;
    border: 1px solid #dbeafe;
    background:
        radial-gradient(circle at 14% 18%, rgba(186, 230, 253, 0.32), transparent 38%),
        radial-gradient(circle at 84% 78%, rgba(233, 213, 255, 0.22), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Header avatar + online badge for non-AF chat modules */
.cc-chat-head > div:first-child,
.rk-chat-head > div:first-child,
.dt-chat-header > div:first-child {
    position: relative;
    min-width: 0;
    padding-left: 50px;
}

.cc-chat-head > div:first-child::before,
.rk-chat-head > div:first-child::before,
.dt-chat-header > div:first-child::before {
    content: "💬";
    position: absolute;
    left: 0;
    top: 1px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.98rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.cc-chat-head > div:first-child::before {
    content: "🧠";
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.rk-chat-head > div:first-child::before {
    content: "🔄";
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.dt-chat-header > div:first-child::before {
    content: "💬";
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.cc-chat-head > div:first-child::after,
.rk-chat-head > div:first-child::after,
.dt-chat-header > div:first-child::after {
    content: "● Online";
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
}

/* Pseudo avatars on messages */
.cc-msg,
.rk-msg,
.rr-msg,
.dt-chat .dialog-nachricht {
    position: relative;
}

.cc-msg,
.rk-msg,
.rr-msg {
    padding-left: 34px;
}

.cc-user,
.rk-user,
.rr-user {
    padding-left: 0;
    padding-right: 34px;
}

.cc-msg::before,
.rk-msg::before,
.rr-msg::before,
.dt-chat .dialog-nachricht::before {
    content: "AI";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%);
}

.cc-msg::before { content: "🧠"; }
.rk-msg::before { content: "🔄"; }
.rr-msg::before { content: "📝"; }
.dt-chat .dialog-nachricht::before { content: "💬"; }

.cc-user::before,
.rk-user::before,
.rr-user::before,
.dt-chat .dialog-nachricht.nutzer-nachricht::before {
    left: auto;
    right: 0;
    content: "DU";
    color: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.65);
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.dt-chat .dialog-nachricht {
    padding-left: 34px;
}

.dt-chat .dialog-nachricht.nutzer-nachricht {
    padding-left: 15px;
    padding-right: 34px;
}

/* Time pill */
.cc-time,
.rk-time,
.rr-msg-head,
.dt-msg-time {
    margin-bottom: 5px;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.58);
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    padding: 2px 8px;
}

.cc-user .cc-time,
.rk-user .rk-time,
.rr-user .rr-msg-head {
    margin-left: auto;
}

/* Bubble polish */
.cc-body,
.rk-body,
.rr-msg-body {
    position: relative;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.cc-user .cc-body,
.rk-user .rk-body,
.rr-user .rr-msg-body {
    border-bottom-right-radius: 4px;
}

.cc-ai .cc-body,
.rk-ai .rk-body,
.rr-ai .rr-msg-body {
    border-bottom-left-radius: 4px;
}

.cc-user .cc-body::after,
.rk-user .rk-body::after,
.rr-user .rr-msg-body::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
}

.cc-user .cc-body::after { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.rk-user .rk-body::after { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.rr-user .rr-msg-body::after { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }

.cc-ai .cc-body::after,
.rk-ai .rk-body::after,
.rr-ai .rr-msg-body::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.96);
}

/* Quick prompts: always fully visible */
.cc-chip-row,
.rk-chip-row,
.rr-quick-row,
.af-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}

.cc-chip,
.rk-chip,
.rr-chip,
.af-chip {
    width: 100%;
    min-height: 42px;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
}

/* Composer polish */
.cc-input-wrap,
.rk-input-wrap,
.rr-input-wrap,
.dt-input-wrap {
    border-radius: 18px;
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

#cc-send,
#rk-send,
#rr-send,
#dt-send {
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#cc-send::before,
#rk-send::before,
#rr-send::before,
#dt-send::before {
    content: "➤";
    font-size: 1.02rem;
    line-height: 1;
    transform: translateX(1px);
}

/* Mobile: app-like full-width, sticky composer, no clipping */
@media (max-width: 840px) {
    .cc-shell,
    .rk-shell,
    .rr-shell,
    .dt-shell,
    .af-shell {
        width: 100%;
        max-width: 100vw;
        border-radius: 18px;
        padding: 14px;
        overflow-x: hidden;
    }

    .cc-chat,
    .rk-chat,
    .rr-chat,
    .dt-chat.dialog-container,
    .af-chat {
        min-height: 50vh;
        max-height: 58vh;
        border-radius: 14px;
        padding: 12px 10px;
    }

    .cc-chat-head > div:first-child,
    .rk-chat-head > div:first-child,
    .dt-chat-header > div:first-child {
        padding-left: 44px;
    }

    .cc-chat-head > div:first-child::before,
    .rk-chat-head > div:first-child::before,
    .dt-chat-header > div:first-child::before {
        width: 34px;
        height: 34px;
        font-size: 0.86rem;
    }

    .cc-chat-head > div:first-child::after,
    .rk-chat-head > div:first-child::after,
    .dt-chat-header > div:first-child::after {
        font-size: 0.62rem;
        padding: 2px 7px;
    }

    .cc-msg,
    .rk-msg,
    .rr-msg {
        width: 92%;
        padding-left: 30px;
    }

    .cc-user,
    .rk-user,
    .rr-user {
        padding-right: 30px;
    }

    .dt-chat .dialog-nachricht {
        padding-left: 30px;
    }

    .dt-chat .dialog-nachricht.nutzer-nachricht {
        padding-right: 30px;
    }

    .cc-msg::before,
    .rk-msg::before,
    .rr-msg::before,
    .dt-chat .dialog-nachricht::before {
        width: 23px;
        height: 23px;
        font-size: 0.58rem;
    }

    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row,
    .af-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #cc-send,
    #rk-send,
    #rr-send,
    #dt-send {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .cc-input-wrap,
    .rk-input-wrap,
    .rr-input-wrap,
    .dt-input-wrap,
    .af-input-wrap {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
}

@media (max-width: 430px) {
    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row,
    .af-chip-row {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================== */
/* FINAL CHAT UX PASS (DESKTOP + MOBILE) */
/* ======================================================================== */
.cc-shell,
.rk-shell,
.rr-shell,
.dt-shell,
.af-shell {
    width: 100%;
    max-width: min(1080px, 100%);
}

.cc-chat,
.rk-chat,
.rr-chat,
.dt-chat.dialog-container,
.af-chat {
    background:
        radial-gradient(circle at 12% 14%, rgba(186, 230, 253, 0.22), transparent 36%),
        radial-gradient(circle at 86% 82%, rgba(233, 213, 255, 0.16), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 18px;
    min-height: 52vh;
    max-height: 62vh;
    padding: 14px 12px;
    overscroll-behavior: contain;
}

.cc-msg,
.rk-msg,
.rr-msg,
.dt-chat .dialog-nachricht,
.af-msg {
    width: min(90%, 780px);
}

.cc-body,
.rk-body,
.rr-msg-body,
.dt-chat .dialog-nachricht,
.af-msg-body {
    line-height: 1.52;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
}

.dt-chat .dialog-nachricht {
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.97);
    border-bottom-left-radius: 4px;
    max-width: min(90%, 780px);
    margin-right: auto;
}

.dt-chat .dialog-nachricht::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border: 1px solid #dbeafe;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.97);
}

.dt-chat .dialog-nachricht.nutzer-nachricht {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.8);
    border-bottom-right-radius: 4px;
    margin-left: auto;
    margin-right: 0;
}

.dt-chat .dialog-nachricht.nutzer-nachricht::after {
    content: "";
    position: absolute;
    right: -6px;
    left: auto;
    bottom: 9px;
    width: 10px;
    height: 10px;
    border: none;
    border-bottom-left-radius: 9px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.cc-time,
.rk-time,
.rr-msg-head,
.dt-msg-time,
.af-msg-time {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.62);
    background: rgba(255, 255, 255, 0.76);
    color: #64748b;
}

.af-msg {
    display: flex;
    flex-direction: column;
}

.af-msg-user {
    margin-left: auto;
    align-items: flex-end;
}

.af-msg-ai {
    margin-right: auto;
    align-items: flex-start;
}

.af-msg-user .af-msg-body {
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.af-msg-user .af-msg-body::after {
    right: -6px;
    left: auto;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border: none;
}

.af-msg-ai .af-msg-body {
    border: 1px solid #dbeafe;
    border-bottom-left-radius: 4px;
    background: rgba(255, 255, 255, 0.97);
}

.af-msg-ai .af-msg-body::after {
    left: -6px;
    border: 1px solid #dbeafe;
    border-right: none;
    border-top: none;
    background: rgba(255, 255, 255, 0.97);
}

/* Ensure all quick buttons are visible without horizontal dragging */
.cc-chip-row,
.rk-chip-row,
.rr-quick-row,
.af-chip-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible !important;
    overflow-x: visible !important;
}

.cc-chip,
.rk-chip,
.rr-chip,
.af-chip {
    width: 100%;
    min-height: 42px;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 840px) {
    .cc-shell,
    .rk-shell,
    .rr-shell,
    .dt-shell,
    .af-shell {
        max-width: 100%;
        border-radius: 16px;
        padding: 12px;
    }

    .cc-chat,
    .rk-chat,
    .rr-chat,
    .dt-chat.dialog-container,
    .af-chat {
        min-height: 56vh;
        max-height: 66vh;
        border-radius: 14px;
        padding: 12px 10px;
    }

    .cc-msg,
    .rk-msg,
    .rr-msg,
    .dt-chat .dialog-nachricht,
    .af-msg {
        width: 95%;
    }

    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row,
    .af-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .cc-chat,
    .rk-chat,
    .rr-chat,
    .dt-chat.dialog-container,
    .af-chat {
        min-height: 60vh;
        max-height: 70vh;
    }

    .cc-chip-row,
    .rk-chip-row,
    .rr-quick-row,
    .af-chip-row {
        grid-template-columns: 1fr;
    }
}
