/* ===================================================================
   AHP-Gewichtungstool – Stylesheet
   Modernes, klares Design · Desktop & Tablet
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #1e3f6e;
    --primary-h:    #2d6ab4;
    --primary-light:#d4ecf7;
    --accent:       #f0a030;
    --bg:           #edf3f9;
    --surface:      #ffffff;
    --border:       #d0d8e4;
    --border-light: #e8edf5;
    --text:         #1a2332;
    --muted:        #5a6a7e;
    --good:         #1a7a30;
    --good-bg:      #d1f0db;
    --warn:         #7d5c00;
    --warn-bg:      #fff3cc;
    --bad:          #721c24;
    --bad-bg:       #fde8ea;
    --radius:       10px;
    --radius-sm:    6px;
    --shadow:       0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
    --shadow-md:    0 4px 20px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.07);
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────── */
header {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4f8a 55%, #2d6ab4 100%);
    color: #fff;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.header-logo {
    flex-shrink: 0;
    opacity: .9;
}
header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.3;
}
header .header-sub {
    font-size: .78rem;
    opacity: .75;
    margin-top: 2px;
    font-weight: 400;
}
.header-uni {
    font-size: .72rem;
    opacity: .60;
    margin-top: 1px;
    font-weight: 400;
    letter-spacing: .03em;
}

/* ── Fortschrittsleiste ──────────────────────────────────────── */
.progress-wrap {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4f8a 55%, #2d6ab4 100%);
    padding: 0 28px 14px;
}
.progress-track {
    background: rgba(255,255,255,.20);
    border-radius: 4px;
    height: 5px;
    overflow: hidden;
}
#progress-bar {
    background: linear-gradient(90deg, #7ec8ff, #a8d8ff);
    height: 100%;
    width: 0%;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}
#progress-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.82);
    text-align: right;
    margin-top: 4px;
    letter-spacing: .02em;
}

/* ── Haupt-Container ─────────────────────────────────────────── */
main {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 20px 100px;
}

/* ── Phase-Sektionen ─────────────────────────────────────────── */
.phase { display: none; }
.phase.active { display: block; }

/* ── Card ────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px 36px;
    box-shadow: var(--shadow);
}
.center-card { text-align: center; }
.card h2 {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -.01em;
}
.subtitle {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 22px;
}
.hint {
    color: var(--muted);
    font-size: .83rem;
    margin-top: 16px;
    font-style: italic;
}
.context-label {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 7px 12px;
    font-size: .87rem;
    font-weight: 500;
    color: var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 18px;
}

/* ── Formulare ───────────────────────────────────────────────── */
fieldset {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 20px;
    background: #fafbfd;
}
legend {
    font-weight: 700;
    color: var(--primary);
    font-size: .9rem;
    padding: 0 8px;
}
label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}
label:last-child { margin-bottom: 0; }

input[type="text"],
input[type="number"],
select {
    font-family: inherit;
    font-size: .9rem;
    font-weight: 400;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,79,138,.12);
    background: #fff;
}
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
}
.checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .18s, transform .1s, box-shadow .18s;
    text-decoration: none;
    line-height: 1;
    letter-spacing: .01em;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,79,138,.25);
}
.btn-primary:hover {
    background: var(--primary-h);
    box-shadow: 0 4px 12px rgba(26,79,138,.30);
}
.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-secondary:hover { background: var(--bg); border-color: #aab5c5; }
.btn-lg {
    padding: 13px 32px;
    font-size: 1rem;
    border-radius: var(--radius);
}
.file-label {
    display: inline-flex;
    margin-top: 14px;
    cursor: pointer;
}
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 26px;
    gap: 12px;
}
.nav-row .btn-primary { margin-left: auto; }

/* ── Fehler-Meldung ──────────────────────────────────────────── */
.error-msg {
    color: var(--bad);
    background: var(--bad-bg);
    border: 1px solid #f5bdc0;
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: .87rem;
    margin-top: 12px;
}

/* ── Mini-Fortschritt (Vergleiche) ───────────────────────────── */
.progress-mini {
    font-size: .83rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.progress-mini-bar {
    height: 5px;
    background: var(--border-light);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}
.progress-mini-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #e89020);
    border-radius: 3px;
    transition: width .3s;
}

/* ── Paarvergleich-Karte ─────────────────────────────────────── */
.pair-card {
    background: #f7f9fd;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px 20px 20px;
    margin: 10px 0 22px;
    overflow: hidden;   /* ← verhindert, dass Kinder aus der Karte herausragen */
}

/* ── 5-Punkte-Skala
      WICHTIG: min-width:0 erlaubt Grid-Items kleiner als ihr Inhalt zu werden
   ──────────────────────────────────────────────────────────────── */
.scale-row-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 4px 0 14px;
    width: 100%;
    min-width: 0;
}

.scale-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 90px;
    padding: 8px 5px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
    color: var(--muted);
    text-align: center;
    /* ── Overflow-Fix: Grid-Item darf schrumpfen ── */
    min-width: 0;
    overflow: hidden;
    width: 100%;
}
.scale-btn:hover {
    background: #dce8f7;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(26,79,138,.12);
}
.scale-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 14px rgba(26,79,138,.28);
}
.scale-btn.scale-mid {
    background: #f2f5fb;
    border-style: dashed;
}
.scale-btn.scale-mid.selected {
    background: var(--primary);
    border-style: solid;
    color: #fff;
}

/* Kriteriumnamen über den Außenbuttons – Overflow-Fix */
.btn-name {
    font-size: .68rem;
    font-weight: 700;
    color: var(--primary);
    /* Kein white-space:nowrap – erlaubt Umbruch */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 2px;
    opacity: .85;
    /* Maximal 3 Zeilen anzeigen */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.scale-btn.selected .btn-name { color: rgba(255,255,255,.9); }

.scale-key-badge {
    display: inline-block;
    background: rgba(0,0,0,.07);
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    padding: 1px 5px;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.scale-btn.selected .scale-key-badge { background: rgba(255,255,255,.22); }

.scale-lbl {
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    /* Ebenfalls kein Nowrap */
    white-space: normal;
}

.scale-value-display {
    text-align: center;
    margin-top: 8px;
    font-size: .95rem;
    font-weight: 500;
    min-height: 26px;
    color: var(--text);
}
.sv-equal { color: var(--muted); font-style: italic; }

/* Tastatur-Hinweis */
.key-hint {
    text-align: center;
    font-size: .77rem;
    color: var(--muted);
    margin-top: 10px;
}
kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: .73rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    background: #f0f2f5;
    border: 1px solid #c5ccd6;
    border-bottom-width: 2px;
    border-radius: 3px;
    color: var(--text);
}

/* ── CR-Ampel ────────────────────────────────────────────────── */
.cr-good { color: var(--good); font-weight: 600; }
.cr-ok   { color: #7a5800;    font-weight: 600; }
.cr-bad  { color: var(--bad); font-weight: 600; }

.cr-summary {
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: .9rem;
    margin: 18px 0;
}
.cr-summary-good { background: var(--good-bg); border: 1px solid #b8e6c8; color: var(--good); }
.cr-summary-warn { background: var(--warn-bg); border: 1px solid #f0d98a; color: var(--warn); }

/* ── CR-Tabelle ──────────────────────────────────────────────── */
.cr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
    margin-top: 16px;
}
.cr-table th {
    background: var(--primary-light);
    color: var(--primary);
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cr-table td {
    padding: 7px 12px;
    border: 1px solid var(--border-light);
    vertical-align: top;
}
.cr-table tr:nth-child(even) td { background: #fafbfd; }

/* ── text-muted helper ───────────────────────────────────────── */
.text-muted { color: var(--muted); }
.text-sm    { font-size: .85rem; }
.mt-2       { margin-top: .5rem; }

/* ══════════════════════════════════════════════════════════════
   WILLKOMMENS-MODAL
   ══════════════════════════════════════════════════════════════ */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.welcome-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp .3s cubic-bezier(.34, 1.3, .64, 1);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);  }
}

.welcome-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4f8a 55%, #2d6ab4 100%);
    color: #fff;
    padding: 32px 36px 28px;
    border-radius: 16px 16px 0 0;
    text-align: center;
}
.welcome-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
}
.welcome-header h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}
.welcome-subtitle {
    font-size: .85rem;
    opacity: .80;
    font-weight: 400;
    margin: 0;
}

.welcome-body {
    padding: 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-thanks {
    font-size: .97rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.welcome-section {}
.welcome-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid var(--border-light);
}
.welcome-section p {
    font-size: .92rem;
    line-height: 1.7;
    color: var(--text);
}

.welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.welcome-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .92rem;
    line-height: 1.6;
}
.welcome-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.welcome-duration {
    font-size: .85rem;
    color: var(--muted);
    margin-top: 4px;
}

.welcome-scale-info {
    background: #f7f9fd;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 12px;
}
.welcome-scale-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.welcome-scale-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.scale-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.scale-chip-strong-l { background: #1e3f6e; color: #fff; }
.scale-chip-light-l  { background: #2d6ab4; color: #fff; }
.scale-chip-equal    { background: #6b7280; color: #fff; }
.scale-chip-light-r  { background: #e09020; color: #fff; }
.scale-chip-strong-r { background: #c07010; color: #fff; }
.scale-chip-neutral  { background: var(--border); color: var(--text); }
.ahp-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }
.ahp-link:hover { text-decoration-color: #fff; }

.welcome-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .88rem;
    color: #78580a;
    margin-top: 12px;
    line-height: 1.6;
}

.welcome-footer {
    padding: 20px 36px 28px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.welcome-privacy {
    font-size: .78rem;
    color: var(--muted);
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .card { padding: 20px 16px; }
    header { padding: 14px 16px; }
    .progress-wrap { padding: 0 16px 12px; }
    main { padding: 0 12px 60px; margin-top: 20px; }

    /* Skala-Buttons auf kleinen Bildschirmen */
    .scale-row-5 { gap: 4px; }
    .scale-btn {
        min-height: 70px;
        padding: 6px 3px 8px;
    }
    .scale-lbl { font-size: .65rem; }
    .scale-key-badge { font-size: .65rem; padding: 1px 4px; }
    .btn-name { font-size: .6rem; }

    /* Welcome Modal */
    .welcome-header { padding: 24px 20px 20px; }
    .welcome-body { padding: 20px; gap: 18px; }
    .welcome-footer { padding: 16px 20px 24px; }
    .welcome-scale-row { gap: 4px; }
    .scale-chip { font-size: .72rem; padding: 2px 8px; }
}

@media (max-width: 420px) {
    /* Sehr enge Bildschirme: Skalenbeschriftung kürzen */
    .scale-lbl { display: none; }
    .scale-btn { min-height: 54px; }
}

/* ── Tooltip ─────────────────────────────────────────────────── */
.tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: .68rem;
    font-weight: 700;
    cursor: help;
    margin-left: 6px;
    flex-shrink: 0;
    line-height: 1;
    border: none;
    padding: 0;
}
.tooltip-box {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a2332;
    color: #fff;
    font-size: .8rem;
    font-weight: 400;
    padding: 9px 13px;
    border-radius: 7px;
    width: 270px;
    line-height: 1.55;
    z-index: 300;
    pointer-events: none;
    transition: opacity .18s;
    white-space: normal;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a2332;
}
.tooltip-wrap:hover .tooltip-box,
.tooltip-wrap:focus-within .tooltip-box { visibility: visible; opacity: 1; }

/* ── Zwischenspeichern-Badge ─────────────────────────────────── */
.save-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: var(--muted);
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.save-badge:hover { background: var(--bg); color: var(--text); }

/* ── Vergleichs-Fragestellung ────────────────────────────────── */
.comparison-question {
    background: #f0f6ff;
    border-left: 3px solid var(--primary-h);
    padding: 8px 14px;
    font-size: .86rem;
    font-style: italic;
    color: var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 16px;
}

/* ── Ebenen-Header (ersetzt alten Phase-Badge + Breadcrumb) ──── */
.level-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f3f7fc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: .80rem;
}
.level-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: .70rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.level-chip-dim { background: #1e3f6e; color: #fff; }
.level-chip-sub { background: #2d6ab4; color: #fff; }
.level-chip-ind { background: #f0a030; color: #1a2332; }

.level-header-label {
    font-weight: 700;
    color: var(--text);
    font-size: .82rem;
}
.level-header-crumb {
    color: var(--muted);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .80rem;
}
.level-sep { color: #bbc5d0; font-size: .9rem; }

/* ── Dualer Fortschrittsbalken ───────────────────────────────── */
.progress-dual {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}
.progress-local,
.progress-global {
    flex: 1;
    font-size: .78rem;
    color: var(--muted);
}
.progress-global { color: var(--primary); font-weight: 500; }
.progress-mini-bar-global div {
    background: linear-gradient(90deg, var(--primary), var(--primary-h)) !important;
}

/* ── QI-Seitenvergleich-Layout ───────────────────────────────── */
.qi-compare-row {
    display: grid;
    grid-template-columns: 1fr 2.2fr 1fr;
    gap: 12px;
    align-items: start;
    margin: 10px 0 22px;
}
.qi-compare-row .pair-card {
    margin: 0;
}
.qi-side-box {
    background: #f7f9fd;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    align-self: stretch;
    display: flex;
    align-items: center;
}
.qi-side-left  { border-left: 3px solid #1e3f6e; }
.qi-side-right { border-right: 3px solid #2d6ab4; }
.qi-side-desc {
    font-size: .84rem;
    color: var(--text);
    line-height: 1.55;
}
@media (max-width: 700px) {
    .qi-compare-row {
        grid-template-columns: 1fr;
    }
    .qi-compare-row .qi-side-right { order: 3; }
}

/* ── Fußzeile ────────────────────────────────────────────────── */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4f8a 55%, #2d6ab4 100%);
    color: rgba(255,255,255,.85);
    padding: 10px 28px;
    box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.footer-logo-svg {
    opacity: .92;
    flex-shrink: 0;
}
.footer-brand {
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgba(255,255,255,.85);
}
@media (max-width: 640px) {
    .app-footer { padding: 8px 16px; }
}

/* ── Willkommens-Dialog: Hierarchie-Erklärung ────────────────── */
.welcome-hierarchy {
    margin: 12px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.welcome-hier-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: #f7f9fd;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.welcome-hier-arrow {
    text-align: center;
    font-size: .75rem;
    color: var(--muted);
    padding: 3px 0;
    letter-spacing: .04em;
}
.welcome-hier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-dim { background: #1e3f6e; color: #fff; }
.badge-sub { background: #2d6ab4; color: #fff; }
.badge-ind { background: #f0a030; color: #fff; }
.welcome-hier-desc {
    font-size: .85rem;
    color: var(--text);
    line-height: 1.5;
}

/* ── Export: Dankestext ──────────────────────────────────────── */
.export-thanks {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--primary-light);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text);
    line-height: 1.6;
}
