/* 24ideen · Weihnachts-Entwürfe A–H (Auswahl durch Eugen + Freundin). Liegt ÜBER app.css + seite.css.
   thema.js setzt vor dem ersten Bild <html data-thema="…" data-held="hell|dunkel" data-deko="oben|unten|ecke"> und fügt Deko, Schnee und
   die Entwurfs-Leiste ein. Alle Kontraste nachgerechnet (WCAG 2.2): Text ≥ 4,5 : 1, Bedienelemente ≥ 3 : 1.
   Bewegung (Schnee, Funkeln, Schaukeln, Glanz) nur ohne „Bewegung reduzieren“ und jederzeit abschaltbar (Knopf „Schnee“). */

/* ================= Held: Fläche + Deko ================= */
[data-thema] .held { position: relative; isolation: isolate; background: var(--held-grund, var(--grund)); }
[data-thema] .held > .inhalt { position: relative; z-index: 3; }
[data-deko="oben"] .held { padding-top: calc(var(--deko-h) * .82 + 6px); }
[data-deko="unten"] .held { padding-bottom: calc(var(--deko-h) * .96); }
[data-deko="ecke"] .held { padding-top: 150px; }
@media (min-width: 980px) {
  [data-deko="ecke"] .held { padding-top: clamp(36px, 6vw, 88px); }
  [data-deko="ecke"] .held__bild { margin-top: 140px; }
  /* Desktop: Text bleibt immer über der Landschaft (Silhouette beginnt erst unter der Vertrauenszeile); der Plan darf sie überlappen */
  [data-deko="unten"] .held { padding-bottom: calc(var(--deko-h) * .8); }
  [data-held="dunkel"] .held .held__vertrauen { text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
}
.deko { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.deko img { display: block; width: 100%; height: 100%; }
.deko--oben { top: 0; height: var(--deko-h); }
.deko--oben img { object-fit: cover; object-position: center top; transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
@media (min-width: 980px) { .deko--oben img { object-fit: contain; } }
.deko--unten { bottom: 0; height: var(--deko-h); }
.deko--unten img { object-fit: cover; object-position: center bottom;
  -webkit-mask-image: linear-gradient(to top, #000 72%, transparent); mask-image: linear-gradient(to top, #000 72%, transparent); }
.deko--ecke { top: 0; left: auto; width: var(--deko-w); }
.deko--ecke img { height: auto;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 0, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 100% 100% at 100% 0, #000 62%, transparent 100%); }

/* Dunkle Held-Flächen: Schrift hell */
[data-held="dunkel"] .held { color: #fff; }
[data-held="dunkel"] .held h1 { color: #fff; }
[data-held="dunkel"] .held .held__lead, [data-held="dunkel"] .held .held__vertrauen { color: var(--held-lead); }
[data-held="dunkel"] .held .held__vertrauen .icon { color: var(--honig); }
[data-held="dunkel"] .held .kicker { color: var(--held-kicker, var(--honig)); }
[data-held="dunkel"] .held .knopf--zweit { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
[data-held="dunkel"] .held .knopf--zweit:hover { background: rgba(255, 255, 255, .17); }
[data-held="dunkel"] .held .planbild { box-shadow: 0 48px 90px -40px rgba(0, 0, 0, .7); }
[data-held="dunkel"] .held .planbild__karte { box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); color: var(--tinte); }
[data-held="dunkel"] .held .planbild__karte .karte__nr { color: var(--tinte); }
[data-held="dunkel"] .held .pfeillink { color: #fff; }

/* Kopf (Seiten + Planer) */
[data-thema] .skopf, [data-thema] .kopf { background: var(--kopf-grund); }
[data-held="dunkel"] .skopf .marke span, [data-held="dunkel"] .skopf__nav a, [data-held="dunkel"] .kopf .marke span,
[data-held="dunkel"] .schritt-zahl { color: rgba(255, 255, 255, .88); }
[data-held="dunkel"] .skopf__nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
[data-held="dunkel"] .kopf .kreisknopf { color: #fff; }
[data-held="dunkel"] .kopf .kreisknopf:hover { background: rgba(255, 255, 255, .12); }
[data-held="dunkel"] .fortschritt { background: rgba(255, 255, 255, .18); }
[data-held="dunkel"] .fortschritt__balken { background: var(--honig); }
[data-held="dunkel"] .skopf .knopf--haupt { background: var(--held-haupt, var(--haupt)); color: var(--held-haupt-text, #fff); box-shadow: none; }

/* Gemeinsame Farbrollen */
[data-thema] .knopf--haupt { background: var(--haupt); color: var(--haupt-text, #fff); box-shadow: 0 12px 26px -14px var(--haupt-schatten, rgba(0, 0, 0, .5)); }
[data-thema] .knopf--haupt:hover { background: var(--haupt-hover, var(--haupt)); }
[data-thema] .held .knopf--haupt { background: var(--held-haupt, var(--haupt)); color: var(--held-haupt-text, var(--haupt-text, #fff)); }
/* Gesperrter Weiter-Knopf muss auch im Weihnachts-Design grau aussehen – vorher sah er aktiv aus und ein Tippen tat nichts (Audit 16.10.) */
[data-thema] .knopf--haupt:disabled, [data-thema] .knopf--haupt:disabled:hover { background: var(--flaeche-3, #E9E1D3); color: var(--tinte-2, #5E5144); box-shadow: none; cursor: not-allowed; }
[data-thema] .kicker, [data-thema] .plan__kicker, [data-thema] .schritt__zahl { color: var(--kicker); }
[data-thema] .marke b { color: var(--marke-hell, var(--marke, var(--akzent))); }
[data-held="dunkel"] .skopf .marke b, [data-held="dunkel"] .kopf .marke b { color: var(--marke, var(--akzent)); }
[data-thema] .band--dunkel { position: relative; isolation: isolate; overflow: hidden; background: var(--band); }
[data-thema] .band--dunkel > .inhalt { position: relative; z-index: 3; }
[data-thema] .band--dunkel p { color: var(--band-text); }

/* ================= Bewegung ================= */
/* Jede Flocke = unsichtbare Säule in voller Höhe (fällt mit translateY 100 % = Höhe des Bereichs), darin die Flocke, die seitlich pendelt. */
.schnee { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.schnee i { position: absolute; top: 0; left: var(--l); width: var(--g); height: 100%; animation: fallen var(--d) linear var(--v) infinite; }
.schnee i::before, .schnee i svg { position: absolute; top: 0; left: 0; display: block; width: var(--g); height: var(--g); opacity: var(--o); }
.schnee i.p::before { content: ""; border-radius: 50%; background: var(--flocke, #fff); animation: pendeln var(--s) ease-in-out var(--v) infinite alternate; }
.schnee i svg { color: var(--kristall, #fff); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  animation: pendeln-dreh var(--s) ease-in-out var(--v) infinite alternate; }
@keyframes fallen { from { transform: translateY(-28px); } to { transform: translateY(100%); } }
@keyframes pendeln { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
@keyframes pendeln-dreh { from { transform: translateX(-10px) rotate(-50deg); } to { transform: translateX(10px) rotate(50deg); } }
.schnee--seite { position: fixed; z-index: 0; }
.schnee--seite i svg { color: var(--kristall-seite); }
.app { position: relative; z-index: 1; }
.funkeln { position: absolute; inset: 0 0 45% 0; z-index: 2; pointer-events: none; }
.funkel { position: absolute; width: var(--g); height: var(--g); color: var(--funkel, #E6B34E); fill: currentColor; stroke: none;
  animation: funkeln var(--d) ease-in-out var(--v) infinite; }
@keyframes funkeln { 0%, 100% { opacity: .1; transform: scale(.5) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(25deg); } }
.deko--schaukeln img { animation: schaukeln 6.5s ease-in-out infinite; }
@keyframes schaukeln { 0%, 100% { transform: skewX(-1.4deg); } 50% { transform: skewX(1.4deg); } }
.tuer--hoehepunkt { overflow: hidden; }
.tuer--hoehepunkt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: glanz 6s ease-in-out 3s infinite; }
@keyframes glanz { 0%, 72% { background-position: -150% 0; } 100% { background-position: 150% 0; } }
html.ruhig .schnee, html.ruhig .funkeln { display: none; }
html.ruhig .deko--schaukeln img, html.ruhig .tuer--hoehepunkt::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .schnee, .funkeln { display: none; }
  .deko--schaukeln img, .tuer--hoehepunkt::before { animation: none; }
}

/* ================= Entwurfs-Leiste (nur Vorschau) ================= */
.entwurf-leiste { position: relative; z-index: 60; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  background: #121212; color: #fff; font: 600 .875rem/1.2 var(--f-text); }
.entwurf-leiste a, .entwurf-leiste button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 40px;
  padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .13); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
.entwurf-leiste a:hover, .entwurf-leiste button:hover { background: rgba(255, 255, 255, .22); }
.entwurf-leiste .icon { width: 18px; height: 18px; }
.entwurf-leiste__name { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entwurf-leiste__name b { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; background: #fff; color: #121212; }
.entwurf-leiste button[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.entwurf-leiste button[aria-pressed="false"] .icon { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .entwurf-leiste button { display: none; } }
@media (max-width: 380px) { .entwurf-leiste__schnee span { display: none; } }

/* Live: Schnee-Schalter in der Kopfzeile – ruhiger Kreisknopf wie „Zurück“, Zustand über aria-pressed (an = volle Farbe, aus = blass + Strich) */
.schnee-schalter { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--akzent); cursor: pointer; transition: background-color var(--t-kurz), transform var(--t-kurz) var(--kurve); }
.schnee-schalter .icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .schnee-schalter:hover { background: var(--flaeche-2); } }   /* iPhone: kein „hängender“ Hover-Kreis nach dem Tippen */
.schnee-schalter:active { transform: scale(.92); }
.schnee-schalter:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.schnee-schalter[aria-pressed="false"] { color: var(--tinte-2); }
.schnee-schalter[aria-pressed="false"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 2px; border-radius: 2px;
  background: currentColor; box-shadow: 0 0 0 2px var(--held-grund, var(--grund)); transform: translate(-50%, -50%) rotate(-45deg); }
.skopf__zeile .schnee-schalter { margin-right: -14px; }          /* rückt an „Plan erstellen“ heran (Lücke 28 → 14 px) */
@media (max-width: 400px) { .skopf__zeile { gap: 16px; } .skopf__zeile .schnee-schalter { margin-right: -10px; } }
.kopf__zeile > .schnee-schalter { grid-column: 3; grid-row: 1; justify-self: end; }
body:not(.im-plan) .kopf__zeile > .schnee-schalter { display: none; }
/* Planer: Schnee nur in der Plan-Ansicht – die Fragen bleiben ruhig */
body:not(.im-plan) .schnee--seite { display: none; }
@media print { .schnee-schalter, .schnee, .funkeln, .deko { display: none !important; } }

/* Übersichtsseite /entwuerfe/ */
.entwuerfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .entwuerfe { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 22px; } }
.entwuerfe li { min-width: 0; }
.entwurf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; color: var(--tinte); text-decoration: none; }
.entwurf img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
  transition: transform var(--t-kurz) var(--kurve); }
.entwurf:hover img { transform: translateY(-3px); }
.entwurf b { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 4px; font: 600 clamp(.98rem, .9rem + .45vw, 1.125rem)/1.2 var(--f-titel);
  overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.entwurf b span { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #121212; color: #fff;
  font: 600 .8125rem/1 var(--f-text); }
.entwurf small { color: var(--tinte-2); font-size: var(--t-mini); line-height: 1.4; }

/* ================= A · Tannenzweig ================= */
[data-thema="tanne"] {
  --held-grund: #FBF7ED; --kopf-grund: rgba(251, 247, 237, .86); --deko-w: min(58vw, 660px);
  --akzent: #1F3D2F; --akzent-zart: #E5EDE7; --gewaehlt: #F3F7F4; --kicker: #9E2B25; --marke: #9E2B25;
  --haupt: #1F3D2F; --haupt-hover: #2C5240; --haupt-schatten: rgba(31, 61, 47, .8); --band: #1F3D2F; --band-text: #C9D8CE;
  --kristall: #8FA99A; --kristall-seite: #A9BDB0;
}

/* ================= B · Winternacht ================= */
[data-thema="nacht"] {
  --marke-hell: #1E3352;
  --held-grund: linear-gradient(180deg, #101E32 0%, #1B2F48 62%, #263D58 100%); --kopf-grund: rgba(16, 30, 50, .92);
  --held-lead: #C7CFDD; --deko-h: clamp(150px, 31.8vw, 420px);
  --grund: #F3F5F9; --tinte: #172131; --tinte-2: #535E70; --flaeche-2: #E6EAF1; --flaeche-3: #DCE2EB;
  --akzent: #1E3352; --akzent-zart: #E3E8F0; --gewaehlt: #F5F7FB; --kicker: #1E3352; --marke: #E6B34E;
  --haupt: #1E3352; --haupt-hover: #263D58; --held-haupt: #E6B34E; --held-haupt-text: #172131; --band: #14233B; --band-text: #C7CFDD;
  --kristall-seite: #AEB9CC;
}

/* ================= C · Weihnachtsmarkt ================= */
[data-thema="markt"] {
  --marke-hell: #9E2B25;
  --held-grund: #1A3F2A; --kopf-grund: rgba(26, 63, 42, .94); --held-lead: #C9D8CE; --deko-h: clamp(170px, 43.8vw, 470px);
  --akzent: #1F3D2F; --akzent-zart: #E5EDE7; --gewaehlt: #F3F7F4; --kicker: #9E2B25; --marke: #E6B34E;
  --haupt: #9E2B25; --haupt-hover: #B3342D; --haupt-schatten: rgba(158, 43, 37, .85); --band: #1A3F2A; --band-text: #C9D8CE;
  --kristall-seite: #A9BFB1;
}

/* ================= D · Skandi ================= */
[data-thema="skandi"] {
  --held-grund: #FDFCFD; --kopf-grund: rgba(253, 252, 253, .9); --deko-h: clamp(104px, 19.9vw, 250px);
  --grund: #FAF8F5; --tinte: #23201D; --tinte-2: #625C55; --flaeche-2: #F0ECE6; --flaeche-3: #E6E0D8;
  --akzent: #B3261E; --akzent-zart: #F8E5E2; --gewaehlt: #FFF8F7; --kicker: #B3261E; --marke: #B3261E;
  --haupt: #B3261E; --haupt-hover: #C42E25; --haupt-schatten: rgba(179, 38, 30, .7); --band: #B3261E; --band-text: #FBE3E0;
  --kristall: #C3BAB0; --kristall-seite: #D3CBC2;
}
[data-thema="skandi"] .band--dunkel .knopf--honig { background: #fff; color: #B3261E; }

/* ================= E · Lebkuchen ================= */
[data-thema="lebkuchen"] {
  --held-grund: #FEF1D7; --kopf-grund: rgba(254, 241, 215, .92); --deko-h: clamp(112px, 23.2vw, 290px);
  --grund: #FBF4E6; --flaeche-2: #F1E6D2; --flaeche-3: #E8DAC2;
  --akzent: #6B3F17; --akzent-zart: #F1E0C8; --gewaehlt: #FFF9EE; --kicker: #A3341F; --marke: #A3341F;
  --haupt: #6B3F17; --haupt-hover: #7D4B1D; --haupt-schatten: rgba(107, 63, 23, .7); --band: #3B2416; --band-text: #E8D5BD;
  --kristall: #CFA874; --kristall-seite: #DCC09A;
}
[data-thema="lebkuchen"] .held h1 { color: #3B2416; }

/* ================= F · Scherenschnitt ================= */
[data-thema="schnitt"] {
  --marke-hell: #8E1F1A;
  --held-grund: #6B0F13; --kopf-grund: rgba(107, 15, 19, .94); --held-lead: #F3D9D6; --deko-h: clamp(130px, 33.5vw, 440px);
  --akzent: #8E1F1A; --akzent-zart: #F6E1DE; --gewaehlt: #FFF7F6; --kicker: #8E1F1A; --marke: #E6B34E;
  --haupt: #8E1F1A; --haupt-hover: #A3261F; --haupt-schatten: rgba(142, 31, 26, .7); --held-haupt: #E6B34E; --held-haupt-text: #2A2119;
  --band: #6B0F13; --band-text: #F3D9D6; --kristall-seite: #D9B3AE;
}

/* ================= G · Goldglanz ================= */
[data-thema="gold"] {
  --marke-hell: #8A5E0C;
  --held-grund: #1C1B1C; --kopf-grund: rgba(28, 27, 28, .94); --held-lead: #D8CBB8; --deko-h: clamp(96px, 21vw, 262px);
  --akzent: #8A5E0C; --akzent-zart: #F7ECD6; --kicker: #8A5E0C; --marke: #E6B34E;
  --haupt: #1C1B1C; --haupt-hover: #2E2C2D; --held-haupt: #E6B34E; --held-haupt-text: #1C1B1C; --band: #1C1B1C; --band-text: #D8CBB8;
  --flocke: #E6B34E; --kristall: #E6B34E; --kristall-seite: #D9C08A;
}

/* ================= H · Winterwald ================= */
[data-thema="wald"] {
  --held-grund: linear-gradient(180deg, #EDF7FD 0%, #EBF5FD 100%); --kopf-grund: rgba(237, 247, 253, .9); --deko-h: clamp(150px, 40vw, 520px);
  --grund: #F4F8FA; --tinte: #1C2B30; --tinte-2: #4F5F66; --flaeche-2: #E4ECF0; --flaeche-3: #D7E1E6;
  --akzent: #2B4F5A; --akzent-zart: #DCE9EE; --gewaehlt: #F6FAFB; --kicker: #A3341F; --marke: #A3341F;
  --haupt: #2B4F5A; --haupt-hover: #355E6B; --haupt-schatten: rgba(43, 79, 90, .7); --band: #2B4F5A; --band-text: #D3E2E7;
  --flocke: #B4C7D1; --kristall: #93AEBC; --kristall-seite: #A9BFCB;
}
