/*
 * Anmelden, Zwei-Faktor-Code und „Kennwort vergessen“ (Konzept_Anmeldung.md):
 * login.php, login_2fa.php, passreset.php, passresetAction.php, passresetsuccess.php.
 * Rahmen in func/anmelde_seite.php, Verhalten in assets/js/anmelden.js.
 * Farben wie die Registrierung (registrierung.css) und die App (Farbe.swift /
 * Farbe.kt). Handy zuerst; ab 960 px Breite geteilt (Marke links, Formular rechts).
 */

.an {
	--p: #2A6F8F;
	--p-oben: #317DA1;
	--p-d: #1F5570;
	--p-h: #EAF3F7;
	--p-ring: rgba(42, 111, 143, .22);
	--gold: #E0A32E;
	--gold2: #F0B54A;
	--t: #23272D;
	--g: #525966;
	--r: #E2E5EA;
	--r-feld: #C9D1DA;
	--r-feld-hover: #AAB5C1;
	--hg: #F4F6F8;
	--fl: #FFFFFF;
	--feld: #FFFFFF;
	--gefahr: #D6534A;
	--gefahr-t: #B03A32;
	--fehler-fl: #FDF2F1;
	--m-fehler: #FBE9E7;
	--m-warn: #FDF1D6;
	--warn-t: #6E4A00;
	--m-info: #EAF3F7;
	--info-t: #1F5570;
	--m-ok: #E2F3E8;
	--ok-t: #1E7443;
	--auf-p: #FFFFFF;
	--schatten: rgba(20, 60, 80, .10);
	--marke:
		radial-gradient(120% 80% at 12% 8%, #2C7496 0%, transparent 60%),
		radial-gradient(100% 70% at 88% 32%, #2E789A 0%, transparent 55%),
		radial-gradient(120% 90% at 18% 100%, #17475E 0%, transparent 62%),
		radial-gradient(90% 70% at 92% 100%, #1F5570 0%, transparent 60%),
		#2A6F8F;
	color-scheme: light;
	margin: 0;
	min-height: 100vh;
	background: var(--hg);
	color: var(--t);
	font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
	.an {
		--p: #5DADD1;
		--p-oben: #6BB8DA;
		--p-d: #8CC8E3;
		--p-h: #173847;
		--p-ring: rgba(93, 173, 209, .3);
		--gold: #F0B54A;
		--gold2: #F6C766;
		--t: #E7EDF1;
		--g: #9AA9B4;
		--r: #24333D;
		--r-feld: #33454F;
		--r-feld-hover: #4A5F6B;
		--hg: #0E171D;
		--fl: #15212A;
		--feld: #0F1A21;
		--gefahr: #FF6F66;
		--gefahr-t: #FF8A82;
		--fehler-fl: rgba(255, 111, 102, .1);
		--m-fehler: rgba(255, 111, 102, .14);
		--m-warn: rgba(246, 199, 102, .14);
		--warn-t: #F6C766;
		--m-info: #173847;
		--info-t: #8CC8E3;
		--m-ok: rgba(95, 208, 143, .14);
		--ok-t: #5FD08F;
		--auf-p: #0B1A22;
		--schatten: rgba(0, 0, 0, .4);
		--marke:
			radial-gradient(120% 80% at 12% 8%, #1A4457 0%, transparent 60%),
			radial-gradient(100% 70% at 88% 32%, #1D4B60 0%, transparent 55%),
			radial-gradient(120% 90% at 18% 100%, #0A1C25 0%, transparent 62%),
			radial-gradient(90% 70% at 92% 100%, #0E2733 0%, transparent 60%),
			#143545;
		color-scheme: dark;
	}
}

.an *, .an *::before, .an *::after { box-sizing: border-box; }
.an [hidden] { display: none !important; }
.an-zusammen { white-space: nowrap; }
.an-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-seite { position: relative; display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Markenkopf (Handy) / Markenseite (Desktop) ---------- */
.an-marke {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: calc(env(safe-area-inset-top, 0px) + 40px) 20px 96px;
	text-align: center;
	color: #FFFFFF;
	background: var(--marke);
}
.an-logo { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: 12px; }
.an-logo:focus-visible { outline: 3px solid var(--gold2); outline-offset: 6px; }
.an-logo svg { display: block; width: 60px; height: 60px; overflow: visible; }
.an-logo span { font: 800 21px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .14em; }
.an-marke__text { display: none; }
.an-claim { margin: 0; font: 800 48px/1.06 'Plus Jakarta Sans', sans-serif; letter-spacing: -.02em; text-wrap: balance; }
.an-claim-unter { margin: 18px 0 0; max-width: 32ch; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .88); }

/* Großer Bogen: im Kopf nur als helle Linien, auf dem Desktop in Farbe. */
.an-bogen { position: absolute; z-index: -1; right: -64px; bottom: -120px; width: 320px; height: 320px; overflow: visible; pointer-events: none; }
.an-bogen path { stroke: rgba(255, 255, 255, .08); }
.an-glanz { display: none; }

/* Der Regenbogen zeichnet sich einmal beim Laden (--l = Bogenlänge im
   100er-Raster, --o = Startversatz einschließlich der runden Enden). Ruhezustand
   ist sichtbar – läuft keine Animation, fehlt nichts. */
.an-logo path, .an-bogen path { stroke-dasharray: var(--l) 400; animation: an-zeichnen 1s cubic-bezier(.3, .8, .3, 1) backwards; }
.an-logo path:nth-child(1), .an-bogen path:nth-child(1) { --l: 135; --o: 145; }
.an-logo path:nth-child(2), .an-bogen path:nth-child(2) { --l: 107; --o: 117; animation-delay: .1s; }
.an-logo path:nth-child(3), .an-bogen path:nth-child(3) { --l: 79; --o: 89; animation-delay: .2s; }
.an-logo path:nth-child(4), .an-bogen path:nth-child(4) { --l: 50; --o: 60; animation-delay: .3s; }
@keyframes an-zeichnen { from { stroke-dashoffset: var(--o); } to { stroke-dashoffset: 0; } }

/* ---------- Inhalt ---------- */
.an-haupt {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.an-karte {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin-top: -64px;
	padding: 28px 22px 24px;
	border-radius: 24px;
	background: var(--fl);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 44px var(--schatten);
}
.an-titel { margin: 0; font: 800 25px/1.2 'Plus Jakarta Sans', sans-serif; letter-spacing: -.015em; text-wrap: balance; }
.an-titel:focus { outline: none; }
.an-lead { margin: 6px 0 22px; font-size: 15.5px; line-height: 1.5; color: var(--g); text-wrap: pretty; }
.an-lead b { color: var(--t); font-weight: 600; overflow-wrap: anywhere; }
.an-text { margin: 0 0 14px; font-size: 15.5px; line-height: 1.5; color: var(--t); }
.an-symbol { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 17px; background: var(--p-h); color: var(--p); }
.an-symbol svg { width: 28px; height: 28px; }
.an-symbol--ok { background: var(--m-ok); color: var(--ok-t); }
.an-symbol--warn { background: var(--m-warn); color: var(--warn-t); }

/* Felder */
.an-feld { margin-bottom: 18px; }
.an-feld__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.an-label { display: block; margin-bottom: 8px; font: 700 15px/1.3 'Plus Jakarta Sans', sans-serif; color: var(--t); }
.an-feld__kopf .an-label { margin-bottom: 0; }
.an-vergessen { display: inline-block; margin: -10px -8px; padding: 10px 8px; border-radius: 8px; font: 700 14.5px/1.3 'Plus Jakarta Sans', sans-serif; color: var(--p); text-decoration: none; }
.an-vergessen:hover { text-decoration: underline; text-underline-offset: 3px; }
.an-vergessen:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; }
.an-eingabe { position: relative; }
.an-input {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--r-feld);
	border-radius: 14px;
	background: var(--feld);
	color: var(--t);
	font: 17px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.an-input:hover { border-color: var(--r-feld-hover); }
.an-input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px var(--p-ring); }
.an-input[aria-invalid="true"] { border-color: var(--gefahr); background-color: var(--fehler-fl); }
.an-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(214, 83, 74, .2); }
.an-input:-webkit-autofill,
.an-input:-webkit-autofill:hover,
.an-input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--feld) inset; -webkit-text-fill-color: var(--t); caret-color: var(--t); }
.an-input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--feld) inset, 0 0 0 4px var(--p-ring); }
.an-input::-ms-reveal { display: none; }
.an-input:disabled { opacity: .6; }
.an-mit-zeigen .an-input { padding-right: 100px; }
.an-zeigen {
	position: absolute;
	top: 5px;
	right: 5px;
	bottom: 5px;
	min-width: 84px;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: var(--p-h);
	color: var(--p-d);
	font: 700 14px/1 'Plus Jakarta Sans', sans-serif;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.an-zeigen:hover { filter: brightness(.97); }
.an-zeigen:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.an-hinweis { display: flex; align-items: center; gap: 8px; margin: 9px 0 0; font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--warn-t); }
.an-hinweis svg { flex: none; width: 18px; height: 18px; }
.an-hilfe { margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--g); }

/* Regeln für das neue Kennwort (passresetAction.php) */
.an-regeln { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.an-regel { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.35; color: var(--g); }
.an-regel::before { content: ''; flex: none; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; }
.an-regel.ok { color: var(--ok-t); font-weight: 600; }
.an-regel.ok::before { border: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.4 5.2a.9.9 0 0 0-1.3.1L7 9 5.8 7.8a.9.9 0 1 0-1.3 1.3l1.9 1.9a.9.9 0 0 0 1.3-.1l3.8-4.4a.9.9 0 0 0-.1-1.3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.4 5.2a.9.9 0 0 0-1.3.1L7 9 5.8 7.8a.9.9 0 1 0-1.3 1.3l1.9 1.9a.9.9 0 0 0 1.3-.1l3.8-4.4a.9.9 0 0 0-.1-1.3z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Angemeldet bleiben */
.an-bleiben { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 22px; padding: 4px 0; cursor: pointer; }
.an-bleiben input {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	border: 1.5px solid var(--r-feld);
	border-radius: 7px;
	background: var(--feld);
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.an-bleiben input:checked {
	border-color: var(--p);
	background: var(--p) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.an-bleiben input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.an-bleiben__text { display: grid; gap: 1px; padding-top: 1px; }
.an-bleiben__text b { font: 600 15.5px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; }
.an-bleiben__text small { font-size: 13.5px; line-height: 1.4; color: var(--g); }
@media (prefers-color-scheme: dark) {
	.an-bleiben input:checked { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='%230B1A22' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* Knöpfe */
.an-knopf {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(180deg, var(--p-oben), var(--p));
	color: var(--auf-p);
	font: 700 17px/1.1 'Plus Jakarta Sans', sans-serif;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 20px rgba(42, 111, 143, .26);
	transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.an-knopf:hover { filter: brightness(1.05); }
.an-knopf:active { transform: scale(.985); }
.an-knopf:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.an-knopf:disabled { cursor: default; filter: saturate(.7); }
.an-knopf.laedt { cursor: progress; }
.an-knopf--zweit { background: var(--p-h); color: var(--p-d); box-shadow: none; }
.an-knopf + .an-knopf { margin-top: 12px; }
.an-kreisel { flex: none; width: 19px; height: 19px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: an-drehen .8s linear infinite; }
@keyframes an-drehen { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) {
	.an-knopf { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 22px rgba(0, 0, 0, .35); }
	.an-knopf--zweit { box-shadow: none; }
}

/* Meldungen */
.an-meldung { display: flex; gap: 12px; margin: 0 0 20px; padding: 14px 16px 14px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; color: var(--t); }
.an-meldung > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.an-meldung strong { display: block; margin-bottom: 2px; font: 700 15.5px/1.35 'Plus Jakarta Sans', sans-serif; }
.an-meldung p { margin: 0; }
.an-meldung a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.an-meldung--fehler { background: var(--m-fehler); }
.an-meldung--fehler > svg, .an-meldung--fehler strong { color: var(--gefahr-t); }
.an-meldung--warn { background: var(--m-warn); }
.an-meldung--warn > svg, .an-meldung--warn strong { color: var(--warn-t); }
.an-meldung--info { background: var(--m-info); }
.an-meldung--info > svg, .an-meldung--info strong { color: var(--info-t); }
.an-meldung--ok { background: var(--m-ok); }
.an-meldung--ok > svg, .an-meldung--ok strong { color: var(--ok-t); }
.an-meldung--wackeln { animation: an-wackeln .42s cubic-bezier(.36, .07, .19, .97) 1; }
@keyframes an-wackeln { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Neu hier? */
.an-neu {
	width: 100%;
	max-width: 440px;
	margin-top: 16px;
	padding: 18px 20px 20px;
	border: 1px solid var(--r);
	border-radius: 20px;
	background: var(--fl);
}
.an-neu h2 { margin: 0; font: 800 16.5px/1.3 'Plus Jakarta Sans', sans-serif; }
.an-neu p { margin: 4px 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--g); }
.an-neu .an-knopf { min-height: 48px; font-size: 16px; }

/* App-Hinweis (nur Handy im Browser, siehe anmelden.js) */
.an-app {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	max-width: 440px;
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 18px;
	color: var(--t);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}
.an-app:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.an-app__symbol { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 11px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(20, 60, 80, .12); }
.an-app__symbol svg { width: 30px; height: 30px; transform: translate(-1px, -1px); }
.an-app__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.an-app__text b { font: 700 15px/1.3 'Plus Jakarta Sans', sans-serif; }
.an-app__text small { font-size: 13.5px; line-height: 1.35; color: var(--g); }
.an-app__laden { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--p-h); color: var(--p-d); font: 700 14px/1 'Plus Jakarta Sans', sans-serif; }

/* Fuß */
.an-fuss { margin-top: 20px; text-align: center; font-size: 13px; line-height: 1.7; color: var(--g); }
.an-fuss p { margin: 0; }
.an-fuss a { color: var(--g); text-decoration: underline; text-underline-offset: 2px; }
.an-fuss a:hover { color: var(--t); }

/* ---------- Zwei-Faktor-Code ---------- */
.an-code { position: relative; margin: 0 0 20px; }
.an-input--code { text-align: center; letter-spacing: .35em; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Mit JavaScript: Kästchen, das echte Feld liegt unsichtbar darüber. */
.an-code.mit-kaestchen .an-input--code { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; color: transparent; caret-color: transparent; background: transparent; box-shadow: none; }
.an-kaestchen-reihe { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.an-kaestchen { display: grid; place-items: center; height: 58px; border: 1.5px solid var(--r-feld); border-radius: 13px; background: var(--feld); font: 800 25px/1 'Plus Jakarta Sans', sans-serif; font-variant-numeric: tabular-nums; color: var(--t); transition: border-color .15s, box-shadow .15s; }
.an-kaestchen.voll { border-color: var(--p); }
.an-kaestchen.cursor { border-color: var(--p); box-shadow: 0 0 0 4px var(--p-ring); }
.an-kaestchen.cursor::after { content: ''; width: 2px; height: 26px; border-radius: 1px; background: var(--p); animation: an-blinken 1s steps(1) infinite; }
.an-code.fehler .an-kaestchen { border-color: var(--gefahr); background: var(--fehler-fl); }
@keyframes an-blinken { 50% { opacity: 0; } }
.an-nochmal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--r); font-size: 14px; line-height: 1.45; color: var(--g); }
.an-nochmal p { margin: 0; flex: 1 1 200px; }
.an-nochmal form { margin: 0; }
.an-textknopf { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--p-h); color: var(--p-d); font: 700 14.5px/1 'Plus Jakarta Sans', sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.an-textknopf:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.an-textknopf:disabled { padding: 0; background: transparent; color: var(--g); cursor: default; font-variant-numeric: tabular-nums; }
.an-zurueck { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 10px 4px; border-radius: 8px; font: 700 14.5px/1 'Plus Jakarta Sans', sans-serif; color: var(--p); text-decoration: none; }
.an-zurueck:hover { text-decoration: underline; text-underline-offset: 3px; }
.an-zurueck:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.an-zurueck svg { width: 18px; height: 18px; }

/* ---------- Offline-Hinweis und Meldungen von pwa-register.js ---------- */
.an .civitas-offline,
.an .civitas-toast { position: fixed; z-index: 1060; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 12px; background: #2B2E33; color: #FFFFFF; font-size: 14px; line-height: 1.45; box-shadow: 0 6px 24px rgba(20, 30, 40, .25); }
.an .civitas-offline { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); max-width: 560px; }
.an .civitas-toast { z-index: 1070; top: calc(12px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 12px; width: max-content; }
.an .civitas-toast button { flex: none; padding: 4px 6px; border: 0; background: transparent; color: #9FD3EA; font-weight: 700; cursor: pointer; }
.an .civitas-offline[hidden], .an .civitas-toast[hidden] { display: none; }
html.ist-offline .an [data-offline-gesperrt] { cursor: not-allowed; }

/* ---------- Ab 480 px ---------- */
@media (min-width: 480px) {
	.an-marke { padding-top: calc(env(safe-area-inset-top, 0px) + 56px); padding-bottom: 112px; }
	.an-logo svg { width: 68px; height: 68px; }
	.an-logo span { font-size: 23px; }
	.an-bogen { width: 440px; height: 440px; right: -80px; bottom: -170px; }
	.an-karte { margin-top: -72px; padding: 32px 32px 28px; }
	.an-neu { padding: 20px 24px 22px; }
	.an-neu .an-knopf { display: inline-flex; width: auto; padding: 0 22px; }
}

/* ---------- Ab 960 px: geteilte Ansicht ---------- */
@media (min-width: 960px) {
	.an-seite { display: grid; grid-template-columns: minmax(400px, 44%) minmax(0, 1fr); }
	.an-marke { display: flex; flex-direction: column; align-items: flex-start; min-height: 100vh; padding: 44px 56px 56px; text-align: left; }
	.an-logo { flex-direction: row; gap: 12px; }
	.an-logo svg { width: 40px; height: 40px; }
	.an-logo span { font-size: 20px; }
	.an-marke__text { display: block; margin-top: clamp(40px, 13vh, 150px); max-width: 520px; }
	.an-bogen { right: -6%; bottom: -9%; width: min(80%, 66vh); height: auto; aspect-ratio: 1; }
	.an-bogen path { stroke-opacity: .96; }
	.an-bogen path:nth-child(1) { stroke: #F7563C; }
	.an-bogen path:nth-child(2) { stroke: #EFCC00; }
	.an-bogen path:nth-child(3) { stroke: #42BC59; }
	.an-bogen path:nth-child(4) { stroke: #0D98FF; }
	.an-glanz { display: block; position: absolute; z-index: -2; right: -20%; bottom: -25%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 196, .16), rgba(255, 236, 196, 0) 60%); }
	.an-haupt { justify-content: center; padding: 40px 64px 28px; background: var(--fl); }
	.an-karte { margin: auto 0 0; max-width: 400px; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
	.an-titel { font-size: 32px; }
	.an-lead { margin-bottom: 26px; font-size: 16.5px; }
	.an-neu { display: block; max-width: 400px; margin: 30px 0 auto; padding: 24px 0 0; border: 0; border-top: 1px solid var(--r); border-radius: 0; background: transparent; }
	.an-neu .an-knopf { min-height: 46px; padding: 0 20px; font-size: 15px; }
	/* Ohne „Neu hier?“ (Code, Kennwort vergessen): Karte mittig, Fuß unten. */
	.an-karte--allein { margin-bottom: auto; }
	.an-app { display: none; }
	.an-fuss { max-width: 600px; margin-top: 36px; }
	.an-fuss p { display: inline; }
	.an-fuss p + p::before { content: ' · '; }
}
@media (min-width: 960px) and (prefers-color-scheme: dark) {
	.an-bogen path { stroke-opacity: .8; }
}

/* Niedrige Laptop-Bildschirme (z. B. 1280 × 720): etwas dichter. */
@media (min-width: 960px) and (max-height: 800px) {
	.an-haupt { padding-top: 28px; }
	.an-titel { font-size: 28px; }
	.an-lead { margin-bottom: 18px; }
	.an-feld { margin-bottom: 14px; }
	.an-bleiben { margin-bottom: 16px; }
	.an-neu { margin-top: 20px; padding-top: 16px; }
	.an-fuss { margin-top: 20px; }
}

/* Breite Bildschirme */
@media (min-width: 1800px) {
	.an-seite { grid-template-columns: minmax(400px, 46%) minmax(0, 1fr); }
	.an-marke { padding: 56px 72px 72px; }
	.an-claim { font-size: 60px; }
	.an-claim-unter { font-size: 20px; }
	.an-karte, .an-neu { max-width: 460px; }
	.an-titel { font-size: 36px; }
	.an-lead { font-size: 18px; }
	.an-label { font-size: 16px; }
	.an-input { height: 58px; font-size: 18px; }
	.an-input--code { font-size: 26px; }
	.an-knopf { min-height: 58px; font-size: 18px; }
	.an-bleiben__text b { font-size: 16.5px; }
	.an-bleiben__text small, .an-neu p { font-size: 15px; }
	.an-fuss { font-size: 14px; }
}

/* Handy quer: kompakter Kopf, damit das Formular sichtbar bleibt. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 959px) {
	.an-marke { padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 64px; }
	.an-logo { flex-direction: row; gap: 10px; }
	.an-logo svg { width: 34px; height: 34px; }
	.an-logo span { font-size: 18px; }
	.an-karte { margin-top: -48px; }
}

/* Sehr schmale Geräte (320 px) */
@media (max-width: 359px) {
	.an-karte { padding: 24px 16px 20px; }
	.an-titel { font-size: 23px; }
	.an-kaestchen-reihe { gap: 5px; }
	.an-kaestchen { height: 52px; font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.an-logo path, .an-bogen path { animation: none; }
	.an-kreisel, .an-kaestchen.cursor::after, .an-meldung--wackeln { animation: none; }
	.an-knopf, .an-input, .an-kaestchen { transition: none; }
}
