/* Quelle: 00-recon/originale/fahrtauglich/fahrtauglich-farbenfalle.html (unverändert übernommen, ausser wo vermerkt: Audio-Basis, Anzeigetexte laut TEXTE) */
    #ftff {
        --ftff-gelb: #FFBF00;
        --ftff-gelb-dunkel: #E6AB00;
        --ftff-gelb-hell: #FFF4CC;
        --ftff-schwarz: #000000;
        --ftff-text: #1F2937;
        --ftff-text-2: #4B5563;
        --ftff-flaeche: #F3F5F8;
        --ftff-linie: #C8D5DC;
        --ftff-gruen: #047857;
        --ftff-fehler: #B91C1C;

        font-family: 'Poppins', sans-serif;
        color: var(--ftff-text);
        line-height: 1.5;
        width: 100%;
        max-width: 850px;
        margin: 20px auto 60px;
        box-sizing: border-box;
    }
    #ftff *, #ftff *::before, #ftff *::after { box-sizing: border-box; }
    #ftff [hidden] { display: none !important; }

    /* ===== Seitenkopf — Masse wie die bisherigen Elementor-Widgets ===== */
    #ftff .ftff-titel {
        margin: 0;
        font-family: inherit;
        font-size: 48px;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: 0;
        text-align: center;
        color: var(--ftff-schwarz);
    }
    #ftff .ftff-intro {
        max-width: 760px;
        margin: 50px auto 0;
        font-size: 20px;
        font-weight: 300;
        line-height: 1.5;
        text-align: center;
        color: var(--ftff-schwarz);
    }
    /* Links: schwarz mit gelber Unterstreichung — Gelb als Schrift auf Weiss
       hielte nur 1.65:1. */
    #ftff .ftff-intro a,
    #ftff .ftff-box a {
        color: var(--ftff-schwarz);
        font-weight: 400;
        text-decoration: underline;
        text-decoration-color: var(--ftff-gelb);
        text-decoration-thickness: 3px;
        text-underline-offset: 3px;
        overflow-wrap: anywhere;
    }
    #ftff .ftff-intro a:hover, #ftff .ftff-box a:hover,
    #ftff .ftff-intro a:focus, #ftff .ftff-box a:focus { color: var(--ftff-schwarz); background: rgba(255, 191, 0, 0.18); }
    #ftff a:focus-visible { outline: 3px solid var(--ftff-schwarz); outline-offset: 2px; }

    /* Spielkarte (Optik wie Wordle auf fahrtauglich.ch). overflow: clip statt
       hidden — sonst verschiebt ein Fokus/scrollIntoView den Karteninhalt. */
    #ftff .ftff-karte {
        position: relative;
        overflow: clip;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 2px solid #dee2e6;
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        padding: 36px 30px;
    }
    #ftff .ftff-karte::before {
        content: '';
        position: absolute;
        top: -50%; left: -50%;
        width: 200%; height: 200%;
        background: radial-gradient(circle, rgba(52, 58, 64, 0.05) 1px, transparent 1px);
        background-size: 30px 30px;
        animation: ftff-hintergrund 25s linear infinite;
        z-index: 0;
        pointer-events: none;
    }
    @keyframes ftff-hintergrund {
        0%   { transform: translate(0, 0) rotate(0deg); }
        100% { transform: translate(-30px, -30px) rotate(360deg); }
    }

    /* ===== Buttons (Pill-Stil der fahrtauglich.ch-Buttons) ===== */
    #ftff .ftff-knopf {
        -webkit-appearance: none;
        appearance: none;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 10px 28px;
        background: var(--ftff-gelb);
        border: 2px solid var(--ftff-gelb);
        border-radius: 100px;
        box-shadow: none;
        font-family: inherit;
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.2;
        text-transform: none;
        text-decoration: none;
        color: var(--ftff-schwarz);
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }
    #ftff .ftff-knopf:hover,
    #ftff .ftff-knopf:focus {
        background: var(--ftff-gelb-dunkel);
        border-color: var(--ftff-gelb-dunkel);
        color: var(--ftff-schwarz);
    }
    #ftff .ftff-knopf:hover { transform: translateY(-1px); }
    #ftff .ftff-knopf-hell { background: #ffffff; border-color: var(--ftff-schwarz); }
    #ftff .ftff-knopf-hell:hover,
    #ftff .ftff-knopf-hell:focus { background: var(--ftff-flaeche); border-color: var(--ftff-schwarz); }
    #ftff .ftff-knopf-klein { min-height: 44px; padding: 8px 20px; font-size: 0.9rem; }

    #ftff .ftff-knopf:focus-visible,
    #ftff summary:focus-visible {
        outline: 3px solid var(--ftff-schwarz);
        outline-offset: 2px;
    }

    /* ===== Spielanleitung ===== */
    #ftff .ftff-anleitung {
        margin-top: 24px;
        text-align: left;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
        padding: 15px 18px;
    }
    #ftff .ftff-anleitung summary {
        cursor: pointer;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 4px 0;
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--ftff-schwarz);
        user-select: none;
    }
    #ftff .ftff-anleitung summary::-webkit-details-marker { display: none; }
    #ftff .ftff-chev { width: 20px; height: 20px; flex: 0 0 auto; transition: transform 0.2s ease; }
    #ftff .ftff-anleitung[open] .ftff-chev { transform: rotate(180deg); }
    #ftff .ftff-anleitung-liste {
        list-style: none;
        margin: 12px 0 4px;
        padding: 0;
        display: grid;
        gap: 8px;
    }
    #ftff .ftff-anleitung-liste li {
        margin: 0;
        padding: 10px 14px;
        background: var(--ftff-flaeche);
        border: 1px solid #DEDAD2;
        border-radius: 6px;
        font-size: 0.95rem;
        font-weight: 300;
        line-height: 1.55;
        color: var(--ftff-schwarz);
    }
    #ftff .ftff-anleitung-liste li strong { font-weight: 600; }

    /* ===== Textabschnitte (Kartenstil der bisherigen Textboxen) ===== */
    #ftff .ftff-abschnitt { margin-top: 70px; }
    #ftff .ftff-abschnitt h2 {
        margin: 0 0 20px;
        font-family: inherit;
        font-size: 36px;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: 0;
        text-transform: none;
        text-align: center;
        color: var(--ftff-schwarz);
    }
    #ftff .ftff-box {
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        padding: 15px 20px;
        font-size: 22px;
        font-weight: 300;
        line-height: 1.5;
        color: var(--ftff-schwarz);
        text-align: left;
    }
    #ftff .ftff-box p { margin: 0 0 14px; }
    #ftff .ftff-box p:last-child { margin-bottom: 0; }
    #ftff .ftff-box strong { font-weight: 500; }

    #ftff .ftff-tipps { margin: 0; padding-left: 1.2em; }
    #ftff .ftff-tipps li { margin: 0 0 14px; padding-left: 0.2em; }
    #ftff .ftff-tipps li:last-child { margin-bottom: 0; }
    #ftff .ftff-tipps li::marker { color: var(--ftff-gelb-dunkel); }
    #ftff .ftff-tipps strong { display: block; }

    #ftff .ftff-nutzen { list-style: none; margin: 6px 0 14px; padding: 0; }
    #ftff .ftff-nutzen li {
        display: grid;
        grid-template-columns: 2.4em 1fr;
        gap: 0 0.6em;
        padding: 14px 0;
        border-top: 1px solid var(--ftff-linie);
    }
    #ftff .ftff-nutzen li:last-child { border-bottom: 1px solid var(--ftff-linie); }
    #ftff .ftff-nutzen-nr { font-weight: 600; line-height: 1.5; color: var(--ftff-gelb-dunkel); }
    #ftff .ftff-nutzen strong { display: block; }
    #ftff .ftff-vermerk {
        padding: 10px 14px;
        background: var(--ftff-flaeche);
        border: 1px solid #DEDAD2;
        border-radius: 6px;
        font-size: 0.85em;
    }
    #ftff .ftff-quellen-titel { margin-top: 20px !important; font-weight: 500; }
    #ftff .ftff-quellen { list-style: none; margin: 0; padding: 0; font-size: 0.8em; }
    #ftff .ftff-quellen li { margin: 0 0 10px; }
    #ftff .ftff-quellen li:last-child { margin-bottom: 0; }

    #ftff .ftff-sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
    /* ===== Spielbereich ===== */
    #ftff .ftff-spiel {
        max-width: 680px;
        margin: 34px auto 0;
        text-align: center;
    }
    #ftff .ftff-screen {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    #ftff .ftff-text { max-width: 46ch; margin: 0; font-size: 1.05rem; color: var(--ftff-schwarz); }
    #ftff .ftff-text strong { font-weight: 600; }
    #ftff .ftff-best { margin: 0; font-size: 0.9rem; font-weight: 500; color: var(--ftff-text-2); }
    #ftff .ftff-fortschritt { margin: 0; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.03em; color: var(--ftff-text-2); }
    #ftff .ftff-aufgabe { margin: 0; font-size: 1rem; color: var(--ftff-text); }

    /* Reiz: feste Hoehe, damit nichts springt */
    #ftff .ftff-reizflaeche {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 480px;
        height: 130px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    #ftff .ftff-stimulus {
        font-size: clamp(2.6rem, 11vw, 4rem);
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1;
        -webkit-user-select: none;
        user-select: none;
    }
    #ftff .ftff-stimulus.fixation { color: #9CA3AF; font-weight: 400; }

    /* Antwortknoepfe: feste Reihenfolge */
    #ftff .ftff-antworten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 520px; }
    #ftff .ftff-antwort {
        -webkit-appearance: none;
        appearance: none;
        position: relative;
        margin: 0;
        min-height: 64px;
        padding: 8px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: #ffffff;
        border: 2px solid var(--ftff-schwarz);
        border-radius: 14px;
        box-shadow: none;
        font-family: inherit;
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.1;
        text-transform: none;
        color: var(--ftff-schwarz);
        cursor: pointer;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        transition: background 0.1s ease;
    }
    #ftff .ftff-antwort:hover:not(:disabled), #ftff .ftff-antwort:focus:not(:disabled) { background: var(--ftff-flaeche); color: var(--ftff-schwarz); }
    #ftff .ftff-antwort:focus-visible { outline: 3px solid var(--ftff-gelb); outline-offset: 2px; }
    #ftff .ftff-antwort:disabled { cursor: default; color: var(--ftff-schwarz); }
    #ftff .ftff-antwort.richtig { background: #D1FAE5; border-color: var(--ftff-gruen); }
    #ftff .ftff-antwort.falsch  { background: #FEE2E2; border-color: var(--ftff-fehler); }
    #ftff .ftff-punkt { width: 16px; height: 16px; border-radius: 50%; }
    #ftff .ftff-taste { position: absolute; top: 4px; right: 7px; font-size: 0.7rem; font-weight: 400; color: var(--ftff-text-2); }
    @media (pointer: coarse) { #ftff .ftff-taste { display: none; } }

    #ftff .ftff-rueckmeldung { min-height: 1.5em; margin: 0; font-weight: 600; color: var(--ftff-text-2); }
    #ftff .ftff-rueckmeldung.richtig { color: var(--ftff-gruen); }
    #ftff .ftff-rueckmeldung.falsch  { color: var(--ftff-fehler); }

    /* ===== Ergebnisdialog ===== */
    #ftff .ftff-modal { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 20px; }
    #ftff .ftff-modal.active { display: flex; }
    #ftff .ftff-modal-hintergrund { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); }
    #ftff .ftff-modal-inhalt {
        position: relative;
        width: 100%;
        max-width: 460px;
        max-height: 88vh;
        overflow-y: auto;
        background: #ffffff;
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        padding: 30px 24px 24px;
        text-align: center;
    }
    #ftff .ftff-modal h2 { margin: 0 0 6px; font-family: inherit; font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--ftff-text); }
    #ftff .ftff-ergebnis { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 14px 0 10px; }
    #ftff .ftff-ergebnis strong { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1.1; color: var(--ftff-schwarz); font-variant-numeric: tabular-nums; }
    #ftff .ftff-ergebnis span { font-size: 0.85rem; color: var(--ftff-text-2); }
    #ftff .ftff-effekt { margin: 4px 0 10px; padding: 10px 12px; background: var(--ftff-gelb-hell); border-radius: 8px; font-size: 0.95rem; color: var(--ftff-schwarz); text-align: left; }
    #ftff .ftff-modal p { margin: 0; color: var(--ftff-text-2); }
    #ftff .ftff-modal-knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

    #ftff .ftff-sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

    /* ===== Responsive (Elementor: Tablet <= 1024px, Handy <= 767px) ===== */
    @media (max-width: 1024px) {
        #ftff .ftff-titel { font-size: 45px; }
        #ftff .ftff-intro { font-size: 16px; margin-top: 30px; }
        #ftff .ftff-box   { font-size: 16px; }
    }
    @media (max-width: 768px) {
        #ftff { max-width: 95%; }
        #ftff .ftff-karte { padding: 24px 20px; }
    }
    @media (max-width: 767px) {
        #ftff .ftff-titel { font-size: 28px; }
        #ftff .ftff-intro { margin-top: 20px; }
        #ftff .ftff-spiel { margin-top: 24px; }
        #ftff .ftff-abschnitt { margin-top: 50px; }
        #ftff .ftff-abschnitt h2 { font-size: 28px; }
        #ftff .ftff-box   { padding: 15px; }
    }
    @media (max-width: 520px) {
        #ftff .ftff-karte { padding: 18px 10px; border-radius: 16px; }
        #ftff .ftff-antworten { grid-template-columns: repeat(2, 1fr); }
        #ftff .ftff-reizflaeche { height: 110px; }
    }

    @media (prefers-reduced-motion: reduce) {
        #ftff *, #ftff *::before, #ftff *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

/* ===== Anpassung an das Designsystem fahrtauglich.ch (3a, Entscheid Lukas) =====
   Schrift und Grautöne aus tokens.css; kein bewegter Hintergrund (ruhig, Performance). Spiellogik unverändert. */
#ftff {
    --ftff-schwarz: var(--ft-tinte);
    --ftff-text: var(--ft-tinte);
    --ftff-text-2: var(--ft-tinte-2);
    --ftff-flaeche: var(--ft-flaeche);
    --ftff-linie: var(--ft-linie);
    font-family: var(--ft-schrift);
    margin-top: 0;
    margin-bottom: 0;
}
#ftff .ftff-karte::before { animation: none; }
#ftff .ftff-text, #ftff .ftff-meldung, #ftff .ftff-knopf, #ftff .ftff-anleitung-liste li { font-size: var(--ft-fs-text); }
#ftff .ftff-bestzeiten, #ftff .ftff-ergebnis span { font-size: var(--ft-fs-klein); }
#ftff .ftff-stat-label { font-size: 0.95rem; letter-spacing: 0; }
#ftff .ftff-anleitung summary { font-size: var(--ft-fs-h4); }
#ftff .ftff-knopf { min-height: var(--ft-button-hoehe); font-weight: var(--ft-gewicht-fett); }
@media (max-width: 600px) {
    #ftff .ftff-knopf { font-size: var(--ft-fs-text); padding: 10px 16px; }
    #ftff .ftff-stat-label { font-size: 0.85rem; }
}
