/* =====================================================================
   Fiete wichtelt – Website-Gestaltung
   Design-Richtung und Bausteine: flutter_app/lib/src/design/README.md
   Gleiche Werte wie flutter_app/lib/src/design/tokens.dart (WichtelColors …)
   ===================================================================== */

/* ---------- Schriften (SIL Open Font License 1.1, Lizenztexte in /images/fonts/) ---------- */
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/images/fonts/Montserrat-Regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/images/fonts/Montserrat-Medium.woff2') format('woff2');
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/images/fonts/Montserrat-SemiBold.woff2') format('woff2');
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/images/fonts/Montserrat-Bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Lilita One';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/images/fonts/LilitaOne-Regular.woff2') format('woff2');
}

/* ---------- Design-Tokens ---------- */
:root {
	--wf-fox: #c4500e;          /* Fuchsorange – Flächen mit weißer Schrift (4,7:1) */
	--wf-fox-bright: #ec6a1f;   /* nur Illustration/Glühen */
	--wf-rust: #8e3a0a;         /* Sockel, Links */
	--wf-fox-mist: #ffe4d1;
	--wf-pine: #173b35;         /* Tannennacht – Schrift, dunkle Flächen */
	--wf-pine-light: #24564d;
	--wf-pine-deep: #0b2420;
	--wf-moss: #4e6560;         /* Nebentext (5,6:1 auf Raureif) */
	--wf-pine-mist: #d6e6e0;
	--wf-brass: #d4a43b;        /* Messing – Lämpchen, Rahmen */
	--wf-brass-deep: #7a5a12;
	--wf-bulb: #ffe9a8;
	--wf-berry: #b3263e;        /* Fehler, sparsame Akzente */
	--wf-frost: #eef3f0;        /* Raureif – Seitenhintergrund */
	--wf-snow: #ffffff;
	--wf-field: #f5f8f6;
	--wf-line: #d5e0dc;
	--wf-cream: #fff6ea;

	/* Kompatibilität mit älteren Namen */
	--wf-primary: var(--wf-fox);
	--wf-text: var(--wf-pine);
	--wf-muted: var(--wf-moss);
	--wf-bg: var(--wf-frost);

	--wf-radius-sm: 8px;
	--wf-radius-md: 14px;
	--wf-radius: 24px;          /* Karten */
	--wf-radius-xl: 32px;

	--wf-space-1: 4px;
	--wf-space-2: 8px;
	--wf-space-3: 12px;
	--wf-space-4: 16px;
	--wf-space-6: 24px;
	--wf-space-8: 32px;
	--wf-space-12: 48px;

	--wf-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--wf-display: 'Lilita One', 'Montserrat', system-ui, sans-serif;
	--wf-measure: 68ch;
	--wf-shadow-card: 0 12px 28px rgba(23, 59, 53, 0.07), 0 1px 2px rgba(23, 59, 53, 0.05);
	--wf-focus: 0 0 0 3px var(--wf-frost), 0 0 0 5px var(--wf-pine);
}

/* Jaspr (jaspr_content) bringt ein eigenes Reset- und Inhalts-Theme mit, das NACH dieser Datei
   geladen wird. Deshalb hier dessen Variablen mit höherer Spezifität (html:root) überschreiben
   und eigene Regeln über .site / .site-main verankern. */
html:root {
	--primary: var(--wf-fox);
	--background: var(--wf-frost);
	--text: var(--wf-pine);
	--content-font: var(--wf-font);
	--content-headings: var(--wf-pine);
	--content-lead: var(--wf-moss);
	--content-links: var(--wf-rust);
	--content-bold: var(--wf-pine);
	--content-counters: var(--wf-fox);
	--content-bullets: var(--wf-fox);
	--content-hr: var(--wf-line);
	--content-quotes: var(--wf-pine);
	--content-quote-borders: var(--wf-brass);
	--content-captions: var(--wf-moss);
}

/* ---------- Grundlagen ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html body {
	margin: 0;
	font-family: var(--wf-font);
	font-size: 1.0625rem;      /* 17 px – gut lesbar auch für 60+ */
	line-height: 1.65;
	color: var(--wf-pine);
	background: var(--wf-frost);
	-webkit-font-smoothing: antialiased;
}

.site a {
	color: var(--wf-rust);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.site a:hover { color: var(--wf-fox); }
.site a:focus-visible,
.site button:focus-visible {
	/* transparent statt none: im Windows-Kontrastmodus zeichnet der Browser den Rahmen sichtbar */
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: var(--wf-focus);
	border-radius: 6px;
}

img { max-width: 100%; height: auto; }

/* „Zurück zum Ratgeber“ über der Überschrift der Ratgeberartikel */
.site-main .back-link { margin: 0 0 var(--wf-space-2); font-size: 0.95rem; }
.site .back-link a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wf-moss);
	font-weight: 600;
	text-decoration: none;
}
.site .back-link a::before { content: "←"; font-size: 1.15em; line-height: 1; transition: transform 0.15s; }
.site .back-link a:hover { color: var(--wf-rust); }
.site .back-link a:hover::before { transform: translateX(-3px); }
@media print { .back-link { display: none; } }

/* Sprunglink: unsichtbar, bis er per Tastatur fokussiert wird */
.site .skip-link {
	position: absolute;
	left: var(--wf-space-4);
	top: -100px;
	z-index: 100;
	padding: var(--wf-space-2) var(--wf-space-4);
	border-radius: var(--wf-radius-sm);
	background: var(--wf-bulb);
	color: var(--wf-pine);
	text-decoration: none;
}
.site .skip-link:focus { top: var(--wf-space-2); }
.site-main:focus { outline: none; }

::selection { background: var(--wf-fox-mist); color: var(--wf-pine); }

/* ---------- Seitengerüst ---------- */
.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Kopfzeile: Tannennacht mit leisem Schneegestöber */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--wf-space-3) var(--wf-space-6);
	padding: var(--wf-space-3) max(var(--wf-space-6), calc((100% - 1080px) / 2));
	color: var(--wf-frost);
	background-color: var(--wf-pine);
	background-image:
		radial-gradient(circle at 12% 30%, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 2px),
		radial-gradient(circle at 47% 70%, rgba(255, 255, 255, 0.12) 0 1.2px, transparent 1.8px),
		radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.14) 0 1.6px, transparent 2.2px),
		radial-gradient(circle at 92% 64%, rgba(255, 255, 255, 0.1) 0 1.2px, transparent 1.8px);
	background-size: 140px 60px, 90px 50px, 170px 70px, 110px 40px;
	border-bottom: 3px solid var(--wf-brass);
}

.site .site-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	font-family: var(--wf-display);
	font-weight: 400;
	font-size: 1.75rem;
	letter-spacing: 0.01em;
	line-height: 1;
	color: var(--wf-snow);
	text-decoration: none;
}
.site .site-logo::before {
	content: '';
	width: 44px;
	height: 48px;
	flex: none;
	background: url('/images/fiete.svg') center / contain no-repeat;
	transform-origin: 50% 90%;
}
.site .site-logo:hover { color: var(--wf-bulb); }
@media (prefers-reduced-motion: no-preference) {
	.site .site-logo:hover::before { animation: wf-nod 0.6s ease-in-out; }
}
@keyframes wf-nod {
	0%, 100% { transform: rotate(0); }
	30% { transform: rotate(-8deg); }
	65% { transform: rotate(5deg); }
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wf-space-1) var(--wf-space-2);
}
.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--wf-space-4);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.98rem;
	color: var(--wf-frost);
	text-decoration: none;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); color: var(--wf-snow); }
.site-nav a:focus-visible { box-shadow: 0 0 0 3px var(--wf-bulb); }
/* Anmelden / Meine Gruppen = Hauptaktion im Menü: Messing-Pille */
.site-nav a.wichtel-login,
.site-nav a.wichtel-mine,
.site-nav a.wichtel-account {
	background: var(--wf-brass);
	color: var(--wf-pine-deep);
}
.site-nav a.wichtel-login:hover,
.site-nav a.wichtel-mine:hover,
.site-nav a.wichtel-account:hover { background: var(--wf-bulb); color: var(--wf-pine-deep); }

.site-main {
	flex: 1;
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	padding: var(--wf-space-8) var(--wf-space-6) var(--wf-space-12);
}

/* ---------- Typografie im Inhalt ---------- */
.site-main h1,
.site-main h2,
.site-main h3 {
	font-family: var(--wf-display);
	font-weight: 400;
	line-height: 1.1;
	color: var(--wf-pine);
	text-wrap: balance;
}
.site-main h1 {
	font-size: clamp(2.4rem, 6.5vw, 4rem);
	letter-spacing: -0.01em;
	margin: 0 0 var(--wf-space-4);
}
.site-main h2 {
	font-size: clamp(1.6rem, 3.6vw, 2.2rem);
	margin: var(--wf-space-12) 0 var(--wf-space-3);
}
.site-main h3 {
	font-size: 1.35rem;
	margin: var(--wf-space-8) 0 var(--wf-space-2);
}
.site-main p,
.site-main ul,
.site-main ol {
	max-width: var(--wf-measure);
}
.site-main strong { font-weight: 700; }
.site-main em { font-style: italic; color: var(--wf-moss); }

.site-main ul { padding-left: 1.3em; }
.site-main ul li::marker { color: var(--wf-fox); }
.site-main li + li { margin-top: var(--wf-space-2); }

/* Nummerierte Listen sind echte Abläufe („So funktioniert's“):
   große Fuchs-Ziffern in Messing-gerahmten Kreisen. */
.site-main ol {
	list-style: none;
	counter-reset: wf-step;
	padding: 0;
	display: grid;
	gap: var(--wf-space-4);
}
.site-main ol > li {
	counter-increment: wf-step;
	position: relative;
	padding: 2px 0 0 60px;
	min-height: 44px;
}
.site-main ol > li + li { margin-top: 0; }
.site-main ol > li::before {
	content: counter(wf-step);
	position: absolute;
	left: 0;
	top: -2px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font-family: var(--wf-display);
	font-size: 1.4rem;
	color: var(--wf-snow);
	background: var(--wf-fox);
	box-shadow: 0 0 0 3px var(--wf-frost), 0 0 0 5px var(--wf-brass);
}

.site-main blockquote {
	margin: var(--wf-space-6) 0;
	padding: var(--wf-space-4) var(--wf-space-6);
	border-left: 4px solid var(--wf-brass);
	background: var(--wf-snow);
	border-radius: 0 var(--wf-radius-md) var(--wf-radius-md) 0;
}

.site-main hr {
	border: 0;
	height: 1px;
	background: var(--wf-line);
	margin: var(--wf-space-12) 0;
}

/* ---------- Hero der Startseite: Text links, Losautomat zum Ausprobieren rechts ----------
   Markdown (content/index.md):
     <div class="hero"><div class="hero__text"><h1>…</h1><p>…</p></div>
     <div class="automat-demo" data-names="Anna, Ben, …"><img class="automat-demo__static" …></div></div>
   automat-demo.js ersetzt die statische Grafik durch den spielbaren Automaten. */
.site-main .hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	align-items: start;
	grid-template-areas: "text demo" "steps demo";
	grid-template-rows: auto 1fr; /* Mehrhöhe des Automaten nur in die untere Zeile – nichts springt */
	gap: var(--wf-space-6) calc(var(--wf-space-8) * 1.75); /* mehr Luft zur rechten Spalte */
	margin-bottom: var(--wf-space-6);
}
.site-main .hero__text { grid-area: text; padding-top: 0; } /* Überschrift bündig mit Fietes Mütze */
.site-main .hero__steps { grid-area: steps; }
.site-main .hero__steps h2 { margin-top: 0; }
.site-main .hero .automat-demo { grid-area: demo; }
.site-main .hero h1 {
	font-size: clamp(2.6rem, 7vw, 4.4rem);
	margin: 0 0 var(--wf-space-4);
	padding: 0;
	border: 0;
}
.site-main .hero__text p {
	font-size: 1.2rem;
	color: var(--wf-moss);
	max-width: 40ch;
	margin: 0;
}
@media (max-width: 720px) {
	.site-main .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "demo" "steps"; }
	/* Abstand Automat → „So funktioniert's“ so groß wie „So funktioniert's“ → Formular (≈ 70 px). */
	.site-main .hero__steps { margin-top: 46px; }
	.site-main .hero__text { padding-top: 0; }
	.site-main .hero .automat-demo { justify-self: center; }
}

/* ---------- Losautomat (automat-demo.js) – gleiche Optik wie SlotMachineReveal ---------- */
.automat-demo {
	--ad-item: 42px;
	width: 100%;
	max-width: 340px;
	display: grid;
	gap: var(--wf-space-4);
}
.automat-demo__static { display: block; width: 100%; max-width: 300px; margin: 0 auto; }

.ad-stage { position: relative; padding-top: 92px; }
.ad-fiete {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100px;
	height: auto;
	margin-left: -50px;
	z-index: 2;
	transform-origin: 50% 100%;
	user-select: none;
}
.ad-paws {
	position: absolute;
	top: 87px;
	left: 50%;
	width: 84px;
	height: 14px;
	margin-left: -42px;
	z-index: 3;
	pointer-events: none;
}
.ad-paws::before,
.ad-paws::after {
	content: '';
	position: absolute;
	top: 0;
	width: 26px;
	height: 14px;
	border-radius: 50%;
	background: var(--wf-fox-bright);
	border: 2px solid var(--wf-rust);
}
.ad-paws::before { left: 0; }
.ad-paws::after { right: 0; }

.ad-cabinet {
	position: relative;
	padding: 18px 10px 12px;
	border: 3px solid var(--wf-brass);
	border-radius: 26px;
	background: linear-gradient(135deg, var(--wf-pine-light), var(--wf-pine) 60%, #102b26);
	box-shadow: 0 16px 30px rgba(23, 59, 53, 0.28);
}
.ad-row { display: flex; align-items: center; gap: 6px; }
.ad-frame {
	position: relative;
	flex: 1;
	min-width: 0;
	padding: 14px;
	border-radius: 18px;
	background: rgba(212, 164, 59, 0.2);
}
.ad-bulb {
	position: absolute;
	left: 0;
	top: 0;
	width: 7px;
	height: 7px;
	margin: -3.5px 0 0 -3.5px;
	border-radius: 50%;
	background: #6b5420;
}
.ad-bulb::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--wf-bulb);
	box-shadow: 0 0 7px 2px rgba(255, 233, 168, 0.7);
	opacity: 0;
}
.ad-bulb.is-on::after { opacity: 1; }
.automat-demo.is-done .ad-bulb::after { animation: ad-blink 0.24s steps(1) 4; }
@keyframes ad-blink { 50% { opacity: 0; } }

.ad-reel {
	position: relative;
	height: calc(3 * var(--ad-item));
	overflow: hidden;
	border-radius: 10px;
	background: linear-gradient(#b9c7c1, #fff 36%, #fff 64%, #b9c7c1);
}
.ad-payline {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: calc(var(--ad-item) * 0.92);
	transform: translateY(-50%);
	background: rgba(255, 228, 209, 0.65);
	border-block: 1.5px solid rgba(212, 164, 59, 0.55);
}
.ad-item {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	will-change: transform, opacity;
	pointer-events: none;
}
.ad-item > span {
	grid-area: 1 / 1;
	max-width: calc(100% - 28px);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--wf-display);
	font-size: calc(var(--ad-item) * 0.5);
	line-height: 1.2;
	color: var(--wf-pine);
}
.ad-item.is-winner > .ad-name { color: var(--wf-fox); }
.ad-shade {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(rgba(23, 59, 53, 0.55), rgba(23, 59, 53, 0) 30%, rgba(23, 59, 53, 0) 70%, rgba(23, 59, 53, 0.55));
}
.ad-pointer {
	position: absolute;
	top: 50%;
	margin-top: -10px;
	border: 10px solid transparent;
}
.ad-pointer--l { left: 0; border-left: 11px solid var(--wf-brass); border-right-width: 0; }
.ad-pointer--r { right: 0; border-right: 11px solid var(--wf-brass); border-left-width: 0; }

/* Hebel: Stange klappt nach unten, Knauf kommt dabei auf einen zu. */
.ad-lever {
	position: relative;
	flex: none;
	width: 44px;
	height: calc(3 * var(--ad-item) + 28px);
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: none;
	cursor: grab;
	--ad-shaft: calc(1.2 * var(--ad-item));
}
.ad-lever:disabled { cursor: default; }
.ad-lever:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--wf-bulb); }
.ad-lever__shaft {
	position: absolute;
	left: 19px;
	bottom: 50%;
	width: 6px;
	height: var(--ad-shaft);
	border-radius: 3px;
	background: linear-gradient(90deg, #f0cf7a, var(--wf-brass), var(--wf-brass-deep));
	transform-origin: 50% 100%;
}
.ad-lever__base {
	position: absolute;
	left: 4px;
	right: 4px;
	top: 50%;
	height: 18px;
	margin-top: -9px;
	border-radius: 9px;
	background: var(--wf-pine-deep);
	border: 2px solid var(--wf-brass);
}
.ad-lever__knob {
	position: absolute;
	left: 9px;
	top: calc(50% - var(--ad-shaft) - 13px);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 30%, #ff9a5c, var(--wf-fox-bright) 45%, var(--wf-rust));
}
/* Ruhezustand: Hebel wippt ein Stück herunter und federt zurück („zieh mich“). */
.ad-lever.is-nudge .ad-lever__shaft { animation: ad-nudge-shaft 0.9s ease-out; }
.ad-lever.is-nudge .ad-lever__knob { animation: ad-nudge-knob 0.9s ease-out; }
@keyframes ad-nudge-shaft {
	25% { transform: scaleY(0.8); }
	55% { transform: none; }
	70% { transform: scaleY(0.94); }
	85%, 100% { transform: none; }
}
@keyframes ad-nudge-knob {
	25% { transform: translateY(calc(0.2 * var(--ad-shaft))) scale(1.08); }
	55% { transform: none; }
	70% { transform: translateY(calc(0.06 * var(--ad-shaft))); }
	85%, 100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ad-lever.is-nudge .ad-lever__shaft, .ad-lever.is-nudge .ad-lever__knob { animation: none; }
}
.ad-lever.is-pulled .ad-lever__shaft { animation: ad-shaft 0.7s ease-in-out; }
.ad-lever.is-pulled .ad-lever__knob { animation: ad-knob 0.7s ease-in-out; }
@keyframes ad-shaft { 50% { transform: scaleY(-1); } }
@keyframes ad-knob { 50% { transform: translateY(calc(2 * var(--ad-shaft))) scale(1.25); } }

.ad-slot {
	width: 44px;
	height: 7px;
	margin: 10px auto 0;
	border-radius: 4px;
	background: var(--wf-pine-deep);
	border: 1.5px solid rgba(212, 164, 59, 0.7);
}

.automat-demo .ad-result {
	margin: var(--wf-space-1) 0 0;
	min-height: 2.6em;
	display: grid;
	place-items: center;
	text-align: center;
	font-weight: 600;
	color: var(--wf-moss);
	max-width: none;
}
.automat-demo.is-done .ad-result {
	font-family: var(--wf-display);
	font-weight: 400;
	font-size: 1.6rem;
	line-height: 1.15;
	color: var(--wf-fox);
	animation: ad-pop 0.45s cubic-bezier(.3, 1.6, .5, 1);
}
.automat-demo.is-done .ad-fiete { animation: ad-hop 0.6s ease-out; }
@keyframes ad-pop { from { transform: scale(0.85); opacity: 0; } }

/* Während die Sprechblase spricht, ist die (leere) Ergebniszeile nur noch für Screenreader da –
   kein Leerraum zwischen Automat und Hinweis. */
.automat-demo.is-saying .ad-result {
	position: absolute;
	width: 1px;
	height: 1px;
	min-height: 0;
	margin: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.automat-demo { position: relative; }

/* Fiete klein mit Sprechblase unter dem Automaten (wie FieteSpeechBubble in der App). */
.ad-say { display: flex; align-items: flex-end; gap: var(--wf-space-2); margin: 0; }
.ad-say[hidden] { display: none; }
.ad-say__fiete { flex: none; width: 56px; height: auto; }
.ad-say__bubble {
	position: relative;
	flex: 1;
	margin: 0 0 6px;
	padding: 10px 14px;
	border: 1.5px solid var(--wf-line);
	border-radius: 16px;
	background: var(--wf-snow);
	box-shadow: 0 4px 12px rgba(23, 59, 53, 0.08);
	font-size: 0.98rem;
	line-height: 1.4;
	color: var(--wf-pine);
	max-width: none;
}
.ad-say__bubble::before {
	content: '';
	position: absolute;
	left: -8px;
	bottom: 12px;
	border: 8px solid transparent;
	border-right-color: var(--wf-snow);
	border-left-width: 0;
	filter: drop-shadow(-1.5px 0 0 var(--wf-line));
}

/* Easter Egg: schwindeliger Fiete (3. Zug) und rauchender Automat (6. Zug). */
.automat-demo.is-dizzy .ad-fiete { animation: ad-dizzy 1.6s ease-in-out 2; }
@keyframes ad-dizzy {
	20% { transform: rotate(-9deg) translateX(-4px); }
	45% { transform: rotate(8deg) translateX(4px); }
	70% { transform: rotate(-5deg); }
	100% { transform: rotate(3deg); }
}
.automat-demo.is-broken .ad-cabinet { filter: saturate(0.55) brightness(0.85); }
.automat-demo.is-broken .ad-reel { opacity: 0.7; }
.automat-demo.is-broken .ad-lever { cursor: not-allowed; }
/* Hebel hängt schlaff nach unten: Stange um die Fassung gedreht, Knauf baumelt unten. */
.automat-demo.is-broken .ad-lever__shaft { transform: rotate(172deg); transform-origin: 50% 100%; }
.automat-demo.is-broken .ad-lever__knob { transform: translate(7px, calc(2 * var(--ad-shaft) + 4px)); }

.automat-demo.is-broken .ad-fiete { animation: ad-shock 0.5s ease-out; }
@keyframes ad-shock { 30% { transform: translateY(-10px) scale(1.06); } }
.ad-smoke { position: absolute; left: 0; right: 0; top: 70px; height: 120px; pointer-events: none; z-index: 4; }
.ad-smoke__puff {
	position: absolute;
	bottom: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(96, 108, 104, 0.8);
	filter: blur(3px);
	opacity: 0;
	animation: ad-puff 2.4s ease-out infinite;
}
@keyframes ad-puff {
	0% { transform: translateY(0) scale(0.5); opacity: 0.95; }
	100% { transform: translateY(-110px) scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.ad-smoke__puff { animation: none; opacity: 0.45; }
	.ad-smoke__puff:nth-child(3n+2) { transform: translateY(-40px) scale(1.4); }
	.ad-smoke__puff:nth-child(3n) { transform: translateY(-80px) scale(1.8); opacity: 0.25; }
	.automat-demo.is-dizzy .ad-fiete, .automat-demo.is-broken .ad-fiete { animation: none; }
}
@keyframes ad-hop { 40% { transform: translateY(-14px) rotate(-3deg); } }

.ad-confetti {
	position: absolute;
	top: 150px;
	width: 7px;
	height: 11px;
	margin-left: -3.5px;
	z-index: 4;
	pointer-events: none;
}
/* Gaston: Papillotes beim Jubel (automat-demo.js), fliegen einmal auf und sinken ab. */
.ad-papillote {
	position: absolute;
	width: 19px;
	height: 11px;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
}
.ad-papillote svg { display: block; width: 100%; height: 100%; }

/* Knopf „Hebel ziehen“: Automatenknopf in Tannennacht (die Hauptaktion der Seite bleibt orange). */
.site .ad-pull {
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-top: 2px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--wf-radius-md);
	background: var(--wf-pine);
	color: var(--wf-frost);
	font: 700 1.02rem/1.2 var(--wf-font);
	box-shadow: 0 5px 0 var(--wf-pine-deep);
	cursor: pointer;
	transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.site .ad-pull:hover { background: var(--wf-pine-light); }
.site .ad-pull:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 var(--wf-pine-deep); }
.site .ad-pull:disabled { opacity: 0.6; cursor: default; }
.site .ad-pull:focus-visible { box-shadow: 0 5px 0 var(--wf-pine-deep), var(--wf-focus); }

.ad-names { display: grid; gap: 4px; }
.ad-names__label { font-size: 0.9rem; font-weight: 600; color: var(--wf-pine); }
.ad-names__input {
	min-height: 44px;
	padding: 8px 14px;
	border: 1.5px solid var(--wf-line);
	border-radius: var(--wf-radius-md);
	background: var(--wf-snow);
	color: var(--wf-pine);
	font: 500 1rem/1.3 var(--wf-font);
	width: 100%;
	box-sizing: border-box;
	resize: none;
	overflow: hidden;
	overflow-wrap: anywhere;
}
.ad-names__input:focus { outline: none; border-color: var(--wf-fox); box-shadow: 0 0 0 3px rgba(196, 80, 14, 0.18); }
.automat-demo .ad-names__hint { margin: 0; font-size: 0.85rem; color: var(--wf-moss); max-width: none; }
.automat-demo .ad-names__hint.is-error { color: var(--wf-berry); font-weight: 600; }
.automat-demo .ad-names__hint:empty { display: none; }

.ad-cta {
	display: grid;
	gap: 6px;
	justify-items: center;
	text-align: center;
	padding: var(--wf-space-4);
	border-radius: var(--wf-radius);
	background: var(--wf-snow);
	border: 2px solid var(--wf-fox);
	animation: ad-pop 0.4s ease-out;
}
.ad-cta[hidden] { display: none; }
.site a.ad-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox);
	color: var(--wf-snow);
	font-weight: 700;
	text-decoration: none;
	border-top: 2px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 5px 0 var(--wf-rust);
	transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.site a.ad-cta__button:hover { color: var(--wf-snow); background: #d15a15; }
.site a.ad-cta__button:active { transform: translateY(5px); box-shadow: 0 0 0 var(--wf-rust); }
.site a.ad-cta__button:focus-visible { box-shadow: 0 5px 0 var(--wf-rust), var(--wf-focus); }
.automat-demo .ad-cta__text { margin: 0; font-size: 0.95rem; color: var(--wf-moss); max-width: none; }

/* Vertrauenszeile direkt unter der App-Box bzw. dem Haupt-Knopf.
   Markdown: <p class="trust-line"><span>Kostenlos</span><span>ohne Anmeldung</span>…</p> */
.trust-line {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wf-space-2) var(--wf-space-4);
	margin: calc(-1 * var(--wf-space-2)) auto var(--wf-space-8);
	padding: 0;
	max-width: none;
	list-style: none;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--wf-moss);
}
.site-main .trust-line { max-width: none; }
.trust-line > span,
.trust-line > li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}
.trust-line > span::before,
.trust-line > li::before {
	content: '';
	width: 18px;
	height: 18px;
	flex: none;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat,
		var(--wf-pine-light);
}

/* ---------- Ratgeber-Artikel ---------- */
/* Seiten ohne Bühne (Ratgeber usw.): ruhige Überschrift mit Messinglinie. */
:is(.site-main, .site-main > .content) > h1:first-child {
	padding-bottom: var(--wf-space-4);
	border-bottom: 3px solid var(--wf-brass);
	max-width: var(--wf-measure);
}
.site-main h1 + p > em:only-child {
	display: inline-block;
	padding: var(--wf-space-2) var(--wf-space-4);
	background: var(--wf-fox-mist);
	border-radius: var(--wf-radius-sm);
	color: var(--wf-pine);
	font-style: normal;
	font-size: 0.95rem;
}
/* Ratgeber-Übersicht: Linklisten als Karten. Nur per Klasse (<div class="link-cards"> um die
   Markdown-Liste) – keine Strukturregel mehr, die Quellenlisten o. Ä. zu Karten macht.
   Ganze Karte klickbar (::after des ersten Links), weitere Links bleiben darüber bedienbar. */
.site-main .link-cards ul {
	list-style: none;
	padding: 0;
	display: grid;
	gap: var(--wf-space-3);
}
.site-main .link-cards li {
	position: relative;
	margin: 0;
	padding: var(--wf-space-4) var(--wf-space-6);
	background: var(--wf-snow);
	border: 1px solid var(--wf-line);
	border-radius: var(--wf-radius);
	box-shadow: var(--wf-shadow-card);
	color: var(--wf-moss);
	font-size: 0.95rem;
	line-height: 1.5;
}
.site-main .link-cards li:hover { border-color: var(--wf-fox); }
.site-main .link-cards a {
	color: var(--wf-pine);
	font-size: 1.05rem;
	font-weight: 700;
	text-decoration: none;
}
.site-main .link-cards a:hover { color: var(--wf-rust); }
.site-main .link-cards a:first-child::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.site-main .link-cards a + a { position: relative; z-index: 1; }

/* ---------- Fußzeile ---------- */
.site-footer {
	position: relative;
	padding: var(--wf-space-12) var(--wf-space-6) var(--wf-space-8);
	text-align: center;
	color: var(--wf-pine-mist);
	background: var(--wf-pine);
	font-size: 0.95rem;
	border-top: 3px solid var(--wf-brass);
}
.site-footer::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -30px;
	width: 52px;
	height: 57px;
	margin-left: -26px;
	background: url('/images/fiete.svg') center / contain no-repeat;
}
.site-footer a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--wf-space-1);
	color: var(--wf-snow);
}
.site-footer a:hover { color: var(--wf-bulb); }

/* ---------- Flutter-Box ---------- */
.wichtel-app-host {
	position: relative;
	width: 100%;
	overflow: hidden;
	margin: var(--wf-space-6) 0;
}
/* Flutter zeichnet hier hinein. Liegt im normalen Fluss: Die Box wächst mit dem
   Inhalt der App (dynamische Höhe, Technik in embed.css). */
.wichtel-app-canvas {
	position: relative;
	overflow: hidden;
}
/* Platzhalter, bis Flutter geladen ist – optisch wie die spätere WichtelCard,
   mit Fiete, der schon mal vorbeischaut. */
.wichtel-app-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-start; /* oben statt mittig – kein großer Leerraum über der Karte */
	justify-content: center;
	padding-top: 52px; /* Platz für Fiete über der Karte */
	z-index: 1;
	pointer-events: none;
}
.wichtel-app-placeholder__card {
	position: relative;
	width: min(520px, calc(100% - 32px));
	padding: 56px var(--wf-space-6) var(--wf-space-6);
	border-radius: var(--wf-radius);
	background: var(--wf-snow);
	border: 1px solid var(--wf-line);
	box-shadow: var(--wf-shadow-card);
	display: grid;
	gap: var(--wf-space-4);
}
.wichtel-app-placeholder__card::before {
	content: '';
	position: absolute;
	left: 50%;
	top: -34px;
	width: 70px;
	height: 77px;
	margin-left: -35px;
	background: url('/images/fiete.svg') center / contain no-repeat;
}
.site .wichtel-app-placeholder__text {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wf-space-2);
	margin: 0;
	max-width: none;
	font-weight: 600;
	color: var(--wf-moss);
	text-align: center;
}
/* Lade-Fiete: grauer Fiete, darüber der farbige, der sich von unten nach oben aufbaut –
   mit einer hellen Füllkante. Ersetzt den kleinen Fiete über der Karte. */
.wichtel-app-loader {
	position: absolute;
	left: 50%;
	top: -46px;
	width: 84px;
	height: 92px;
	margin-left: -42px;
}
.wichtel-app-loader::before,
.wichtel-app-loader::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url('/images/fiete.svg') center / contain no-repeat;
}
.wichtel-app-loader::before { filter: grayscale(1) brightness(1.15) opacity(0.55); }
.wichtel-app-loader::after { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: no-preference) {
	.wichtel-app-loader::after { animation: wichtel-fill 1.8s cubic-bezier(.45, .05, .35, 1) infinite; }
}
/* Scan-Strich: läuft dezent mit der Füllkante von unten nach oben. */
.wichtel-app-loader__scan {
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 0;
	height: 1.5px;
	border-radius: 1px;
	background: rgba(236, 106, 31, 0.45);
	box-shadow: 0 0 4px rgba(236, 106, 31, 0.25);
	z-index: 1;
	opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
	.wichtel-app-loader__scan { animation: wichtel-scan 1.8s cubic-bezier(.45, .05, .35, 1) infinite; }
}
@keyframes wichtel-scan {
	0% { bottom: 0; opacity: 0.9; }
	75% { bottom: calc(100% - 2px); opacity: 0.9; }
	85%, 100% { bottom: calc(100% - 2px); opacity: 0; }
}
@keyframes wichtel-fill {
	0% { clip-path: inset(100% 0 0 0); }
	75% { clip-path: inset(0 0 0 0); }
	100% { clip-path: inset(0 0 0 0); opacity: 0.85; }
}
.wichtel-app-placeholder__card:has(.wichtel-app-loader)::before { content: none; }
.wichtel-app-placeholder__card > div {
	border-radius: var(--wf-radius-md);
	background: var(--wf-field);
	border: 1px solid var(--wf-line);
}
.wichtel-app-placeholder__title  { height: 30px; width: 62%; margin: 0 auto; border-radius: 8px !important; }
.wichtel-app-placeholder__field  { height: 58px; }
.wichtel-app-placeholder__button {
	height: 52px;
	background: var(--wf-fox-mist) !important;
	border-color: transparent !important;
	box-shadow: 0 5px 0 var(--wf-pine-mist);
}
@media (prefers-reduced-motion: no-preference) {
	.wichtel-app-placeholder__card > div { animation: wichtel-pulse 1.4s ease-in-out infinite; }
	.wichtel-app-placeholder__field { animation-delay: 0.15s !important; }
	.wichtel-app-placeholder__button { animation-delay: 0.3s !important; }
}
@keyframes wichtel-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

/* Ausweg, falls die App nicht lädt (Technik in embed.css): Karte mit Fiete
   und dem Automatenknopf wie in der App (PrimaryButton). */
.site .wichtel-app-fallback {
	background: var(--wf-frost);
	color: var(--wf-pine);
	font-weight: 500;
}
.site .wichtel-app-fallback::before {
	content: '';
	width: 84px;
	height: 92px;
	background: url('/images/fiete.svg') center / contain no-repeat;
}
.site .wichtel-app-fallback p { margin: 0; max-width: 36ch; }
.site a.wichtel-app-fallback__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 26px;
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox);
	color: var(--wf-snow);
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none;
	border-top: 2px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 5px 0 var(--wf-rust);
	transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.site a.wichtel-app-fallback__button:hover {
	background: #d15a15;
	color: var(--wf-snow);
}
.site a.wichtel-app-fallback__button:active {
	transform: translateY(5px);
	box-shadow: 0 0 0 var(--wf-rust);
}
.site a.wichtel-app-fallback__button:focus-visible {
	box-shadow: 0 5px 0 var(--wf-rust), var(--wf-focus);
}

/* Menü-Sichtbarkeit je nach Login-Status steht in embed.css (Agent „Einbettung“). */

/* ---------- Seite „Keine Einladungen mehr“ (keine-einladungen.js) ---------- */
.optout { margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: var(--wf-cream, #FFF6EA);
	border-left: 4px solid var(--wf-brass, #D4A43B); border-radius: 8px; }
.optout > p { margin: 0; display: none; }
.optout[data-state="idle"] .optout__missing,
.optout[data-state="missing"] .optout__missing,
.optout[data-state="ready"] .optout__ready,
.optout[data-state="busy"] .optout__busy,
.optout[data-state="done"] .optout__done,
.optout[data-state="error"] .optout__error { display: block; }
.optout__button { font: inherit; font-weight: 700; color: #fff; background: var(--wf-fox, #C4500E);
	border: 0; border-radius: 8px; padding: 0.8rem 1.4rem; cursor: pointer; }
.optout__button:hover, .optout__button:focus-visible { background: var(--wf-rust, #8E3A0A); }
.optout__button:focus-visible { outline: 3px solid var(--wf-brass, #D4A43B); outline-offset: 2px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 560px) {
	html body { font-size: 1rem; }
	.site-header { justify-content: center; }
	.site-nav { justify-content: center; }
	.site-main { padding: var(--wf-space-6) var(--wf-space-4) var(--wf-space-12); }
}

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

/* ---------- Fiete begleitet Textseiten (fiete-begleiter.js) ---------- */
/* 1. Lesefortschritt mit mitlaufendem Fiete */
.fiete-progress {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	height: 4px;
	z-index: 50;
	pointer-events: none;
	--p: 0;
}
.fiete-progress__track {
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, var(--wf-brass), var(--wf-fox-bright));
	transform-origin: 0 50%;
	transform: scaleX(var(--p));
}
.fiete-progress__fiete {
	position: absolute;
	top: 2px;
	left: calc(var(--p) * (100% - 26px));
	width: 26px;
	height: 29px;
	opacity: calc(min(1, var(--p) * 20));
	filter: drop-shadow(0 1px 1px rgba(11, 36, 32, 0.35));
}
.fiete-progress__fiete.is-hop { animation: fiete-hop 0.7s ease-out 2; }

/* 2. Begleiter unten rechts */
.fiete-buddy {
	position: fixed;
	right: max(12px, env(safe-area-inset-right));
	bottom: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	pointer-events: none;
	transform: translateY(110%);
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
.fiete-buddy.is-peeking { transform: translateY(0); }
.fiete-buddy.is-gone { transform: translateY(110%); opacity: 0; }
.fiete-buddy__fiete {
	pointer-events: auto;
	width: 84px;
	height: 92px;
	margin: 0 0 -26px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transform-origin: 50% 100%;
}
.fiete-buddy__fiete img { width: 100%; height: 100%; display: block; }
.fiete-buddy__fiete:focus-visible { outline: 3px solid var(--wf-brass); outline-offset: 2px; border-radius: 50%; }
.fiete-buddy__fiete.is-wiggle { animation: fiete-wiggle 0.6s ease-in-out; }
.fiete-buddy__fiete.is-spin { animation: fiete-spin 0.9s ease-in-out; }
@media (prefers-reduced-motion: no-preference) {
	.fiete-buddy.is-peeking .fiete-buddy__fiete { animation: fiete-breathe 3.2s ease-in-out infinite; }
}
.fiete-buddy__bubble {
	position: relative;
	pointer-events: auto;
	max-width: min(280px, calc(100vw - 32px));
	padding: 12px 34px 12px 14px;
	border-radius: 16px 16px 4px 16px;
	background: var(--wf-snow);
	color: var(--wf-pine);
	border: 2px solid var(--wf-brass);
	box-shadow: 0 8px 24px rgba(11, 36, 32, 0.18);
	font-size: 0.95rem;
	line-height: 1.4;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px) scale(0.92);
	transform-origin: 90% 100%;
	transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s;
}
.fiete-buddy.is-talking .fiete-buddy__bubble {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.25s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fiete-buddy__text { margin: 0; }
.fiete-buddy__cta {
	display: none;
	margin-top: 8px;
	padding: 8px 14px;
	border-radius: 10px;
	background: var(--wf-fox);
	color: var(--wf-snow) !important;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 3px 0 var(--wf-rust);
}
.fiete-buddy.has-cta .fiete-buddy__cta { display: inline-block; }
.fiete-buddy__close {
	position: absolute;
	top: 2px;
	right: 4px;
	width: 28px;
	height: 28px;
	border: 0;
	background: none;
	color: var(--wf-moss);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.fiete-buddy__close:hover, .fiete-buddy__close:focus-visible { color: var(--wf-berry); }

/* 3. Fiete-Tipp im Text */
.site .fiete-tipp {
	position: relative;
	margin: var(--wf-space-6) 0;
	padding: 16px 18px 16px 92px;
	min-height: 84px;
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox-mist);
	border-left: 4px solid var(--wf-fox);
	color: var(--wf-pine);
}
.site .fiete-tipp p { margin: 0; }
/* Vertikal mittig, egal wie lang der Tipp ist. margin: auto 0 überschreibt zugleich den
   Bild-Außenabstand der Inhalts-Typografie (.content img, 2em), der Fiete sonst verschob. */
.site-main .fiete-tipp__fiete,
.site-main .fiete-meint__fiete { top: 0; bottom: 0; margin: auto 0; }
/* Aha-Fiete: fiete-idee.svg ist 262×272 Einheiten (Fuchs 200×220 ab y = 0, Glühbirne darüber).
   Maßstab wie Tipp-Fiete (64 px / 200 = 0,32) → Bild 84×87 px; top: -16px rückt den Fuchs
   selbst (nicht das ganze Bild mit Glühbirne) in die Mitte. */
.site-main .fiete-meint__fiete { top: -16px; }
.fiete-tipp__fiete {
	position: absolute;
	left: 14px;
	width: 64px;
	height: 70px;
	transform-origin: 50% 100%;
}
@media (prefers-reduced-motion: no-preference) {
	.fiete-tipp .fiete-tipp__fiete { opacity: 0; transform: translateX(-24px) rotate(-12deg); transition: opacity 0.4s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
	.fiete-tipp.is-visible .fiete-tipp__fiete { opacity: 1; transform: none; animation: wf-nod 0.6s ease-in-out 0.5s; }
}

/* 3b. „Fiete meint“ – Zitat-Kasten mit Aha-Fiete (Glühbirne, erhobene Pfote) */
.site-main blockquote.fiete-meint {
	position: relative;
	padding-left: 104px;
	min-height: 96px;
	background: var(--wf-cream);
}
.fiete-meint__fiete {
	position: absolute;
	left: 14px;
	width: 84px;
	height: 87px;
	transform-origin: 40% 100%;
}
@media (prefers-reduced-motion: no-preference) {
	.fiete-meint .fiete-meint__fiete { opacity: 0; transform: translateY(18px) scale(0.6); transition: opacity 0.35s, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
	.fiete-meint.is-visible .fiete-meint__fiete { opacity: 1; transform: none; animation: fiete-aha 0.7s ease-in-out 0.55s; }
}
@keyframes fiete-aha {
	0%, 100% { transform: translateY(0); }
	30% { transform: translateY(-10px) rotate(-5deg); }
	55% { transform: translateY(0) scaleY(0.94); }
	75% { transform: translateY(-3px) rotate(3deg); }
}
@media (max-width: 560px) {
	/* Maßstab wie Tipp-Fiete mobil (52 px / 200 = 0,26) */
	.site-main blockquote.fiete-meint { padding-left: 88px; min-height: 84px; }
	.site-main .fiete-meint__fiete { width: 68px; height: 71px; left: 12px; top: -13px; }
}

/* 4. Abschlusskarte */
.fiete-cta {
	display: flex;
	align-items: center;
	gap: var(--wf-space-6);
	margin: var(--wf-space-12) 0 0;
	padding: var(--wf-space-6);
	border-radius: var(--wf-radius);
	background: var(--wf-pine);
	color: var(--wf-frost);
	box-shadow: var(--wf-shadow-card);
}
.fiete-cta__fiete { width: 120px; height: 132px; flex: none; transform-origin: 50% 100%; }
.fiete-cta.is-visible .fiete-cta__fiete { animation: fiete-hop 0.7s ease-out 0.2s 2; }
.fiete-cta__title { margin: 0 0 6px; font-family: var(--wf-display); font-size: 1.6rem; color: var(--wf-bulb); }
.fiete-cta__lead { margin: 0 0 var(--wf-space-4); }
.site a.fiete-cta__button {
	display: inline-flex;
	align-items: center;
	min-height: 52px;
	padding: 14px 26px;
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox);
	color: var(--wf-snow);
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 5px 0 var(--wf-rust);
	transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.site a.fiete-cta__button:hover { background: #d15a15; color: var(--wf-snow); }
.site a.fiete-cta__button:active { transform: translateY(5px); box-shadow: 0 0 0 var(--wf-rust); }
@media (max-width: 560px) {
	.fiete-cta { flex-direction: column; text-align: center; }
	.fiete-buddy__fiete { width: 64px; height: 70px; margin-bottom: -20px; }
	.site .fiete-tipp { padding-left: 76px; }
	.fiete-tipp__fiete { width: 52px; height: 57px; left: 12px; }
}
@media print {
	.fiete-progress, .fiete-buddy, .fiete-cta, .site-nav, .site-footer, .wichtel-app-host,
	.shop-link, .gf-filters, .gf-card__shops, .gf-note, .automat-demo { display: none !important; }
	html body { background: #fff; color: #000; font-size: 11pt; }
	.site-header { background: none !important; box-shadow: none !important; padding: 0 0 8pt; }
	.site-main { padding: 0; max-width: none; }
	/* Schritt-Ziffern: ohne Hintergrunddruck wäre Weiß auf Orange unsichtbar */
	.site-main ol > li::before { color: #000; background: none; box-shadow: none; border: 1.5pt solid #000; }
	.site-main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; font-weight: 400; word-break: break-all; }
	.site-main .link-cards a::after, .site-main .gf-shop::after { content: none; }
	.fiete-tipp, .fiete-meint, blockquote { break-inside: avoid; }
	h2, h3 { break-after: avoid; }
}

@keyframes fiete-hop {
	0%, 100% { transform: translateY(0); }
	35% { transform: translateY(-16px) rotate(-4deg); }
	60% { transform: translateY(0) scaleY(0.92); }
}
@keyframes fiete-wiggle {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-10deg); }
	50% { transform: rotate(8deg); }
	75% { transform: rotate(-4deg); }
}
@keyframes fiete-spin {
	0% { transform: rotate(0); }
	60% { transform: rotate(360deg) scale(1.1); }
	100% { transform: rotate(360deg); }
}
@keyframes fiete-breathe {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-3px); }
}
.fiete-buddy.is-shy { transform: translateY(110%); }

/* „Aktualisiert am …“ unter der H1 der Ratgeberartikel (deploy/seo-enrich.py) */
.site .page-updated { margin: -0.5rem 0 var(--wf-space-6); color: var(--wf-moss); font-size: 0.9rem; }
/* Offizielle Store-Badges (Startseite „Fiete als App“ und Footer). Grafiken unverändert lassen;
   App Store zuerst, nur ein App-Store-Badge je Seite, Freiraum ≥ 1/4 der Höhe (Apple-Richtlinie).
   Mindesthöhe 40 px. */
.store-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wf-space-3);
	margin: var(--wf-space-2) 0 var(--wf-space-6);
}
.store-links--footer { justify-content: center; margin: var(--wf-space-3) 0 var(--wf-space-3); }
/* Seiten mit eigenen Badges im Inhalt (Startseite): Footer-Badges ausblenden – ein Badge je Seite. */
.site:has(.site-main .store-links) .store-links--footer { display: none; }
.site-footer-trademarks { margin-top: var(--wf-space-2); font-size: 0.75rem; opacity: 0.8; }
.site .store-badge {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	border-radius: 8px;
}
.site .store-badge img { display: block; height: 40px; width: auto; margin: 0; }
.site-footer .store-badge:focus-visible { outline: 3px solid var(--wf-bulb); outline-offset: 3px; }

.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--wf-space-2); margin-bottom: var(--wf-space-2); }

/* Partnerlink-Symbol hinter Geschenkideen (Ratgeber): nur das Symbol ist verlinkt, nicht der Text.
   Quadrat mit Pfeil nach oben rechts, Farbe folgt dem Text (currentColor über mask). */
.shop-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-left: 0.15em;
	vertical-align: -0.35em;
	border-radius: 6px;
	text-decoration: none;
}
.site .shop-link,
.site .shop-link:hover { color: var(--wf-fox); }
.shop-link::before {
	content: "";
	width: 0.95em;
	height: 0.95em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%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' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0.8;
	transition: opacity 0.15s;
}
.shop-link:hover::before,
.shop-link:focus-visible::before { opacity: 1; }

/* Tabellen (Datenschutz, Fun Facts): auf schmalen Bildschirmen seitlich scrollbar statt die Seite zu verbreitern */
.site-main table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	-webkit-overflow-scrolling: touch;
}

/* ---------- Geschenkefinder (/geschenkefinder/, geschenkefinder.js) ---------- */
.geschenkefinder { margin: var(--wf-space-6) 0 var(--wf-space-8); }
/* Filtergruppen als eigene, klar getrennte Kästen; Überschrift jeweils in eigener Zeile. */
.gf-filters { display: grid; gap: var(--wf-space-3); margin-bottom: var(--wf-space-4); }
.gf-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wf-space-2);
	padding: var(--wf-space-3) var(--wf-space-4) var(--wf-space-4);
	background: var(--wf-snow);
	border: 1.5px solid var(--wf-line);
	border-left: 4px solid var(--wf-fox);
	border-radius: var(--wf-radius-md);
	box-shadow: var(--wf-shadow-card);
}
.gf-filter__label {
	flex-basis: 100%;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 2px;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wf-moss);
}
.gf-filter__symbol { font-size: 1.05rem; letter-spacing: 0; }
.gf-chip {
	font: inherit;
	font-size: 0.9rem;
	padding: 6px 14px;
	min-height: 36px;
	border: 1px solid var(--wf-line);
	border-radius: 999px;
	background: var(--wf-snow);
	color: var(--wf-pine);
	cursor: pointer;
}
.gf-chip:hover { border-color: var(--wf-fox); }
.gf-chip[aria-pressed="true"] { background: var(--wf-pine); border-color: var(--wf-pine); color: var(--wf-snow); }
.gf-chip:focus-visible, .gf-shop:focus-visible { outline: 3px solid var(--wf-brass); outline-offset: 2px; }
.gf-count { margin: 0 0 var(--wf-space-3); font-size: 0.9rem; color: var(--wf-moss); }
.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--wf-space-4); }
.gf-card {
	display: flex;
	flex-direction: column;
	background: var(--wf-snow);
	border: 1px solid var(--wf-line);
	border-radius: var(--wf-radius-md);
	box-shadow: var(--wf-shadow-card);
	overflow: hidden;
}
.gf-card__icon {
	display: grid;
	place-items: center;
	height: 128px;
	font-size: 3rem;
	background: linear-gradient(135deg, var(--wf-fox-mist), var(--wf-cream));
}
/* eBay-Produktbild (vom Wochenlauf lokal abgelegt, s-l300): gleicher Verlauf und gleiche Höhe wie
   beim Symbol; das Bild sitzt als weiße, abgerundete Kachel in der Mitte, eingepasst statt beschnitten.
   .geschenkefinder davor schlägt den Bild-Außenabstand der Inhalts-Typografie (.content img, 2em),
   der das Bild sonst aus der Fläche über die Überschrift schob. */
.gf-card__icon--bild { overflow: hidden; }
.geschenkefinder .gf-card__bild {
	display: block;
	box-sizing: border-box;
	width: 104px;
	height: 104px;
	max-width: none;
	margin: 0;
	padding: 6px;
	object-fit: contain;
	background: #fff;
	border-radius: var(--wf-radius-sm);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.gf-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--wf-space-3) var(--wf-space-4) var(--wf-space-4); }
.gf-card__brand { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--wf-rust); }
.site-main .gf-card__title { margin: 2px 0 4px; font-family: var(--wf-font); font-size: 1rem; line-height: 1.3; }
.gf-card__budget { margin: 0 0 var(--wf-space-3); font-size: 0.85rem; color: var(--wf-moss); }
.gf-card__shops { display: flex; flex-wrap: wrap; gap: var(--wf-space-2); margin-top: auto; }
.gf-shop {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--wf-radius-sm);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--wf-snow);
	background: var(--wf-fox);
}
.gf-shop--ebay { background: var(--wf-pine-light); }
.gf-shop::after {
	content: "";
	width: 0.85em;
	height: 0.85em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%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' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* schlägt .site a und die Typografie von jaspr_content (.content a): weiße Schrift, keine Unterstreichung */
.site-main a.gf-shop,
.site-main a.gf-shop:visited,
.site-main a.gf-shop:hover { color: var(--wf-snow); text-decoration: none; }
.site-main a.gf-shop:hover { filter: brightness(1.1); }
.gf-empty { padding: var(--wf-space-6); text-align: center; color: var(--wf-moss); }
.gf-note { margin-top: var(--wf-space-4); font-size: max(11px, 0.75rem); line-height: 1.4; color: var(--wf-moss); }

/* Nur für Screenreader sichtbar (z. B. Sprechblasen-Text im Demo-Automaten). */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Hinweis „Du bist zu einer Wichtelgruppe eingeladen“ (einladung-merken.js). */
.einladung-hinweis {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wf-space-2) var(--wf-space-4);
	margin: 0 0 var(--wf-space-6);
	padding: var(--wf-space-3) var(--wf-space-4);
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox-mist);
	border: 1.5px solid var(--wf-fox);
	color: var(--wf-pine);
}
.site .einladung-hinweis__text { flex: 1 1 14em; margin: 0; max-width: none; font-weight: 600; }
.site .einladung-hinweis__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--wf-space-4);
	border-radius: var(--wf-radius-md);
	background: var(--wf-fox);
	color: var(--wf-snow);
	font-weight: 700;
	text-decoration: none;
}
.site .einladung-hinweis__link:hover,
.site .einladung-hinweis__link:focus-visible { background: var(--wf-rust); color: var(--wf-snow); }
.einladung-hinweis__close {
	min-width: 44px;
	min-height: 44px;
	border: 0;
	background: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wf-pine);
	cursor: pointer;
}

/* ---------- Secret Gaston (fr): Maskottchen-Grafiken tauschen ----------
   Nur auf der französischen Website (<html lang="fr">, site.yaml brand: gaston). Die Fiete-Seite
   (lang="de") bleibt unberührt. Grafiken: website/web/images/gaston*.svg (Schema fiete-X → gaston-X). */
html[lang="fr"] .site .site-logo::before,
html[lang="fr"] .site-footer::before,
html[lang="fr"] .wichtel-app-placeholder__card::before,
html[lang="fr"] .wichtel-app-loader::before,
html[lang="fr"] .wichtel-app-loader::after,
html[lang="fr"] .site .wichtel-app-fallback::before {
	background-image: url('/images/gaston.svg');
}

/* Papillote (Bonbon in buntem Papier, images/papillote.svg) als Icon vor dem Kastentitel in Gastons
   Kästen – nur lang="fr": Tipp-Kästen („Le conseil de Gaston :“), Zitate („Gaston dit :“) und die
   Sprechblase des Begleiters (fiete-begleiter.js). Die deutsche Seite bleibt unverändert. */
html[lang="fr"] .site .fiete-tipp > p:first-of-type > strong:first-child::before,
html[lang="fr"] .site-main blockquote.fiete-meint > p:first-of-type > strong:first-child::before,
html[lang="fr"] .fiete-buddy__text::before {
	content: "";
	display: inline-block;
	width: 1.6em;
	height: 1em;
	margin-right: 0.35em;
	vertical-align: -0.15em;
	background: url('/images/papillote.svg') center / contain no-repeat;
}
