/* Design „Herbst“ – wird beim Start in die Tabelle designs übernommen (lib/designs.js, lib/db.js).
   Blattformen: Eiche nach Openclipart 312908 (CC0), Ahorn und Buche selbst gezeichnet – siehe public/leaf-art.js */
:root {
  --green-pale: #fdf6ea;
  --green-light: #f6e7cd;
  --wood: #b06a33;
  --wood-dark: #7d4a20;
}
/* Warmes Herbstlicht: hell und golden oben rechts, satter Bernstein an den Rändern.
   Die Übungsseite (body.ue-body) bekommt denselben Grund – ihre bunten Ecken-Punkte entfallen dadurch. */
body, body.ue-body {
  background-color: #f7e4c4;
  background-image:
    radial-gradient(circle at 76% 4%, #fffaee 0, rgba(255, 250, 238, 0) 42%),
    radial-gradient(circle at 18% 18%, #fde9c0 0, rgba(253, 233, 192, 0) 40%),
    radial-gradient(circle at -5% 105%, #d98536 0, rgba(217, 133, 54, 0) 58%),
    radial-gradient(circle at 105% 96%, #d9822f 0, rgba(217, 130, 47, 0) 52%),
    radial-gradient(circle at 102% 30%, #e6a558 0, rgba(230, 165, 88, 0) 40%),
    radial-gradient(circle at 45% 45%, #fdf0d6 0, #eec78c 100%);
  background-attachment: fixed;
}
.site-header { background: linear-gradient(180deg, #fffaf0, #fbeed9); border-bottom: 3px solid #d98f34; }
.site-header .wrap { position: relative; z-index: 1; }   /* Menütasten liegen über den Blättern */
/* Menüpunkte als eigene Kacheln – vor dem herbstlichen Hintergrund besser zu erkennen als bloße Schrift */
.nav { gap: 6px; padding-bottom: 9px; }
.nav a { color: #7d420f; background: #fffaf0; border: 1px solid #e3c79a; border-radius: 12px; padding: 8px 14px;
  box-shadow: 0 2px 0 rgba(122, 77, 31, .16); transition: background .15s, transform .12s, box-shadow .12s; }
.nav a:hover { background: #fdeed4; color: #6d3a0d; transform: translateY(-1px); box-shadow: 0 3px 0 rgba(122, 77, 31, .22); }
.nav a:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(122, 77, 31, .22); }
.nav a.active { background: var(--green); color: #fff; border-color: var(--green-dark); box-shadow: 0 2px 0 var(--green-dark); }
.nav a:focus-visible { outline: 3px solid var(--wood-dark); outline-offset: 2px; }
/* aktive Reiter/Tasten beim Überfahren dunkler statt heller (weiße Schrift bleibt lesbar) */
.nav a.active:hover, .lv-tab.active:hover, .ue-tabs a.active:hover, .seg a.active:hover { background: var(--green-dark); color: #fff; }
h1, h2 { color: #3f6a1c; }
.intro { background: #fffaf1; border-left-color: #d98f34; }
.group, .content, .album-card, .lv-card, .ee-game { border: 1px solid #edd9b8; }
/* Spiel- und Video-Kachel nicht reinweiß, sondern in warmem Pergamentton */
.ee-game, .lv-card { background: linear-gradient(180deg, #fffbf3 0, #fbeed7 100%); }
/* Himmel im 1×1-Spiel: kein strahlendes Blau mehr, sondern diesiges Herbstlicht mit ziehenden Wolken */
/* mehr Himmel über den Baumwipfeln, damit Wolken und Herbstlicht zu sehen sind */
.ee-stage { padding-top: 140px; background: linear-gradient(180deg, #7f95a9 0%, #b0b0a8 44%, #ded0ac 76%); }
.ee-sky { display: block; position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 0; pointer-events: none; }
.ee-cloud { animation: ee-cloud-zug 90s linear infinite; }
.ee-cloud2 { animation-duration: 120s; animation-delay: -40s; }
.ee-cloud3 { animation-duration: 150s; animation-delay: -90s; }
.ee-cloud4 { animation-duration: 110s; animation-delay: -25s; }
.ee-cloud5 { animation-duration: 135s; animation-delay: -65s; }
@keyframes ee-cloud-zug { from { transform: translateX(-260px); } to { transform: translateX(900px); } }
@media (prefers-reduced-motion: reduce) { .ee-cloud { animation: none; } }
@media (max-width: 640px) { .ee-stage { padding-top: 96px; } }
/* 1×1-Wald in Herbstfarben (Klassen aus forestSvg in lib/views.js): gelb-braunes Laub, wenige grüne Tannen,
   Sonne steckt im diesigen Himmel (skySvg) statt im Wald */
.ee-forest .wh.n0 { fill: #a8bf90; } .ee-forest .wh.n1 { fill: #9cb885; }
.ee-forest .wh.l0 { fill: #e7cf96; } .ee-forest .wh.l1 { fill: #ddc189; } .ee-forest .wh.l2 { fill: #e3c07f; }
.ee-forest .wm.n0 { fill: #7e9a5c; } .ee-forest .wm.n1 { fill: #6e8c51; }
.ee-forest .wm.l0 { fill: #d9962f; } .ee-forest .wm.l1 { fill: #c9742a; } .ee-forest .wm.l2 { fill: #e0ab3c; } .ee-forest .wm.l3 { fill: #bd5f27; }
.ee-forest .stamm-h { fill: #c0a684; }
.ee-forest .huegel { fill: #edddb4; }
.ee-forest .boden-1 { stop-color: #e2cd93; } .ee-forest .boden-2 { stop-color: #c4a463; }
.ee-forest .huegel-vorne { fill: #d2b06d; }
.ee-forest .buesche { fill: #a9762f; }
.ee-forest .gras { stroke: #a07c33; }
.ee-forest .sonne, .ee-forest .sonne-glanz, .ee-forest .nur-o { display: none; }
.ee-forest .nur-h { display: inline; }
.lv-tab { background: #fffaf0; }
/* Fußzeile auf dem warmen Grund dunkel statt grau, sonst kaum zu lesen */
.site-footer { border-top-color: #e6cca4; color: #6d4318; }
.site-footer a { color: #6d4318; font-weight: 600; }
.site-footer a:hover { color: #4d2c0c; }
.btn { box-shadow: 0 3px 0 #3f6a1c; }
.crumbs a { color: #a85f16; }

/* Blätter im Menü (leaves.js): mehrere Ebenen, nach oben hin kleiner und blasser, hinter den Tasten */
.leaves { position: absolute; left: 0; right: 0; height: 0; z-index: 0; pointer-events: none; }
.leaf { opacity: var(--op); position: absolute; left: var(--x); bottom: var(--lift); width: var(--size); height: var(--size); transform-origin: 50% 85%;
  transform: translate(-50%, 0) scaleY(var(--flach)) rotate(var(--tilt)); animation: leaf-idle var(--dur) ease-in-out var(--delay) infinite; }
.leaf svg { display: block; width: 100%; height: 100%; }
@keyframes leaf-idle {
  0%, 100% { transform: translate(-50%, 0) scaleY(var(--flach)) rotate(var(--tilt)); }
  50% { transform: translate(calc(-50% + 1px), -1px) scaleY(calc(var(--flach) + .06)) rotate(calc(var(--tilt) + 5deg)); }
}
.leaf.gust { animation: leaf-gust 1.3s cubic-bezier(.25, .9, .3, 1) both; }
/* beim Auffliegen richtet sich das Blatt kurz auf (Stauchung geht zurück) und legt sich wieder hin */
@keyframes leaf-gust {
  0% { transform: translate(-50%, 0) scaleY(var(--flach)) rotate(var(--tilt)); }
  30% { transform: translate(calc(-50% + var(--fly) * 0.45), -22px) scaleY(.95) rotate(calc(var(--tilt) + 150deg)); }
  65% { transform: translate(calc(-50% + var(--fly) * 0.85), -12px) scaleY(.85) rotate(calc(var(--tilt) + 290deg)); }
  100% { transform: translate(calc(-50% + var(--fly)), 0) scaleY(var(--flach)) rotate(calc(var(--tilt) + 360deg)); }
}
@media (prefers-reduced-motion: reduce) { .leaf { animation: none; } }

/* Hintergrund (leaves.js): weiche Lichtpunkte und durchscheinende Blätter mit Kontur und Schatten */
.bg-leaves { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bokeh { position: absolute; width: var(--d); height: var(--d); border-radius: 50%; opacity: var(--op); filter: blur(7px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 253, 244, .5) 0, rgba(255, 249, 232, .62) 60%, rgba(255, 244, 219, .7) 76%, rgba(255, 240, 205, 0) 88%); }
.bg-leaf { position: absolute; width: var(--size); height: var(--size); opacity: var(--op);
  transform: translate(-50%, -50%) rotate(var(--rot)); filter: drop-shadow(2px 3px 2px rgba(90, 48, 16, .35)); }
.bg-leaf svg { display: block; width: 100%; height: 100%; }
@media (max-width: 720px) { .bg-leaf { width: calc(var(--size) * .65); height: calc(var(--size) * .65); } }

/* Design „Weihnachten“ – Ergänzungen zu designs/herbst.css (beides zusammen wird in der Tabelle designs gespeichert).
   Gemütlicher Winterabend: blaue Stunde mit Mond, warmes Licht von Lichterkette und Horizont, Schnee, Tannengrün und
   Weihnachtsrot, cremefarbene Kacheln (Zeichnungen: public/winter-art.js, Aufbau: public/winter.js).
   Bewusst ohne Weihnachtsmann und Christkind. Ein heller Wintertag war zu kühl – deshalb Abendstimmung. */

/* ---- Grundstimmung: Abendhimmel, Mond rechts oben, warmer Schein am Horizont, Schneehügel (fest am Bildschirmrand) ---- */
:root {
  --paper: #fff9ec;
  --shadow: 0 6px 24px rgba(8, 14, 40, .38);
  --green: #2e7d4f;        /* Tasten und Akzente in Tannengrün statt Frühlingsgrün */
  --green-dark: #1f5c3a;
  --mond-x: calc(100% - 62px); --mond-y: 205px; --mond-r: 30px;
}
/* am Handy sitzt der Mond kleiner zwischen Kopfzeile und erster Kachel, sonst schaut er halb hinter ihr hervor */
@media (max-width: 720px) { :root { --mond-x: calc(100% - 46px); --mond-y: 132px; --mond-r: 20px; } }
/* Nur der Himmel: das Schneefeld mit Horizont, fernem Wald und Dorf zeichnet public/winter.js als SVG darüber
   (.wn-boden). Die flache Schneeellipse hier ist der Ersatz, falls kein Skript läuft. */
body, body.ue-body {
  background-color: #2a3868;
  background-image:
    radial-gradient(ellipse 80% 22% at 50% 108%, #dfe5f6 0, #ccd5ee 97%, rgba(204, 213, 238, 0) 100%),
    radial-gradient(circle var(--mond-r) at var(--mond-x) var(--mond-y), #fff5d6 0, #ffefc2 94%, rgba(255, 239, 194, 0) 100%),
    radial-gradient(circle calc(var(--mond-r) * 5.5) at var(--mond-x) var(--mond-y), rgba(255, 233, 170, .34) 0, rgba(255, 233, 170, 0) 100%),
    radial-gradient(ellipse 90% 40% at 50% 62%, rgba(255, 176, 104, .55) 0, rgba(246, 150, 110, .25) 52%, rgba(246, 150, 110, 0) 100%),
    linear-gradient(180deg, #17224a 0%, #233462 34%, #374682 66%, #5a5c98 100%);
  background-attachment: fixed;
}

/* ---- Kopfzeile und Menü: warmes Creme wie im Kerzenschein, Tannengrün, aktive Kachel in Weihnachtsrot ---- */
.site-header { background: linear-gradient(180deg, #fff8e8, #f8e7c6); border-bottom-color: #a5281c; box-shadow: 0 4px 18px rgba(8, 14, 40, .35); }
/* Zieht man die Seite ganz oben noch weiter nach unten (Gummiband-Effekt), käme über der Kopfzeile der dunkle Himmel
   zum Vorschein – deshalb setzt sich die Kopfzeile nach oben in ihrer Farbe fort */
.site-header::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 100vh; background: #fff8e8; pointer-events: none; }
.nav a { position: relative; color: #1f4d36; background: #fffaf0; border-color: #e0c48f; box-shadow: 0 2px 0 rgba(110, 70, 20, .22); }
/* Schneehäubchen auf den Menükacheln */
.nav a::before { content: ''; position: absolute; left: 9%; right: 9%; top: -4px; height: 7px; background: #fff;
  border-radius: 7px 7px 5px 5px; box-shadow: 0 1px 0 rgba(150, 120, 70, .4); pointer-events: none; }
.nav a:hover { background: #fdeed0; color: #173b29; box-shadow: 0 3px 0 rgba(110, 70, 20, .28); }
.nav a.active { background: #b93226; border-color: #8a2015; box-shadow: 0 2px 0 #8a2015; color: #fff; }
.nav a.active:hover { background: #a02a1f; }
.brand-title { color: #1f5c3a; }
.brand-sub { color: #96281b; }

/* ---- Schrift: in den Kacheln Tannengrün, direkt auf dem Abendhimmel helles Kerzengelb ---- */
h1, h2, .ee-question { color: #1f5c3a; }
main.wrap > h1, main.wrap > h2, .lw-archiv > h2, .ue-hero h1, .ue-hero h2 { color: #ffeec4; text-shadow: 0 2px 6px rgba(8, 14, 40, .7); }
main.wrap > .muted, main.wrap > p.hint, .lw-archiv-klasse, .kb-controls > label, .kb-controls > .muted,
main.wrap > h1 + p:not([class]) { color: #f1ecdd; text-shadow: 0 1px 4px rgba(8, 14, 40, .7); }
main.wrap > h1 + p:not([class]) a { color: #ffd98a; }
.crumbs { color: #d9d8ec; text-shadow: 0 1px 4px rgba(8, 14, 40, .7); }
.crumbs a { color: #ffd98a; }
.intro { background: #fff9ec; border-left-color: #b93226; }
.group, .content, .album-card, .lv-card, .ee-game { border-color: #e6cf9f; }
.group, .content, .album-card { background-color: #fff9ec; }
.lv-tab { background: #fffaf0; }
.edit-link-dark { color: #e6e3f2; }
.btn { box-shadow: 0 3px 0 #174a2e; }
.btn.secondary { background: #fffaf0; box-shadow: 0 3px 0 #d9c08c; border-color: #d9c08c; }
.btn.danger { box-shadow: 0 3px 0 #a33c39; }
/* kurze Seiten: Fußzeile ganz nach unten schieben, damit sie nicht quer vor dem Dorf auf den Hügeln liegt */
main.wrap { min-height: calc(100vh - 190px); }
/* Fußzeile: eigener dunkler Streifen – sie liegt sonst genau vor den hellen Schneehügeln */
.site-footer { border-top: 0; margin-top: 10px; padding: 12px 18px; border-radius: 14px 14px 0 0; background: rgba(16, 24, 56, .84);
  color: #f1e9d4; }
.site-footer a { color: #ffe3a3; }
.site-footer a:hover { color: #fff; }
.lw-archiv-links a strong { color: #1f5c3a; }
.lw-archiv-links a.active { background: #b93226; border-color: #8a2015; box-shadow: 0 2px 0 #8a2015; }
/* Schnee auf den Tafeln der Startseite, warmer Schein um die Tafeln */
.chalkboard { position: relative; box-shadow: 0 10px 34px rgba(8, 14, 40, .5), 0 0 44px rgba(255, 190, 110, .16); }
.chalkboard::before { content: ''; position: absolute; left: 3%; right: 3%; top: -7px; height: 13px; background: #fff;
  border-radius: 12px 12px 8px 8px; box-shadow: 0 2px 0 rgba(90, 100, 150, .45); pointer-events: none; }

/* ---- Teile, die es nur im Weihnachts-Design gibt (Markup in lib/views.js) ---- */
.nur-weihnachten { display: revert; }

/* Figuren im Schnee: Schneemann winkt, Rentiernase leuchtet, Kugeln und Baumstern funkeln */
.wn-winken { transform-box: fill-box; transform-origin: 0% 100%; animation: wn-winken 1.4s ease-in-out infinite alternate; }
@keyframes wn-winken { from { transform: rotate(-9deg); } to { transform: rotate(11deg); } }
.wn-nase { animation: wn-nase 1.8s ease-in-out infinite alternate; }
@keyframes wn-nase { from { fill: #c92a22; } to { fill: #ff5a4d; } }
.wn-kugeln circle:nth-child(4n + 1) { animation: wn-funkeln 2.2s ease-in-out infinite alternate; }
.wn-baumstern { transform-box: fill-box; transform-origin: center; animation: wn-stern 2.4s ease-in-out infinite alternate; }
@keyframes wn-funkeln { from { opacity: .55; } to { opacity: 1; } }
@keyframes wn-stern { from { transform: scale(.9) rotate(-6deg); } to { transform: scale(1.08) rotate(6deg); } }

/* ---- 1×1-Spiel: verschneiter Wald (Klassen aus forestSvg/skySvg in lib/views.js) ---- */
.ee-stage { background: linear-gradient(180deg, #1c2a5c 0%, #36478a 38%, #8479b0 62%, #f0b98e 80%); }
.wolke-a { stop-color: #aab4dc; } .wolke-b { stop-color: #7f8bc0; } .wolke-c { stop-color: #5a669f; }
/* die Herbstsonne wird zum Mond */
.ee-sky .himmel-sonne circle { fill: #fff3cf; }
.ee-sky .himmel-sonne circle:first-child { opacity: .3; }
.ee-forest .wh.n0 { fill: #6f8fa6; } .ee-forest .wh.n1 { fill: #64849c; }
.ee-forest .wh.l0, .ee-forest .wh.l1, .ee-forest .wh.l2 { fill: #a9b4d6; }
.ee-forest .wm.n0 { fill: #2f6a4c; } .ee-forest .wm.n1 { fill: #275c41; }
.ee-forest .wm.l0, .ee-forest .wm.l2 { fill: #8f9cc4; } .ee-forest .wm.l1, .ee-forest .wm.l3 { fill: #808eb8; }
.ee-forest .schnee { fill: #f4f6fd; }
.ee-forest .stamm-h { fill: #7d7f96; } .ee-forest .stamm-m { fill: #4d3a30; }
.ee-forest .huegel { fill: #c4cdea; }
.ee-forest .boden-1 { stop-color: #eef1fb; } .ee-forest .boden-2 { stop-color: #c2cbe8; }
.ee-forest .huegel-vorne { fill: #dfe5f6; }
.ee-forest .buesche { fill: #eef1fb; stroke: #b9c3e2; stroke-width: 1.5; }
.ee-forest .gras, .ee-forest .pilz { display: none; }
.wn-flocke { animation: wn-wald-schnee 9s linear infinite; }
@keyframes wn-wald-schnee { from { transform: translate(0, -130px); } to { transform: translate(26px, 150px); } }

/* ---- Menü-Eichhörnchen fährt Rodel (public/squirrel.js, Effekt „schlitten“): Rodel, Zipfelmütze, Schneestaub ---- */
.squirrel.schlitten .sq-schlitten, .squirrel.schlitten .sq-muetze { display: inline; }
.squirrel.schlitten .sq-schatten { display: none; }
.squirrel.schlitten .sq-tail { transform-box: fill-box; transform-origin: 100% 100%; animation: wn-schwanz 1.2s ease-in-out infinite; }
@keyframes wn-schwanz { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(7deg); } }
.squirrel.schlitten .sq-schneestaub circle { animation: wn-staub .45s ease-out infinite; }
.squirrel.schlitten .sq-schneestaub circle:nth-child(2n) { animation-delay: -.2s; }
@keyframes wn-staub { from { opacity: 1; transform: translate(0, 0); } to { opacity: 0; transform: translate(-9px, -5px); } }

/* ---- Lichterkette und Tannenzweige in der Kopfzeile (public/winter.js) ---- */
.wn-kette { position: absolute; left: 0; right: 0; top: 100%; height: 40px; margin-top: 1px; z-index: 0; pointer-events: none; overflow: hidden; }
.wn-kette svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wn-licht { animation: wn-licht 2.6s ease-in-out infinite; }
.wn-licht:nth-of-type(3n) { animation-delay: -.9s; } .wn-licht:nth-of-type(3n + 1) { animation-delay: -1.7s; }
@keyframes wn-licht { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
/* Tannengrün, Zapfen, Stechpalme und Sterne liegen in der Kopfzeile herum (winter.js) – hinter Schriftzug und Menükacheln */
.wn-streu { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 0; pointer-events: none; }
.wn-streu-teil { position: absolute; transform-origin: 50% 60%; filter: drop-shadow(0 1px 1px rgba(90, 60, 20, .28)); }
.wn-streu-teil svg { display: block; width: 100%; height: auto; overflow: visible; }
.wn-zweig { position: absolute; top: -6px; width: 150px; z-index: 0; pointer-events: none; opacity: .92; }
.wn-zweig svg { display: block; width: 100%; height: auto; }
.wn-zweig.links { left: -34px; transform: rotate(8deg); opacity: .6; }
.wn-zweig.rechts { right: -22px; transform: scaleX(-1) rotate(4deg); }
@media (max-width: 720px) { .wn-zweig { width: 104px; } .wn-zweig.links { display: none; } .wn-zweig.rechts { right: 44px; opacity: .6; } }

/* ---- Schnee und Figuren im Seitenhintergrund (public/winter.js) ---- */
.wn-hintergrund { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.wn-schneeflocke { position: absolute; top: -12px; width: var(--d); height: var(--d); border-radius: 50%; background: #fff; opacity: var(--op);
  box-shadow: 0 0 5px rgba(255, 255, 255, .55); animation: wn-fallen var(--dauer) linear var(--start) infinite; }
.wn-schneeflocke.nah { filter: blur(1.2px); }   /* große Flocken ganz vorne sind unscharf */
@keyframes wn-fallen { from { transform: translate(0, -5vh); } to { transform: translate(var(--drift), 108vh); } }
.wn-figur { position: absolute; width: var(--w); transform: translate(-50%, -50%); }
.wn-figur .wn-bild { display: block; width: 100%; height: auto; overflow: visible; }
.wn-figur .m-eye { transform-box: fill-box; transform-origin: center; }
.wn-figur .wn-bild.blink .m-eye { animation: m-blink .22s ease-in-out; }
.wn-figur-stern .wn-bild { animation: wn-stern 2.8s ease-in-out infinite alternate; filter: drop-shadow(0 0 9px rgba(255, 214, 110, .85)); }
.wn-figur-flocke .wn-bild { animation: wn-drehen 18s linear infinite; opacity: .9; }
@keyframes wn-drehen { to { transform: rotate(360deg); } }
.wn-spaet .wn-bild { animation-delay: -1.4s; }
/* Dorf auf den Schneehügeln (Platz je Haus berechnet winter.js): Fenster leuchten warm, manche flackern wie
   Kerzenlicht, aus den Kaminen steigt Rauch */
.wn-haus { position: absolute; transform: translate(-50%, -94%); }
/* Figuren stehen mit den Füßen im Schnee (Platz berechnet winter.js) – nichts schwebt */
.wn-steht { position: absolute; transform: translate(-50%, -95%); }
.wn-steht .wn-bild { display: block; width: 100%; height: auto; overflow: visible; }
.wn-steht .m-eye { transform-box: fill-box; transform-origin: center; }
.wn-steht .wn-bild.blink .m-eye { animation: m-blink .22s ease-in-out; }
.wn-haus .wn-bild { display: block; width: 100%; height: auto; overflow: visible; }
/* das Christkind auf dem Kirchturm blinzelt wie die anderen Figuren */
.wn-haus .m-eye { transform-box: fill-box; transform-origin: center; }
.wn-haus .wn-bild.blink .m-eye { animation: m-blink .22s ease-in-out; }
.wn-fenster { filter: drop-shadow(0 0 3px rgba(255, 208, 110, .95)) drop-shadow(0 0 10px rgba(255, 186, 90, .6)); }
.wn-flacker { animation: wn-flackern 3.6s ease-in-out infinite; }
.wn-haus:nth-child(2n) .wn-flacker { animation-duration: 4.9s; animation-delay: -1.3s; }
@keyframes wn-flackern { 0%, 100% { opacity: 1; } 42% { opacity: .74; } 50% { opacity: .96; } 63% { opacity: .7; } }
.wn-rauch circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: wn-rauch 5.4s ease-out infinite; }
.wn-rauch circle:nth-child(2) { animation-delay: -1.8s; } .wn-rauch circle:nth-child(3) { animation-delay: -3.6s; }
.wn-haus:nth-child(3n) .wn-rauch circle { animation-duration: 6.9s; }
@keyframes wn-rauch { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 14% { opacity: .62; } 55% { opacity: .3; }
  100% { opacity: 0; transform: translate(10px, -30px) scale(2); } }
/* Schneefeld mit Horizont (SVG aus public/winter.js), darauf das Dorf in der Tiefe verstreut: --dunst (0 = ganz vorne,
   1 = am Horizont) macht Häuser und Figuren nach hinten blasser und bläulicher, die Fenster leuchten dort schwächer */
.wn-boden { position: absolute; inset: 0; }
.wn-boden svg { display: block; width: 100%; height: 100%; }
.wn-haus, .wn-steht { opacity: calc(1 - var(--dunst, 0) * .2); }
.wn-haus .wn-bild { filter: saturate(calc(1 - var(--dunst, 0) * .3)) brightness(calc(1 - var(--dunst, 0) * .16)); }
.wn-steht .wn-bild { filter: saturate(calc(1 - var(--dunst, 0) * .3)) brightness(calc(1 - var(--dunst, 0) * .16)) drop-shadow(0 3px 6px rgba(8, 14, 40, .35)); }
/* Tannen hinten bleiben grün – zu viel Dunst machte sie blau */
.wn-steht.wn-figur-tannenbaum .wn-bild { filter: saturate(calc(1 - var(--dunst, 0) * .15)) brightness(calc(1 - var(--dunst, 0) * .14)) drop-shadow(0 0 14px rgba(255, 196, 110, .4)); }
.wn-fern .wn-fenster { filter: drop-shadow(0 0 2px rgba(255, 208, 110, .7)); }
.wn-fern .wn-rauch { opacity: .7; }   /* auch hinten im Dunst raucht jeder Kamin, nur zarter */
/* Die Dinge im Schnee tragen ihren Platz als z-index (winter.js) – die Schneeflocken fallen vor allem */
.wn-schneeflocke { z-index: 20000; }
/* Snoopy (genau einer; winter.js lässt ihn wandern): --blick 1 = schaut nach rechts, -1 = nach links. Vor dem Loslaufen
   wendet er den Kopf um die Halsachse (.wn-kopf-gedreht), unterwegs watschelt er und setzt die Füße (.wn-laeuft). */
.wn-figur-snoopy .wn-bild { transform: scaleX(var(--blick, 1)); transform-origin: 47.5% 94%; }
.wn-snoopy-hand, .wn-snoopy-hand body, .wn-snoopy-hand main { cursor: pointer; }   /* Maus über Snoopy (winter.js) */
.wn-sn-kopf { transform-box: fill-box; transform-origin: 41.2% 50%; transition: transform .32s ease-in-out; }
.wn-kopf-gedreht .wn-sn-kopf { transform: scaleX(-1); }
.wn-sofort .wn-sn-kopf { transition: none; }
.wn-laeuft .wn-bild { animation: wn-watscheln .6s ease-in-out infinite; }
/* in jedem Schritt dieselbe Abfolge von Funktionen – sonst rechnet der Browser über Matrizen um und das gespiegelte Bild kippt */
@keyframes wn-watscheln { 0%, 100% { transform: scaleX(var(--blick, 1)) translateY(0) rotate(-4deg); }
  25%, 75% { transform: scaleX(var(--blick, 1)) translateY(-3%) rotate(0deg); } 50% { transform: scaleX(var(--blick, 1)) translateY(0) rotate(4deg); } }
.wn-laeuft .wn-sn-fuss-a { animation: wn-schritt .6s linear infinite; }
.wn-laeuft .wn-sn-fuss-b { animation: wn-schritt .6s linear -.3s infinite; }
@keyframes wn-schritt { 0%, 100% { transform: translate(10px, 0); } 55% { transform: translate(-10px, 0); } 78% { transform: translate(0, -7px); } }
/* Sternschnuppen beim Christkind, wenn jemand Snoopy erwischt (winter.js): fliegen vor dem Seiteninhalt, nehmen keine Klicks an */
.wn-schnuppen { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.wn-schnuppe { position: absolute; width: 0; height: 0; transform: rotate(var(--winkel)); }
.wn-schnuppe i { position: absolute; right: calc(var(--gr) / -2); top: calc(var(--gr) / -2); width: calc(var(--gr) * 5); height: var(--gr); opacity: 0;
  transform-origin: 100% 50%; animation: wn-schnuppe var(--dauer) cubic-bezier(.2, .6, .35, 1) var(--start) both; }
.wn-schnuppe i::before { content: ''; position: absolute; left: 0; right: calc(var(--gr) * .6); top: 50%; height: 2px; margin-top: -1px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 244, 190, 0), rgba(255, 244, 190, .95)); }
.wn-schnuppe svg { position: absolute; right: 0; top: 0; width: var(--gr); height: var(--gr); filter: drop-shadow(0 0 4px rgba(255, 233, 160, .9)); }
@keyframes wn-schnuppe { 0% { transform: translateX(0) scale(.3); opacity: 0; } 12%, 65% { opacity: 1; }
  100% { transform: translateX(var(--weit)) scale(1); opacity: 0; } }
/* Ist der Bildschirm schmaler, liegen Sterne und Kristalle auch hinter Überschriften – dann blasser */
@media (max-width: 1199px) { .wn-figur { opacity: .7; } }

@media (prefers-reduced-motion: reduce) {
  .wn-winken, .wn-nase, .wn-kugeln circle, .wn-baumstern, .wn-flocke, .wn-licht, .wn-schneeflocke, .wn-figur .wn-bild,
  .wn-flacker, .wn-rauch circle,
  .squirrel.schlitten .sq-tail, .squirrel.schlitten .sq-schneestaub circle { animation: none !important; }
  .wn-schneeflocke, .wn-flocke { display: none; }
}
