/* Nr. 111 Fenster: EBENEN-TABELLE, die einzige Stelle für z-index von Fenstern und Schichten (Befund: checks/design-durchsicht-fenster-befund.md).
   Wert  Name                  Wer
     10  --ebene-woche         Planer-Wochenkopf (klebt)
     30  --ebene-kopf          Kopfzeile
     40  --ebene-leiste        untere Reiter-Leiste, Speicher-Hinweis
     45  --ebene-vollseite     Vertrag, Stallregeln (Pflicht), Karoline-Leerlauf
     50  --ebene-fenster       Fenster von unten (Standard)
     60  --ebene-tablet        Tablet-Schicht und -Fenster (eigenes Layout)
     65  --ebene-fenster-2     Fenster über Fenster (Pferde-Kalender), Fehlerseite
     70  --ebene-schoner       Bildschirmschoner, Einführung
     70  --ebene-fenster-2b    Abzeichen-Info (über Pferde-Kalender 65, unter Kalender-Tag; war schon 70)
     75  --ebene-fenster-3     Fenster über Fenster 2 (Kalender-Tag)
     80  --ebene-rueckfrage    Rückfragen (Löschen, Tor, Verlauf) und Fotoansicht, Galerie
     85  --ebene-eingabe       Heu-Buchung, Termin
     90  --ebene-eingabe-2     Hufschmied fällig, Termin erledigt, Gesundheit
     95  --ebene-bild          Pferde-Akte, Moment-Ansicht
     96  --ebene-blatt         Bestätigen/Eingabe-Blatt (uiSheet), Karoline-Gast
     97  --ebene-wund          Wundverlauf (Vollbild)
    100  --ebene-oben          Aussetzen, Hof-PDF, Bänder (Einsteller-Ansicht, Verbindung)
    105  --ebene-toast         Meldungen
    110  --ebene-start         Startbild
   Reihenfolge Fenster über Fenster: 50 < 65 < 70 < 75 < 80 < 85 < 90 < 96 < 100 < 105. Neue Fenster nehmen --ebene-fenster. */
:root {
    /* Nr. 289 A: Takt der Bewegung (Vorlage img/kopfzeile-zaunbrett/vorlage/tierbewegung-vorlage.html). Alle Dauern sind ein Vielfaches davon, alle Kurven eine der drei (Ausnahmen: tools/takt-ausnahmen.json, geprüft von tests/tier-takt.test.js) */
    --takt-tipp: 150ms; --tipp-skala: .97; --tipp-skala-gross: .985; --takt-wechsel: 250ms; --takt-auftritt: 600ms; --takt-ruhe: 4s;
    --kurve-raus: cubic-bezier(.22, 1, .36, 1); --kurve-weich: cubic-bezier(.65, 0, .35, 1); --kurve-feder: cubic-bezier(.34, 1.56, .64, 1);
    --tier-tempo: 1;  /* Nr. 289 J: Tageszeit-Faktor der Tiere (morgens/abends 1,25, mittags 0,9), gesetzt von js/tier-bewegung.js */
    --ebene-woche: 10; --ebene-kopf: 30; --ebene-leiste: 40; --ebene-vollseite: 45; --ebene-fenster: 50; --ebene-tablet: 60;
    --ebene-fenster-2: 65; --ebene-fenster-2b: 70; --ebene-schoner: 70; --ebene-fenster-3: 75; --ebene-rueckfrage: 80; --ebene-eingabe: 85; --ebene-eingabe-2: 90;
    --ebene-bild: 95; --ebene-blatt: 96; --ebene-wund: 97; --ebene-oben: 100; --ebene-toast: 105; --ebene-start: 110;
}
.ebene-vollseite { z-index: var(--ebene-vollseite); } .ebene-fenster { z-index: var(--ebene-fenster); } .ebene-fenster-2 { z-index: var(--ebene-fenster-2); }
.ebene-fenster-2b { z-index: var(--ebene-fenster-2b); } .ebene-fenster-3 { z-index: var(--ebene-fenster-3); } .ebene-rueckfrage { z-index: var(--ebene-rueckfrage); } .ebene-eingabe { z-index: var(--ebene-eingabe); }
.ebene-eingabe-2 { z-index: var(--ebene-eingabe-2); } .ebene-bild { z-index: var(--ebene-bild); } .ebene-blatt { z-index: var(--ebene-blatt); }
.ebene-wund { z-index: var(--ebene-wund); } .ebene-oben { z-index: var(--ebene-oben); } .ebene-toast { z-index: var(--ebene-toast); } .ebene-start { z-index: var(--ebene-start); }
        .hide-scrollbar::-webkit-scrollbar { display: none; }
        .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
        .sortable-ghost { opacity: 0.4; }

        /* Stufe J4: ruhigere Optik – Animationen höchstens dreimal, „Bewegung reduzieren“ beachten */
        .animate-bounce, .animate-pulse { animation-iteration-count: 3; }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
        }
        /* Ziehgriffe nur im Modus „Dashboard anpassen“ und im Pferde-Sortiermodus */
        html:not(.dash-edit) #viewDashboard .fa-grip-lines { display: none !important; }
        html.dash-edit #viewDashboard > .dashboard-module:not(.hidden) { cursor: move; outline: 1.5px dashed var(--st-linie); outline-offset: 2px; border-radius: var(--st-rundung); }
        html:not(.pferd-sortieren) #horseModalSectionsContainer .fa-grip-lines { display: none; }
        html.pferd-sortieren #horseModalSectionsContainer > .horse-section-item { cursor: move; }
        #heuteHofLeben:not(:has(> :not(.hidden))) { display: none; }
        html.dark #bootLoading { background-color: #dcebf3; color: #3b2f25; }  /* Startbild: Himmel auch im Dunkelmodus; Id statt Klasse: sonst gewinnt die Regel aus dunkel.css */

        /* Hufeisen-Symbol (Font Awesome Free hat keins): eigene Form, Farbe wie der Text */
        .fa-hufeisen::before {
            content: "" !important; display: inline-block; width: 1.1em; height: 1em; vertical-align: -0.125em;
            background-color: currentColor;
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.6 21C2.6 15 2.9 8.2 6.6 5.1c3-2.5 7.8-2.5 10.8 0 3.7 3.1 4 9.9 1 15.9' fill='none' stroke='black' stroke-width='4.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.6 21C2.6 15 2.9 8.2 6.6 5.1c3-2.5 7.8-2.5 10.8 0 3.7 3.1 4 9.9 1 15.9' fill='none' stroke='black' stroke-width='4.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
        }

        /* Branding „Reissnerhof“: Kopfzeile 100 px, Tiere stehen auf der unteren Kante (Standlinie bei 505/676 der Bildhöhe).
           bottom = -6,64 % der Breite (bei 390 px also -26 px), höchstens -40 px; Bild höchstens 600 px breit und mittig. */
        /* Optimierung D: die Leiste unten bleibt bei jeder Schrift-Auswahl gleich breit, sonst stoßen die Wörter an den Rand */
        nav .text-mini { font-size: 12px; }  /* Nr. 397 A: Leisten-Beschriftung 12 px */
        html[style*="font-size"] .schrift-umbruch { flex-wrap: wrap; row-gap: 0.5rem; }  /* nur bei größerer Schrift: bei normal bleibt jede Zeile wie sie ist */
        html[style*="font-size"] .schrift-umbruch > input { flex-basis: 100%; }
        html[style*="font-size"] .bs-titel.flex { min-width: 0; flex-wrap: wrap; }  /* Nr. 305 D2: Karten-Titel mit Symbol bricht bei großer Schrift um, statt über den Rand zu laufen */
        html[style*="font-size"] .bs-titel > span:not(.bs-symbol) { min-width: 0; overflow-wrap: anywhere; }
        html[style*="125%"] .pferd-rasse { display: none; }  /* Martin 3.11.2026: bei „sehr groß“ ohne Rasse, sie steht im Pferd-Fenster */
        html[style*="font-size"] .schrift-einspaltig { grid-template-columns: minmax(0, 1fr); }
        html[style*="font-size"] .schrift-zweispaltig { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        :root { --kopf-oben: 85px; --kopf-h: calc(var(--kopf-oben) + 0.2179 * min(100vw, 600px)); --kopf-fest: min(72px, calc(0.1641 * 100vw)); scroll-padding-top: calc(var(--kopf-fest) + 8px); }  /* Auftrag kopfzeile-wiese: 190 px bei 390, 236 px bei 600; die Standlinie (78,3 % der Bildhöhe) bleibt an der Unterkante */
        /* Auftrag header-scroll: Die Kopfzeile scrollt nach oben, bis nur die schmale Leiste (--kopf-fest, 64 px bei 390) übrig ist. Die Höhe im Fluss bleibt gleich, darum springt der Inhalt nicht. Die Marke löst das Schrumpfen gleich zu Beginn aus, darum klebt nie Schrift am Rand */
        #kopfMarke { position: absolute; top: 0; left: 0; width: 1px; height: 12px; pointer-events: none; }
        .kopf-schild { position: sticky; top: 8px; z-index: 6; height: 0; max-width: 600px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: flex-end; pointer-events: none; }
        .kopf-schild button { pointer-events: auto; }
        #kopfzeile.kopf-fest .kopf-schild button span span { display: none; }  /* fixiert nur Symbol und Zahl, damit das Schild möglichst kein Tier verdeckt */
        @media (orientation: landscape) and (max-height: 500px) {  /* Martin 4.11.2026: quer auf dem Handy nimmt die Kopfzeile sonst die Hälfte, also ganz wegscrollen; das Schild bleibt */
            :root { --kopf-fest: 0px; scroll-padding-top: 8px; }
            .kopf-schild { position: fixed; left: 0; right: 0; }
        }
        #kopfzeile { position: sticky; top: calc(var(--kopf-fest) - var(--kopf-h)); z-index: var(--ebene-kopf); height: var(--kopf-h); --himmel-oben: #bfe3f5; --himmel-unten: #eaf6fc; --kopf-titel: #1f4a2b; background: linear-gradient(var(--himmel-oben), var(--himmel-unten)); }
        @media (orientation: landscape) and (max-height: 500px) { #kopfzeile { position: relative; top: auto; } }
        html.dark #kopfzeile { --himmel-oben: #2c365e; --himmel-unten: #545c8c; --kopf-titel: #ffffff; }
        .kopf-zeile { position: absolute; top: 8px; left: 0; right: 0; max-width: 600px; margin: 0 auto; padding: 0 16px; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
        .kopf-titel { flex: 1; min-width: 0; }
        .kopf-zeile h1 { margin: 0; white-space: nowrap; font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--kopf-titel); }
        #kopfGruss { margin: 0; max-width: 54%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--kopf-titel); }
        /* Szene: liegt ganz hinten, fängt keine Tipps; Himmelsteile in der Breite des Tierbilds */
        .kopf-szene { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
        .kopf-huegel { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(0.2308 * min(100vw, 600px)); display: block; }
        .kopf-berg { pointer-events: none; height: var(--kopf-h); }  /* ganze Höhe der Kopfzeile, Gipfel neben dem Titel */  /* Auftrag kopfzeile-natur-hof B: Berg hinter den Hügeln */
        .kopf-berg-nebel { opacity: .14; }
        .kopf-himmel { position: absolute; inset: 0; max-width: 600px; margin: 0 auto; }
        .kopf-sonne, .kopf-mond { position: absolute; top: var(--gestirn-oben, 22px); right: var(--gestirn-rechts, 7.7%); width: 44px; height: 44px; border-radius: 50%; background: var(--kopf-sonne); box-shadow: 0 0 0 10px var(--kopf-schein); overflow: hidden; }
        .kopf-mond::after { content: ""; position: absolute; top: -6px; left: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--himmel-oben); }
        .kopf-stern { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffffff; opacity: .85; }
        .kopf-wolke { position: absolute; top: 40px; left: 62%; width: 46px; height: 14px; border-radius: 10px; background: #ffffff; opacity: .92; }
        .kopf-wolke::before, .kopf-wolke::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
        .kopf-wolke::before { left: 7px; top: -8px; width: 18px; height: 18px; }
        .kopf-wolke::after { left: 21px; top: -12px; width: 22px; height: 22px; }
        .kopf-blass { opacity: .45; }
        /* Auftrag kopfzeile-tiere-bleiben Teil 2: an der Stelle der Sonne, der Wetter-Knopf liegt darüber */
        .kopf-wolke.kopf-wolke-gross { top: calc(var(--gestirn-oben, 22px) + 20px); left: auto; right: var(--gestirn-rechts, 7.7%); width: 44px; height: 18px; opacity: 1; }
        .kopf-wolke-gross::before { left: 5px; top: -12px; width: 20px; height: 20px; }
        .kopf-wolke-gross::after { left: 18px; top: -20px; width: 24px; height: 24px; }
        .kopf-wolke-gross.kopf-grau { background: #a9b4c0; }
        .kopf-wolke-gross.kopf-dunkel { background: #8088a6; }
        .kopf-wolke-gross.kopf-grau.kopf-dunkel { background: #6a7290; }
        .kopf-wolke-zwei { top: 66px; left: 50%; }
        .kopf-wolke-nacht { opacity: .3; }
        .kopf-wolke-klein { transform: scale(.7); transform-origin: left center; }
        .kopf-nebel { position: absolute; left: 0; right: 0; bottom: 0; height: calc(0.2308 * min(100vw, 600px) + 16px); background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.62) 45%); }
        #kopfSzene[data-tageszeit="abend"] .kopf-nebel { opacity: .45; }
        .kopf-regen { position: absolute; width: 2px; height: 13px; border-radius: 2px; background: rgba(255,255,255,.85); box-shadow: 0 0 0 .5px rgba(70,95,125,.55); transform: rotate(calc(-18deg * var(--wind-richtung, 1))); }
        .kopf-windlinie { position: absolute; width: 34px; height: 3px; border-radius: 3px; background: #ffffff; opacity: .85; animation: kopf-zieht calc(var(--takt-wechsel) * 28) ease-in-out infinite alternate; }
        .kopf-deko.kopf-fliegt { background-color: #c6892f; animation: kopf-zieht calc(var(--takt-wechsel) * 28) ease-in-out infinite alternate; }
        @keyframes kopf-zieht { 0% { transform: translateX(-6px); } 100% { transform: translateX(12px); } }
        html.tiere-aus .kopf-windlinie, html.tiere-aus .kopf-fliegt { animation: none; }
        .kopf-deko { position: absolute; display: block; }
        .kopf-bluete { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
        .kopf-falter { width: 7px; height: 9px; border-radius: 60% 60% 45% 45%; box-shadow: 8px 0 0 0 currentColor; }
        .kopf-blatt { width: 7px; height: 7px; border-radius: 0 70% 0 70%; }
        .kopf-flocke { width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 0 2px rgba(120,140,170,.7); }
        @keyframes kopf-faellt { 0% { transform: translateY(-4px) rotate(0deg); } 100% { transform: translateY(14px) rotate(40deg); } }
        .kopf-faellt { animation: kopf-faellt calc(var(--takt-auftritt) * 30) ease-in-out infinite alternate; }
        html.tiere-aus .kopf-faellt { animation: none; }
        /* Auftrag kopfzeile-extras B: Wetter antippen; ohne z-index am Platz, sonst läge das Fenster unter den Tieren */
        .kopf-wetter-platz { position: absolute; top: 0; left: 0; right: 0; height: 0; max-width: 600px; margin: 0 auto; }
        #kopfWetterKnopf { position: absolute; top: calc(var(--gestirn-oben, 22px) - 4px); right: calc(var(--gestirn-rechts, 7.7%) - 4px); width: 52px; height: 52px; z-index: 5; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
        #kopfWetter { position: absolute; top: 74px; right: 16px; z-index: 8; width: min(230px, calc(100% - 32px)); padding: 8px 12px; border-radius: 14px; background: #ffffff; color: #0f172a; font-size: 13px; font-weight: 600; line-height: 1.35; box-shadow: 0 4px 14px rgba(15,23,42,.25); }
        #kopfWetter::before { content: ""; position: absolute; top: -6px; right: var(--wetter-pfeil, calc(var(--gestirn-rechts, 7.7%) + 6px)); margin-right: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #ffffff; }
        html.dark #kopfWetter { background: #f1f5f9; }
        html.dark #kopfWetter::before { border-bottom-color: #f1f5f9; }
        .kopf-wetter-tag > b { display: block; font-weight: 800; }
        .kopf-wetter-tag > span { display: block; }
        .kopf-wetter-tag + .kopf-wetter-tag, .kopf-wetter-leer { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #e2e8f0; }
        /* Auftrag kopfzeile-extras D: Glühwürmchen, ohne Bewegung leicht leuchtend */
        .kopf-glueh { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #e8ff8a; box-shadow: 0 0 6px 2px rgba(232,255,138,.65); opacity: .75; animation: kopf-glimmt calc(var(--takt-wechsel) * 20) ease-in-out infinite, kopf-schwebt calc(var(--takt-auftritt) * 15) ease-in-out infinite alternate; }
        @keyframes kopf-glimmt { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
        @keyframes kopf-schwebt { 0% { transform: translate(-3px, 3px); } 100% { transform: translate(5px, -4px); } }
        html.tiere-aus .kopf-glueh { animation: none; }
        /* Auftrag kopfzeile-extras C: hinter den Hügeln, die Enden verschwinden dort. Blendet in den letzten 10 der 60 Minuten aus */
        .kopf-regenbogen { position: absolute; left: calc(50% + 0.22 * min(100vw, 600px) - 90px); bottom: calc(0.1 * min(100vw, 600px)); width: 180px; height: 90px; opacity: .7; animation: kopf-regenbogen-weg 3600s linear forwards; }
        @keyframes kopf-regenbogen-weg { 0%, 83% { opacity: .7; } 100% { opacity: 0; } }
        html.tiere-aus .kopf-regenbogen { animation: none; }
        /* Auftrag kopfzeile-extras A: Feiertage */
        .kopf-konfetti { width: 5px; height: 8px; border-radius: 1px; }
        .kopf-kette { position: absolute; left: 50%; top: 8px; width: 100px; height: 34px; }
        .kopf-feierstern { position: absolute; width: 10px; height: 10px; background: #f5c542; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
        .kopf-schlange { display: block; width: 16px; height: 42px; }
        .kopf-burst { position: absolute; width: 26px; height: 26px; fill: none; stroke-width: 1.8; stroke-linecap: round; opacity: .9; animation: kopf-leuchtet calc(var(--takt-ruhe) * 2) ease-in-out infinite; }
        @keyframes kopf-leuchtet { 0%, 100% { opacity: 0; transform: scale(.6); } 40% { opacity: .95; transform: scale(1); } 70% { opacity: .7; transform: scale(1.04); } }
        html.tiere-aus .kopf-burst { animation: none; }
        @media (prefers-reduced-motion: reduce) { .kopf-faellt, .kopf-burst, .kopf-regenbogen, .kopf-glueh, .kopf-windlinie, .kopf-deko.kopf-fliegt { animation: none; } }
        /* 35zw Teil D: zwischen Kopfzeile und erstem Inhalt derselbe Abstand wie zwischen den Karten (16 px). Die Tiere enden über dem Brett,
           nichts ragt unter die Kopfzeile. Die versteckten Ansichten davor lösen kein zusätzliches space-y aus. */
        :root { --inhalt-oben: 16px; }
        #inhalt { padding-top: var(--inhalt-oben); }
        #inhalt > .tab-content { margin-top: 0; }
        #inhalt > .tab-content > :not(:not(.hidden) ~ *) { margin-top: 0; }  /* erstes sichtbares Element einer Ansicht: kein space-y-Abstand nach versteckten Geschwistern */
        #inhalt > #offlineSchild:not(.hidden) { margin-bottom: 1.25rem; }

        #kopfBlase { position: absolute; z-index: 7;  /* über dem Titel (6): bei hohen Köpfen reicht die Blase bis dorthin */ pointer-events: none; white-space: nowrap; padding: 4px 10px; border-radius: 14px;
            background: #ffffff; color: #1f2937; font-size: 14px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.25);
            opacity: 0; transform: translateY(4px) scale(.9); transition: opacity .15s, transform .15s; }
        #kopfBlase::after { content: ""; position: absolute; left: var(--zipfel, 50%); bottom: -6px; margin-left: -6px;
            border: 6px solid transparent; border-bottom: 0; border-top-color: #ffffff; }
        #kopfBlase.zeigen { opacity: 1; transform: none; }
        #kopfBlase { visibility: hidden; transform: translateY(4px);  /* ohne Verkleinern, sonst unter 44 px beim Einblenden */ transition: opacity .15s, transform .15s, visibility .15s; min-height: 44px; display: flex; align-items: center; pointer-events: none; border: 0; text-align: left; line-height: 1.25; white-space: normal; width: max-content; max-width: calc(100% - 158px); }  /* Auftrag kopfzeile-wiese C: Anlässe */
        #kopfBlase.zeigen { visibility: visible; pointer-events: auto; cursor: pointer; }
        html.dark #kopfBlase { background: #f1f5f9; color: #0f172a; }
        html.dark #kopfBlase::after { border-top-color: #f1f5f9; }
        html.tiere-aus #kopfBlase { display: none; }



        /* Planer-Tageskarte: Personen-Pille (Farbe aus dem Register, immer dunkle Schrift), „Du“-Ring auch für den Dienst-Partner */
        .dienst-pille { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 100%; white-space: nowrap; border-radius: 9999px; border: 0; padding: 2px 12px; font-size: var(--st-groesse-klein, 13px); font-weight: 700; line-height: 1.4; color: #0f172a !important; }  /* Nr. 144: 13/700 */
        .dienst-pille-gross { padding: 3px 14px; font-size: var(--st-groesse-gross, 17px); }
        .dienst-du { outline: 2.5px solid #0f172a; outline-offset: 2px; }
        .dienst-du-legende { outline: 2.5px solid #0f172a; outline-offset: 1px; width: 10px; height: 10px; margin: 0 2px; background: transparent; }  /* Nr. 304 F: Legende „Umrandet = dein Dienst“ */
        /* Nr. 194: „Dienst geschafft“ in der Heute-Karte – weiche grüne Fläche (Ton „aktiv“), Haken im Kreis; nicht lauter als der Rest. Hell und Nachtblau über die Ton-Variablen */
        .dienst-fertig-karte { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); border: 1px solid transparent; box-shadow: inset 0 0 0 1px rgba(27, 61, 39, .16); }
        html.dark .dienst-fertig-karte { box-shadow: inset 0 0 0 1px rgba(232, 236, 241, .14); }
        .dienst-fertig-sub { font-weight: 500; }
        .dienst-fertig-zeile { color: var(--st-ton-aktiv-text); font-weight: 700; }
        .dienst-fertig-haken { flex: none; width: 32px; height: 32px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; background: var(--st-ton-aktiv-text); color: var(--st-ton-aktiv); font-size: var(--st-groesse-klein, 13px); }
        .dienst-fertig-klein { width: 20px; height: 20px; font-size: 11px; }
        .dienst-fertig-neu { animation: dienst-fertig-ein calc(var(--takt-tipp) * 2) var(--kurve-raus); }
        @keyframes dienst-fertig-ein { from { transform: scale(.3) translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
        @media (prefers-reduced-motion: reduce) { .dienst-fertig-neu { animation: none; } }
        html.tiere-aus .dienst-fertig-neu { animation: none; }
        html.dark .dienst-du, html.dark .dienst-du-legende { outline-color: #fff; }
        .dienst-pille.bg-pink-100 { background-color: #fbcfe8 !important; } html.dark .dienst-pille.bg-pink-100 { background-color: #f9a8d4 !important; }
        .dienst-pille.bg-sky-100 { background-color: #bae6fd !important; } html.dark .dienst-pille.bg-sky-100 { background-color: #7dd3fc !important; }
        .dienst-pille.bg-violet-100 { background-color: #ddd6fe !important; } html.dark .dienst-pille.bg-violet-100 { background-color: #c4b5fd !important; }
        .dienst-pille.bg-teal-100 { background-color: #99f6e4 !important; } html.dark .dienst-pille.bg-teal-100 { background-color: #5eead4 !important; }
        .dienst-pille.bg-amber-100 { background-color: #fde68a !important; } html.dark .dienst-pille.bg-amber-100 { background-color: #fcd34d !important; }
        .dienst-pille.bg-lime-100 { background-color: #d9f99d !important; } html.dark .dienst-pille.bg-lime-100 { background-color: #bef264 !important; }
        .dienst-pille.bg-rose-100 { background-color: #fecdd3 !important; } html.dark .dienst-pille.bg-rose-100 { background-color: #fda4af !important; }
        .dienst-pille.bg-indigo-100 { background-color: #c7d2fe !important; } html.dark .dienst-pille.bg-indigo-100 { background-color: #a5b4fc !important; }
        .dienst-pille.bg-orange-100 { background-color: #fed7aa !important; } html.dark .dienst-pille.bg-orange-100 { background-color: #fdba74 !important; }
        .dienst-pille.bg-cyan-100 { background-color: #a5f3fc !important; } html.dark .dienst-pille.bg-cyan-100 { background-color: #67e8f9 !important; }
        .dienst-pille.bg-fuchsia-100 { background-color: #f5d0fe !important; } html.dark .dienst-pille.bg-fuchsia-100 { background-color: #f0abfc !important; }
        .dienst-pille.bg-slate-100 { background-color: #e2e8f0 !important; } html.dark .dienst-pille.bg-slate-100 { background-color: #cbd5e1 !important; }
        .dienst-pille.bg-stone-200 { background-color: #d6d3d1 !important; } html.dark .dienst-pille.bg-stone-200 { background-color: #d6d3d1 !important; }

        /* Stufe K4b: Pferde-Akte – eigene Farben (auch im Dunkelmodus hell), beim Drucken nur die Akte */
        .akte-seite { background: #fff; color: #0f172a; color-scheme: light; }  /* Nr. 263 A: Felder (Checkbox, Auswahl, Datum) hell, auch wenn html.dark color-scheme dark setzt */
        /* Auftrag pferde-badges B: Akte bleibt hell, auch im Dunkelmodus */
        .akte-seite .akte-aussetzen, html.dark .akte-seite .akte-aussetzen { color: #475569; }
        .akte-seite .akte-knopf, html.dark .akte-seite .akte-knopf { background: #fff; border: 1px solid #94a3b8; color: #334155; }
        .akte-seite .akte-knopf-aktiv, html.dark .akte-seite .akte-knopf-aktiv { border-color: #10b981; color: #065f46; }
        .akte-leiste { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
        .akte-knopf { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
        [data-huf-vorschlag] .akte-knopf { font-weight: 700; }
        .akte-knopf-haupt { background: #047857; color: #fff; }
        .akte { font-size: 14px; line-height: 1.45; }
        /* Auftrag blutprobe C: fünf Spalten passen nicht aufs Handy; am Schirm wird jede Zeile ein Block mit Beschriftung, im Druck bleibt die Tabelle */
        .akte .blut-tabelle tr.akte-hervor td { font-weight: 700; }  /* Hintergrund druckt nicht jeder Browser */
        @media screen and (max-width: 600px) {
            .akte .blut-tabelle, .akte .blut-tabelle tbody { display: block; }
            .akte .blut-tabelle tr { display: block; padding: 6px 4px; border-bottom: 1px solid #e2e8f0; }
            .akte .blut-tabelle tr:first-child { display: none; }
            .akte .blut-tabelle td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
            .akte .blut-tabelle td:empty { display: none; }
            .akte .blut-tabelle td:first-child { font-weight: 700; }
            .akte .blut-tabelle td[data-titel]::before { content: attr(data-titel) ": "; color: var(--st-text-gedaempft, #64748b); }
        }
        /* Nr. 205: Blutwerte im Verlauf – Proben als Knöpfe, die umbrechen */
        .akte .blut-verlauf summary { list-style: revert; font-weight: 800; }
        .akte .blut-proben { display: flex; flex-wrap: wrap; gap: 4px; }
        .akte .blut-probe-auf { font-weight: 700; background: #fff7ed; border-color: #f59e0b; }
        .akte .blut-probe { text-align: left; overflow-wrap: anywhere; }
        .akte .blut-verlauf th { white-space: normal; width: 34%; overflow-wrap: anywhere; }
        .akte h1 { font-size: 26px; font-weight: 800; margin: 2px 0 8px; }
        .akte h2 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; padding-bottom: 3px; border-bottom: 2px solid #059669; }
        .akte h3 { font-size: 14px; font-weight: 800; margin: 12px 0 4px; }
        .akte header { padding-top: 16px; }
        .akte table { width: 100%; border-collapse: collapse; }
        .akte th, .akte td { text-align: left; vertical-align: top; padding: 4px 6px 4px 0; border-bottom: 1px solid #e2e8f0; }
        .akte th { font-weight: 700; color: #475569; white-space: nowrap; }
        .akte-liste td:first-child { white-space: nowrap; }
        .akte ul { list-style: disc; padding-left: 20px; }
        .akte-klein { color: #64748b; font-size: 12px; }
        .akte-heu-davor:not(.hidden) { display: block; margin-top: 2px; }  /* Nr. 260 E */
        /* Nr. 139: Abzeichen-Sammlung in der Akte (Kacheln, nicht errungene als grauer Umriss) und kurze Feier */
        .akte ul.akte-abz-liste { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; break-inside: avoid; }
        .akte-abz { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; text-align: left; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px 8px; color: #0f172a; }
        .akte-abz-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; font-size: 13px; }
        .akte-abz-offen { border-style: dashed; }
        .akte-abz-offen .abzeichen { filter: grayscale(1); opacity: .45; }
        .abz-feier { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 70; display: flex; justify-content: center; }
        .abz-feier-karte { width: 100%; max-width: 380px; animation: abz-feier-rein calc(var(--takt-tipp) * 2) var(--kurve-raus) 1; }
        @keyframes abz-feier-rein { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
        @media print { .abz-feier { display: none; } }
        .akte-wichtig { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 10px; }
        .akte-blick { break-inside: avoid; page-break-inside: avoid; }  /* Auftrag pferde-akte-gesundheit: nicht mitten im Abschnitt umbrechen */
        .akte-hervor th, .akte-hervor td { background: #fff7ed; }
        /* Auftrag berichte-pdf A: Raster der letzten 4 Wochen (Mo–So) */
        .akte-raster { display: grid; grid-template-columns: repeat(7, 22px); gap: 4px; margin: 6px 0 4px; }
        .akte-raster-kopf { font-size: 13px; color: #64748b; text-align: center; }
        .akte-tag { display: inline-block; width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid #059669; box-sizing: border-box; vertical-align: middle;
                    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
        .akte-tag-taetigkeit { background: #059669; }
        .akte-tag-koppel { background: linear-gradient(135deg, #059669 50%, #fff 50%); }
        .akte-tag-nichts { border-color: #94a3b8; background: #e2e8f0; }
        .akte-tag-leer { border: 1.5px dashed #cbd5e1; }
        .akte-tag-aus { visibility: hidden; }
        .akte-tag-klein { width: 12px; height: 12px; border-radius: 3px; }
        .akte-eng th { white-space: normal; }  /* Auftrag berichte-pdf B: schmale Tabellen auf dem Handy */
        @media print {
            body > *:not(#akteModal) { display: none !important; }
            #akteModal { position: static !important; overflow: visible !important; }
            .akte-nicht-drucken { display: none !important; }
            .akte-nur-druck { display: inline !important; }
            p.akte-nur-druck { display: block !important; }  /* Nr. 263: „Gezeigt: …“ steht nur noch im Druck, als Absatz wie bisher */
            .akte { max-width: none; padding: 0; }
            .akte tr { break-inside: avoid; }
            .akte-blick { break-inside: avoid; page-break-inside: avoid; }
        }

        /* Auftrag tausch-symbol: nur ⇄ */
        .tausch-schild:focus-visible .tausch-schild-innen { outline: 2px solid var(--st-fokus); outline-offset: 2px; }

/* Auftrag heute-fuer-dich: gewählte Person im Planer bleibt im Dunkelmodus grün (dunkel.css färbt alle select dunkel) */
html.dark select#calFilterPerson.bg-emerald-600 { background-color: #047857; color: #fff; border-color: #047857; }

/* Hinweisleiste oben (showPortalNotice) im Dunkelmodus deckend, sonst scheint die Kopfzeile durch */
html.dark #portalNotice { background-color: #3b2a0e; }

/* Auftrag L2: Sync-Punkt am Profil-Kreis (grün gespeichert, gelb wartet, rot Konflikt/Fehler) */
.sync-punkt { position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 9999px; border: 2px solid var(--st-flaeche); pointer-events: none; }  /* Auftrag kopfzeile-ohne-knoepfe: Punkt sitzt auf der Karte in „Mehr“ */

/* Planer: Wochen-Überschrift klebt direkt unter der Kopfzeile, hinter Hufen und Pfoten. Der obere Streifen in Kartenfarbe
   (so hoch wie die Tiere überstehen) verdeckt, was zwischen den Füßen durchscrollt; im Fluss wirkt er wie Abstand. */
.planer-woche { position: sticky; top: calc(var(--kopf-fest) + var(--safe-oben, 0px)); z-index: var(--ebene-woche); margin: 0 -4px; padding-top: calc(0.0604 * min(100vw, 600px)); background: #fff; }
/* Pflichtfeld leer abgeschickt: in beiden Modi rot (dunkel überschreibt sonst die Rahmenfarbe) */
input[aria-invalid="true"], html.dark input[aria-invalid="true"] { border-color: #f43f5e !important; }

/* Auftrag stall-tablet: Tablet in der Futterkammer, quer, große Tippflächen (mindestens 64 px) */
body.tablet-modus { padding: 0 !important; overflow: hidden; font-size: 1.25rem; }
body.tablet-modus > *:not(#tabletAnsicht):not(#toast):not(#tabletSchoner):not(#momentViewer):not(#uiSheet):not(#kopfzeile):not(#karolineGast) { display: none !important; }  /* #karolineGast: Offline-Satz (Auftrag karoline-reagiert A) */
/* Auftrag 35zt A: dieselbe Zaunbrett-Kopfzeile wie am Handy, fest oben; Uhr, WLAN, Wer und Notfall liegen darüber, durchtippbar bis auf die Knöpfe */
body.tablet-modus #kopfzeile { position: fixed; top: 0; left: 0; right: 0; z-index: 0; }
body.tablet-modus .kopf-zeile { max-width: none; top: 3.6rem; padding-left: 1.25rem; }  /* Titel unter der großen Uhr, links vor Kirche und Mond */
body.tablet-modus #tabletAnsicht { background: transparent; pointer-events: none; }
body.tablet-modus #tabletAnsicht > * { pointer-events: auto; }
body.tablet-modus #tabletAnsicht > .tablet-seite, body.tablet-modus .tablet-seite > .tablet-kopf { pointer-events: none; }
body.tablet-modus .tablet-seite > :not(.tablet-kopf) { pointer-events: auto; }
body.tablet-modus .tablet-seite > :not(.tablet-kopf):not(.tablet-rueck) { background: var(--tablet-grund, var(--st-grund)); }  /* zustaende E: Rückgängig-Leiste bleibt dunkel (weiße Schrift) */
body.tablet-modus .tablet-kopf { height: var(--kopf-h); align-items: flex-start; padding-top: .5rem; background: transparent; }
body.tablet-modus .tablet-kopf .tablet-notfall { margin-left: auto; }
body.tablet-modus .tablet-kopf > * { pointer-events: auto; }
body.tablet-modus .tablet-kopf [data-tablet="wartet"] { margin-left: 9rem; max-width: 19rem; font-size: 1rem; line-height: 1.3; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 1rem; padding: .375rem .75rem; }  /* lesbar auf dem Himmel, klein über den Tieren */
body.tablet-modus .tablet-kopf .tablet-wer { margin-left: auto; }
body.tablet-nachtzeit #kopfzeile { filter: brightness(.7); }
/* Auftrag 35zt B: keine hellen Kästen mehr, Kacheln als Abschnitte mit Trennlinie (wie die Leer-Szenen am Handy) */
body.tablet-modus .tablet-kachel { background: transparent; border-width: 0 0 2px; border-radius: 0; border-color: rgba(100, 116, 139, .25); padding-left: .25rem; padding-right: .25rem; }
body.tablet-modus .tablet-kachel:last-child { border-bottom-width: 0; }
.tablet-karo { position: relative; margin-top: 5rem; margin-bottom: -.5rem; height: 0; }  /* Karoline schaut über die Oberkante der ersten Aufgabe */
.tablet-karo .karo-tier svg { width: 80px; height: auto; }
.tablet-karo .karo-blase { font-size: 1rem; padding: .375rem .75rem; }
body.tablet-modus .leer-szene { max-width: 360px; }
body.tablet-modus .tablet-foto { border-radius: 50%; }  /* rund wie die Profilbilder am Handy */
body.tablet-modus .tablet-gefahr { border-left: 4px solid #f59e0b; padding-left: .75rem; }  /* Auftrag 35zt C: Gefahr fällt auf, ohne Kasten */
body.tablet-modus .tablet-pferd { background: transparent; border-color: transparent; }
html.dark body.tablet-modus .tablet-kachel, html.dark body.tablet-modus .tablet-pferd { background-color: transparent; }  /* dunkel.css färbt bg-white um */
#tabletAnsicht { position: fixed; inset: 0; background: var(--tablet-grund, var(--st-grund)); }
html.dark #tabletAnsicht { --tablet-grund: var(--st-grund); }
.tablet-nacht { filter: brightness(.7); }
.tablet-seite { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.tablet-kopf { display: flex; align-items: center; gap: 1.5rem; padding: .25rem 1.25rem; min-height: 72px; flex-shrink: 0; }
.tablet-uhr { font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tablet-wer { display: flex; align-items: center; gap: 1rem; }
.tablet-notfall { margin-left: auto; }
.tablet-wer + .tablet-notfall { margin-left: 0; }
.tablet-wer { margin-left: auto; }
.tablet-knopf { min-height: 64px; min-width: 64px; padding: .5rem 1.25rem; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }
.tablet-zeile { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 64px; padding: .5rem 1rem; text-align: left; font-size: 1.25rem; flex-shrink: 0; }
.tablet-tabs { display: grid; grid-template-columns: repeat(5, 1fr); flex-shrink: 0; }  /* Nr. 298 B: fünfter Reiter „Wissen“ */
.tablet-tabs .tablet-knopf { min-height: 72px; }
.tablet-flaeche { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; }
.tablet-zwei { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; overflow: hidden; }
.tablet-spalte { display: flex; flex-direction: column; gap: .5rem; min-height: 0; overflow-y: auto; }
.tablet-schmal { max-width: 40rem; margin: 0 auto; }
.tablet-kachel { padding: .5rem 1rem; display: flex; flex-direction: column; gap: .25rem; flex-shrink: 0; }
.tablet-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.tablet-breit { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.tablet-reihe { display: flex; flex-wrap: wrap; gap: .75rem; }
.tablet-feld { min-height: 64px; width: 100%; padding: .5rem 1rem; font-size: 1.25rem; }
.tablet-pferd { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .75rem; min-height: 64px; }
.tablet-pferdkopf { display: flex; align-items: center; gap: 1rem; }
.tablet-foto { width: 7rem; height: 7rem; object-fit: cover; border-radius: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tablet-rueck { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem 1.25rem; flex-shrink: 0; background: #0f172a; color: #fff; }  /* Nr. 251 Paket 5: dunkle Leiste in beiden Modi (vorher bg-slate-900 text-white) */
.tablet-notfall.bs-knopf-gefahr { background: var(--st-ton-gefahr-text); color: var(--st-ton-gefahr); }  /* Notfall bleibt voll gefüllt und fällt auf */
.tablet-schicht { position: fixed; inset: 0; z-index: var(--ebene-tablet); background: rgb(15 23 42 / .6); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.tablet-fenster { width: min(52rem, 100%); max-height: 100%; overflow-y: auto; border-radius: 1.5rem; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

/* Auftrag kopfzeile-zaunbrett B: Zaun in der Kopfzeile. Die alte Leiste bleibt bis zum Aufräumen unsichtbar im Dokument */
#kopfzeile { overflow-x: clip; }  /* die Bühne ist 390 px breit, auf schmalen Geräten kein seitlicher Überlauf */
.kopf-zaun { position: absolute; left: 0; right: 0; bottom: 0; height: calc(30px * var(--zaun-skala, 1)); z-index: 2; pointer-events: none; background: #fbfaf7; border-top: 2.5px solid #2b2622; border-bottom: 2.5px solid #2b2622; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .75), inset 0 -3px 0 #e4ded4; }
.kopf-zaun::after { content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 1.5px; background: rgba(43, 38, 34, .09); pointer-events: none; }
html.dark .kopf-zaun { background: #e9e5dc; }
.zaun-buehne { position: absolute; left: 50%; bottom: 0; width: 390px; height: 172px; margin-left: -195px; transform: scale(var(--zaun-skala, 1)); transform-origin: 50% 100%; }
.zaun-brett { position: absolute; left: 8px; right: 8px; top: 158px; height: 2px; background: #e4ded4; opacity: .45; border-radius: 2px; }
.zaun-koppel { position: absolute; left: 0; top: 0; pointer-events: none; }  /* reine Zierde: Antippen geht durch */
.zaun-tier { position: absolute; }
.zaun-tier svg { display: block; overflow: visible; }
.zaun-hinter-brett:not(.zaun-gekuerzt) .zaun-innen > svg:first-child { clip-path: inset(0 0 var(--unter, 0px) 0); }  /* Auftrag kopfzeile-nachbesserung: Brust und Decke hinter dem Brett */
.zaun-hinter-brett.zaun-gekuerzt .zaun-innen > svg:first-child { clip-path: inset(0); }  /* gekürzt endet die Zeichnung schon am Brett; Kante bleibt trotzdem hart (Tiere-Wind-Test) */
.zaun-zzz { position: absolute; right: -6px; top: -2px; font-size: 13px; font-weight: 600; color: #f3eac2; }
.zaun-bob { animation: zaun-bob calc(var(--takt-wechsel) * 13) var(--kurve-weich) infinite; }
.zaun-hopp { animation: zaun-hopp calc(var(--takt-wechsel) * 18) var(--kurve-weich) infinite; }
.zaun-rein { animation: zaun-rein var(--takt-auftritt) var(--kurve-raus) both; }
/* Auftrag kopfzeile-lebendig Teil B: Frost, Hitze, Wind (nur transform/opacity, wenige Teile) */
.zaun-atem { position: absolute; width: 14px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(120, 140, 160, .25); pointer-events: none; opacity: 0; animation: zaun-atem calc(var(--takt-tipp) * 22) var(--kurve-raus) infinite; }
@keyframes zaun-atem { 0%, 50% { opacity: 0; translate: 0 0; scale: .4; } 62% { opacity: .9; } 100% { opacity: 0; translate: calc(9px * var(--wind-richtung, 1)) -7px; scale: 1.35; } }  /* zieht mit dem Wind */
.zaun-frost .zaun-brett { background: #f4f8fb; opacity: 1; box-shadow: 0 -1px 0 #ffffff, 0 1px 3px rgba(190, 220, 240, .95); }
.zaun-gras { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.zaun-gras .zaun-halm { fill: none; stroke: #6f8a4e; stroke-width: 1.6; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; }
.zaun-raureif .zaun-halm { stroke: #e6eef4; }
.zaun-wind .zaun-halm { animation: zaun-halm calc(var(--takt-tipp) * 11) var(--kurve-weich) infinite alternate; }
@keyframes zaun-halm { from { rotate: -7deg; } to { rotate: 9deg; } }
.zaun-fliege { position: absolute; width: 0; height: 0; pointer-events: none; animation: zaun-fliege calc(var(--takt-wechsel) * 8) linear infinite; }
.zaun-fliege::after { content: ""; position: absolute; left: 8px; top: 0; width: 3px; height: 3px; border-radius: 50%; background: #1d1a17; box-shadow: 0 0 0 1px rgba(255, 255, 255, .45); }
@keyframes zaun-fliege { to { rotate: 360deg; } }
#kopfzeile.kopf-windig .kopf-nb-1 { animation-duration: calc(var(--takt-auftritt) * 37); }
#kopfzeile.kopf-windig .kopf-nb-2 { animation-duration: calc(var(--takt-ruhe) * 4); }
#kopfzeile.kopf-windig .kopf-nb-vorne { animation-duration: calc(var(--takt-ruhe) * 5); }
#kopfzeile.kopf-windig .kopf-wolke { animation: kopf-wolke-wind calc(var(--takt-wechsel) * 28) var(--kurve-weich) infinite alternate; }
@keyframes kopf-wolke-wind { from { translate: -8px 0; } to { translate: 12px 0; } }
/* Auftrag kopfzeile-natur-hof A: Fellwechsel – Büschel löst sich ab und zu (nicht dauernd), Vogel selten; nur transform/opacity */
.zaun-fell { position: absolute; width: 11px; height: 7px; border-radius: 50% 60% 45% 55%; background: #c9a27a; box-shadow: 3px -1px 0 -1px #b8906a, -2px 1px 0 -1px #d8b892; pointer-events: none; opacity: 0; animation: zaun-fell calc(var(--takt-wechsel) * 38) var(--kurve-raus) infinite; }
@keyframes zaun-fell { 0%, 70% { opacity: 0; transform: none; } 73% { opacity: 1; } 90% { opacity: .85; } 100% { opacity: 0; transform: translate(calc(30px * var(--wind-richtung, 1)), -18px) rotate(140deg); } }
.zaun-vogel { position: absolute; width: 16px; height: 10px; pointer-events: none; opacity: 0; animation: zaun-vogel calc(var(--takt-auftritt) * 38) var(--kurve-weich) infinite calc(var(--takt-auftritt) * 5); }
@keyframes zaun-vogel { 0% { opacity: 0; transform: translate(230px, -95px) scaleX(-1); } 3% { opacity: 1; } 12% { transform: translate(0, -2px) scaleX(-1); } 15% { transform: translate(0, 0) scaleX(-1); } 27% { opacity: 1; transform: translate(-250px, -105px) scaleX(-1); } 29%, 100% { opacity: 0; transform: translate(-250px, -105px) scaleX(-1); } }
html.tiere-aus .zaun-fell, html.tiere-aus .zaun-vogel, #kopfzeile.kopf-fest .zaun-fell, #kopfzeile.kopf-fest .zaun-vogel { display: none; }
@media (prefers-reduced-motion: reduce) { .zaun-fell, .zaun-vogel { display: none; } }
/* Auftrag kopfzeile-natur-hof C: Fledermaus ab und zu über den Sommer-Abendhimmel, Fuchs schleicht nachts am Zaun, Blue hebt kurz den Kopf */
.kopf-fledermaus { position: absolute; left: 0; top: 18%; width: 22px; height: 10px; pointer-events: none; opacity: 0; animation: kopf-fledermaus calc(var(--takt-auftritt) * 52) linear infinite var(--takt-ruhe); }
.kopf-fledermaus-fluegel { transform-origin: 11px 5px; animation: kopf-flattert var(--takt-wechsel) var(--kurve-weich) infinite alternate; }
@keyframes kopf-fledermaus { 0% { opacity: 0; transform: translate(-30px, 20px); } 2% { opacity: .9; } 8% { transform: translate(calc(min(100vw, 600px) * .45), -6px); } 15% { opacity: .9; transform: translate(calc(min(100vw, 600px) + 30px), 14px); } 16%, 100% { opacity: 0; transform: translate(calc(min(100vw, 600px) + 30px), 14px); } }
@keyframes kopf-flattert { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
.zaun-fuchs { position: absolute; width: 48px; height: 23px; pointer-events: none; opacity: 0; animation: zaun-fuchs calc(var(--takt-auftritt) * 43) linear infinite calc(var(--takt-wechsel) * 8); }
@keyframes zaun-fuchs { 0% { opacity: 0; transform: translateX(0); } 3% { opacity: 1; } 42% { opacity: 1; transform: translateX(-250px); } 45%, 100% { opacity: 0; transform: translateX(-262px); } }
.zaun-wach > .zaun-innen > svg:first-child { animation: zaun-wach calc(var(--takt-auftritt) * 43) var(--kurve-weich) infinite calc(var(--takt-wechsel) * 8); transform-origin: 50% 100%; }
@keyframes zaun-wach { 0%, 8%, 40%, 100% { transform: none; } 12%, 34% { transform: translateY(-3px) rotate(2deg); } }
html.tiere-aus .kopf-fledermaus, html.tiere-aus .zaun-fuchs, #kopfzeile.kopf-fest .kopf-fledermaus, #kopfzeile.kopf-fest .zaun-fuchs { display: none; }
html.tiere-aus .zaun-wach > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-wach > .zaun-innen > svg:first-child { animation: none; }
@media (prefers-reduced-motion: reduce) { .kopf-fledermaus, .zaun-fuchs { display: none; } .zaun-wach > .zaun-innen > svg:first-child { animation: none; } }
/* Auftrag kopfzeile-natur-hof D: nach Regen oder Schnee wälzt sich ein Pferd einmal, die Ziegen stehen auf einem Strohballen */
.zaun-waelzt > .zaun-innen { clip-path: inset(-80px -60px var(--unter, 0px) -60px); }  /* was unter das Brett rollt, verschwindet dahinter */
.zaun-waelzt > .zaun-innen > svg:first-child { transform-origin: 50% 100%; animation: zaun-waelzt calc(var(--takt-tipp) * 31) var(--kurve-weich) calc(var(--takt-auftritt) * 2) 1 both; }
@keyframes zaun-waelzt { 0%, 100% { transform: none; } 14% { transform: translateY(30%) rotate(-10deg); } 26% { transform: translateY(58%) rotate(-30deg); } 38% { transform: translateY(54%) rotate(24deg); } 50% { transform: translateY(60%) rotate(-28deg); } 62% { transform: translateY(54%) rotate(20deg); } 78% { transform: translateY(14%) rotate(-5deg); } 90% { transform: translateY(-3%) rotate(2deg); } }
.zaun-auf-ballen > .zaun-innen { translate: 0 -24px; }
.zaun-ballen { position: absolute; left: 50%; bottom: calc(var(--unter, 0px) - 26px); width: 50px; height: 28px; margin-left: -25px; pointer-events: none; }
.zaun-ballen > svg { width: 100%; height: 100%; }
html.tiere-aus .zaun-waelzt > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-waelzt > .zaun-innen > svg:first-child { animation: none; }
#kopfzeile.kopf-fest .zaun-waelzt > .zaun-innen { clip-path: none; }
#kopfzeile.kopf-fest .zaun-auf-ballen > .zaun-innen { translate: none; }
#kopfzeile.kopf-fest .zaun-ballen { display: none; }
@media (prefers-reduced-motion: reduce) { .zaun-waelzt > .zaun-innen > svg:first-child { animation: none; } }
/* Auftrag kopfzeile-natur-hof E: Mittagsläuten – Glocke schwingt, Klang-Linien, Tiere drehen kurz den Kopf zum Turm; kein Ton */
.kopf-glocke { transform-box: fill-box; transform-origin: 50% 0; }
.kopf-huegel { overflow: visible; }  /* die Turmspitze ragt über den Hügel hinaus */
.kopf-turm-mittag .kopf-glocke { animation: kopf-glocke calc(var(--takt-tipp) * 9) var(--kurve-weich) infinite alternate; }
@keyframes kopf-glocke { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
.kopf-klang path { opacity: 0; animation: kopf-klang calc(var(--takt-tipp) * 9) var(--kurve-raus) infinite; }
.kopf-klang path:nth-child(even) { animation-delay: .35s; }
@keyframes kopf-klang { 0% { opacity: 0; } 30% { opacity: .8; } 100% { opacity: 0; } }
.zaun-zum-turm-r > .zaun-innen > svg:first-child, .zaun-zum-turm-l > .zaun-innen > svg:first-child { transform-origin: 50% 100%; animation: zaun-zum-turm-r calc(var(--takt-wechsel) * 28) var(--kurve-weich) calc(var(--takt-wechsel) * 2) 1 both; }
.zaun-zum-turm-l > .zaun-innen > svg:first-child { animation-name: zaun-zum-turm-l; }
@keyframes zaun-zum-turm-r { 0%, 100% { transform: none; } 15%, 70% { transform: translateX(2px) rotate(5deg); } }
@keyframes zaun-zum-turm-l { 0%, 100% { transform: none; } 15%, 70% { transform: translateX(-2px) rotate(-5deg); } }
html.tiere-aus .kopf-turm-mittag .kopf-glocke, html.tiere-aus .kopf-klang path, #kopfzeile.kopf-fest .kopf-turm-mittag .kopf-glocke, #kopfzeile.kopf-fest .kopf-klang { animation: none; }
#kopfzeile.kopf-fest .kopf-klang { display: none; }
html.tiere-aus .zaun-zum-turm-r > .zaun-innen > svg:first-child, html.tiere-aus .zaun-zum-turm-l > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-zum-turm-r > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-zum-turm-l > .zaun-innen > svg:first-child { animation: none; }
@media (prefers-reduced-motion: reduce) { .kopf-turm-mittag .kopf-glocke, .kopf-klang path, .zaun-zum-turm-r > .zaun-innen > svg:first-child, .zaun-zum-turm-l > .zaun-innen > svg:first-child { animation: none; } .kopf-klang path { opacity: .6; } }
html.tiere-aus .zaun-atem, html.tiere-aus .zaun-fliege { display: none; }
#kopfzeile.kopf-fest .zaun-atem, #kopfzeile.kopf-fest .zaun-fliege, #kopfzeile.kopf-fest .zaun-gras { display: none; }  /* kompakte Leiste: Tiere stehen dort anders */
html.tiere-aus .zaun-halm, html.tiere-aus #kopfzeile.kopf-windig .kopf-wolke { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-atem, .zaun-fliege { display: none; } .zaun-halm, #kopfzeile.kopf-windig .kopf-wolke { animation: none !important; } }
/* Auftrag tiere-wind: Mähne, Schopf, Bart, Schwanz, Ohren pendeln am Ansatz (nur rotate); Brise leicht, Sturm stärker und zur Windrichtung geneigt.
   --wind-k: Stärke und Seite je Teil, --wind-v/--wind-t: Phase und Dauer je Tier, --wind-richtung: 1 nach rechts (#kopfzeile). */
.wind-teil { transform-box: view-box; }
/* Auftrag tiere-wind-nachbesserung: Ausschlag in Grad bei --wind-k 1 (Mähne, Schopf): sanft ab 5 km/h −1,5…2, Brise ab 12 km/h −1…5, Sturm ab 30 km/h 5…13 */
.zaun-buehne { --wind-sanft-von: -1.5; --wind-sanft-bis: 2; --wind-brise-von: -1; --wind-brise-bis: 5; --wind-sturm-von: 5; --wind-sturm-bis: 13; }
.zaun-wind-sanft :is(.zaun-tier, .zaun-koppel) .wind-teil { --wind-von: var(--wind-sanft-von); --wind-bis: var(--wind-sanft-bis); animation: wind-pendeln calc(4.2s * var(--wind-t, 1)) var(--kurve-weich) var(--wind-v, 0s) infinite alternate; }
.zaun-wind-brise :is(.zaun-tier, .zaun-koppel) .wind-teil { --wind-von: var(--wind-brise-von); --wind-bis: var(--wind-brise-bis); animation: wind-pendeln calc(2.4s * var(--wind-t, 1)) var(--kurve-weich) var(--wind-v, 0s) infinite alternate; }
.zaun-wind-sturm :is(.zaun-tier, .zaun-koppel) .wind-teil { --wind-von: var(--wind-sturm-von); --wind-bis: var(--wind-sturm-bis); animation: wind-pendeln calc(1.1s * var(--wind-t, 1)) var(--kurve-weich) var(--wind-v, 0s) infinite alternate; }
.wind-schweif { transform-box: fill-box; transform-origin: 10% 10%; }  /* Koppel: Schweif am Ansatz oben (Gruppe ist verschoben und skaliert) */
@keyframes wind-pendeln { from { rotate: calc(var(--wind-von) * var(--wind-k, 1) * var(--wind-richtung, 1) * 1deg); } to { rotate: calc(var(--wind-bis) * var(--wind-k, 1) * var(--wind-richtung, 1) * 1deg); } }
.zaun-wind-sanft .zaun-tier .wind-schief, .zaun-wind-brise .zaun-tier .wind-schief, .zaun-wind-sturm .zaun-tier .wind-schief { animation-name: wind-scheren; }
@keyframes wind-scheren { from { transform: skewX(calc(var(--wind-von) * var(--wind-k, 1) * var(--wind-richtung, 1) * -1deg)); } to { transform: skewX(calc(var(--wind-bis) * var(--wind-k, 1) * var(--wind-richtung, 1) * -1deg)); } }
#kopfzeile.kopf-fest .wind-teil, html.tiere-aus .wind-teil { animation: none; }
@media (prefers-reduced-motion: reduce) { .wind-teil { animation: none !important; } }
/* Auftrag kopfzeile-lebendig Teil A: Auftritt beim Wechsel (translate, unabhängig von transform der Mimik) */
.zaun-auftritt-rein > .zaun-innen { animation: zaun-auftritt-rein calc(var(--takt-wechsel) * 4) var(--kurve-raus) both; }
.zaun-auftritt-raus { position: absolute; display: block; pointer-events: none; z-index: 1; animation: zaun-auftritt-raus calc(var(--takt-wechsel) * 4) ease-in both; }
.zaun-auftritt-raus > svg { display: block; width: 100%; height: auto; }
@keyframes zaun-auftritt-rein { 0% { opacity: 0; translate: var(--auftritt-von, -120px) 0; } 25% { opacity: 1; translate: calc(var(--auftritt-von, -120px) * .75) -3px; } 50% { translate: calc(var(--auftritt-von, -120px) * .5) 0; } 75% { translate: calc(var(--auftritt-von, -120px) * .25) -3px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes zaun-auftritt-raus { 0% { opacity: 1; translate: 0 0; } 25% { translate: calc(var(--auftritt-nach, 120px) * .25) -3px; } 50% { translate: calc(var(--auftritt-nach, 120px) * .5) 0; } 75% { opacity: 1; translate: calc(var(--auftritt-nach, 120px) * .75) -3px; } 100% { opacity: 0; translate: var(--auftritt-nach, 120px) 0; } }
html.tiere-aus .zaun-auftritt-rein > .zaun-innen { animation: none; }
html.tiere-aus .zaun-auftritt-raus { display: none; }
@media (prefers-reduced-motion: reduce) { .zaun-auftritt-rein > .zaun-innen { animation: none !important; } .zaun-auftritt-raus { display: none; } }
.zaun-grasen { animation: zaun-grasen calc(var(--takt-wechsel) * 11 * var(--tier-tempo, 1)) var(--kurve-weich) infinite; }
@keyframes zaun-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes zaun-hopp { 0%, 78%, 100% { transform: translateY(0); } 84% { transform: translateY(-10px); } 90% { transform: translateY(0); } 94% { transform: translateY(-4px); } }
@keyframes zaun-rein { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes zaun-grasen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1px); } }
html.tiere-aus .zaun-tier, html.tiere-aus .zaun-grasen { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-tier, .zaun-grasen { animation: none !important; } }

/* Auftrag kopfzeile-zaunbrett C: Sprechblase links neben dem Sprecher */
html.kopf-zaun-an #kopfBlase { white-space: normal; box-sizing: border-box; min-height: 44px; padding: 6px 9px; border: 2px solid #2b2622; border-radius: 14px; background: #ffffff; color: #2b2622; font-size: 12px; line-height: 1.25; }
html.kopf-zaun-an #kopfBlase::after { display: none; }
#kopfzeile.kopf-fest #kopfBlase { display: none; }
.zaun-schild { position: absolute; top: 150px; padding: 1px 6px; background: #f6d77a; border: 1.5px solid #2b2622; border-radius: 4px; font-size: 12px; font-weight: 600; color: #2b2622; white-space: nowrap; }
.zaun-schild-knopf { z-index: 6; pointer-events: auto; cursor: pointer; font-family: inherit; line-height: normal; margin: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }  /* Auftrag 35zx: über den Tieren antippbar, Optik wie das Schild */
.zaun-schild-knopf::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }  /* Trefferfläche 44×44, unsichtbar */
html.kopf-zaun-an #kopfBlase.zeigen { pointer-events: auto; cursor: pointer; text-align: left; }
html.kopf-zaun-an #kopfBlase.mit-ziel::after { content: " ›"; display: inline; position: static; margin: 0; border: 0; font-weight: 700; }
/* Nr. 258 A5: Zipfel an der Seite zum Sprecher, auf Kopfhöhe (js/kopf-zaun.js setzt data-zipfel und --zipfel-y) */
html.kopf-zaun-an #kopfBlase[data-zipfel]::before { content: ""; position: absolute; top: var(--zipfel-y, 50%); width: 10px; height: 10px; margin-top: -6px; background: inherit; border: 2px solid; border-color: inherit; border-left-color: transparent; border-bottom-color: transparent; border-radius: 0 2px 0 0; }
html.kopf-zaun-an #kopfBlase[data-zipfel="rechts"]::before { right: -7px; transform: rotate(45deg); }
html.kopf-zaun-an #kopfBlase[data-zipfel="links"]::before { left: -7px; transform: rotate(-135deg); }
/* Nr. 258 A4: Blase offen = ruhiger Hintergrund (Koppel, Haus, Kapelle, Wolken zurück; höchstens 3 Blätter/Flocken), danach kommt alles weich zurück */
#kopfzeile .zaun-koppel, #kopfzeile .zaun-gebaeude, #kopfzeile .kopf-turm, #kopfzeile .kopf-wolke, #kopfzeile .kopf-deko { transition: opacity .4s ease-out; }
#kopfzeile.kopf-blase-offen .zaun-koppel, #kopfzeile.kopf-blase-offen .zaun-gebaeude, #kopfzeile.kopf-blase-offen .kopf-turm, #kopfzeile.kopf-blase-offen .kopf-wolke:not(.kopf-wolke-gross) { opacity: .12; }
#kopfzeile.kopf-blase-offen .kopf-deko ~ .kopf-deko ~ .kopf-deko ~ .kopf-deko { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #kopfzeile .zaun-koppel, #kopfzeile .zaun-gebaeude, #kopfzeile .kopf-turm, #kopfzeile .kopf-wolke, #kopfzeile .kopf-deko { transition: none; } }

/* Auftrag kopfzeile-zaunbrett D: Szene hinter und vor den Tieren */
.zaun-hinten, .zaun-vorne { position: absolute; left: 0; top: 0; overflow: visible; }
.zaun-duckt { overflow: hidden; }  /* Gewitter: nur die Ohren über dem Brett */
#kopfzeile.zaun-sonne-hinten .kopf-sonne { visibility: hidden; }
#kopfzeile.zaun-vollmond .kopf-mond, #kopfzeile.zaun-vollmond .kopf-stern { visibility: hidden; }
.zaun-buehne .anim { animation-iteration-count: infinite; animation-timing-function: var(--kurve-weich); }
.zaun-buehne .konfetti { animation-name: zaun-konfetti; animation-duration: calc(var(--takt-auftritt) * 5); animation-timing-function: linear; }
.zaun-buehne .funkeln { animation-name: zaun-funkeln; animation-duration: calc(var(--takt-tipp) * 17); }
.zaun-buehne .blitz { animation: zaun-blitz var(--takt-ruhe) linear infinite; opacity: 0; }
.zaun-buehne .schnuppe { animation: zaun-schnuppe calc(var(--takt-ruhe) * 11) linear infinite; opacity: 0; }  /* selten: Vorlage 9 s */
.zaun-buehne .dampf { animation: zaun-dampf calc(var(--takt-tipp) * 17) var(--kurve-raus) infinite; transform-box: fill-box; transform-origin: center; }
.zaun-buehne .herz { animation: zaun-herz calc(var(--takt-auftritt) * 5) var(--kurve-raus) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes zaun-konfetti { from { transform: translateY(-40px); } to { transform: translateY(170px); } }
@keyframes zaun-funkeln { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes zaun-blitz { 0%, 86%, 100% { opacity: 0; } 88% { opacity: .9; } 90% { opacity: 0; } 92% { opacity: .7; } 94% { opacity: 0; } }
@keyframes zaun-schnuppe { 0%, 96% { opacity: 0; transform: translate(0, 0); } 97% { opacity: 1; } 99% { opacity: 0; transform: translate(-90px, 40px); } 100% { opacity: 0; transform: translate(0, 0); } }
@keyframes zaun-dampf { 0% { opacity: 0; transform: translateY(0) scale(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-26px) scale(1.3); } }
@keyframes zaun-herz { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }
html.tiere-aus .zaun-buehne .anim, html.tiere-aus .zaun-buehne .blitz, html.tiere-aus .zaun-buehne .schnuppe, html.tiere-aus .zaun-buehne .dampf, html.tiere-aus .zaun-buehne .herz { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-buehne .anim, .zaun-buehne .blitz, .zaun-buehne .schnuppe, .zaun-buehne .dampf, .zaun-buehne .herz { animation: none !important; } }

/* Auftrag kopfzeile-zaunbrett E: Tiere sind Knöpfe, Tippfläche mindestens 44 px auch auf 360 px Breite. Die alte Leiste antwortet nicht mehr */
.zaun-tier { padding: 0; border: 0; background: transparent; pointer-events: auto; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.zaun-tier:focus-visible { border-radius: 8px; }
.zaun-innen { display: block; position: absolute; transform-origin: 50% 100%; transition: transform .3s; }
html.tiere-aus .zaun-tier { pointer-events: none; }
.zaun-winken { animation: zaun-winken calc(var(--takt-tipp) * 6) var(--kurve-weich) infinite; transform-origin: 50% 100%; }
.zaun-mampf { animation: zaun-mampf calc(var(--takt-tipp) * 3) var(--kurve-weich) infinite; transform-origin: 50% 100%; }
.zaun-schubs-r { animation: zaun-schubs-r var(--takt-auftritt) var(--kurve-weich) infinite; transform-origin: 50% 100%; }
.zaun-schubs-l { animation: zaun-schubs-l var(--takt-auftritt) var(--kurve-weich) infinite; transform-origin: 50% 100%; }
.zaun-sprung { animation: zaun-sprung calc(var(--takt-wechsel) * 3 * var(--p-d, 1)) var(--kurve-raus) 1 both; }
.zaun-funkeln { animation: zaun-funkeln calc(var(--takt-tipp) * 17) var(--kurve-weich) infinite; }
@keyframes zaun-winken { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes zaun-mampf { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-3deg) translateY(1.5px); } }
/* Auftrag kopfzeile-lebendig Teil F: aufmerksam, Kopf etwas gehoben (hinter Schalter, siehe js/kopf-zaun.js ZAUN_HEUTE_DA_AN) */
.zaun-aufmerksam > .zaun-innen > svg:first-child { transform: translateY(-3px) rotate(1.5deg); transform-origin: 50% 100%; }
#kopfzeile.kopf-fest .zaun-aufmerksam > .zaun-innen > svg:first-child { transform: none; }
/* Auftrag blue-chill: Blue steht schief am Zaun (fest, ohne Animation; auch in der Leiste und bei reduzierter Bewegung) */
.zaun-chill-brille > .zaun-innen > svg:first-child { transform: rotate(-8deg); transform-origin: 50% 100%; }
.zaun-chill-brille-zunge > .zaun-innen > svg:first-child { transform: rotate(6deg); transform-origin: 50% 100%; }
.zaun-chill-kappe > .zaun-innen > svg:first-child { transform: rotate(-4deg); transform-origin: 50% 100%; }
.zaun-chill > .zaun-innen > svg:first-child { transition: none; }
/* Auftrag kopfzeile-lebendig Teil E: Raufe offen, Kopf gesenkt zum Heu hinter das Brett (Bild bewegt sich, an der Brett-Oberkante abgeschnitten);
   abwechselnd über die animation-delay des Knopfs, die nach innen weitergegeben wird; .zaun-tier davor, damit auch ein Pferd hinter der Blase (data-hinter-blase, Atmen aus) frisst */
.zaun-frisst { animation-name: none; }
.zaun-frisst > .zaun-innen { animation-delay: inherit; clip-path: inset(-60px -30px var(--unter, 0px) -30px); }
.zaun-tier.zaun-frisst > .zaun-innen > svg:first-child { animation: zaun-frisst calc(var(--takt-auftritt) * 8) var(--kurve-weich) infinite; animation-delay: inherit; transform-origin: 50% 100%; }
html.tiere-aus .zaun-frisst > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-frisst > .zaun-innen > svg:first-child { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-frisst > .zaun-innen > svg:first-child { animation: none !important; } }
@keyframes zaun-frisst { 0%, 38%, 100% { transform: translateY(0) rotate(0); } 48%, 58%, 78% { transform: translateY(14px) rotate(-3deg); } 68%, 88% { transform: translateY(12px) rotate(-1deg); } }
/* Auftrag kopfzeile-lebendig Teil G: Abendruhe – einer gähnt und streckt sich kurz, die Laterne flackert leise; in der Leiste und ohne Bewegung ruhig */
.zaun-gaehnt > .zaun-innen > svg:first-child { animation: zaun-gaehnt calc(var(--takt-wechsel) * 44 * var(--tier-tempo, 1)) var(--kurve-weich) infinite; animation-delay: 2s; transform-origin: 50% 100%; }
@keyframes zaun-gaehnt { 0%, 70%, 100% { transform: none; } 76%, 84% { transform: translateY(-3px) rotate(-5deg) scaleY(1.05); } 90% { transform: rotate(1deg); } }
.zaun-laterne-schein { animation: zaun-laterne calc(var(--takt-wechsel) * 13) var(--kurve-weich) infinite alternate; }
@keyframes zaun-laterne { from { opacity: .28; } to { opacity: .45; } }
#kopfzeile.kopf-fest .zaun-laterne { display: none; }
html.tiere-aus .zaun-gaehnt > .zaun-innen > svg:first-child, #kopfzeile.kopf-fest .zaun-gaehnt > .zaun-innen > svg:first-child, html.tiere-aus .zaun-laterne-schein { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-gaehnt > .zaun-innen > svg:first-child, .zaun-laterne-schein { animation: none !important; } }
@keyframes zaun-schubs-r { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(5px) rotate(4deg); } }
@keyframes zaun-schubs-l { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-5px) rotate(-4deg); } }
@keyframes zaun-sprung { 0% { transform: none; animation-timing-function: var(--kurve-raus); } 14% { transform: scale(calc(1 + .07 * var(--p-s, 1)), calc(1 - .09 * var(--p-s, 1))); animation-timing-function: var(--kurve-raus); } 38% { transform: translateY(calc(-34px * var(--p-h, 1))) rotate(-8deg) scale(.96, 1.06); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 66% { transform: translateY(calc(-30px * var(--p-h, 1))) rotate(6deg); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 86% { transform: scale(calc(1 + .08 * var(--p-s, 1)), calc(1 - .1 * var(--p-s, 1))); animation-timing-function: var(--p-landung, var(--kurve-feder)); } 100% { transform: none; } }  /* Nr. 289 B: Ausholen, gestreckt hoch, gestaucht landen */
html.tiere-aus .zaun-tier, html.tiere-aus .zaun-sprung, html.tiere-aus .zaun-funkeln { animation: none; }
@media (prefers-reduced-motion: reduce) { .zaun-tier, .zaun-sprung, .zaun-funkeln { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { .zaun-innen { transition: none; } }

/* Beim Scrollen bleibt nur die schmale Leiste: Die Bühne schrumpft, damit die Ohren im Bild bleiben, alles außer Tieren und Standlinie verschwindet (Auftrag header-scroll) */
.zaun-buehne { transition: transform .15s ease-out; }
.kopf-zaun { transition: height .15s ease-out; }
.kopf-zeile, .kopf-szene, .kopf-wetter-platz, .zaun-hinten, .zaun-koppel { transition: opacity .15s ease-out, visibility .15s; }
/* Auftrag kopfzeile-handy-feinschliff: Ausschnitt statt Verkleinern. Das Brett bleibt, die Großen rutschen dahinter, in der Leiste bewegt sich nichts. */
#kopfzeile.kopf-fest .zaun-buehne { transform: translateY(calc(16px * var(--zaun-leiste, 1))) scale(var(--zaun-leiste, 1)); }
#kopfzeile.kopf-fest .kopf-zaun { height: calc(14px * var(--zaun-leiste, 1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
#kopfzeile.kopf-fest .kopf-zaun::after { display: none; }
#kopfzeile.kopf-fest .zaun-schraube-unten, #kopfzeile.kopf-fest .zaun-brett, #kopfzeile.kopf-fest .zaun-vorne, #kopfzeile.kopf-fest .zaun-schild { display: none; }  /* Auftrag kompakt-koepfe-gucken: Tiere auf dem Pfosten (Johann, Katze, Hase) bleiben in der Leiste */
.zaun-tier { transition: transform .15s ease-out; }
@property --hopp { syntax: '<length>'; inherits: true; initial-value: 0px; }
#kopfzeile.kopf-fest .zaun-tier { transform: translate(var(--fest-x, 0px), calc(var(--fest-y, 0px) - var(--hopp, 0px))) scale(var(--fest-s, 1)); transform-origin: 0 0; animation: none !important; }
/* Auftrag kompakt-koepfe-gucken: Antippen in der Leiste = kurzer Hüpfer, der Schnitt am Brett wandert mit */
#kopfzeile.kopf-fest .zaun-tier.zaun-leiste-hopp { animation: zaun-leiste-hopp calc(var(--takt-wechsel) * 2) var(--kurve-raus) !important; animation-play-state: running !important; }
@keyframes zaun-leiste-hopp { 0%, 100% { --hopp: 0px; } 40% { --hopp: 16px; } }
html.tiere-aus #kopfzeile.kopf-fest .zaun-tier.zaun-leiste-hopp { animation: none !important; }
@media (prefers-reduced-motion: reduce) { #kopfzeile.kopf-fest .zaun-tier.zaun-leiste-hopp { animation: none !important; } }
.zaun-leiste-tipp { display: none; }
#kopfzeile.kopf-fest .zaun-leiste-tipp { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: max(44px, calc(64px * var(--zaun-leiste, 1))); background: transparent; border: 0; padding: 0; pointer-events: auto; z-index: 5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#kopfzeile.kopf-fest .zaun-innen { animation: none !important; transform: none !important; }
#kopfzeile.kopf-fest .zaun-innen > svg:first-child { clip-path: inset(0 0 max(0px, calc(var(--fest-weg, 0px) - var(--hopp, 0px) / var(--fest-s, 1))) 0); }
#kopfzeile.kopf-fest .zaun-innen > :not(svg:first-child):not(.zaun-pfoten):not(.zaun-moment-neu) { display: none; }  /* Teil D: der Moment-Punkt bleibt */  /* Zubehör ragte sonst unter die Leiste */
#kopfzeile.kopf-fest * { animation-play-state: paused; }
.zaun-pfoten { position: absolute; left: 0; top: 0; width: 100%; transform: translateY(var(--pfote-y, 0)); pointer-events: none; }
.zaun-pfoten svg { display: block; clip-path: inset(var(--pfote, 0) 0 0 0); }
.zaun-leiste-mehr { position: absolute; bottom: 0; display: flex; gap: 2px; align-items: flex-end; height: calc(64px * var(--zaun-leiste, 1)); pointer-events: none; }
#kopfzeile.kopf-fest .zaun-tier[data-breit], #kopfzeile.kopf-gleitet .zaun-tier[data-breit] { opacity: 0; visibility: hidden; pointer-events: none; }  /* 35zy A: Breit-Tiere nur in der großen Kopfzeile; kompakt bleibt die Deko-Leiste */
.zaun-leiste-links { left: 44px; }
.zaun-leiste-rechts { right: 44px; }
.zaun-leiste-tier { display: block; width: 52px; height: calc(50px * var(--zaun-leiste, 1)); overflow: hidden; margin-bottom: calc(14px * var(--zaun-leiste, 1)); }
#kopfzeile:not(.kopf-fest) .zaun-leiste-mehr { display: none; }
#kopfzeile.kopf-fest .kopf-zeile, #kopfzeile.kopf-fest .kopf-szene, #kopfzeile.kopf-fest .kopf-wetter-platz, #kopfzeile.kopf-fest .zaun-hinten, #kopfzeile.kopf-fest .zaun-koppel { opacity: 0; visibility: hidden; }
/* Geschrumpft wären die Knöpfe unter 44 px: Fixiert sind die Tiere nur Bild, antippen geht wieder oben */
#kopfzeile .zaun-tier { transition: visibility 0s linear .25s; }  /* beim Hochscrollen erst nach dem Wachsen wieder Knopf */
#kopfzeile.kopf-fest .zaun-tier { visibility: hidden; pointer-events: none; transition: none; }
#kopfzeile.kopf-fest .zaun-innen { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .zaun-buehne, .kopf-zaun, .kopf-zeile, .kopf-szene, .kopf-wetter-platz, .zaun-hinten, .zaun-koppel { transition: none; } }

/* Auftrag app-safe-area: In der App liegt die Seite unter Statusleiste und Notch. Im Browser ist env() 0, nichts ändert sich. Die Höhe wächst, der Himmel reicht bis ganz oben */
:root { --safe-oben: env(safe-area-inset-top, 0px); --safe-unten: env(safe-area-inset-bottom, 0px); --safe-links: env(safe-area-inset-left, 0px); --safe-rechts: env(safe-area-inset-right, 0px); scroll-padding-top: calc(var(--kopf-fest) + var(--safe-oben) + 8px); }
html.eingebettet { --safe-oben: 0px; --safe-unten: 0px; --safe-links: 0px; --safe-rechts: 0px; }  /* in der HA-App bekommt das iframe die Abstände von Statusleiste und Home-Balken mit, obwohl HA sie schon freihält (Martins Fotos 5.11.2026) */
#kopfzeile { height: calc(var(--kopf-h) + var(--safe-oben)); }
.kopf-zeile { top: calc(8px + var(--safe-oben)); padding-left: max(16px, var(--safe-links)); padding-right: max(16px, var(--safe-rechts)); }
.kopf-himmel { top: var(--safe-oben); }
.kopf-wetter-platz { top: var(--safe-oben); }
.kopf-schild { top: calc(8px + var(--safe-oben)); }
body > nav.fixed { padding-bottom: max(.625rem, var(--safe-unten)); padding-left: var(--safe-links); padding-right: var(--safe-rechts); }
#inhalt { padding-left: max(1rem, var(--safe-links)); padding-right: max(1rem, var(--safe-rechts)); }
body.pb-32 { padding-bottom: calc(var(--tab-platz, calc(4.0625rem + var(--safe-unten))) + 16px); }  /* Auftrag header-scroll: Höhe der Tab-Leiste misst js/kopfzeile.js */
/* Auftrag header-scroll: kein dunkler oder heller Streifen unter der Tab-Leiste, auch nicht beim Überziehen */
html, body { background: var(--st-grund); }  /* Nr. 374: ein Grund in Hell und Dunkel; die :has-Regeln je Reiter setzen denselben */
body.tablet-modus { background: var(--st-grund); }  /* Stall-Tablet nutzt warmen Grund --st-grund (Nr. 387) */
body > nav.fixed::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 120px; background: inherit; }
.tablet-kopf { padding-top: calc(.25rem + var(--safe-oben)); padding-left: max(1.25rem, var(--safe-links)); padding-right: max(1.25rem, var(--safe-rechts)); }
.tablet-tabs { padding-bottom: var(--safe-unten); padding-left: var(--safe-links); padding-right: var(--safe-rechts); }

/* Auftrag tier-design A: Dunkelmodus der Kopfzeile, Brett leicht grau, Sprechblase dunkel mit hellem Text */
html.dark .kopf-zaun { background: #d8d2c6; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -3px 0 #c2bbae; }
html.dark.kopf-zaun-an #kopfBlase { background: #2c2a28; color: #f1ece4; border-color: #d8d2c6; }

/* 35b Teil B: runder Rahmen für Foto oder Zeichnung (App-Elemente) */
.kopf-profil { position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border-radius: 50%; border: 2px solid #2b2622; background: #dcebf3; color: #2b2622; box-sizing: border-box; }
.kopf-profil-bild { position: absolute; display: block; }
.kopf-profil > i { color: #2b2622; }  /* Symbol ohne Zeichnung: auch im Dunkelmodus dunkel auf dem hellen Kreis */
.kopf-profil-bild svg { width: 100%; height: auto; }
.akte-kopf { display: flex; align-items: center; gap: 12px; }
.akte-profil { width: 64px; height: 64px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* 35b Teil C: leere Seiten, Laden, Herunterziehen (App-Elemente) */
.leer-szene { max-width: 300px; margin: 0 auto; padding-bottom: 8px; text-align: center; }
.leer-szene > svg { display: block; width: 100%; height: auto; overflow: hidden; }
.leer-szene-kante { margin: 0 8px; }  /* Trennlinie: die Tiere schauen darüber (Auftrag checkliste-fertig-karoline Teil B) */
html.tiere-aus .leer-szene > svg, html.tiere-aus .leer-szene-kante { display: none; }
.leer-szene-titel { margin-top: 10px; font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.leer-szene-text { margin-top: 4px; font-size: 13px; font-weight: 400; line-height: 1.25; opacity: .8; }
.boot-start { display: flex; flex-direction: column; background: #dcebf3; }
.boot-szene { flex: 1 1 auto; min-height: 0; width: 100%; overflow: visible; font-family: 'Fredoka', sans-serif; }
.boot-band { flex: none; background: #c4d79e; color: #3b2f25; text-align: center; font-weight: 600; font-size: 14px; padding: 26px 16px calc(26px + var(--safe-unten, 0px)); position: relative; z-index: 1; }
/* Auftrag ladebildschirm-karoline: Sprechblase über Karoline in der Startszene (js/ladebild.js setzt bottom und --zipfel-x) */
.boot-mit-karoline { cursor: pointer; }
.boot-blase { position: absolute; left: 16px; right: 16px; bottom: 50%; z-index: 2; max-width: 340px; margin: 0 auto; background: #fffdf7; color: #3b2f25; border: 2px solid #2b2622; border-radius: 18px; padding: 12px 14px 2px; box-shadow: 0 4px 0 rgba(43, 38, 34, .15); font-size: 15px; font-weight: 500; line-height: 1.35; }
.boot-blase::after { content: ''; position: absolute; left: var(--zipfel-x, 50%); bottom: -10px; width: 18px; height: 18px; background: inherit; border-right: 2px solid #2b2622; border-bottom: 2px solid #2b2622; transform: translateX(-50%) rotate(45deg); }
.boot-blase p { margin: 0; overflow-wrap: anywhere; }
.boot-noch { display: block; position: relative; z-index: 1; margin: 2px -6px 0 auto; min-height: 44px; padding: 0 8px; font-size: 13px; font-weight: 700; color: #4f6b2a; text-decoration: underline; text-underline-offset: 3px; }
.boot-weiter { position: absolute; left: 50%; bottom: calc(84px + var(--safe-unten, 0px)); z-index: 2; transform: translateX(-50%); white-space: nowrap; min-height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255, 253, 247, .9); color: #3b2f25; font-size: 13px; font-weight: 600; }
.boot-karoline-bild { transform-box: fill-box; transform-origin: 50% 100%; animation: boot-karoline-wippen calc(var(--takt-tipp) * 17) var(--kurve-weich) infinite; }
@keyframes boot-karoline-wippen { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .boot-karoline-bild { animation: none; } }
html.tiere-aus .boot-karoline-bild { animation: none; }
.boot-karoline-text .boot-blase::after { display: none; }
/* Nr. 73 Teil C: Fortsetzungsgeschichte in der Blase – „Teil x von 5“ klein, „Bisher“ kursiv, bis zu zwei Absätze */
.boot-krimi-teil { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; opacity: .75; }
.boot-krimi-bisher { display: block; margin-bottom: 6px; font-size: 13px; font-style: italic; opacity: .85; }
.boot-krimi-text { display: block; }
.boot-krimi-text + .boot-krimi-text { margin-top: 6px; }
/* Nr. 73 Teil A: Zettel statt Karoline (SVG in der Szene); Schrift handschriftlich wirkend, ohne Animation */
.boot-zettel text { font-style: normal; }
html.dark .boot-blase { background: #2b2723; color: #f3ecdc; border-color: #9a8f80; }
html.dark .boot-blase::after { border-color: #9a8f80; }
html.dark .boot-noch { color: #b7d98a; }
html.dark .boot-weiter { background: rgba(43, 39, 35, .9); color: #f3ecdc; }
/* Auftrag karoline-erzaehlt-mehr (Nr. 70) Teil 5: Blue antwortet (kleine zweite Blase über Blue), Sonderfakt mit kleinem Funkeln */
.boot-blue { position: absolute; right: 16px; bottom: 40%; z-index: 3; max-width: min(62%, 230px); background: #eef4fb; color: #26323f; border: 2px solid #2b2622; border-radius: 14px; padding: 7px 11px; box-shadow: 0 3px 0 rgba(43, 38, 34, .15); font-size: 13px; font-weight: 600; line-height: 1.3; animation: boot-blue-ein var(--takt-wechsel) var(--kurve-raus); }
.boot-blue::after { content: ''; position: absolute; left: var(--zipfel-x, 70%); bottom: -8px; width: 13px; height: 13px; background: inherit; border-right: 2px solid #2b2622; border-bottom: 2px solid #2b2622; transform: translateX(-50%) rotate(45deg); }
.boot-blue p { margin: 0; overflow-wrap: anywhere; }
.boot-blue-text { margin-top: 6px !important; font-size: 13px; font-weight: 700; }
@keyframes boot-blue-ein { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.boot-funkeln { border-color: #c79a1e; box-shadow: 0 4px 0 rgba(43, 38, 34, .15), 0 0 0 3px rgba(246, 215, 122, .55); animation: boot-funkeln calc(var(--takt-tipp) * 11) var(--kurve-weich) 3; }
@keyframes boot-funkeln { 0%, 100% { box-shadow: 0 4px 0 rgba(43, 38, 34, .15), 0 0 0 3px rgba(246, 215, 122, .55); } 50% { box-shadow: 0 4px 0 rgba(43, 38, 34, .15), 0 0 0 7px rgba(246, 215, 122, .25); } }
@media (prefers-reduced-motion: reduce) { .boot-blue, .boot-funkeln { animation: none; } }
html.tiere-aus .boot-blue, html.tiere-aus .boot-funkeln, .boot-karoline-text .boot-funkeln { animation: none; }
.boot-blue[hidden], .boot-blue-text[hidden] { display: none; }
html.dark .boot-blue { background: #25303c; color: #e6eef7; border-color: #9a8f80; }
html.dark .boot-blue::after { border-color: #9a8f80; }
html.dark .boot-funkeln { border-color: #e2bd55; }
.lade-hase { animation: lade-huepf calc(var(--takt-wechsel) * 8) var(--kurve-weich) infinite; }
@keyframes lade-huepf { 0% { transform: translate(0, 0); } 25% { transform: translate(46px, -22px); } 50% { transform: translate(92px, 0); } 75% { transform: translate(138px, -22px); } 100% { transform: translate(184px, 0); } }
@media (prefers-reduced-motion: reduce) { .lade-hase { animation: none; } }

/* 35b Teil E: Erfolgsmoment */

/* 35b Teil G: Bildschirmschoner am Stall-Tablet */
#tabletSchoner { --schoner-fuss: clamp(40px, 7vh, 64px); --schoner-band: clamp(140px, 30vh, 300px); --schoner-frei: calc(var(--schoner-fuss) + var(--schoner-band) + 1.5vh); position: fixed; inset: 0; z-index: var(--ebene-schoner); display: block; width: 100%; padding: 0; border: 0; overflow: hidden; text-align: left; cursor: pointer; }
#tabletSchoner > svg { position: absolute; left: 0; right: 0; bottom: var(--schoner-fuss); width: 100%; height: var(--schoner-band); overflow: visible; }  /* Nr. 258 C: Tierband unten, über „Tippen zum Öffnen“ */
.schoner-nacht { filter: brightness(.45); }
.schoner-text { position: absolute; top: 4vh; left: 4vw; bottom: var(--schoner-frei); max-width: 52vw; overflow: hidden; }  /* Nr. 258 C: endet über dem Tierband */
.schoner-uhr { font-size: clamp(44px, 12vh, 104px); font-weight: 600; line-height: 1.1; }
.schoner-datum { font-size: clamp(18px, 5vh, 34px); font-weight: 500; line-height: 1.25; }
.schoner-dienst { display: inline-block; margin-top: 1.5vh; padding: 8px 14px; border-radius: 14px; background: #ffffff; border: 2px solid #2b2622; color: #2b2622; font-size: clamp(16px, 4vh, 28px); font-weight: 600; }
.schoner-notfall { position: absolute; top: 4vh; right: 4vw; min-height: 56px; padding: 8px 22px; border-radius: 16px; background: #b91c1c; color: #ffffff; font-size: 20px; font-weight: 700; }
.schoner-rechts { position: absolute; top: calc(4vh + 72px); bottom: var(--schoner-frei); right: 4vw; width: min(40vw, 440px); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }  /* Nr. 74: Karten untereinander */
.schoner-quiz { flex: none; max-width: min(40vw, 440px); padding: 8px 12px; border-radius: 14px; background: #ffffff; border: 2px solid #2b2622; color: #2b2622; font-size: clamp(14px, 2.2vh, 19px); line-height: 1.3; overflow-wrap: anywhere; }
.schoner-quiz > p + p { margin-top: 4px; }
.schoner-rekord { margin-top: 1.2vh; max-width: min(46vw, 520px); padding: 6px 12px; border-radius: 14px; background: #ffffff; border: 2px solid #2b2622; color: #2b2622; font-size: clamp(13px, 2.2vh, 18px); line-height: 1.3; }  /* Nr. 110 I */
.schoner-rekord > p + p { margin-top: 3px; }
.schoner-rekord-titel { font-weight: 700; color: #92400e; }
.schoner-quiz-titel { font-weight: 700; color: #4d7c0f; }
.schoner-quiz-frage { font-weight: 700; }
.schoner-quiz-klein { font-size: .8em; color: #5a4a3a; }  /* Nr. 72 Teil 2: Frage der Woche im Bildschirmschoner */
.schoner-tippen { position: absolute; left: 0; right: 0; bottom: 0; height: var(--schoner-fuss); display: flex; align-items: center; justify-content: center; margin: 0; background: #fbfaf7; color: #5a4a3a; font-size: clamp(14px, 3vh, 22px); font-weight: 600; }  /* Nr. 258 C: unter dem Tierband, auf dem Brett */
#tabletSchoner [hidden] { display: none !important; }  /* Nr. 258 C: geblätterte Karten */

/* 35b Teil H: Abzeichen */
.abzeichen { display: block; flex: none; overflow: hidden; border-radius: 50%; border: 2px solid #2b2622; background: #fbfaf7; box-sizing: border-box; }
.abzeichen > svg { display: block; width: 100%; height: 100%; }
#badgeModalIcon .abzeichen { border-width: 3px; margin: 0 auto; }

/* 35b Teil J: Fehlerseite */
.fehler-seite { position: fixed; inset: 0; z-index: var(--ebene-fenster-2); display: flex; align-items: center; justify-content: center; padding: 16px; background: #eef5f8; overflow: auto; }
html.dark .fehler-seite { background: #0f172a; }
.fehler-karte { width: 100%; max-width: 360px; overflow: hidden; border: 1.5px solid #e1d9cc; border-radius: 16px; background: #ffffff; color: #3b2f25; text-align: center; padding-bottom: 16px; }
.fehler-karte > svg { display: block; width: 100%; height: auto; }
.fehler-titel { margin: 14px 12px; font-size: 17px; font-weight: 600; line-height: 1.25; }
.fehler-knopf { min-height: 44px; padding: 0 26px; border-radius: 22px; background: #3b2f25; color: #ffffff; font-size: 15px; font-weight: 600; }
.fehler-technik { margin: 12px 16px 0; font-size: 12px; color: #6a5a4a; text-align: left; overflow-wrap: anywhere; }
/* Auftrag tier-feinschliff C: Mimik am Zaun */
.zaun-tier svg { transition: transform .25s ease; transform-origin: 50% 100%; }
.zaun-tier svg.zaun-mimik-neigen { --neig-plus: -5deg; transform: rotate(-1.5deg); }
.zaun-tier svg.zaun-mimik-hoch { --neig-plus: 3deg; transform: translateY(-2px) rotate(.5deg); }
.zaun-blinzelt { transform-box: fill-box; transform-origin: center; transform: scaleY(.08); }
circle.glanz2.zaun-blinzelt { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .zaun-tier svg, .zaun-tier { transition: none; } }
/* Auftrag eigenstaendig A: Anmeldung */
body.anmeldung-offen > *:not(#anmeldungSchirm):not(#toast) { display: none !important; }
#anmeldungSchirm { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: calc(32px + var(--safe-oben)) 16px calc(32px + var(--safe-unten)); background: linear-gradient(#bfe3f5, #eaf6fc); box-sizing: border-box; }
html.dark #anmeldungSchirm { background: linear-gradient(#1e2a4a, #0f172a); }
.anm-karte { width: 100%; max-width: 380px; background: #ffffff; border: 2px solid #2b2622; border-radius: 20px; padding: 20px; color: #1f2937; }
html.dark .anm-karte { background: #1e293b; border-color: #475569; color: #f1f5f9; }
.anm-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.anm-kopf h1 { margin: 0; font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 700; }
.anm-karte form { display: flex; flex-direction: column; gap: 12px; }
.anm-karte label { display: block; font-size: 14px; font-weight: 700; }
.anm-karte input { display: block; width: 100%; box-sizing: border-box; min-height: 44px; margin-top: 4px; padding: 8px 12px; font-size: 16px; font-weight: 400; color: #0f172a; background: #ffffff; border: 1px solid #94a3b8; border-radius: 12px; }
.anm-karte input[readonly] { background: #f1f5f9; }
.anm-karte button { min-height: 48px; border: 0; border-radius: 12px; background: #047857; color: #ffffff; font-size: 16px; font-weight: 700; cursor: pointer; }
.anm-karte button:disabled { opacity: .6; }
.anm-fehler { margin: 0; font-size: 14px; font-weight: 700; color: #b91c1c; }
.anm-fehler:empty { display: none; }
html.dark .anm-fehler { color: #fca5a5; }
.anm-hinweis, .anm-gruss { margin: 0; font-size: 14px; }
.anm-link { display: flex; flex-direction: column; gap: 8px; }
.anm-qr { align-self: center; padding: 4px; background: #ffffff; border-radius: 8px; }
/* 35b Teil K: Kopf über einem Beleg in der Fotoansicht */
#photoViewerKopf { position: absolute; left: 12px; right: 68px; top: 12px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; background: #ffffff; border-radius: 12px; pointer-events: none; }
#photoViewerKopf.hidden { display: none; }
.foto-kopf-name { font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: #1f2937; white-space: nowrap; }
.foto-kopf-tiere { display: flex; align-items: flex-end; gap: 2px; }
/* Auftrag safe-area-nachtrag: Fenster, Sheets und Vollbild-Ebenen halten Abstand zu Statusleiste, Notch und Home-Balken. Im Browser ist alles 0, dort ändert sich nichts */
.fixed.inset-0.items-center.p-4 { padding: max(1rem, calc(var(--safe-oben) + .5rem)) max(1rem, var(--safe-rechts)) max(1rem, calc(var(--safe-unten) + .5rem)) max(1rem, var(--safe-links)); }
.fixed.inset-0.items-center > .max-h-\[85vh\] { max-height: min(85vh, calc(100dvh - var(--safe-oben) - var(--safe-unten) - 2rem)); }
.fixed.inset-0.items-center > .max-h-\[88vh\] { max-height: min(88vh, calc(100dvh - var(--safe-oben) - var(--safe-unten) - 2rem)); }
.fixed.inset-0.items-center > .max-h-\[90vh\] { max-height: min(90vh, calc(100dvh - var(--safe-oben) - var(--safe-unten) - 2rem)); }
.fixed.inset-0.items-center > .max-h-\[92vh\] { max-height: min(92vh, calc(100dvh - var(--safe-oben) - var(--safe-unten) - 2rem)); }
@media (max-width: 639px) {
    .fixed.inset-0.items-end > .p-4 { padding-bottom: calc(1rem + var(--safe-unten)); }
    .fixed.inset-0.items-end > .p-5 { padding-bottom: calc(1.25rem + var(--safe-unten)); }
    .fixed.inset-0.items-end > * { padding-left: max(1rem, var(--safe-links)); padding-right: max(1rem, var(--safe-rechts)); }
    .fixed.inset-0.items-end > .p-5 { padding-left: max(1.25rem, var(--safe-links)); padding-right: max(1.25rem, var(--safe-rechts)); }
    .fixed.inset-0.items-end > .h-\[92vh\] { max-height: calc(100dvh - var(--safe-oben) - .5rem); }
    .fixed.inset-0.items-end > .max-h-\[90vh\] { max-height: min(90vh, calc(100dvh - var(--safe-oben) - .5rem)); }
    .fixed.inset-0.items-end > .max-h-\[92vh\] { max-height: min(92vh, calc(100dvh - var(--safe-oben) - .5rem)); }
}
@media (min-width: 640px) {
    .fixed.inset-0.items-end.sm\:items-center { padding: max(1rem, calc(var(--safe-oben) + .5rem)) max(1rem, var(--safe-rechts)) max(1rem, calc(var(--safe-unten) + .5rem)) max(1rem, var(--safe-links)); }
    .fixed.inset-0.items-end.sm\:items-center > * { max-height: min(90vh, calc(100dvh - var(--safe-oben) - var(--safe-unten) - 2rem)); }
}
#photoViewer { padding: max(.75rem, var(--safe-oben)) max(.75rem, var(--safe-rechts)) max(.75rem, var(--safe-unten)) max(.75rem, var(--safe-links)); }
#photoViewer > button { top: calc(.75rem + var(--safe-oben)); right: calc(.75rem + var(--safe-rechts)); }
#photoViewerKopf { top: calc(12px + var(--safe-oben)); left: calc(12px + var(--safe-links)); right: calc(68px + var(--safe-rechts)); }
#projektGalerieModal, #regelnPflicht { padding: var(--safe-oben) var(--safe-rechts) var(--safe-unten) var(--safe-links); }
#vertragModal, #akteModal { padding-bottom: var(--safe-unten); padding-left: var(--safe-links); padding-right: var(--safe-rechts); }
#vertragModal { padding-top: var(--safe-oben); }
.akte-leiste { padding-top: calc(.5rem + var(--safe-oben)); }
.tablet-schicht { padding: max(1rem, var(--safe-oben)) max(1rem, var(--safe-rechts)) max(1rem, var(--safe-unten)) max(1rem, var(--safe-links)); }
.fehler-seite { padding: max(16px, var(--safe-oben)) max(16px, var(--safe-rechts)) max(16px, var(--safe-unten)) max(16px, var(--safe-links)); }
.fixed.bottom-24 { bottom: calc(6rem + var(--safe-unten)); }
.fixed.top-2.left-2.right-2 { top: max(.5rem, calc(var(--safe-oben) + .25rem)); }
/* Auftrag huehner: klein, darum vor der Deko auf dem Brett */
.zaun-tier.zaun-huhn { z-index: 3; }
/* Auftrag zaun-pfosten */
.zaun-pfosten { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }
#kopfzeile.kopf-fest .zaun-pfosten { clip-path: inset(0 0 16px 0); }  /* Auftrag kopfzeile-nachbesserung: in der Leiste rutscht die Bühne 16 px nach unten, der Pfosten endet mit dem Brett */
.zaun-rand { display: none; overflow: visible; position: absolute; bottom: 0; transform: scale(var(--zaun-skala, 1)); transform-origin: 50% 100%; pointer-events: none; }
.zaun-rand-links { left: 10px; }
.zaun-rand-rechts { right: 10px; }
@media (min-width: 640px) { .zaun-rand { display: block; } }
html.dark .zaun-pfosten, html.dark .zaun-rand { filter: brightness(.92); }
html.kopf-zaun-an #kopfBlase.blase-lang { font-size: 11.5px; line-height: 1.2; padding: 4px 7px; }
html.kopf-zaun-an #kopfBlase.blase-eng { font-size: 10.5px; line-height: 1.15; letter-spacing: -.01em; }  /* Nr. 258 E4: lange Sprüche höchstens 3 Zeilen */
.zaun-tier.zaun-gruss-weg { display: none; }
#kopfzeile.kopf-fest .zaun-tier.zaun-gruss-weg { display: block; }
@media (prefers-reduced-motion: reduce) { #kopfBlase { transition: none; } }
/* Auftrag animationen-schalter: aus heißt überall still, nur das Ladezeichen dreht weiter (zeigt, dass etwas läuft) */
html.tiere-aus { scroll-behavior: auto; }
html.tiere-aus *:not(.fa-spin), html.tiere-aus *::before, html.tiere-aus *::after { animation: none !important; transition: none !important; }
html.tiere-aus .zaun-buehne .dampf, html.tiere-aus .zaun-buehne .herz { opacity: 0; }  /* sie erscheinen nur in der Animation, starr stünden sie im Bild */

/* Auftrag pferde-moment: Ring ums Pferdebild (grün = Neues, grau = gesehen) und Vollbild wie ein Status */
.moment-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--moment-ring, #059669); }
.moment-ring-gesehen { --moment-ring: #94a3b8; }
.momente-leiste { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }  /* Auftrag momente-liste B */
.momente-leiste.hidden { display: none; }
#viewHorses > #momenteLeiste { margin-top: calc(22px - var(--inhalt-oben) - 6px); }  /* 35zw D: gleiche Lage wie vorher (16 px unter der Kopfzeile) */  /* Auftrag momente-leiste-hoftiere B: Ring 22 px unter der Kopfzeile (wie unten bis „Unsere Pferde“), frei von der kompakten Zaun-Bühne (ragt bis 16 px); hebt Polster von #inhalt, space-y-5 und Leistenpolster auf */
.momente-leiste::-webkit-scrollbar { display: none; }
.momente-leiste-tier { flex: 0 0 auto; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; scroll-snap-align: start; background: none; }
.momente-leiste-name { max-width: 64px; font-size: 12px; font-weight: 700; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dark .momente-leiste-name { color: #e2e8f0; }
html.dark .moment-ring { box-shadow: 0 0 0 2px #0f172a, 0 0 0 5px var(--moment-ring, #34d399); }
html.dark .moment-ring-gesehen { --moment-ring: #64748b; }
/* Auftrag kopfzeile-lebendig Teil D: kleiner Ring am Tier in der Kopfzeile, in der kompakten Leiste ein Punkt */
/* Auftrag moment-polaroid: der Kreis am Kopf ist weg; in der kompakten Leiste bleibt ein Punkt am Brett unter dem Tier (nur ungesehen) */
.zaun-moment { display: none; position: absolute; pointer-events: none; }
#kopfzeile.kopf-fest .zaun-moment.zaun-moment-neu { display: block; left: 50%; top: calc(100% - var(--fest-weg, 0px) + 2px / var(--fest-s, 1)); width: calc(8px / var(--fest-s, 1)); height: calc(8px / var(--fest-s, 1)); margin-left: calc(-4px / var(--fest-s, 1)); border-radius: 50%; background: #059669; box-shadow: 0 0 0 calc(1.5px / var(--fest-s, 1)) #fff; }
html.dark #kopfzeile.kopf-fest .zaun-moment.zaun-moment-neu { background: #34d399; }
/* Polaroid mit Wäscheklammer am oberen Brett (Brett 142–172); der Knopf ist größer als das Bild */
.zaun-polaroid { display: none; position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.zaun-polaroid.zaun-polaroid-an { display: block; }
.zaun-polaroid-karte, .zaun-polaroid-stapel { position: absolute; left: 10px; top: 14px; width: 28px; height: 30px; box-sizing: border-box; border: 1.5px solid #2b2622; border-radius: 2px; transform-origin: 50% 0; }
.zaun-polaroid-karte { padding: 2px 2px 7px; background: #fffdf8; rotate: var(--schief, 0deg); box-shadow: 1px 2px 3px rgba(43, 38, 34, .35); }
.zaun-polaroid-stapel { display: none; left: 12px; top: 15px; background: #f1ebde; rotate: calc(var(--schief, 0deg) + 7deg); }
.zaun-polaroid-mehr .zaun-polaroid-stapel { display: block; }
.zaun-polaroid-foto { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 1px; }
.zaun-polaroid-foto svg, .zaun-polaroid-foto img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.zaun-polaroid-klammer { position: absolute; left: 50%; top: -9px; margin-left: -4px; }
.zaun-polaroid-gesehen .zaun-polaroid-karte { rotate: 0deg; background: #efe3c2; box-shadow: none; }
.zaun-polaroid-gesehen .zaun-polaroid-stapel { rotate: 4deg; background: #e6d9b6; }
.zaun-polaroid-gesehen .zaun-polaroid-foto { filter: grayscale(.75) sepia(.35); opacity: .8; }
html.dark .zaun-polaroid-karte { background: #e4ded2; }
html.dark .zaun-polaroid-stapel { background: #d3ccbf; }
html.dark .zaun-polaroid-gesehen .zaun-polaroid-karte { background: #d4c7a6; }
html.dark .zaun-polaroid-gesehen .zaun-polaroid-stapel { background: #c6b994; }
.zaun-polaroid-schaukeln .zaun-polaroid-karte { animation: polaroid-schaukeln calc(var(--takt-wechsel) * 3) var(--kurve-raus) 1; }
@keyframes polaroid-schaukeln { 0% { transform: rotate(10deg); } 35% { transform: rotate(-6deg); } 65% { transform: rotate(3deg); } 100% { transform: rotate(0deg); } }
.zaun-wind .zaun-polaroid-an:not(.zaun-polaroid-schaukeln) .zaun-polaroid-karte { animation: polaroid-wind calc(var(--takt-auftritt) * 4) var(--kurve-weich) infinite alternate; }  /* nur leicht mit */
@keyframes polaroid-wind { from { transform: rotate(-2deg); } to { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .zaun-polaroid-karte { animation: none !important; } }
html.tiere-aus .zaun-polaroid, #kopfzeile.kopf-fest .zaun-polaroid { display: none; }
#kopfzeile.kopf-gleitet .zaun-polaroid { opacity: clamp(0, calc(1 - var(--kopf-p, 0) * 3), 1); }
.moment-vorschau { display: block; width: 100%; max-height: 40vh; object-fit: contain; border-radius: 12px; background: #f1f5f9; }
.moment-viewer { position: fixed; inset: 0; z-index: var(--ebene-bild); background: #000; color: #fff; display: flex; align-items: center; justify-content: center;
    padding: calc(var(--safe-oben, 0px) + 56px) 0 calc(var(--safe-unten, 0px) + 16px); }
.moment-viewer.hidden { display: none; }
.moment-bild { max-width: 100%; max-height: 100%; object-fit: contain; }
.moment-balken { position: absolute; top: calc(var(--safe-oben, 0px) + 8px); left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.moment-balken > span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.moment-balken > span > i { display: block; height: 100%; width: 0; background: #fff; }
.moment-balken > span.voll > i { width: 100%; }
.moment-balken > span.jetzt > i { animation: moment-lauf calc(var(--takt-wechsel) * 20) linear forwards; }
.moment-still .moment-balken > span.jetzt > i { animation: none; width: 100%; }
@keyframes moment-lauf { from { width: 0; } to { width: 100%; } }
.moment-kopf { position: absolute; top: calc(var(--safe-oben, 0px) + 16px); left: 12px; right: 4px; display: flex; align-items: center; gap: 4px; z-index: 3; }
.moment-tier { display: flex; align-items: center; gap: 6px; flex-shrink: 0; max-width: 45%; }
.moment-tier:empty { display: none; }
.moment-tier-name { font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-wer { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-knopf { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; background: rgba(0,0,0,.25); }
.moment-knopf.hidden { display: none; }
.moment-knopf:disabled { opacity: 1; cursor: default; }  /* Auftrag moment-kategorien: Kategorie nur anzeigen */
.moment-zone { position: absolute; top: 0; bottom: 0; z-index: 1; background: transparent; }
.moment-zone-links { left: 0; width: 33%; }
.moment-zone-rechts { right: 0; width: 67%; }
.moment-text { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-unten, 0px) + 16px); z-index: 2; margin: 0 16px; padding: 10px 12px; border-radius: 12px;
    background: rgba(0,0,0,.55); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; pointer-events: none; }
.moment-text.hidden { display: none; }
.moment-etikett { position: absolute; top: calc(var(--safe-oben, 0px) + 66px); left: 12px; max-width: calc(100% - 24px); z-index: 3; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(4, 95, 70, .88); color: #ffffff; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* Auftrag taetigkeit-foto */
.moment-etikett.hidden { display: none; }
.tablet-moment { border-radius: 1rem; padding: 0; background: none; }
.akte-momente { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0; }
.akte-moment { display: flex; flex-direction: column; gap: 3px; text-align: left; break-inside: avoid; }
.akte-moment img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #e2e8f0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
/* Auftrag app-verlauf B: Wundverlauf in der Akte (Akte bleibt hell, auch im Dunkelmodus) */
.wv-hinweis { margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid #fcd34d; background: #fffbeb; color: #78350f; font-size: 13px; font-weight: 600; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.wv-verlauf { margin: 10px 0 14px; padding: 10px 0 0; border-top: 1px solid #e2e8f0; break-inside: avoid; }
.wv-verlauf h4 { margin: 0; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.wv-verlauf[data-zustand="abgeschlossen"] h4 { color: #475569; }
.wv-fotos { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 4px; scroll-snap-type: x proximity; }
.wv-foto { flex: 0 0 132px; margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.3; scroll-snap-align: start; }
.wv-foto img { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; background: #e2e8f0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.wv-foto figcaption { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.wv-vergleich { margin: 8px 0 4px; }
.wv-wahlen { display: flex; gap: 8px; margin-bottom: 6px; }
.wv-wahl { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: #475569; }
.wv-wahl select, html.dark .akte-seite .wv-wahl select { display: block; width: 100%; min-height: 44px; margin-top: 2px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; font-size: 14px; padding: 0 8px; }
.wv-bilder { position: relative; width: 100%; max-width: 480px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #0f172a; }
.wv-bilder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.wv-bilder .wv-vorher { clip-path: inset(0 calc(100% - var(--wv-teil, 50%)) 0 0); }
.wv-bilder::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--wv-teil, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.6); pointer-events: none; }
.wv-marke { position: absolute; top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(15,23,42,.7); color: #fff; font-size: 12px; font-weight: 700; }
.wv-marke-links { left: 6px; } .wv-marke-rechts { right: 6px; }
.wv-schieber { display: block; width: 100%; max-width: 480px; min-height: 44px; accent-color: #047857; }
.wv-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wv-ueberlagerung { opacity: .45; }
@media print { .wv-fotos { flex-wrap: wrap; overflow: visible; } }
.akte-filterleiste { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }  /* Auftrag moment-kategorien */
.akte-filter { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid #cbd5e1; background: #ffffff; color: #334155; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.akte-filter[aria-pressed="true"] { background: #047857; border-color: #047857; color: #ffffff; }
.akte-moment-monat { margin: 14px 0 2px; font-size: 15px; font-weight: 800; }
.akte-moment-tag h4 { margin: 8px 0 2px; font-size: 13px; font-weight: 700; color: #475569; }
.akte-moment-kat { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 12px; font-weight: 700; color: #065f46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.akte-nur-druck { display: none; }
.akte-moment-text { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.akte-leiste { z-index: 2; }  /* Pferdebild (kopf-profil, position: relative) schob sich beim Scrollen über „Schließen“ */
/* Nr. 140: Filterleiste der Pferde-Akte (klebt mit der Leiste); Akte bleibt hell, auch im Dunkelmodus. Chips 30 px sichtbar, 44 px Tippfläche */
.akte-filter-box:not(.hidden) { display: flex; flex-direction: column; gap: 2px; min-width: 0; width: 100%; }  /* min-width: sonst schiebt die Chip-Reihe die Leiste breiter als den Schirm */
.akte-chips { min-width: 0; }
.akte-chips:first-child { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; }  /* Hinweis: Reihe scrollt weiter */
.akte-chips { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; }
.akte-chips::-webkit-scrollbar { display: none; }
.akte-chips-titel { flex-shrink: 0; padding-right: 4px; }
.akte-chip { flex-shrink: 0; min-height: 44px; padding: 0 2px; background: transparent; border: 0; display: inline-flex; align-items: center; }
.akte-chip > span { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: 13px; font-weight: 700; white-space: nowrap; }
.akte-chip[aria-pressed="true"] > span { background: #047857; border-color: #047857; color: #fff; }
.akte-filterzeile:not(.hidden) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.akte-seite .akte-feld, html.dark #akteModal .akte-feld {  /* ID: schlägt die allgemeine Dunkel-Regel für Eingabefelder */ min-height: 44px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #0f172a; font-size: 14px; font-weight: 600; padding: 0 8px; max-width: 100%; }
.akte-sprung, .akte-suche, .akte-zeitraum { flex: 1 1 0; min-width: 0; }
.akte-seite select.akte-feld { font-size: 13px; padding: 0 4px; }
.akte-rund { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #334155; }
.akte-rund-an { border-color: #047857; background: #ecfdf5; color: #047857; }
.akte-mehr-feld:not(.hidden) { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 4px; max-height: calc(100dvh - 170px); overflow-y: auto; overscroll-behavior: contain; }  /* Nr. 263: Filter-Feld, scrollt in sich */
/* Nr. 263: Leiste in zwei Reihen. Reihe 1: Schließen (nur Symbol), Titel, Drucken. Reihe 2: Bereich-Chips (scrollbar) und rechts fest der Filter-Knopf. Darunter die Zusammenfassung als Text. */
.akte-reihe1 { display: flex; align-items: center; gap: 8px; }
.akte-x { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; }
.akte-titel { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: #0f172a; }
.akte-reihe2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.akte-reihe2 > .akte-chips { flex: 1 1 0; min-width: 0; }
.akte-zusammen { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; margin: 0; min-height: 22px; }
.akte-zusammen > span { overflow-wrap: anywhere; }
.akte-fz { display: flex; flex-direction: column; margin: 0; min-width: 0; }
.akte-fz > .akte-feld { flex: none; width: 100%; box-sizing: border-box; margin-top: 2px; }
.akte-fz-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.akte-suchzeile { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.akte-suchzeile > .akte-suche { margin-top: 0; width: auto; }
.akte-schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.akte-schalter > .bs-label { margin: 0; flex: 1 1 auto; }
.akte-fertig { min-height: 44px; border-radius: 12px; border: 0; background: #047857; color: #fff; font-size: 13px; font-weight: 700; }
.akte-seite .bs-label, html.dark .akte-seite .bs-label { color: #475569; }  /* Akte bleibt hell: die Beschriftung nimmt die dunklen Portal-Farben nicht an */
.akte-seite #berichtMonatWahl, html.dark .akte-seite #berichtMonatWahl { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.akte-feld-label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; font-weight: 700; color: #334155; }
.akte-mehr-knopf { min-height: 44px; padding: 0 4px; background: none; border: 0; color: #047857; font-size: 13px; font-weight: 700; text-decoration: underline; }
.akte-mehr { display: flex; flex-direction: column; align-items: flex-start; margin: 2px 0 6px; }
.akte-filter-text { margin-top: 10px; }
mark.akte-treffer { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.akte-aus { display: none !important; }
@media screen { .akte-gekuerzt { display: none !important; } }
@media print { .akte-leer-zeitraum { display: none !important; } }  /* Abschnitt ohne Zeile im Zeitraum: im Druck keine leere Überschrift */
.tablet-pferdkopf { padding: 5px; }  /* Platz für den Ring der Momente, die Spalte schneidet sonst links ab */

/* Auftrag aktivitaeten-zeiten: Mini-Leiste Mo–So in der Karte „Aktivitäten“ (Woche) */
.woche-balken { display: inline-flex; align-items: flex-end; gap: 3px; height: 36px; }
.woche-tag { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 9px; height: 100%; padding-bottom: 13px; }
.woche-tag > i { display: block; width: 7px; border-radius: 2px 2px 0 0; background: var(--st-haupt); }
.woche-tag > b { display: block; width: 7px; height: 2px; border-radius: 1px; background: var(--st-haupt); }
.woche-tag > em { position: absolute; bottom: 0; font-style: normal; font-size: 12px; line-height: 12px; color: var(--st-text-gedaempft); }

/* Auftrag kopfzeile-uebergang: Übergang folgt dem Finger. --kopf-p (0 = groß, 1 = Leiste) und --kopf-weg (Scroll-Weg in px) setzt js/kopfzeile.js.
   Nur während des Gleitens (kopf-gleitet); bei 1 übernimmt kopf-fest mit denselben Endwerten, darum springt nichts.
   Ausnahme von „nur transform/opacity“: die Höhe des Bretts (ein absolut gesetztes Element, contain), sonst stimmt die Leiste am Ende nicht. */
@property --kopf-p { syntax: '<number>'; inherits: true; initial-value: 0; }
#kopfzeile.kopf-gleitet .zaun-buehne, #kopfzeile.kopf-gleitet .kopf-zaun, #kopfzeile.kopf-gleitet .zaun-tier, #kopfzeile.kopf-gleitet .kopf-zeile,
#kopfzeile.kopf-gleitet .kopf-szene, #kopfzeile.kopf-gleitet .kopf-wetter-platz, #kopfzeile.kopf-gleitet .zaun-hinten, #kopfzeile.kopf-gleitet .zaun-koppel { transition: none; }
#kopfzeile.kopf-gleitet .kopf-zaun { height: calc(30px * var(--zaun-skala, 1) + (14px * var(--zaun-leiste, 1) - 30px * var(--zaun-skala, 1)) * var(--kopf-p)); contain: layout style; }
#kopfzeile.kopf-gleitet .zaun-buehne { transform: translateY(calc(16px * var(--zaun-leiste, 1) * var(--kopf-p))) scale(calc(var(--zaun-skala, 1) + (var(--zaun-leiste, 1) - var(--zaun-skala, 1)) * var(--kopf-p))); }
/* 3. Tiere: jedes nach seinem Anteil (tiefe als Welle versetzt), Schnitt am Brett wächst mit */
#kopfzeile.kopf-gleitet .zaun-tier { --tp: clamp(0, calc((var(--kopf-p) - var(--welle, 0)) / var(--welle-ende, 1)), 1); --unter-gross: 0px;
    transform: translate(calc(var(--fest-x, 0px) * var(--tp)), calc(var(--fest-y, 0px) * var(--tp))) scale(calc(1 + (var(--fest-s, 1) - 1) * var(--tp))); transform-origin: 0 0; animation: none !important; }
#kopfzeile.kopf-gleitet .zaun-tier.zaun-hinter-brett { --unter-gross: var(--unter, 0px); }
#kopfzeile.kopf-gleitet .zaun-innen { animation: none !important; transform: none !important; }
#kopfzeile.kopf-gleitet .zaun-innen > svg:first-child { clip-path: inset(0 0 calc(var(--unter-gross) * (1 - var(--tp)) + var(--fest-weg, 0px) * var(--tp)) 0); }
#kopfzeile.kopf-gleitet .zaun-innen > :not(svg:first-child) { opacity: calc(1 - var(--kopf-p) * 2.5); }
/* 2. Ebenen: Himmel und Sonne/Mond langsam (gehen hinter den Hügeln unter), Hügel mittel, Zaun und Tiere mit dem Finger */
/* Was nach unten wandert, wird um denselben Weg unten abgeschnitten: Himmel endet an der Unterkante der Kopfzeile, Hügel an der Brett-Oberkante (Bühne y 142) */
#kopfzeile.kopf-gleitet .kopf-szene { --schub: calc(var(--kopf-weg, 0px) * var(--kopf-p) * 0.6); transform: translateY(var(--schub)); clip-path: inset(0 0 var(--schub) 0); opacity: calc(1.25 - var(--kopf-p) * 1.25); }
#kopfzeile.kopf-gleitet .zaun-hinten, #kopfzeile.kopf-gleitet .zaun-koppel { --schub: calc(var(--kopf-weg, 0px) * var(--kopf-p) * 0.3); transform: translateY(var(--schub)); clip-path: inset(0 0 calc(30px + var(--schub)) 0); opacity: calc(1.4 - var(--kopf-p) * 1.4); }
#kopfzeile.kopf-gleitet .kopf-wetter-platz { opacity: calc(1 - var(--kopf-p) * 2); }
/* 4. Schrift: erst der Gruß, dann wird der Hofname kleiner und ist weg, bevor die Leiste fertig ist */
#kopfzeile.kopf-gleitet #kopfGruss { opacity: calc(1 - var(--kopf-p) * 3.5); }
#kopfzeile.kopf-gleitet .kopf-titel h1 { opacity: calc(1.7 - var(--kopf-p) * 2.6); transform: scale(calc(1 - var(--kopf-p) * 0.4)); transform-origin: 0 50%; }
/* Was in der Leiste fehlt, blendet vorher aus */
#kopfzeile.kopf-gleitet #kopfBlase, #kopfzeile.kopf-gleitet .zaun-schild, #kopfzeile.kopf-gleitet .zaun-vorne, #kopfzeile.kopf-gleitet .zaun-schraube-unten, #kopfzeile.kopf-gleitet .zaun-brett { opacity: calc(1 - var(--kopf-p) * 4); transition: none; }

/* Auftrag einsteller-ansicht: Band oben; es schiebt über --safe-oben die Kopfzeile nach unten (auch kompakt und eingebettet) */
html.einsteller-ansicht { --band-h: 36px; --safe-oben: calc(env(safe-area-inset-top, 0px) + var(--band-h)); }
html.eingebettet.einsteller-ansicht { --safe-oben: var(--band-h); }
#einstellerAnsichtBand { position: fixed; top: 0; left: 0; right: 0; z-index: var(--ebene-oben); display: flex; align-items: center; justify-content: center;
    height: var(--safe-oben); padding: calc(var(--safe-oben) - var(--band-h)) max(12px, var(--safe-rechts)) 0 max(12px, var(--safe-links));
    background: #a21caf; color: #fff; font-weight: 700; font-size: 14px; border-bottom: 2px solid #f0abfc; }
#einstellerAnsichtBand.hidden { display: none; }
html.dark #einstellerAnsichtBand { background: #c026d3; border-bottom-color: #f5d0fe; }
#einstellerAnsichtBand[data-art="person"] { background: #b45309; border-bottom-color: #fcd34d; }  /* Nr. 210: „nur ansehen“ sieht anders aus als die Rollen-Ansicht */
html.dark #einstellerAnsichtBand[data-art="person"] { background: #92400e; border-bottom-color: #fbbf24; }

/* Auftrag wetter-bewoelkt-nebel: Wolken in zwei Schichten, Sonnenfleck, Nebelbänder, Wetter vorne. Nur transform/opacity animiert. */
.kopf-wolke-hinten { top: 16px; left: 52%; width: 70px; height: 18px; opacity: .55; background: #f4f6f8; }
.kopf-wolke-hinten::before { left: 10px; top: -12px; width: 26px; height: 26px; }
.kopf-wolke-hinten::after { left: 30px; top: -16px; width: 32px; height: 32px; }
.kopf-wolke-hinten-zwei { top: 50px; left: 72%; opacity: .5; }
.kopf-wolke-hinten-drei { top: 36px; left: 57%; opacity: .45; transform: scale(.8); }
.kopf-sonnenfleck { position: absolute; top: calc(var(--gestirn-oben, 22px) - 12px); right: calc(var(--gestirn-rechts, 7.7%) - 14px); width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle, rgba(255,251,228,.95) 0, rgba(255,246,212,.55) 35%, rgba(255,246,212,0) 70%); }
#kopfSzene[data-dunkel="1"] .kopf-wolke { background: #c3cbd4; }
#kopfSzene[data-dunkel="1"] .kopf-wolke-gross.kopf-grau { background: #8f9aa7; }
#kopfSzene[data-dunkel="1"] .kopf-sonnenfleck { opacity: .55; }
#kopfSzene[data-dunkel="1"] .kopf-nebel { opacity: .35; }
.kopf-nebelband { position: absolute; left: 0; width: 200%; pointer-events: none; will-change: transform;
    background: radial-gradient(ellipse 22% 50% at 25% 50%, rgba(255,255,255,.8), rgba(255,255,255,0)), radial-gradient(ellipse 22% 50% at 75% 50%, rgba(255,255,255,.8), rgba(255,255,255,0)); }
.kopf-nb-1 { bottom: calc(0.13 * min(100vw, 600px)); height: 46px; opacity: .8; animation: kopf-nebel-zieht calc(var(--takt-ruhe) * 15) linear infinite; }
.kopf-nb-2 { bottom: calc(0.03 * min(100vw, 600px)); height: 40px; opacity: .65; animation: kopf-nebel-zieht calc(var(--takt-ruhe) * 11) linear infinite reverse; }
@keyframes kopf-nebel-zieht { from { transform: translateX(0); } to { transform: translateX(-50%); } }
#kopfSzene[data-dunkel="1"] .kopf-nebelband, #kopfSzene[data-tageszeit="abend"] .kopf-nebelband { opacity: .35; }
/* Nebel: Häuser hinten fast weg, Koppel blass, die Tiere am Zaun bleiben klar */
#kopfzeile.kopf-nebelig .zaun-hinten { opacity: .3; }
#kopfzeile.kopf-nebelig .zaun-koppel { opacity: .6; }
#kopfzeile.kopf-nebelig.kopf-gleitet .zaun-hinten { opacity: calc((1.4 - var(--kopf-p) * 1.4) * .3); }
#kopfzeile.kopf-nebelig.kopf-gleitet .zaun-koppel { opacity: calc((1.4 - var(--kopf-p) * 1.4) * .6); }
#kopfzeile.kopf-nebelig.kopf-fest .zaun-hinten, #kopfzeile.kopf-nebelig.kopf-fest .zaun-koppel { opacity: 0; }
/* Ebene vorne: über Zaun und Tieren (2), unter Wetter-Knopf (5), Schrift (6) und Blase (7); fängt keine Tipps */
.kopf-wetter-vorne { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; transition: opacity .15s ease-out, visibility .15s; }
.kopf-wetter-vorne * { pointer-events: none; }
.kopf-nb-vorne { left: 0; width: 60%; bottom: calc(6px + 8% ); height: 64px; transform: translateX(-100%); animation: kopf-nebel-vorbei calc(var(--takt-ruhe) * 14) linear infinite;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255,255,255,.38), rgba(255,255,255,0)); }
@keyframes kopf-nebel-vorbei { 0% { transform: translateX(-100%); } 75%, 100% { transform: translateX(170%); } }  /* zieht vorbei, dann eine Weile frei */
html.dark .kopf-nb-vorne { background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(205,212,220,.3), rgba(205,212,220,0)); }
.kopf-regen { animation: kopf-regen-faellt calc(var(--takt-tipp) * 6) linear infinite; }
@keyframes kopf-regen-faellt { from { transform: translate(0, -6px) rotate(calc(-18deg * var(--wind-richtung, 1))); opacity: 0; } 20% { opacity: 1; } to { transform: translate(calc(8px * var(--wind-richtung, 1)), 22px) rotate(calc(-18deg * var(--wind-richtung, 1))); opacity: 0; } }  /* Auftrag tiere-wind: schräg mit dem Wind */
.kopf-tropfen-vorne { position: absolute; top: -30px; width: 3px; height: 24px; border-radius: 3px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 .5px rgba(70,95,125,.45); animation: kopf-tropfen-vorne calc(var(--takt-wechsel) * 3) linear infinite; }
@keyframes kopf-tropfen-vorne { from { transform: translate(0, 0) rotate(calc(-18deg * var(--wind-richtung, 1))); } to { transform: translate(calc(90px * var(--wind-richtung, 1)), 300px) rotate(calc(-18deg * var(--wind-richtung, 1))); } }
.kopf-flocke-vorne { position: absolute; top: -12px; width: 8px; height: 8px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 2px rgba(120,140,170,.7); opacity: .9; animation: kopf-flocke-vorne calc(var(--takt-wechsel) * 28) linear infinite; }
@keyframes kopf-flocke-vorne { 0% { transform: translate(0, 0); } 50% { transform: translate(14px, 150px); } 100% { transform: translate(-6px, 300px); } }
/* Leiste: nur die Himmelfarbe; beim Gleiten blendet die Ebene mit aus */
#kopfzeile.kopf-fest .kopf-wetter-vorne { opacity: 0; visibility: hidden; }
#kopfzeile.kopf-gleitet .kopf-wetter-vorne { transition: none; opacity: calc(1 - var(--kopf-p) * 2); }
/* Bewegung reduzieren / Animationen aus: statisch, kein fallender Regen, ein ruhiges Nebelband */
html.tiere-aus .kopf-nebelband, html.tiere-aus .kopf-regen { animation: none; }
html.tiere-aus .kopf-tropfen-vorne, html.tiere-aus .kopf-flocke-vorne, html.tiere-aus .kopf-nb-vorne { display: none; }
@media (prefers-reduced-motion: reduce) {
    .kopf-nebelband, .kopf-regen { animation: none; }
    .kopf-tropfen-vorne, .kopf-flocke-vorne, .kopf-nb-vorne { display: none; }
    .kopf-wetter-vorne { transition: none; }
}

/* Auftrag tiere-auf-seiten (Nr. 35ze): Posen aus vorlagen/tiere-posen/posen.css, Akzente auf den Seiten. Nur transform/opacity, einmal kurz (Ladeanzeige läuft). */
.tier-pose { transform-box: fill-box; }
.pose-huepft { animation: pose-huepft calc(calc(var(--takt-tipp) * var(--p-d, 1)) * 6) var(--kurve-raus) var(--p-n, 1); transform-origin: 50% 100%; }
.pose-nickt { animation: pose-nickt calc(calc(var(--takt-wechsel) * var(--p-d, 1)) * 4) var(--kurve-weich) 1; transform-origin: 50% 60%; }
.pose-wedelt { animation: pose-wedelt calc(calc(var(--takt-tipp) * var(--p-d, 1)) * 6) var(--kurve-weich) 1; transform-origin: 50% 90%; }
.pose-watschelt { animation: pose-watschelt calc(calc(var(--takt-wechsel) * var(--p-d, 1)) * 3) var(--kurve-weich) infinite; transform-origin: 50% 100%; }
@keyframes pose-huepft { 0% { transform: none; animation-timing-function: var(--kurve-raus); } 16% { transform: scale(calc(1 + .07 * var(--p-s, 1)), calc(1 - .09 * var(--p-s, 1))); animation-timing-function: var(--kurve-raus); } 38% { transform: translateY(calc(-22% * var(--p-h, 1))) scale(.95, 1.07); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 62% { transform: translateY(0) scale(calc(1 + .09 * var(--p-s, 1)), calc(1 - .11 * var(--p-s, 1))); animation-timing-function: var(--p-landung, var(--kurve-feder)); } 80% { transform: translateY(calc(-5% * var(--p-h, 1))) scale(.99, 1.02); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 100% { transform: none; } }  /* Nr. 289 B: ausholen, gestreckt abheben, gestaucht landen, nachfedern */
@keyframes pose-nickt { 0% { transform: none; animation-timing-function: var(--kurve-raus); } 16% { transform: rotate(-3deg) translateY(-2%); animation-timing-function: var(--kurve-raus); } 38% { transform: rotate(calc(7deg * var(--p-h, 1))) translateY(3%); animation-timing-function: var(--p-landung, var(--kurve-feder)); } 58% { transform: rotate(-1.5deg); } 76% { transform: rotate(calc(4deg * var(--p-h, 1))) translateY(2%); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 100% { transform: none; } }  /* Nr. 289 B: zurücknehmen, nicken, nachnicken */
@keyframes pose-wedelt { 0%, 100% { transform: rotate(0); } 12% { transform: rotate(-3deg); } 28% { transform: rotate(8deg); } 44% { transform: rotate(-7deg); } 60% { transform: rotate(5deg); } 76% { transform: rotate(-3deg); } 90% { transform: rotate(1deg); } }  /* Nr. 289 B: Ausschlag klingt ab (Nachschwingen) */
@keyframes pose-watschelt { 0%,100% { transform: rotate(-7deg) } 50% { transform: rotate(7deg) } }
/* Nr. 164 B: Karolines Bewegungen, je einmalig und kurz (Umfallen bis 4 s), nur transform */
.pose-lacht { animation: pose-lacht calc(var(--takt-tipp) * 9) var(--kurve-weich) 1; transform-origin: 50% 80%; }
.pose-staunt { animation: pose-staunt calc(var(--takt-auftritt) * 2) var(--kurve-weich) 1; transform-origin: 50% 80%; }
.pose-grantig { animation: pose-grantig calc(var(--takt-auftritt) * 3) var(--kurve-weich) 1; transform-origin: 50% 80%; }
.pose-erschrocken { animation: pose-erschrocken calc(calc(var(--takt-wechsel) * var(--p-d, 1)) * 2) var(--kurve-raus) 1; transform-origin: 50% 90%; }
.pose-meckert { animation: pose-meckert calc(calc(var(--takt-auftritt) * var(--p-d, 1)) * 2) var(--kurve-weich) 1; transform-origin: 50% 90%; }
.pose-feiert { animation: pose-feiert calc(calc(var(--takt-auftritt) * var(--p-d, 1)) * 3) var(--kurve-weich) 1; transform-origin: 50% 100%; }
.pose-schwindlig { animation: pose-schwindlig calc(var(--takt-wechsel) * 8) var(--kurve-weich) 1; transform-origin: 50% 80%; }
.pose-faellt-um { animation: pose-faellt-um var(--takt-ruhe) var(--kurve-weich) 1 forwards; transform-origin: 50% 100%; }
.pose-nein { animation: pose-nein calc(calc(var(--takt-tipp) * var(--p-d, 1)) * 6) var(--kurve-weich) 1; transform-origin: 50% 80%; }
@keyframes pose-lacht { 0%,100% { transform: rotate(0) } 20% { transform: rotate(-5deg) } 40% { transform: rotate(5deg) } 60% { transform: rotate(-4deg) } 80% { transform: rotate(3deg) } }
@keyframes pose-staunt { 0%,100% { transform: scale(1) } 30% { transform: scale(1.06) translateY(-3%) } 60% { transform: scale(1.03) translateY(-1%) } }
@keyframes pose-grantig { 0%,100% { transform: rotate(0) } 35% { transform: rotate(-4deg) } 55% { transform: rotate(-4deg) translateY(2%) } 80% { transform: rotate(2deg) } }
@keyframes pose-erschrocken { 0% { transform: none; animation-timing-function: var(--kurve-raus); } 18% { transform: scale(calc(1 + .06 * var(--p-s, 1)), calc(1 - .08 * var(--p-s, 1))); animation-timing-function: var(--kurve-raus); } 45% { transform: translateY(calc(-9% * var(--p-h, 1))) scale(.96, 1.06); animation-timing-function: var(--p-landung, var(--kurve-feder)); } 100% { transform: none; } }  /* Nr. 289 B: erst ducken, dann hoch, federnd zurück */
@keyframes pose-meckert { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-8deg) translateY(-3%) } 50% { transform: rotate(0) } 75% { transform: rotate(-6deg) translateY(-2%) } }
@keyframes pose-feiert { 0% { transform: none; animation-timing-function: var(--kurve-raus); } 10% { transform: scale(calc(1 + .06 * var(--p-s, 1)), calc(1 - .08 * var(--p-s, 1))); animation-timing-function: var(--kurve-raus); } 24% { transform: translateY(calc(-18% * var(--p-h, 1))) rotate(-5deg) scale(.96, 1.06); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 44% { transform: translateY(0) scale(calc(1 + .08 * var(--p-s, 1)), calc(1 - .1 * var(--p-s, 1))); animation-timing-function: var(--kurve-raus); } 62% { transform: translateY(calc(-14% * var(--p-h, 1))) rotate(5deg) scale(.96, 1.05); animation-timing-function: var(--p-fluss, var(--kurve-weich)); } 82% { transform: translateY(0) scale(1.04, .95); animation-timing-function: var(--p-landung, var(--kurve-feder)); } 100% { transform: none; } }  /* Nr. 289 B: zwei Hüpfer mit Ausholen und Landen */
@keyframes pose-schwindlig { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-9deg) } 50% { transform: rotate(8deg) } 75% { transform: rotate(-5deg) } }
@keyframes pose-faellt-um { 0% { transform: rotate(0) } 35% { transform: rotate(0) } 55% { transform: rotate(78deg) translateY(2%) } 75% { transform: rotate(78deg) translateY(2%) } 90% { transform: rotate(-6deg) } 100% { transform: rotate(0) } }
/* Nr. 289 B: Ohren folgen versetzt und federn aus */
:is(.pose-huepft, .pose-feiert, .pose-erschrocken, .pose-nickt) .ohr-zuck { animation: ohr-nach calc(var(--takt-tipp) * 6 * var(--p-d, 1)) var(--kurve-weich) calc(var(--takt-tipp) * .6) 1; }
@keyframes ohr-nach { 0%, 20% { transform: rotate(0); } 42% { transform: rotate(calc(var(--zw, 9deg) * 1.8)); } 64% { transform: rotate(calc(var(--zw, 9deg) * -1)); } 82% { transform: rotate(calc(var(--zw, 9deg) * .4)); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { :is(.pose-huepft, .pose-feiert, .pose-erschrocken, .pose-nickt) .ohr-zuck { animation: none !important; } }
@keyframes pose-nein { 0%,100% { transform: rotate(0) } 20% { transform: rotate(-10deg) } 45% { transform: rotate(10deg) } 70% { transform: rotate(-6deg) } }
@media (prefers-reduced-motion: reduce) { .tier-pose { animation: none !important; } }
html.tiere-aus .tier-pose, html.tiere-aus .liste-ende, html.tiere-aus .tier-akzent { display: none !important; }
.tier-akzent { pointer-events: none; display: inline-block; line-height: 0; flex-shrink: 0; }
.tier-akzent svg { display: block; }
.liste-ende svg { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.tier-akzent-leer { display: flex; justify-content: center; margin: 0 auto 2px; }
.tier-akzent-toast { margin: -6px 0 -6px -4px; }
.tier-akzent-admin .tier-pose { animation: none !important; }
.tier-akzent-lade { vertical-align: -0.2em; margin-right: 0.35em; display: inline-block; }
.tier-akzent-lade svg { height: 1.2em; width: auto; }
@media print { .tier-akzent, .liste-ende { display: none !important; } }
/* Auftrag checkliste-fertig-karoline: Karoline schaut über die Oberkante der ersten Aufgabe, Blase im Kartenstil links daneben */
.karo-fertig { position: absolute; right: 10px; bottom: 100%; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; z-index: 2; }
.karo-tier { pointer-events: auto; display: block; line-height: 0; padding: 0; background: none; border: 0; clip-path: inset(-40px -20px 0 -20px); cursor: pointer; }
.karo-tier svg { display: block; }
.karo-blase { position: relative; margin-bottom: 8px; padding: 3px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.karo-blase::after { content: ''; position: absolute; right: -5px; bottom: 6px; width: 8px; height: 8px; background: inherit; border-right: 1px solid; border-top: 1px solid; border-color: inherit; transform: rotate(45deg); }
.karo-ohne-tier .karo-blase::after, html.tiere-aus .karo-blase::after { display: none; }
.karo-kurz { display: none; }
.karo-knapp { flex-direction: column; align-items: flex-end; gap: 2px; }  /* wenig Platz: Blase über ihr, Spitze nach unten */
.karo-knapp .karo-blase { margin-bottom: 0; }
.karo-knapp .karo-blase::after { right: 22px; bottom: -5px; border-top: 0; border-bottom: 1px solid; border-color: inherit; }
.karo-knapp .karo-lang, .karo-kurztext .karo-lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }  /* Vorleser liest weiter den langen Text */
.karo-knapp .karo-kurz, .karo-kurztext .karo-kurz { display: inline; }
.karo-zu-eng .karo-blase { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.karo-hopp .karo-tier svg { animation: karo-hoch calc(var(--takt-wechsel) * 3) var(--kurve-feder) var(--karo-seit, 0s) both; }
.karo-hopp .karo-blase { animation: karo-blase-rein calc(var(--takt-tipp) * 2) var(--kurve-raus) calc(.55s + var(--karo-seit, 0s)) both; }
.karo-weg .karo-tier svg { animation: karo-runter calc(var(--takt-tipp) * 2) ease-in both; }
@keyframes karo-hoch { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes karo-runter { from { transform: translateY(0); } to { transform: translateY(105%); } }
@keyframes karo-blase-rein { from { opacity: 0; } to { opacity: 1; } }
html.tiere-aus .karo-hopp .karo-blase, html.tiere-aus .karo-weg { animation: none; }
html.tiere-aus .karo-weg { display: none; }
@media (prefers-reduced-motion: reduce) { .karo-hopp .karo-tier svg, .karo-hopp .karo-blase { animation: none; } .karo-weg { display: none; } }
@media print { .karo-fertig { display: none !important; } }
.kopf-wetter-hase { float: right; margin: -2px -4px 2px 6px; }
#kopfWetter::after { content: ''; display: block; clear: both; }
#mod_today { position: relative; }
.heute-gast { position: absolute; right: 50px; top: 1px; z-index: 2; transform: translateY(-48%); line-height: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }  /* Nr. 92: Knopf selbst ≥ 44 px (Tier wie vorher: Mitte 72 px vom Rand) */  /* halb über der Kante, unten im leeren Kopf der Karte */
.heute-gast:empty { display: none; }
html.tiere-aus .heute-gast { display: none !important; }
/* Nr. 89: Trefferfläche mind. 44 px nur um das Tier (das Tier selbst bleibt an seinem Platz), Hüpfen nur über transform */
.heute-gast::before { content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; transform: translate(-50%, -50%); }
.heute-gast:focus-visible { outline: 2px solid var(--st-fokus); outline-offset: 2px; border-radius: 10px; }
.heute-gast.gast-huepft .tier-akzent { animation: gast-huepft calc(var(--takt-tipp) * 3) var(--kurve-raus); }
@keyframes gast-huepft { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 70% { transform: translateY(1px); } }
.heute-gast-blase { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; line-height: 1.2; font-size: .75rem; font-weight: 800; color: var(--st-text);
  background: var(--st-flaeche); border: 1.5px solid var(--st-kontur); border-radius: 10px; padding: 3px 8px; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
html.dark .heute-gast-blase { border-color: var(--st-linie); }
/* Auftrag tiere-auf-seiten Teil 7: Posen am Zaun – in der kompakten Leiste ohne Zusatz und ohne Bewegung; abends döst eines kurz */
#kopfzeile.kopf-fest .pose-zusatz { display: none; }
#kopfzeile.kopf-fest .zaun-tier .tier-pose, html.tiere-aus .zaun-tier .tier-pose { animation: none; }
html.tiere-aus #kopfZaun .tier-pose { display: block !important; }
.zaun-doest { transform-box: fill-box; transform-origin: center; transform: scaleY(.45); }

/* Auftrag einfuehrung-blue: Führung mit Blue und Karoline. Abdunkeln über das Loch (Schatten), Blasen und Tiere über der unteren Leiste */
.einf-dialog { position: fixed; inset: 0; z-index: var(--ebene-schoner); outline: none; }
.einf-spot { position: absolute; border-radius: 16px; box-shadow: 0 0 0 200vmax rgba(15, 23, 42, .58); pointer-events: none; }
.einf-box { position: absolute; left: 12px; right: 12px; max-width: 440px; margin: 0 auto; }
.einf-buehne { display: grid; grid-template-columns: 1fr 1fr; align-items: end; row-gap: 6px; }
.einf-tier { display: contents; }
.einf-blase { grid-column: 1 / 3; position: relative; max-width: 86%; margin: 0; padding: 10px 12px; border-radius: 16px; background: #fff; border: 1px solid #d1fae5; color: #1e293b; font-size: 15px; line-height: 1.35; box-shadow: 0 6px 18px rgba(15, 23, 42, .18); }
.einf-links .einf-blase { justify-self: start; }
.einf-rechts .einf-blase { justify-self: end; }
.einf-blase::after { content: ''; position: absolute; bottom: -7px; width: 12px; height: 12px; background: inherit; border-right: inherit; border-bottom: inherit; transform: rotate(45deg); }
.einf-links .einf-blase::after { left: 22px; }
.einf-rechts .einf-blase::after { right: 22px; }
.einf-tier:not(.einf-vorn) .einf-blase { opacity: .82; box-shadow: none; }
.einf-dialog:not(.einf-zwei) .einf-tier:not(.einf-vorn) .einf-blase { visibility: hidden; }
.einf-vorn .einf-blase { z-index: 1; animation: einf-auf calc(var(--takt-tipp) * 2) var(--kurve-raus) 1; }
.einf-bild { grid-row: 3; display: block; width: 64px; }
.einf-links .einf-bild { grid-column: 1; justify-self: start; margin-left: 4px; }
.einf-rechts .einf-bild { grid-column: 2; justify-self: end; margin-right: 4px; }
.einf-bild svg { width: 64px; height: auto; }
.einf-geste-hoch .einf-bild { animation: einf-hoch var(--takt-auftritt) var(--kurve-raus) 1; transform-origin: 50% 100%; }
.einf-geste-neigen .einf-bild { animation: einf-neigen calc(var(--takt-wechsel) * 3) var(--kurve-raus) 1; transform-origin: 50% 100%; }
@keyframes einf-auf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes einf-hoch { 0%, 100% { transform: none; } 40% { transform: translateY(-6px) rotate(-4deg); } }
@keyframes einf-neigen { 0%, 100% { transform: none; } 45% { transform: rotate(6deg); } }
.einf-knoepfe { display: flex; gap: 10px; margin-top: 10px; }
.einf-knopf { flex: 1; border-radius: 14px; font-weight: 700; font-size: 15px; }
.einf-knopf-haupt { background: #047857; color: #fff; }
.einf-knopf-haupt:disabled { opacity: .45; }
.einf-knopf-leise { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
html.dark .einf-spot { box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .66); outline: 2px solid rgba(110, 231, 183, .7); }
html.dark .einf-blase { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html.dark .einf-knopf-leise { background: #1e293b; color: #e2e8f0; border-color: #475569; }
@media (prefers-reduced-motion: reduce) { .einf-vorn .einf-blase, .einf-geste-hoch .einf-bild, .einf-geste-neigen .einf-bild { animation: none; } }
html.tiere-aus .einf-geste-hoch .einf-bild, html.tiere-aus .einf-geste-neigen .einf-bild { animation: none; }
@media print { .einf-dialog { display: none; } }

/* Auftrag dashboard-hinweise A: Hinweis-Stapel; ruhiger Grund mit farbigem linken Akzentstreifen + eingefärbtem Symbol je Dringlichkeit */
#dashHinweise { padding-bottom: 6px; }  /* der Tagesgast (.heute-gast) ragt 20 px über „Heute“: bei genau einem Hinweis lag sein Knopf sonst 4 px über dem Hinweis-Knopf */
.dash-stapel { position: relative; }  /* Nr. 238: eine schlanke Zeile, keine gestapelten Kanten mehr */
.dash-mehr { background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
#dashHinweise .dash-hinweis-zeile {
    background: var(--st-flaeche);
    color: var(--st-text);
    border: 1px solid var(--st-linie);
    border-left: 4px solid var(--st-text-gedaempft);
}
#dashHinweise .dash-hinweis-zeile > i:first-child { color: var(--st-text-gedaempft); }
#dashHinweise .dash-hinweis-zeile.bs-ton-gefahr { border-left-color: #c23b2b; }
#dashHinweise .dash-hinweis-zeile.bs-ton-gefahr > i:first-child { color: var(--st-ton-gefahr-text); }
#dashHinweise .dash-hinweis-zeile.bs-ton-hinweis { border-left-color: #c68a1e; }
#dashHinweise .dash-hinweis-zeile.bs-ton-hinweis > i:first-child { color: #a16207; }
#dashHinweise .dash-hinweis-zeile.bs-ton-aktiv { border-left-color: var(--st-haupt); }
#dashHinweise .dash-hinweis-zeile.bs-ton-aktiv > i:first-child { color: var(--st-haupt); }
#dashHinweise .dash-hinweis-zeile.bs-ton-info { border-left-color: var(--st-ton-info-text); }
#dashHinweise .dash-hinweis-zeile.bs-ton-info > i:first-child { color: var(--st-ton-info-text); }
html.dark #dashHinweise .dash-hinweis-zeile.bs-ton-gefahr { border-left-color: #f87171; }
html.dark #dashHinweise .dash-hinweis-zeile.bs-ton-hinweis { border-left-color: #eab308; }
html.dark #dashHinweise .dash-hinweis-zeile.bs-ton-hinweis > i:first-child { color: var(--st-ton-hinweis-text); }

/* Auftrag gesundheit-eintrag-loeschen: gesperrte Felder im Blatt „Eintrag“ (nur lesen) erkennbar */
#eventModal [data-nur-lesen] { opacity: .65; }

/* Auftrag gesundheit-eintrag-loeschen B: Akte-Zeilen antippbar (nur Bildschirm, Druck unverändert) */
@media screen {
    .akte-tippbar { cursor: pointer; }
    .akte-tippbar > td { height: 44px; }
    .akte-tippbar > td:last-child::after { content: " \203A"; font-weight: 700; color: var(--st-text-gedaempft, #64748b); }
    .akte-tippbar:focus-visible { background: rgba(16, 185, 129, .08); }
    @media (hover: hover) { .akte-tippbar:hover { background: rgba(16, 185, 129, .08); } }  /* Nr. 252 A: Hover nur mit Maus */
}
        /* Auftrag morgendienst-team: zwei Punkte in den Personenfarben vor dem Teamnamen */
        .team-punkte { display: inline-flex; align-items: center; margin-right: 6px; }
        .team-punkt { width: 10px; height: 10px; border-radius: 9999px; border: 1.5px solid var(--st-flaeche); }
        .team-punkt + .team-punkt { margin-left: -3px; }

/* Auftrag rollen C2: Besucher sehen nur ihre Pferde, Momente, Termine und Hoftiere – kein Dienst, Planer, Stallgeflüster,
   keine Aktivitäten anderer, keine Suche. Der Server sperrt dasselbe; das hier räumt nur die Oberfläche auf. */
html.rolle-besucher #mod_today, html.rolle-besucher #mod_topmover, html.rolle-besucher #mod_notices,
html.rolle-besucher #mod_weather, html.rolle-besucher #mod_activity, html.rolle-besucher #mod_quicklinks,
html.rolle-besucher #dashEditWrap, html.rolle-besucher #ausrittAlarme,
html.rolle-besucher #navBtnCalendar, html.rolle-besucher #navBtnChecklist,
html.rolle-besucher #profilDiensteBox, html.rolle-besucher #profilAbwesenheitBox, html.rolle-besucher #profilPferdeBox,
html.rolle-besucher #meineVertraege, html.rolle-besucher #appAusritt { display: none !important; }
/* Im Pferd: Besucher sehen Momente, Termine (Kalender) und – nur mit Freigabe – die Gesundheit; keine Eingaben */
html.rolle-besucher #horseQrBtn, html.rolle-besucher #horseWichtigBox, html.rolle-besucher #horseWichtigPanel,
html.rolle-besucher #modsec_location, html.rolle-besucher #modsec_training, html.rolle-besucher #modsec_dokumente,
html.rolle-besucher #modsec_notes, html.rolle-besucher #horseAdminBlock, html.rolle-besucher #modsec_profile,
html.rolle-besucher #modsec_users, html.rolle-besucher #modsec_feed,
html.rolle-besucher #horsePhotoKnopf, html.rolle-besucher #horsePhotoRemoveSlot,
html.rolle-besucher #horseHeuteGabeZeile, html.rolle-besucher #horseHeuteStatusZeile, html.rolle-besucher #horseHeaderLocPill, html.rolle-besucher #horseModalStepper,
html.rolle-besucher #horseSteckbriefLesen, html.rolle-besucher #horseStammEditBtn, html.rolle-besucher #horseNotfallCard, html.rolle-besucher #horseAkteUebergabeCard,
html.rolle-besucher #horseGesundheitVerlaeufe, html.rolle-besucher #horseReiterBtnProfil, html.rolle-besucher #horseInlineJahresrueckblick, html.rolle-besucher #horseInlineRitteKarte,
html.rolle-besucher.besucher-ohne-gesundheit #horseReiterBtnGesundheit,
html.rolle-besucher.besucher-ohne-gesundheit #modsec_health { display: none !important; }

/* Auftrag karoline-reagiert (Nr. 71) Teil A: Karoline schaut unten herein (Leerlauf, nach dem Eintragen, offline). Kein Kasten: Blase im Kartenstil, Tier direkt in der Seite */
.karoline-gast { position: fixed; left: max(8px, var(--safe-links, 0px)); bottom: calc(164px + var(--safe-unten, 0px)); z-index: var(--ebene-blatt); display: flex; align-items: flex-end; gap: 6px; max-width: min(340px, calc(100vw - 16px)); min-height: 44px; pointer-events: none; animation: karoline-gast-ein calc(var(--takt-tipp) * 2) var(--kurve-raus); }  /* Lücken und Rand lassen Tipps durch */
.karoline-gast-blase, .karoline-gast-bild { pointer-events: auto; cursor: pointer; min-height: 44px; }  /* Nr. 380: Tipp auf Figur oder Blase (data-action am Behälter) lässt sie verschwinden, nichts darunter */
.karoline-gast-bild { order: 1; flex: none; width: 72px; line-height: 0; margin-bottom: -18px; }
.karoline-gast-bild svg { display: block; width: 72px; height: auto; }
.karoline-gast-blase { order: 2; position: relative; display: flex; align-items: center; margin: 0 0 22px; background: #fffdf7; color: #3b2f25; border: 2px solid #2b2622; border-radius: 16px; padding: 9px 12px; box-shadow: 0 3px 0 rgba(43, 38, 34, .15); font-size: 14px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.karoline-gast-blase::after { content: ''; position: absolute; left: -8px; bottom: 12px; width: 13px; height: 13px; background: inherit; border-left: 2px solid #2b2622; border-bottom: 2px solid #2b2622; transform: rotate(45deg); }
.karoline-gast-text .karoline-gast-blase { margin-bottom: 0; }
.karoline-gast-text .karoline-gast-blase::after { display: none; }
.karoline-gast[data-art="leerlauf"] { bottom: calc(74px + var(--safe-unten, 0px)); z-index: var(--ebene-vollseite); pointer-events: auto; cursor: pointer; }  /* Leerlauf: kein Toast darunter, ganz unten über der Leiste */
body.tablet-modus .karoline-gast { z-index: var(--ebene-tablet); }  /* am Tablet unter dem Bildschirmschoner (z 70) */
@keyframes karoline-gast-ein { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .karoline-gast { animation: none; } }
html.tiere-aus .karoline-gast { animation: none; }
html.dark .karoline-gast-blase { background: #2b2723; color: #f3ecdc; border-color: #9a8f80; }
html.dark .karoline-gast-blase::after { border-color: #9a8f80; }
/* Nr. 332: Betty-Zeile (kleine Sprechblase mit Bild) in Heuleiter, Reim-Duell, Flunkern und Steckbrief */
.betty-zeile-bild svg { display: block; width: 44px; height: auto; }
.betty-blase { position: relative; margin: 0; background: #fbf6ee; color: #3b2f25; border: 2px solid #8a6f52; border-radius: 14px 14px 14px 4px; padding: 7px 11px; line-height: 1.35; overflow-wrap: anywhere; }
html.dark .betty-blase { background: #2f2924; color: #f3ecdc; border-color: #9a8f80; }

/* Auftrag karoline-reagiert (Nr. 71) Teil B: Frage im Ladebild (Textfeld oder Auswahl, „Später“, „Nie wieder fragen“) */
.boot-frage { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.boot-frage-zeile, .boot-frage-wahl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.boot-frage input { flex: 1 1 120px; min-width: 0; min-height: 44px; border: 2px solid #2b2622; border-radius: 12px; padding: 0 10px; font-size: 16px; background: #fff; color: #2b2622; }
.boot-frage-ok { min-height: 44px; padding: 0 14px; border-radius: 12px; background: #3f6212; color: #fff; font-size: 14px; font-weight: 700; }
.boot-frage-leise { min-height: 44px; padding: 0 8px; font-size: 13px; font-weight: 700; color: #4f6b2a; text-decoration: underline; text-underline-offset: 3px; }
.boot-noch[hidden] { display: none; }
html.dark .boot-frage input { background: #1f1c19; color: #f3ecdc; border-color: #9a8f80; }
html.dark .boot-frage-ok { background: #a3c76a; color: #1f1c19; }
html.dark .boot-frage-leise { color: #b7d98a; }
/* Auftrag karoline-reagiert (Nr. 71) Teil C: Herz und „Stimmt nicht?“ an der Fakt-Blase (Trefferflächen ≥ 44 px) */
/* Nr. 283 B: Aktionszeile abgesetzt (feine Trennlinie), Herz als runder Chip links, „Noch einer“ als grüne Pille rechts */
.boot-knopfzeile { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid rgba(43, 38, 34, .15); position: relative; z-index: 1; }
.boot-knopfzeile .boot-noch { margin: 0 0 0 auto; }
.boot-knopfzeile .boot-noch[hidden], .boot-noch[hidden] { display: none; }
.boot-knopfzeile .boot-noch, .boot-noch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #cfe5a3; color: #1f3a0f; text-decoration: none; font-size: 14px; }
html.dark .boot-noch { background: #3b5220; color: #e3f2c4; }
html.dark .boot-herz { border-color: rgba(255, 255, 255, .3); }
html.dark .boot-herz[aria-pressed="true"] { background: #4c0519; border-color: #fb7185; }
.boot-herz { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #be123c; border-radius: 999px; border: 1px solid rgba(43, 38, 34, .25); }
.boot-herz[aria-pressed="true"] { background: #ffe4e6; border-color: #fb7185; animation: boot-herz-pop calc(var(--takt-tipp) * 2) var(--kurve-raus) 1; }
@keyframes boot-herz-pop { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .boot-herz[aria-pressed="true"] { animation: none; } }
html.tiere-aus .boot-herz[aria-pressed="true"] { animation: none; }
.boot-herz[aria-pressed="true"] { color: #e11d48; }
.boot-fakt-knopf[hidden] { display: none; }
html.dark .boot-herz { color: #fb7185; }
html.dark /* Auftrag karoline-quiz (Nr. 72): „Wer bin ich?“ als Schattenriss, Momente-Quiz als stark gezoomter Ausschnitt */
.quiz-silhouette { display: flex; justify-content: center; padding: 8px 0; }
.quiz-silhouette svg { width: 150px; height: auto; filter: brightness(0); opacity: .85; }
html.dark .quiz-silhouette svg { filter: brightness(0) invert(1); opacity: .8; }
.quiz-ausschnitt { width: 100%; max-width: 280px; aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 16px; border: 2px solid #cbd5e1; }
html.dark .quiz-ausschnitt { border-color: #475569; }
.quiz-ausschnitt img { width: 100%; height: 100%; object-fit: cover; transform: scale(3.2); }
.dienst-streifen { transition: width .3s ease-out; }  /* Nr. 90: Fortschritt im Dienstbalken */
@media (prefers-reduced-motion: reduce) { .dienst-streifen { transition: none; } }
/* Nr. 84 Teil 4.5: Meldung nie im Druck (Lage setzt showToast aus der gemessenen Höhe der unteren Leiste) */
@media print { #toast { display: none !important; } }
/* Nr. 84 Teil 1: Profil – Startliste oder genau eine Gruppe (Blöcke tragen data-pg, das Fenster data-gruppe) */
#profileModal[data-gruppe=""] [data-pg], #profileModal[data-gruppe=""] #profilUnterKopf, #profileModal[data-gruppe=""] #profilRest { display: none !important; }
#profileModal:not([data-gruppe=""]) #profilStart { display: none; }
#profileModal[data-gruppe="ich"] [data-pg]:not([data-pg~="ich"]) { display: none !important; }
#profileModal[data-gruppe="mitteilungen"] [data-pg]:not([data-pg~="mitteilungen"]) { display: none !important; }
#profileModal[data-gruppe="aussehen"] [data-pg]:not([data-pg~="aussehen"]) { display: none !important; }
#profileModal[data-gruppe="daten"] [data-pg]:not([data-pg~="daten"]) { display: none !important; }
#profileModal[data-gruppe="konto"] [data-pg]:not([data-pg~="konto"]) { display: none !important; }
/* Nr. 94 Teil A: Scrollen im Fenster läuft am Ende nicht auf die Seite dahinter über (Sperre selbst: js/fenster-sperre.js) */
.fixed.inset-0[id$="Modal"], .fixed.inset-0[id$="Modal"] .overflow-y-auto, #uiSheet, #uiSheet .overflow-y-auto { overscroll-behavior: contain; }

/* Nr. 101: Eingabefelder mindestens 16 px – iOS zoomt sonst beim Tippen hinein und die App kommt nicht mehr heraus.
   Für alle Felder an einer Stelle (Tablet und Desktop gleich); große Felder (text-2xl) bleiben groß. Kein maximum-scale im Viewport. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not(.text-2xl), select, textarea { font-size: max(16px, 1rem) !important; }
/* Nr. 110 C: Profilrahmen aus Karolines Kammer. Nur Ringe (box-shadow/outline), kein Platzbedarf; der Kreis selbst bleibt gleich groß. */
[data-rahmen="heu"] { box-shadow: 0 0 0 2px #fff8e6, 0 0 0 5px #e3bb4f; }
[data-rahmen="holz"] { box-shadow: 0 0 0 2px #fff8e6, 0 0 0 5px #8a5a2b, 0 0 0 6px #5a3a1c; }
[data-rahmen="hufeisen"] { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #9aa3ad; outline: 3px dotted #5f6770; outline-offset: 5px; }
[data-rahmen="blumen"] { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #7bb661; outline: 3px dotted #e8838f; outline-offset: 5px; }
[data-rahmen="silber"] { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #c4cad1, 0 0 0 6px #7d8791; }
[data-rahmen="gold"] { box-shadow: 0 0 0 2px #fff4c2, 0 0 0 5px #e0b43a, 0 0 0 6px #9a7410; }
.heu-kammer-karte { background: var(--heu-karte); color: var(--heu-karte-text); border-color: var(--heu-rand); }
.heu-kammer-karte[data-zustand="angelegt"] { border-color: var(--heu-holz); border-width: 2px; }
.heu-kammer-karte[data-zustand="zu-teuer"] { opacity: 0.85; }
.heu-kammer-bild svg { width: 56px; height: auto; }
/* Auftrag Nr. 107 „Karolines Heuleiter“, Nr. 109 Teil D: ruhiger und hochwertiger. Hell = Stall bei Tag, dunkel = Stall bei Nacht (Laternenlicht). Farben als Variablen in .heu-wurzel.
   Kontrast (geprüft): Text #3a230d auf #fbf1d4 12,9:1, weiß auf Grün #2f7d3a 5,2:1, weiß auf Rot #b3261e 6,5:1, #f4f1e6 auf Tafel #2f3b33 9,5:1, dunkel #f7e8c4 auf #1d1710 13,6:1. Bewegung nur transform/opacity. */
.heu-wurzel { --heu-holz: #b07b45; --heu-holz-dunkel: #5a3a1c; --heu-text: #3a230d; --heu-heu: #e3bb4f; --heu-licht: #fff8e6; --heu-karte: #fffaf0; --heu-karte-text: #2b1a0a; --heu-rand: #e6d3a8;
    --heu-gruen: #2f7d3a; --heu-rot: #b3261e; --heu-gelb: #f5c542; --heu-tafel: #2f3b33; --heu-tafel-text: #f4f1e6; --heu-schatten: 0 8px 24px rgba(90,58,28,.16), 0 1px 3px rgba(90,58,28,.18);
    position: relative; padding: 16px; border-radius: 20px; background: linear-gradient(#fbf1d4, #f3e2b0); color: var(--heu-text); box-shadow: var(--heu-schatten); }
html.dark .heu-wurzel { --heu-holz: #8a6a3d; --heu-holz-dunkel: #2a1a0d; --heu-text: #f7e8c4; --heu-licht: #2a2016; --heu-karte: #3a2d1d; --heu-karte-text: #fff3d6; --heu-rand: #5a3f1e; --heu-tafel: #1f2a24;
    --heu-schatten: 0 10px 28px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.5); background: radial-gradient(circle at 50% 0%, rgba(255,196,90,.2), transparent 65%), #1d1710; }
.heu-buehne { position: relative; height: 215px; display: flex; justify-content: center; align-items: flex-end; }
.heu-oben { display: flex; justify-content: center; }
.heu-buehne .heu-oben { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); }
.heu-schild-titel { border-radius: 18px; background: linear-gradient(#bf8d58, var(--heu-holz)); color: #fff6df; text-shadow: 0 1px 0 rgba(58,35,13,.6); box-shadow: 0 6px 16px rgba(90,58,28,.28), inset 0 1px 0 rgba(255,255,255,.3); letter-spacing: .02em; }
html.dark .heu-schild-titel { color: #ffe3a0; text-shadow: 0 0 10px rgba(255,190,80,.5), 0 1px 0 rgba(0,0,0,.6); background: linear-gradient(#6d4824, #543819); }
.heu-knopf { background: var(--heu-gruen); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(47,125,58,.35); transition: transform .12s; }
.heu-knopf:active { transform: scale(var(--tipp-skala)); }
.heu-knopf-zweit { background: transparent; color: var(--heu-text); border-color: var(--heu-holz); }
html.dark .heu-knopf { background: #3f9a4c; color: #0e1f10; box-shadow: 0 4px 14px rgba(63,154,76,.3); }
html.dark .heu-knopf-zweit { border-color: #8a6a3d; }
.heu-aufhoeren { color: var(--heu-text); }
.heu-blase { background: var(--heu-tafel); color: var(--heu-tafel-text); position: relative; border-radius: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
html.dark .heu-blase { background: #26321f; color: #fbf3d8; }
.heu-blase-klein { min-height: 44px; }
.heu-duell-zeile { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); }
.heu-duell-klein { font-size: .75rem; line-height: 1rem; }
.heu-duell-fett { font-weight: 700; }  /* Nr. 110 B: Zeile auf der dunklen Tafel, Schrift erbt var(--heu-tafel-text) */
/* Nr. 338: Duell-Liste als Karten und Auswertung (Leiter / Fragen / Bilanz). Karten auf der dunklen Tafel (Schrift erbt var(--heu-tafel-text)), Papier hell bzw. dunkel. Farben: gelb = du, blau = Gegenseite. */
.hd-karte { padding: 0; }
.hd-karte-knopf { display: flex; align-items: center; gap: .625rem; width: 100%; min-height: 44px; padding: .625rem .75rem; text-align: left; color: inherit; background: none; border: 0; border-radius: inherit; }
button.hd-karte-knopf:active { transform: scale(var(--tipp-skala-gross)); }
.hd-symbol { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: #6b6b5e; color: #fff; font-size: .95rem; }
.hd-symbol-gewonnen { background: #3f8a46; } .hd-symbol-verloren { background: #a5432b; } .hd-symbol-unentschieden { background: #6b6b5e; }
.hd-karte-mitte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.hd-karte-titel { display: flex; gap: .35rem; align-items: baseline; min-width: 0; font-size: 1rem; line-height: 1.3rem; }
.hd-meta { overflow-wrap: anywhere; opacity: .92; }
.hd-gegen { display: block; font-size: .875rem; line-height: 1.15rem; }
.hd-stand { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.hd-stand-zahl { font-size: 1.25rem; line-height: 1.5rem; white-space: nowrap; }
.hd-balken { display: flex; gap: 2px; margin-top: .3rem; max-width: 12rem; }
.hd-seg { flex: 1 1 0; height: 5px; border-radius: 2px; background: rgba(255,255,255,.22); }
.hd-seg-ich { background: #f5c542; } .hd-seg-er { background: #7fb2dc; }
.hd-seg-beide { background: linear-gradient(90deg, #f5c542 50%, #7fb2dc 50%); }
.hd-bilanz { display: flex; flex-direction: column; gap: .35rem; }
.hd-ueber { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .92; }
.hd-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.hd-kachel { display: flex; flex-direction: column; align-items: center; padding: .5rem .25rem; border-radius: .75rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); }
.hd-kachel-zahl { font-size: 1.375rem; line-height: 1.6rem; font-weight: 700; }
.hd-kachel-wort { font-size: .8125rem; }
/* Auswertung */
.hd-auswertung { display: flex; flex-direction: column; gap: .75rem; }
.hd-kopf { display: flex; flex-direction: column; gap: .5rem; }
.hd-kopf-reihe { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.hd-person { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 0; font-size: .9375rem; }
.hd-person .heu-duell-avatar { width: 2.75rem; height: 2.75rem; font-size: 1.2rem; }
.hd-person-name { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.hd-avatar-ich { background: #f5c542 !important; color: #3a2a00 !important; }
.hd-person .heu-duell-avatar:not(.hd-avatar-ich) { background: #9cc3e4; color: #12304a; }
.hd-mitte-kopf { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.hd-gross { font-size: 2.25rem; line-height: 2.5rem; font-weight: 800; white-space: nowrap; }
.hd-sieger { padding: .15rem .7rem; border-radius: 9999px; font-size: .8125rem; font-weight: 700; color: #fff; background: #6b6b5e; text-align: center; }
.hd-sieger-ich { background: #3f8a46; } .hd-sieger-er { background: #a5432b; }
.hd-kopf-zeile { text-align: center; font-size: .8125rem; opacity: .92; }
.hd-spruch { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .75rem; border-radius: .9rem; background: #fbf6e9; color: #2b2418; font-size: .9375rem; line-height: 1.3rem; }
.hd-k { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 9999px; border: 2px solid #2b2418; font-size: .75rem; font-weight: 800; }
.hd-reiter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .25rem; border-radius: .9rem; background: rgba(255,255,255,.12); }
.hd-reiter-knopf { min-height: 44px; border-radius: .7rem; font-size: .9375rem; font-weight: 600; color: inherit; background: none; border: 0; }
.hd-reiter-an { background: #fbf6e9; color: #2b2418; font-weight: 700; }
.hd-papier { display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border-radius: .9rem; background: #fbf6e9; color: #2b2418; }
.hd-papier-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.hd-leiter { display: flex; flex-direction: column; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.hd-sprosse { display: grid; grid-template-columns: minmax(0, 1fr) 2.25rem minmax(0, 1fr); align-items: center; gap: .4rem; width: 100%; }
.hd-spalten { font-size: .75rem; font-weight: 700; }
.hd-spalten span:last-child { text-align: right; overflow-wrap: anywhere; }
.hd-sammel { min-height: 44px; background: none; border: 0; color: inherit; padding: 0; }
.hd-nr { text-align: center; font-weight: 700; font-size: .875rem; }
.hd-zelle { display: flex; align-items: center; gap: .3rem; min-height: 2rem; padding: .2rem .5rem; border-radius: .5rem; font-size: .8125rem; line-height: 1.05rem; overflow-wrap: anywhere; }
.hd-zelle-ok { background: #dcebd8; color: #24502a; }
.hd-zelle-joker { background: #fbe9b2; color: #5a4100; font-weight: 700; }
.hd-zelle-aus { background: #f6d3cb; color: #8a2414; font-weight: 700; }
.hd-zelle-leer { background: #ece4d2; }
.hd-legende { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.hd-leg-ok { color: #24502a; } .hd-leg-aus { color: #8a2414; } .hd-leg-joker { color: #6b4d00; }
.hd-fuss { border-top: 1px dashed #c9bfa8; padding-top: .5rem; display: flex; flex-direction: column; gap: .2rem; }
.hd-fragen { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.hd-frage { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .25rem; border-bottom: 1px solid #e3d9c4; }
.hd-frage:last-child { border-bottom: 0; }
.hd-frage-aus { border-left: 4px solid #a5432b; padding-left: .6rem; background: #fcefe9; border-radius: .4rem; }
.hd-frage-text { font-weight: 700; font-size: .9375rem; line-height: 1.3rem; overflow-wrap: anywhere; }
.hd-frage-nr { opacity: .75; }
.hd-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.hd-chip { padding: .15rem .55rem; border-radius: 9999px; font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.hd-chip-ich { background: #fbe9b2; color: #5a4100; } .hd-chip-er { background: #d8e7f4; color: #183c5c; }
.hd-chip-falsch { background: #f6d3cb; color: #8a2414; } .hd-chip-weg { background: #ece4d2; color: #4a4232; }
.hd-link { min-height: 44px; background: none; border: 0; color: inherit; text-decoration: underline; font-size: .875rem; }
.hd-bilanz-balken { display: flex; height: 12px; border-radius: 9999px; overflow: hidden; background: #ece4d2; }
.hd-bb { flex: 1 1 0; } .hd-bb-g { background: #3f8a46; } .hd-bb-u { background: #a39d8c; } .hd-bb-v { background: #a5432b; }
.hd-zurueck { width: 100%; min-height: 44px; border-radius: .75rem; font-weight: 700; font-size: .875rem; color: inherit; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); }
html.dark .hd-spruch, html.dark .hd-papier, html.dark .hd-reiter-an { background: #2e2618; color: #f7e8c4; }
html.dark .hd-k { border-color: #f7e8c4; }
html.dark .hd-zelle-ok { background: #26402a; color: #cfe9cf; }
html.dark .hd-zelle-joker, html.dark .hd-chip-ich { background: #4a3a10; color: #fbe3a0; }
html.dark .hd-zelle-aus, html.dark .hd-chip-falsch { background: #4f2118; color: #ffd2c6; }
html.dark .hd-zelle-leer, html.dark .hd-chip-weg, html.dark .hd-bilanz-balken { background: #3a3020; color: #e8dcc0; }
html.dark .hd-chip-er { background: #1f3a52; color: #d6e8f7; }
html.dark .hd-leg-ok { color: #a9dba9; } html.dark .hd-leg-aus { color: #ffb4a3; } html.dark .hd-leg-joker { color: #f5d77a; }
html.dark .hd-frage { border-color: #4a3d28; } html.dark .hd-frage-aus { background: #3a2016; border-left-color: #e0705a; }
html.dark .hd-fuss { border-color: #5a4a30; }
.heu-blase-leer { visibility: hidden; }
.heu-tafel-wrap { padding-top: 0; }
.heu-lugt { display: none; }
.heu-tafel { position: relative; z-index: 1; margin-top: 4px; border-radius: 18px; background: var(--heu-tafel); color: var(--heu-tafel-text); box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 0 0 4px #8a5a2b, inset 0 0 22px rgba(0,0,0,.35); }
html.dark .heu-tafel { box-shadow: 0 8px 22px rgba(0,0,0,.5), inset 0 0 0 4px #6d4824, inset 0 0 22px rgba(0,0,0,.4); }
.heu-tafel-klein { color: #d8d3bf; }
.heu-frage-text { font-size: 22px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; }
.heu-betrag { font-variant-numeric: tabular-nums; }
.heu-brett { background: transparent; display: flex; flex-wrap: nowrap; gap: 6px; }
.heu-anhaenger { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; justify-content: center; min-height: 44px; padding: 6px 8px; white-space: nowrap; border-radius: 999px; background: var(--heu-karte); color: var(--heu-karte-text); box-shadow: 0 3px 10px rgba(90,58,28,.18); transition: transform .12s, opacity .2s; }
html.dark .heu-anhaenger { box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.heu-anhaenger:active:not(:disabled) { transform: scale(var(--tipp-skala)); }
.heu-anhaenger-bild { display: inline-flex; height: 26px; align-items: flex-end; overflow: hidden; }
.heu-anhaenger-bild svg { display: block; height: 26px; width: auto; }
.heu-anhaenger[data-zustand="benutzt"] { text-decoration: line-through; filter: grayscale(1); opacity: .45; }
.heu-anhaenger:disabled:not([data-zustand="benutzt"]) { opacity: .6; }
.heu-antwort { background: var(--heu-karte); color: var(--heu-karte-text); border-radius: 16px; border-left: 6px solid var(--heu-holz); box-shadow: 0 4px 12px rgba(90,58,28,.18); transition: transform .15s; font-size: 17px; }
html.dark .heu-antwort { box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.heu-antwort:active:not(:disabled) { transform: scale(var(--tipp-skala)); }
.heu-antwort .heu-buchstabe { background: #f3e2b0; color: #3a230d; font-variant-numeric: tabular-nums; }
html.dark .heu-antwort .heu-buchstabe { background: #5a3f1e; color: #ffe9b0; }
.heu-antwort[data-zustand="gewaehlt"] { background: var(--heu-gelb); color: #3a2a0a; border-left-color: #b8860b; box-shadow: 0 0 0 3px rgba(245,197,66,.55), 0 6px 18px rgba(245,197,66,.5); }
.heu-antwort[data-zustand="richtig"] { background: var(--heu-gruen); color: #fff; border-left-color: #1f5a29; }
.heu-antwort[data-zustand="falsch"] { background: var(--heu-rot); color: #fff; border-left-color: #7d1a14; transform: rotate(2deg) translateY(3px); }
html.dark .heu-antwort[data-zustand="falsch"] { background: #a22a22; }
.heu-antwort[data-zustand="richtig"] .heu-buchstabe, .heu-antwort[data-zustand="falsch"] .heu-buchstabe { background: #fff; color: #222; }
.heu-antwort[data-zustand="weg"] { opacity: 0; visibility: hidden; transform: scale(.7); }
.heu-antwort[data-zustand="weg"]:not([data-frisch="1"]) { display: none; }  /* Nr. 110: nach 50:50/Betty rücken die übrigen zusammen, keine Lücke */
.heu-antwort[data-frisch="1"][data-zustand="gewaehlt"] { animation: heu-wackel calc(var(--takt-wechsel) * 2) var(--kurve-weich); }
.heu-antwort[data-frisch="1"][data-zustand="falsch"] { animation: heu-kippt var(--takt-auftritt) var(--kurve-raus); }
.heu-antwort[data-frisch="1"][data-zustand="richtig"] { animation: heu-hupf calc(var(--takt-tipp) * 3) var(--kurve-raus); }
.heu-antwort[data-frisch="1"][data-zustand="weg"] { visibility: visible; animation: heu-zerbroeseln calc(var(--takt-wechsel) * 3) ease-in forwards; }
.heu-halme i { position: absolute; top: 4px; width: 3px; height: 14px; border-radius: 2px; background: #e3bb4f; opacity: 0; animation: heu-halm calc(var(--takt-wechsel) * 4) var(--kurve-raus) forwards; }
.heu-halme i:nth-child(1) { left: 12%; } .heu-halme i:nth-child(2) { left: 32%; animation-delay: .08s; } .heu-halme i:nth-child(3) { left: 52%; animation-delay: .16s; } .heu-halme i:nth-child(4) { left: 72%; animation-delay: .1s; } .heu-halme i:nth-child(5) { left: 90%; animation-delay: .2s; }
.heu-aufloesung { background: var(--heu-licht); border-radius: 16px; box-shadow: var(--heu-schatten); border-left: 6px solid var(--heu-holz); }
.heu-aufloesung[data-heu-aufloesung="richtig"] { border-left-color: var(--heu-gruen); }
.heu-aufloesung[data-heu-aufloesung="falsch"] { border-left-color: var(--heu-rot); }
.heu-raster { display: block; }
@media (min-width: 768px) { .heu-wurzel.heu-breit { width: min(920px, 100vw - 32px); margin-left: calc(50% - min(460px, 50vw - 16px)); }
    .heu-raster { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 16px; align-items: start; } .heu-schublade { display: none; } }
.heu-leiter { list-style: none; margin: 0; padding: 6px; border-radius: 16px; background: var(--heu-licht); box-shadow: var(--heu-schatten); }
.heu-sprosse { border-bottom: 2px solid var(--heu-rand); position: relative; border-radius: 6px; }
.heu-sprosse[data-zustand="erreicht"] { background: rgba(47,125,58,.2); }
.heu-sprosse[data-zustand="aktuell"] { background: rgba(245,197,66,.45); font-weight: 700; }
html.dark .heu-sprosse[data-zustand="aktuell"] { background: rgba(245,197,66,.28); }
.heu-sprosse[data-sicher="1"] { border-bottom-color: var(--heu-holz); border-bottom-width: 4px; }
.heu-marke { color: #7a4a14; }
html.dark .heu-marke { color: #ffd479; }
.heu-sprosse[data-frisch="1"] .heu-marke { animation: heu-klettern calc(var(--takt-wechsel) * 2) var(--kurve-raus); }
.heu-boden[data-zustand="aktuell"] { background: rgba(245,197,66,.45); }
.heu-streifen { border-radius: 16px; background: linear-gradient(#bf8d58, var(--heu-holz)); color: #fff6df; box-shadow: var(--heu-schatten); }
html.dark .heu-streifen { background: linear-gradient(#5a3d20, #4a321a); color: #ffe9b0; }
.heu-ballen { display: block; flex: 1; height: 12px; border-radius: 6px; background: rgba(255,246,223,.35); }
.heu-ballen[data-sicher="1"] { box-shadow: inset 0 0 0 2px rgba(255,246,223,.8); }
.heu-ballen[data-zustand="erreicht"] { background: #e3bb4f; }
.heu-ballen[data-zustand="aktuell"] { background: #fff1b8; animation: heu-huepft calc(var(--takt-wechsel) * 4) var(--kurve-weich) infinite; }
.heu-schublade { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 60; max-height: 70vh; overflow-y: auto; padding: 12px; border-radius: 24px 24px 0 0; background: #f7efd8; color: var(--heu-text); box-shadow: 0 -10px 30px rgba(0,0,0,.3); animation: heu-schublade var(--takt-wechsel) var(--kurve-raus); }
html.dark .heu-schublade { background: #1d1710; }
.heu-griff { display: block; width: 44px; height: 5px; border-radius: 3px; margin: 0 auto 8px; background: var(--heu-holz); opacity: .6; }
.heu-hinten { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.45); border: 0; }
.heu-nachfrage { position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 58; padding: 14px 16px 16px; border-radius: 24px;  /* über der unteren Leiste (≈ 64 px) */ background: var(--heu-tafel); color: var(--heu-tafel-text); box-shadow: 0 -4px 32px rgba(0,0,0,.4); animation: heu-schublade var(--takt-wechsel) var(--kurve-raus); max-width: 520px; margin: 0 auto; }
html.dark .heu-nachfrage { background: #26321f; color: #fbf3d8; }
.heu-nachfrage-figur { flex: none; width: 96px; }
.heu-nachfrage .heu-knopf { box-shadow: none; }
.heu-nachfrage .heu-knopf-zweit { color: #f4f1e6; border-color: #d8d3bf; }
.heu-balkenfeld { display: block; background: rgba(90,58,28,.18); overflow: hidden; }
.heu-balken-fuell { display: block; height: 100%; background: var(--heu-heu, #e3bb4f); border-radius: 0 6px 6px 0; transform-origin: 0 50%; }
.heu-gasse { background: var(--heu-licht); border-radius: 16px; box-shadow: var(--heu-schatten); }
.heu-blue[data-frisch="1"] { animation: heu-rein calc(var(--takt-tipp) * 3) var(--kurve-raus); }
.heu-handy { position: absolute; top: 4px; right: -6px; font-size: 18px; color: #3a230d; }
html.dark .heu-handy { color: #ffe9b0; }
.heu-krone { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); z-index: 2; }
.heu-regen { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.heu-ende > :not(.heu-regen) { position: relative; z-index: 1; }
.heu-purzel { position: absolute; top: -40px; animation: heu-purzel calc(var(--takt-wechsel) * 13) linear infinite; }
.heu-ergebnis { background: var(--heu-karte); border-radius: 20px; box-shadow: var(--heu-schatten); padding: 16px; }
.heu-rekord-hinweis { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--heu-gelb); color: #3a2a0a; font-weight: 700; }
@keyframes heu-wackel { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.6deg); } 75% { transform: rotate(1.6deg); } }
@keyframes heu-kippt { from { transform: rotate(0); } to { transform: rotate(2deg) translateY(3px); } }
@keyframes heu-hupf { 0% { transform: translateY(0); } 40% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
@keyframes heu-zerbroeseln { 0% { opacity: 1; transform: scale(1); } 40% { opacity: .8; transform: scale(.96) rotate(-1deg); } 100% { opacity: 0; transform: scale(.6) translateY(16px); } }
@keyframes heu-halm { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(-34px) rotate(40deg); } }
@keyframes heu-klettern { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes heu-huepft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes heu-schublade { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes heu-rein { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes heu-purzel { from { transform: translateY(0) rotate(0); } to { transform: translateY(520px) rotate(320deg); } }
html.tiere-aus .heu-wurzel *, html.tiere-aus .heu-schublade, html.tiere-aus .heu-nachfrage, .heu-wurzel[data-ruhig="1"] * { animation: none !important; transition: none !important; }
html.tiere-aus .heu-antwort[data-zustand="weg"], .heu-wurzel[data-ruhig="1"] .heu-antwort[data-zustand="weg"] { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .heu-wurzel *, .heu-schublade, .heu-nachfrage { animation: none !important; transition: none !important; } .heu-antwort[data-zustand="weg"] { visibility: hidden; } }
/* Nr. 109 Teil E: Animationen (nur transform/opacity). Aus bei „Bewegung reduzieren“ und „Tiere aus“ (Regeln oben: animation none). */
.heu-wurzel[data-ueberblenden="1"] { animation: heu-ueberblenden calc(var(--takt-tipp) * 2) var(--kurve-raus); }
.heu-wurzel[data-neu="1"] .heu-tafel { animation: heu-tafel-rein calc(var(--takt-tipp) * 3) var(--kurve-raus); }
.heu-wort { display: inline-block; animation: heu-kreide var(--takt-wechsel) var(--kurve-raus) backwards; }
.heu-schnell .heu-wort { animation: none; }
.heu-wurzel[data-neu="1"] .heu-antwort { animation: heu-rein calc(var(--takt-tipp) * 3) var(--kurve-raus) backwards; }
.heu-wurzel[data-neu="1"] .heu-antwort:nth-child(1) { animation-delay: .35s; } .heu-wurzel[data-neu="1"] .heu-antwort:nth-child(2) { animation-delay: .41s; }
.heu-wurzel[data-neu="1"] .heu-antwort:nth-child(3) { animation-delay: .47s; } .heu-wurzel[data-neu="1"] .heu-antwort:nth-child(4) { animation-delay: .53s; }
.heu-antwort[data-zustand="richtig"]::after { content: ""; position: absolute; inset: -3px; border-radius: 18px; box-shadow: 0 0 18px 5px rgba(110,210,120,.85); opacity: 0; pointer-events: none; }
.heu-antwort[data-frisch="1"][data-zustand="richtig"]::after { animation: heu-leuchten calc(var(--takt-tipp) * 7) var(--kurve-raus); }
.heu-antwort[data-puls="1"] { animation: heu-puls var(--takt-auftritt) var(--kurve-weich) 3; }
.heu-wurzel[data-spannung="1"] .heu-antwort:not([data-zustand="gewaehlt"]) { opacity: .35; transition: opacity .4s; }
.heu-wurzel[data-spannung="1"] .heu-antwort[data-zustand="gewaehlt"] { transform: scale(1.03); transition: transform .4s; }
.heu-wurzel[data-spannung="1"] .heu-tafel, .heu-wurzel[data-spannung="1"] .heu-brett { opacity: .55; }
.heu-spannung { background: var(--heu-tafel); color: var(--heu-tafel-text); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.heu-spannung svg { animation: heu-kauen calc(var(--takt-tipp) * 3) var(--kurve-weich) infinite; }
.heu-netz-fall { display: inline-block; transform-origin: 50% 0; animation: heu-netz-fall calc(var(--takt-tipp) * 6) var(--kurve-raus); }
.heu-biss { position: absolute; left: 0; top: 24%; z-index: 3; pointer-events: none; animation: heu-biss calc(var(--takt-wechsel) * 4) var(--kurve-weich) forwards; }
.heu-schubs { position: absolute; right: 0; top: 24%; z-index: 3; pointer-events: none; animation: heu-schubs calc(var(--takt-wechsel) * 4) var(--kurve-weich) forwards; }
.heu-gasse[data-frisch="1"] .heu-boxentuer { position: relative; }
.heu-gasse[data-frisch="1"] .heu-boxentuer::after { content: ""; position: absolute; inset: 0; background: var(--heu-holz); transform-origin: 0 50%; animation: heu-tuer calc(var(--takt-wechsel) * 2) var(--kurve-raus) forwards; }
.heu-gasse[data-frisch="1"] li:nth-child(2) .heu-boxentuer::after { animation-delay: .15s; } .heu-gasse[data-frisch="1"] li:nth-child(3) .heu-boxentuer::after { animation-delay: .3s; }
.heu-gasse[data-frisch="1"] li:nth-child(n+4) .heu-boxentuer::after { animation-delay: .45s; }
.heu-gasse[data-frisch="1"] .heu-balken-fuell { animation: heu-wachsen calc(var(--takt-tipp) * 6) var(--kurve-raus) var(--takt-tipp) backwards; }
.heu-blue[data-frisch="1"] .heu-handy { animation: heu-vibriert var(--takt-auftritt) var(--kurve-weich) 2; }
.heu-krone { animation: heu-krone-fall calc(var(--takt-tipp) * 6) var(--kurve-raus); }
html.heu-pause .heu-wurzel * { animation-play-state: paused !important; }
@keyframes heu-ueberblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes heu-tafel-rein { from { transform: translateX(-36px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes heu-kreide { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heu-leuchten { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: .55; } }
@keyframes heu-puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes heu-kauen { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(2px) rotate(-3deg); } }
@keyframes heu-netz-fall { 0% { transform: translateY(-26px); opacity: 0; } 55% { transform: translateY(0); opacity: 1; } 70% { transform: rotate(10deg); } 85% { transform: rotate(-6deg); } 100% { transform: rotate(0); } }
@keyframes heu-biss { 0% { transform: translateX(-120%); opacity: 0; } 25% { transform: translateX(10%); opacity: 1; } 45% { transform: translateX(0) rotate(-8deg); } 60% { transform: translateX(10%) rotate(6deg); } 100% { transform: translateX(-120%); opacity: 0; } }
@keyframes heu-schubs { 0% { transform: translateX(120%); opacity: 0; } 30% { transform: translateX(0); opacity: 1; } 45% { transform: translateX(-30%) rotate(-6deg); } 60% { transform: translateX(0); } 100% { transform: translateX(120%); opacity: 0; } }
@keyframes heu-tuer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes heu-wachsen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes heu-vibriert { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg) translateX(-2px); } 40% { transform: rotate(12deg) translateX(2px); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(8deg); } }
@keyframes heu-krone-fall { from { transform: translate(-50%, -70px) rotate(-12deg); opacity: 0; } to { transform: translate(-50%, 0) rotate(0); opacity: 1; } }
/* Nr. 109 Teil F: Szene (Leiter am Heustock), Etiketten, Zuschauer, Urkunde. Wo F und D sich widersprechen, gilt F. Welt und Fenster rechnen in cqw (Prozent der Szenenbreite). */
.heu-raster { display: block; }
.heu-links { margin-bottom: 12px; }
@media (min-width: 768px) { .heu-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; } .heu-links { position: sticky; top: 8px; margin-bottom: 0; } .heu-schublade { display: block; } }
.heu-szene { --heu-himmel-oben: #8fc7f5; --heu-himmel-unten: #d8eefc; --heu-ton: #ffe9b0; --heu-ton-a: .08; --heu-laterne-a: 0; --heu-sterne-a: 0;
    position: relative; container-type: inline-size; aspect-ratio: 100 / var(--heu-fh, 56); overflow: hidden; border-radius: 20px; background: #ecd8aa; box-shadow: var(--heu-schatten); cursor: pointer; isolation: isolate; }
.heu-szene[aria-hidden="true"] { cursor: default; }
.heu-szene[data-tageszeit="morgen"] { --heu-himmel-oben: #b9dcff; --heu-himmel-unten: #f4f0d6; --heu-ton: #cfe4ff; --heu-ton-a: .16; }
.heu-szene[data-tageszeit="tag"] { --heu-himmel-oben: #79bdf2; --heu-himmel-unten: #cfeafc; --heu-ton: #ffe9b0; --heu-ton-a: .06; }
.heu-szene[data-tageszeit="abend"] { --heu-himmel-oben: #6b4a7a; --heu-himmel-unten: #f2a35c; --heu-ton: #ff9a3c; --heu-ton-a: .22; --heu-laterne-a: 1; }
.heu-szene[data-tageszeit="nacht"] { --heu-himmel-oben: #070d22; --heu-himmel-unten: #1a2a55; --heu-ton: #0a1236; --heu-ton-a: .3; --heu-laterne-a: 1; --heu-sterne-a: 1; }
.heu-welt { position: absolute; left: 0; top: 0; width: 100cqw; height: 250cqw; transform: translateY(calc(var(--kam) * -1cqw)); transition: transform .9s cubic-bezier(.4, .1, .2, 1); }
.heu-welt-svg { display: block; width: 100%; height: 100%; }
.heu-holm { stroke: #6b4423; stroke-width: 1.8; stroke-linecap: round; }
.heu-sprosse-linie { stroke: #8a5a2b; stroke-width: 1.5; stroke-linecap: round; } .heu-sprosse-linie[data-erreicht="1"] { stroke: #f5c542; }
.heu-netz-szene path { fill: none; stroke: #3f7a3f; stroke-width: .6; stroke-linejoin: round; } .heu-netz-szene[data-aktiv="0"] { opacity: .35; }
.heu-netz-szene[data-neu="1"] { transform-box: fill-box; transform-origin: 50% 0; animation: heu-netz-fall calc(var(--takt-tipp) * 7) var(--kurve-raus); }
.heu-wetter { position: absolute; inset: 0; }
.heu-wetter[data-art="regen"] i { position: absolute; top: -12%; width: 1px; height: 14%; background: rgba(210,230,255,.85); animation: heu-tropfen calc(var(--takt-wechsel) * 4) linear infinite; }
.heu-wetter[data-art="schnee"] b { position: absolute; top: -8%; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: heu-flocke calc(var(--takt-tipp) * 17) linear infinite; }
.heu-wetter[data-art="nebel"] u { position: absolute; inset: 0; background: rgba(235,240,245,.6); animation: heu-nebel calc(var(--takt-auftritt) * 10) var(--kurve-weich) infinite alternate; }
.heu-kegel { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; pointer-events: none; opacity: 0; transition: opacity .6s; z-index: 2;
    background: radial-gradient(circle 42cqw at calc(var(--kx, 10) * 1cqw + var(--kb, 22) * .5cqw) calc(var(--f) * var(--yf, 0) + var(--kb, 22) * .25cqw), rgba(255, 224, 150, .14) 0%, rgba(16, 10, 4, .42) 55%, rgba(8, 5, 2, .72) 100%); box-shadow: none; }
.heu-szene[data-dunkel="1"] .heu-kegel { opacity: 1; }
.heu-kar { position: absolute; left: 0; top: 0; width: 22cqw; transform: translate(calc(var(--kx) * 1cqw), calc(var(--ky) * 1cqw)); transition: transform .9s cubic-bezier(.4, .1, .2, 1); z-index: 8; }
.heu-kar-figur svg { display: block; width: 100%; height: auto; }
.heu-kar-ersatz { font-size: 8cqw; color: #4a2f17; display: block; text-align: center; padding-top: 6cqw; }
.heu-krone-szene { position: absolute; left: 50%; top: -3cqw; width: 11cqw; height: auto; transform: translateX(-50%); z-index: 3; animation: heu-krone-fall calc(var(--takt-tipp) * 6) var(--kurve-raus); }
.heu-szene-stapel { position: absolute; right: 10px; top: 10px; z-index: 5; }
.heu-stapel-klein { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 14px; background: rgba(255,255,255,.9); color: #8a5a14; font-size: 15px; }
.heu-stapel-klein[data-heu-stapel="symbole"] { flex-direction: row; gap: 5px; }
html.dark .heu-stapel-klein { background: rgba(30,22,12,.88); color: #f0c870; }
.heu-stapel-reihe { display: flex; gap: 1px; }
.heu-szene-netztext { position: absolute; left: 50%; top: 46%; z-index: 5; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px; background: #2f7d3a; color: #fff; font-weight: 800; animation: heu-netztext calc(var(--takt-wechsel) * 9) var(--kurve-raus) forwards; }
.heu-zuschauer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: space-around; align-items: flex-end; padding: 0 6px; pointer-events: none; background: linear-gradient(transparent, rgba(60,35,10,.35)); }
.heu-zuschauer-tier { display: block; transform-origin: 50% 100%; transition: transform .3s; line-height: 0; }
.heu-zuschauer-tier svg { display: block; height: min(56px, 14cqw); width: auto; }  /* Nr. 382: ganze Figuren, gleich hoch (Ente, Hase, Ziege verschieden breit) */
.heu-szene:not([data-kam]) .heu-zuschauer-tier:nth-child(n+5) { display: none; }  /* Nr. 382: am Boden höchstens vier nebeneinander, sonst stünden sie vor Leiter und Schildern */
/* Nr. 211/222: Heu-Tribüne im Vollbild – Strohballen unten rechts (eckig und rund), jedes Tier steht auf einem Ballen. Nur mit data-buehne (Platz reicht), dann ersetzt sie die Köpfe der Zuschauer. Maße in cqw */
.heu-buehne-boden { display: none; position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.heu-szene[data-buehne="1"] .heu-buehne-boden { display: block; }
.heu-szene[data-buehne="1"] .heu-zuschauer { display: none; }
.heu-trib-ballen { position: absolute; left: 0; bottom: 0; width: 100%; display: block; overflow: visible; }
.heu-trib-ballen rect, .heu-trib-ballen circle { stroke: #6b4a1e; stroke-width: .3; }
.heu-trib-ballen .b0 { fill: #e8c35a; } .heu-trib-ballen .b1 { fill: #dcb34a; } .heu-trib-ballen .b2 { fill: #f0cf6b; }
.heu-trib-ballen .seil { fill: none; stroke: #8a5a22; stroke-width: .35; stroke-linecap: round; }
.heu-trib-ballen .halm { fill: none; stroke: #c99a32; stroke-width: .3; stroke-linecap: round; }
.heu-trib-ballen .rund circle:first-child { fill: #d9ae45; } .heu-trib-ballen .rund .spirale { fill: none; stroke: #a67a28; stroke-width: .3; }
.heu-szene[data-tageszeit="abend"] .heu-trib-ballen, .heu-szene[data-tageszeit="abend"] .heu-buehne-tier svg { filter: brightness(.86); }
.heu-szene[data-tageszeit="nacht"] .heu-trib-ballen, .heu-szene[data-dunkel="1"] .heu-trib-ballen, .heu-szene[data-tageszeit="nacht"] .heu-buehne-tier svg, .heu-szene[data-dunkel="1"] .heu-buehne-tier svg { filter: brightness(.62); }
.heu-buehne-tiere { position: absolute; inset: 0; }
.heu-buehne-tier { display: block; position: absolute; left: calc(var(--x) * 1cqw); bottom: calc(var(--y) * 1cqw); width: calc(var(--b) * 1cqw); line-height: 0; }
.heu-trib-fig { display: block; transform-origin: 50% 100%; }
.heu-buehne-tier svg { display: block; width: 100%; height: auto; }
.heu-zuschauer[data-reaktion="duckt"] .heu-zuschauer-tier { transform: scale(.82); }  /* Nr. 382: kleiner statt wegrutschen, sonst wäre die Figur unten abgeschnitten */
.heu-zuschauer[data-reaktion="hupft"][data-frisch="1"] .heu-zuschauer-tier { animation: heu-zhupf var(--takt-auftritt) var(--kurve-raus); animation-delay: calc(var(--k) * 60ms); }
.heu-zuschauer[data-reaktion="duckt"][data-frisch="1"] .heu-zuschauer-tier { animation: heu-zduck calc(var(--takt-tipp) * 2) var(--kurve-raus); }
.heu-etiketten { display: grid; gap: 14px 10px; }
.heu-etiketten[data-modus="raster"] { grid-template-columns: 1fr 1fr; } .heu-etiketten[data-modus="liste"] { grid-template-columns: 1fr; }
.heu-antwort.heu-etikett { padding-top: 22px; border-left: 0; border-radius: 6px 6px 16px 16px; }
.heu-antwort.heu-etikett[data-zustand="normal"] { background: linear-gradient(#fffdf6, var(--heu-karte)); }
html.dark .heu-antwort.heu-etikett[data-zustand="normal"] { background: linear-gradient(#4a3a26, var(--heu-karte)); }
.heu-etiketten > :nth-child(odd) { rotate: -1.2deg; } .heu-etiketten > :nth-child(even) { rotate: 1deg; }
.heu-etikett::before { content: ""; position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #4a2f17; box-shadow: inset 0 1px 1px rgba(0,0,0,.6); }
.heu-kordel { position: absolute; top: -9px; left: 50%; width: 2px; height: 18px; margin-left: -1px; background: var(--heu-holz); transform: rotate(10deg); transform-origin: 50% 100%; border-radius: 1px; }
.heu-wurzel[data-dunkel="1"][data-zustand="nachfrage"] .heu-antwort:not([data-zustand="gewaehlt"]) { opacity: .5; }
.heu-frage-text, .heu-blase-klein p { font-family: 'Patrick Hand', 'Segoe Print', 'Bradley Hand', 'Chalkboard SE', 'Comic Sans MS', cursive; }  /* Kreideschrift; Datei „Patrick Hand“ braucht Martins Ja zum Herunterladen, bis dahin lokale Handschrift */
.heu-frage-text { font-size: 24px; line-height: 1.25; letter-spacing: .01em; }
.heu-urkunde { margin: 0 auto; width: min(100%, 340px); transform: rotate(-1deg); border-radius: 10px; box-shadow: 0 14px 34px rgba(60,35,10,.35); }
.heu-urkunde-svg { display: block; width: 100%; height: auto; border-radius: 10px; }
@keyframes heu-tropfen { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(760%); opacity: .2; } }
@keyframes heu-flocke { from { transform: translate(0, 0); } 50% { transform: translate(5px, 400%); } to { transform: translate(-3px, 900%); } }
@keyframes heu-nebel { from { transform: translateX(-8%); opacity: .35; } to { transform: translateX(8%); opacity: .7; } }
@keyframes heu-zhupf { 0% { transform: translateY(0); } 40% { transform: translateY(-40%); } 100% { transform: translateY(0); } }
/* Nr. 174 D: Gewinne in der Szene. Nur transform/opacity, kürzer als 1,5 s, nie anklickbar; bei „Bewegung reduzieren“/„Tiere aus“ zeichnet das Skript sie gar nicht. */
.heu-fahnen { display: flex; gap: 3px; color: #c0392b; font-size: 12px; line-height: 1; }
.heu-liefer, .heu-verlust, .heu-heuregen { pointer-events: none; }
.heu-liefer { position: absolute; right: 14px; top: 18px; z-index: 6; display: flex; align-items: flex-end; gap: 2px; opacity: 0; animation: heu-liefer calc(var(--takt-wechsel) * 5) var(--kurve-weich) forwards; }
.heu-liefer-tier { display: block; line-height: 0; } .heu-liefer-tier svg { display: block; width: 40px; height: auto; }
.heu-liefer-tier + .heu-liefer-tier { margin-left: -6px; }
.heu-liefer-gut { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); color: #8a5a14; font-size: 16px; }
html.dark .heu-liefer-gut { color: #f0c870; }
@keyframes heu-liefer { 0% { opacity: 0; transform: translate(-30cqw, calc(var(--heu-fh, 44) * .8cqw)); } 12% { opacity: 1; } 55% { opacity: 1; transform: translate(0, 0); } 70% { opacity: 1; transform: translate(0, -4px); } 100% { opacity: 0; transform: translate(-24cqw, calc(var(--heu-fh, 44) * .6cqw)); } }
.heu-verlust { z-index: 6; animation: heu-verlust calc(var(--takt-auftritt) * 2) ease-in forwards; }
@keyframes heu-verlust { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, 2px) rotate(-4deg); } 100% { opacity: 0; transform: translate(-6cqw, calc(var(--heu-fh, 44) * 1cqw)) rotate(-28deg); } }
.heu-heuregen { position: absolute; inset: 0; z-index: 6; overflow: hidden; }
.heu-heuregen i { position: absolute; top: 0; width: 3px; height: 16px; border-radius: 2px; background: #e3bb4f; opacity: 0; animation: heu-regen calc(var(--takt-auftritt) * 2) ease-in forwards; }
.heu-heuregen i:nth-child(odd) { background: #c99a2e; }
.heu-heuregen i:nth-child(1) { left: 5%; } .heu-heuregen i:nth-child(2) { left: 12%; animation-delay: .1s; } .heu-heuregen i:nth-child(3) { left: 19%; animation-delay: .25s; } .heu-heuregen i:nth-child(4) { left: 26%; animation-delay: .05s; }
.heu-heuregen i:nth-child(5) { left: 33%; animation-delay: .2s; } .heu-heuregen i:nth-child(6) { left: 40%; animation-delay: .35s; } .heu-heuregen i:nth-child(7) { left: 47%; animation-delay: .12s; } .heu-heuregen i:nth-child(8) { left: 54%; animation-delay: .3s; }
.heu-heuregen i:nth-child(9) { left: 61%; animation-delay: .08s; } .heu-heuregen i:nth-child(10) { left: 68%; animation-delay: .22s; } .heu-heuregen i:nth-child(11) { left: 75%; animation-delay: .4s; } .heu-heuregen i:nth-child(12) { left: 82%; animation-delay: .15s; }
.heu-heuregen i:nth-child(13) { left: 89%; animation-delay: .28s; } .heu-heuregen i:nth-child(14) { left: 95%; animation-delay: .02s; }
@keyframes heu-regen { 0% { opacity: 0; transform: translateY(-20px) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--heu-fh, 44) * 1cqw)) rotate(60deg); } }
@keyframes heu-zduck { from { transform: scale(1); } to { transform: scale(.82); } }
@keyframes heu-netztext { 0% { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; transform: translate(-50%, 0); } 75% { opacity: 1; } 100% { opacity: 0; } }
/* Nr. 109 F (Nachbesserung): am Handy sind Szene, Tafel und alle vier Antworten ohne Scrollen sichtbar; die Szene wird niedriger (js: heuSzeneEinpassen), Abstände knapper */
@media (max-width: 767px) {
    .heu-wurzel.heu-breit { padding: 8px 10px; }
    .heu-wurzel.heu-breit .space-y-3 > * + * { margin-top: 8px !important; }
    .heu-links { margin-bottom: 0; }
    .heu-szene { border-radius: 16px; }
    .heu-szene-stapel { right: 6px; top: 6px; }
    .heu-blase-klein { min-height: 0; padding: 5px 10px !important; border-radius: 12px; } .heu-blase-klein p { font-size: 14px; line-height: 1.25; }
    .heu-tafel { padding: 8px 12px !important; margin-top: 0; border-radius: 14px; }
    .heu-frage-text { font-size: 22px; line-height: 1.2; }
    .heu-anhaenger { min-height: 42px; padding: 4px 8px; }
    .heu-etiketten { gap: 10px 8px; }
    .heu-antwort.heu-etikett { padding-top: 16px; padding-bottom: 6px; min-height: 56px; font-size: 16px; }
    .heu-etikett::before { top: 5px; } .heu-kordel { top: -7px; height: 14px; }
}
/* Nr. 109 (Prüf-Agent): Regen und Schnee bleiben bei „Bewegung reduzieren“ und „Tiere aus“ als Standbild im Fenster sichtbar (ohne Animation liegen die Tropfen sonst über dem Rand) */
html.tiere-aus .heu-wetter i, html.tiere-aus .heu-wetter b, .heu-wurzel[data-ruhig="1"] .heu-wetter i, .heu-wurzel[data-ruhig="1"] .heu-wetter b { top: calc(8% + var(--k) * 12%); }
@media (prefers-reduced-motion: reduce) { .heu-wetter i, .heu-wetter b { top: calc(8% + var(--k) * 12%); } }
.heu-chip-an { background: var(--heu-tafel); color: var(--heu-tafel-text); border-color: transparent; }

/* ===== Stall-Thema und Bausteine (Nr. 111, Stil „freundlich“, Vorlage auftraege/design-freundlich-vorlage.md) =====
   Alles Hof-Eigene an Farben, Rundung, Abstand und Schrift steht hier als Variablen (Rollen, keine Farbnamen); Namen, Gruß, Orte
   und Bezeichnungen in js/stall-thema.js. Die Klassen .bs-* nutzen nur diese Variablen (js/bausteine.js). Ein anderer Stall überschreibt nur den Block. */
:root {
    --st-grund: #FFF6E6; --st-flaeche: #FFFDF8; --st-flaeche-gedaempft: #F1E4CC;
    --st-text: #2B2622; --st-text-gedaempft: #5E5348; --st-kontur: #2B2622; --st-linie: #EDE0C8;
    --st-haupt: #1F6B45; --st-haupt-text: #ffffff;
    --st-ton-aktiv: #DDEED3; --st-ton-aktiv-text: #1B3D27;
    --st-ton-info: #D6E8F1; --st-ton-info-text: #1E4257;
    --st-ton-hinweis: #FBE3B0; --st-ton-hinweis-text: #4A3A12;
    --st-ton-gefahr: #F9D9D2; --st-ton-gefahr-text: #7A1D15;
    --st-rundung: 20px; --st-rundung-klein: 14px; --st-abstand: 16px; --st-kontur-breite: 2px; --st-kante: 3px;
    --st-schrift-titel: 'Fredoka', 'Plus Jakarta Sans', sans-serif; --st-schrift-text: 'Plus Jakarta Sans', sans-serif;
    --st-rundung-fenster: 28px; --st-knopf-hoehe: 46px; --st-titel-gewicht: 600;  /* Nr. 108: auch für die App (api/app/info) */
    --st-groesse-titel: 1.5rem; --st-groesse-karten-titel: 1.25rem;  /* rem: wachsen mit der Schrifteinstellung */ --st-groesse-text: 0.9375rem; --st-groesse-neben: 0.8125rem; --st-groesse-klein: 0.8125rem;
    /* Nr. 144 Schrift-Skala 24/20/17/15/13 (Minimum 13 px; Fließtext 16): Titel, Karten-Titel, Groß, Text, Klein. Nebentext = Klein. Nur Stärken 400/700, Fredoka 600 */
    --st-groesse-gross: 1.0625rem; --st-groesse-fliess: 1rem; --st-gewicht-text: 400; --st-gewicht-fett: 700;
    --st-text-knopf: var(--st-haupt);  /* Text-Knopf: Haupt-Grün auf hell, heller Ton auf dunkel */
    --st-statusleiste: #bfe3f5;  /* meta theme-color, js/ui.js themaFarbeSetzen */
}
html.dark {
    --st-grund: #1B1815; --st-flaeche: #25211D; --st-flaeche-gedaempft: #322C26;
    --st-text: #F2ECE4; --st-text-gedaempft: #B5AA9D; --st-kontur: #0E0C0A; --st-linie: #3B332C;
    --st-haupt: #2F7D55; --st-haupt-text: #ffffff;
    --st-ton-aktiv: #1F372A; --st-ton-aktiv-text: #E2F5E9;
    --st-ton-info: #1E3240; --st-ton-info-text: #D2E8F5;
    --st-ton-hinweis: #3D3018; --st-ton-hinweis-text: #F7DF9C;
    --st-ton-gefahr: #401F1C; --st-ton-gefahr-text: #F7C1B9;
    --st-statusleiste: #2c365e;
    --st-text-knopf: #8AD0A8;
}
/* Grund warm nur, solange eine umgestellte Seite offen ist (Dashboard, Pferde) (Probe, Nr. 111); übrige Seiten bleiben bis zur Durchsicht wie sie sind. Tablet hat eigenen Grund. */
html body:not(.tablet-modus):has(#viewDashboard:not(.hidden)), html body:not(.tablet-modus):has(#viewHorses:not(.hidden)) { background: var(--st-grund) !important; background-image: none !important; color: var(--st-text); }
/* Nr. 111 Planer: warmer Grund, Tage als Zeilen in einer Gruppenfläche (aufeinanderfolgende .planer-tag, direkte Kinder von #calListView) */
html body:not(.tablet-modus):has(#viewCalendar:not(.hidden)) { background: var(--st-grund) !important; background-image: none !important; color: var(--st-text); }
.bs-titel-seite { font-size: 1.5rem; }
.planer-woche h3 { color: var(--st-text-gedaempft); }
.planer-woche, html.dark .planer-woche { background: var(--st-grund); }
#calListView.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
#calListView > .planer-woche { margin-top: 12px; }
#calListView > .planer-woche:first-child { margin-top: 0; }
#calListView > .planer-tag, #calDayDetail > .planer-tag { background: var(--st-flaeche); color: var(--st-text); padding: 2px var(--st-abstand); min-height: 54px; border-radius: 0; }
#calListView > .planer-tag + .planer-tag { border-top: 1px solid var(--st-linie); }
#calListView > .planer-tag:not(.planer-tag + .planer-tag), #calDayDetail > .planer-tag { border-top-left-radius: var(--st-rundung); border-top-right-radius: var(--st-rundung); }
#calListView > .planer-tag:last-child, #calListView > .planer-tag:has(+ :not(.planer-tag)), #calDayDetail > .planer-tag { border-bottom-left-radius: var(--st-rundung); border-bottom-right-radius: var(--st-rundung); }
#calListView > .planer-tag-heute, #calDayDetail > .planer-tag-heute { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.planer-tag-heute .bs-neben { color: inherit; opacity: .85; }
.planer-tag-heute .bs-pille { background: var(--st-flaeche); color: var(--st-text); }
.planer-plus { width: 44px; height: 44px; margin-right: -10px; border-radius: 50%; border: 0; color: inherit; opacity: .7; background: transparent; display: inline-flex; align-items: center; justify-content: center; }  /* Nr. 392: ohne gefüllten Kreis, Tippfläche bleibt 44 px */
.planer-zelle-heute { background: var(--st-ton-aktiv); border-color: transparent; color: var(--st-ton-aktiv-text); }
.planer-mehr { padding-top: 12px; }
.planer-mehr .bs-knopf { width: 100%; }
/* Nr. 392 Planer: flache Terminzeilen (Uhrzeit links, Titel, Unterzeile), Abhak-Knopf 44 px, Monat ruhiger */
.planer-termin-zeile { display: flex; align-items: flex-start; gap: 4px; }
.planer-termin { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 6px 0; text-align: left; color: inherit; background: transparent; border: 0; }
.planer-termin-zeit { width: 44px; flex: none; padding-top: 2px; font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); font-variant-numeric: tabular-nums; line-height: 1.3846; }
.planer-termin-zeit-datum { color: var(--st-ton-gefahr-text); }
.planer-termin-symbol { width: 18px; flex: none; padding-top: 4px; text-align: center; font-size: var(--st-groesse-klein); opacity: .65; }
.planer-termin-text { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.planer-termin-text b { font-size: var(--st-groesse-text); font-weight: 600; line-height: 1.4; }
.planer-termin-text span { font-size: var(--st-groesse-klein); line-height: 1.3846; opacity: .78; }
.planer-termin-erledigt { opacity: .6; }
.planer-termin-erledigt b { text-decoration: line-through; }
.planer-abhaken { width: 44px; height: 44px; flex: none; margin-right: -10px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: inherit; }
.planer-abhaken-kasten { width: 26px; height: 26px; border-radius: 9px; border: 2px solid color-mix(in srgb, currentColor 55%, transparent); background: var(--st-flaeche); display: inline-flex; align-items: center; justify-content: center; font-size: var(--st-groesse-klein); }
.planer-abhaken-kasten i { opacity: 0; }
.planer-abhaken[data-zustand="ueberfaellig"] .planer-abhaken-kasten { border-color: var(--st-ton-gefahr-text); }
.planer-abhaken[aria-pressed="true"] .planer-abhaken-kasten { background: var(--st-haupt); border-color: var(--st-haupt); color: var(--st-haupt-text); }
.planer-abhaken[aria-pressed="true"] .planer-abhaken-kasten i { opacity: 1; }
.bs-karte-gefahr .planer-termin-zeile:first-of-type { margin-top: 2px; }
.planer-zelle { color: var(--st-text); }
.planer-zelle.planer-zelle-heute { color: var(--st-ton-aktiv-text); }
.planer-zelle-vorbei .planer-zelle-pille { opacity: .6; }
.planer-punkt { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.planer-punkt-erledigt { background: transparent; border: 1.5px solid currentColor; opacity: .55; }
.planer-legende { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; padding-top: 10px; font-size: var(--st-groesse-klein); color: var(--st-text-gedaempft); }
.planer-legende:empty { display: none; }
.planer-legende-pille { padding: 1px 8px; }
#calFilterBox:not(.hidden) ~ #calListView .planer-filter-leer { display: none; }  /* offenes Filterfeld hat „Zurücksetzen“ schon */
html.dark .planer-tag .bg-white, html.dark .planer-tag .bg-slate-50, html.dark .planer-tag .bg-slate-100 { background-color: var(--st-flaeche-gedaempft); }
html.dark .planer-tag .text-slate-500, html.dark .planer-tag .text-slate-600, html.dark .planer-tag .text-slate-700 { color: var(--st-text-gedaempft); }
html.dark .planer-tag .text-slate-800, html.dark .planer-tag .text-slate-900 { color: var(--st-text); }
.planer-tag-heute .bg-white, .planer-tag-heute .bg-slate-50 { background-color: var(--st-flaeche); }
/* Nr. 111 Dienst: warmer Grund, Fortschritt, Aufgaben als Zeilen in einer Fläche, Eingabefeld */
html body:not(.tablet-modus):has(#viewChecklist:not(.hidden)) { background: var(--st-grund) !important; background-image: none !important; color: var(--st-text); }
.bs-balken { height: 12px; border-radius: 999px; background: var(--st-flaeche); overflow: hidden; }
.bs-balken-fuell { height: 100%; border-radius: 999px; background: var(--st-haupt); transition: width .3s ease-out; }
@media (prefers-reduced-motion: reduce) { .bs-balken-fuell { transition: none; } }
.dienst-aufgabe { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 4px var(--st-abstand); background: var(--st-flaeche); color: var(--st-text); }
/* Nr. 348: in der Bearbeiten-Ansicht umbrechen die Knöpfe unter den Text, der Text bleibt mindestens 9 rem breit (bei 360 px war er 41 px) */
.dienst-aufgabe.dienst-aufgabe-umbruch { flex-wrap: wrap; }
.dienst-aufgabe.dienst-aufgabe-umbruch > [data-action="checklistAbhaken"] { min-width: 9rem; }
.dienst-liste > .dienst-aufgabe + .dienst-aufgabe { border-top: 1px solid var(--st-linie); }
.dienst-liste > .dienst-aufgabe:not(.dienst-aufgabe + .dienst-aufgabe) { border-top-left-radius: var(--st-rundung); border-top-right-radius: var(--st-rundung); }
.dienst-liste > .dienst-aufgabe:last-child, .dienst-liste > .dienst-aufgabe:has(+ :not(.dienst-aufgabe)) { border-bottom-left-radius: var(--st-rundung); border-bottom-right-radius: var(--st-rundung); }
.dienst-aufgabe.bs-ton-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.dienst-aufgabe.bs-ton-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.dienst-aufgabe.bs-ton-aktiv { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
/* Nr. 305 D3: ganze Zeile antippbar (der Tipp-Bereich reicht bis an den Rand der Zeile), Zeile mind. 52 px */
.dienst-aufgabe > [data-action="checklistAbhaken"]:first-child, .dienst-aufgabe > [data-action="dienstHakenTippen"]:first-child { align-self: stretch; margin: -4px 0 -4px calc(var(--st-abstand) * -1); padding: 4px 0 4px var(--st-abstand); min-height: 52px; }
.dienst-aufgabe-edit { display: block; padding-top: 12px; padding-bottom: 12px; }
.dienst-aufgabe-fremd, .dienst-aufgabe.checkliste-fremd { color: var(--st-text-gedaempft); }
/* Nr. 182 (Entwurf Nr. 137): erledigter Aufgabentext gedämpft und durchgestrichen, Handy und Tablet aus einer Quelle. Strich als Hintergrundbild in Textfarbe,
   damit er auch über mehrere Zeilen läuft; Zustand über data-zustand=erledigt an der Zeile (Handy) oder aria-checked=true (Tablet). Eigene Farbe am Text-Span: gewinnt gegen html.dark .dienst-text { color: inherit } */
.abhak-strich { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 58%; background-size: 0% 2px; }
[data-zustand="erledigt"] .abhak-strich, [aria-checked="true"] .abhak-strich { color: var(--st-text-gedaempft); background-size: 100% 2px; }
.abhak-neu .abhak-strich { animation: abhak-strich var(--takt-tipp) var(--kurve-raus); }
@keyframes abhak-strich { from { background-size: 0% 2px; } to { background-size: 100% 2px; } }
@media (prefers-reduced-motion: reduce) { .abhak-neu .abhak-strich { animation: none; } }
html.tiere-aus .abhak-neu .abhak-strich { animation: none; }
.dienst-allergie { color: var(--st-ton-gefahr-text); }
.dienst-liste > p { padding: 8px 4px 2px; margin: 8px 0; color: var(--st-text-gedaempft); }
.dienst-liste > p:first-child { margin-top: 0; }
.dienst-liste { display: flex; flex-direction: column; }
.dienst-haken { width: 28px; height: 28px; border-radius: 50%; border: var(--st-kontur-breite) solid var(--st-text-gedaempft); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--st-haupt-text); }
.dienst-haken-an { background: var(--st-haupt); border-color: var(--st-haupt); }
.bs-unterzeile-flaeche { background: var(--st-flaeche); }
.bs-feld { min-height: 44px; background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); padding: 10px 14px; font-size: 16px; }
.bs-feld:focus { border-color: var(--st-haupt); box-shadow: 0 0 0 1px var(--st-haupt); }  /* Nr. 144: 1 px Linie, beim Fokus 2 px Haupt */  /* eine Definition für Eingabefelder, Auswahl und Textfelder (Nr. 111) */
.bs-feld::placeholder { color: var(--st-text-gedaempft); }
html.dark .bs-feld, html.dark .bs-karte .bs-feld { background-color: var(--st-flaeche-gedaempft); border-color: var(--st-linie); color: var(--st-text); }
html.dark .bs-feld:focus, html.dark .bs-karte .bs-feld:focus { border-color: var(--st-text-knopf); box-shadow: 0 0 0 1px var(--st-text-knopf); }
html.dark .bs-karte .dienst-text, html.dark .bs-karte .bs-text { color: inherit; }
/* Mehr: warmer Grund nur auf der Liste (Kopf der Unterseite versteckt); die Unterseiten bleiben bis zu ihrer Durchsicht wie sie sind */
html body:not(.tablet-modus):has(#viewRoutine:not(.hidden) #mehrKopf.hidden) { background: var(--st-grund) !important; background-image: none !important; color: var(--st-text); }
.bs-karte { background: var(--st-flaeche); color: var(--st-text); border-radius: var(--st-rundung); padding: var(--st-abstand); }
.bs-karte-heute { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }  /* Nr. 144: nur Tönung, kein Rand */
.bs-karte-info { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.bs-karte-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.bs-karte-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.bs-unterzeile { background: var(--st-flaeche-gedaempft); color: var(--st-text); border-radius: var(--st-rundung-klein); padding: 10px 12px; }
#horseHeuteFutter .bs-symbol { background: var(--st-flaeche); color: var(--st-ton-aktiv-text, var(--st-text)); }  /* Nr. 417: Futterzeile auf „Heute“ */
.bs-titel { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: var(--st-groesse-karten-titel); line-height: 1.2; color: inherit; }
.bs-zahl { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: 1.75rem; line-height: 1.1; }
.bs-zahl-m { font-size: 1.25rem; }
.bs-titel-s { font-size: 1.0625rem; }
.bs-ton-hinweis .bs-neben, .bs-ton-aktiv .bs-neben, .bs-ton-info .bs-neben, .bs-ton-gefahr .bs-neben { color: inherit; opacity: .8; }
html.ohne-zeichnungen #kopfZaun, html.ohne-zeichnungen #kopfSzene, html.ohne-zeichnungen #kopfBlase, html.ohne-zeichnungen #kopfWetterVorne, html.ohne-zeichnungen .boot-szene { display: none !important; }  /* Thema zeichnungen:false (js/stall-thema.js): Kopfzeile ohne Tier-Szene, nur Himmel und Titel */
.bs-umschalter-leiste { display: inline-flex; background: var(--st-flaeche-gedaempft); border-radius: 999px; padding: 2px; }
.bs-umschalter { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 0; font-size: var(--st-groesse-text); font-weight: var(--st-gewicht-text); color: var(--st-text-gedaempft); }
.bs-umschalter-an { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-weight: var(--st-gewicht-fett); }  /* Nr. 144: gewählt = Tönung aktiv + 700, keine Kontur */
.bs-karte.hidden, .bs-umschalter-leiste.hidden, .bs-knopf.hidden, .bs-pille.hidden, .bs-gruppe.hidden, .bs-unterzeile.hidden, .bs-zeile.hidden, .bs-symbol.hidden, .bs-blase.hidden { display: none; }  /* .hidden aus tailwind.css verliert sonst gegen display der Bausteine */
.bs-symbol.bs-symbol-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.bs-text { font-size: var(--st-groesse-text); line-height: 1.4667; }
.bs-neben { font-size: var(--st-groesse-neben); line-height: 1.3846; color: var(--st-text-gedaempft); }
.bs-neben.bs-neben-lesbar { font-size: var(--st-groesse-text); line-height: 1.4; }  /* Nr. 305 D1: graue Zweittexte der Pferdekarte (Spitzname, Besitzer, „zuletzt bewegt“, „Keine Notizen.“) auf Skala-Stufe Text (15 px) */
.bs-klein { font-size: var(--st-groesse-klein); line-height: 1.3846; }
.bs-gross { font-size: var(--st-groesse-gross); line-height: 1.4118; font-weight: var(--st-gewicht-fett); }  /* Nr. 144 Stufe „Groß“ 17/24 */
.bs-karte-heute .bs-neben, .bs-karte-info .bs-neben, .bs-karte-hinweis .bs-neben { color: inherit; opacity: .8; }
.bs-symbol { width: 34px; height: 34px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--st-flaeche-gedaempft); color: var(--st-text); font-size: 14px; }
.bs-karte-heute .bs-symbol { background: var(--st-flaeche); }
/* Nr. 144: genau drei Knopfarten – Haupt (grün), Zweit (getönt), Text – plus Symbol-Knopf (.bs-knopf-rund); ohne Rand, ohne Kante unten.
   Gefahr/Hinweis sind Zweit-Knöpfe in der jeweiligen Tönung (nie grün). */
.bs-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--st-knopf-hoehe); padding: 0 18px; border-radius: 999px; border: 0; box-shadow: none; background: var(--st-flaeche-gedaempft); color: var(--st-text); font-family: var(--st-schrift-text); font-size: var(--st-groesse-text); font-weight: var(--st-gewicht-fett); line-height: 1.2; text-align: center; transition: transform var(--takt-tipp) var(--kurve-raus), filter var(--takt-tipp) var(--kurve-raus); }
.bs-knopf:active { transform: scale(var(--tipp-skala)); filter: brightness(.95); }
.bs-knopf-haupt { background: var(--st-haupt); color: var(--st-haupt-text); }
.bs-knopf-zweit { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
.bs-knopf-text { background: transparent; color: var(--st-text-knopf); min-height: 44px; padding: 0 8px; }
.bs-karte .bs-knopf-zweit, .bs-gruppe .bs-knopf-zweit { background: var(--st-flaeche-gedaempft); }
.bs-karte-heute .bs-knopf-zweit, .bs-ton-aktiv .bs-knopf-zweit, .bs-karte-info .bs-knopf-zweit, .bs-karte-hinweis .bs-knopf-zweit { background: var(--st-flaeche); }  /* auf Tönung hebt sich Zweit über die Fläche ab */
.bs-knopf-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.bs-knopf-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.bs-knopf-klein { min-height: 36px; padding: 0 14px; font-size: var(--st-groesse-klein); position: relative; }
.bs-knopf-klein::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.bs-knopf:disabled { opacity: .45; cursor: default; }
.bs-knopf-gross { flex-direction: column; min-height: 76px; padding: 8px 6px; gap: 4px; border-radius: var(--st-rundung); font-size: var(--st-groesse-klein); }
.bs-knopf-rund { width: 44px; min-height: 44px; padding: 0; }  /* Symbol-Knopf: rund, getönt, immer aria-label */
.bs-pille { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 11px; border-radius: 999px; background: var(--st-flaeche-gedaempft); color: var(--st-text); font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); line-height: 1.3846; }
.bs-pille-aktiv { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.bs-pille-info { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.bs-pille-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.bs-pille-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.bs-gruppe { background: var(--st-flaeche); border-radius: var(--st-rundung); overflow: hidden; }
.bs-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 8px var(--st-abstand); color: var(--st-text); }
.bs-gruppe > .bs-zeile + .bs-zeile { border-top: 1px solid var(--st-linie); }
/* Nr. 144/180: Sprechblase im Inhalt (Stallgeflüster, Übergabe): gedämpfte Füllung plus feine Kontur, der Zipfel gehört dazu (Kontur nur an den zwei äußeren Kanten); Blasen der Tiere und Karolines in der Kopfzeile/im Ladebild behalten ihre */
.bs-blase { position: relative; background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1px solid var(--st-linie); border-radius: 20px; padding: 12px 14px; }
.bs-blase::after { content: ''; position: absolute; left: 24px; bottom: -8px; width: 14px; height: 14px; background: var(--st-flaeche-gedaempft); border-right: 1px solid var(--st-linie); border-bottom: 1px solid var(--st-linie); transform: rotate(45deg); }
.bs-blase-neu, .bs-blase-neu::after { background: var(--st-ton-hinweis); }
.bs-blase-neu { color: var(--st-ton-hinweis-text); }
.bs-ton-aktiv { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.bs-ton-info { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.bs-ton-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.bs-ton-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.bs-ton-neutral { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
.bs-blase-text { font-size: var(--st-groesse-fliess); font-weight: var(--st-gewicht-text); line-height: 1.5; }
.mehr-gruppe { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: 1.0625rem; line-height: 1.3; color: var(--st-text-gedaempft); }
.mehr-symbol { color: var(--st-text-gedaempft); font-size: 17px; }
.mehr-rot { color: var(--st-ton-gefahr-text); }
.mehr-gelb { color: var(--st-ton-hinweis-text); }  /* Heu knapp: Info-Zeile der Kachel gelb */
.mehr-notfall { width: 100%; justify-content: flex-start; gap: 8px; min-height: 64px; padding: 0 12px; border-radius: 22px; font-size: 17px; text-align: left; }
.mehr-notruf-unter { display: block; font-size: 14px; font-weight: 600; opacity: .9; }
/* Nr. 389: Schnell-Kacheln oben in Mehr (2×2) */
.mehr-kachel { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 12px 14px; width: 100%; min-width: 0; }
.mehr-kachel .mehr-symbol { font-size: 20px; }
.mehr-kachel-stand { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }  /* große Schrift: lange Wörter umbrechen statt überlaufen */
#mehrSuche.mehr-suche { background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); }
#mehrSuche.mehr-suche::placeholder { color: var(--st-text-gedaempft); }
#horseSearchInput.mehr-suche { background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); }  /* Schnellsuche im Pferde-Tab, wie die Suche in Mehr */
#horseSearchInput.mehr-suche::placeholder { color: var(--st-text-gedaempft); }
#horseSearchBox { position: relative; }
/* Nr. 144 Teil 5: Mehr-Unterseiten und Formular-Fenster im neuen Stil, ohne jede Datei einzeln umzubauen (Stil-Netz, löst sich auf, wenn die Seiten selbst auf .bs-* stehen).
   Grund warm, Karten ohne Rand auf Fläche, drei Knopfarten (Haupt grün, Zweit getönt), Felder wie .bs-feld. Getönte Karten (Hinweis/Gefahr/Info) behalten ihre Tönung, verlieren nur Rand und Schatten. */
html body:not(.tablet-modus):has(#viewRoutine:not(.hidden)) { background: var(--st-grund) !important; background-image: none !important; color: var(--st-text); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(div, section, article, li, details, summary):is(.rounded-xl, .rounded-2xl, .rounded-3xl):is(.border, .border-2, .shadow, .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl) { border-color: transparent; box-shadow: none; border-radius: var(--st-rundung); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(div, section, article, li, details):is(.rounded-xl, .rounded-2xl, .rounded-3xl):is(.bg-white, .bg-white\/60, .bg-white\/70, .bg-white\/80, .bg-white\/90, .bg-slate-50, .bg-slate-100) { background-color: var(--st-flaeche); color: var(--st-text); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(div, section):is(.bg-white, .bg-white\/80, .bg-white\/90):is(.border-b, .border-t) { border-color: var(--st-linie); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) button:is(.bg-brand-700, .bg-brand-600, .bg-emerald-600, .bg-emerald-700, .bg-emerald-800, .bg-green-600, .bg-green-700):not(.bs-knopf) { background: var(--st-haupt); color: var(--st-haupt-text); border: 0; border-radius: 999px; min-height: 44px; font-weight: var(--st-gewicht-fett); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) button:is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-slate-200, .bg-white\/80, .bg-emerald-50, .bg-brand-50):not(.bs-knopf):not([role="tab"]):not(.dienst-haken) { background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 0; border-radius: 999px; min-height: 44px; font-weight: var(--st-gewicht-fett); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) button:is(.bg-red-50, .bg-red-100, .bg-rose-50, .bg-rose-100):not(.bs-knopf) { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); border: 0; border-radius: 999px; min-height: 44px; font-weight: var(--st-gewicht-fett); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea):not(.bs-feld) { background-color: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(input, select, textarea):not(.bs-feld):focus { border-color: var(--st-haupt); box-shadow: 0 0 0 1px var(--st-haupt); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(input, textarea)::placeholder { color: var(--st-text-gedaempft); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(.text-slate-500, .text-slate-600, .text-slate-400) { color: var(--st-text-gedaempft); }
:is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(.text-slate-700, .text-slate-800, .text-slate-900) { color: var(--st-text); }
html.dark :is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(div, section, article, li):is(.bg-white, .bg-white\/60, .bg-white\/70, .bg-white\/80, .bg-white\/90, .bg-slate-50, .bg-slate-100) { background-color: var(--st-flaeche); }
html.dark :is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea):not(.bs-feld) { background-color: var(--st-flaeche-gedaempft); border-color: var(--st-linie); color: var(--st-text); }
html.dark :is(#viewRoutine, .fenster-rahmen:not(#horseModal .fenster-rahmen)) button:is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-slate-200, .bg-white\/80, .bg-emerald-50, .bg-brand-50):not(.bs-knopf):not([role="tab"]):not(.dienst-haken) { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
.st-fett { font-weight: var(--st-gewicht-fett, 700); }  /* Nr. 144: 700 statt extrabold/black (Skala 400/700), zählt nicht als font-bold der Sperrklinke */
/* Nr. 144 Dashboard, Dienst, Pferde, Planer, Mehr, Fenster: Tailwind-Altklassen aus Dateien, die erst mit ihrer Seite umgestellt werden (Wette, Heu, Wetter, Hinweise …),
   auf die Skala 24/20/17/15/13 und die Stärken 400/700. Fällt weg, sobald die Dateien selbst umgestellt sind (Sperrklinke schriftSkala). */
/* Nr. 252 E: die Mindestgröße 13 px gilt in allen Ansichten (auch Tablet, Wandgerät, Fenster außerhalb von .fenster-rahmen), nicht nur in den Hauptansichten. Gleiche Gewichtung wie die Tailwind-Klasse, steht später im Laden. */
:is(.text-xs, .text-mini, .text-\[10px\], .text-\[11px\], .text-\[12px\]) { font-size: var(--st-groesse-klein); line-height: 1.3846; }
:is(#viewDashboard, #viewChecklist, #viewHorses, #viewCalendar, #viewRoutine, #horseModal, .fenster-rahmen) .text-sm { font-size: var(--st-groesse-text); line-height: 1.4667; }
:is(#viewDashboard, #viewChecklist, #viewHorses, #viewCalendar, #viewRoutine, #horseModal, .fenster-rahmen) .text-lg { font-size: var(--st-groesse-gross); line-height: 1.4118; }
:is(#viewDashboard, #viewChecklist, #viewHorses, #viewCalendar, #viewRoutine, #horseModal, .fenster-rahmen) :is(.font-medium, .font-semibold) { font-weight: var(--st-gewicht-text); }
:is(#viewDashboard, #viewChecklist, #viewHorses, #viewCalendar, #viewRoutine, #horseModal, .fenster-rahmen) :is(.font-extrabold, .font-black) { font-weight: var(--st-gewicht-fett); }
/* Alt-Bausteine in den neuen Karten: dunkel warm statt Schiefer (dunkel.css färbt bg-white/slate kühl), hell bleibt wie es ist */
html.dark .bs-karte .bg-white, html.dark .bs-karte .bg-white\/80, html.dark .bs-karte .bg-white\/90, html.dark .bs-karte .bg-slate-50, html.dark .bs-karte .bg-slate-100 { background-color: var(--st-flaeche-gedaempft); }
html.dark .bs-karte .text-slate-500, html.dark .bs-karte .text-slate-600, html.dark .bs-karte .text-slate-700 { color: var(--st-text-gedaempft); }
html.dark .bs-karte .text-slate-800, html.dark .bs-karte .text-slate-900 { color: var(--st-text); }
.bs-karte-heute .bg-white, .bs-karte-heute .bg-slate-50 { background-color: var(--st-flaeche); }
.bs-karte-heute .text-slate-400, .bs-karte-heute .text-slate-500, .bs-karte-heute .text-slate-600 { color: var(--st-ton-aktiv-text); opacity: .85; }  /* Kontrast auf der grünen Tönung (axe) */

/* Auftrag gewicht-futterzustand (Nr. 87): Gewicht & Futterzustand in der Akte */
.gw-stand { margin: 4px 0 6px; font-size: 15px; overflow-wrap: anywhere; }
.gw-trend, html.dark .akte-seite .gw-trend { margin: 4px 0 8px; font-size: 14px; color: #334155; overflow-wrap: anywhere; }  /* Akte bleibt hell (wie Druck) */
.gw-trend i, html.dark .akte-seite .gw-trend i { color: #047857; margin-right: 4px; }
.gw-kurve { display: block; width: 100%; max-width: 480px; height: auto; margin: 4px 0 0; }
.gw-zeitraum { display: flex; gap: 8px; margin: 6px 0; }
.gw-skizze { display: block; width: 100%; max-width: 280px; height: auto; }
.gw-stufe-skizze { display: block; width: 48px; height: 32px; }
.gw-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.gw-messung { padding: 8px 0; border-top: 1px solid #e2e8f0; font-size: 14px; overflow-wrap: anywhere; break-inside: avoid; }
.gw-minis { display: flex; gap: 6px; margin: 4px 0; }
.gw-mini { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #e2e8f0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.gw-vergleich { margin: 12px 0 4px; }
.gw-vergleich h4 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.gw-erinnerung { margin: 12px 0 4px; }
.gw-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gw-zustand-an { border-color: #047857; background: #ecfdf5; box-shadow: 0 0 0 2px #047857 inset; }
html.dark .gw-zustand-an { background: #064e3b; color: #ecfdf5; }
.gw-knopf { min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.gw-knopf-breit { width: 100%; padding: 0 8px; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; }
.gw-blatt { width: 100%; max-width: 448px; max-height: 92vh; overflow-y: auto; background: #fff; color: #0f172a; border-radius: 24px 24px 0 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
@media (min-width: 640px) { .gw-blatt { border-radius: 24px; } }
.gw-titel { font-size: 18px; font-weight: 700; }
.gw-titel-klein, .gw-label { font-size: 14px; font-weight: 700; color: #334155; }
.gw-label { display: block; }
.gw-schaetzung { font-size: 14px; font-weight: 700; color: #065f46; }
.gw-fuss { display: flex; gap: 8px; }
.gw-fuss > * { flex: 1; }
.gw-zustand { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px; text-align: left; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; }
html.dark .gw-blatt { background: #1e293b; color: #f1f5f9; }
html.dark .gw-blatt .gw-titel-klein, html.dark .gw-blatt .gw-label { color: #e2e8f0; }
html.dark .gw-schaetzung { color: #6ee7b7; }
html.dark .gw-zustand, html.dark .gw-knopf-breit { background: #0f172a; color: #f1f5f9; border-color: #475569; }
/* Nr. 111 Abschnitt 2: Seite Pferde */
.bs-seitentitel { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: 1.5rem; line-height: 1.2; color: var(--st-text); }
.bs-filter { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--st-flaeche-gedaempft); color: var(--st-text); font-size: var(--st-groesse-text); font-weight: var(--st-gewicht-text); }
.bs-filter[aria-pressed="true"] { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-weight: var(--st-gewicht-fett); }  /* Nr. 144: ohne Kontur */
.bs-pille-knopf { min-height: 44px; border: 0; cursor: pointer; text-align: left; }
/* Nr. 145: Abzeichen (nur Aktivität) klein, Tippfläche bleibt 44 px; Hinweis-Zeile statt Zustands-Pillen */
.bs-pille-knopf.bs-pille-klein { min-height: 26px; padding: 2px 10px; position: relative; }
.bs-pille-knopf.bs-pille-klein::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.hinweis-reihe { display: flex; align-items: flex-start; gap: 0 4px; margin-top: 2px; }
.hinweis-reihe .hinweis-mehr { flex: none; }
/* Nr. 248 C: Zustandszeile mit Aktion – Text links, „Erledigt am …“ rechts als eigener Knopf mit Rand (44 px) */
.hinweis-reihe-aktion { align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.hinweis-erledigt { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--st-text-gedaempft); background: transparent; color: var(--st-text); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.hinweis-zeile, .hinweis-mehr { position: relative; display: inline-flex; align-items: flex-start; gap: 6px; min-height: 24px; padding: 0; border: 0; background: none; color: var(--st-text); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.hinweis-zeile::after, .hinweis-mehr::after { content: ''; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
.hinweis-mehr { color: var(--st-text-gedaempft); white-space: nowrap; }
.hinweis-mehr::after { left: 0; right: auto; width: max(100%, 44px); }  /* Nr. 257 A4: „· +1“ mindestens 44 px breit antippbar, nach rechts (links liegt die Hinweis-Zeile) */
#modalHorseZustand { row-gap: 0; }  /* Nr. 257 A4: gestapelte Hinweise je 44 px hoch, Tippflächen überlappen nicht */
#modalHorseZustand > .hinweis-zeile, #modalHorseZustand > .hinweis-reihe { min-height: 44px; align-items: center; }
#modalHorseZustand > .hinweis-zeile::after, #modalHorseZustand > .hinweis-reihe > .hinweis-zeile::after { top: 0; height: 100%; transform: none; }
#modalHorseZustand > .hinweis-reihe > .hinweis-zeile { min-height: 44px; align-items: center; }
.hinweis-reihe-aktion { flex-wrap: wrap; row-gap: 4px; }  /* Nr. 257 A5: passt der Knopf nicht daneben, steht er darunter in voller Breite */
.hinweis-reihe-aktion > .hinweis-zeile { flex: 999 1 auto; }
.hinweis-reihe-aktion > .hinweis-erledigt { flex: 1 0 auto; }
.hinweis-punkt { margin-top: 5px; width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--st-ton-info-text); }
.hinweis-gefahr .hinweis-punkt { background: #C0392B; }
.hinweis-hinweis .hinweis-punkt { background: #D9A400; }
.hinweis-ruhig .hinweis-punkt { background: var(--st-text-gedaempft); }  /* Nr. 304 C: Termin schon geplant, nichts zu tun */
.hinweis-ruhig { color: var(--st-text-gedaempft); }
html.dark .hinweis-gefahr .hinweis-punkt { background: #F3837A; }
html.dark .hinweis-hinweis .hinweis-punkt { background: #F4D58A; }
.namen-zusatz { font-family: var(--st-schrift-text); line-height: 1.3; display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--st-text-gedaempft); }

/* Dunkelmodus: gewählter Umschalter/Filter mit grüner Tönung und 700 (Nr. 144: ohne Kontur) */
html.dark .bs-umschalter-an, html.dark .bs-filter[aria-pressed="true"] { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.bs-pferd h4 { color: var(--st-text); }

/* Nr. 356: Pferdeliste als durchgehende Liste mit Statusring; nur vorhandene Töne (--st-ton-*), hell und dunkel über die Variablen */
.pferd-liste { padding: 0; overflow: hidden; }
.pferd-liste > .pferd-zeile + .pferd-zeile { border-top: 1px solid var(--st-linie); }
.pferd-zeile { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px 10px 12px; cursor: pointer; }
.pferd-moment { flex: none; display: block; border-radius: 9999px; }  /* Moment-Ring (box-shadow aus .moment-ring) sitzt außen, der Statusring innen */
.pferd-ring { display: block; padding: 2px; border: 3px solid var(--st-linie); border-radius: 9999px; }
.pferd-ring-aktiv { border-color: var(--st-ton-aktiv-text); }
html.dark .pferd-ring-aktiv { border-color: var(--st-text-knopf); }  /* dunkel: kräftiges Grün statt fast weißem Ton */
.pferd-ring-hinweis { border-color: var(--st-ton-hinweis-text); }
.pferd-ring-gefahr { border-color: var(--st-ton-gefahr-text); }
.pferd-name-zeile { display: flex; align-items: center; min-width: 0; }
.pferd-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 0 1 auto; margin: 0; color: var(--st-text); font-family: var(--st-schrift-titel); font-weight: 700; font-size: var(--st-groesse-karten-titel); line-height: 1.25; }
.pferd-name-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pferd-sub { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--st-schrift-text); font-weight: 400; font-size: var(--st-groesse-text); color: var(--st-text-gedaempft); }
.pferd-name-zeile > .namen-zusatz { flex: none; white-space: nowrap; }
.pferd-abz { position: relative; flex: none; width: 22px; height: 22px; margin-left: 8px; padding: 0; border: 0; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
.pferd-abz::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.pferd-abz-hinweis { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.pferd-abz-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.pferd-abz-info { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.pferd-status { display: flex; align-items: baseline; gap: 4px; min-width: 0; margin-top: 2px; font-size: var(--st-groesse-text); line-height: 1.35; color: var(--st-text-gedaempft); }
.pferd-heute { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }  /* Nr. 364: Zeile „Heute“ mit Pillen */
.pferd-heute-pille { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 9999px; background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-size: var(--st-groesse-text); font-weight: 700; line-height: 1.35; }
.pferd-heute-pille > i { font-size: .85em; }
.pferd-status-sym { margin-right: 5px; font-size: .9em; }
.pferd-status-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pferd-status-zusatz, .pferd-status-mehr { flex: none; white-space: nowrap; }
.pferd-status-knopf, .pferd-status-mehr { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pferd-status-knopf::after, .pferd-status-mehr::after { content: ''; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
.pferd-status-mehr::after { left: 0; right: auto; width: max(100%, 44px); }
.pferd-status-knopf { display: block; overflow: visible; max-width: 100%; }  /* Tippfläche (::after) darf nicht abgeschnitten werden */
.pferd-status-in { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pferd-zeile:not([data-ton="neutral"]) .pferd-status-text { font-weight: 700; }
.pferd-zeile[data-ton="gefahr"] .pferd-status-text { color: var(--st-ton-gefahr-text); }
.pferd-zeile[data-ton="hinweis"] .pferd-status-text { color: var(--st-ton-hinweis-text); }
.pferd-zeile[data-ton="aktiv"] .pferd-status-text { color: var(--st-ton-aktiv-text); }
.pferd-pfeil { flex: none; color: var(--st-text-gedaempft); font-size: 14px; }
/* Nr. 111 Abschnitt 2: Pferde-Fenster (Fenster von unten: Grund, oben Rundung 28 px und Kontur, Griff) */
.bs-fenster { background: var(--st-grund); color: var(--st-text); border: 0; border-radius: 28px 28px 0 0; }  /* Nr. 144: Fenster ohne Kontur, abgehoben durch den abgedunkelten Hintergrund */
@media (min-width: 640px) { .bs-fenster { border-radius: 28px; } }
.bs-griff { width: 44px; height: 5px; border-radius: 999px; background: var(--st-linie); margin: -6px auto 0; }
.bs-abschnitt-titel { font-size: var(--st-groesse-gross); font-weight: var(--st-gewicht-fett); color: var(--st-text-gedaempft); }
.bs-gruppe-fenster { display: flex; flex-direction: column; gap: 1px; background: var(--st-linie); }
.bs-gruppe-fenster > .horse-section-item { background: var(--st-flaeche); }
.bs-gruppe-fenster > .horse-section-item.hidden { display: none; }
.bs-gruppe-fenster > #modsec_training { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.bs-gruppe-fenster > #modsec_training .bs-abschnitt-titel { color: var(--st-ton-aktiv-text); }
#horseModal .horse-section-item .text-slate-400, #horseModal .horse-section-item .text-slate-500, #horseModal .horse-section-item .text-slate-600 { color: var(--st-text-gedaempft); }
#horseModal .horse-section-item .bg-white, #horseModal .horse-section-item .bg-slate-50, #horseModal .horse-section-item .bg-slate-100 { background-color: var(--st-flaeche); color: var(--st-text); }
#horseAdminContent .horse-section-item { background: var(--st-flaeche-gedaempft); border-radius: 16px; overflow: hidden; }
#horseModal #horseAdminBlock > button, #horseModal #horseAdminBlock .bs-abschnitt-titel { color: var(--st-text-gedaempft); }
#horseModal #modalHorseHealthLast { display: flex; flex-direction: column; gap: 8px; }  /* Nr. 247: Zeilen statt drei Kacheln */
.bs-fenster .bs-knopf { padding: 0 10px; }
/* Nr. 111 Fenster: gemeinsamer Rahmen. Wrapper = .fixed.inset-0 + .fenster-hinten + .ebene-*, Inhalt = .bs-fenster.fenster-rahmen (Griff-Strich per ::before).
   Hinten abgedunkelt; gesperrt wird die Seite dahinter von js/fenster-sperre.js. Von unten am Handy, ab 640 px mittig. Tablet: eigene .tablet-schicht. */
.fenster-hinten { align-items: flex-end; justify-content: center; padding: 0 var(--safe-rechts, 0px) 0 var(--safe-links, 0px); background: rgb(15 23 42 / .5); overscroll-behavior: contain; }
@media (min-width: 640px) { .fenster-hinten { align-items: center; padding: max(1rem, calc(var(--safe-oben, 0px) + .5rem)) max(1rem, var(--safe-rechts, 0px)) max(1rem, calc(var(--safe-unten, 0px) + .5rem)) max(1rem, var(--safe-links, 0px)); } }
html.dark .fenster-hinten { background: rgb(0 0 0 / .6); }
.fenster-hinten > .fenster-rahmen { max-height: min(92vh, calc(100dvh - var(--safe-oben, 0px) - .5rem)); overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(1.25rem + var(--safe-unten, 0px)); animation: fenster-auf var(--takt-wechsel) var(--kurve-raus); }
@media (min-width: 640px) { .fenster-hinten > .fenster-rahmen { padding-bottom: 1.25rem; max-height: min(90vh, calc(100dvh - var(--safe-oben, 0px) - var(--safe-unten, 0px) - 2rem)); } }
/* Nr. 120: Knopfreihe unten im Fenster bleibt sichtbar (auch bei offener Tastatur); hebt das Fenster-Polster auf, damit nichts durchscheint */
.fenster-fuss { position: sticky; bottom: calc(-1.25rem - var(--safe-unten, 0px)); margin: 0 -1.25rem calc(-1.25rem - var(--safe-unten, 0px)); padding: .75rem 1.25rem calc(1.25rem + var(--safe-unten, 0px)); background: var(--st-grund); z-index: 1; }
@media (min-width: 640px) { .fenster-fuss { bottom: -1.25rem; margin-bottom: -1.25rem; padding-bottom: 1.25rem; } }
#eventModal[data-schritt="art"] .fenster-fuss [data-action="deleteEventFromModal"], #eventModal[data-schritt="art"] #eventSaveBtn { display: none; }
.fenster-rahmen::before { content: ""; display: block; width: 44px; height: 5px; margin: -6px auto 10px; border-radius: 999px; background: var(--st-linie); }
@media (min-width: 640px) { .fenster-rahmen::before { display: none; } }
@keyframes fenster-auf { from { opacity: .4; } to { opacity: 1; } }  /* nur Einblenden: Lage bleibt sofort messbar (Tests, Fokus) */


/* Nr. 111 Planer im Dunkelmodus: Tauschen-Knopf warm statt nachtblau (Meine und Filter sind .bs-filter, Nr. 374) */
html.dark #calTauschKnopf button.bg-white { background-color: var(--st-flaeche); color: var(--st-text); border-color: var(--st-linie); }
/* Nr. 111 Fenster im Dunkelmodus (Fund 36): Felder und graue Knöpfe im Fenster-Rahmen warm (--st-*) statt nachtblau */
html.dark .fenster-rahmen :is(textarea, select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"])) { background-color: var(--st-flaeche); color: var(--st-text); border-color: var(--st-linie); }
html.dark .fenster-rahmen :is(textarea, input)::placeholder { color: var(--st-text-gedaempft); }
html.dark .fenster-rahmen .bg-slate-100, html.dark .fenster-rahmen .bg-slate-50 { background-color: var(--st-flaeche-gedaempft); color: var(--st-text); }
.fenster-hinten > [tabindex="-1"]:focus, [role="dialog"][tabindex="-1"]:focus { outline: none; }  /* Fokus kommt per Programm auf den Rahmen (Nr. 111), ohne Ring um das ganze Fenster */

/* Nr. 115 Nachtrag: Skizzenfläche (js/skizze.js) in den Hügelfarben der Kopfzeile (js/kopfzeile.js, Sommer; dunkel wie kopfDunkler ×0,72) */
.skizze { --skizze-hinten: #a6d184; --skizze-vorne: #86bf66; --skizze-schrift: #1f4a2b; aspect-ratio: 2 / 1; border: var(--st-kontur-breite, 2px) solid var(--st-kontur, #2b2622); }
html.dark .skizze { --skizze-hinten: #78965f; --skizze-vorne: #5e8949; --skizze-schrift: #e8ecf1; }

.schoner-laune { flex: none; padding: 8px 12px; border-radius: 14px; background: #ffffff; border: 2px solid #2b2622; color: #2b2622; font-size: clamp(14px, 2.4vh, 19px); line-height: 1.3; overflow-wrap: anywhere; }
/* Nr. 74 Teil D: kleines Türchen-Symbol vor dem Text der Blase */
#bootFakt[data-art="tuerchen"]::before { content: ""; display: inline-block; width: .8em; height: 1em; margin-right: .45em; vertical-align: -.12em; border: 2px solid currentColor; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, transparent 55%, currentColor 55% 70%, transparent 70%); opacity: .8; }
/* Nr. 74 Teil E: Teilen-Knopf an der Blase, Vorschau mit „Bild speichern“ */
.karoline-teilen-fenster { position: fixed; inset: 0; z-index: calc(var(--ebene-start, 100) + 1);  /* über dem Ladebild, in dem der Knopf sitzt */ display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(43, 38, 34, .7); }
.karoline-teilen-box { width: min(100%, 420px); max-height: 100%; overflow: auto; border-radius: 16px; background: #fff; color: #2b2622; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.karoline-teilen-bild { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; border: 1px solid #d9cfbd; }
.karoline-teilen-zeile { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.karoline-teilen-speichern, .karoline-teilen-zu { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.karoline-teilen-speichern { background: #3f6212; color: #fff; }
.karoline-teilen-zu { color: #4f6b2a; text-decoration: underline; }
html.dark .karoline-teilen-box { background: #2b2622; color: #f3ecdc; }
html.dark .karoline-teilen-zu { color: #b7d98a; }
/* Nr. 75 Teil A: Blue apportiert bei der Suche. Nur Overlay über der Suchzeile (kein Klick, kein Platz), nur transform/opacity. */
.suche-blue { position: absolute; right: 16px; z-index: 2; pointer-events: none; display: block; animation: suche-blue-lauf var(--takt-auftritt) var(--kurve-raus) both, suche-blue-weg calc(var(--takt-tipp) * 3) ease-in calc(var(--takt-auftritt) * 5) forwards; }
.suche-blue > svg { display: block; }
.suche-blue-sitzt { animation: suche-blue-lauf var(--takt-auftritt) var(--kurve-raus) both, suche-blue-weg calc(var(--takt-tipp) * 3) ease-in calc(var(--takt-auftritt) * 5) forwards; }
@keyframes suche-blue-lauf { 0% { opacity: 0; transform: translateX(var(--suche-blue-von, -70px)); } 20% { opacity: 1; } 100% { opacity: 1; transform: translateX(0); } }
@keyframes suche-blue-weg { to { opacity: 0; transform: translateX(40px); } }
html.tiere-aus .suche-blue { display: none; }
@media (prefers-reduced-motion: reduce) { .suche-blue { display: none; } }
#mehrSucheBox { position: relative; }

/* Nr. 75 Teil B: Johann kräht. Läuft herein (zaun-auftritt-rein, 1 s), hebt dann dreimal den Kopf (Schnabel nach oben) und lässt Noten aufsteigen. Nur transform/opacity. */
.zaun-kraeht > .zaun-innen > svg:first-child { transform-origin: 50% 100%; animation: zaun-kraeht calc(var(--takt-tipp) * 7) var(--kurve-weich) calc(var(--takt-auftritt) * 2) 3 both; }
.zaun-noten { position: absolute; left: 62%; top: -6px; font-size: 13px; font-weight: 600; color: #f3eac2; text-shadow: 0 0 2px #2b2622, 0 0 2px #2b2622; pointer-events: none; opacity: 0; animation: zaun-noten calc(var(--takt-tipp) * 7) var(--kurve-raus) calc(var(--takt-wechsel) * 5) 3 both; }
@keyframes zaun-kraeht { 0%, 100% { transform: rotate(0); } 25%, 65% { transform: rotate(-14deg) translateY(-2px); } }
@keyframes zaun-noten { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -12px); } }
html.tiere-aus .zaun-kraeht > .zaun-innen > svg:first-child, html.tiere-aus .zaun-noten, #kopfzeile.kopf-fest .zaun-noten { animation: none; }
html.tiere-aus .zaun-noten, #kopfzeile.kopf-fest .zaun-noten { display: none; }
@media (prefers-reduced-motion: reduce) { .zaun-kraeht > .zaun-innen > svg:first-child { animation: none !important; } .zaun-noten { display: none; } }

/* Nr. 75 Teil C: Katze liegt quer auf einer unkritischen Dashboard-Karte (Knopf über der Karte, 44 px Tippfläche; nur transform/opacity). */
#mod_activity, #mod_weather { position: relative; }
.katze-karte { position: absolute; right: 8px; top: -6px; z-index: 3; min-width: 44px; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; display: block; animation: katze-landet calc(var(--takt-wechsel) * 2) var(--kurve-raus) both; }
.katze-bild { display: block; transform: rotate(-82deg); transform-origin: 50% 60%; width: 64px; margin: 4px -6px 0 -6px; }
.katze-karte[data-zustand="liegt"] .katze-bild { animation: katze-ruhe calc(var(--takt-ruhe) * 1.2) var(--kurve-weich) infinite; }
.katze-bild > svg { display: block; }
.katze-karte[data-zustand="geht"] { pointer-events: none; animation: katze-geht calc(var(--takt-wechsel) * 3) ease-in both; }
.katze-spruch { position: absolute; right: 12px; top: 40px; z-index: 4; max-width: 70%; padding: 4px 10px; border-radius: 12px; font-size: 13px; line-height: 1.3; background: #fffdf7; color: #2b2622; border: 1.5px solid #2b2622; box-shadow: 0 3px 8px rgba(43, 38, 34, .18); pointer-events: none; animation: katze-spruch calc(var(--takt-tipp) * 17) var(--kurve-raus) both; }
@keyframes katze-landet { 0% { opacity: 0; transform: translateY(-14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes katze-ruhe { 0%, 100% { transform: rotate(-82deg) scale(1); } 50% { transform: rotate(-82deg) scale(1.03); } }
@keyframes katze-geht { 0% { transform: scaleX(1); opacity: 1; } 30% { transform: scaleX(1.25); opacity: 1; } 100% { transform: translateX(80px) scaleX(1.1); opacity: 0; } }
@keyframes katze-spruch { 0% { opacity: 0; } 12%, 80% { opacity: 1; } 100% { opacity: 0; } }
html.tiere-aus .katze-karte, html.tiere-aus .katze-spruch { display: none; }
html.tiere-aus .katze-karte .katze-bild { animation: none; }
@media (prefers-reduced-motion: reduce) { .katze-karte, .katze-spruch { display: none; } .katze-karte .katze-bild { animation: none; } }

/* Nr. 75 Teil D: versteckter Hase der Woche. Eigener Platz im Fluss am Ende einer Seite (nie über Text oder Knöpfen); nur Ohren und Nase über dem Gras. */
.hase-platz { position: relative; display: flex; flex-direction: column; align-items: flex-start; margin-top: 0; min-height: 44px; }
.hase-lage-mitte-links { padding-left: 28%; }
.hase-lage-mitte-rechts { padding-left: 62%; }
.hase-lage-rechts { align-items: flex-end; }
.hase-knopf { display: block; min-width: 44px; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; overflow: hidden; align-self: inherit; line-height: 0; position: relative; z-index: 1; }
.hase-platz[data-zustand="versteckt"] .hase-knopf { height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.hase-platz[data-zustand="versteckt"] .hase-knopf svg { animation: hase-lauscht calc(var(--takt-ruhe) * 1.5) var(--kurve-weich) infinite; }
.hase-gras { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.hase-platz[data-zustand="gefunden"] { flex-direction: row; align-items: center; gap: 8px; min-height: 52px; }
.hase-text { font-size: 12px; color: #475569; }
html.dark .hase-text { color: #cbd5e1; }
.hase-blase { position: absolute; bottom: 100%; left: 0; right: 0; margin: 0 0 4px; padding: 6px 12px; border-radius: 14px; font-size: 13px; background: #fffdf7; color: #2b2622; border: 1.5px solid #2b2622; box-shadow: 0 3px 8px rgba(43, 38, 34, .18); text-align: center; animation: katze-spruch calc(var(--takt-wechsel) * 20) var(--kurve-raus) both; pointer-events: none; }
.hase-hupf { animation: hase-hupf var(--takt-auftritt) var(--kurve-raus); }
@keyframes hase-lauscht { 0%, 84%, 100% { transform: translateY(0); } 90% { transform: translateY(-2px); } 95% { transform: translateY(0); } }
@keyframes hase-hupf { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } 70% { transform: translateY(0); } 85% { transform: translateY(-4px); } }
html.tiere-aus .hase-platz, html.tiere-aus .hase-blase { display: none; }
html.tiere-aus .hase-hupf, html.tiere-aus .hase-knopf svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .hase-hupf, .hase-blase, .hase-knopf svg { animation: none; } }

/* Nr. 136 D: Rahmen ums Pferdefoto (Overlay innen im runden Bild; Besitzerin/Besitzer legt ihn in der Kammer an) */
.heu-pferdrahmen { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1; }
.heu-pferdrahmen[data-pr="pr-heu"] { box-shadow: inset 0 0 0 3px #e3bb4f, inset 0 0 0 5px #fff8e6; }
.heu-pferdrahmen[data-pr="pr-holz"] { box-shadow: inset 0 0 0 3px #8a5a2b, inset 0 0 0 4px #5a3a1c; }
.heu-pferdrahmen[data-pr="pr-hufeisen"] { box-shadow: inset 0 0 0 3px #9aa3ad; border: 2px dotted #5f6770; }
.heu-pferdrahmen[data-pr="pr-blumen"] { box-shadow: inset 0 0 0 3px #7bb661; border: 2px dotted #e8838f; }
.heu-pferdrahmen[data-pr="pr-silber"] { box-shadow: inset 0 0 0 3px #c4cad1, inset 0 0 0 4px #7d8791; }
.heu-pferdrahmen[data-pr="pr-gold"] { box-shadow: inset 0 0 0 3px #e0b43a, inset 0 0 0 4px #9a7410; }
.heu-pferdrahmen[data-pr="s-lichter"] { box-shadow: inset 0 0 0 3px #2f6f3a; border: 3px dotted #f6d65a; }
.heu-pferdrahmen[data-pr="s-konfetti"] { box-shadow: inset 0 0 0 2px #e8838f; border: 3px dotted #3a7bd5; }
.heu-pferdrahmen[data-pr="s-eier"] { box-shadow: inset 0 0 0 3px #7bb661; border: 3px dotted #f2a2b8; }
.heu-pferdrahmen[data-pr="s-laub"] { box-shadow: inset 0 0 0 3px #b8642f; border: 3px dotted #e8a33a; }

/* Nr. 136: Auswahl-Knöpfe und Beschriftungen der Kammer (Farben aus den Heuleiter-Variablen, Hell und Dunkel) */
.heu-chip { min-height: 44px; padding: 0 .75rem; border-radius: .75rem; border: 1px solid var(--heu-rand, #cbd5e1); background: var(--heu-karte, #fff); color: var(--heu-karte-text, #1e293b); font-size: .875rem; font-weight: 700; text-align: left; }
.heu-chip[aria-pressed="true"], .heu-chip[aria-selected="true"], .heu-chip[aria-checked="true"] { border-color: var(--heu-holz, #b07b45); box-shadow: inset 0 0 0 1px var(--heu-holz, #b07b45); }
html.dark [data-profil-kammer] .heu-chip { background: #334155; color: #f1f5f9; border-color: var(--st-text-gedaempft, #64748b); }
.heu-chip[aria-pressed="true"]::before, .heu-chip[aria-selected="true"]::before { content: "✓ "; }
.heu-chip-zeile { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; }
.heu-aktion { min-height: 44px; padding: 0 .75rem; border-radius: .75rem; font-size: .875rem; font-weight: 700; }
.heu-fett { font-size: .875rem; font-weight: 700; }
.heu-klein-fett { font-size: .75rem; font-weight: 700; }
.heu-kammer-bild svg { max-width: 100%; height: auto; }

/* Nr. 136 D: Sticker-Reaktionen im Moment-Betrachter (über dem Text, über den Tippzonen) */
.moment-reaktion { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-unten, 0px) + 140px); z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0 16px; pointer-events: none; }
.moment-reaktion.hidden { display: none; }
.heu-reaktion-reihe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: auto; }
.heu-reaktion-knopf { position: relative; min-width: 44px; min-height: 44px; border-radius: 999px; border: 2px solid rgba(255,255,255,.55); background: rgba(0,0,0,.55); padding: 2px 6px; display: inline-flex; align-items: center; gap: 2px; }
.heu-reaktion-knopf[data-zustand="meine"] { border-color: #f6d65a; background: rgba(120,90,10,.7); }
.heu-reaktion-knopf:disabled { opacity: .85; }
.heu-reaktion-bild svg { display: block; width: 34px; height: auto; }
.heu-reaktion-zahl { color: #fff; font-size: 12px; font-weight: 700; }
.heu-reaktion-wer { margin: 0; max-width: 100%; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; pointer-events: auto; }

/* Nr. 136 E: Leiter-Designs und Kulissen der Heuleiter-Szene (Tageszeit und Wetter wirken darüber weiter) */
.heu-szene[data-leiter="birke"] .heu-holm { stroke: #efece4; } .heu-szene[data-leiter="birke"] .heu-sprosse-linie { stroke: #d9d3c4; }
.heu-szene[data-leiter="morsch"] .heu-holm { stroke: #7d6a52; } .heu-szene[data-leiter="morsch"] .heu-sprosse-linie { stroke: #8a7a64; }
.heu-szene[data-leiter="gold"] .heu-holm { stroke: #e0b43a; } .heu-szene[data-leiter="gold"] .heu-sprosse-linie { stroke: #d4a62c; }
.heu-szene[data-leiter="strick"] .heu-holm { stroke: #c9a56b; stroke-width: 2.1; stroke-dasharray: 1.4 .5; } .heu-szene[data-leiter="strick"] .heu-sprosse-linie { stroke: #b8935a; stroke-width: 1.2; }
.heu-szene[data-leiter] .heu-sprosse-linie[data-erreicht="1"] { stroke: #f5c542; }
.heu-szene[data-kulisse="sterne"] { --heu-himmel-oben: #070d22; --heu-himmel-unten: #1a2a55; --heu-sterne-a: 1; }
@keyframes heu-lichter { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.heu-mini { display: block; width: 64px; height: 76px; overflow: hidden; border-radius: 8px; border: 1px solid var(--heu-rand); }
.heu-mini svg { display: block; width: 100%; height: 100%; }

/* Nr. 136 J: Kontostand immer sichtbar, Filter „Nur, was mir gehört“, Anprobieren */
.heu-konto-leiste { position: sticky; top: 0; z-index: 3; padding: .5rem; border-radius: .75rem; background: var(--heu-karte); color: var(--heu-karte-text); border: 1px solid var(--heu-rand); }
.heu-wurzel[data-nur-meine="1"] .heu-kammer-karte[data-zustand="kaufbar"], .heu-wurzel[data-nur-meine="1"] .heu-kammer-karte[data-zustand="zu-teuer"], .heu-wurzel[data-nur-meine="1"] .heu-kammer-karte[data-zustand="bald"],
.heu-wurzel[data-nur-meine="1"] .heu-kammer-karte[data-zustand="gesperrt"] { display: none; }

.heu-brett:has(> [data-joker="extra"]) { flex-wrap: wrap; }  /* Nr. 136 E: mit dem fünften Joker darf die Reihe umbrechen (360 px) */

/* Nr. 148: Heuleiter ohne Kopfzeile (js/heu-kopf.js, body[data-heuleiter] = geht | weg | kommt). Tiere laufen vom Zaun weg (eigene Eigenschaften translate/scale,
   die transform der Tiere bleibt), Kopfzeile klappt zu; „Bewegung reduzieren“ springt sofort (JS) und hat hier keine Animation. */
#heuLeiste { display: none; }
body[data-heuleiter="weg"] #kopfzeile, body[data-heuleiter="weg"] #mehrKopf { display: none !important; }
body[data-heuleiter="weg"] #heuLeiste { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: var(--ebene-kopf); min-height: 48px; padding: env(safe-area-inset-top, 0px) 12px 0; background: var(--st-grund); border-bottom: 1px solid var(--st-linie); }
.heu-leiste-konto { font-weight: 700; font-size: 15px; color: var(--st-text); }
.heu-leiste-dringend { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; background: none; border: 0; }
body[data-sync="rot"] .heu-leiste-dringend { display: inline-flex; }
/* Nr. 153 A: Vollbild der Heuleiter – keine untere Reiter-Leiste, keine festen Portal-Elemente; übrig: Szene und #heuLeiste (X rechts, Safe Area beachtet) */
.heu-leiste-x { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; font-size: 20px; color: var(--st-text); }
.heu-leiste-x.hidden { display: none; }
body[data-heuleiter="weg"] #untereLeiste, body[data-heuleiter="weg"] #desktopSucheBtn, body[data-heuleiter="weg"] #updateNotice, body[data-heuleiter="weg"] #syncStatusBadge, body[data-heuleiter="weg"] .karoline-gast[data-art="leerlauf"] { display: none !important; }
body[data-heuleiter="weg"] { padding-bottom: env(safe-area-inset-bottom, 0px); }
body[data-heuleiter="weg"] #heuLeiste { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
body[data-heuleiter="weg"] .heu-schublade { bottom: env(safe-area-inset-bottom, 0px); }
body[data-heuleiter="weg"] .heu-nachfrage { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.heu-leiste-punkt { width: 14px; height: 14px; border-radius: 999px; background: #C0392B; box-shadow: 0 0 0 3px rgba(192, 57, 43, .25); }
html.dark .heu-leiste-punkt { background: #F3837A; }
body[data-heuleiter="geht"] #kopfzeile, body[data-heuleiter="kommt"] #kopfzeile { overflow: hidden; }
body[data-heuleiter="geht"] #kopfzeile { animation: heu-kopf-zu var(--takt-auftritt) ease-in forwards; }
body[data-heuleiter="kommt"] #kopfzeile { animation: heu-kopf-auf var(--takt-auftritt) var(--kurve-raus) both; }
body[data-heuleiter="geht"] #kopfZaun [data-tier] { animation: heu-tiere-weg calc(var(--takt-tipp) * 3) ease-in forwards; }
body[data-heuleiter="kommt"] #kopfZaun [data-tier] { animation: heu-tiere-weg calc(var(--takt-tipp) * 2) var(--kurve-raus) var(--takt-wechsel) reverse both; }
body[data-heuleiter="geht"] #kopfZaun::after { content: "Bin beim Quiz – Karoline"; position: absolute; left: 50%; bottom: 2px; translate: -50% 0; z-index: 3; padding: 1px 10px; border-radius: 6px; background: #f6e7c8; color: #2b2622; border: 2px solid #8a5a2b; font-size: 13px; font-weight: 700; white-space: nowrap; animation: heu-schild var(--takt-auftritt) both; }
@keyframes heu-tiere-weg { 0% { scale: 1 1; translate: 0 0; opacity: 1; } 30% { scale: -1 1; translate: 0 0; opacity: 1; } 100% { scale: -1 1; translate: 0 120%; opacity: 0; } }
@keyframes heu-kopf-zu { 0%, 55% { height: var(--kopf-h); } 100% { height: 0; } }
@keyframes heu-kopf-auf { 0% { height: 0; } 45%, 100% { height: var(--kopf-h); } }
@keyframes heu-schild { 0%, 40% { opacity: 0; } 55%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body[data-heuleiter] #kopfzeile, body[data-heuleiter] #kopfZaun [data-tier], body[data-heuleiter] #kopfZaun::after { animation: none !important; } }
/* Nr. 148: die Zuschauer kommen erst nach dem Übergang von unten in die Szene; beim Verlassen sind sie zuerst weg (vor den Tieren am Zaun) */
body[data-heuleiter="geht"] .heu-zuschauer, body[data-heuleiter="kommt"] .heu-zuschauer { opacity: 0; translate: 0 100%; }
body[data-heuleiter="weg"] .heu-zuschauer { transition: opacity .3s ease-out, translate .3s ease-out; }
@media (prefers-reduced-motion: reduce) { body[data-heuleiter] .heu-zuschauer { transition: none !important; } }
/* Nr. 149 A: Heuleiter-Startseite – großer Knopf „Spielen“, Rest als Kacheln (3 je Zeile, höchstens 2 Zeilen), Hinweis als Punkt */
.heu-spielen { min-height: 4rem; }
.heu-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.heu-kachel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 4rem; padding: .4rem .25rem; border-radius: .75rem; border: 0; background: var(--heu-karte); box-shadow: 0 2px 8px rgba(90,58,28,.14); color: var(--heu-karte-text); font-weight: 700; font-size: .8125rem; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
html.dark .heu-kachel { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.heu-kachel > i { font-size: 1.1rem; }
.heu-kachel[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--heu-holz); }
.heu-kachel-unter { font-size: .8125rem; font-weight: 600; opacity: .85; }
.heu-kachel-punkt { position: absolute; top: .35rem; right: .35rem; width: .7rem; height: .7rem; border-radius: 9999px; background: #dc2626; box-shadow: 0 0 0 2px #fff; }
html.dark .heu-kachel-punkt { box-shadow: 0 0 0 2px #1f1a14; }
/* Nr. 234 A: Startseite der Heuleiter – Titel in der Szene, ein Hauptknopf, Zahlen, „Heute“, „Mehr“, Fußzeile. Karten ohne harte Rahmen (Stil aus Nr. 109), Kontrast hell und dunkel ≥ 4,5:1 */
.heu-wurzel { --heu-gedaempft: #6b4a24; }
html.dark .heu-wurzel { --heu-gedaempft: #d9c398; }
.heu-start-kopf { position: relative; border-radius: 20px; overflow: hidden; }
.heu-start-kopf .heu-szene { box-shadow: none; }
.heu-start-titel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; z-index: 12; padding: 8px 122px 10px 14px; text-align: left; background: linear-gradient(76deg, rgba(20,12,4,.90) 0%, rgba(20,12,4,.68) 44%, transparent 62%); color: #fff; pointer-events: none; }  /* Nr. 388: ruhiges Titelbild ohne gequetschte Szene; Tiere & Karoline stehen rechts frei */
.heu-start-marke { margin: 0; font-size: .8125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #f3d27a; }
.heu-start-ueberschrift { margin: 0; font-size: 1.55rem; line-height: 1.05; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.heu-ueberschrift { margin: 0; color: var(--heu-text); }
.heu-zahlen { display: grid; grid-template-columns: repeat(var(--heu-zahlen, 3), minmax(0, 1fr)); gap: .5rem; }
.heu-zahl { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 4rem; padding: .4rem .25rem; border-radius: .75rem; background: var(--heu-karte); color: var(--heu-karte-text); box-shadow: 0 2px 8px rgba(90,58,28,.14); text-align: center; }
html.dark .heu-zahl { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.heu-zahl-wert { font-size: 1.125rem; line-height: 1.2; font-weight: 800; }
.heu-zahl-text { font-size: .75rem; font-weight: 600; color: var(--heu-gedaempft); }
.heu-abschnitt { margin: .25rem 0 -.25rem .25rem; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--heu-gedaempft); }
.heu-zeile { border: 0; padding: .6rem .75rem; background: var(--heu-karte); color: var(--heu-karte-text); box-shadow: 0 2px 8px rgba(90,58,28,.14); }
html.dark .heu-zeile { box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.heu-zeile:active { transform: scale(var(--tipp-skala-gross)); }
.heu-zeile-symbol { font-size: 1.25rem; color: var(--heu-gruen); }
html.dark .heu-zeile-symbol { color: #7fd18b; }
.heu-zeile-unter { color: var(--heu-gedaempft); }
.heu-pille { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 .7rem; border-radius: 999px; font-size: .8125rem; font-weight: 800; background: #d7efd9; color: #1d5a29; }
html.dark .heu-pille { background: #24412a; color: #b6ecbf; }
/* Nr. 234 B: Herausforderungs-Karte (Orange, nicht Grün), Zahl am Reiter „Mehr“, Hinweis-Knopf am Dashboard */
.heu-challenge { border-radius: 20px; padding: 14px; color: #fff; background: linear-gradient(160deg, #c2410c, #9a3412); box-shadow: 0 6px 18px rgba(154,52,18,.4); }
.heu-challenge[data-zustand="fertig"] { background: linear-gradient(160deg, #4a5568, #2d3748); box-shadow: 0 6px 18px rgba(45,55,72,.35); }  /* Ergebnis: Akzent neutral */
.heu-challenge-platz { min-height: 9.5rem; border-radius: 20px; background: rgba(177,58,6,.12); }
.heu-challenge-art { margin: 0; font-size: .8125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.heu-challenge-titel { margin: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 800; color: #fff; }
.heu-challenge-unter { margin: 2px 0 0; font-size: .875rem; color: #fff; }
.heu-challenge-knopf { border: 0; background: #fff; color: #7c2d0a; box-shadow: none; }
.heu-challenge[data-zustand="fertig"] .heu-challenge-knopf { color: #1a202c; }
.heu-challenge-knopf-zweit { border: 0; background: rgba(0,0,0,.25); color: #fff; }
.heu-challenge-mehr { display: block; width: 100%; margin-top: 4px; color: #fff; text-align: center; }
.heu-duell-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 9999px; background: #fff4e6; color: #b13a06; font-size: 1.5rem; font-weight: 800; }
.nav-zahl { position: absolute; top: -2px; right: 0; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 9999px; background: #c2410c; color: #fff; font-size: .75rem; line-height: 1.1rem; font-weight: 800; text-align: center; }
.nav-zahl.hidden { display: none; }
.dash-hinweis-knopf { padding: .35rem .8rem; border-radius: 9999px; background: #c2410c; color: #fff; font-weight: 800; font-size: .8125rem; }
.heu-fuss { margin: 0; text-align: center; font-size: .75rem; line-height: 1.4; color: var(--heu-gedaempft); }
/* Nr. 149 D: ruhige Darstellung (ältere Handys oder Wahl im Profil): keine Wetter-Partikel, Sprünge statt Kamerafahrt, Zuschauer ohne Hüpfen, weniger Halme, ohne Schatten */
.heu-wurzel[data-darstellung="ruhig"] .heu-welt, .heu-wurzel[data-darstellung="ruhig"] .heu-kar, .heu-wurzel[data-darstellung="ruhig"] .heu-kegel { transition: none; }
.heu-wurzel[data-darstellung="ruhig"] .heu-wetter i, .heu-wurzel[data-darstellung="ruhig"] .heu-wetter b { display: none; }
.heu-wurzel[data-darstellung="ruhig"] .heu-wetter u { animation: none; }
.heu-wurzel[data-darstellung="ruhig"] .heu-zuschauer-tier { animation: none !important; }
.heu-wurzel[data-darstellung="ruhig"] .heu-halme i:nth-child(n+3) { display: none; }
.heu-wurzel[data-darstellung="ruhig"] .heu-szene, .heu-wurzel[data-darstellung="ruhig"] .heu-urkunde { box-shadow: none; }
/* Nr. 149 C: „Neue Runde“ auf der dunklen Blase hell (wie in der Nachfrage), auch im hellen Modus lesbar */
[data-heu-offen] .heu-knopf-zweit { color: #f4f1e6; border-color: #d8d3bf; }
/* Nr. 149 B: Karolines Satz beim ersten Öffnen nicht unter der unteren Leiste */
.heu-satz { scroll-margin-top: 4.5rem; scroll-margin-bottom: 6.5rem; }

/* Nr. 158 C/390: Quiz als Szene (js/karoline-quiz-seite.js) im Zaunbrett-2.0-Stil. Weide bei Tag, dunkel Abend/Nacht; nur transform/opacity animiert. */
.quiz-szene { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 14px; border-radius: 20px; overflow: hidden; color: #1f2d1a;
  background: linear-gradient(#cfe9f7 0, #e6f3e0 38%, #9fd08a 38.5%, #7fb86b 100%); border: 1.5px solid #2b2622; }
.quiz-szene::before { content: ""; position: absolute; left: -6%; right: -6%; bottom: 0; height: 64%; background: radial-gradient(ellipse 65% 42% at 24% 18%, rgba(168, 212, 134, .45), transparent 70%), radial-gradient(ellipse 65% 46% at 82% 24%, rgba(132, 184, 98, .4), transparent 72%); pointer-events: none; z-index: 0; }
.quiz-szene > :not(.quiz-konfetti) { position: relative; z-index: 1; }
html.dark .quiz-szene { color: #e8efe4; background: linear-gradient(#141c2e 0, #1b2638 38%, #24362b 38.5%, #1b2a20 100%); border-color: #2f4636; }
html.dark .quiz-szene::before { opacity: .25; }
.quiz-kopfzeile { margin: 0; font-size: 13px; font-weight: 700; text-align: center; opacity: .8; }
.quiz-zaun { position: relative; display: flex; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.quiz-zaun::before { content: ""; position: absolute; left: 50%; top: 52%; width: min(260px, 86%); height: 8px; transform: translate(-50%, -50%); border-radius: 4px; background: linear-gradient(#d2a36c, #ad7c48); border: 1.5px solid #2b2622; z-index: 0; }
.quiz-pfosten { width: 44px; height: 56px; border-radius: 8px 8px 3px 3px; background: linear-gradient(#c6955c, #a47440); border: 2px solid #2b2622; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; position: relative; z-index: 1; }
.quiz-pfosten[data-pfosten="jetzt"] { box-shadow: 0 0 0 3px #f2c94c; }
.quiz-pfosten-band { min-width: 28px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 13px; color: #fff; border: 1px solid #2b2622; }
.quiz-pfosten[data-pfosten="richtig"] .quiz-pfosten-band { background: #2f7d3b; }
.quiz-pfosten[data-pfosten="falsch"] .quiz-pfosten-band { background: #a8661f; }
html.dark .quiz-pfosten { background: linear-gradient(#7d5d39, #624729); border-color: #2b2622; }
html.dark .quiz-zaun::before { background: linear-gradient(#765734, #594126); }
.quiz-frage { margin: 0; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .92); color: #1f2d1a; font-size: 18px; line-height: 1.3; font-weight: 800; text-align: center; }
html.dark .quiz-frage { background: rgba(15, 23, 20, .82); color: #f1f5ee; }
.quiz-karten { display: grid; gap: 10px; }
.quiz-karten-wahr { grid-template-columns: 1fr 1fr; }
.quiz-karte { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 18px; border: 2px solid #d9e2d3; background: #fff; color: #1f2d1a; font-size: 16px; font-weight: 700; text-align: left; box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
  animation: quiz-karte-ein calc(var(--takt-tipp) * 2) var(--kurve-raus) both; animation-delay: calc(var(--i) * 70ms); }
.quiz-karten-wahr .quiz-karte { flex-direction: column; justify-content: center; text-align: center; min-height: 104px; gap: 6px; font-size: 18px; }
html.dark .quiz-karte { background: #223027; border-color: #3a5142; color: #eef4ea; box-shadow: none; }
.quiz-karte-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.quiz-karte-buchstabe { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #e3efdc; color: #2f5d2a; font-weight: 800; }
html.dark .quiz-karte-buchstabe { background: #35523c; color: #dff0d8; }
.quiz-karte-icon { font-size: 30px; color: #2f7d3b; }
.quiz-karten-wahr .quiz-karte:nth-child(2) .quiz-karte-icon { color: #a8661f; }
.quiz-karte-stand { font-size: 20px; }
.quiz-karte[data-quiz-antwort="richtig"] { background: #1f7a3a; border-color: #1f7a3a; color: #fff; }
.quiz-karte[data-quiz-antwort="falsch"] { background: #b4403a; border-color: #b4403a; color: #fff; }
.quiz-karte[data-quiz-antwort="richtig"] .quiz-karte-buchstabe, .quiz-karte[data-quiz-antwort="falsch"] .quiz-karte-buchstabe { background: rgba(255, 255, 255, .25); color: #fff; }
.quiz-karte[data-quiz-antwort="richtig"] .quiz-karte-icon, .quiz-karte[data-quiz-antwort="falsch"] .quiz-karte-icon { color: #fff; }
.quiz-karte:disabled:not([data-quiz-antwort="richtig"]):not([data-quiz-antwort="falsch"]) { opacity: .6; }
.quiz-buehne { display: flex; align-items: flex-end; gap: 8px; min-height: 100px; }
.quiz-karoline { width: 96px; flex: none; transform-origin: 50% 100%; }
.quiz-karoline[data-pose="lacht"] { animation: quiz-karo-freut calc(var(--takt-wechsel) * 2) var(--kurve-feder) 2; }
.quiz-karoline[data-pose="frech"] { animation: quiz-karo-frech calc(var(--takt-wechsel) * 2) var(--kurve-feder) 1; }
.quiz-karoline svg { width: 100%; height: auto; display: block; }
.quiz-karoline-ersatz { font-size: 56px; color: #6b4f2a; }
.quiz-blase { position: relative; flex: 1; min-width: 0; padding: 10px 12px; border-radius: 16px; background: #fffdf4; color: #2b2622; border: 2px solid #2b2622; font-size: 15px; line-height: 1.35; animation: quiz-blase-ein calc(var(--takt-tipp) * 2) var(--kurve-raus) both; }
.quiz-blase::before { content: ""; position: absolute; left: -9px; bottom: 18px; width: 14px; height: 14px; background: inherit; border-left: 2px solid #2b2622; border-bottom: 2px solid #2b2622; transform: rotate(45deg); }
.quiz-blase p { margin: 0; }
.quiz-blase-kopf { font-weight: 800; margin-bottom: 2px !important; }
.quiz-blase[data-richtig="true"] .quiz-blase-kopf { color: #1f7a3a; }
.quiz-blase[data-richtig="false"] .quiz-blase-kopf { color: #a8661f; }
.quiz-blase-leer { opacity: .85; animation: none; }
.quiz-weiter { min-height: 52px; border-radius: 16px; border: 0; background: #2f6f2b; color: #fff; font-size: 17px; font-weight: 800; padding: 0 16px; }
.quiz-text-knopf { min-height: 44px; background: none; border: 0; font-weight: 700; font-size: 15px; color: inherit; text-decoration: underline; }
.quiz-gross { margin: 0; text-align: center; font-size: 40px; font-weight: 800; }
.quiz-baelle { display: flex; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.quiz-balle { width: 54px; }
.quiz-balle svg { width: 100%; height: auto; display: block; }
.quiz-balle-leib { fill: none; stroke: #8a6b3a; stroke-width: 2.5; stroke-dasharray: 4 3; opacity: .7; }
.quiz-balle-band { stroke: #8a6b3a; stroke-width: 2; opacity: .5; }
.quiz-balle[data-voll="true"] .quiz-balle-leib { fill: #e3b94c; stroke: #2b2622; stroke-dasharray: none; opacity: 1; }
.quiz-balle[data-voll="true"] .quiz-balle-band { stroke: #7a5814; opacity: 1; }
.quiz-balle[data-voll="true"] { animation: quiz-balle-ein calc(var(--takt-tipp) * 3) var(--kurve-raus) both; animation-delay: calc(var(--i) * 220ms); }
.quiz-ergebnis { overflow: hidden; }
.quiz-konfetti i { position: absolute; top: -20px; left: calc(var(--k) * 7%); color: #c9a227; font-size: 18px; animation: quiz-fall calc(var(--takt-tipp) * 17) ease-in both; animation-delay: calc(var(--k) * 90ms); pointer-events: none; }
/* Silhouette groß und mittig, bei Auflösung blendet das echte Tier darüber; Moment-Ausschnitt zoomt heraus */
.quiz-silhouette { position: relative; margin: 0 auto; width: 220px; max-width: 100%; }
.quiz-silhouette svg { width: 100%; }
.quiz-silhouette .quiz-echt { position: absolute; inset: 0; animation: quiz-echt-ein calc(var(--takt-wechsel) * 2) var(--kurve-raus) both; }
.quiz-silhouette .quiz-echt svg { filter: none; opacity: 1; }
html.dark .quiz-silhouette .quiz-echt svg { filter: none; opacity: 1; }
.quiz-silhouette.quiz-silhouette-weg > svg { opacity: 0 !important; transition: opacity .5s; }
.quiz-ausschnitt { max-width: 300px; }
.quiz-ausschnitt img { transition: transform .8s ease-out; }
.quiz-ausschnitt-auf img { transform: scale(1); }
@keyframes quiz-karte-ein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes quiz-blase-ein { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes quiz-karo-freut { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes quiz-karo-frech { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-5deg); } 70% { transform: rotate(4deg); } }
@keyframes quiz-balle-ein { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@keyframes quiz-fall { from { opacity: 1; transform: translateY(0) rotate(0); } to { opacity: 0; transform: translateY(380px) rotate(200deg); } }
@keyframes quiz-echt-ein { from { opacity: 0; } to { opacity: 1; } }
html.tiere-aus .quiz-karoline[data-pose] { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .quiz-karte, .quiz-blase, .quiz-karoline[data-pose], .quiz-balle, .quiz-konfetti i, .quiz-silhouette .quiz-echt { animation: none !important; } .quiz-ausschnitt img { transition: none; } .quiz-konfetti { display: none; } }
/* Nr. 158 C: Rangliste und Abzeichen auf der Quiz-Startseite eingeklappt */
.quiz-mehr-kopf { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 16px; background: var(--st-karte, #fff); border: 1px solid var(--st-linie, #e2e8f0); font-weight: 700; font-size: 15px; cursor: pointer; }
.quiz-mehr[open] > .quiz-mehr-kopf { margin-bottom: 4px; }
/* Nr. 156: Herz im Moment-Betrachter (unten rechts), Doppeltipp-Herz groß in der Mitte */
.moment-herz { position: absolute; right: 12px; bottom: calc(var(--safe-unten, 0px) + 84px); z-index: 4; display: flex; align-items: center; gap: 2px; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: flex-end; }
.moment-herz.hidden { display: none; }
.moment-herz-knopf { min-width: 44px; min-height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; background: rgba(0,0,0,.35); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.moment-herz-knopf[data-zustand="an"] { color: #fb7185; }
.moment-herz-zahl { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.moment-herz-namen { flex-basis: 100%; margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.7); color: #fff; font-size: 14px; line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.moment-herz-namen.hidden { display: none; }
.moment-herz-gross { position: absolute; left: 50%; top: 50%; z-index: 5; font-size: 96px; color: #fb7185; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.5); filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.moment-herz-gross.moment-herz-pop { animation: momentHerzPop calc(var(--takt-wechsel) * 3) var(--kurve-raus); }
@keyframes momentHerzPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }
.chronik-herz { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: #e11d48; }
.chronik-herz-ecke { position: absolute; right: 6px; bottom: 4px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.9); }

/* Nr. 157: Daumen im Stallgeflüster – klein, ohne Kasten */
.notiz-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }  /* Nr. 180: Autor · Zeit links, Daumen rechts am Rand */
.notiz-fuss > p { min-width: 0; }
.notiz-daumen-zeile { display: flex; align-items: center; gap: 0; margin: -10px -6px -10px 0; flex-shrink: 0; }  /* negativer Rand: 44-px-Trefferfläche macht die Blase nicht höher */
.notiz-daumen { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; filter: grayscale(1); opacity: .55; }
.notiz-daumen[data-zustand="an"] { filter: none; opacity: 1; }
.notiz-daumen[data-zustand="eigen"] { filter: none; opacity: .8; min-width: 28px; }
.notiz-daumen-zahl { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 800; }
.notiz-daumen-namen { margin: 0 0 2px; overflow-wrap: anywhere; }
.bs-blase:has([data-action="notizLoeschen"]) .notiz-daumen-zeile { margin-top: 0; }  /* Nr. 257 A4: sonst überdeckt der Daumen den unteren Rand von „Löschen“ */

/* Nr. 143: Wochenansicht im Pferde-Kalender (eine Zeile je Tag, Farben nur über --st-*) */
.pk-liste { display: flex; flex-direction: column; gap: 6px; }
.pk-tag { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: stretch; background: var(--st-flaeche); border: 1px solid var(--st-linie); border-radius: 14px; min-height: 48px; }
.pk-tag.pk-heute { border-color: var(--st-haupt); background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.pk-zeile { position: absolute; inset: 0; border-radius: 14px; }
.pk-kopf { position: relative; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; color: var(--st-text-gedaempft); font-size: var(--st-groesse-neben); line-height: 1.1; }
.pk-heute .pk-kopf { color: inherit; }
.pk-wt { text-transform: uppercase; font-size: .8125rem; letter-spacing: .04em; }
.pk-nr { font-weight: var(--st-gewicht-fett); font-size: var(--st-groesse-text); color: var(--st-text); }
.pk-heute .pk-nr { color: inherit; }
.pk-inhalt { position: relative; pointer-events: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 0; min-width: 0; }
.pk-eintrag { position: relative; pointer-events: auto; cursor: pointer; width: 100%; text-align: left; background: none; border: 0; padding: 2px 0; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--st-groesse-klein); line-height: 1.3; color: var(--st-text); }
.pk-eintrag > i { width: 14px; text-align: center; flex: none; }
.pk-geplant { color: var(--st-text-gedaempft); font-style: italic; }
.pk-termin { color: var(--st-text); }
.pk-mehr { pointer-events: auto; text-align: left; background: none; border: 0; min-height: 24px; }
.pk-ruhe, .pk-mehr { font-size: var(--st-groesse-klein); color: var(--st-text-gedaempft); }
.pk-blitz { outline: 3px solid var(--st-haupt); outline-offset: 2px; border-radius: 12px; }
.pk-plus { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; color: var(--st-text-gedaempft); }
/* === Kinder-Leiter (Nr. 154) === eigene Variablen, kein Tailwind: der Export für die Hofwebseite nimmt genau diesen Block (tools/kinder-leiter-export.py) */
.kl-wurzel { --kl-papier: #fffaf0; --kl-text: #3a2a14; --kl-gedaempft: #6b5330; --kl-rand: #e3c98a; --kl-akzent: #2f8a3e; --kl-akzent-text: #ffffff; --kl-himmel-o: #bfe3f7; --kl-himmel-u: #eaf7e0; --kl-sonne: #ffd84d; --kl-wolke: rgba(255, 255, 255, .86); --kl-berg-a: #aad092; --kl-berg-b: #8fbd75; --kl-stall: #c78d52; --kl-dach: #8b5629; --kl-wiese: #78af5c; --kl-zaun: #fbfaf6; --kl-karte: #ffffff; --kl-richtig: #d9f2d6; --kl-richtig-rand: #2f8a3e; --kl-zweit: #fff3d1;
    display: flex; flex-direction: column; gap: 12px; width: 100%; box-sizing: border-box; max-width: 520px; margin: 0 auto; color: var(--kl-text); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
html.kl-dunkel .kl-wurzel, html.dark .kl-wurzel { --kl-papier: #2b2418; --kl-text: #fbeed0; --kl-gedaempft: #d9c79a; --kl-rand: #7a6232; --kl-akzent: #5cc06a; --kl-akzent-text: #10260f; --kl-himmel-o: #28406b; --kl-himmel-u: #2f4a3a; --kl-sonne: #f5d87e; --kl-wolke: rgba(210, 224, 245, .25); --kl-berg-a: #344d38; --kl-berg-b: #263b2b; --kl-stall: #7c522c; --kl-dach: #4d321a; --kl-wiese: #2e5332; --kl-zaun: #6b5a44; --kl-karte: #3a3022; --kl-richtig: #24502b; --kl-richtig-rand: #6fd07c; --kl-zweit: #4a3b1f; }
.kl-titel { text-align: center; font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin: 0; }
.kl-frage { text-align: center; font-size: 1.6rem; font-weight: 800; line-height: 1.25; margin: 0; padding: 14px 12px; border-radius: 18px; background: var(--kl-papier); border: 2px solid var(--kl-rand); overflow-wrap: anywhere; }
.kl-stufe { text-align: center; font-size: 1rem; font-weight: 700; color: var(--kl-gedaempft); margin: 0; }
.kl-klein { text-align: center; font-size: 1rem; line-height: 1.4; color: var(--kl-gedaempft); margin: 0; }
.kl-spruch { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--kl-zweit); border: 2px solid var(--kl-rand); font-size: 1.1rem; font-weight: 600; text-align: center; }
.kl-spruch-name { font-weight: 800; color: var(--kl-akzent); margin-right: 4px; }
.kl-spruch-name::after { content: ':'; }
.kl-szene { position: relative; height: 200px; border-radius: 20px; overflow: hidden; background: linear-gradient(var(--kl-himmel-o), var(--kl-himmel-u)); border: 2px solid #2b2622; }
.kl-kulisse { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kl-sonne-schein { fill: var(--kl-sonne); opacity: .28; }
.kl-sonne { fill: var(--kl-sonne); stroke: #2b2622; stroke-width: 1.5; }
.kl-wolke { fill: var(--kl-wolke); }
.kl-berg-a { fill: var(--kl-berg-a); }
.kl-berg-b { fill: var(--kl-berg-b); }
.kl-stall-wand { fill: var(--kl-stall); stroke: #2b2622; stroke-width: 1.8; stroke-linejoin: round; }
.kl-stall-dach { fill: var(--kl-dach); stroke: #2b2622; stroke-width: 1.8; stroke-linejoin: round; }
.kl-stall-luke { fill: #4a2f17; stroke: #2b2622; stroke-width: 1.5; }
.kl-stall-balken { stroke: #2b2622; stroke-width: 2.2; }
.kl-wiese { fill: var(--kl-wiese); stroke: #2b2622; stroke-width: 1.8; }
.kl-zaun-bg rect { fill: var(--kl-zaun); stroke: #2b2622; stroke-width: 1.5; }
.kl-heu { position: absolute; left: -6%; right: 48%; bottom: -26px; height: 132px; border-radius: 50% 50% 0 0; border-top: 2px solid #2b2622; background: repeating-linear-gradient(100deg, #e8c65a 0 7px, #dcb446 7px 14px); opacity: .94; }
.kl-leiter { position: absolute; left: 16px; top: 8px; bottom: 8px; width: 74px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; border-left: 5px solid #8a5a2b; border-right: 5px solid #8a5a2b; border-radius: 3px; box-shadow: 0 0 0 1.5px #2b2622; box-sizing: border-box; }
.kl-sprosse { display: flex; align-items: center; justify-content: space-between; height: 22px; padding: 0 3px; background: linear-gradient(transparent 34%, #2b2622 34% 39%, #b4783b 39% 61%, #2b2622 61% 66%, transparent 66%); font-size: .75rem; font-weight: 800; }
.kl-sprosse[data-zustand="aktuell"] { background: linear-gradient(transparent 26%, #2b2622 26% 32%, #e0ab3e 32% 68%, #2b2622 68% 74%, transparent 74%); }
.kl-nr { min-width: 16px; height: 16px; border-radius: 8px; border: 1.2px solid #2b2622; text-align: center; line-height: 14px; background: #fff6df; color: #5a3a1c; font-size: .75rem; }
.kl-sprosse[data-zustand="erreicht"] .kl-nr { background: #f2c94c; color: #2b2622; }
.kl-sticker-klein { font-size: 1.1rem; line-height: 1; }
.kl-karo { position: absolute; left: 108px; bottom: calc(6px + var(--kl-n, 0) * 10px); transition: bottom .6s ease, transform .35s ease; line-height: 0; }
.kl-szene[data-phase="richtig"] .kl-karo, .kl-szene[data-phase="ende"] .kl-karo { transform: translateY(-6px) rotate(-3deg); }
.kl-karo svg { width: 92px; height: auto; max-height: 100px; }
.kl-zuschauer { position: absolute; right: 8px; bottom: 6px; display: flex; align-items: flex-end; gap: 6px; line-height: 0; }
.kl-zuschauer svg { width: 40px; height: auto; max-height: 56px; transition: transform .35s ease; }
.kl-szene[data-phase="richtig"] .kl-zuschauer svg, .kl-szene[data-phase="ende"] .kl-zuschauer svg { transform: translateY(-4px); }
.kl-wurzel[data-ruhig] .kl-karo, .kl-wurzel[data-ruhig] .kl-zuschauer svg { transition: none; transform: none; }
.kl-karten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kl-karte { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; min-height: 160px; padding: 10px 6px 8px; border-radius: 18px; border: 3px solid var(--kl-rand); background: var(--kl-karte); color: var(--kl-text); font: inherit; cursor: pointer; transition: opacity .2s, transform .15s; }
.kl-karte:active:not(:disabled) { transform: scale(var(--tipp-skala)); }
.kl-karte:focus-visible, .kl-knopf:focus-visible, .kl-knopf-zweit:focus-visible, .kl-einstieg:focus-visible { outline: 3px solid var(--kl-akzent); outline-offset: 2px; }
.kl-bild { display: flex; align-items: center; justify-content: center; width: 100%; height: 112px; line-height: 1; }
.kl-bild-tier svg { width: auto; height: 100%; max-width: 100%; }
.kl-bild-emoji { font-size: 4.2rem; }
.kl-bild-zahl { font-size: 5rem; font-weight: 800; color: var(--kl-akzent); }
.kl-bild-farbe i { display: block; width: 104px; height: 104px; border-radius: 50%; border: 4px solid var(--kl-text); box-sizing: border-box; }
.kl-text { font-size: 1.25rem; font-weight: 800; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.kl-karte[data-zustand="falsch"] { opacity: .35; border-style: dashed; cursor: default; }
.kl-karte[data-zustand="weg"] { display: none; }
.kl-karte[data-zustand="richtig"] { background: var(--kl-richtig); border-color: var(--kl-richtig-rand); }
.kl-wurzel[data-zustand="richtig"] .kl-karte[data-zustand="normal"] { opacity: .5; }
.kl-knopf, .kl-knopf-zweit { display: block; width: 100%; min-height: 52px; border-radius: 16px; font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.kl-knopf { background: var(--kl-akzent); color: var(--kl-akzent-text); border: 0; box-shadow: 0 4px 0 rgba(0,0,0,.22); }
.kl-knopf-zweit { background: var(--kl-zweit); color: var(--kl-text); border: 2px solid var(--kl-rand); }
.kl-gross { min-height: 68px; font-size: 1.5rem; }
.kl-hilfe { min-height: 56px; }
.kl-sticker { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; border-radius: 18px; background: var(--kl-zweit); border: 2px solid var(--kl-rand); }
.kl-sticker-gross { font-size: 3.2rem; line-height: 1; }
.kl-sticker-text { font-size: 1.3rem; font-weight: 800; }
.kl-sticker-reihe { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 2rem; }
.kl-sticker-reihe .kl-sticker-klein { font-size: 2.2rem; }
.kl-name-feld { display: flex; flex-direction: column; gap: 6px; }
.kl-eingabe { width: 100%; min-height: 56px; box-sizing: border-box; padding: 8px 14px; border-radius: 14px; border: 3px solid var(--kl-rand); background: var(--kl-karte); color: var(--kl-text); font: inherit; font-size: 1.4rem; font-weight: 700; text-align: center; }
.kl-urkunde { display: flex; justify-content: center; }
.kl-urkunde-svg { width: 100%; max-width: 300px; height: auto; border-radius: 10px; box-shadow: 0 6px 18px rgba(60,40,10,.3); }
.kl-einstieg { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 2px solid #e3b25a; background: #fff1c9; color: #5a3a10; text-align: left; font: inherit; cursor: pointer; }
.kl-einstieg-bild { font-size: 1.8rem; line-height: 1; }
.kl-einstieg-titel { display: block; font-weight: 800; }
.kl-einstieg-unter { display: block; font-size: .95rem; font-weight: 400; }
.kl-einstieg-gross { min-height: 96px; padding: 14px 16px; border-width: 3px; font-size: 1.35rem; background: #ffe39a; box-shadow: 0 5px 0 rgba(150,100,20,.3); }
.kl-einstieg-gross .kl-einstieg-bild { font-size: 3rem; }
html.dark .kl-einstieg { background: #4a3b1f; border-color: #a77f33; color: #fbeed0; }
/* === Ende Kinder-Leiter === */
/* Nr. 158 D: „Warum? Erklär's mir“ unter Karolines Auflösung */
.quiz-erkl { margin-top: 6px; }
.quiz-erkl:empty { display: none; }
.quiz-erkl .quiz-text-knopf { min-height: 44px; padding: 0; font-size: 15px; }
.quiz-erkl-text, .quiz-erkl-denkt { margin: 6px 0 0 !important; font-size: 15px; line-height: 1.4; }
.quiz-erkl-denkt { font-style: italic; opacity: .8; }
.quiz-erkl-melden { font-size: 13px !important; font-weight: 600; opacity: .85; }

/* Nr. 131 Tiere lebendiger: Grundblick, Ohrzucken, Neigen, Atmen. Nur transform/translate/scale/opacity; aus bei „Bewegung reduzieren“, tiere-aus und in der kompakten Leiste (dort nur die stillen Teile A–C) */
.blick { translate: calc(var(--gx, 0) * var(--bm, 3px)) calc(var(--gy, 0) * var(--bm, 3px)); transition: translate .3s ease; }
svg.schaut-vor .blick { translate: 0 0; }
svg[data-blick-x] .blick { translate: calc(var(--blick-x, 0) * var(--bm, 3px)) calc(var(--blick-y, 0) * var(--bm, 3px)); }
.kopf-neig { transition: transform var(--takt-wechsel) var(--kurve-raus), rotate var(--takt-wechsel) var(--kurve-raus); }  /* Nr. 289 C: der Kopf führt … */
.zaun-tier svg[data-tier] { --koerper-lag: 90ms; transition: transform var(--takt-wechsel) var(--kurve-weich) var(--koerper-lag); }  /* … der Körper folgt 60–120 ms später (Nicken, Umschauen, Erschrecken, Abschütteln) */
.ohr-zuck[data-ohr="L"] { --zw: -9deg; }
.ohr-zuck[data-ohr="R"] { --zw: 9deg; }
svg.ohr-L .ohr-zuck[data-ohr="L"], svg.ohr-R .ohr-zuck[data-ohr="R"] { animation: ohr-zuck calc(var(--takt-tipp) * 2) var(--kurve-weich) 1; }
@keyframes ohr-zuck { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(var(--zw)); } 70% { transform: rotate(calc(var(--zw) * -0.3)); } }
.zaun-tier svg[style*="--atem-t"] { transform-origin: 50% 100%; animation: zaun-atmen calc(var(--atem-t, 5s) * var(--tier-tempo, 1)) var(--kurve-weich) var(--atem-v, 0s) infinite; }
@keyframes zaun-atmen { 0%, 100% { scale: 1 1; } 50% { scale: 1.008 1.012; } }
svg.maul-kaut .maul { animation: maul-kauen .38s var(--kurve-weich) 4; }
@keyframes maul-kauen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
html.tiere-aus .zaun-tier svg[style*="--atem-t"], #kopfzeile.kopf-fest .zaun-tier svg[style*="--atem-t"] { animation: none; }
html.tiere-aus :is(.ohr-zuck, .maul), #kopfzeile.kopf-fest :is(.ohr-zuck, .maul) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .zaun-tier svg[style*="--atem-t"], .ohr-zuck, .maul { animation: none !important; } .blick, .kopf-neig { transition: none; } }

/* Nr. 131 D–G: Schnauben, Halm kauen, Fransen, Schmetterling, Blatt */
.zaun-schnaub { animation: zaun-atem calc(var(--takt-tipp) * 11) var(--kurve-raus) 1; }
.halm { transform-box: view-box; }
.halm-kaut { animation: halm-kauen calc(var(--takt-tipp) * 3) var(--kurve-weich) 3; }
@keyframes halm-kauen { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(7deg); } }
:where(.zaun-tier[data-name="Balou"]) .wind-teil { --wind-von: -1.2; --wind-bis: 1.6; animation: wind-pendeln calc(4.6s * var(--wind-t, 1)) var(--kurve-weich) var(--wind-v, 0s) infinite alternate; }
.zaun-schmetterling, .zaun-blatt { position: absolute; pointer-events: none; z-index: 7; opacity: 0; }
.zaun-schmetterling { animation: zaun-schmetterling calc(var(--takt-auftritt) * 15) var(--kurve-weich) 1 both; }
@keyframes zaun-schmetterling { 0% { opacity: 0; translate: var(--von-x, -70px) -26px; } 15% { opacity: 1; } 35%, 70% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: calc(var(--von-x, -70px) * -1) -30px; } }
.schmetterling-fluegel { transform-box: fill-box; transform-origin: center; animation: schmetterling-schlag calc(var(--takt-wechsel) * 2) var(--kurve-weich) infinite alternate; }
@keyframes schmetterling-schlag { from { scale: 1 1; } to { scale: .55 1; } }
.zaun-blatt { animation: zaun-blatt calc(var(--takt-wechsel) * 28) var(--kurve-weich) 1 both; }
@keyframes zaun-blatt { 0% { opacity: 0; translate: 6px -20px; rotate: 0deg; } 20% { opacity: 1; } 35%, 75% { opacity: 1; translate: 0 0; rotate: -18deg; } 100% { opacity: 0; translate: -10px 40px; rotate: 70deg; } }
html.tiere-aus :is(.zaun-schmetterling, .zaun-blatt, .zaun-schnaub), #kopfzeile.kopf-fest :is(.zaun-schmetterling, .zaun-blatt, .zaun-schnaub) { display: none; }
@media (prefers-reduced-motion: reduce) { :where(.zaun-tier[data-name="Balou"]) .wind-teil, .halm-kaut, .schmetterling-fluegel { animation: none !important; } .zaun-schmetterling, .zaun-blatt, .zaun-schnaub { display: none; } }
/* Nr. 131 am Stall-Tablet: Bildschirmschoner – Ohrzucken in Abständen, Halm; Haltung, Blick und Lächeln stecken im SVG (A–C) */
#tabletSchoner svg[data-tier] .ohr-zuck { animation: ohr-schleife calc(var(--takt-wechsel) * 52) var(--kurve-weich) infinite; }
#tabletSchoner svg[data-tier]:nth-of-type(odd) .ohr-zuck { animation-delay: -5.5s; animation-duration: calc(var(--takt-auftritt) * 28); }
#tabletSchoner svg[data-tier] .halm { animation: halm-schleife calc(var(--takt-auftritt) * 32) var(--kurve-weich) infinite; }
@keyframes ohr-schleife { 0%, 5%, 100% { transform: rotate(0deg); } 2% { transform: rotate(var(--zw)); } 3.5% { transform: rotate(calc(var(--zw) * -0.3)); } }
@keyframes halm-schleife { 0%, 8%, 100% { transform: rotate(0deg); } 2%, 6% { transform: rotate(7deg); } 4% { transform: rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { #tabletSchoner svg[data-tier] :is(.ohr-zuck, .halm) { animation: none; } }
.zaun-tier[data-hinter-blase] svg[style*="--atem-t"] { animation: none; }  /* Nr. 131: das Tier hinter der Blase hält seine Höhe – die Prüfung „nichts über Titel und Gruß“ misst auf den Pixel */

/* Nr. 175 Teil A: Vollbild-Karte zum Ritt (js/ritt-karte-karte.js). Eigene Farben, hell und Nachtblau; Ebene wie Bildansicht, Blätter (96) liegen darüber. */
#rittKarte { position: fixed; inset: 0; background: #eef0e6; color: #1f2937; display: flex; flex-direction: column; --rk-flaeche: #ffffff; --rk-rand: #d6d3c8; --rk-text: #1f2937; --rk-neben: #4b5563; --rk-akzent: #047857; }
html.dark #rittKarte { background: #12161d; color: #e5e9f2; --rk-flaeche: #1b2230; --rk-rand: #343d52; --rk-text: #e5e9f2; --rk-neben: #aab3c5; --rk-akzent: #6ee7b7; }
#rittKarte .rk-kopf { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; pointer-events: none; }
#rittKarte .rk-kopf > * { pointer-events: auto; }
#rittKarte .rk-knopf { min-width: 44px; min-height: 44px; border-radius: 22px; border: 1px solid var(--rk-rand); background: var(--rk-flaeche); color: var(--rk-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; font: inherit; font-weight: 700; font-size: .875rem; box-shadow: 0 1px 4px rgb(0 0 0 / .25); cursor: pointer; }
#rittKarte .rk-knopf[aria-pressed="true"], #rittKarte .rk-knopf[data-aktiv="1"] { border-color: var(--rk-akzent); color: var(--rk-akzent); }
#rittKarte .rk-titel { flex: 1; min-width: 0; padding: 8px 14px; border-radius: 22px; background: var(--rk-flaeche); border: 1px solid var(--rk-rand); font-weight: 700; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
#rittKarte .rk-flaeche { position: absolute; inset: 0; }
#rittKarte .rk-zoom { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; gap: 8px; }
#rittKarte .rk-unten { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
#rittKarte .rk-unten > * { pointer-events: auto; }
#rittKarte .rk-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#rittKarte .rk-karte { background: var(--rk-flaeche); border: 1px solid var(--rk-rand); border-radius: 14px; padding: 10px 12px; font-size: .875rem; line-height: 1.4; box-shadow: 0 1px 6px rgb(0 0 0 / .25); }
#rittKarte .rk-neben { color: var(--rk-neben); font-size: .75rem; }
#rittKarte .rk-namen { align-self: flex-end; font-size: .75rem; padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--rk-flaeche) 85%, transparent); color: var(--rk-neben); max-width: 100%; }
#rittKarte .rk-namen a { text-decoration: underline; color: inherit; }
#rittKarte .rk-skizze { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 80px 16px 160px; color: var(--rk-akzent); text-align: center; }
#rittKarte .rk-verlauf { display: inline-block; width: 64px; height: 8px; border-radius: 4px; vertical-align: middle; border: 1px solid var(--rk-rand); }
#rittKarte .rk-folie { padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--rk-flaeche) 88%, transparent); color: var(--rk-text); }
#rittKarte .rk-legende .rk-knopf { min-height: 32px; margin-left: 8px; padding: 0 10px; font-size: .75rem; }
#rittKarte .rk-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: baseline; }
#rittKarte[data-zustand="laedt"] .rk-flaeche { opacity: .4; }
@media (prefers-reduced-motion: reduce) { #rittKarte * { transition: none !important; animation: none !important; } }
/* Nr. 220 A: ruhige Kartenvorschau (Detail-Fenster, Auswertung) über der Skizze; die Skizze bleibt der Rückfall (js/ritt-karte-karte.js, rittKarteVorschau) */
.rk-vorschau-box { position: relative; overflow: hidden; }
.rk-vorschau-box > .rk-vorschau { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; border-radius: inherit; background: #eef0e6; transition: opacity .2s; }
html.dark .rk-vorschau-box > .rk-vorschau { background: #12161d; }
.rk-vorschau-box > .rk-vorschau[data-zustand="karte"] { opacity: 1; }
.rk-vorschau .maplibregl-canvas { border-radius: inherit; }
.rk-vorschau-namen { position: absolute; right: 4px; bottom: 3px; z-index: 2; max-width: calc(100% - 8px); font-size: .75rem; line-height: 1.3; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .88); color: #334155; pointer-events: none; }
html.dark .rk-vorschau-namen { background: rgba(18, 22, 29, .88); color: #cbd5e1; }
.ra-strecke-box { cursor: pointer; min-height: 120px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .rk-vorschau-box > .rk-vorschau { transition: none; } }

/* Nr. 175 C: Griffe zum Zuschneiden der Strecke (Anfang A, Ende E) */
#rittKarte .rk-griff { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #ffffff; background: #047857; color: #ffffff; font: inherit; font-weight: 800; font-size: .875rem; box-shadow: 0 1px 5px rgb(0 0 0 / .45); cursor: grab; touch-action: none; padding: 0; }
#rittKarte .rk-griff[data-griff="bis"] { background: #be123c; }

/* Auftrag gesundheit-termine-aufraeumen: Pferdefenster „Gesundheit & Termine“ (Liste in zwei Gruppen, Kacheln, flache Knöpfe) */
.bs-knopf-flach { min-height: 40px; padding: 0 14px; font-size: var(--st-groesse-neben); }
.bs-knopf-flach { position: relative; }
.bs-knopf-flach::after { content: ''; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }  /* Nr. 257 A4: 44 px Tippfläche, Aussehen bleibt 40 px */
.gt-gruppe + .gt-gruppe { margin-top: 10px; }
.gt-ueberschrift { margin: 0 0 4px; font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); color: var(--st-text-gedaempft); text-transform: uppercase; letter-spacing: .04em; }
.gt-zeile { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 0; border-top: 1px solid var(--st-linie); }
.gt-gruppe > .gt-ueberschrift + .gt-zeile { border-top: 0; }
/* Auftrag termine-rahmen (Nr. 193): Termine als gerahmte Karten wie die Termin-Zeile im Planer (gleiche Typ-Farbe `EVENT_TYPES[typ].chip`, Rundung 8 px); Erledigt ruhiger, Archiv-Zeilen (data-archiv) bleiben schlicht */
.gt-zeile:not([data-archiv]) { border-width: 1px; border-style: solid; border-radius: 8px; padding: 4px 8px; margin-bottom: 6px; }
.gt-zeile:not([data-archiv]):last-child { margin-bottom: 0; }
.gt-zeile[data-zustand="ueberfaellig"]:not([data-archiv]) { border-color: var(--st-ton-gefahr-text); }
.gt-zeile[data-zustand="erledigt"]:not([data-archiv]), .gt-zeile[data-zustand="beendet"]:not([data-archiv]) { opacity: .7; }
.gt-datum { width: 48px; flex-shrink: 0; display: flex; flex-direction: column; font-size: var(--st-groesse-neben); font-weight: var(--st-gewicht-fett); color: var(--st-text); line-height: 1.2; }
.gt-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: transparent; border: 0; padding: 4px 0; color: var(--st-text); font-size: var(--st-groesse-text); font-weight: 600; line-height: 1.25; }
.gt-titel-text { overflow-wrap: anywhere; }
button.gt-titel { min-height: 44px; justify-content: center; }  /* Nr. 257 A4: Zeile antippbar mit 44 px */
.gt-klein { font-size: var(--st-groesse-klein); font-weight: 400; color: var(--st-text-gedaempft); }
.gt-chip { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); white-space: nowrap; }
.gt-kasten { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: transparent; }
.gt-kasten i { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--st-text-gedaempft); border-radius: 8px; font-size: .75rem; }
.gt-kasten:active i { color: var(--st-text-gedaempft); }
.gt-zeile[data-zustand="ueberfaellig"] .gt-datum { color: var(--st-ton-gefahr-text); width: auto; min-width: 4.5rem; }  /* „überfällig“ ragt nie in den Titel daneben */
.gt-zeile[data-zustand="ueberfaellig"] .gt-kasten i { border-color: var(--st-ton-gefahr-text); }
.gt-zeile[data-zustand="ueberfaellig"] .gt-datum::after { content: 'überfällig'; font-size: .8125rem; font-weight: 600; }
.gt-zeile[data-zustand="erledigt"] .gt-datum, .gt-zeile[data-zustand="beendet"] .gt-datum, .gt-zeile[data-zustand="erledigt"] .gt-titel, .gt-zeile[data-zustand="beendet"] .gt-titel { color: var(--st-text-gedaempft); font-weight: 400; }
.gt-haken { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--st-text-knopf); font-size: .8125rem; }
.gt-kachel[data-zustand="ueberfaellig"] .gt-status { text-transform: none; }
/* Nr. 247: Gesundheit-Art als Zeile (min. 52 px), ruhige Zeile für den Rest */
.gt-kachel { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; text-align: left; }
.gt-kachel-links { display: flex; flex-direction: column; min-width: 0; }
.gt-kachel .gt-status { flex-shrink: 0; text-align: right; }
.gt-ruhig { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 4px 4px; background: transparent; border: 0; text-align: left; color: var(--st-text-gedaempft); }

/* Nr. 132: Ritt-Ansicht (js/ritt-ansicht.js), Zaunbrett-Stil nach img/ritt-ansicht/vorlage. Farben aus den --st-*-Tokens (Nachtblau folgt von selbst), Gangart-Farben zentral. */
#rittAnsicht { position: fixed; inset: 0; overflow-y: auto; background: var(--st-grund); color: var(--st-text); font-family: var(--st-schrift-text);
    --gang-schritt: #10b981; --gang-trab: #f59e0b; --gang-galopp: #f43f5e; --gang-stand: #b8ad9e; --ra-kontur: var(--st-kontur); }
html.dark #rittAnsicht { --ra-kontur: #5b6573; }
#rittAnsicht .ra-inhalt { max-width: 560px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
#rittAnsicht h1, #rittAnsicht h2, #rittAnsicht h3, #rittAnsicht strong { font-family: var(--st-schrift-titel); }
#rittAnsicht h1 { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
#rittAnsicht h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
#rittAnsicht h3 { margin: 8px 0 0; font-size: 1.0625rem; font-weight: 600; }
#rittAnsicht .ra-neben { font-size: .8125rem; color: var(--st-text-gedaempft); }
#rittAnsicht .ra-kopf { display: flex; align-items: center; gap: 12px; min-height: 48px; }
#rittAnsicht .ra-kopf > div { display: flex; flex-direction: column; gap: 2px; font-size: .8125rem; color: var(--st-text-gedaempft); }
#rittAnsicht .ra-zurueck { width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--ra-kontur); background: var(--st-flaeche); color: var(--st-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#rittAnsicht .ra-szene { display: block; width: 100%; height: auto; border-radius: 24px; border: 2px solid var(--ra-kontur); }
#rittAnsicht .ra-himmel { fill: #d6e9f5; } html.dark #rittAnsicht .ra-himmel { fill: #1e3446; }
#rittAnsicht .ra-huegel { fill: #a9d08a; stroke: var(--ra-kontur); stroke-width: 2; } html.dark #rittAnsicht .ra-huegel { fill: #2f5a40; }
#rittAnsicht .ra-wiese { fill: #86b866; } html.dark #rittAnsicht .ra-wiese { fill: #264a35; }
#rittAnsicht .ra-brett { fill: var(--st-flaeche); stroke: var(--ra-kontur); stroke-width: 2; }
#rittAnsicht .ra-szene-text { font: 600 13px var(--st-schrift-titel); fill: var(--st-text); }
#rittAnsicht .ra-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#rittAnsicht .ra-kachel { background: var(--st-flaeche); border: 2px solid var(--ra-kontur); border-radius: 10px; padding: 10px 8px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#rittAnsicht .ra-kachel-wetter { grid-column: 1 / -1; }
#rittAnsicht .ra-kachel-wetter strong { font-size: 1rem; }
#rittAnsicht .ra-kachel span { font-size: .75rem; color: var(--st-text-gedaempft); }
#rittAnsicht .ra-kachel strong { font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
#rittAnsicht .ra-block { display: flex; flex-direction: column; gap: 12px; }
#rittAnsicht .ra-block > p { margin: 0; }
#rittAnsicht .ra-titelzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#rittAnsicht .ra-strecke, #rittAnsicht .ra-block > svg.ritt-skizze { display: block; width: 100%; height: auto; }
#rittAnsicht .ra-pfad { stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
#rittAnsicht .ra-g-schritt { stroke: var(--gang-schritt); } #rittAnsicht .ra-g-trab { stroke: var(--gang-trab); } #rittAnsicht .ra-g-galopp { stroke: var(--gang-galopp); }
#rittAnsicht .ra-g-stand, #rittAnsicht .ra-g-unklar { stroke: var(--gang-stand); }
#rittAnsicht .ra-start { fill: #16a34a; stroke: var(--ra-kontur); stroke-width: 2; }
#rittAnsicht .ra-legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8125rem; }
#rittAnsicht .ra-legende span { display: flex; align-items: center; gap: 6px; }
#rittAnsicht .ra-chip { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ra-kontur); display: inline-block; }
#rittAnsicht .ra-b-schritt { background: var(--gang-schritt); } #rittAnsicht .ra-b-trab { background: var(--gang-trab); } #rittAnsicht .ra-b-galopp { background: var(--gang-galopp); } #rittAnsicht .ra-b-stand { background: var(--gang-stand); }
#rittAnsicht .ra-balken { display: flex; height: 26px; border: 2px solid var(--ra-kontur); border-radius: 8px; overflow: hidden; }
#rittAnsicht .ra-balken > div + div { border-left: 2px solid var(--ra-kontur); }
#rittAnsicht .ra-tabelle { display: grid; gap: 6px 8px; font-size: .8125rem; align-items: center; }
#rittAnsicht .ra-t5 { grid-template-columns: 1.1fr 1.5fr .8fr .9fr .9fr; } #rittAnsicht .ra-t3 { grid-template-columns: 1.2fr 1fr 1fr; }
#rittAnsicht .ra-t5 > span:not(:nth-child(5n+1)) { text-align: right; } #rittAnsicht .ra-t3 > span:not(:nth-child(3n+1)) { text-align: right; }
#rittAnsicht .ra-t5 > span:nth-child(-n+5), #rittAnsicht .ra-t3 > span:nth-child(-n+3) { color: var(--st-text-gedaempft); }
#rittAnsicht .ra-t5 > strong, #rittAnsicht .ra-t3 > strong { font-size: .8125rem; }
/* Nr. 135: Longieren (Zirkel je Hand, Pausen) und Spaziergang (Strick-Szene) */
#rittAnsicht .ra-zirkel-szene { fill: none; stroke: var(--ra-kontur); stroke-width: 2; stroke-dasharray: 6 5; }
#rittAnsicht .ra-longe { stroke: var(--ra-kontur); stroke-width: 2; fill: none; }
#rittAnsicht .ra-person { fill: var(--st-flaeche); stroke: var(--ra-kontur); stroke-width: 2; }
#rittAnsicht .ra-zirkel-paar { display: flex; justify-content: space-around; align-items: flex-end; }
#rittAnsicht .ra-zirkel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#rittAnsicht .ra-bogen-leer { fill: none; stroke: var(--st-kontur); stroke-width: 12; opacity: .35; }
#rittAnsicht .ra-bogen { fill: none; stroke-width: 12; }
#rittAnsicht .ra-bg-schritt { stroke: var(--gang-schritt); } #rittAnsicht .ra-bg-trab { stroke: var(--gang-trab); } #rittAnsicht .ra-bg-galopp { stroke: var(--gang-galopp); }
#rittAnsicht .ra-zirkel-zahl { font: 700 26px var(--st-schrift-titel); fill: var(--st-text); }
#rittAnsicht .ra-zirkel-wort { font-size: 12px; fill: var(--st-text-gedaempft); }
#rittAnsicht .ra-pausen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#rittAnsicht .ra-pausen li { display: flex; gap: 12px; align-items: baseline; font-size: .875rem; }
#rittAnsicht .ra-pausen li span { color: var(--st-text-gedaempft); min-width: 3.5em; }
#rittAnsicht .ra-zaun { display: flex; align-items: center; }
#rittAnsicht .ra-pfosten { width: 10px; height: 46px; background: var(--st-flaeche); border: 2px solid var(--ra-kontur); border-radius: 3px; flex: none; }
#rittAnsicht .ra-bretter { flex: 1; display: flex; height: 24px; border-top: 2px solid var(--ra-kontur); border-bottom: 2px solid var(--ra-kontur); min-width: 0; }
#rittAnsicht .ra-brett-z { padding: 0; border: 0; border-left: 2px solid var(--ra-kontur); min-width: 4px; position: relative; font: inherit; }
#rittAnsicht .ra-brett-z:first-child { border-left: 0; }
#rittAnsicht button.ra-brett-z { cursor: pointer; }
#rittAnsicht button.ra-brett-z::after { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
#rittAnsicht .ra-brett-z[data-gewaehlt="1"] { outline: 3px solid var(--ra-kontur); outline-offset: 2px; z-index: 1; }
#rittAnsicht .ra-zeiten { display: flex; justify-content: space-between; font-size: .75rem; color: var(--st-text-gedaempft); padding: 0 10px; }
#rittAnsicht .ra-korrektur { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 2px dashed var(--st-linie); font-size: .8125rem; }
#rittAnsicht .ra-korrektur > div { display: flex; gap: 8px; flex-wrap: wrap; }
#rittAnsicht .ra-wahl { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--ra-kontur); background: var(--st-flaeche); color: var(--st-text); font: 600 .875rem var(--st-schrift-text); cursor: pointer; }
#rittAnsicht .ra-wahl[aria-pressed="true"] { background: var(--st-text); color: var(--st-flaeche); }
#rittAnsicht .ra-hufe { display: flex; justify-content: space-around; align-items: flex-end; }
#rittAnsicht .ra-huf { display: flex; flex-direction: column; align-items: center; gap: 6px; } #rittAnsicht .ra-huf strong { font-size: 1.125rem; }
#rittAnsicht .ra-huf-leer, #rittAnsicht .ra-huf-voll { fill: none; stroke-width: 14; stroke-linecap: round; }
#rittAnsicht .ra-huf-leer { stroke: var(--st-linie); } #rittAnsicht .ra-huf-voll { stroke: var(--st-haupt); }
#rittAnsicht .ra-pillen { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8125rem; }
#rittAnsicht .ra-pillen span { padding: 6px 10px; border-radius: 14px; background: var(--st-flaeche-gedaempft); }
#rittAnsicht .ra-am-stueck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#rittAnsicht .ra-am-stueck > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 3px solid; } #rittAnsicht .ra-am-stueck span { font-size: .75rem; color: var(--st-text-gedaempft); }
#rittAnsicht .ra-b-trab-oben { border-color: var(--gang-trab); } #rittAnsicht .ra-b-galopp-oben { border-color: var(--gang-galopp); }
#rittAnsicht .ra-puls { width: 100%; height: auto; } #rittAnsicht .ra-puls polyline { stroke: #c0392b; stroke-width: 2.5; stroke-linejoin: round; }
#rittAnsicht .ra-kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: .8125rem; } #rittAnsicht .ra-kennzahlen > div { display: flex; flex-direction: column; } #rittAnsicht .ra-kennzahlen span { color: var(--st-text-gedaempft); }
#rittAnsicht .ra-fuss { gap: 8px; } #rittAnsicht .ra-knoepfe { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
#rittAnsicht .ra-wiewars-zeile { background: var(--st-flaeche); border: 2px solid var(--ra-kontur); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
#rittAnsicht .ra-stimmung { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 10px; border-radius: 999px; font-size: .875rem; font-weight: 600; background: var(--st-flaeche-gedaempft); color: var(--st-text); }
#rittAnsicht .ra-stimmung-gut { background: #ecfdf5; color: #047857; } html.dark #rittAnsicht .ra-stimmung-gut { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
#rittAnsicht .ra-stimmung-mittel { background: #fffbeb; color: #b45309; } html.dark #rittAnsicht .ra-stimmung-mittel { background: rgba(245, 158, 11, .18); color: #fcd34d; }
#rittAnsicht .ra-stimmung-schlecht { background: #fff1f2; color: #be123c; } html.dark #rittAnsicht .ra-stimmung-schlecht { background: rgba(244, 63, 94, .18); color: #fda4af; }
#rittAnsicht .ra-wiewars-text { margin: 0; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
#rittAnsicht .ra-foto-knopf { display: block; width: 100%; min-height: 44px; padding: 0; border-radius: 14px; border: 2px solid var(--ra-kontur); overflow: hidden; background: var(--st-flaeche); cursor: pointer; }
#rittAnsicht .ra-foto-knopf img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
#rittAnsicht .ra-loeschen { color: var(--st-fehler, #b91c1c); } html.dark #rittAnsicht .ra-loeschen { color: #fda4af; }
@media (prefers-reduced-motion: reduce) { #rittAnsicht * { animation: none !important; transition: none !important; } }

.desktop-suche-btn { display: none; }

/* Nr. 121: Laptop-Breite. Alles nur ab 900 px; darunter (Handy) bleibt jede Zeile wie sie war. Das Stall-Tablet blendet #inhalt ohnehin aus. */
@media (min-width: 900px) {
    body:not(.tablet-modus) { padding-bottom: 2rem; }
    body:not(.tablet-modus) #inhalt { margin-left: 212px; max-width: none; }
    body[data-heuleiter="weg"] #inhalt { margin-left: 0; }
    body:not(.tablet-modus) #inhalt > * { max-width: 960px; margin-left: auto; margin-right: auto; }
    body:not(.tablet-modus) #untereLeiste { top: 0; bottom: 0; left: 0; right: auto; width: 212px; border-top: 0; border-right: 1px solid var(--st-linie); z-index: 25; padding: calc(var(--kopf-h) + 14px) 0 72px; transition: padding-top var(--takt-wechsel) var(--kurve-raus); }
    body:not(.tablet-modus):has(#kopfzeile.kopf-fest) #untereLeiste { padding-top: calc(var(--kopf-fest) + 14px); }
    body:not(.tablet-modus) #untereLeiste > div { max-width: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 0 12px; }
    body:not(.tablet-modus) #untereLeiste > div > button { flex: none; width: 100%; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 12px; min-height: 44px; border-radius: 12px; }
    body:not(.tablet-modus) #untereLeiste > div > button > span { margin-top: 0; }
    body:not(.tablet-modus) #untereLeiste > div > button > i { width: 24px; height: 24px; border-radius: 8px; }
    body:not(.tablet-modus) #untereLeiste > div > button[aria-current="page"] { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-weight: 700; }
    body:not(.tablet-modus) #untereLeiste > div > button[aria-current="page"] > i { background: transparent; color: inherit; }
    body:not(.tablet-modus) #untereLeiste > div > button:not([aria-current="page"]):hover { background: var(--st-flaeche-gedaempft); }
    body:not(.tablet-modus) #desktopSucheBtn { display: inline-flex; position: fixed; left: 12px; bottom: 16px; width: 188px; min-height: 44px; z-index: 26; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: var(--st-flaeche-gedaempft); border: 1px solid var(--st-linie); color: var(--st-text-gedaempft); font-size: var(--st-groesse-klein); font-weight: 600; transition: background var(--takt-tipp) var(--kurve-raus), color var(--takt-tipp) var(--kurve-raus); }
    body:not(.tablet-modus) #desktopSucheBtn:hover { color: var(--st-text); }
    body:not(.tablet-modus) .desktop-kbd { font-family: inherit; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--st-flaeche); border: 1px solid var(--st-linie); color: var(--st-text-gedaempft); }
    /* Mehr-Seiten ohne zwei Spalten: Lesebreite begrenzt (keine Fließtext-Zeile über ~90 Zeichen) */
    body:not(.tablet-modus) #viewRoutine { max-width: 44rem; margin-left: auto; margin-right: auto; }
    body:not(.tablet-modus) #viewRoutine:has([data-subtab="hofkosten"]:not(.hidden), [data-subtab="vereinbarungen"]:not(.hidden), [data-subtab="hofuebersicht"]:not(.hidden), [data-subtab="protokoll"]:not(.hidden), #einstStart:not(.hidden)) { max-width: none; }
    /* Zwei Spalten: links Übersicht und Bedienung, rechts Liste oder Einzelheit */
    .lz:not(.hidden) { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; }
    .lz > * { margin-top: 0 !important; }
    .lz > .lz-l { grid-column: 1; }
    .lz > .lz-r { grid-column: 2; }
    .lz > .lz-r.border-t { border-top-width: 0; padding-top: 0; }
    .lz > :not(.lz-l):not(.lz-r) { grid-column: 1 / -1; }
    #hofkostenInhalt, #vereinbarungenInhalt, #hofUebersichtInhalt { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; }
    #hofkostenInhalt > *, #vereinbarungenInhalt > *, #hofUebersichtInhalt > * { margin-top: 0 !important; }
    #hofkostenInhalt > .lz-l, #vereinbarungenInhalt > .lz-l, #hofUebersichtInhalt > .lz-l { grid-column: 1; }
    #hofkostenInhalt > .lz-r, #vereinbarungenInhalt > .lz-r, #hofUebersichtInhalt > .lz-r { grid-column: 2; }
    #hofkostenInhalt > :not(.lz-l):not(.lz-r), #vereinbarungenInhalt > :not(.lz-l):not(.lz-r), #hofUebersichtInhalt > :not(.lz-l):not(.lz-r) { grid-column: 1 / -1; }
    /* Einstellungen: Liste in zwei Spalten */
    #einstListe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; }
    #einstListe > * { margin-top: 0 !important; }
    /* Pferde und Dashboard: Karten im Raster */
    #horseList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; align-items: start; }
    #horseList > * { margin-top: 0 !important; }
    #horseList > :is(h3, p, section) { grid-column: 1 / -1; }
    #viewDashboard:not(.hidden) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
    #viewDashboard > * { margin-top: 0 !important; }
    #viewDashboard > :not(.dashboard-module) { grid-column: 1 / -1; }
}
/* Nr. 132: gezeichnetes Pferd, Mitreiter-Pferde und Blue in der Szene; „Tiere aus“ und „Bewegung reduzieren“ stoppen nur die Animation (kopf-tiere), die Werte bleiben */
#rittAnsicht .ra-erfolg { margin: -10px 0 0; font-family: var(--st-schrift-titel); font-weight: 600; color: var(--st-text); display: flex; align-items: center; gap: 8px; }
#rittAnsicht .ra-erfolg i { color: #F5C542; }
/* Nr. 132 Punkt 7: Verlauf in der Pferde-Akte (Stunden je Gangart gestapelt); Gangart-Farben wie in der Ritt-Ansicht */
.akte .av-umschalter { display: flex; gap: 8px; margin: 6px 0; }
.akte .av-umschalter button[aria-pressed="true"] { background: #047857; color: #fff; font-weight: 700; }
.akte .av-diagramm { display: flex; gap: 6px; align-items: flex-end; height: 120px; margin: 8px 0 4px; }
.akte .av-spalte { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; font-size: 12px; color: var(--st-text-gedaempft, #64748b); }
.akte .av-balken { width: 100%; flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.akte .av-balken i { display: block; width: 100%; }
.akte .av-schritt { background: #10b981; } .akte .av-trab { background: #f59e0b; } .akte .av-galopp { background: #f43f5e; } .akte .av-stand { background: #9ca3af; } .akte .av-ohne_s { background: #cbd5e1; }
.akte .av-legende { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #475569; margin-bottom: 6px; }
.akte .av-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.bs-label { display: block; margin-bottom: .25rem; font-size: var(--st-groesse-klein, .8125rem); font-weight: var(--st-gewicht-fett, 700); line-height: 1.3; letter-spacing: normal; text-transform: none; color: var(--st-text-gedaempft, #64748b); }  /* Nr. 217/246: eine Beschriftung für Stammdaten und Termin-Fenster, keine Großbuchstaben, keine Sperrung */
.bs-label-flach { margin-bottom: 0; }
/* Nr. 250: Feld direkt in der Beschriftung (kein Abstand von Hand, keine geerbte Schrift), Einheit im Feld, gesperrtes Feld */
.bs-label > input.bs-feld, .bs-label > select.bs-feld, .bs-label > textarea.bs-feld { display: block; margin-top: .25rem; }
.bs-label > .stamm-einheit { margin-top: .25rem; }
.bs-label > input.bs-feld, .bs-label > select.bs-feld, .bs-label > textarea.bs-feld { width: 100%; box-sizing: border-box; }
.bs-label > .bs-feld, .bs-label > .stamm-einheit { font-weight: 400; text-transform: none; letter-spacing: normal; }
.bs-feld:disabled { opacity: .6; }
select.bs-feld { box-sizing: border-box; min-width: 0; }
/* Nr. 243: Stammdaten-Formular, eine Feld-Quelle (bs-feld), Gruppen, zwei Spalten am Handy */
.stamm-gruppe { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--st-linie); }
.stamm-gruppe-erste { padding-top: 8px; margin-top: 0; border-top: 0; }
.stamm-gruppe-titel { margin-bottom: 8px; color: var(--st-text); font-weight: var(--st-gewicht-fett); }
.stamm-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.stamm-raster > * { min-width: 0; }
.stamm-raster .bs-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamm-raster input.bs-feld, .stamm-raster select.bs-feld { box-sizing: border-box; height: 44px; line-height: 1.2; }
.stamm-raster textarea.bs-feld { min-height: 68px; resize: vertical; }
.stamm-hinweis { margin-top: 4px; }
.stamm-kennung { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* Nr. 250: Feld mit Einheit. Der Rahmen sitzt am Wrapper, Feld und Einheit stehen nebeneinander: die Einheit überdeckt nie Wert oder Platzhalter, jede Länge passt, senkrecht mittig. */
.stamm-einheit { display: flex; align-items: center; box-sizing: border-box; height: 44px; min-width: 0; background: var(--st-flaeche-gedaempft); border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); }
.stamm-einheit:focus-within { border-color: var(--st-haupt); box-shadow: 0 0 0 1px var(--st-haupt); }
/* Dunkel: Der Rahmen bekommt genau die Fläche und den Rand, die ein normales Feld an derselben Stelle hat
   (außerhalb von Fenstern wie css/dunkel.css Zeile 4, in Fenstern wie die Regel für .fenster-rahmen weiter oben). */
html.dark .stamm-einheit { background-color: var(--st-grund); border-color: var(--st-linie); }
html.dark .fenster-rahmen .stamm-einheit { background-color: var(--st-flaeche); border-color: var(--st-linie); }
html.dark .stamm-einheit:focus-within { border-color: var(--st-text-knopf); box-shadow: 0 0 0 1px var(--st-text-knopf); }
.stamm-einheit > .bs-feld { flex: 1 1 auto; width: auto; min-width: 0; height: 100%; margin: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; padding-right: 6px; }
.stamm-einheit > .bs-feld:focus { border: 0; box-shadow: none; }
.stamm-einheit-text { flex: none; padding-right: 14px; font-size: .8125rem; line-height: 1; white-space: nowrap; color: var(--st-text-gedaempft); pointer-events: none; }
/* zu langer Platzhalter oder Wert endet mit Auslassungspunkten statt hart abgeschnitten */
.bs-feld { text-overflow: ellipsis; }
/* Datums-, Zeit- und Monatsfelder (iOS): nichts steht über, Wert links, gleiche Höhe wie die anderen Felder (Nr. 243, Nr. 246 für time/month) */
input[type=date].bs-feld, input[type=time].bs-feld, input[type=month].bs-feld { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; height: 44px; line-height: 1.2; text-align: left; padding-left: 12px; padding-right: 8px; }
input[type=date].bs-feld::-webkit-date-and-time-value, input[type=time].bs-feld::-webkit-date-and-time-value, input[type=month].bs-feld::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }
input[type=date].bs-feld::-webkit-datetime-edit, input[type=time].bs-feld::-webkit-datetime-edit, input[type=month].bs-feld::-webkit-datetime-edit { padding: 0; }
input[type=date].bs-feld::-webkit-calendar-picker-indicator, input[type=time].bs-feld::-webkit-calendar-picker-indicator, input[type=month].bs-feld::-webkit-calendar-picker-indicator { margin: 0 0 0 2px; padding: 0; }
@supports (-webkit-touch-callout: none) {
  input[type=date].bs-feld:required:invalid::before { content: "TT.MM.JJJJ"; color: var(--st-text-gedaempft); }
  input[type=time].bs-feld:required:invalid::before { content: "--:--"; color: var(--st-text-gedaempft); }
  input[type=month].bs-feld:required:invalid::before { content: "MM.JJJJ"; color: var(--st-text-gedaempft); }
}
/* Nr. 246: Termin-Fenster. Zwei gleich breite Spalten, Umschaltzeile, Aufklapp-Zeile, Schalter-Zeile */
#eventModal input.bs-feld, #eventModal select.bs-feld { box-sizing: border-box; height: 44px; line-height: 1.2; }
#eventModal textarea.bs-feld { box-sizing: border-box; min-height: 68px; resize: vertical; }
.tf-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.tf-raster > * { min-width: 0; }
.tf-raster > .tf-voll { grid-column: 1 / -1; }
.tf-umschalt { display: flex; overflow: hidden; min-height: 44px; border: 1px solid var(--st-linie); border-radius: var(--st-rundung-klein); }
.tf-umschalt > * { flex: 1 1 0; min-width: 0; border: 0; border-radius: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.tf-umschalt > * + * { border-left: 1px solid var(--st-linie); }
.tf-umschalt > .tf-aus { background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
/* Nr. 246 D: gewählter Status – erledigt grün, geplant blau, Behandlung läuft orange; nur --st-Farben, hell und dunkel */
.tf-umschalt > .tf-an-erledigt { background: var(--st-haupt); color: var(--st-haupt-text); }
.tf-umschalt > .tf-an-geplant { background: var(--st-ton-info); color: var(--st-ton-info-text); box-shadow: inset 0 0 0 2px var(--st-ton-info-text); }
.tf-umschalt > .tf-an-laeuft { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); box-shadow: inset 0 0 0 2px var(--st-ton-hinweis-text); }
.tf-mehr { border-top: 1px solid var(--st-linie); border-bottom: 1px solid var(--st-linie); }
.tf-mehr-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 6px 2px; cursor: pointer; list-style: none; }
.tf-mehr-kopf::-webkit-details-marker { display: none; }
.tf-pfeil { flex: none; color: var(--st-text-gedaempft); transition: transform .2s; }
.tf-mehr[open] .tf-pfeil { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .tf-pfeil { transition: none; } }
.tf-schalterzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 6px 2px; cursor: pointer; border-top: 1px solid var(--st-linie); }
.tf-schalter { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--st-linie); border: 0; cursor: pointer; transition: background var(--takt-tipp) var(--kurve-raus); }
.tf-schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--st-flaeche); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform var(--takt-tipp) var(--kurve-raus); }
.tf-schalter:checked { background: var(--st-haupt); }
.tf-schalter:checked::after { transform: translateX(20px); }
.tf-schalter:focus-visible { outline: 2px solid var(--st-haupt); outline-offset: 2px; }
.hand-soll-feld { display: flex; flex-direction: column; gap: 2px; }
.hand-soll-feld label { font-size: .75rem; font-weight: 700; color: var(--st-text-gedaempft, #64748b); }
.hand-soll-feld p { font-size: .875rem; font-weight: 600; color: var(--st-text, #1e293b); margin: 0; }
.hand-soll-feld small { font-size: .75rem; color: var(--st-text-gedaempft, #64748b); }
.hand-soll-feld button { align-self: flex-start; font-size: .875rem; font-weight: 700; color: var(--st-text-knopf, #047857); }
.hand-soll-feld [disabled] { opacity: .5; }
/* Nr. 197: Hand-Verhältnis. Balken in der Ritt-Ansicht (links/rechts in %, Soll-Marke) und Links-Anteil-Verlauf in der Akte; ohne Warnfarbe, Tokens folgen dem Nachtblau */
#rittAnsicht .ra-hand-balken { position: relative; display: flex; height: 34px; border: 2px solid var(--ra-kontur); border-radius: 8px; overflow: hidden; margin-top: 12px; }
#rittAnsicht .ra-hand-links, #rittAnsicht .ra-hand-rechts { display: flex; align-items: center; justify-content: center; min-width: 0; font-size: .8125rem; font-weight: 700; white-space: nowrap; overflow: hidden; }
#rittAnsicht .ra-hand-links { background: var(--st-haupt); color: var(--st-haupt-text); }
#rittAnsicht .ra-hand-rechts { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
#rittAnsicht .ra-hand-soll { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 3px dashed var(--st-text); transform: translateX(-1.5px); }
#rittAnsicht .ra-hand-sollzeile { margin: 0; }
.akte .hv-chart { width: 100%; height: auto; display: block; margin: 6px 0 2px; }
.akte .hv-band { fill: #64748b; opacity: .2; }
.akte .hv-soll { stroke: var(--st-text-gedaempft, #64748b); stroke-width: 1.5; stroke-dasharray: 5 4; }
.akte .hv-linie { stroke: #047857; stroke-width: 2.5; stroke-linejoin: round; }
.akte .hv-punkt { fill: #047857; } .akte .hv-wenig { fill: #9ca3af; }
.akte .hv-chart text { font-size: 12px; fill: #64748b; }
.akte .hv-grau { color: #6b7280; }  /* Nr. 397 B: 4,8:1 statt 2,5:1 */
html.dark .akte .hv-grau { color: #9E9386; }

/* Nr. 189: Hof-Dekoration (Zaunbrett-Kopfzeile): Funken und Lichter funkeln nur mit „Animationen“ an und ohne „Bewegung reduzieren“ */
.zaun-hof-deko-ebene { pointer-events: none; }
.hof-funke { transform-box: fill-box; transform-origin: center; animation: hof-funkeln calc(var(--takt-auftritt) * 4) var(--kurve-weich) infinite; }
.hof-licht { animation: hof-leuchten calc(var(--takt-auftritt) * 5) var(--kurve-weich) infinite; }
@keyframes hof-funkeln { 0%, 100% { opacity: .55; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes hof-leuchten { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.tiere-aus .hof-funke, .tiere-aus .hof-licht { animation: none; }
@media (prefers-reduced-motion: reduce) { .hof-funke, .hof-licht { animation: none; } }
/* Nr. 222 B: Leben der Tribüne – nur transform und opacity, je Tier im eigenen Takt (JS setzt data-leer, höchstens zwei Tiere gleichzeitig), Ankommen von der rechten Seite */
.heu-trib-fig[data-leer="hecheln"] { animation: heu-trib-hecheln calc(var(--takt-auftritt) * 2) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="wedeln"] { animation: heu-trib-wedeln calc(var(--takt-tipp) * 6) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="kauen"] { animation: heu-trib-kauen calc(var(--takt-tipp) * 9) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="neigen"] { animation: heu-trib-neigen calc(var(--takt-tipp) * 11) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="nase"] { animation: heu-trib-nase calc(var(--takt-tipp) * 7) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="hoppeln"] { animation: heu-trib-hoppeln var(--takt-auftritt) var(--kurve-raus) 1; }
.heu-trib-fig[data-leer="schuetteln"] { animation: heu-trib-schuetteln calc(var(--takt-wechsel) * 3) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="schwaenzeln"] { animation: heu-trib-schwaenzeln calc(var(--takt-auftritt) * 3) var(--kurve-weich) 1; }
.heu-trib-fig[data-leer="nicken"] { animation: heu-trib-nicken calc(var(--takt-wechsel) * 6) var(--kurve-weich) 1; }
@keyframes heu-trib-hecheln { 0%, 100% { transform: scale(1, 1); } 15%, 45%, 75% { transform: scale(1.025, 1.045); } 30%, 60%, 90% { transform: scale(1, 1); } }
@keyframes heu-trib-wedeln { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2.5deg); } 80% { transform: rotate(2deg); } }
@keyframes heu-trib-kauen { 0%, 100% { transform: translateY(0) scaleY(1); } 10%, 30%, 50%, 70% { transform: translateY(1.5%) scaleY(.985); } 20%, 40%, 60%, 80% { transform: translateY(0) scaleY(1); } }
@keyframes heu-trib-neigen { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(5deg); } }
@keyframes heu-trib-nase { 0%, 100% { transform: scale(1); } 10%, 30%, 50%, 70%, 90% { transform: scale(1.03, 1.02); } 20%, 40%, 60%, 80% { transform: scale(1); } }
@keyframes heu-trib-hoppeln { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9%); } 70% { transform: translateY(0) scaleY(.96); } }
@keyframes heu-trib-schuetteln { 0%, 100% { transform: rotate(0); } 15%, 55% { transform: rotate(5deg); } 35%, 75% { transform: rotate(-5deg); } }
@keyframes heu-trib-schwaenzeln { 0%, 100% { transform: rotate(0) translateX(0); } 25% { transform: rotate(2.5deg) translateX(1.5%); } 50% { transform: rotate(-2.5deg) translateX(-1.5%); } 75% { transform: rotate(2deg) translateX(1%); } }
@keyframes heu-trib-nicken { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3deg) translateY(1%); } 50% { transform: rotate(0); } 75% { transform: rotate(2.5deg) translateY(1%); } }
.heu-buehne-tier[data-ankommen="1"] { animation: heu-trib-kommt calc(var(--takt-tipp) * 7) var(--kurve-raus) 1 both; }
.heu-trib-reihe[data-neu="1"] { animation: heu-trib-reihe-neu var(--takt-auftritt) var(--kurve-raus) 1 both; }
@keyframes heu-trib-kommt {
    0% { transform: translate(calc(var(--vx) * 1cqw), calc(var(--y) * 1cqw)); opacity: 0; }
    12% { opacity: 1; }
    55% { transform: translate(2cqw, calc(var(--y) * 1cqw)); opacity: 1; }
    78% { transform: translate(0, calc(var(--y) * -.2cqw - 3cqw)); opacity: 1; }
    100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes heu-trib-reihe-neu { from { transform: translateY(3cqw); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
html.heu-pause .heu-trib-fig, html.heu-pause .heu-buehne-tier { animation-play-state: paused !important; }
html.tiere-aus .heu-trib-fig, html.tiere-aus .heu-buehne-tier, html.tiere-aus .heu-trib-reihe, .heu-wurzel[data-darstellung="ruhig"] .heu-trib-fig, .heu-wurzel[data-darstellung="ruhig"] .heu-buehne-tier, .heu-wurzel[data-darstellung="ruhig"] .heu-trib-reihe { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .heu-trib-fig, .heu-buehne-tier, .heu-trib-reihe { animation: none !important; } }
/* Nr. 222 C: Reaktionen der Tribüne (nur nach der Antwort oder einem Joker; transform/opacity). --ab = schon vergangene Zeit, damit ein Neuzeichnen die Bewegung nicht neu startet; --amp größer ab Sprosse 9 */
.heu-buehne-boden[data-reaktion] { --amp: 1; } .heu-buehne-boden[data-stark="1"] { --amp: 1.5; }
.heu-buehne-boden[data-reaktion="hupft"] .heu-trib-fig, .heu-buehne-boden[data-reaktion="jubel"] .heu-trib-fig { animation: heu-trib-hupf var(--takt-auftritt) var(--kurve-raus) 1; animation-delay: calc(var(--k) * 70ms + var(--ab, 0ms)); }
.heu-buehne-boden[data-reaktion="jubel"] .heu-trib-fig { animation-iteration-count: 3; }
.heu-buehne-boden[data-reaktion="hupft"] .heu-buehne-tier[data-art="hund"] .heu-trib-fig, .heu-buehne-boden[data-reaktion="jubel"] .heu-buehne-tier[data-art="hund"] .heu-trib-fig { animation-name: heu-trib-springt; }
.heu-buehne-boden[data-reaktion="hupft"] .heu-buehne-tier[data-art="hase"] .heu-trib-fig, .heu-buehne-boden[data-reaktion="jubel"] .heu-buehne-tier[data-art="hase"] .heu-trib-fig { animation-name: heu-trib-maennchen; animation-duration: calc(var(--takt-wechsel) * 3); }
.heu-buehne-boden[data-reaktion="hupft"] .heu-buehne-tier[data-art="ente"] .heu-trib-fig, .heu-buehne-boden[data-reaktion="jubel"] .heu-buehne-tier[data-art="ente"] .heu-trib-fig { animation-name: heu-trib-flattert; }
.heu-buehne-boden[data-reaktion="winken"] .heu-trib-fig { animation: heu-trib-winken calc(var(--takt-auftritt) * 2) var(--kurve-weich) 1; animation-delay: calc(var(--k) * 60ms + var(--ab, 0ms)); }
.heu-buehne-boden[data-reaktion="traurig"] .heu-trib-fig { animation: heu-trib-duck calc(var(--takt-tipp) * 3) var(--kurve-raus) 1 both; animation-delay: calc(var(--k) * 40ms + var(--ab, 0ms)); }
.heu-buehne-tier[data-hilft="1"] .heu-trib-fig { animation: heu-trib-hilft calc(var(--takt-wechsel) * 9) var(--kurve-weich) 1; animation-delay: var(--ab, 0ms); }
.heu-trib-halme { position: absolute; inset: 0; pointer-events: none; }
.heu-trib-halme i { position: absolute; bottom: 34cqw; width: .5cqw; height: 3.2cqw; border-radius: 1px; background: #d9a92f; opacity: 0; animation: heu-trib-halm calc(var(--takt-tipp) * 11) ease-in 1 both; animation-delay: calc(var(--k) * 120ms + var(--ab, 0ms)); }
@keyframes heu-trib-hupf { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(calc(var(--amp, 1) * -14%)) scaleY(1.03); } 65% { transform: translateY(0) scaleY(.97); } }
@keyframes heu-trib-springt { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(calc(var(--amp, 1) * -28%)) rotate(-4deg); } 65% { transform: translateY(0) rotate(0) scaleY(.96); } }
@keyframes heu-trib-maennchen { 0%, 100% { transform: translateY(0) scaleY(1); } 25%, 70% { transform: translateY(calc(var(--amp, 1) * -7%)) scaleY(calc(1 + var(--amp, 1) * .1)); } }
@keyframes heu-trib-flattert { 0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(calc(var(--amp, 1) * -10%)) rotate(7deg); } 40% { transform: translateY(0) rotate(-7deg); } 60% { transform: translateY(calc(var(--amp, 1) * -8%)) rotate(6deg); } 80% { transform: translateY(0) rotate(0); } }
@keyframes heu-trib-winken { 0%, 100% { transform: rotate(0); } 15%, 55% { transform: rotate(-7deg); } 35%, 75% { transform: rotate(7deg); } }
@keyframes heu-trib-duck { from { transform: translateY(0) scaleY(1); } to { transform: translateY(5%) scaleY(.95); } }
@keyframes heu-trib-hilft { 0%, 100% { transform: translateY(0) scale(1); } 18%, 78% { transform: translateY(-38%) scale(1.14); } }
@keyframes heu-trib-halm { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(26cqw) rotate(200deg); opacity: 0; } }
html.tiere-aus .heu-trib-halme, .heu-wurzel[data-darstellung="ruhig"] .heu-trib-halme i:nth-child(n+4) { display: none; }
@media (prefers-reduced-motion: reduce) { .heu-trib-halme { display: none; } }
/* Nr. 222 D: Sprechblase der Tribünen-Tiere – nur eine, 1,8 s, über dem Tier in der Szene (Lage setzt JS, passt sie nicht, entfällt sie). Bewegung nur transform/opacity */
.heu-trib-blase { position: absolute; z-index: 6; transform: translateX(calc(-50% + var(--dx, 0px))); padding: 3px 9px; border-radius: 12px; border: 2px solid #5a3a1c; background: #fffdf5; color: #3a230d; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; pointer-events: none; opacity: 0; animation: heu-trib-blase calc(var(--takt-auftritt) * 3) var(--kurve-raus) 1 both; animation-delay: var(--ab, 0ms); }
.heu-trib-blase::after { content: ""; position: absolute; left: calc(50% - var(--dx, 0px) - 5px); bottom: -7px; width: 0; height: 0; border: 5px solid transparent; border-top-color: #5a3a1c; border-bottom: 0; }
html.dark .heu-trib-blase { background: #2a2118; color: #fbe9b8; border-color: #c9a45c; }
html.dark .heu-trib-blase::after { border-top-color: #c9a45c; }
@keyframes heu-trib-blase { 0% { opacity: 0; transform: translateX(calc(-50% + var(--dx, 0px))) translateY(6px); } 12% { opacity: 1; transform: translateX(calc(-50% + var(--dx, 0px))) translateY(0); } 85% { opacity: 1; transform: translateX(calc(-50% + var(--dx, 0px))) translateY(0); } 100% { opacity: 0; transform: translateX(calc(-50% + var(--dx, 0px))) translateY(-3px); } }
@keyframes heu-trib-blase-still { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .heu-trib-blase { opacity: 1; } }  /* die Regel „animation: none“ weiter oben gilt auch hier: Blase steht ohne Bewegung da, JS nimmt sie nach 1, 8 s weg */ .heu-wurzel[data-darstellung="ruhig"] .heu-trib-blase { animation-name: heu-trib-blase-still; }

/* Nr. 238: Karte „Heute“ klarer – ein Dienst-Block (genau eine Akzentfläche), neutrale Zeilen, kleine Abschnitts-Überschriften */
.heute-wetter { color: var(--st-text); }
.heute-abschnitt { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--st-text-gedaempft); padding-top: .25rem; }
.dienst-block { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); box-shadow: inset 0 0 0 1.5px rgba(120, 80, 10, .45); }
html.dark .dienst-block { box-shadow: inset 0 0 0 1.5px rgba(244, 213, 138, .45); }
.dienst-block-symbol { font-size: 1.5rem; width: 2rem; text-align: center; }
.dienst-block-sub { opacity: .85; }
.dienst-block-zahl { font-size: 1.75rem; line-height: 1; }
.dienst-block-gesamt { font-size: 1rem; font-weight: 600; opacity: .8; }
.dienst-streifen-grund { background: rgba(120, 80, 10, .25); }
html.dark .dienst-streifen-grund { background: rgba(244, 213, 138, .22); }
.dienst-block .dienst-streifen { background: #E89B23; }
.dienst-block-knopf, .bs-karte .dienst-block-knopf, html.dark .bs-karte .dienst-block-knopf { background: #F0A33A; color: #3A2705; }
@media (hover: hover) { .dienst-block-knopf:hover { background: #E89B23; } }  /* Nr. 252 A */
.dienst-block[data-zustand="vorab"], html.dark .dienst-block[data-zustand="vorab"] { background: var(--st-flaeche-gedaempft); color: var(--st-text); box-shadow: none; }
.dienst-block[data-zustand="vorab"] .dienst-streifen { background: var(--st-text-gedaempft); }
.dienst-block[data-zustand="vorab"] .dienst-streifen-grund { background: var(--st-linie); }
.dienst-block[data-zustand="vorab"] .dienst-block-knopf, .bs-karte .dienst-block[data-zustand="vorab"] .dienst-block-knopf, html.dark .bs-karte .dienst-block[data-zustand="vorab"] .dienst-block-knopf { background: var(--st-flaeche); color: var(--st-text); box-shadow: inset 0 0 0 1px var(--st-linie); }
.dienst-ton-akzent { --dienst-ton: akzent; }
.dienst-ton-neutral { --dienst-ton: neutral; }
/* Nr. 383 / Nr. 391: Dienstzeilen der Karte „Heute“ in einer getönten Fläche, Sonne/Mond in runder Scheibe; dienstfrei als ruhige Aktiv-Pille */
#todayDutyLine:empty { display: none; }
.heute-planer-wink { color: var(--st-text-knopf); display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: var(--st-flaeche-gedaempft); white-space: nowrap; }
.heute-frei { display: inline-flex; align-items: center; gap: 6px; margin-bottom: .5rem; padding: 3px 11px; border-radius: 999px; background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-size: var(--st-groesse-klein); }
.heute-frei i { color: inherit; }
#heuTagHinweis:not(.hidden) { border-top: 1px solid var(--st-linie); padding-top: 8px; }
.bs-untertitel { font-family: var(--st-schrift-text); font-weight: var(--st-gewicht-text); }
.bs-kompakt { min-height: 44px; padding: 0 14px; font-size: var(--st-groesse-klein); }
.akt-top-balken { background: var(--st-flaeche); }
.akt-mein-rahmen { border-width: 0 !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st-haupt) 45%, transparent); }
html.dark .akt-mein-rahmen { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st-text-knopf) 45%, transparent); }
#aktSumme .akt-vergleich.bg-emerald-100 { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
#aktSumme .akt-vergleich.bg-slate-100 { background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
@media (hover: hover) { .notiz-loeschen-knopf:hover { color: var(--st-ton-gefahr-text); } }

/* Nr. 391: Karte „Weiden & Platz“ (#mod_weather) – klarer Kopf + 2-Zeilen-Statusgruppe */
#weatherModuleSection .bs-symbol:not(.bs-symbol-gefahr) { background: rgba(255, 255, 255, .58); color: var(--st-ton-info-text); }
html.dark #weatherModuleSection .bs-symbol:not(.bs-symbol-gefahr) { background: rgba(255, 255, 255, .10); color: var(--st-ton-info-text); }
.weide-titel { display: inline-flex; align-items: baseline; gap: 7px; }
.weide-titel[data-tor]::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--st-text-gedaempft); transform: translateY(-1px); }
.weide-titel[data-tor="offen"]::before { background: #16A34A; }
.weide-titel[data-tor="zu"]::before { background: #DC2626; }
.weide-titel[data-tor="unbekannt"]::before { background: #D97706; }
html.dark .weide-titel[data-tor="offen"]::before { background: #4ADE80; }
html.dark .weide-titel[data-tor="zu"]::before { background: #F87171; }
html.dark .weide-titel[data-tor="unbekannt"]::before { background: #FBBF24; }
.weide-wetter-symbol { display: inline-flex; align-items: center; justify-content: center; font-size: 1.125rem; opacity: .88; }
.weide-wetter-symbol.hidden { display: none; }
.weide-status-gruppe { background: rgba(255, 255, 255, .56); border-radius: 14px; overflow: hidden; }
html.dark .weide-status-gruppe { background: rgba(255, 255, 255, .07); }
.weide-status-gruppe:not(:has(.weide-status-zeile:not(.hidden))) { display: none; }
.weide-status-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; color: var(--st-text); }
#weideStatusZeile:not(:has(#wetterStandort:not(:empty), #koppelTorMarke:not(.hidden), #btnAdminGateToggle[style*="flex"]:not(.hidden))) { display: none; }
#weideStatusZeile:has(#wetterStandort:empty):has(#koppelTorMarke.hidden) { justify-content: flex-end; }
.weide-status-zeile + .weide-status-zeile:not(.hidden) { border-top: 1px solid rgba(0, 0, 0, .07); }
html.dark .weide-status-zeile + .weide-status-zeile:not(.hidden) { border-top-color: rgba(255, 255, 255, .08); }
#weideStatusZeile:not(:has(#wetterStandort:not(:empty), #koppelTorMarke:not(.hidden), #btnAdminGateToggle[style*="flex"]:not(.hidden))) + .weide-status-zeile { border-top: 0; }
.weide-punkt { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.weide-punkt-frei { background: #16A34A; }
html.dark .weide-punkt-frei { background: #4ADE80; }
.heute-dienste { background: var(--st-flaeche-gedaempft); border-radius: 16px; }
.dienst-kein { color: var(--st-text); min-height: 64px; }
.dienst-kein:first-child { border-radius: 16px 16px 0 0; }
.dienst-kein:last-child { border-radius: 0 0 16px 16px; }
.dienst-kein:only-child { border-radius: 16px; }
.dienst-kein + .dienst-kein { border-top: 1px solid color-mix(in srgb, var(--st-text) 14%, transparent); }
.dienst-kein .bs-neben { color: color-mix(in srgb, var(--st-text) 78%, transparent); }
.heute-scheibe { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
.heute-scheibe-morgens { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.heute-scheibe-abends { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.heute-scheibe-offen { border: 2px dashed var(--st-text-gedaempft); color: var(--st-text-gedaempft); }
.heute-getauscht { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.demnaechst-zeile { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
.heute-fett { font-weight: 700; }
.heute-extrafett { font-weight: 800; }

/* Kontrast (Audit 18.11.2026): Nebentext und Platzhalter im Hellen mindestens 4,5:1 auf Weiß und auf dem warmen Grund.
   :where() hält die Gewichtung so niedrig wie die Tailwind-Klasse, damit Stellen mit eigener Farbe (z. B. auf grünen Karten) vorgehen. */
:where(html:not(.dark)) .text-slate-500 { color: #586880; }
:where(html:not(.dark)) :is(input, textarea)::placeholder { color: #586880; opacity: 1; }  /* Nr. 305 D1: 5,3:1 auf dem warmen Grund (vorher #64748b = 4,4:1) */
:where(html:not(.dark)) .placeholder\:text-slate-400::placeholder { color: #586880; }

/* Nr. 252 B: ein einheitlicher Fokus-Rahmen für die Tastatur (Maus und Finger sehen keinen: :focus-visible).
   :where() hält die Gewichtung bei null, damit die eigenen Ringe (z. B. .zaun-tier, .kl-karte) vorgehen; tabindex="-1" (Fenster-Rahmen, per Programm fokussiert) bekommt keinen. */
:root { --st-fokus: var(--st-haupt); }
html.dark { --st-fokus: var(--st-text-knopf); }
/* Nr. 374: auf dem Himmel der Kopfzeile (Tag, Nacht, Hügel) derselbe Ring, davor und dahinter ein Hof in Flächenfarbe, damit er überall sichtbar bleibt */
#kopfWetterKnopf:focus-visible, #kopfBlase:focus-visible, .zaun-schild-knopf:focus-visible, .zaun-tier:focus-visible, .zaun-polaroid:focus-visible .zaun-polaroid-karte { outline: 2px solid var(--st-fokus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--st-flaeche); }
.zaun-polaroid:focus-visible { outline: none; }  /* der Ring sitzt an der Karte, nicht um die ganze Trefferfläche */
:where(button, a[href], summary, input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="button"], [role="tab"], [contenteditable="true"]):focus-visible { outline: 2px solid var(--st-fokus); outline-offset: 2px; }
/* Tailwind-Klasse focus:outline-none (Felder mit eigener Randfarbe beim Fokus): der Rahmen bleibt zusätzlich da, gleiche Gewichtung, steht später im Laden */
[class~="focus:outline-none"]:focus-visible { outline: 2px solid var(--st-fokus); outline-offset: 2px; }
/* Nr. 250: Feld mit Einheit füllt die Spalte */
/* Nr. 250: Stall-Tablet, grosse Eingabe fuer die Wand (bs-feld mit groesserer Schrift) */
.bs-feld.tablet-feld-gross { font-size: 1.5rem; min-height: 64px; }
.bs-feld.tablet-feld { font-size: 1.25rem; min-height: 64px; padding: .5rem 1rem; }
/* Nr. 250: Eingabe und Auswahl gleich hoch (44 px) in jeder Zeile, auch ausserhalb von Stammdaten und Termin-Fenster */
:where(input, select).bs-feld { box-sizing: border-box; height: 44px; line-height: 1.2; }
.bs-feld.tablet-feld-gross, .bs-feld.tablet-feld { height: auto; }
/* Nr. 250: gewaehlte Person im Planer-Filter */
.bs-feld.bs-feld-aktiv { background: var(--st-haupt); color: var(--st-haupt-text); border-color: var(--st-haupt); }
/* stärker als die Feld-Regeln in css/dunkel.css und für .fenster-rahmen, sonst wäre das Feld im Rahmen zweifarbig (Nr. 250, Prüf-Runde 2) */
html.dark .stamm-einheit > :is(input, select).bs-feld:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), html.dark .stamm-einheit > :is(input, select).bs-feld:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus { background-color: transparent; border: 0; box-shadow: none; }
/* Nr. 250 und 252: bei Feld mit Einheit sitzt der Tastatur-Fokus am Rahmen, nicht im Feld */
.stamm-einheit > .bs-feld:focus-visible { outline: none; }
.stamm-einheit:has(> .bs-feld:focus-visible) { outline: 2px solid var(--st-fokus); outline-offset: 2px; }

/* Nr. 258 E2: weicher Bodenschatten unter frei stehenden Tieren (Heuleiter-/Quiz-Bühne, Kleintiere am Brett; leere Zustände zeichnen ihn im SVG) */
.zaun-tier[data-boden]::before, .heu-buehne-tier::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: -2px; height: 6px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(43, 38, 34, .26), rgba(43, 38, 34, 0)); pointer-events: none; }
.dark .zaun-tier[data-boden]::before, .dark .heu-buehne-tier::before { background: radial-gradient(closest-side, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0)); }
/* Nr. 258 E3 / Nr. 386: dünnes helles Randlicht an dunklen Tieren im Dunkelmodus und nachts – nach oben gerichtet, damit es nicht aufs weiße Brett blutet; nicht in hellen Profilkreisen */
.dark svg[data-dunkel-tier], #kopfzeile:has(#kopfSzene[data-tageszeit="abend"]) svg[data-dunkel-tier], .schoner-nacht svg[data-dunkel-tier] { filter: drop-shadow(0 -.8px 0 color-mix(in srgb, var(--tier-randlicht, #fff4de) 78%, transparent)) drop-shadow(0 -1.5px 1.2px color-mix(in srgb, var(--tier-randlicht, #fff4de) 28%, transparent)); }
.dark .kopf-profil svg[data-dunkel-tier] { filter: none; }
.heu-szene[data-tageszeit="nacht"] .heu-buehne-tier svg[data-dunkel-tier], .heu-szene[data-dunkel="1"] .heu-buehne-tier svg[data-dunkel-tier] { filter: brightness(.62) drop-shadow(0 -.8px 0 color-mix(in srgb, var(--tier-randlicht, #fff4de) 78%, transparent)) drop-shadow(0 -1.5px 1.2px color-mix(in srgb, var(--tier-randlicht, #fff4de) 28%, transparent)); }
/* Nr. 251: Farben der Unterseiten aus den Variablen statt fester Tailwind-Farben (hell und dunkel aus einer Quelle). Farbe nur, wo etwas auffällt. */
.bs-farbe-text { color: var(--st-text); }
.bs-farbe-gedaempft { color: var(--st-text-gedaempft); }
.bs-farbe-gefahr { color: var(--st-ton-gefahr-text); }
.bs-farbe-hinweis { color: var(--st-ton-hinweis-text); }
.bs-farbe-info { color: var(--st-ton-info-text); }
.bs-farbe-haupt { color: var(--st-text-knopf); }
.bs-grund { background: var(--st-grund); color: var(--st-text); }
.bs-flaeche-gedaempft { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
.bs-linie { border-color: var(--st-linie); }
.kal-mini-icon { font-size: 0.65rem; line-height: 1; }
.planer-haken { position: relative; }
.planer-haken::after { content: ""; position: absolute; inset: -10px; }
#heuteHofLeben > .bs-karte { padding: 12px var(--st-abstand); }
.bs-balken-gedaempft { background: var(--st-flaeche-gedaempft); }
.bs-balken-klein { height: 8px; }
.bs-haken { accent-color: var(--st-haupt); }
/* Listenzeile mit Knopf (ganze Zeile tippbar) und optional Beleg-Knopf daneben: Datum und Betrag fest, Beschreibung bricht um */
.bs-zeile-knopf { flex: 1 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; color: inherit; background: transparent; border: 0; padding: 0; }
/* Nr. 251: von der KI erkannte Felder (kiMarkieren, js/belege.js) gelb bis zum Antippen; vorher bg-amber-50, das gegen .bs-feld nicht sichtbar war */
.bs-feld.ki-markiert, html.dark .bs-feld.ki-markiert, .ki-markiert { background-color: var(--st-ton-hinweis); border-color: var(--st-ton-hinweis-text); color: var(--st-ton-hinweis-text); }
/* Nr. 251: Zeitleiste (Verschleiß) und Zweit-Knopf auf gedämpften/getönten Flächen */
.bs-strich { background: var(--st-text-gedaempft); opacity: .35; }
.bs-strich-voll { background: var(--st-text-gedaempft); }
.bs-punkt-haupt { background: var(--st-haupt); }
.bs-punkt-ring { border: 2px solid var(--st-ton-hinweis-text); background: var(--st-flaeche); }
.bs-unterzeile:not(.bs-unterzeile-flaeche) .bs-knopf-zweit, .bs-ton-gefahr .bs-knopf-zweit, .bs-ton-hinweis .bs-knopf-zweit, .bs-ton-info .bs-knopf-zweit, .bs-karte-gefahr .bs-knopf-zweit { background: var(--st-flaeche); }
/* Nr. 251: Felder in einer Unterzeile heben sich ab (Unterzeile und Feld wären sonst gleich gedämpft) */
.bs-unterzeile:not(.bs-unterzeile-flaeche) .bs-feld, html.dark .bs-unterzeile:not(.bs-unterzeile-flaeche) .bs-feld { background-color: var(--st-flaeche); }
/* Nr. 251 Paket 2: Umschaltzeile Heu & Vorrat = Baustein bs-umschalter, hier nur volle Breite; Heu & Vorrat zeigt nur das gewählte Thema */
.heu-themen:not(.hidden) { display: flex; width: 100%; }
.heu-themen .bs-umschalter { flex: 1 1 auto; min-width: 0; padding: 0 4px; white-space: nowrap; }
#viewRoutine[data-heu-thema="heu"] [data-heu-thema]:not([data-heu-thema="heu"]),
#viewRoutine[data-heu-thema="raufen"] [data-heu-thema]:not([data-heu-thema="raufen"]),
#viewRoutine[data-heu-thema="lecksteine"] [data-heu-thema]:not([data-heu-thema="lecksteine"]),
#viewRoutine[data-heu-thema="vorraete"] [data-heu-thema]:not([data-heu-thema="vorraete"]) { display: none; }
.bs-saeule { background: var(--st-haupt); }
.bs-saeule-alt { background: var(--st-linie); }
html.dark .bs-saeule-alt { background: var(--st-flaeche-gedaempft); }
.bs-unterzeile.leck-sorte { padding: 0; }
.bs-flaeche { background: var(--st-flaeche); }
.bs-gewaehlt { border-color: var(--st-haupt) !important; background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }

/* Nr. 251 Paket 3 A */
.bs-unterzeile.bs-unterzeile-null { padding: 0; }  /* Unterzeile, deren Inhalt (Knopf) den Abstand selbst trägt */
.bs-punkt-gefahr { background: var(--st-ton-gefahr-text); }  /* kleiner Hinweispunkt (Mehr-Reiter) */
/* Nr. 251 Paket 3: Sprungleiste (Übersicht · Protokoll · Monatsbericht) passt bei 360 px in eine Zeile */
#mehrSprung .bs-filter { padding: 0 10px; }

/* Nr. 251 Paket 4 A */
.bs-farbpunkt-gewaehlt { box-shadow: 0 0 0 3px var(--st-flaeche), 0 0 0 6px var(--st-text); }  /* gewählte Personenfarbe (Punkt) */
.bs-punkt-hinweis { background: var(--st-ton-hinweis-text); }  /* Speicher-Balken ab 50 % (Text: „gelb ab 50 %“) */
/* Nr. 251 Paket 4 C: Hof-Übersicht – Bereichsfarben, Kalendertag */
/* Bereichsfarben bleiben klar getrennt (Nr. 84 Teil 4.1, auch bei Rot-Grün-Schwäche): Werte wie vorher (Tailwind 700/800, dunkel wie vorher) */
.hof-farbe-termine { color: #1d4ed8; } html.dark .hof-farbe-termine { color: #bfdbfe; }
.hof-farbe-dienste { color: #0e7490; } html.dark .hof-farbe-dienste { color: #a5f3fc; }
.hof-farbe-heu { color: #a16207; } html.dark .hof-farbe-heu { color: #fef08a; }
.hof-farbe-projekte { color: #9a3412; } html.dark .hof-farbe-projekte { color: #fdba74; }
.hof-farbe-maengel { color: #be123c; } html.dark .hof-farbe-maengel { color: #fda4af; }
.hof-farbe-lecksteine { color: #44403c; } html.dark .hof-farbe-lecksteine { color: #e7e5e4; }
.hof-farbe-fristen { color: #a21caf; } html.dark .hof-farbe-fristen { color: #f5d0fe; }
.hof-punkt-termine { background: #1d4ed8; } html.dark .hof-punkt-termine { background: #93c5fd; }
.hof-punkt-dienste { background: #0e7490; } html.dark .hof-punkt-dienste { background: #67e8f9; }
.hof-punkt-heu { background: #a16207; } html.dark .hof-punkt-heu { background: #fde047; }
.hof-punkt-projekte { background: #9a3412; } html.dark .hof-punkt-projekte { background: #fdba74; }
.hof-punkt-maengel { background: #be123c; } html.dark .hof-punkt-maengel { background: #fda4af; }
.hof-punkt-lecksteine { background: #44403c; } html.dark .hof-punkt-lecksteine { background: #d6d3d1; }
.hof-punkt-fristen { background: #a21caf; } html.dark .hof-punkt-fristen { background: #f0abfc; }
.hof-kal-tag { border: 1px solid var(--st-linie); background: var(--st-flaeche); color: var(--st-text); }
.hof-kal-tag[aria-pressed="true"] { border-color: var(--st-haupt); background: var(--st-ton-aktiv); }
.hof-kal-tag.hof-kal-fern { color: var(--st-text-gedaempft); }
.hof-heute-zahl { background: var(--st-haupt); color: var(--st-haupt-text); }

/* Nr. 270 B: Varianten des Ladebilds – Schichten blenden nach dem ersten Bild weich ein, nur transform/opacity (Himmelsfarbe wechselt per Überblendung) */
#bootLoading { transition: background-color .8s ease; }
.boot-variante { opacity: 0; transition: opacity .8s ease; }
.boot-variante-an .boot-variante { opacity: 1; }
#bootLoading[data-zeit="nacht"] .boot-szene text[data-hof-name] { fill: #f3ecdc; }
.lv-regen, .lv-schnee { animation: lv-fall calc(var(--takt-tipp) * 9) linear infinite; }
.lv-schnee { animation-duration: var(--takt-ruhe); }
@keyframes lv-fall { from { transform: translateY(-14px); } to { transform: translateY(14px); } }
.lv-blaetter { animation: lv-fall calc(var(--takt-auftritt) * 10) var(--kurve-weich) infinite alternate; }
.lv-drift { animation: lv-drift calc(var(--takt-wechsel) * 56) var(--kurve-weich) infinite alternate; }
@keyframes lv-drift { from { transform: translateX(0); } to { transform: translateX(120px); } }
.lv-wolken { animation: lv-drift calc(var(--takt-ruhe) * 10) var(--kurve-weich) infinite alternate; }
@media (prefers-reduced-motion: reduce) { .lv-regen, .lv-schnee, .lv-blaetter, .lv-drift, .lv-wolken, #bootLoading { animation: none; transition: none; } .boot-variante { transition: none; } }
html.tiere-aus .lv-regen, html.tiere-aus .lv-schnee, html.tiere-aus .lv-blaetter, html.tiere-aus .lv-drift, html.tiere-aus .lv-wolken { animation: none; }

/* Nr. 268 A: Heuleiter-Szene im Vollbild randlos (Handy). Keine äußere Karte, keine Rundung; die Szene beginnt ganz oben (Platz für die Statuszeile
   als Innenabstand der Szene), die Kopfleiste liegt halbtransparent mit Verlauf darüber. Nur wenn eine Frage mit Szene gezeigt wird (Startseite, Kammer, Ende bleiben wie sie sind). */
.heu-szene-blase { display: none; }
@media (max-width: 767px) {
    body[data-heuleiter="weg"]:has(.heu-raster) #heuLeiste { position: fixed; left: 0; right: 0; top: 0; min-height: calc(48px + env(safe-area-inset-top, 0px)); border-bottom: 0; background: linear-gradient(rgba(34, 20, 6, .82), rgba(34, 20, 6, .5) 65%, rgba(34, 20, 6, 0)); }
    body[data-heuleiter="weg"]:has(.heu-raster) #heuLeiste .heu-leiste-konto, body[data-heuleiter="weg"]:has(.heu-raster) #heuLeiste .heu-leiste-x { color: #fff6e0; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
    body[data-heuleiter="weg"]:has(.heu-raster) #inhalt { padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
    body[data-heuleiter="weg"]:has(.heu-raster) #viewRoutine > section { margin-top: 0 !important; }
    body[data-heuleiter="weg"] .heu-wurzel.heu-breit { padding: 0 0 8px; border-radius: 0; box-shadow: none; }
    body[data-heuleiter="weg"] .heu-wurzel.heu-breit .heu-raster > .space-y-3 { padding: 0 12px; }
    body[data-heuleiter="weg"] .heu-szene { box-sizing: content-box; padding-top: env(safe-area-inset-top, 0px); border-radius: 0; box-shadow: 0 8px 10px -8px rgba(0, 0, 0, .35); background: #5a3a1c; }  /* weiche Unterkante statt Karte; ruhige Darstellung: kein Schatten (Nr. 149 D) */
    body[data-heuleiter="weg"] .heu-wurzel[data-darstellung="ruhig"] .heu-szene { box-shadow: none; }
    body[data-heuleiter="weg"] .heu-szene > .heu-welt { top: env(safe-area-inset-top, 0px); }
    body[data-heuleiter="weg"] .heu-szene-stapel { right: 10px; top: calc(env(safe-area-inset-top, 0px) + 50px); }
    /* Karolines Spruch steht als Sprechblase in der Szene (an ihrem Kopf); die Zeile unter der Szene bleibt nur für Vorlese-Programme */
    body[data-heuleiter="weg"] .heu-szene-blase { display: block; position: absolute; left: 82%; top: -3cqw; width: 34cqw; z-index: 20; padding: 6px 10px; border-radius: 14px; background: #fffaf0; color: #2b1a0a; font-size: 13px; line-height: 1.25; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); pointer-events: none; }
    body[data-heuleiter="weg"] .heu-szene-blase::before { content: ""; position: absolute; left: -7px; top: 14px; border: 7px solid transparent; border-right-color: #fffaf0; border-left-width: 0; }
    body[data-heuleiter="weg"] .heu-szene-blase[data-leer] { display: none; }
    html.dark body[data-heuleiter="weg"] .heu-szene-blase { background: #3a2d1d; color: #fff3d6; } html.dark body[data-heuleiter="weg"] .heu-szene-blase::before { border-right-color: #3a2d1d; }
    body[data-heuleiter="weg"] .heu-tafel-wrap .heu-blase-klein { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; box-shadow: none; }
}

/* Nr. 268 B/C: Details im Hintergrund und ruhige Dauer-Bewegung (nur transform/opacity; bei „Bewegung reduzieren“, „Tiere aus“ und ruhiger Darstellung stehen sie durch die Regeln bei .heu-wurzel still, bei unsichtbarer Seite pausiert html.heu-pause) */
.heu-staub { position: absolute; left: 0; top: 0; width: 3px; height: 3px; margin: -1px 0 0 -1px; border-radius: 50%; background: rgba(255, 250, 220, .85); opacity: 0; pointer-events: none; z-index: 1; animation: heu-staub calc(var(--takt-auftritt) * 15) var(--kurve-weich) infinite; }
.heu-szene[data-tageszeit="nacht"] .heu-staub { display: none; }
@keyframes heu-wolke { from { transform: translateX(-8px); } to { transform: translateX(14px); } }
@keyframes heu-schaukel { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes heu-staub { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 70% { opacity: .7; } 100% { opacity: 0; transform: translate(10px, 26px); } }
.heu-gary { position: absolute; left: 60cqw; top: 23.8cqw; width: 11cqw; transform: translateY(-100%); pointer-events: none; z-index: 1; }
.heu-gary-fig { display: block; transform-origin: 50% 100%; animation: heu-atmen calc(var(--takt-auftritt) * 7) var(--kurve-weich) infinite; } .heu-gary-fig svg { display: block; width: 100%; height: auto; }
/* Abläufe (je ≤ 1,2 s): Karoline klettert sichtbar (Wippen beim Greifen), Ballen plumpst danach in den Korb, bei „Heu nehmen und gehen“ winkt sie */
.heu-kar[data-klettert="1"] .heu-kar-figur { transform-origin: 50% 100%; animation: heu-kar-klettern calc(var(--takt-tipp) * 6) var(--kurve-weich); }
.heu-plumps { position: absolute; left: 54.2cqw; top: 32cqw; width: 5.6cqw; height: 3.2cqw; border-radius: 1cqw; background: #e3bb4f; box-shadow: inset 0 0 0 .3cqw #b98a22; opacity: 0; z-index: 1; pointer-events: none; animation: heu-plumps calc(var(--takt-tipp) * 7) ease-in calc(var(--takt-tipp) * 6) both; }
.heu-kar-figur[data-winkt="1"] { transform-origin: 50% 100%; animation: heu-winken calc(var(--takt-auftritt) * 2) var(--kurve-weich); }
@keyframes heu-atmen { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, 1.04); } }
@keyframes heu-kar-klettern { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-1.2cqw) rotate(-3deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-1cqw) rotate(3deg); } }
@keyframes heu-plumps { 0% { opacity: 0; transform: translateY(-14cqw); } 15% { opacity: 1; } 70% { opacity: 1; transform: translateY(0); } 80% { transform: translateY(-.8cqw) scaleY(.9); } 100% { opacity: 0; transform: translateY(0); } }
@keyframes heu-winken { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.heu-strahl { fill: #fff6c8; opacity: calc(.2 - var(--heu-sterne-a) * .14); }

/* Nr. 253 A: Ladezustand (ladeHtml in js/bausteine.js). Erscheint erst nach 200 ms: bis dahin Deckkraft 0 (animation-fill-mode backwards),
   danach normal sichtbar; bei „Bewegung reduzieren“ (globale Regel oben) gleich sichtbar, ohne Puls. Gedämpfte Zeilen in Kartenform, kein Kreisel. */
.bs-lade { display: grid; gap: .5rem; animation: bs-lade-ein 1ms linear 200ms backwards; }
.bs-lade-zeile { min-height: 3.5rem; border-radius: var(--st-rundung); background: var(--st-flaeche-gedaempft); animation: bs-lade-puls calc(var(--takt-tipp) * 11) var(--kurve-weich) infinite; }
.bs-lade-zeile:nth-child(2) { animation-delay: .15s; } .bs-lade-zeile:nth-child(3) { animation-delay: .3s; } .bs-lade-zeile:nth-child(n+4) { animation-delay: .45s; }
html.tiere-aus .bs-lade-zeile { animation: none; }
@keyframes bs-lade-ein { from, to { opacity: 0; } }
@keyframes bs-lade-puls { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Nr. 253 B: Übergänge (View Transitions, js/bausteine.js uebergang). Höchstens 200 ms, nur Deckkraft und kurzer Versatz. Kopfzeile und untere Leiste
   sind ausgenommen: eigene Gruppe ohne Bewegung (der Name gilt nur während des Übergangs, Klasse uebergang, damit er sonst keinen Stapel bildet). */
html.uebergang #kopfzeile { view-transition-name: uebergang-kopf; }
html.uebergang #untereLeiste { view-transition-name: uebergang-leiste; }
::view-transition-group(uebergang-kopf), ::view-transition-group(uebergang-leiste) { animation: none; }
::view-transition-old(uebergang-kopf), ::view-transition-old(uebergang-leiste) { display: none; }
::view-transition-new(uebergang-kopf), ::view-transition-new(uebergang-leiste) { animation: none; }
::view-transition { pointer-events: none; }  /* Tippen während des Übergangs trifft die Seite darunter */
::view-transition-old(root) { animation: bs-uebergang-aus var(--takt-tipp) var(--kurve-raus) both; }
::view-transition-new(root) { animation: bs-uebergang-ein var(--takt-tipp) var(--kurve-raus) both; }
@keyframes bs-uebergang-aus { to { opacity: 0; } }
@keyframes bs-uebergang-ein { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
html.tiere-aus::view-transition-group(*), html.tiere-aus::view-transition-old(*), html.tiere-aus::view-transition-new(*) { animation: none !important; }

/* Nr. 268 E: Stimmungen (Kübel bei Regen, Atemwölkchen im Winter, Glühwürmchen nachts) und Zufalls-Momente (.heu-zm-*; nur transform/opacity, höchstens einer gleichzeitig).
   Ruhig/„Tiere aus“: die Regeln bei .heu-wurzel schalten Animationen ab, die Elemente starten mit Deckkraft 0 und bleiben dann unsichtbar. */
.heu-atem { position: absolute; left: 62%; top: 22%; width: 8cqw; height: 6cqw; pointer-events: none; }
.heu-atem i { position: absolute; left: 0; top: 0; width: 3cqw; height: 2cqw; border-radius: 50%; background: rgba(255, 255, 255, .85); opacity: 0; animation: heu-atem calc(var(--takt-wechsel) * 13) var(--kurve-raus) infinite; } .heu-atem i + i { animation-delay: 1.6s; }
.heu-gluehwuermchen { position: absolute; inset: 0; pointer-events: none; z-index: 1; display: none; } .heu-szene[data-tageszeit="nacht"] .heu-gluehwuermchen { display: block; }
.heu-gluehwuermchen i { position: absolute; width: 1.1cqw; height: 1.1cqw; margin: 0; border-radius: 50%; background: #e9ff8a; box-shadow: 0 0 2cqw .6cqw rgba(233, 255, 138, .7); opacity: 0; animation: heu-gluehen calc(var(--takt-wechsel) * 20) var(--kurve-weich) infinite; }
.heu-zm { position: absolute; pointer-events: none; z-index: 3; }
.heu-zm-pferd { overflow: hidden; } .heu-zm-pferd-kopf { position: absolute; left: 10%; bottom: 0; width: 80%; display: block; opacity: 0; animation: heu-zm-pferd calc(var(--takt-wechsel) * 13) var(--kurve-weich) both; } .heu-zm-pferd-kopf svg { display: block; width: 100%; height: auto; }
.heu-zm-schwalbe { left: 0; animation: heu-zm-flug calc(var(--takt-wechsel) * 7) linear both; } .heu-zm-schwalbe svg { display: block; width: 7cqw; height: auto; }
.heu-zm-maus { left: 0; z-index: 6; animation: heu-zm-lauf calc(var(--takt-wechsel) * 9) linear both; } .heu-zm-maus svg { display: block; width: 6cqw; height: auto; }
.heu-buehne-tier[data-zm-schaut] { animation: heu-zm-schaut calc(var(--takt-wechsel) * 9) var(--kurve-weich); }
.heu-zm-faden { position: absolute; left: 0; top: 0; width: 1px; height: 16cqw; background: rgba(255, 255, 255, .7); transform-origin: 50% 0; opacity: 0; animation: heu-zm-faden calc(var(--takt-auftritt) * 5) var(--kurve-weich) both; }
.heu-zm-spinne { position: absolute; left: -.8cqw; top: 0; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #2b1a0a; opacity: 0; animation: heu-zm-seil calc(var(--takt-auftritt) * 5) var(--kurve-weich) both; }
.heu-zm-rieseln { width: 8cqw; height: 14cqw; } .heu-zm-rieseln i { position: absolute; top: 0; width: 3px; height: 9px; border-radius: 2px; background: #d9b24a; opacity: 0; animation: heu-zm-halm calc(var(--takt-wechsel) * 6) ease-in both; }
.heu-zm-rieseln i:nth-child(1) { left: 5%; } .heu-zm-rieseln i:nth-child(2) { left: 28%; animation-delay: .2s; } .heu-zm-rieseln i:nth-child(3) { left: 50%; animation-delay: .1s; } .heu-zm-rieseln i:nth-child(4) { left: 72%; animation-delay: .35s; } .heu-zm-rieseln i:nth-child(5) { left: 92%; animation-delay: .25s; }
@keyframes heu-kuebel-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes heu-atem { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 25% { opacity: .85; } 100% { opacity: 0; transform: translate(5cqw, -4cqw) scale(1.6); } }
@keyframes heu-gluehen { 0%, 100% { opacity: 0; transform: translate(0, 0); } 30% { opacity: .95; } 60% { opacity: .2; transform: translate(5cqw, -4cqw); } 80% { opacity: .9; transform: translate(-3cqw, -7cqw); } }
@keyframes heu-zm-pferd { 0% { opacity: 1; transform: translateY(100%); } 22% { opacity: 1; transform: translateY(0); } 78% { opacity: 1; transform: translateY(0); } 100% { opacity: 1; transform: translateY(100%); } }
@keyframes heu-zm-flug { 0% { transform: translate(-12cqw, 0); } 30% { transform: translate(24cqw, -4cqw); } 60% { transform: translate(60cqw, 3cqw); } 100% { transform: translate(112cqw, -3cqw); } }
@keyframes heu-zm-lauf { 0% { transform: translateX(-10cqw); } 100% { transform: translateX(110cqw); } }
@keyframes heu-zm-schaut { 0%, 100% { rotate: 0deg; } 25%, 70% { rotate: -5deg; } }
@keyframes heu-zm-faden { 0% { opacity: 1; transform: scaleY(0); } 40% { opacity: 1; transform: scaleY(1); } 70% { opacity: 1; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(0); } }
@keyframes heu-zm-seil { 0% { opacity: 1; transform: translateY(0); } 40% { opacity: 1; transform: translateY(16cqw); } 70% { opacity: 1; transform: translateY(16cqw); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes heu-zm-halm { 0% { opacity: 0; transform: translateY(0) rotate(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(14cqw) rotate(120deg); } }

/* Nr. 268 F: Korb füllt sich, Joker sichtbar (Blue/Betty treten vor, Karoline schiebt mit dem Huf), Johann mit Heukrone, Anlässe (Girlande, Lichterkette, Konfetti).
   Alles nur transform/opacity, je Bewegung höchstens 1,2 s (Eintritt und Abgang getrennt); bei „Bewegung reduzieren“ und „Tiere aus“ greifen die Regeln bei .heu-wurzel, die Elemente starten mit Deckkraft 0. */
.heu-sz-joker { position: absolute; left: 4cqw; top: 38%; z-index: 20; display: flex; align-items: flex-end; gap: 6px; max-width: 80%; pointer-events: none; opacity: 0; animation: heu-sz-vor calc(var(--takt-wechsel) * 2) var(--kurve-raus) forwards, heu-sz-weg calc(var(--takt-wechsel) * 2) ease-in calc(var(--takt-wechsel) * 13) forwards; }
.heu-sz-joker-tier { display: block; line-height: 0; } .heu-sz-joker-tier svg { display: block; width: 64px; height: auto; }
.heu-sz-joker-blase { padding: 6px 10px; border-radius: 12px; background: #fff; color: #3a230d; font-size: 13px; font-weight: 700; line-height: 1.25; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html.dark .heu-sz-joker-blase { background: #3a2d1d; color: #fff3d6; }
.heu-sz-huf { position: absolute; left: 30%; top: 48%; z-index: 7; width: 0; height: 0; pointer-events: none; } .heu-sz-huf i { position: absolute; left: 0; top: 0; width: 22px; height: 16px; border-radius: 40% 40% 50% 50%; background: #4a2f17; border: 2px solid #2b1a0a; opacity: 0; animation: heu-sz-huf calc(var(--takt-tipp) * 7) var(--kurve-weich) forwards; }
.heu-sz-johann { position: absolute; left: 28.8cqw; top: calc(var(--f) * .2 - 11.5cqw); width: 12cqw; z-index: 3; pointer-events: none; opacity: 0; animation: heu-sz-vor calc(var(--takt-wechsel) * 2) var(--kurve-raus) forwards; }
.heu-sz-johann-fig { display: block; transform-origin: 50% 100%; animation: heu-sz-kraeht calc(var(--takt-tipp) * 7) var(--kurve-weich) calc(var(--takt-wechsel) * 2) 2; } .heu-sz-johann-fig svg { display: block; width: 100%; height: auto; }
.heu-sz-krone { position: absolute; left: 50%; top: -2.2cqw; width: 6cqw; height: auto; transform: translateX(-50%); z-index: 1; }
.heu-sz-kraeht { position: absolute; left: 70%; top: -5cqw; padding: 2px 8px; border-radius: 10px; background: #fff; color: #3a230d; font-size: 12px; font-weight: 800; white-space: nowrap; opacity: 0; animation: heu-sz-vor calc(var(--takt-tipp) * 3) var(--kurve-raus) calc(var(--takt-wechsel) * 2) forwards; }
.heu-anl-ueber { position: absolute; left: 0; top: 44px; width: 100%; height: auto; z-index: 4; pointer-events: none; display: block; }
body[data-heuleiter="weg"] .heu-anl-ueber { top: calc(env(safe-area-inset-top, 0px) + 44px); }
.heu-anl-licht { transform-box: fill-box; transform-origin: 50% 50%; animation: heu-lichter calc(var(--takt-auftritt) * 4) var(--kurve-weich) infinite; }
.heu-anl-konfetti { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.heu-anl-konfetti i { position: absolute; top: -4%; width: 6px; height: 10px; border-radius: 1px; opacity: 0; animation: heu-anl-fall calc(var(--takt-wechsel) * 13) linear infinite; }
@keyframes heu-sz-vor { from { opacity: 0; transform: translateX(-14cqw); } to { opacity: 1; transform: translateX(0); } }
@keyframes heu-sz-weg { from { opacity: 1; } to { opacity: 0; } }
@keyframes heu-sz-huf { 0% { opacity: 0; transform: translateX(0) rotate(0); } 15% { opacity: 1; } 55% { opacity: 1; transform: translateX(40cqw) rotate(25deg); } 100% { opacity: 0; transform: translateX(40cqw) rotate(25deg); } }
@keyframes heu-sz-kraeht { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-1.2cqw) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
@keyframes heu-anl-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, 120cqw) rotate(300deg); } }

/* ===== Nr. 289 (Tiere so lebendig wie möglich): Blick, Kopf, Gähnen, Abschütteln, Welle, Scrollen, Pause ===== */
/* D: Blick folgt dem Zeiger (js/tier-bewegung.js setzt --ptr-x/-y und --blick-dreh; Begegnungen und Marotten aus Nr. 131 mit data-blick-x gehen vor). Der Kopf dreht über die Einzel-Eigenschaft rotate mit (höchstens 7°), das Neigen per transform bleibt. */
svg[data-blick-ptr] .blick { translate: calc(var(--ptr-x, 0) * var(--bm, 3px)) calc(var(--ptr-y, 0) * var(--bm, 3px)); }
.kopf-neig { rotate: var(--blick-dreh, 0deg); }
html.tiere-aus svg[data-blick-ptr] .blick { translate: calc(var(--gx, 0) * var(--bm, 3px)) calc(var(--gy, 0) * var(--bm, 3px)); }
html.tiere-aus .kopf-neig { rotate: none; }
@media (prefers-reduced-motion: reduce) { svg[data-blick-ptr] .blick { translate: calc(var(--gx, 0) * var(--bm, 3px)) calc(var(--gy, 0) * var(--bm, 3px)); } .kopf-neig { rotate: none; } }
/* E/G: Gähnen (auch aus Ansteckung): Kopf führt, Körper folgt */
.tier-gaehnt { transform-origin: 50% 100%; animation: tier-gaehnt calc(var(--takt-auftritt) * 3 * var(--tier-tempo, 1)) var(--kurve-weich) 1; }
.tier-gaehnt .kopf-neig { animation: tier-gaehnt-kopf calc(var(--takt-auftritt) * 3 * var(--tier-tempo, 1)) var(--kurve-weich) 1; }
@keyframes tier-gaehnt { 0%, 100% { transform: none; } 34%, 66% { transform: translateY(-3px) rotate(-3deg) scaleY(1.05); } }
@keyframes tier-gaehnt-kopf { 0%, 100% { rotate: 0deg; } 22%, 60% { rotate: -9deg; } }
/* H: Abschütteln nach Regen oder Schnee: Kopf zuerst, Körper 90 ms später, Ohren fliegen mit, Tropfen oder Flocken spritzen */
.tier-schuettelt { transform-origin: 50% 80%; animation: tier-schuett calc(var(--takt-auftritt) * 2) var(--kurve-weich) 90ms 1; }
.tier-schuettelt .kopf-neig { animation: tier-schuett-kopf calc(var(--takt-auftritt) * 2) var(--kurve-weich) 1; }
.tier-schuettelt .ohr-zuck { animation: ohr-nach calc(var(--takt-tipp) * 3) linear 2; }
@keyframes tier-schuett { 0%, 100% { transform: none; } 12% { transform: rotate(-5deg) scaleX(1.03); } 28% { transform: rotate(5deg); } 44% { transform: rotate(-4deg) scaleX(1.02); } 60% { transform: rotate(3deg); } 78% { transform: rotate(-1.5deg); } }
@keyframes tier-schuett-kopf { 0%, 100% { rotate: 0deg; } 10% { rotate: -11deg; } 25% { rotate: 11deg; } 40% { rotate: -9deg; } 56% { rotate: 7deg; } 74% { rotate: -3deg; } }
.tier-tropfen { position: absolute; z-index: 3; width: 5px; height: 7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #7fb3e0; border: 1px solid #2b2622; opacity: 0; pointer-events: none; animation: tier-tropf calc(var(--takt-auftritt) * 1.5) var(--kurve-raus) var(--tropf-v, 0s) 1 both; }
.tier-tropfen.tier-flocke { width: 6px; height: 6px; border-radius: 50%; background: #ffffff; border-color: #c9d6e2; }
@keyframes tier-tropf { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--dx, 10px), var(--dy, 14px)); } }
/* G: Welle (die Tiere springen nacheinander, 110 ms Versatz) mit etwas Konfetti */
.tier-welle { animation: zaun-sprung calc(var(--takt-auftritt) * 1.5) var(--kurve-weich) var(--welle-v, 0s) 1 both; }
.tier-konfetti { position: absolute; z-index: 3; top: 18px; width: 5px; height: 8px; border-radius: 1px; opacity: 0; pointer-events: none; animation: tier-konfetti calc(var(--takt-auftritt) * 3) var(--kurve-raus) var(--konf-v, 0s) 1 both; }
@keyframes tier-konfetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx, 0px), 110px) rotate(540deg); } }
/* I: schnelles Wischen nach unten: die Tiere ducken sich kurz (gestaucht); die Eigenschaft scale kollidiert nicht mit transform */
.tier-duckt .zaun-innen { scale: 1.04 .93; transition: scale var(--takt-tipp) var(--kurve-raus); }
/* K: Bühne nicht sichtbar oder Seite verborgen: alle Dauer-Animationen in der Kopfzeile pausieren (spart Akku) */
html.tier-pausiert #kopfzeile *, html.tier-pausiert #kopfzeile *::before, html.tier-pausiert #kopfzeile *::after { animation-play-state: paused !important; }
html.tiere-aus :is(.tier-gaehnt, .tier-schuettelt, .tier-welle, .tier-konfetti, .tier-tropfen), html.tiere-aus :is(.tier-gaehnt, .tier-schuettelt) .kopf-neig { animation: none !important; }
@media (prefers-reduced-motion: reduce) { :is(.tier-gaehnt, .tier-schuettelt, .tier-welle, .tier-konfetti, .tier-tropfen), :is(.tier-gaehnt, .tier-schuettelt) .kopf-neig { animation: none !important; } .tier-duckt .zaun-innen { scale: none; } }
#kopfzeile.kopf-fest :is(.tier-gaehnt, .tier-schuettelt, .tier-welle, .tier-konfetti, .tier-tropfen) { animation: none !important; }

/* Nr. 237: Jahresrückblick je Pferd – beim Drucken/PDF nur das Fenster */
@media print {
    body.jr-druck > *:not(#jrModal) { display: none !important; }
    body.jr-druck #jrModal { position: static !important; display: block !important; background: none !important; }
    body.jr-druck #jrInhalt { max-height: none !important; overflow: visible !important; box-shadow: none !important; max-width: none !important; }
    body.jr-druck #jrInhalt .akte-nicht-drucken { display: none !important; }
}

/* Nr. 322: Aktivitäten-Liste – Kreis links in der Zeile (leer = offen, gefüllt mit Haken = erledigt), 36 px */
.akt-kreis { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 999px; border: 2px solid var(--st-linie); background: var(--st-flaeche); display: inline-flex; align-items: center; justify-content: center; }
.akt-kachel { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }  /* Nr. 365: Symbol-Kachel der Tätigkeit */
.akt-kachel-offen { background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
.akt-kachel-an { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
@media (max-width: 360px) { .akt-kachel { width: 36px; height: 36px; font-size: 20px; } }
.akt-kreis-an { border-color: var(--st-haupt); background: var(--st-haupt); color: var(--st-haupt-text); }

/* Nr. 305 G1: „Spielereien zeigen“ aus (Profil › Konto): Wochenkarte, Punkte/Top-Mover; Abzeichen an der Pferdekarte lässt js/pferde.js weg */
html.ohne-spielereien #mod_topmover, html.ohne-spielereien #topMoverSection, html.ohne-spielereien #weekRankingList, html.ohne-spielereien .akt-top { display: none !important; }

/* Nr. 305 D2 / Nr. 391: Schnellknöpfe am Dashboard – Primär-Anker volle Breite oben, 2–3 Sekundär-Kacheln ruhig darunter; bei 200 % Systemschrift alle untereinander */
#heuteSchnell.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr)); }
#heuteSchnell.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
#heuteSchnell > .heute-schnell-haupt { grid-column: 1 / -1; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 10px 16px; border-radius: 18px; }
#heuteSchnell > .heute-schnell-haupt > i { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .18); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
#heuteSchnell > .heute-schnell-haupt::after { content: '\203A'; margin-left: auto; font-size: 1.25rem; line-height: 1; opacity: .85; }
#heuteSchnell > .heute-schnell-sek { background: var(--st-flaeche); color: var(--st-text); min-height: 72px; padding: 10px 8px; gap: 5px; border-radius: 18px; }
#heuteSchnell > .heute-schnell-sek > i { width: 30px; height: 30px; border-radius: 9px; background: var(--st-flaeche-gedaempft); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
/* Nr. 305 D2: Reiter-Leiste kürzt die Beschriftung bei großer Schrift (…), läuft nie über */
#untereLeiste > div > button { flex: 1 1 0; min-width: 0; }
#untereLeiste > div > button > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[style*="font-size"] #untereLeiste > div > button { flex-basis: auto; }  /* Nr. 374: bei großer Schrift bekommt jeder Reiter so viel Breite, wie sein Wort braucht („Dashboard“ bleibt bei 125 % ganz) */
@media (max-width: 374px) { #untereLeiste > div > button { flex-basis: auto; } }  /* Nr. 374: auf schmalen Handys bekommt „Dashboard“ Luft zum Rand */
/* Nr. 374: Leiste im Stil „freundlich“. Aktiver Reiter (aria-current) mit weicher Pille hinter dem Symbol; Schriftschnitt überall gleich, nichts springt */
#untereLeiste { background: var(--st-flaeche); border-top: 1px solid var(--st-linie); }
#untereLeiste > div > button { color: var(--st-text-gedaempft); font-weight: 600; }
#untereLeiste > div > button > i { display: inline-flex; align-items: center; justify-content: center; width: 52px; max-width: 100%; height: 28px; border-radius: 999px; }
#untereLeiste > div > button[aria-current="page"] { color: var(--st-text); }
#untereLeiste > div > button[aria-current="page"] > i { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
/* Nr. 374: Meldung unten (js/ui.js showToast): umgekehrt zum Grund, in Hell und Dunkel klar abgesetzt; Fehler im Gefahr-Ton mit kräftigem Rand */
#toast { background: var(--st-text); color: var(--st-grund); border: 2px solid var(--st-text); }
#toast.toast-fehler { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); border-color: var(--st-ton-gefahr-text); }
#toast .toast-knopf { background: var(--st-flaeche-gedaempft); color: var(--st-text); }
#toast.toast-fehler .toast-knopf { background: var(--st-ton-gefahr-text); color: var(--st-ton-gefahr); }
#calAktionen .bs-filter { padding: 0 12px; }  /* Nr. 374: Meine, Filter, Tauschen und „+ Eintrag“ bleiben bei 360 px in einer Zeile */
/* ===== Nr. 388 (auf Basis Nr. 334): Heuleiter im 3-Stockwerke-Stall (EG 0–5 Stallgasse, OG 6–10 Heubühne, DG 11–15 Dachstuhl) im Zaunbrett-2.0-Stil.
   Alle vertikalen Maße sind Bruchteile von --f (= fh cqw). Kamera (--cam) bewegt .heu-welt. Keine Duplikate mehr. ===== */
.heu-szene { --heu-wand-a: #e9c88e; --heu-wand-b: #f6e2b6; --heu-wand-c: #efd29c; --heu-balken-a: #c08a52; --heu-balken-b: #8b582c; --heu-boden-a: #e7c26a; --heu-boden-b: #d6aa4c; --heu-huegel-a: #8bb87b; --heu-huegel-b: #6da35c; --heu-sonne-a: 1; --heu-sonne-y: 0%; --heu-sonne-farbe: #ffd84d; background: var(--heu-wand-b); }
.heu-szene[data-tageszeit="morgen"] { --heu-sonne-y: 18%; --heu-huegel-a: #98bf86; --heu-huegel-b: #76a667; }
.heu-szene[data-tageszeit="abend"] { --heu-sonne-y: 52%; --heu-sonne-farbe: #ff8a3c; --heu-wand-a: #e6bd86; --heu-wand-c: #e2bb82; --heu-huegel-a: #7e8d58; --heu-huegel-b: #5c6a3f; }
.heu-szene[data-tageszeit="nacht"] { --heu-sonne-a: 0; --heu-huegel-a: #3b5835; --heu-huegel-b: #2b4326; }
.heu-szene[data-kulisse="winter"] { --heu-wand-a: #e6edf4; --heu-wand-b: #dde6ef; --heu-wand-c: #d3dde8; --heu-balken-a: #7a6250; --heu-balken-b: #5a4636; --heu-huegel-a: #e9eff5; --heu-huegel-b: #cfdbe6; }
.heu-szene[data-kulisse="alm"] { --heu-wand-a: #dfb784; --heu-wand-b: #d9b27c; --heu-wand-c: #cfa573; }
.heu-szene[data-kulisse="heuboden"] { --heu-wand-a: #f6e7b0; --heu-wand-b: #f3e2a8; --heu-wand-c: #ecd898; --heu-boden-a: #d9aa5a; --heu-boden-b: #c89a4e; }
.heu-szene[data-kulisse="sterne"] { --heu-wand-a: #d4c39a; --heu-wand-b: #cdbb90; --heu-wand-c: #c2b085; }
.heu-welt { --f: calc(var(--heu-fh, 56) * 1cqw - var(--oben, 0px)); width: 100cqw; height: var(--f); transform: none; transition: none; }
.heu-welt > * { position: absolute; }
.heu-szene[data-kam] { aspect-ratio: 100 / var(--heu-wh, 56); }
.heu-szene[data-kam] > .heu-welt { transform: translateY(calc(var(--cam, 0) * -1cqw)); transition: transform var(--heu-kam-dauer) var(--heu-kam-kurve); }
.heu-szene[data-rolle="start"] { aspect-ratio: 100 / 48; border-radius: 20px; }
.heu-szene[data-rolle="start"] > .heu-welt { left: 22cqw; }
.heu-szene[data-rolle="start"] .heu-m-wand { left: -22cqw; }
.heu-szene[data-rolle="ende"] { aspect-ratio: 100 / 54; }
.heu-m-wand { inset: 0; background: repeating-linear-gradient(90deg, rgba(150, 100, 40, .09) 0 2px, transparent 2px 10cqw), linear-gradient(var(--heu-wand-a), var(--heu-wand-b) 55%, var(--heu-wand-c)); }
.heu-m-dg-dach { left: 0; top: 0; width: 100%; height: calc(var(--f) * .22); pointer-events: none; z-index: 1; }
.heu-m-dg-dach svg { display: block; width: 100%; height: 100%; }
.heu-m-bg-heu { left: 0; top: calc(var(--f) * .46); width: 100%; height: calc(var(--f) * .207); pointer-events: none; opacity: .72; }
.heu-m-bg-heu svg { display: block; width: 100%; height: 100%; }
.heu-m-balken { left: -2cqw; right: -2cqw; border-radius: 999px; background: linear-gradient(var(--heu-balken-a), var(--heu-balken-b)); border: 1.5px solid #2b2622; box-shadow: 0 2px 5px rgba(90, 50, 10, .24); z-index: 1; }
.heu-m-balken-oben { top: calc(var(--f) * -.02); height: calc(var(--f) * .05); }
.heu-m-balken-dg { top: calc(var(--f) * .433); height: min(calc(var(--f) * .03), 3.2cqw); }
.heu-m-balken-quer { top: calc(var(--f) * .667); height: max(7px, min(calc(var(--f) * .03), 3.2cqw)); }
.heu-m-boden { left: 0; right: 0; bottom: 0; height: calc(var(--f) * .08); background: linear-gradient(var(--heu-boden-a), var(--heu-boden-b)); border-top: 2px solid #2b2622; z-index: 1; }
.heu-m-halme { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 0; }
.heu-m-halme i { position: absolute; bottom: 0; width: 2px; height: calc(var(--h) * 1cqw); border-radius: 2px; background: var(--heu-boden-a); transform-origin: 50% 100%; transform: rotate(var(--w)); }
.heu-m-strahl { background: linear-gradient(170deg, rgba(255, 244, 190, .48), rgba(255, 244, 190, 0) 76%); opacity: .65; pointer-events: none; z-index: 1; }
.heu-m-strahl-eg { left: 38cqw; top: calc(var(--f) * .705); width: 52cqw; height: calc(var(--f) * .215); clip-path: polygon(35% 0, 96% 0, 72% 100%, 0 100%); }
.heu-m-strahl-og { left: 42cqw; top: calc(var(--f) * .62); width: 49cqw; height: calc(var(--f) * .047); clip-path: polygon(40% 0, 100% 0, 78% 100%, 0 100%); }
.heu-m-strahl-dg { left: 46cqw; top: calc(var(--f) * .28); width: 43cqw; height: calc(var(--f) * .153); clip-path: polygon(44% 0, 98% 0, 72% 100%, 0 100%); }
.heu-szene:is([data-tageszeit="nacht"], [data-wetter="regen"], [data-wetter="schnee"], [data-wetter="nebel"]) .heu-m-strahl { opacity: 0; animation: none; }
/* EG: Halboffene geteilte Stalltür + Hügel & Bahri */
.heu-m-tuer { left: 57cqw; top: calc(var(--f) * .705); width: 34cqw; height: calc(var(--f) * .215); border: 2px solid #2b2622; border-bottom: 0; border-radius: 6px 6px 0 0; background: #6b4423; z-index: 1; overflow: visible; }
.heu-m-tuer-oben { position: relative; width: 100%; height: 56%; overflow: hidden; border-radius: 4px 4px 0 0; border-bottom: 2px solid #2b2622; }
.heu-m-tuer-oben .heu-m-huegel { position: absolute; left: 0; bottom: 0; width: 100%; height: 42%; pointer-events: none; }
.heu-tuer-pferd { position: absolute; left: 50%; bottom: -1px; width: 52%; transform: translateX(-50%); pointer-events: none; z-index: 2; }
.heu-tuer-pferd svg { display: block; width: 100%; height: auto; }
.heu-m-tuer-fluegel { position: absolute; left: -6.5cqw; top: 0; width: 6.5cqw; height: 56%; background: linear-gradient(90deg, #8b582c, #a46b38); border: 2px solid #2b2622; border-right: 0; border-radius: 4px 0 0 2px; box-shadow: inset 0 0 0 1px rgba(255, 240, 210, .18); }
.heu-m-tuer-unten { position: relative; width: 100%; height: 44%; background: repeating-linear-gradient(90deg, #9a6432 0 16%, #885426 16% 18%), #9a6432; }
.heu-m-tuer-riegel { position: absolute; left: 10%; top: 24%; width: 22%; height: 4px; border-radius: 2px; background: #4d5866; border: 1px solid #2b2622; }
.heu-m-tuer-pfuetze { position: absolute; left: 12%; right: 12%; bottom: -5px; height: 7px; border-radius: 50%; background: rgba(111, 168, 216, .85); border: 1px solid #3c6e99; opacity: 0; pointer-events: none; z-index: 2; }
.heu-szene[data-wetter="regen"] .heu-m-tuer-pfuetze { opacity: 1; }
/* OG: Rundbogenfenster + Blumenkasten */
.heu-m-fenster { left: 62cqw; top: calc(var(--f) * .465); width: 29cqw; height: calc(var(--f) * .155); box-sizing: border-box; border: max(3px, .9cqw) solid #2b2622; outline: max(2px, .6cqw) solid #9a6a38; outline-offset: calc(-1 * max(3px, .9cqw)); border-radius: 999px 999px 6px 6px; overflow: hidden; background: #fff; z-index: 1; }
.heu-m-himmel { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(var(--heu-himmel-oben), var(--heu-himmel-unten)); }
.heu-m-sonne { position: absolute; right: 12%; top: calc(14% + var(--heu-sonne-y)); width: 24%; aspect-ratio: 1; border-radius: 50%; background: var(--heu-sonne-farbe); box-shadow: 0 0 14px var(--heu-sonne-farbe); opacity: var(--heu-sonne-a); }
.heu-m-mond { position: absolute; left: 18%; top: 14%; width: 20%; aspect-ratio: 1; border-radius: 50%; background: #fff3b8; box-shadow: inset -4px -2px 0 rgba(160, 140, 80, .35); opacity: var(--heu-sterne-a); }
.heu-m-sterne { position: absolute; inset: 0; opacity: var(--heu-sterne-a); }
.heu-m-sterne i { position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%; background: #fff; }
.heu-m-wolke { position: absolute; left: 6%; top: 22%; width: 44%; height: 18%; border-radius: 99px; background: #fff; opacity: calc(.9 - var(--heu-sterne-a) * .75); }
.heu-m-wolke-2 { left: 44%; top: 52%; width: 34%; height: 14%; }
.heu-m-kreuz { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 47%, #8b582c 47% 53%, transparent 53%), linear-gradient(transparent 47%, #8b582c 47% 53%, transparent 53%); }
.heu-fenster-wetter { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.heu-m-kiste { left: 60.5cqw; top: calc(var(--f) * .618); width: 32cqw; height: max(8px, calc(var(--f) * .026)); border-radius: 4px; background: linear-gradient(#c58a4e, #9a6432); border: 1.5px solid #2b2622; box-shadow: 0 2px 4px rgba(90, 50, 10, .25); z-index: 2; }
.heu-m-blumen { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); }
.heu-m-blume { position: absolute; bottom: 0; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--f2); border: 1px solid #2b2622; box-shadow: inset 0 0 0 .5cqw rgba(255, 255, 255, .5); transform-origin: 50% 200%; }
.heu-m-blume::after { content: ""; position: absolute; left: calc(50% - 1px); top: 100%; width: 2px; height: 2.1cqw; background: #5aa65a; }
/* DG: Giebel-Dachluke + Ecknetz + Hängelaterne im OG */
.heu-m-luke-fenster { left: 65cqw; top: calc(var(--f) * .15); width: 25cqw; height: calc(var(--f) * .135); box-sizing: border-box; border: 2px solid #2b2622; border-radius: 6px; overflow: hidden; background: #fff; z-index: 1; }
.heu-m-luke-kreuz { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 47%, #6e4520 47% 53%, transparent 53%), linear-gradient(transparent 47%, #6e4520 47% 53%, transparent 53%); }
.heu-m-luke-laden { position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: #8b582c; z-index: 2; }
.heu-m-ecknetz { left: 50cqw; top: calc(var(--f) * .03); width: 12cqw; height: auto; pointer-events: none; z-index: 2; }
.heu-m-laterne { left: 43cqw; top: calc(var(--f) * .438); width: 0; height: 0; transform-origin: 0 0; }
.heu-m-seil { position: absolute; left: -1px; top: 0; width: 2px; height: 8cqw; background: #2b2622; }
.heu-m-lkorb { position: absolute; left: -3.2cqw; top: 7.5cqw; width: 6.4cqw; height: 7.5cqw; display: block; }
.heu-m-laterne-svg { display: block; width: 100%; height: 100%; }
.heu-m-flamme { position: absolute; left: 2.2cqw; top: 3.1cqw; width: 2cqw; height: 2.8cqw; border-radius: 50% 50% 40% 40%; background: #ffd27a; opacity: calc(.2 + var(--heu-laterne-a) * .8); }
.heu-m-glow { position: absolute; left: -14cqw; top: -2cqw; width: 28cqw; height: 28cqw; border-radius: 50%; background: radial-gradient(rgba(255, 210, 122, .6), transparent 65%); opacity: var(--heu-laterne-a); pointer-events: none; }
/* Eingebrannte Stufen-Marken & Schilder */
.heu-m-stufenzahlen { inset: 0; pointer-events: none; z-index: 2; }
.heu-stufe-zahl { position: absolute; left: 27.2cqw; top: calc(var(--f) * var(--y) / 100); transform: translateY(-50%); min-width: 18px; padding: 1px 5px; border-radius: 6px; background: rgba(94, 62, 34, .82); border: 1.5px solid #2b2622; color: #fff6e0; font-size: 12px; font-weight: 800; text-align: center; line-height: 1.2; }
.heu-stufe-zahl[data-erreicht="1"] { background: #e8c15a; color: #2b1a0a; }
.heu-m-schilder { inset: 0; pointer-events: none; }
.heu-schild { position: absolute; left: 48cqw; top: calc(var(--f) * var(--y) / 100 + 3.4cqw); transform: none; padding: 2px 9px; border-radius: 12px; background: rgba(255, 252, 240, .92); color: #6e4c28; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: 0 1px 3px rgba(90, 50, 10, .18); }
.heu-schild b { font-weight: 800; }
.heu-schild[data-erreicht="1"] { background: #fff3cf; color: #9a6a12; box-shadow: inset 0 0 0 1.5px #ffcf4d; }
.heu-schild[data-jetzt="1"] { background: #ffcf4d; color: #4a3420; box-shadow: 0 2px 6px rgba(150, 100, 10, .35); animation: heu-schild-puls calc(var(--takt-auftritt) * 3) var(--kurve-weich) infinite; }
html.dark .heu-schild { background: rgba(48, 36, 22, .9); color: #f0d8a0; } html.dark .heu-schild[data-erreicht="1"] { background: #4a3a1a; color: #ffd870; } html.dark .heu-schild[data-jetzt="1"] { background: #e0b038; color: #2a1a0d; }
@keyframes heu-schild-puls { 50% { transform: scale(1.06); } }
.heu-korb-wrap { left: 29cqw; top: calc(var(--f) * .055); width: 16cqw; pointer-events: none; }
.heu-korb { display: block; width: 100%; height: auto; overflow: visible; }
.heu-korb-leib { fill: #d29a5a; stroke: #2b2622; stroke-width: 1.8; stroke-linejoin: round; } .heu-korb-flecht { fill: none; stroke: #8a5a2b; stroke-width: 1.2; stroke-linecap: round; } .heu-korb-henkel { fill: none; stroke: #6b4423; stroke-width: 2; stroke-linecap: round; }
.heu-korb-ballen { fill: #f2cf62; stroke: #2b2622; stroke-width: 1.1; }
.heu-welt-svg { left: 0; top: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.heu-welt-svg .heu-holm-rand { stroke: #2b2622; stroke-width: 3.1; stroke-linecap: round; }
.heu-welt-svg .heu-holm { stroke: #a9773f; stroke-width: 2.1; stroke-linecap: round; }
.heu-welt-svg .heu-holm-licht { stroke: rgba(255, 240, 210, .38); stroke-width: .45; stroke-linecap: round; }
.heu-welt-svg .heu-plat-stuetze { fill: #6b4423; stroke: #2b2622; stroke-width: .5; stroke-linejoin: round; }
.heu-welt-svg .heu-sprosse-linie { stroke: #c49a62; stroke-width: 1.4; stroke-linecap: round; }
.heu-welt-svg .heu-sprosse-linie[data-erreicht="1"] { stroke: #ffcf4d; filter: drop-shadow(0 0 3px rgba(255, 207, 77, .9)); }
.heu-welt-svg .heu-netz-szene path { fill: none; stroke: #3f7a3f; stroke-width: 1.6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; } .heu-welt-svg .heu-netz-szene path:first-child { fill: rgba(255, 255, 255, .25); }
.heu-welt-svg .heu-netz-szene[data-aktiv="0"] { opacity: .6; }
.heu-m-ton { inset: 0; background: var(--heu-ton); opacity: var(--heu-ton-a); pointer-events: none; }
.heu-kar { width: calc(var(--kb, 22) * 1cqw); }
.heu-gary { left: 48.5cqw; top: calc(var(--f) * .667); width: 11cqw; z-index: 3; }
.heu-plumps { left: 33cqw; top: calc(var(--f) * .16); }
.heu-zuschauer { left: auto; right: 2cqw; bottom: calc(var(--heu-fh, 145) * .03cqw); justify-content: flex-end; gap: 1cqw; padding: 0; background: none; }
.heu-mini { position: relative; } .heu-mini > * { position: absolute; }
/* Frage als weiche grüne Karte, Antworten als große runde Kacheln */
.heu-tafel { background: linear-gradient(#477f62, #3b6d53); color: #fff; border-radius: 22px; box-shadow: 0 6px 16px rgba(40, 80, 55, .28); }
html.dark .heu-tafel { background: linear-gradient(#2f5a44, #264b39); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.heu-tafel-klein { color: #d6ebdd; }
.heu-etiketten > :nth-child(odd), .heu-etiketten > :nth-child(even) { rotate: 0deg; }
.heu-etikett::before, .heu-kordel { display: none; }
.heu-antwort.heu-etikett { padding-top: 10px; padding-bottom: 10px; border-radius: 20px; }
.heu-antwort.heu-etikett[data-zustand="normal"] { background: #fff; box-shadow: 0 3px 0 #ecdcb8, 0 6px 12px rgba(120, 80, 20, .12); }
html.dark .heu-antwort.heu-etikett[data-zustand="normal"] { background: var(--heu-karte); box-shadow: 0 3px 0 #2a1a0d, 0 6px 12px rgba(0, 0, 0, .3); }
.heu-antwort.heu-etikett .heu-buchstabe { background: #ffe9b8; color: #9a6a12; }
body[data-heuleiter="weg"], body[data-heuleiter="weg"] #inhalt, body[data-heuleiter="weg"] .heu-wurzel.heu-breit { background: #fbf3df; }
html.dark body[data-heuleiter="weg"], html.dark body[data-heuleiter="weg"] #inhalt, html.dark body[data-heuleiter="weg"] .heu-wurzel.heu-breit { background: #231a10; }
/* Karoline steht über --yf (Anteil der Höhe), --oben gilt nur im Handy-/Vollbildquiz */
.heu-welt { --f: calc(var(--heu-fh, 56) * 1cqw - var(--oben, 0px)); height: var(--f); }
.heu-m-wand { top: calc(var(--oben, 0px) * -1); }
.heu-kar { transform: translate(calc(var(--kx) * 1cqw), calc(var(--f) * var(--yf, 0) - var(--kb, 22) * .9cqw)); }
body[data-heuleiter="weg"] .heu-szene { --oben: 44px; }
body[data-heuleiter="weg"] .heu-szene > .heu-welt { top: calc(env(safe-area-inset-top, 0px) + var(--oben)); }
body[data-heuleiter="weg"] .heu-szene[data-rolle] { --oben: 0px; }
body[data-heuleiter="weg"] .heu-szene[data-rolle] > .heu-welt { top: 0; }
body[data-heuleiter="weg"] .heu-szene-blase { top: -3cqw; }
.heu-m-ton { top: calc(var(--oben, 0px) * -1); }

/* ===== Nr. 334 C/D: Leben im Hintergrund und Wetter (js/heu-szene-leben.js). Nur transform/opacity; still bei „Bewegung reduzieren“/„Tiere aus“/ruhiger Darstellung (Regeln bei .heu-wurzel) ===== */
.heu-m-glow, .heu-m-schilder { z-index: 2; } .heu-m-laterne { z-index: 4; } .heu-m-ton { z-index: 1; }
.heu-szene[data-tageszeit="nacht"] { --heu-ton: #0a1236; --heu-ton-a: .5; }
.heu-szene[data-wetter="regen"]:not([data-tageszeit="nacht"]) { --heu-himmel-oben: #6f7b88; --heu-himmel-unten: #a9b4bf; --heu-sonne-a: 0; --heu-ton: #5a6674; --heu-ton-a: .16; }
.heu-szene[data-wetter="schnee"]:not([data-tageszeit="nacht"]) { --heu-himmel-oben: #aebdcc; --heu-himmel-unten: #e3ebf2; --heu-sonne-a: 0; --heu-ton: #cfe4ff; --heu-ton-a: .16; --heu-laterne-a: 1; }
.heu-szene[data-wetter="nebel"]:not([data-tageszeit="nacht"]) { --heu-himmel-oben: #cdd5dc; --heu-himmel-unten: #e8ecef; --heu-sonne-a: .3; }
.heu-szene[data-wetter="regen"] .heu-m-wolke, .heu-szene[data-wetter="schnee"] .heu-m-wolke { background: #dfe5ea; opacity: .95; }
.heu-szene[data-wetter="schnee"] .heu-m-kiste::before { content: ""; position: absolute; left: 3%; right: 3%; top: -3px; height: 7px; border-radius: 6px 6px 3px 3px; background: #fbfdff; }
.heu-szene[data-wetter="schnee"] .heu-m-blumen { display: none; }
.heu-fenster-wetter { overflow: hidden; pointer-events: none; }
/* Leben */
.heu-leben { inset: 0; pointer-events: none; }
.heu-fliege { position: absolute; width: 8px; height: 6px; animation: heu-flug calc(var(--takt-ruhe) * var(--m, 1.75)) var(--kurve-weich) infinite; }
.heu-fliege i { position: absolute; inset: 0; border-radius: 50%; background: #3a3a3a; }
.heu-fliege::before, .heu-fliege::after { content: ""; position: absolute; top: -4px; width: 6px; height: 5px; border-radius: 50%; background: rgba(220, 235, 255, .85); animation: heu-fluegel calc(var(--takt-tipp) * .5) var(--kurve-weich) infinite alternate; }
.heu-fliege::before { left: -3px; } .heu-fliege::after { right: -3px; }
.heu-falter { position: absolute; width: 20px; height: 12px; animation: heu-flug calc(var(--takt-ruhe) * 2.75) var(--kurve-weich) infinite; }
.heu-falter i { position: absolute; top: 0; width: 10px; height: 12px; border-radius: 60% 60% 40% 40%; background: #ffb347; animation: heu-flatter calc(var(--takt-tipp) * 1.7) var(--kurve-weich) infinite alternate; }
.heu-falter i:first-child { left: 0; transform-origin: right center; } .heu-falter i:last-child { left: 10px; transform-origin: left center; }
.heu-muecken { position: absolute; left: 43cqw; top: 0; width: 0; height: 0; }
.heu-muecke { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #4a3a2a; opacity: .85; animation: heu-summen calc(var(--takt-wechsel) * 5.6) var(--kurve-weich) infinite; }
.heu-gluehwuermchen { z-index: 3; }
.heu-m-strahl { animation: heu-schimmer calc(var(--takt-ruhe) * 1.25) var(--kurve-weich) infinite; }
.heu-m-wolke { animation: heu-wolke calc(var(--takt-ruhe) * 10) var(--kurve-weich) infinite alternate; } .heu-m-wolke-2 { animation-duration: calc(var(--takt-ruhe) * 13); animation-direction: alternate-reverse; }
.heu-m-blume { animation: heu-wipp calc(var(--takt-ruhe) * .75) var(--kurve-weich) infinite alternate; }
.heu-m-laterne { animation: heu-schaukel calc(var(--takt-tipp) * 31) var(--kurve-weich) infinite alternate; }
.heu-m-flamme { animation: heu-flacker calc(var(--takt-tipp) * 3) var(--kurve-weich) infinite alternate; }
.heu-m-sterne i { animation: heu-funkeln calc(var(--takt-auftritt) * 5) var(--kurve-weich) infinite alternate; }
.heu-m-sonne { animation: heu-flacker calc(var(--takt-ruhe) * .6) var(--kurve-weich) infinite alternate; }
/* Kübel (Regen): fängt Wasser am Stallboden rechts vom Hahn; nur bei Regen sichtbar */
.heu-kuebel { display: none; position: absolute; left: 50.5cqw; top: calc(var(--f) * .92 - 5.5cqw); width: 5.5cqw; height: 5.5cqw; z-index: 3; }
.heu-szene[data-wetter="regen"] .heu-kuebel { display: block; }
.heu-kuebel-leib { position: absolute; inset: 1.2cqw 0 0 0; border-radius: 0 0 1.2cqw 1.2cqw; background: #8d99a6; border: 1px solid #2b2622; box-shadow: inset 0 .9cqw 0 #6fa8d8; }
.heu-kuebel-tropfen { position: absolute; left: 1cqw; top: .6cqw; width: 3.4cqw; height: 1.2cqw; border-radius: 50%; background: #bfe0ff; animation: heu-kuebel-ring calc(var(--takt-tipp) * 9) var(--kurve-raus) infinite; }
.heu-szene[data-wetter="regen"] .heu-fliege, .heu-szene[data-wetter="schnee"] .heu-fliege { display: none; }
.heu-szene[data-wetter="nebel"] :is(.heu-m-fenster, .heu-m-tuer-oben, .heu-m-luke-fenster)::after { content: ""; position: absolute; inset: 0; background: rgba(235, 240, 245, .55); pointer-events: none; z-index: 3; }
@keyframes heu-flug { 0% { transform: translate(0, 0); } 20% { transform: translate(40px, -20px); } 40% { transform: translate(10px, -50px); } 55% { transform: translate(-30px, -20px); } 70% { transform: translate(-10px, 15px) rotate(20deg); } 85% { transform: translate(25px, 5px); } 100% { transform: translate(0, 0); } }
@keyframes heu-fluegel { to { transform: scaleY(.3); } }
@keyframes heu-flatter { to { transform: scaleX(.25); } }
@keyframes heu-summen { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(6px, -4px); } 50% { transform: translate(-4px, 5px); } 75% { transform: translate(5px, 3px); } }
@keyframes heu-schimmer { 50% { opacity: .45; } }
@keyframes heu-wipp { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes heu-flacker { to { transform: scale(1.12); } }
@keyframes heu-funkeln { from { opacity: .35; } to { opacity: 1; } }
/* ruhig: nichts bewegt sich (Bewegung reduzieren, Tiere aus – heu-wurzel[data-ruhig] steht schon oben –, ruhige Darstellung) */
.heu-wurzel[data-darstellung="ruhig"] .heu-szene *, .heu-wurzel[data-darstellung="ruhig"] .heu-szene { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .heu-szene *, .heu-szene { animation: none !important; } }

/* ===== Nr. 334 G: optische Höhepunkte (js/heu-hoehepunkte.js). Nur transform/opacity; bei ruhiger Bewegung greifen die Regeln bei .heu-wurzel (Farben und Haken bleiben) ===== */
/* 1 Spannung: gewählte Kachel pulsiert orange, die Szene dunkelt ab, die Tiere stellen die Ohren auf */
.heu-antwort[data-zustand="gewaehlt"] { background: #ffb347; color: #3a2108; box-shadow: 0 0 0 3px rgba(255, 140, 40, .55), 0 6px 18px rgba(255, 140, 40, .45); animation: heu-orange calc(var(--takt-auftritt) * 1.5) var(--kurve-weich) infinite alternate; }
.heu-m-ton { transition: opacity calc(var(--takt-wechsel) * 2) var(--kurve-weich); }
.heu-wurzel[data-spannung="1"] .heu-m-ton { background: #140a02; opacity: .38; }
.heu-wurzel[data-spannung="1"] .heu-zuschauer-tier { transform: translateY(-6%) scale(1.05); }
@keyframes heu-orange { to { transform: scale(1.03); } }
/* 2 Feedback: falsch = Kachel wackelt rot (heu-kippt), die richtige leuchtet grün (heu-puls); richtig = Haken, Halme, hüpfende Tiere gibt es schon */
/* 4 Ballen fliegt vom Korb zur Kopfleiste */
.heu-flug-ballen { position: fixed; left: 0; top: 0; z-index: 90; width: 22px; height: 13px; border-radius: 4px; background: #f2cf62; box-shadow: inset 0 0 0 2px #b98a22; pointer-events: none; will-change: transform, opacity; }
/* 5 Netz-Moment: Netz spannt sich (heu-netz-fall), Glitzern, Banner */
.heu-glitzer { left: 0; right: 0; height: 0; pointer-events: none; z-index: 3; }
.heu-glitzer i { position: absolute; top: 2cqw; width: 2cqw; height: 2cqw; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: heu-glitzer calc(var(--takt-auftritt) * 2) var(--kurve-raus) both; }
@keyframes heu-glitzer { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.1) rotate(60deg); } 100% { opacity: 0; transform: scale(.4) rotate(120deg); } }
.heu-szene-netztext { white-space: nowrap; background: linear-gradient(#4f9a4f, #2f7d3a); }
/* 6 Joker-Pillen: verbrauchte grau mit Haken, Bettys Joker rosa */
.heu-anhaenger[data-zustand="benutzt"] { text-decoration: none; }
.heu-anhaenger[data-zustand="benutzt"]::after { content: "✓"; font-weight: 800; color: #2f7d3a; }
.heu-anhaenger[data-joker="betty"] { background: #ffe3ea; color: #6b2a3c; }
html.dark .heu-anhaenger[data-joker="betty"] { background: #4a2a33; color: #ffd6e0; }
/* 7 Gipfel: alle Zuschauer jubeln, die Urkunde rollt sich aus */
.heu-szene[data-gipfel="1"] .heu-zuschauer-tier { animation: heu-zhupf calc(var(--takt-auftritt) * 1.5) var(--kurve-raus) infinite; animation-delay: calc(var(--k, 0) * 90ms); }
.heu-urkunde { transform-origin: 50% 0; animation: heu-urkunde-rollen calc(var(--takt-auftritt) * 2) var(--kurve-raus) both; }
@keyframes heu-urkunde-rollen { from { opacity: 0; transform: rotate(-1deg) scaleY(.06); } to { opacity: 1; transform: rotate(-1deg) scaleY(1); } }
/* 9 Zeit dezent: ein Zeiger läuft in 60 s einmal herum */
.heu-tafel { position: relative; }
.heu-zeitring { position: absolute; right: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); pointer-events: none; }
.heu-zeitring i { position: absolute; left: 6px; top: 1px; width: 2px; height: 6px; border-radius: 1px; background: #fff; transform-origin: 50% 7px; animation: heu-zeiger calc(var(--takt-ruhe) * 15) var(--kurve-weich) infinite; }
@keyframes heu-zeiger { to { transform: rotate(360deg); } }
.heu-wurzel[data-darstellung="ruhig"] .heu-urkunde, html.tiere-aus .heu-urkunde, .heu-wurzel[data-ruhig="1"] .heu-urkunde { animation: none; } @media (prefers-reduced-motion: reduce) { .heu-urkunde, .heu-antwort[data-zustand="gewaehlt"], .heu-szene[data-gipfel="1"] .heu-zuschauer-tier { animation: none; } }

/* ===== Nr. 334 E: Betty tauscht mit Karoline den Platz (js/heu-betty-frage.js). Karte rosa, Platztausch ≤ 1,2 s (nur transform/opacity), bei ruhiger Bewegung ohne Animation ===== */
.heu-tafel[data-betty="1"] { background: linear-gradient(#c8587f, #b04668); box-shadow: 0 6px 16px rgba(150, 50, 90, .3); }
html.dark .heu-tafel[data-betty="1"] { background: linear-gradient(#8a3a58, #732e4a); }
.heu-tafel[data-betty="1"] .heu-tafel-klein { color: #ffe3ec; }
.heu-kar-klein { position: absolute; left: 92%; bottom: 0; width: 52%; line-height: 0; }
.heu-kar-klein svg { display: block; width: 100%; height: auto; }
.heu-kar[data-tausch="hin"] .heu-kar-figur { animation: heu-tausch-hin calc(var(--takt-auftritt) * 2) var(--kurve-raus) both; }
.heu-kar[data-tausch="hin"] .heu-kar-klein { animation: heu-tausch-klein calc(var(--takt-auftritt) * 2) var(--kurve-raus) both; }
.heu-kar[data-tausch="zurueck"] .heu-kar-figur { animation: heu-tausch-zurueck calc(var(--takt-auftritt) * 2) var(--kurve-raus) both; }
@keyframes heu-tausch-hin { 0% { opacity: 0; transform: translateX(60%); } 60% { opacity: 1; } 100% { opacity: 1; transform: translateX(0); } }
@keyframes heu-tausch-klein { 0% { opacity: 1; transform: translateX(-160%); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes heu-tausch-zurueck { 0% { opacity: 0; transform: translateX(-40%) scale(.9); } 100% { opacity: 1; transform: translateX(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .heu-kar[data-tausch] .heu-kar-figur, .heu-kar[data-tausch] .heu-kar-klein { animation: none; } }
.heu-tafel-klein { padding-right: 26px; }

/* ===== Nr. 349: Heuleiter im Advent, richtig kitschig (js/heu-szene-extra.js). Nur transform/opacity bewegen sich; Lichthöfe sind fertige Farbverläufe (kein animierter Filter).
   Still (nur leuchten) bei „Bewegung reduzieren“, „Tiere aus“ und ruhiger Darstellung (data-adv-ruhig/data-ruhig, JS) und per Medienabfrage. ===== */
.heu-szene[data-kulisse="advent"] { --heu-wand-a: #ead8b4; --heu-wand-b: #e2cc9f; --heu-wand-c: #d6bb8a; --heu-balken-a: #7a4a34; --heu-balken-b: #5a3424; --heu-boden-a: #c89a52; --heu-boden-b: #b88742; }
.heu-adv { position: absolute; inset: 0; z-index: 1; pointer-events: none; --wf: 29cqw; }
.heu-adv-licht { position: absolute; inset: 0; background: radial-gradient(ellipse 90% 70% at 50% 22%, rgba(255, 196, 96, .3), rgba(255, 170, 60, .12) 55%, transparent 80%); }
.heu-szene[data-tageszeit="nacht"] .heu-adv-licht, .heu-szene[data-dunkel="1"] .heu-adv-licht { background: radial-gradient(ellipse 90% 70% at 50% 22%, rgba(255, 190, 90, .44), rgba(255, 150, 50, .18) 55%, transparent 82%); }
.heu-adv-ebene { position: absolute; inset: 0; }
.heu-adv-draht { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.heu-adv-draht path { fill: none; stroke: #27402b; stroke-width: 1.3px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.heu-adv-gr { position: absolute; inset: 0; animation: heu-adv-funkel calc(var(--takt-wechsel) * 6 + var(--p) * 92ms) var(--kurve-weich) infinite alternate; animation-delay: calc(var(--p) * -.4s); }
.heu-adv .l { position: absolute; width: 2cqw; height: 2.7cqw; margin: -1.1cqw 0 0 -1cqw; border-radius: 50% 50% 52% 52% / 38% 38% 62% 62%; background: var(--c); box-shadow: inset -.3cqw -.3cqw 0 rgba(0, 0, 0, .14); }
.heu-adv .l::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8cqw; height: 8cqw; margin: -4cqw 0 0 -4cqw; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 62%, transparent) 0%, transparent 66%); opacity: .62; }
.heu-szene[data-tageszeit="nacht"] .heu-adv .l::after, .heu-szene[data-dunkel="1"] .heu-adv .l::after { width: 11cqw; height: 11cqw; margin: -5.5cqw 0 0 -5.5cqw; opacity: .95; }
.heu-adv[data-mini] .l { width: 5cqw; height: 6cqw; margin: -2.5cqw 0 0 -2.5cqw; } .heu-adv[data-mini] .l::after { width: 16cqw; height: 16cqw; margin: -8cqw 0 0 -8cqw; } .heu-adv[data-mini] .heu-adv-draht path { stroke-width: .8px; }
.heu-adv[data-st="3"] .heu-adv-gr { animation: heu-adv-lauf calc(var(--takt-wechsel) * 5.6) var(--kurve-weich) infinite; animation-delay: calc(var(--p) * -.233s); }
.heu-adv[data-st="4"] .heu-adv-gr { animation: heu-adv-blink calc(var(--takt-wechsel) * 3.6) var(--kurve-weich) infinite; animation-delay: 0s; }
.heu-adv[data-st="4"] .heu-adv-gr:nth-of-type(even) { animation-delay: -.45s; }
.heu-adv-girlande { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.heu-adv-girlande path { fill: none; stroke: #2f6b3a; stroke-width: 7px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.heu-adv-girlande path.n { stroke: #6cba6c; stroke-width: 3px; stroke-dasharray: 2 5; }
.heu-adv-masche { position: absolute; top: calc(var(--f) * .03); width: 6.4cqw; height: 4.2cqw; margin: -1.6cqw 0 0 -3.2cqw; background: radial-gradient(circle at 50% 50%, #f2554e 0 15%, transparent 16%), #d8323a; clip-path: polygon(0 0, 42% 36%, 58% 36%, 100% 0, 100% 100%, 58% 64%, 42% 64%, 0 100%); }
.heu-adv-mistel { position: absolute; left: 50%; top: calc(var(--f) * .02); width: 7cqw; height: auto; margin-left: -3.5cqw; overflow: visible; }
.heu-adv-fenster { position: absolute; left: 62cqw; top: calc(var(--f) * .465); width: var(--wf); height: calc(var(--f) * .155); box-sizing: border-box; border: 1.3px solid #27402b; border-bottom: 0; border-radius: 999px 999px 0 0; }
.heu-adv-strumpf { position: absolute; top: calc(var(--f) * .685); width: 6.4cqw; height: 8.8cqw; margin-left: -3.2cqw; background: #d8323a; clip-path: polygon(14% 0, 86% 0, 86% 64%, 100% 72%, 100% 100%, 0 100%, 0 78%, 14% 68%); transform-origin: 50% 0; animation: heu-adv-schaukel calc(var(--takt-wechsel) * 13.6) var(--kurve-weich) infinite alternate; animation-delay: calc(var(--d) * -1); }
.heu-adv-strumpf b { display: block; height: 3.2cqw; background: #fffaf0; color: #8a1c24; font-size: 2.2cqw; line-height: 3.2cqw; font-weight: 800; text-align: center; overflow: hidden; white-space: nowrap; }
.heu-adv-kranz { position: absolute; left: 34cqw; top: calc(var(--f) * .667 - 9.8cqw); width: 11cqw; height: auto; overflow: visible; }
.heu-adv-baum { position: absolute; left: -1.5cqw; bottom: calc(var(--f) * .075); width: 14cqw; height: min(25cqw, calc(var(--f) * .45)); overflow: visible; }
.heu-adv-korbstern { position: absolute; left: 23cqw; top: calc(var(--f) * .10); width: 8cqw; height: 8cqw; overflow: visible; animation: heu-adv-puls calc(var(--takt-wechsel) * 5.6) var(--kurve-weich) infinite alternate; }
.heu-adv-flamme { transform-box: fill-box; transform-origin: 50% 100%; animation: heu-adv-flacker calc(var(--takt-tipp) * 3.3) var(--kurve-weich) infinite alternate; animation-delay: var(--d); }
.heu-adv-glitz { animation: heu-adv-funkel calc(var(--takt-wechsel) * 5.2) var(--kurve-weich) infinite alternate; animation-delay: var(--d); }
.heu-adv-stern { transform-box: fill-box; transform-origin: 50% 50%; animation: heu-adv-puls calc(var(--takt-wechsel) * 6.4) var(--kurve-weich) infinite alternate; }
.heu-trib-fig { position: relative; }
.heu-adv-hut { position: absolute; display: block; line-height: 0; pointer-events: none; }
.heu-buehne-tier .heu-adv-hut .heu-adv-hut-svg { display: block; width: 100%; height: auto; filter: none; }
.heu-adv-hut[data-hut="muetze"] { left: 22%; top: -10%; width: 44%; transform: rotate(10deg); }
.heu-adv-hut[data-hut="schal"] { left: 20%; top: 30%; width: 60%; }
.heu-adv-hut[data-hut="geweih"] { left: 18%; top: -14%; width: 64%; }
.heu-adv-muetze { position: absolute; left: 36%; top: -3cqw; width: 8cqw; height: auto; transform: rotate(-8deg); z-index: 3; }
.heu-m-fenster .heu-adv-flocken { position: absolute; inset: 0; pointer-events: none; }
.heu-adv-flocken i { position: absolute; width: .9cqw; height: .9cqw; border-radius: 50%; background: #fff; opacity: .9; animation: heu-adv-fall var(--t) var(--kurve-weich) infinite; animation-delay: calc(var(--d) * -1); }
.heu-adv-eis { position: absolute; bottom: 0; width: 34%; height: auto; opacity: .85; pointer-events: none; }
.heu-adv-eis[data-ecke="l"] { left: 0; } .heu-adv-eis[data-ecke="r"] { right: 0; transform: scaleX(-1); }
.heu-adv-bogen { position: absolute; right: 2cqw; bottom: calc(100% - 2px); width: 15cqw; height: auto; overflow: visible; }
.heu-szene[data-advent="1"] .heu-m-blumen { display: none; }
.heu-szene[data-advent="1"] .heu-anl-ueber { display: none; }
.heu-adv-funke { position: absolute; width: 2.4cqw; height: 2.4cqw; background: #fff6c8; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: .7; animation: heu-adv-schweb var(--t) var(--kurve-weich) infinite; animation-delay: calc(var(--d) * -1); }
@keyframes heu-adv-funkel { from { opacity: .4; } to { opacity: 1; } }
@keyframes heu-adv-lauf { 0%, 50%, 100% { opacity: .45; } 12%, 25% { opacity: 1; } }
@keyframes heu-adv-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .22; } }
@keyframes heu-adv-flacker { from { transform: scale(.92, .88); } to { transform: scale(1.06, 1.1); } }
@keyframes heu-adv-puls { from { transform: scale(.88); opacity: .75; } to { transform: scale(1.1); opacity: 1; } }
@keyframes heu-adv-schaukel { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes heu-adv-fall { 0% { transform: translate(0, -4cqw); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(2cqw, 16cqw); opacity: 0; } }
@keyframes heu-adv-schweb { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 25% { opacity: .9; } 60% { transform: translate(1.5cqw, -6cqw) scale(1); opacity: .7; } 100% { transform: translate(-1cqw, -12cqw) scale(.6); opacity: 0; } }
.heu-szene[data-adv-ruhig="1"] [class*="heu-adv-"], .heu-szene[data-adv-ruhig="1"] .heu-adv .l, .heu-adv[data-ruhig="1"] .heu-adv-gr { animation: none !important; }
.heu-wurzel[data-darstellung="ruhig"] [class*="heu-adv-"] { animation: none !important; }
@media (prefers-reduced-motion: reduce) { [class*="heu-adv-"] { animation: none !important; } }

/* ===== Nr. 361: Heuleiter-Bildschirm aufgeräumt. Schlanke Kopfzeile (✕, „Frage N / 15“, sicherer Gewinn mit Schloss); am Handy zwei feste Ansichten:
   Frage (Karte, Joker, 2×2-Antworten) und Zwischenansicht nach der Antwort (Ergebnis-Streifen, „Weiter“).
   Nr. 370: Die Szene ist in beiden Ansichten gleich hoch (--heu-s2, ca. 40 %); die Welt ist höher, die Kamera (--cam, nur transform) folgt Karoline.
   Alle Höhen kommen aus --heu-hv/--heu-s2 (js/karoline-heuleiter-seite.js, heuSzeneAusschnitt). ===== */
body[data-heuleiter="weg"] .heu-leiste-schliessen { margin-right: 0; }
.heu-leiste-titel { flex: 1 1 auto; min-width: 0; text-align: center; font-weight: 800; font-size: 16px; color: var(--st-text); white-space: nowrap; }
.heu-leiste-sicher { display: inline-flex; align-items: center; gap: 6px; max-width: 48%; padding: 5px 12px; border-radius: 999px; background: #fdf0c9; color: #6b4a00; font-weight: 800; font-size: 14px; white-space: nowrap; }
.heu-leiste-sicher > span { overflow: hidden; text-overflow: ellipsis; }
.heu-leiste-sicher.hidden, .heu-leiste-titel.hidden { display: none; }
html.dark .heu-leiste-sicher { background: #4a3a1a; color: #ffd870; }
.heu-leiste-konto { margin-left: auto; }
.heu-streifen { display: none; }
.heu-leckerli-wrap { left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.heu-leckerli { position: absolute; left: 28.5cqw; top: calc(var(--f) * var(--y) / 100 + .2cqw); font-size: 4.2cqw; line-height: 1; color: #c0612b; filter: drop-shadow(0 .3cqw .2cqw rgba(60, 30, 5, .35)); }
.heu-leckerli .fa-carrot { color: #e07a1f; } .heu-leckerli .fa-apple-whole { color: #c8402f; } .heu-leckerli .fa-cookie-bite { color: #b57a2c; } .heu-leckerli .fa-cube { color: #cfd6dd; } .heu-leckerli .fa-basket-shopping { color: #a66b2a; }
.heu-requisit { left: 46cqw; bottom: calc(var(--f) * .05); width: 16cqw; pointer-events: none; z-index: 1; }
.heu-requisit svg { display: block; width: 100%; height: auto; }
.heu-requisit[data-requisit="schubkarre"] { width: 18cqw; } .heu-requisit[data-requisit="eimer"] { width: 10cqw; } .heu-requisit[data-requisit="gabel"] { width: 9cqw; left: 52cqw; } .heu-requisit[data-requisit="tonne"] { width: 12cqw; } .heu-requisit[data-requisit="katze"] { width: 17cqw; }
.heu-welt-svg .heu-plattform { stroke: #8a5a2b; stroke-width: 2.4; stroke-linecap: butt; } .heu-welt-svg .heu-plattform[data-erreicht="1"] { stroke: #c9962f; }
.heu-welt-svg .heu-luke { fill: rgba(30, 18, 6, .55); stroke: #6b4423; stroke-width: 1; } .heu-welt-svg .heu-luke-klappe { stroke: #8a5a2b; stroke-width: 1.6; }
@media (min-width: 768px) { .heu-requisit, .heu-leckerli-wrap { display: none; } }
@media (max-width: 767px) {
    body[data-heuleiter="weg"]:has(.heu-wurzel[data-ansicht]) #heuLeiste { background: #3b281a; border-bottom: 0; }
    body[data-heuleiter="weg"]:has(.heu-wurzel[data-ansicht]) #heuLeiste .heu-leiste-titel { color: #fff6e0; text-shadow: none; }
    body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] { position: fixed; z-index: 2; left: 0; top: 0; width: 100%; height: var(--heu-hv, 100dvh); box-sizing: border-box; margin: 0 !important; padding: calc(48px + env(safe-area-inset-top, 0px)) 0 env(safe-area-inset-bottom, 0px) !important; overflow: hidden; border-radius: 0; }
    .heu-wurzel[data-ansicht] > .space-y-3 { height: 100%; margin: 0 !important; }
    .heu-wurzel[data-ansicht] .heu-raster { height: 100%; display: flex; flex-direction: column; }
    .heu-wurzel[data-ansicht] .heu-links { position: relative; flex: none; height: var(--heu-s2, 40dvh); margin: 0; overflow: hidden; }
    body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] .heu-szene { height: 100%; aspect-ratio: auto; padding-top: 0; box-sizing: border-box; border-radius: 0; --oben: 0px; }
    body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] .heu-szene > .heu-welt { top: 0; transform: translateY(calc(var(--cam, 0) * -1cqw)); transition: transform var(--heu-kam-dauer) var(--heu-kam-kurve); }
    .heu-wurzel[data-ansicht] .heu-szene-stapel, .heu-wurzel[data-ansicht] .heu-liefer, .heu-wurzel[data-ansicht] .heu-verlust, .heu-wurzel[data-ansicht] .heu-fahnen { visibility: hidden; }
    .heu-wurzel[data-ansicht] .heu-zuschauer { justify-content: flex-end; gap: 6px; padding: 0 4cqw 0 0; top: auto; bottom: calc(var(--heu-fh, 90) * .02cqw); }  /* --f gibt es nur in der Welt: ohne diese Zeile hing die Reihe oben an der Szene */
    .heu-wurzel[data-ansicht] .heu-raster > .min-w-0 { position: relative; z-index: 3; flex: none; display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; height: calc(100% - var(--heu-s2, 40dvh)); padding: 10px 12px 10px; overflow-y: auto; background: #fbf3df; }
    html.dark .heu-wurzel[data-ansicht] .heu-raster > .min-w-0 { background: #231a10; }
    .heu-wurzel[data-ansicht] .heu-raster > .min-w-0 > * { margin: 0 !important; flex: none; }
    .heu-wurzel[data-ansicht] .heu-tafel-wrap .heu-lugt { display: none; }
    .heu-wurzel[data-ansicht] .heu-tafel { min-height: calc(var(--heu-hv, 700px) * .11 - 4px); margin-top: 0; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
    .heu-wurzel[data-ansicht] .heu-etiketten { gap: 8px; grid-auto-rows: minmax(56px, 76px); align-content: start; }
    .heu-wurzel[data-ansicht] .heu-antwort.heu-etikett { padding-top: 6px; padding-bottom: 6px; }  /* Nr. 400: Buchstabe mittig neben dem Text, keine leere Kopfzeile */
    .heu-wurzel[data-ansicht] .heu-etiketten[data-modus="raster"] .heu-antwort { padding: 6px 8px; gap: 6px; font-size: 15px; }
    .heu-wurzel[data-ansicht] .heu-aufhoeren { margin-top: auto; }
    .heu-wurzel[data-ansicht="frage"] .heu-raster > .min-w-0 > .text-center { margin-top: auto !important; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-tafel-wrap, .heu-wurzel[data-ansicht="zwischen"] .heu-brett, .heu-wurzel[data-ansicht="zwischen"] [data-heu-antworten], .heu-wurzel[data-ansicht="zwischen"] [data-heu-betty-hinweis] { display: none; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-streifen { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 16px; border-radius: 16px; text-align: center; font-size: 18px; background: #4d7c63; color: #fff; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-streifen[data-heu-ergebnis="falsch"] { background: #9a3b2e; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-streifen span { font-size: 14px; font-weight: 600; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-raster > .min-w-0 > .heu-aufloesung { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
    .heu-wurzel[data-ansicht="zwischen"] [data-heu-aufloesung="richtig"] .heu-auf-kopf, .heu-wurzel[data-ansicht="zwischen"] [data-heu-aufloesung="richtig"] [data-heu-gewonnen] { display: none; }
    body[data-heuleiter="weg"] .heu-wurzel[data-ansicht="zwischen"] .heu-auf-spruch { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .heu-wurzel[data-ansicht="zwischen"] .heu-raster > .min-w-0 > [data-action="heuWeiterTippen"] { min-height: 60px; margin-top: auto !important; font-size: 18px; }
}
@media (max-width: 767px) { body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] .heu-szene-blase { left: calc((13 + var(--kb, 22) / 2) * 1cqw); } }
@media (max-width: 767px) { .heu-wurzel[data-ansicht][data-knapp="1"] .heu-tafel { min-height: min(calc(var(--heu-hv, 700px) * .11 - 4px), var(--heu-tafel-max, 0px)); } .heu-wurzel[data-ansicht][data-knapp="1"] .heu-etiketten { grid-auto-rows: minmax(56px, auto); } .heu-wurzel[data-ansicht][data-knapp="1"] .heu-antwort { min-height: var(--heu-antw-h, 56px); } }  /* Platz knapp: hohe Antworten und Tafel geben nach, bevor die Szene schrumpft (js: heuSzeneAusschnitt, heuKarteFuellen) */
@media (max-width: 767px) { .heu-wurzel[data-ansicht][data-eng="1"] .heu-raster > .min-w-0 { gap: 6px; padding-top: 8px; } .heu-wurzel[data-ansicht][data-eng="1"] .heu-tafel { min-height: 0; padding: 8px 12px; } .heu-wurzel[data-ansicht][data-eng="1"] .heu-etiketten { gap: 6px; grid-auto-rows: minmax(56px, auto); } .heu-wurzel[data-ansicht][data-eng="1"] .heu-antwort { min-height: 56px; } }
@media (max-width: 767px) { body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] .heu-szene-blase[data-tief] { top: -18cqw; } }  /* Nr. 361: ganz unten steht die Blase höher, damit sie Platz über dem Boden lässt */

/* ===== Nr. 388/362: Szene zum Antippen im 3-Stockwerke-Stall (js/heu-szene-tippen.js). Ohne Duplikate; alles nur transform/opacity ===== */
.heu-tp { position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; z-index: 9; }
.heu-tp:focus-visible { outline: 2px solid #fff; outline-offset: -2px; box-shadow: 0 0 0 4px rgba(200, 83, 46, .8); border-radius: 10px; }
.heu-tpk-laterne { left: -6cqw; top: 0; width: 12cqw; min-width: 44px; height: 17cqw; min-height: 44px; transform: none; }
.heu-tpk-karoline { z-index: 9; }
.heu-m-fenster, .heu-korb-wrap { pointer-events: auto; }
.heu-korb-wrap { z-index: 3; }
/* Nr. 371 B: Licht aus = Nacht mit Fensterschein über Fenster und Dachluke; Karoline & Blasen bleiben klar sichtbar darüber */
.heu-tp-dunkel { inset: 0; z-index: 5; background: rgba(5, 8, 28, .78); opacity: 0; transition: opacity .6s var(--kurve-weich); pointer-events: none; }
.heu-tp-dunkel::before { content: ""; position: absolute; left: 55cqw; top: calc(var(--f) * .54 - 22cqw); width: 44cqw; height: 44cqw; background: radial-gradient(closest-side, rgba(135, 170, 255, .34), rgba(135, 170, 255, .14) 55%, rgba(135, 170, 255, 0)); }
.heu-tp-dunkel::after { content: ""; position: absolute; left: 57cqw; top: calc(var(--f) * .22 - 22cqw); width: 40cqw; height: 44cqw; background: radial-gradient(closest-side, rgba(135, 170, 255, .28), rgba(135, 170, 255, .1) 55%, rgba(135, 170, 255, 0)); }
.heu-szene[data-tp-licht="aus"] { --heu-laterne-a: 0 !important; }
.heu-szene[data-tp-licht="aus"] .heu-tp-dunkel { opacity: 1; }
.heu-szene[data-tp-licht="aus"] .heu-m-glow { opacity: 0; }
.heu-szene[data-tp-an] .heu-kar { transition: transform .9s cubic-bezier(.4, .1, .2, 1); }
.heu-szene[data-tp-an] .heu-kar-figur, .heu-szene[data-tp-an] .heu-m-flamme { transition: filter .6s var(--kurve-weich), opacity .6s var(--kurve-weich); }
.heu-szene[data-tp-licht="aus"] .heu-kar-figur { filter: brightness(.78) saturate(.85); }
@media (max-width: 767px) { .heu-wurzel[data-ansicht] .heu-szene[data-tp-licht="aus"] .heu-zuschauer { filter: brightness(.42) saturate(.7); } }
/* Nr. 371 B: Licht an = warmer Kegel um die OG-Laterne */
.heu-m-glow { transition: opacity .6s var(--kurve-weich); }
.heu-m-schein { display: none; }
.heu-szene[data-tp-an] .heu-m-glow { left: -30cqw; top: -19cqw; width: 60cqw; height: 60cqw; background: none; z-index: -1; }
.heu-szene[data-tp-licht="an"] .heu-m-glow { opacity: 1; }
.heu-szene[data-tp-an] .heu-m-schein { display: block; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 160, .96), rgba(255, 196, 74, .62) 34%, rgba(255, 168, 48, .24) 68%, rgba(255, 168, 48, 0)); }
.heu-m-schein::after { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 85%; clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); background: linear-gradient(rgba(255, 214, 110, .62), rgba(255, 200, 90, .2) 55%, rgba(255, 200, 90, 0)); }
.heu-szene[data-tp-licht="an"] .heu-m-schein { animation: heu-tp-flackern calc(var(--takt-auftritt) * 4) var(--kurve-weich) infinite; }
@keyframes heu-tp-flackern { 0%, 100% { opacity: 1; transform: scale(1); } 17% { opacity: .84; transform: scale(.975); } 31% { opacity: .97; transform: scale(1.01); } 52% { opacity: .8; transform: scale(.97); } 68% { opacity: .95; transform: scale(1.015); } 84% { opacity: .87; transform: scale(.99); } }
.heu-tp-rand { left: 0; top: 0; width: 100%; height: 100%; z-index: 2; opacity: 0; pointer-events: none; background: radial-gradient(78% 72% at 43% 52%, rgba(48, 22, 2, 0) 45%, rgba(48, 22, 2, .48) 100%); transition: opacity .6s var(--kurve-weich); }
.heu-szene[data-tp-licht="an"] .heu-tp-rand { opacity: 1; }
.heu-szene.heu-tp-ruck :is(.heu-m-glow, .heu-m-flamme, .heu-tp-rand, .heu-tp-dunkel, .heu-kar-figur) { transition: none !important; }
.heu-m-laterne.heu-tp-schwung { animation: heu-tp-schwung calc(var(--takt-auftritt) * 1.4) var(--kurve-raus); }
@keyframes heu-tp-schwung { 0% { transform: rotate(0); } 20% { transform: rotate(14deg); } 50% { transform: rotate(-9deg); } 80% { transform: rotate(4deg); } 100% { transform: rotate(0); } }
/* Spinne im DG-Ecknetz */
.heu-tp-spinne { left: 58cqw; top: calc(var(--f) * .04); width: 0; height: 0; z-index: 4; }
.heu-tp-faden { position: absolute; left: -.5px; top: 0; width: 1px; height: calc(var(--f) * .11); background: rgba(70, 50, 30, .7); transform-origin: 50% 0; transition: transform .6s var(--kurve-raus); }
.heu-tp-sp { position: absolute; left: -1.8cqw; top: calc(var(--f) * .11 - .5cqw); width: 3.6cqw; height: 3.6cqw; transition: transform .6s var(--kurve-raus); }
.heu-tp-spinne .heu-tp { left: -22px; top: calc(var(--f) * .11 - 14px); width: 44px; height: 44px; transform: none; }
.heu-tp-spinne[data-oben] .heu-tp-faden { transform: scaleY(.12); }
.heu-tp-spinne[data-oben] .heu-tp-sp { transform: translateY(calc(var(--f) * -.095)); }
.heu-tp-spinne[data-oben] .heu-tp { top: -6px; }
/* EG Wasserhahn direkt auf dem Stallboden */
.heu-tp-hahn { --flaeche: calc(var(--f) * .92); --hb: 13cqw; left: 36cqw; top: calc(var(--flaeche) - var(--hb) * 43 / 28); width: var(--hb); height: calc(var(--hb) * 44 / 28); z-index: 4; pointer-events: none; }
.heu-tp-hahn .heu-tp { pointer-events: auto; }
.heu-tp-hahn-bild { display: block; position: relative; width: 100%; height: 100%; }
.heu-tp-brett { display: none; }
.heu-tp-strahl { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(.1); transition: opacity .2s, transform .35s var(--kurve-raus); }
.heu-tp-wasser { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.02); transition: transform 3s linear; }
.heu-tp-pfuetze { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; transform: scaleX(.1); transition: transform 3s linear 3s, opacity .3s 3s; }
.heu-tp-hahn[data-benutzt] .heu-tp-wasser { transform: scaleY(1); }
.heu-tp-hahn[data-offen] .heu-tp-strahl { opacity: .9; transform: scaleY(1); }
.heu-tp-hahn[data-offen] .heu-tp-pfuetze { opacity: .85; transform: scaleX(1); }
.heu-tp-hahn[data-benutzt]:not([data-offen]) .heu-tp-pfuetze { transition: none; }
/* Karoline: Mähhh und Betty über allen Tieren & Dingen (z-index 20) */
.heu-tp-blase { position: absolute; left: 85%; top: -2cqw; z-index: 20; padding: 5px 12px; border-radius: 14px; background: #fffaf0; color: #2b1a0a; font-size: 15px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); pointer-events: none; animation: heu-tp-blase calc(var(--takt-auftritt) * 2.5) var(--kurve-raus) both; }
html.dark .heu-tp-blase { background: #3a2d1d; color: #fff3d6; }
.heu-szene[data-tp-spricht] .heu-szene-blase { visibility: hidden; }
.heu-kar-figur.heu-tp-schuettelt { transform-origin: 50% 25%; animation: heu-tp-schuettel calc(var(--takt-auftritt) * .9) var(--kurve-weich); }
.heu-kar-figur.heu-tp-schupf { animation: heu-tp-schupf calc(var(--takt-auftritt) * .9) var(--kurve-raus); }
.heu-tp-betty { position: absolute; left: 92%; bottom: 0; z-index: 20; width: 0; height: 0; pointer-events: none; animation: heu-tp-betty calc(var(--takt-auftritt) * 5) var(--kurve-weich) both; }
.heu-tp-betty-kopf { position: absolute; left: 0; bottom: 0; width: 56px; }
.heu-tp-betty-kopf svg { display: block; width: 100%; height: auto; }
.heu-tp-betty-blase { position: absolute; left: 4px; bottom: 70px; width: max-content; max-width: 46cqw; padding: 5px 10px; border-radius: 12px; background: #fffaf0; color: #2b1a0a; font-size: 13px; line-height: 1.25; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
html.dark .heu-tp-betty-blase { background: #3a2d1d; color: #fff3d6; }
.heu-szene[data-tp-ruhig="1"] .heu-tp-betty-blase { bottom: 0; }
@keyframes heu-tp-blase { 0% { opacity: 0; transform: translateY(4px) scale(.9); } 15% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes heu-tp-schuettel { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } }
@keyframes heu-tp-schupf { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(-5cqw) rotate(-4deg); } }
@keyframes heu-tp-betty { 0% { transform: translateX(30cqw); } 18% { transform: translateX(0); } 82% { transform: translateX(0); } 100% { transform: translateX(30cqw); } }
/* OG-Heuhaufen am 66,67-%-Balken */
.heu-tp-haufen { left: 34cqw; top: calc(var(--f) * .667); width: 12cqw; height: 7.1cqw; transform: translateY(-92%); z-index: 3; }
.heu-tp-haufen-bild { display: block; width: 100%; height: 100%; }
.heu-tpk-heu { z-index: 9; }
/* Fenster: klappert, Sprung, bricht */
.heu-tp-glas { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 45%); }
.heu-tp-riss, .heu-tp-bruch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.heu-tp-riss path { fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.heu-tp-bruch path { fill: #9a6a38; }
.heu-szene[data-tp-fenster="3"] .heu-tp-riss, .heu-szene[data-tp-fenster="4"] .heu-tp-riss { opacity: 1; }
.heu-szene[data-tp-fenster="5"] .heu-tp-bruch { opacity: 1; }
.heu-szene[data-tp-fenster="5"] .heu-tp-glas, .heu-szene[data-tp-fenster="5"] .heu-m-kreuz { opacity: 0; }
.heu-m-fenster.heu-tp-wackelt { animation: heu-tp-wackel calc(var(--takt-auftritt) * .8) var(--kurve-weich); }
@keyframes heu-tp-wackel { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-2deg) translateX(-1px); } 45% { transform: rotate(2deg) translateX(1px); } 70% { transform: rotate(-1deg); } }
.heu-tp-scherben { left: 62cqw; top: calc(var(--f) * .54); width: 29cqw; height: 0; z-index: 4; pointer-events: none; }
.heu-tp-scherben i { position: absolute; top: 0; width: 2.4cqw; height: 2.8cqw; background: rgba(190, 225, 250, .85); clip-path: polygon(50% 0, 100% 100%, 0 70%); opacity: 0; }
.heu-tp-scherben.heu-tp-faellt i { animation: heu-tp-fall calc(var(--takt-auftritt) * 2.2 * var(--s)) var(--kurve-weich) var(--d) both; }
@keyframes heu-tp-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--f) * .16)) rotate(200deg); } }
/* es zieht: Laterne flackert, Heu weht, bei Regen tropft es herein */
.heu-szene[data-tp-fenster="5"] .heu-m-flamme { animation-duration: calc(var(--takt-tipp) * .8); }
.heu-szene[data-tp-fenster="5"] .heu-m-halme i { animation: heu-tp-weh calc(var(--takt-auftritt) * 3) var(--kurve-weich) infinite alternate; }
@keyframes heu-tp-weh { from { transform: rotate(calc(var(--w) - 8deg)); } to { transform: rotate(calc(var(--w) + 14deg)); } }
.heu-tp-tropfen { display: none; left: 62cqw; top: calc(var(--f) * .62); width: 29cqw; height: 0; z-index: 4; pointer-events: none; }
.heu-tp-tropfen i { position: absolute; top: 0; width: 1.2cqw; height: 1.8cqw; border-radius: 50%; background: #9fd0f5; animation: heu-tp-tropf calc(var(--takt-auftritt) * 2) var(--kurve-weich) infinite; }
@keyframes heu-tp-tropf { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--f) * .28)); } }
.heu-szene[data-tp-fenster="5"][data-wetter="regen"] .heu-tp-tropfen { display: block; }
/* Stall ansehen (kein data-ansicht: die Vollbild-Regeln des Quiz gelten hier nicht) */
.heu-stall-szene .heu-szene { cursor: default; }
body[data-heuleiter="weg"] .heu-stall .heu-szene { --oben: 0px; }
body[data-heuleiter="weg"] .heu-stall .heu-szene > .heu-welt { top: 0; }
.heu-stall { padding: 4px 12px 0; }
/* ruhig: nur Zustandswechsel */
.heu-szene[data-tp-ruhig="1"] .heu-tp-dunkel, .heu-szene[data-tp-ruhig="1"] .heu-tp-faden, .heu-szene[data-tp-ruhig="1"] .heu-tp-sp, .heu-szene[data-tp-ruhig="1"] .heu-tp-strahl, .heu-szene[data-tp-ruhig="1"] .heu-tp-wasser, .heu-szene[data-tp-ruhig="1"] .heu-tp-pfuetze { transition: none; }
.heu-szene[data-tp-ruhig="1"] .heu-tp-spinne[data-oben] .heu-tp-sp, .heu-szene[data-tp-ruhig="1"] .heu-tp-spinne[data-oben] .heu-tp-faden { opacity: 0; transform: none; }
.heu-szene[data-tp-ruhig="1"] .heu-tp-blase { animation: none; }
.heu-szene[data-tp-ruhig="1"] .heu-m-schein, .heu-szene[data-tp-ruhig="1"] .heu-m-flamme { animation: none; }
.heu-szene[data-tp-ruhig="1"] :is(.heu-m-glow, .heu-m-flamme, .heu-tp-rand, .heu-kar, .heu-kar-figur, .heu-zuschauer) { transition: none; }
.heu-szene[data-tp-ruhig="1"] .heu-tp-tropfen i, .heu-szene[data-tp-ruhig="1"] .heu-tp-scherben i, .heu-szene[data-tp-ruhig="1"][data-tp-fenster="5"] .heu-m-halme i { animation: none; }
@media (prefers-reduced-motion: reduce) { .heu-tp-dunkel, .heu-tp-faden, .heu-tp-sp, .heu-tp-strahl, .heu-tp-wasser, .heu-tp-pfuetze { transition: none; } }
@media (prefers-reduced-motion: reduce) { .heu-szene .heu-m-schein { animation: none !important; } .heu-szene :is(.heu-m-glow, .heu-m-flamme, .heu-tp-rand, .heu-kar-figur) { transition: none !important; } }
.heu-m-fenster { z-index: 3; }
.heu-tpk-fenster { z-index: 9; }

/* ===== Nr. 388/370: Kamera folgt Karoline durch 3 Stockwerke, Knopf „Leiter“ oben rechts über allem ===== */
.heu-szene { --heu-kam-dauer: .9s; --heu-kam-kurve: cubic-bezier(.4, .1, .2, 1); }
.heu-links { position: relative; }
.heu-leiter-knopf { position: absolute; right: 10px; top: 10px; bottom: auto; z-index: 25; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: #fdf0c9; color: #6b4a00; font-weight: 800; font-size: 14px; white-space: nowrap; box-shadow: 0 2px 8px rgba(40, 25, 5, .35); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.heu-leiter-knopf:focus-visible { outline: 2px solid #fff; outline-offset: 0; box-shadow: 0 0 0 4px rgba(200, 83, 46, .8); }
html.dark .heu-leiter-knopf { background: #4a3a1a; color: #ffd870; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.heu-links:has([data-heu-leiter-knopf]) .heu-szene-stapel { right: 118px; }
.heu-szene[data-hoch] .heu-welt-svg .heu-sprosse-linie { vector-effect: non-scaling-stroke; stroke-width: 5px; }
.heu-szene[data-hoch] .heu-welt-svg .heu-plattform { vector-effect: non-scaling-stroke; stroke-width: 9px; }
.heu-szene[data-kam] .heu-tp-rand { height: calc(var(--heu-wh) * 1cqw); transform: translateY(calc(var(--cam, 0) * 1cqw)); transition: transform var(--heu-kam-dauer) var(--heu-kam-kurve), opacity .6s var(--kurve-weich); }
.heu-wurzel[data-darstellung="ruhig"] .heu-szene[data-kam] .heu-tp-rand, .heu-wurzel[data-ruhig="1"] .heu-szene[data-kam] .heu-tp-rand { transition: none; }
@media (prefers-reduced-motion: reduce) { .heu-szene[data-kam] .heu-tp-rand { transition: none !important; } }
.heu-szene[data-kam] .heu-zuschauer { top: calc(var(--heu-fh) * .96cqw - 15cqw); bottom: auto; height: 15cqw; transform: translateY(calc(var(--cam, 0) * -1cqw)); transition: transform var(--heu-kam-dauer) var(--heu-kam-kurve), opacity .3s ease-out, translate .3s ease-out; }
.heu-szene[data-rolle="start"] .heu-zuschauer { top: calc(var(--heu-fh) * .96cqw - 14cqw); height: 14cqw; }
body[data-heuleiter="weg"] .heu-wurzel[data-darstellung="ruhig"] .heu-szene > .heu-welt, body[data-heuleiter="weg"] .heu-wurzel[data-ruhig="1"] .heu-szene > .heu-welt, .heu-wurzel[data-darstellung="ruhig"] .heu-szene[data-kam] .heu-zuschauer, .heu-wurzel[data-ruhig="1"] .heu-szene[data-kam] .heu-zuschauer { transition: none; }
.heu-links:has([data-heu-leiter-knopf]) .heu-szene:not([data-kam]) .heu-zuschauer { right: 2cqw; bottom: calc(var(--heu-fh, 145) * .03cqw); gap: 4px; }
.heu-links:has([data-heu-leiter-knopf]) .heu-szene:not([data-kam]) .heu-zuschauer-tier:nth-child(n+4) { display: none; }
.heu-szene[data-boden="0"] .heu-zuschauer { opacity: 0; }
.heu-szene.heu-kam-ruck .heu-welt, .heu-szene.heu-kam-ruck .heu-kar, .heu-szene.heu-kam-ruck .heu-zuschauer, .heu-szene.heu-kam-ruck .heu-tp-rand { transition: none !important; }
@media (prefers-reduced-motion: reduce) { body[data-heuleiter="weg"] .heu-wurzel[data-ansicht] .heu-szene > .heu-welt, .heu-szene[data-kam] > .heu-welt, .heu-szene[data-kam] .heu-zuschauer, .heu-szene .heu-kar { transition: none !important; } }

/* Nr. 367: Tastatur (js/tastatur.js setzt --kb-h und data-kb am <html>, nur bei offener Tastatur): scrollbare Behälter bekommen unten Luft in Höhe der Tastatur,
   damit das Feld hochgescrollt werden kann (das Blatt wächst bis max-h nach oben). Ohne Tastatur gilt nichts davon. Knöpfe werden nicht gezielt hochgezogen. */
html[data-kb] .bs-fenster { padding-bottom: calc(1.25rem + var(--kb-h, 0px)); }
html[data-kb] body { padding-bottom: calc(8rem + var(--kb-h, 0px)); }
/* Nr. 384: beim Tippen am Handy keine Tabs über der Tastatur (ab 900 px ist die Leiste eine Seitenleiste und bleibt). */
@media (max-width: 899.98px) { html[data-tippt] #untereLeiste { display: none; } }

/* ===== Pferde-Ansicht neu: Fenster mit Sticky-Kopf und vier Reitern, Wochenstreifen, Kalender im Fenster, Steckbrief ===== */
.pferd-fenster-kopf { background: var(--st-grund); }
.pferd-reiter { display: flex; gap: 2px; margin-top: 14px; padding: 2px; background: var(--st-flaeche-gedaempft); border-radius: 999px; }
.pferd-reiter-btn { position: relative; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 0; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--st-text-gedaempft); font-size: var(--st-groesse-neben); font-weight: var(--st-gewicht-text); white-space: nowrap; overflow: hidden; }
.pferd-reiter-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.pferd-reiter-btn[aria-selected="true"] { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); font-weight: var(--st-gewicht-fett); }
.pferd-reiter-punkt { position: absolute; top: 6px; right: 5px; width: 8px; height: 8px; border-radius: 9999px; background: var(--st-ton-gefahr-text); }
.pferd-reiter-punkt.hidden { display: none; }
.pferd-stepper { display: inline-flex; align-items: center; }
.pferd-stepper-knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; margin: 0; padding: 0 4px; border: 0; background: transparent; color: var(--st-text-knopf); }
.pferd-stepper-zahl { white-space: nowrap; }
#horseModal .bs-fenster [id^="modsec_"], #horseModal .bs-fenster #horseNotfallCard, #horseModal .bs-fenster #horseInlineTagWrap { scroll-margin-top: 10rem; }  /* unter den Sticky-Kopf scrollen */
.pferd-wochentag { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 48px; padding: 4px 0; border: 2px solid transparent; background-clip: padding-box; border-radius: 12px; background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); font-size: var(--st-groesse-klein); line-height: 1.2; }
#horseHeuteWocheStreifen { margin-inline: -12px; }  /* Nr. 307: sieben Tage mit je mindestens 44 px Breite auch bei 360 px */
.pferd-wochentag { position: relative; }
.pferd-wochentag::after { content: ''; position: absolute; inset: -4px; }  /* Nr. 397 C: Tippfläche über Rand (2 px) und halbe Lücke, bei 390 px mindestens 44 px breit */
.pferd-wochentag.bs-ton-aktiv { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.pferd-wochentag-heute { border-color: var(--st-text-knopf); }
.pferd-wochentag-name { font-weight: var(--st-gewicht-fett); }
.pferd-moment-vorschau { aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: var(--st-rundung-klein); overflow: hidden; background: var(--st-flaeche-gedaempft); }
.pferd-vk-zeile { display: flex; align-items: center; gap: 6px; border-radius: var(--st-rundung-klein); background: var(--st-flaeche-gedaempft); }
.pferd-vk-haupt { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: inherit; text-align: left; }
.pferd-vk-knopf { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 4px; border: 0; border-radius: 9999px; background: var(--st-haupt); color: var(--st-haupt-text); }
.pferd-kurve { display: block; width: 100%; height: 56px; }
.pi-zelle { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; min-height: 4.5rem; padding: 3px; border: 1px solid var(--st-linie); border-radius: 12px; background: var(--st-grund); color: var(--st-text); text-align: left; overflow: hidden; }
.pi-zelle-belegt { background: var(--st-flaeche); }
.pi-zelle-heute { border-color: var(--st-text-knopf); background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.pi-nr { font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); line-height: 1.2; }
.pi-pillen { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; max-width: 100%; }
.pi-pille { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 0 3px; border-radius: 6px; font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); line-height: 1.3; white-space: nowrap; overflow: hidden; }
.pi-pille > i { font-size: .8em; }
.pi-weide { background: var(--st-ton-hinweis); color: var(--st-ton-hinweis-text); }
.pi-bewegt { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.pi-zelle-heute .pi-bewegt { background: var(--st-flaeche); }
.pi-termin { background: var(--st-ton-info); color: var(--st-ton-info-text); }
.pi-symbole { gap: 4px; background: var(--st-flaeche-gedaempft); color: var(--st-text-gedaempft); }
.pi-erledigt { opacity: .6; }
.pferd-ritt-zeile { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 10px 6px 6px; border: 0; border-radius: var(--st-rundung-klein); background: var(--st-flaeche-gedaempft); color: inherit; }
.pferd-ritt-bild { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px; overflow: hidden; }
.tablet-pferd-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }  /* Status-Pillen unter dem Namen in der Tablet-Kachel */
.akte-vorlagen { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }  /* Akte: Zeile „Vorlage: Alles · Tierarzt · Vertretung“ */
.akte-vorlagen > .akte-klein { padding-right: 4px; }
@media screen and (max-width: 520px) {  /* Akte am Handy: Listen brechen um statt seitlich zu laufen (Druck bleibt die Tabelle) */
    .akte .akte-liste, .akte .akte-liste tbody { display: block; max-width: 100%; }
    .akte .akte-liste tr { display: flex; flex-wrap: wrap; gap: 0 10px; padding: 6px 0; border-bottom: 1px solid #e2e8f0; }
    .akte .akte-liste tr:has(> th) { display: none; }
    .akte .akte-liste td { display: block; min-width: 0; flex: 1 1 9rem; padding: 0; border-bottom: 0; overflow-wrap: anywhere; }
    .akte .akte-liste td:first-child { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }
}

/* Nr. 403: Hoftechnik nach Orten, als Kacheln (nur Stall-Variablen, damit hell und dunkel stimmen) */
.ht-titel { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: var(--st-groesse-gross); color: var(--st-text); }
.ht-warnung { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--st-rundung-klein); padding: 10px 12px; font-size: var(--st-groesse-text); font-weight: var(--st-gewicht-fett); }
.ht-warnung > i { margin-top: 3px; }
.ht-klima { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ht-klima::-webkit-scrollbar { display: none; }
.ht-klima-chip { flex: 0 0 auto; min-width: 112px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--st-rundung-klein);
    background: var(--st-ton-info); color: var(--st-ton-info-text); }
.ht-klima-name { font-size: var(--st-groesse-klein); }
.ht-klima-wert { font-family: var(--st-schrift-titel); font-weight: var(--st-titel-gewicht); font-size: 1.375rem; line-height: 1.15; }
.ht-abschnitt { background: var(--st-flaeche); border: 1.5px solid var(--st-linie); border-radius: var(--st-rundung); padding: 12px; }
.ht-abschnitt-kopf { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.ht-abschnitt-kopf::-webkit-details-marker { display: none; }
.ht-pfeil { margin-left: auto; color: var(--st-text-gedaempft); transition: transform .2s ease; }
.ht-abschnitt:not([open]) .ht-pfeil { transform: rotate(-90deg); }
.ht-kachel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 112px; padding: 12px; text-align: left; width: 100%; min-width: 0;
    border-radius: var(--st-rundung-klein); background: var(--st-flaeche-gedaempft); color: var(--st-text); border: 1.5px solid transparent; }
.ht-kachel-knopf { cursor: pointer; transition: transform .12s ease, background-color .2s ease; -webkit-tap-highlight-color: transparent; }
.ht-kachel-knopf:active { transform: scale(.97); }
.ht-kachel-knopf:focus-visible { outline: 3px solid var(--st-haupt); outline-offset: 2px; }
.ht-kachel-an { background: var(--st-ton-aktiv); color: var(--st-ton-aktiv-text); }
.ht-kachel-gefahr { background: var(--st-ton-gefahr); color: var(--st-ton-gefahr-text); }
.ht-kachel-weg { opacity: .7; }
.ht-kachel-kopf { display: flex; width: 100%; justify-content: space-between; align-items: flex-start; }
.ht-symbol { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9999px; background: var(--st-flaeche); color: var(--st-text-gedaempft); font-size: 1.05rem; }
.ht-symbol-gross { width: 52px; height: 52px; font-size: 1.4rem; display: flex; }
.ht-kachel-an .ht-symbol { background: var(--st-haupt); color: var(--st-haupt-text); }
.ht-kachel-gefahr .ht-symbol { background: var(--st-flaeche); color: var(--st-ton-gefahr-text); }
.ht-stern { color: #c68a1e; font-size: .85rem; }
.ht-name { font-weight: var(--st-gewicht-fett); font-size: var(--st-groesse-text); line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-zustand { font-size: var(--st-groesse-klein); line-height: 1.3; }
.ht-seit { font-size: var(--st-groesse-klein); opacity: .8; }
.ht-tipp { margin-top: auto; font-size: var(--st-groesse-klein); font-weight: var(--st-gewicht-fett); color: var(--st-text-knopf); padding-top: 4px; }
.ht-kachel-an .ht-tipp, .ht-kachel-gefahr .ht-tipp { color: inherit; }
.ht-tipp-still { color: var(--st-text-gedaempft); font-weight: var(--st-gewicht-text); }
@media (prefers-reduced-motion: reduce) { .ht-kachel-knopf, .ht-pfeil { transition: none; } .ht-kachel-knopf:active { transform: none; } }

/* Nr. 405: Befunde verständlich – aufklappbare Erklärungen ohne Browser-Dreieck */
.bf-kopf { cursor: pointer; list-style: none; }
.bf-kopf::-webkit-details-marker { display: none; }
details[open] > .bf-kopf .bf-pfeil { transform: rotate(180deg); }
