:root {
            --color-bg: #faf7f2;
            --color-primary: #2c5e43;
            --color-primary-dark: #1b422e;
            --color-accent: #6ca880;
            --color-accent-light: #e8f2ec;
            --color-card-bg: #ffffff;
            --color-text: #2c5e43;
            --color-text-muted: #607367;
            --color-warning-bg: #fdf2f2;
            --color-warning-border: #f5c6c6;
            --color-warning-text: #ae2b2b;
            --color-input-bg: #fdf2e9;
            --color-input-border: #a1cbb1;
            --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

            html {
    scroll-behavior: smooth;
            }

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

        body { font-family: var(--font-family); background-color: var(--color-bg); color: var(--color-text); line-height: 1.6; padding: 20px 12px; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
        .app-container { width: 100%; max-width: 700px; background-color: var(--color-card-bg); border-radius: 24px; box-shadow: 0 12px 32px rgba(44, 94, 67, 0.08); padding: 32px 24px; border: 1px solid rgba(44, 94, 67, 0.05); }
        header { text-align: center; margin-bottom: 24px; }
        .logo-container { width: 180px; height: 180px; margin: 0 auto 12px; display: flex; justify-content: center; align-items: center; }
        .logo-img { max-width: 100%; max-height: 100%; object-fit: contain; }
        h1 { color: var(--color-primary); font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-top: 8px; }
        .subtitle { color: var(--color-text-muted); font-size: 15px; margin-top: 4px; }
        .warning-box { background-color: var(--color-warning-bg); border: 1px solid var(--color-warning-border); color: var(--color-warning-text); padding: 14px 16px; border-radius: 14px; font-size: 13px; font-weight: 500; margin-bottom: 24px; display: flex; gap: 10px; align-items: flex-start; }
        .warning-box strong { font-weight: 700; }
        .beta-banner { background-color: var(--color-accent-light); border: 1px dashed var(--color-accent); color: var(--color-primary-dark); padding: 14px 16px; border-radius: 14px; font-size: 13.5px; margin-bottom: 24px; text-align: center; line-height: 1.5; }
        .beta-banner a { color: var(--color-primary); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
        .beta-banner a:hover { border-bottom-color: var(--color-primary); }
        .form-group { margin-bottom: 20px; position: relative; }
        label { display: block; font-size: 14px; font-weight: 600; color: var(--color-primary); margin-bottom: 8px; }
        textarea { width: 100%; height: 120px; background-color: var(--color-input-bg); border: 2px solid var(--color-input-border); border-radius: 16px; padding: 16px; font-family: inherit; font-size: 15px; color: var(--color-text); resize: none; transition: all 0.25s ease; }
        textarea:focus { outline: none; border-color: var(--color-accent); background-color: #ffffff; box-shadow: 0 0 0 4px var(--color-accent-light); }
        .btn { width: 100%; background-color: var(--color-accent); color: white; border: none; border-radius: 16px; padding: 16px 24px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(108, 168, 128, 0.25); }
        .btn:hover { background-color: #5b946f; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(108, 168, 128, 0.35); }
        .btn:active { transform: translateY(1px); }
        .btn:disabled { background-color: var(--color-text-muted); cursor: not-allowed; transform: none; box-shadow: none; opacity: 0.6; }
        .ai-disclaimer { text-align: center; font-size: 12px; color: var(--color-text-muted); margin-top: 12px; font-weight: 500; }
        .results-container { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 20px; opacity: 0; transform: translateY(10px); transition: all 0.4s ease; }
        .results-container.visible { opacity: 1; transform: translateY(0); }
        @media (min-width: 600px) { .results-container { grid-template-columns: 1fr 1fr; } }
        .result-card { background-color: #ffffff; border: 2px solid var(--color-accent-light); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; position: relative; transition: border-color 0.2s ease; }
        .result-card:hover { border-color: var(--color-accent); }
        .card-title { font-size: 15px; font-weight: 700; color: var(--color-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
        .card-body { font-size: 14px; color: var(--color-text); margin-bottom: 16px; white-space: pre-line; flex-grow: 1; }
        .btn-copy { background-color: var(--color-bg); color: var(--color-primary); border: 1px solid #e1dbcf; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: flex-start; width: 100%; }
        .btn-copy:hover { background-color: var(--color-accent-light); border-color: var(--color-accent); }
        .app-footer { margin-top: 32px; display: flex; justify-content: center; border-top: 1px solid var(--color-bg); padding-top: 20px; }
        .footer-img { height: 200px; width: auto; object-fit: contain; opacity: 0.9; }
              .legal-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--color-text-muted); }
        .legal-footer a { color: var(--color-primary); text-decoration: none; font-weight: 600; transition: color 0.2s; }
        .legal-footer a:hover { color: var(--color-accent); text-decoration: underline; }
              .consent-group { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; font-size: 13px; color: var(--color-text-muted); }
        .consent-group input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; flex-shrink: 0; }
        .consent-group label { cursor: pointer; line-height: 1.4; }
        .consent-group a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
        .consent-group a:hover { text-decoration: underline; }
        .spinner { display: none; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }


.app-header {
    display: flex;
    align-items: center;
    position: relative;
    padding: 15px;
}

/* Der neue, schwebende (fixed) Hamburger-Button */
.hamburger-btn {
    position: fixed;       /* Sorgt dafür, dass der Button beim Scrollen mitwandert */
    top: 20px;             /* Abstand vom oberen Bildschirmrand */
    left: 20px;            /* Abstand vom linken Bildschirmrand */
    z-index: 998;          /* Bleibt unter dem abgedunkelten Hintergrund (999), wenn das Menü öffnet */
    
    /* Das Design: Rund und farbig */
    background-color: #e8f2ec; /* Dein typisches helles Mintgrün */
    color: #2d5a27;            /* Dunkelgrünes Icon */
    border: none;
    border-radius: 50%;        /* Macht das Element zu einem perfekten Kreis */
    width: 50px;               /* Feste Breite für den Kreis */
    height: 50px;              /* Feste Höhe für den Kreis */
    font-size: 24px;           /* Größe der drei Striche */
    
    /* Zentriert das Icon genau in der Mitte des Kreises */
    display: flex;
    justify-content: center;
    align-items: center;
    
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Sanfter Schatten, damit er sich abhebt */
    transition: transform 0.2s, background-color 0.2s;
}

/* Leichter Vergrößerungs-Effekt beim Antippen */
.hamburger-btn:hover, .hamburger-btn:active {
    transform: scale(1.05);
    background-color: #d1e8da;
}


.header-titles {
    width: 100%;
    text-align: center;
}

/* Das versteckte Seitenmenü */
.side-menu {
    height: 100%;
    width: 250px;
    position: fixed; /* Bleibt beim Scrollen stehen */
    z-index: 1000; /* Legt sich über alles andere */
    top: 0;
    left: -250px; /* Versteckt es links außerhalb des Bildschirms */
    background-color: #f7fbf8;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: 0.3s; /* Weiche Slide-Animation */
    padding-top: 60px;
    display: flex;
    flex-direction: column;
}

/* Die Klasse, die per JavaScript hinzugefügt wird, um das Menü zu zeigen */
.side-menu.open {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    color: #2d5a27;
    cursor: pointer;
}

.menu-item {
    padding: 15px 20px;
    text-align: left;
    font-size: 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #e8f2ec;
    cursor: pointer;
    color: #333;
}

.menu-item.active {
    background-color: #e8f2ec;
    font-weight: bold;
    color: #2d5a27;
}

/* Der abgedunkelte Hintergrund */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none; /* Standardmäßig aus */
}

.menu-overlay.open {
    display: block;
}
/* Zwingt das Tablet, Text in Eingabefeldern IMMER dunkel auf hellem Grund zu zeigen */
textarea {
    color: #333333 !important;       /* Dunkelgraue/Schwarze Schrift */
    background-color: #ffffff !important; /* Weißer Hintergrund */
}

/* Sorgt dafür, dass der "Beispiel-Text" (Placeholder) dezent sichtbar bleibt */
textarea::placeholder {
    color: #888888 !important;       /* Angenehmes Grau */
}

/* Sichert die Lesbarkeit des fertigen Textes in den weißen Ausgabe-Boxen */
.card-body, .output-box, #klartext-output {
    color: #333333 !important;       
}

/* =========================================
   SCHICHTKRÖTEN ABC STYLES
   ========================================= */

.abc-card {
    background-color: #ffffff;
    border: 2px solid var(--color-accent-light);
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.abc-card:hover {
    border-color: var(--color-accent);
}

.abc-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background-color: #ffffff;
    user-select: none;
}

.abc-letter-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-accent-light);
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 12px;
    margin-right: 16px;
    flex-shrink: 0;
}

.abc-term {
    flex-grow: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.abc-toggle-icon {
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: 400;
}

.abc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fafbf9;
}

.abc-body.active {
    max-height: 3000px; /* Groß genug für viel Text */
    border-top: 1px solid var(--color-accent-light);
}

.abc-content-inner {
    padding: 20px;
    color: var(--color-text);
    line-height: 1.6;
    font-size: 14.5px;
}

.abc-content-inner p {
    margin-bottom: 12px;
}

.abc-content-inner p:last-child {
    margin-bottom: 0;
}

/* Spezielles Design für deine Warnhinweise */
.abc-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning-text);
    padding: 12px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-top: 16px;
    border: 1px solid var(--color-warning-border);
    display: flex;
    gap: 8px;
}
/* =========================================
   HIGHLIGHTING (PLATZHALTER DSGVO)
   ========================================= */
.highlight-placeholder {
    background-color: #fff3cd; /* Sanftes Warn-Gelb */
    color: #d9534f; /* Kräftiges Rot für den Text */
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid #f5c6c6;
    display: inline-block;
    margin: 0 2px;
    box-shadow: 0 2px 4px rgba(217, 83, 79, 0.1);
    animation: pulse-placeholder 2s infinite;
}

@keyframes pulse-placeholder {
    0% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.4); }
    70% { box-shadow: 0 0 0 4px rgba(217, 83, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0); }
}
/* =========================================
   STARTSEITE / HUB STYLES
   ========================================= */

/* Der Hub-Container darf etwas breiter sein, damit das Grid gut wirkt */
.hub-container {
    max-width: 800px; 
}

/* Das Grid-Layout für die Kacheln */
.hub-grid {
    display: grid;
    /* Erzeugt automatisch so viele Spalten wie Platz ist, mind. aber 260px breit */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
    margin-bottom: 24px;
}

/* Design der einzelnen Buttons/Kacheln */
.hub-card {
    background-color: var(--color-card-bg);
    border: 2px solid var(--color-accent-light);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 94, 67, 0.04);
}

/* Hover-Effekt: Kachel hebt sich leicht an und der Rand wird akzentuiert */
.hub-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(44, 94, 67, 0.12);
}

.hub-icon {
    font-size: 42px;
    margin-bottom: 16px;
}

.hub-title {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hub-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* --- Spezielles Styling für geplante Module --- */
.hub-card.planned {
    border: 2px dashed #d1d9d4; /* Ein dezenter, gestrichelter Rand */
    background-color: #fcfcfc;
    cursor: default;
}

.hub-card.planned:hover {
    transform: none; /* Kein Anheben beim Hover */
    box-shadow: 0 4px 12px rgba(44, 94, 67, 0.04);
    border-color: #d1d9d4;
}

/* Der kleine "In Kürze" Badge */
.hub-badge {
    background-color: var(--color-accent-light);
    color: var(--color-primary-dark);
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* =========================================
   ZURÜCK ZUR STARTSEITE LINK
   ========================================= */
.back-home-container {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px dashed var(--color-input-border); /* Sanfte optische Trennung vom Haupttool */
    display: flex;
    justify-content: center;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-bg); /* Nutzt den ganz hellen Hintergrund */
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 14px;
    border: 1px solid var(--color-accent-light);
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    color: var(--color-primary-dark);
}

.back-icon {
    font-size: 16px;
}
/* ==========================================================================
   Dynamische Formularelemente (Maßnahmenformulierer)
   ========================================================================== */

.dynamic-question {
    margin-bottom: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eeeeee;
}

.dynamic-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.dynamic-select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #cccccc;
    font-family: inherit;
    font-size: 15px;
}

/* Checkbox-Gruppen für Ressourcen & Diagnosen */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}
/* ==========================================================================
   Maßnahmenformulierer - Grid Layout für Ergebnisse
   ========================================================================== */

.cards-grid {
    display: grid;
    /* Karten sind mind. 300px breit, bei mehr Platz verteilen sie sich gleichmäßig */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; 
    width: 100%;
}

/* Zwingt die Karten auf die exakt gleiche Höhe */
.cards-grid .result-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    margin-bottom: 0 !important; /* Verhindert doppelte Abstände durch altes JS */
}
