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

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

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

    /* Spielkarte (Optik wie Wordle auf fahrtauglich.ch). overflow: clip statt
       hidden — sonst verschiebt ein Fokus/scrollIntoView den Karteninhalt. */
    #ftvg .ftvg-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;
    }
    #ftvg .ftvg-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: ftvg-hintergrund 25s linear infinite;
        z-index: 0;
        pointer-events: none;
    }
    @keyframes ftvg-hintergrund {
        0%   { transform: translate(0, 0) rotate(0deg); }
        100% { transform: translate(-30px, -30px) rotate(360deg); }
    }

    /* ===== Buttons (Pill-Stil der fahrtauglich.ch-Buttons) ===== */
    #ftvg .ftvg-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(--ftvg-gelb);
        border: 2px solid var(--ftvg-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(--ftvg-schwarz);
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }
    #ftvg .ftvg-knopf:hover,
    #ftvg .ftvg-knopf:focus {
        background: var(--ftvg-gelb-dunkel);
        border-color: var(--ftvg-gelb-dunkel);
        color: var(--ftvg-schwarz);
    }
    #ftvg .ftvg-knopf:hover { transform: translateY(-1px); }
    #ftvg .ftvg-knopf-hell { background: #ffffff; border-color: var(--ftvg-schwarz); }
    #ftvg .ftvg-knopf-hell:hover,
    #ftvg .ftvg-knopf-hell:focus { background: var(--ftvg-flaeche); border-color: var(--ftvg-schwarz); }
    #ftvg .ftvg-knopf-klein { min-height: 44px; padding: 8px 20px; font-size: 0.9rem; }

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

    /* ===== Spielanleitung ===== */
    #ftvg .ftvg-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;
    }
    #ftvg .ftvg-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(--ftvg-schwarz);
        user-select: none;
    }
    #ftvg .ftvg-anleitung summary::-webkit-details-marker { display: none; }
    #ftvg .ftvg-chev { width: 20px; height: 20px; flex: 0 0 auto; transition: transform 0.2s ease; }
    #ftvg .ftvg-anleitung[open] .ftvg-chev { transform: rotate(180deg); }
    #ftvg .ftvg-anleitung-liste {
        list-style: none;
        margin: 12px 0 4px;
        padding: 0;
        display: grid;
        gap: 8px;
    }
    #ftvg .ftvg-anleitung-liste li {
        margin: 0;
        padding: 10px 14px;
        background: var(--ftvg-flaeche);
        border: 1px solid #DEDAD2;
        border-radius: 6px;
        font-size: 0.95rem;
        font-weight: 300;
        line-height: 1.55;
        color: var(--ftvg-schwarz);
    }
    #ftvg .ftvg-anleitung-liste li strong { font-weight: 600; }

    /* ===== Textabschnitte (Kartenstil der bisherigen Textboxen) ===== */
    #ftvg .ftvg-abschnitt { margin-top: 70px; }
    #ftvg .ftvg-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(--ftvg-schwarz);
    }
    #ftvg .ftvg-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(--ftvg-schwarz);
        text-align: left;
    }
    #ftvg .ftvg-box p { margin: 0 0 14px; }
    #ftvg .ftvg-box p:last-child { margin-bottom: 0; }
    #ftvg .ftvg-box strong { font-weight: 500; }

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

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

    #ftvg .ftvg-sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
    #ftvg {
        --disc-p1: #E53935;
        --disc-p2: #FFBF00;
        /* Zellgroesse aus der verfuegbaren Breite: 7 Zellen + 6 Luecken (5px)
           + Brettrand (2 x 8px) + Kartenpolster */
        --vg-cell: clamp(28px, calc((min(95vw, 680px) - 110px) / 7), 62px);
    }

    /* ===== Spielbereich ===== */
    #ftvg .ftvg-spiel {
        max-width: 680px;
        margin: 34px auto 0;
        text-align: center;
    }
    #ftvg .vg-screen {
        position: relative;
        z-index: 1;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100%;
    }
    #ftvg .vg-screen.aktiv { display: flex; }
    #ftvg .vg-modus-h2 { margin: 0; font-size: 1.3rem; font-weight: 600; color: var(--ftvg-schwarz); }
    #ftvg .vg-modus-buttons,
    #ftvg .vg-schwierigkeit-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
    #ftvg .ftvg-text { max-width: 44ch; margin: 0; font-size: 0.9rem; color: var(--ftvg-text-2); }

    /* Zuganzeige */
    #ftvg .vg-zug-anzeige {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 2rem;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--ftvg-schwarz);
    }
    #ftvg .vg-zug-chip { width: 22px; height: 22px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }

    /* Vorschau-Zeile: gleiche Spalten wie das Brett */
    #ftvg .vg-vorschau {
        display: grid;
        grid-template-columns: repeat(7, var(--vg-cell));
        gap: 5px;
        padding: 0 8px;
        height: calc(var(--vg-cell) * 0.9);
        align-items: center;
        margin-bottom: -10px;
    }
    #ftvg .vg-vorschau-disc {
        width: calc(var(--vg-cell) * 0.82);
        height: calc(var(--vg-cell) * 0.82);
        border-radius: 50%;
        margin: auto;
        opacity: 0;
        transition: opacity 0.12s;
    }
    #ftvg .vg-vorschau-disc.aktiv    { opacity: 0.55; }
    #ftvg .vg-vorschau-disc.aktiv.p1 { background: var(--disc-p1); }
    #ftvg .vg-vorschau-disc.aktiv.p2 { background: var(--disc-p2); }

    /* Brett */
    #ftvg .vg-brett-wrapper { position: relative; touch-action: manipulation; border-radius: 16px; }
    #ftvg .vg-brett-wrapper:focus { outline: none; }
    #ftvg .vg-brett-wrapper:focus-visible { outline: 3px solid var(--ftvg-schwarz); outline-offset: 4px; }
    #ftvg .vg-brett-wrapper.warten .vg-zelle { pointer-events: none; }
    #ftvg .vg-brett-wrapper.warten .vg-brett { cursor: default; }
    #ftvg .vg-brett {
        display: grid;
        grid-template-columns: repeat(7, var(--vg-cell));
        gap: 5px;
        padding: 8px;
        background: #343a40;
        border-radius: 16px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }
    #ftvg .vg-zelle {
        width: var(--vg-cell);
        height: var(--vg-cell);
        display: flex;
        align-items: center;
        justify-content: center;
        background: #F8F9FA;
        border-radius: 50%;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
        transition: background 0.12s;
    }
    #ftvg .vg-zelle:hover { background: #ffffff; }
    #ftvg .vg-disc {
        width: 0;
        height: 0;
        border-radius: 50%;
        transition: width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    #ftvg .vg-zelle.besetzt .vg-disc { width: calc(var(--vg-cell) * 0.82); height: calc(var(--vg-cell) * 0.82); }
    #ftvg .vg-disc.p1 { background: var(--disc-p1); box-shadow: 0 2px 8px rgba(229, 57, 53, 0.45); }
    #ftvg .vg-disc.p2 { background: var(--disc-p2); box-shadow: 0 2px 8px rgba(230, 171, 0, 0.45); }
    @keyframes ftvg-gewinn {
        0%   { transform: scale(1); }
        40%  { transform: scale(1.18); }
        100% { transform: scale(1); }
    }
    #ftvg .vg-zelle.gewinn .vg-disc { animation: ftvg-gewinn 0.8s ease-in-out infinite; }
    /* Gewinnreihe auch ohne Animation erkennbar */
    #ftvg .vg-zelle.gewinn { box-shadow: 0 0 0 3px #ffffff, inset 0 2px 6px rgba(0, 0, 0, 0.25); }

    #ftvg .vg-menu-zeile { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }
    #ftvg .vg-bestaetigung { display: contents; }
    #ftvg .ftvg-knopf-warnung { background: #ffffff; border-color: var(--ftvg-fehler); color: var(--ftvg-fehler); }
    #ftvg .ftvg-knopf-warnung:hover, #ftvg .ftvg-knopf-warnung:focus { background: #FEF2F2; border-color: var(--ftvg-fehler); color: var(--ftvg-fehler); }

    /* ===== Ergebnisdialog ===== */
    #ftvg .modal {
        position: fixed;
        inset: 0;
        z-index: 100000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    #ftvg .modal.active { display: flex; }
    #ftvg .modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); }
    #ftvg .modal-content {
        position: relative;
        width: 100%;
        max-width: 420px;
        background: #ffffff;
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        padding: 30px 24px 24px;
        text-align: center;
        animation: ftvg-modal-ein 0.25s ease;
    }
    @keyframes ftvg-modal-ein {
        from { opacity: 0; transform: scale(0.96) translateY(12px); }
        to   { opacity: 1; transform: none; }
    }
    #ftvg .modal h2 { margin: 0 0 6px; font-family: inherit; font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--ftvg-text); }
    #ftvg .modal p { margin: 0; color: var(--ftvg-text-2); }
    #ftvg .vg-modal-disc-row { display: flex; justify-content: center; gap: 10px; margin: 14px 0 16px; }
    #ftvg .vg-modal-disc { width: 34px; height: 34px; border-radius: 50%; }
    #ftvg .vg-modal-disc.p1 { background: var(--disc-p1); }
    #ftvg .vg-modal-disc.p2 { background: var(--disc-p2); }
    #ftvg .vg-modal-knopfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

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

    /* ===== Responsive (Elementor: Tablet <= 1024px, Handy <= 767px) ===== */
    @media (max-width: 1024px) {
        #ftvg .ftvg-titel { font-size: 45px; }
        #ftvg .ftvg-intro { font-size: 16px; margin-top: 30px; }
        #ftvg .ftvg-box   { font-size: 16px; }
    }
    @media (max-width: 768px) {
        #ftvg { max-width: 95%; }
        #ftvg .ftvg-karte { padding: 24px 20px; }
    }
    @media (max-width: 767px) {
        #ftvg .ftvg-titel { font-size: 28px; }
        #ftvg .ftvg-intro { margin-top: 20px; }
        #ftvg .ftvg-spiel { margin-top: 24px; }
        #ftvg .ftvg-abschnitt { margin-top: 50px; }
        #ftvg .ftvg-abschnitt h2 { font-size: 28px; }
        #ftvg .ftvg-box   { padding: 15px; }
    }
    @media (max-width: 520px) {
        #ftvg { --vg-cell: clamp(28px, calc((95vw - 76px) / 7), 62px); }
        #ftvg .ftvg-karte { padding: 18px 8px; border-radius: 16px; }
        #ftvg .vg-modus-buttons, #ftvg .vg-schwierigkeit-buttons { flex-direction: column; align-items: stretch; width: 100%; max-width: 280px; }
    }

    @media (prefers-reduced-motion: reduce) {
        #ftvg *, #ftvg *::before, #ftvg *::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. */
#ftvg {
    --ftvg-schwarz: var(--ft-tinte);
    --ftvg-text: var(--ft-tinte);
    --ftvg-text-2: var(--ft-tinte-2);
    --ftvg-flaeche: var(--ft-flaeche);
    --ftvg-linie: var(--ft-linie);
    font-family: var(--ft-schrift);
    margin-top: 0;
    margin-bottom: 0;
}
#ftvg .ftvg-karte::before { animation: none; }
#ftvg .ftvg-text, #ftvg .ftvg-meldung, #ftvg .ftvg-knopf, #ftvg .ftvg-anleitung-liste li { font-size: var(--ft-fs-text); }
#ftvg .ftvg-bestzeiten, #ftvg .ftvg-ergebnis span { font-size: var(--ft-fs-klein); }
#ftvg .ftvg-stat-label { font-size: 0.95rem; letter-spacing: 0; }
#ftvg .ftvg-anleitung summary { font-size: var(--ft-fs-h4); }
#ftvg .ftvg-knopf { min-height: var(--ft-button-hoehe); font-weight: var(--ft-gewicht-fett); }
@media (max-width: 600px) {
    #ftvg .ftvg-knopf { font-size: var(--ft-fs-text); padding: 10px 16px; }
    #ftvg .ftvg-stat-label { font-size: 0.85rem; }
}
