/**
 * KB V2 Zusatz-Styles: Zonen-HUD, Demo-Report, Befund-Karten, Zweck-Chips
 * Baut auf dem V1-Design-System (frontend.css) auf.
 */

/* ---------- Widget breiter als V1 (Report braucht Platz) ----------
   V1 erzwingt width/min/max 600px !important -> alle drei übersteuern. */
.kb-widget.kb2-widget {
    width: min(1180px, 100%) !important;
    min-width: 0 !important;
    max-width: 1180px !important;
}

/* Scan-Ansicht: klarer umlaufender HUD-Rahmen + kräftige Ecken */
.kb2-widget .kb-analyze-image {
    position: relative;
    width: min(440px, 90%);
    aspect-ratio: 16 / 10;
    height: auto;
    margin: 0 auto 22px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(34, 211, 238, 0.6);
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.3), inset 0 0 34px rgba(34, 211, 238, 0.1);
}
.kb2-widget .kb-analyze-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.kb2-widget .kb-analyze-ring { display: none; }
.kb2-widget .kb-corner { width: 26px; height: 26px; border-color: #22d3ee; opacity: 0.95; }
.kb2-widget .kb-corner-tl { top: 7px; left: 7px; border-width: 3px 0 0 3px; }
.kb2-widget .kb-corner-tr { top: 7px; right: 7px; border-width: 3px 3px 0 0; }
.kb2-widget .kb-corner-bl { bottom: 7px; left: 7px; border-width: 0 0 3px 3px; }
.kb2-widget .kb-corner-br { bottom: 7px; right: 7px; border-width: 0 3px 3px 0; }

/* Rechtlicher Hinweis unter dem Ergebnis */
.kb2-disclaimer {
    display: flex;
    gap: 8px;
    margin: 16px 0 0;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11.5px;
    line-height: 1.6;
}
.kb2-disclaimer svg { flex-shrink: 0; opacity: 0.6; margin-top: 1px; }

/* Datenschutz-Consent im Frage-Schritt */
.kb2-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}
.kb2-consent input {
    margin: 1px 0 0;
    width: 17px; height: 17px;
    accent-color: #22d3ee;
    flex-shrink: 0;
    cursor: pointer;
}
.kb2-consent a { color: #22d3ee; text-decoration: underline; }

/* Schriftfarben-Fix: Theme überschreibt h2/h3 im Widget mit dunkel -> hell erzwingen */
.kb2-widget .kb-result-header h2,
.kb2-widget .kb2-products-title,
.kb2-widget .kb-product-info h3,
.kb2-widget .kb-analyze-title,
.kb2-widget .kb-success-state h2,
.kb2-widget .kb-error-state h2 {
    color: #ffffff !important;
}
.kb2-widget .kb2-products-title {
    font-size: 17px;
    font-weight: 700;
    margin: 22px 0 12px;
}
.kb2-widget .kb-product-reason { color: rgba(255, 255, 255, 0.82) !important; }
.kb2-widget .kb-product-price { color: #4ade80 !important; }

/* Sprung-Link zur Kamera-Empfehlung (im Ergebnis-Header) */
.kb2-jump {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 8px auto 0;
    padding: 8px 18px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 22px;
    color: #22d3ee;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.kb2-jump:hover { background: rgba(34, 211, 238, 0.22); }
.kb2-jump svg { animation: kb2bounce 1.6s ease-in-out infinite; }
@keyframes kb2bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* Lead-Karte auf der Ergebnisseite (Newsletter + E-Mail sichern) */
.kb2-lead-card {
    margin-top: 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.14));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 14px;
}
.kb2-lead-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.kb2-lead-icon {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.kb2-lead-title { color: #fff; font-weight: 700; font-size: 16px; }
.kb2-lead-sub { color: rgba(255, 255, 255, 0.65); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.kb2-lead-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
    transition: transform 0.15s;
}
.kb2-lead-btn:hover:not(:disabled) { transform: translateY(-1px); }

/* ---------- Ergebnis: Bild groß oben, Befund-Karten als Raster darunter ---------- */
.kb2-result-stack { min-width: 0; }
.kb2-analysis-wrap {
    max-width: 860px;
    margin: 0 auto;
}
.kb2-analysis-wrap .kb2-stage { position: relative; }
.kb2-findings-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    margin-top: 16px;
}

/* Vergrößern-Button auf dem Bild */
.kb2-enlarge {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 4;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 15, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.15s;
}
.kb2-enlarge:hover { background: rgba(34, 211, 238, 0.85); color: #04121f; }

/* Kompakte Nummer+Kategorie-Pill (dunkler Grund -> überlappende bleiben lesbar) */
.kb2-ztag2 {
    position: absolute;
    top: -11px; left: -2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(9, 13, 20, 0.92);
    border: 1.5px solid var(--c, #3ddc84);
    border-radius: 12px;
    padding: 2px 8px 2px 2px;
    color: #fff;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.kb2-ztag2 b {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--c, #3ddc84);
    color: #04070a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}
/* aktive Zone: Pill nach vorne + heller */
.kb2-zone-active .kb2-ztag2 { z-index: 5; filter: brightness(1.2); box-shadow: 0 0 0 1.5px var(--c), 0 2px 10px rgba(0, 0, 0, 0.6); }
/* Zone klebt oben am Rand -> Pill nach innen klappen */
.kb2-ztag2.kb2-ztag-in { top: 3px; left: 3px; }

/* ---------- Lightbox ---------- */
.kb2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(4, 7, 12, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    backdrop-filter: blur(3px);
}
.kb2-lightbox-inner {
    position: relative;
    line-height: 0;
    max-width: min(1100px, 94vw);
    max-height: 82vh;
}
.kb2-lightbox-inner img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.kb2-lightbox-close {
    position: absolute;
    top: 18px; right: 24px;
    width: 42px; height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.kb2-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
.kb2-lightbox-hint {
    color: rgba(255, 255, 255, 0.65);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
    letter-spacing: 1px;
    margin: 16px 0 0;
}
.kb2-enlarge-hint {
    position: absolute;
    bottom: 8px; left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 15, 20, 0.75);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    pointer-events: none;
}

/* ---------- Bild-Bühne mit Zonen ---------- */
.kb2-stage {
    position: relative;
    line-height: 0;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}
.kb2-stage img {
    width: 100%;
    height: auto;
    display: block;
}
.kb2-stage-small {
    border-radius: 14px;
    margin: 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.kb2-scanline {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(61, 220, 132, 0.8), transparent);
    box-shadow: 0 0 14px rgba(61, 220, 132, 0.5);
    animation: kb2scan 5s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}
@keyframes kb2scan { 0% { top: 0; } 100% { top: 100%; } }

.kb2-zone {
    position: absolute;
    border: 1.5px solid var(--c, #3ddc84);
    background: color-mix(in srgb, var(--c, #3ddc84) 10%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--c, #3ddc84) 40%, transparent),
                inset 0 0 18px color-mix(in srgb, var(--c, #3ddc84) 10%, transparent);
    border-radius: 3px;
    animation: kb2pulse 2.6s ease-in-out infinite;
}
.kb2-zone::before, .kb2-zone::after {
    content: '';
    position: absolute;
    width: 13px; height: 13px;
}
.kb2-zone::before { top: -2px; left: -2px; border-top: 3px solid var(--c); border-left: 3px solid var(--c); }
.kb2-zone::after  { bottom: -2px; right: -2px; border-bottom: 3px solid var(--c); border-right: 3px solid var(--c); }
@keyframes kb2pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }

.kb2-ztag {
    position: absolute;
    top: -22px; left: -2px;
    background: var(--c, #3ddc84);
    color: #04070a;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.5;
    box-shadow: 0 0 10px color-mix(in srgb, var(--c, #3ddc84) 60%, transparent);
    z-index: 2;
}
/* Tag nach innen klappen, wenn Zone am oberen Bildrand klebt */
.kb2-zone[style*="top:0%"] .kb2-ztag,
.kb2-zone[style*="top:1%"] .kb2-ztag,
.kb2-zone[style*="top:2%"] .kb2-ztag { top: 2px; }

.kb2-ztag-in { top: 2px !important; left: 2px !important; }
.kb2-ztag-right { left: auto !important; right: -2px; }
.kb2-ztag-in.kb2-ztag-right { right: 2px; }

.kb2-prodlink {
    color: #22d3ee;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.kb2-prodlink:hover { color: #7ee787; }

/* Montage-Foto (Frage-Layer) */
.kb2-montage-row { margin-top: 2px; }
.kb2-montage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.18s;
}
.kb2-montage-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }
.kb2-montage-thumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.35);
    border-radius: 10px;
    padding: 6px 10px;
    color: #81c784;
    font-size: 12px;
}
.kb2-montage-thumb img {
    width: 44px; height: 44px;
    object-fit: cover;
    border-radius: 7px;
}
.kb2-montage-thumb button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}

/* Optionaler Detail-Aufklapper in Step 2 */
.kb2-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 2px;
    padding: 7px 0;
    background: none;
    border: none;
    color: #22d3ee;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.kb2-details-toggle svg { transition: transform 0.2s; }
.kb2-details-toggle:hover { color: #7ee787; }
.kb2-details {
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-top: 6px;
    margin-top: 2px;
}

/* Montage-Panel (Ergebnis) */
.kb2-montage-panel {
    background: rgba(77, 163, 255, 0.08);
    border: 1px solid rgba(77, 163, 255, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0 0;
}
.kb2-montage-head {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #4da3ff;
    margin-bottom: 10px;
}
.kb2-montage-body2 {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.kb2-montage-imgwrap {
    position: relative;
    flex: 0 0 46%;
    max-width: 46%;
    line-height: 0;
    cursor: pointer;
}
.kb2-montage-imgwrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.kb2-montage-imgwrap:hover .kb2-enlarge-hint { background: rgba(34, 211, 238, 0.85); color: #04121f; }
.kb2-montage-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}
/* Montage-Marke: Icon OBEN, Text darunter, Stiel zeigt auf den Punkt (bottom = Punkt) */
.kb2-mount-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 4;
    pointer-events: none;
    animation: kb2pulse 1.8s ease-in-out infinite;
}
.kb2-mount-icon {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.9));
}
.kb2-mount-label {
    margin-top: 2px;
    background: #4da3ff;
    color: #04121f;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 9px;
    border-radius: 11px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.kb2-mount-stem {
    width: 2px;
    height: 12px;
    background: #4da3ff;
    box-shadow: 0 0 5px #4da3ff;
}
.kb2-mount-lg .kb2-mount-icon { font-size: 42px; }
.kb2-mount-lg .kb2-mount-label { font-size: 14px; padding: 4px 13px; border-radius: 14px; }
.kb2-mount-lg .kb2-mount-stem { height: 20px; width: 3px; }
@media (max-width: 640px) {
    .kb2-montage-body2 { flex-direction: column; }
    .kb2-montage-imgwrap { flex: none; max-width: 100%; width: 100%; }
}

.kb2-clickable { cursor: pointer; }
.kb2-zone-active {
    animation: none;
    filter: brightness(1.5) !important;
    border-width: 2.5px;
    z-index: 3;
}
.kb2-find-card.kb2-active {
    border-color: var(--c, #3ddc84);
    background: color-mix(in srgb, var(--c, #3ddc84) 10%, rgba(255, 255, 255, 0.05));
    box-shadow: 0 0 0 1.5px var(--c, #3ddc84), 0 0 18px color-mix(in srgb, var(--c, #3ddc84) 35%, transparent);
    scroll-margin: 12px;
}

.kb2-zdot {
    position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--c, #3ddc84);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px var(--c, #3ddc84);
    transform: translate(-50%, -50%);
}

/* ---------- Report-Kopfzeile ---------- */
.kb2-rep-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(10, 16, 24, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: #e6f1ff;
}
.kb2-rep-head .kb2-rep-meta { color: rgba(255, 255, 255, 0.45); }
.kb2-rep-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #3ddc84;
    margin-right: 8px;
    box-shadow: 0 0 8px #3ddc84;
    animation: kb2blink 1.6s infinite;
}
@keyframes kb2blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.kb2-live + .kb2-stage { border: 1px solid rgba(255, 255, 255, 0.1); border-top: none; }

/* ---------- STEP 1: Demo-Report + Upload-Overlay ---------- */
.kb2-demo-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 0 10px;
}
.kb2-demo-report {
    filter: brightness(0.72) saturate(0.95);
    transition: filter 0.4s;
    pointer-events: none;
    user-select: none;
}
.kb2-demo-stage.dragging .kb2-demo-report,
.kb2-demo-stage:hover .kb2-demo-report { filter: brightness(0.75) saturate(0.95); }

.kb2-rep-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px;
    background: rgba(10, 16, 24, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 14px 14px;
}
.kb2-rep-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--c, #3ddc84);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}
.kb2-rep-card b {
    display: block;
    color: #fff;
    font-size: 12px;
    margin-bottom: 3px;
}

.kb2-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: radial-gradient(ellipse at center, rgba(8, 12, 20, 0.12) 0%, rgba(8, 12, 20, 0.42) 100%);
}

/* ---------- STEP 2: Frage-Layer über dem eigenen Bild ---------- */
.kb2-ask-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 420px;
}
.kb2-ask-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) saturate(0.9) blur(2px);
}
.kb2-ask-overlay {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 18px 14px;
}
.kb2-ask-card {
    background: rgba(14, 20, 32, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 18px 20px 20px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    text-align: left;
}
.kb2-ask-imgrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}
.kb2-ask-imgrow strong { color: #fff; }
.kb2-ask-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kb2-ask-changeimg {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}
.kb2-ask-label {
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
    margin: 14px 0 8px;
}
.kb2-ask-label small {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    font-size: 11.5px;
    margin-left: 6px;
}
.kb2-ask-note {
    width: 100%;
    margin-top: 8px;
    font-size: 13px !important;
}
.kb2-ask-netinfo {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11.5px;
    margin: 8px 0 0;
    line-height: 1.5;
}
.kb2-zweck-grid.kb2-left { justify-content: flex-start; }
.kb2-zweck-grid.kb2-left .kb2-zweck-chip { padding: 7px 13px; font-size: 12.5px; }
.kb2-upload-card {
    text-align: center;
    background: rgba(16, 22, 34, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 26px 30px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 77, 255, 0.15);
}
.kb2-upload-card.kb2-compact {
    max-width: 460px;
    padding: 16px 22px 14px;
}
.kb2-upload-card.kb2-compact h2 { font-size: 17px; margin-bottom: 3px; }
.kb2-upload-card.kb2-compact > p { font-size: 12px; margin-bottom: 10px; }
.kb2-upload-card.kb2-compact .kb2-upload-drop { margin: 8px 0 8px; }
.kb2-upload-card.kb2-compact .kb2-trust-row { margin-top: 6px; }
.kb2-upload-overlay.dragging .kb2-upload-card {
    border-color: #7c4dff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 24px rgba(124, 77, 255, 0.5);
}
.kb2-upload-icon {
    width: 52px; height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.kb2-upload-icon svg { width: 26px; height: 26px; stroke: #fff; }
.kb2-upload-card h2 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 6px;
    font-weight: 700;
}
.kb2-upload-card > p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 16px;
}
.kb2-upload-drop {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    margin: 10px 0 12px;
}
.kb2-upload-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 10px;
    padding: 9px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
}
.kb2-upload-tip svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.kb2-trust-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    color: #81c784;
    font-size: 11px;
    font-weight: 600;
    flex-wrap: wrap;
}

/* ---------- STEP 3: Befund-Karten (Kundensprache) ---------- */
.kb2-findings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin: 16px 0 6px;
}
.kb2-find-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--c, #3ddc84);
    border-radius: 10px;
    padding: 13px 15px;
    text-align: left;
}
.kb2-find-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.kb2-find-nr {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--c, #3ddc84);
    color: #04070a;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kb2-find-title {
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
}
.kb2-find-card p {
    margin: 0 0 5px;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
}
.kb2-find-tip { color: rgba(255, 255, 255, 0.85) !important; }
.kb2-find-tip::before { content: '➜ '; color: var(--c, #3ddc84); font-weight: 700; }

.kb2-step-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 10px;
}

/* ---------- STEP 4: Einsatzzweck-Chips ---------- */
.kb2-zweck-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: center;
    margin: 4px 0 6px;
}
.kb2-zweck-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
}
.kb2-zweck-chip:hover { background: rgba(255, 255, 255, 0.12); }
.kb2-zweck-chip.selected {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.kb2-zweck-icon { font-size: 15px; }

/* ---------- Analyse-Fortschritt ---------- */
.kb2-phase-pill {
    display: inline-block;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: 1.5px;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 14px;
    padding: 4px 12px;
    margin-bottom: 10px;
}
.kb2-progress {
    width: min(380px, 86%);
    height: 7px;
    margin: 14px auto 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}
.kb2-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #22d3ee);
    border-radius: 5px;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
    transition: width 0.4s linear;
}
.kb2-progress-hint {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11.5px;
    margin: 4px auto 0;
    max-width: 380px;
    line-height: 1.5;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .kb2-rep-cards { grid-template-columns: 1fr; }
    .kb2-rep-card:nth-child(3) { display: none; }
    .kb2-upload-card { padding: 20px 16px; }
    .kb2-upload-card h2 { font-size: 17px; }
    .kb2-ztag { font-size: 9px; padding: 2px 5px; top: -19px; }
    .kb2-findings { grid-template-columns: 1fr; }
}

/* ---------- v2.9: Inline-Fehler, Phase-B-Retry, Mobile-Zonen ---------- */
.kb2-upload-error {
    margin: 10px 0 0;
    padding: 8px 12px;
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.35);
    border-radius: 8px;
    color: #ff9a9a;
    font-size: 12.5px;
    line-height: 1.5;
}
.kb2-phaseb-warn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: rgba(255, 176, 32, 0.1);
    border: 1px solid rgba(255, 176, 32, 0.35);
    border-radius: 10px;
    color: #ffd28a;
    font-size: 13px;
    line-height: 1.5;
}
.kb2-phaseb-warn span { flex: 1; min-width: 200px; }
.kb2-phaseb-warn button {
    padding: 9px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
/* Vergrößern-Button auf Touch-taugliche 40px */
.kb2-enlarge { width: 40px; height: 40px; }
/* Zonen-Pills + Tap-Ziele auf kleinen Screens (die 640px-Regel oben stylte nur die tote .kb2-ztag) */
@media (max-width: 640px) {
    .kb2-ztag2 { font-size: 11px; padding: 3px 7px; }
    .kb2-ztag2 b { min-width: 15px; }
    .kb2-zone.kb2-clickable { min-width: 28px; min-height: 28px; }
}
