/* ===================== Anmeldung (Leitstand 2, js/anmeldung.js) =====================
   Immer dunkel, unabhängig von html[data-theme]: alle Farben als lokale Variablen auf .anm.
   Marke über .anm[data-marke="bau" | "med"]: iPersonal Rot (sparsam), MediPersonal Blau mit Grün, ohne Rot.
   Die Anzeige-Regel steht nur als .anm:not(.hidden), damit .hidden die Anmeldung nach dem Anmelden sicher ausblendet. */
.anm {
  color-scheme: dark;
  /* Marke iPersonal */
  --ak: #E40313; --ak-rgb: 228, 3, 19; --ak-btn: #E40313; --ak-btn-2: #B8020F; --ak-btn-h: #C9020F;
  --ink: #FF5C66; --ak2: #D7DCE4; --ak2-deko: #D7DCE4;
  /* Thema dunkel, auch für Formulare in der Karte (Vermittler-Registrierung) */
  --bg: #050608; --app: #0A0B0E; --sb: #0C0E11;
  --flaeche: #111317; --flaeche-b: #0E1013; --flaeche-2: #15181D; --flaeche-3: #1C2027; --feld: #07080A; --knopf: #15181D; --input: var(--feld);
  --glass: var(--flaeche); --glass-2: var(--flaeche-2);
  --line: rgba(214, 222, 236, .08); --line-strong: rgba(214, 222, 236, .14); --line-3: rgba(214, 222, 236, .26);
  --text: #EDEFF3; --muted: #A9AFBA; --muted-2: #8A919C;
  --silber: #D7DCE4; --silber-rgb: 215, 220, 228;
  --glas: rgba(14, 16, 20, .74); --glas-voll: rgba(17, 19, 24, .985); --hover: rgba(214, 222, 236, .05);
  --ok-bg: rgba(74, 222, 128, .09); --ok-tx: #8EE0AC; --ok-ln: rgba(74, 222, 128, .26);
  --warn-bg: rgba(250, 204, 21, .085); --warn-tx: #EFD27E; --warn-ln: rgba(250, 204, 21, .24);
  --info-bg: rgba(167, 139, 250, .11); --info-tx: #C8BBFF; --info-ln: rgba(167, 139, 250, .3);
  --neu-bg: rgba(205, 214, 228, .06); --neu-tx: #C2C7D0; --neu-ln: rgba(205, 214, 228, .17);
  --gefahr-bg: rgba(248, 113, 113, .09); --gefahr-tx: #F4A3A3; --gefahr-ln: rgba(248, 113, 113, .28);
  --ring: var(--ak); --fokus: var(--ak);
  --ak-bg: rgba(var(--ak-rgb), .10); --ak-ln: rgba(var(--ak-rgb), .42); --primary-glow: rgba(var(--ak-rgb), .45);
  --primary: var(--ak-btn); --primary-2: var(--ink);
  /* Karte bei Nacht */
  --anm-land-a: rgba(222, 230, 244, .10); --anm-land-b: rgba(222, 230, 244, .024);
  --anm-kontur: rgba(232, 238, 248, .6); --anm-glut: rgba(232, 238, 248, .16); --anm-glut2: rgba(232, 238, 248, .045);
  --anm-see: #14161b; --anm-see-rand: rgba(214, 222, 236, .24); --anm-bahn: rgba(214, 222, 236, .15);
  --anm-nachbar: rgba(214, 222, 236, .36); --anm-halo: #1a1d23;
  --anm-paket: #D7DCE4;
  /* Graphit mit Licht (Runde 2e): Grundfarben und Lichtflächen je Marke */
  --anm-grund-a: #262a32; --anm-grund-b: #1f2229; --anm-grund-c: #1a1d23;
  --anm-licht-1: rgba(228, 3, 19, .15); --anm-licht-2: rgba(228, 3, 19, .1); --anm-licht-kuehl: rgba(225, 233, 246, .065); --anm-licht-3: rgba(228, 3, 19, .06);
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: start; padding: 92px 0 76px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.4; color: var(--text); -webkit-font-smoothing: antialiased;
  background: #1a1d23;
}
.anm[data-marke="med"] {
  --ak: #0A9BD9; --ak-rgb: 10, 155, 217; --ak-btn: #0879B2; --ak-btn-2: #05608E; --ak-btn-h: #06689C;
  --ink: #5CCBF7; --ak2: #2EAA60; --ak2-deko: #2EAA60; --fokus: var(--ak2);
  --anm-licht-1: rgba(10, 155, 217, .16); --anm-licht-2: rgba(46, 170, 96, .11); --anm-licht-3: rgba(10, 155, 217, .07);
}
/* über offenen Pop-ups (50), unter Meldungen (60) und Bestätigungen (70) */
.anm:not(.hidden) { display: grid; z-index: 55; }
/* Seite und Rand hinter der Anmeldung ebenfalls dunkel (kein heller Rand beim Überscrollen) */
html:has(> body > .anm:not(.hidden)), html:has(> body > .anm:not(.hidden)) > body { background: #1a1d23; color-scheme: dark; }

/* ---------- Grund: Graphit, Bilder im Modus „screen“, Lichtflächen, Vignette (alles driftet langsam) ----------
   .anm-grund ist eine eigene Ebene mit Graphit als Hintergrund, die Bilder mischen sich nur mit diesem Grund.
   Bilder selbst erzeugt (public/brand/hintergrund/), MediPersonal mit eigenen Fassungen ohne Rot. */
.anm-grund { position: absolute; inset: 0; z-index: -4; overflow: hidden; pointer-events: none;
  background: radial-gradient(70% 80% at 64% 42%, var(--anm-grund-a), rgba(38, 42, 50, 0) 72%),
    linear-gradient(160deg, var(--anm-grund-a) 0%, var(--anm-grund-b) 46%, var(--anm-grund-c) 100%); }
.anm-bild { position: absolute; inset: -6%; background: center / cover no-repeat; mix-blend-mode: screen; will-change: transform; }
.anm-bild-textur { background-image: url(/brand/hintergrund/anmeldung-glut.jpg); opacity: .34;
  animation: anm-drift-a 56s ease-in-out infinite alternate; }
/* Lichtband gespiegelt: läuft hinter der Glas-Karte von oben links nach unten, rechts bleibt die Karte der Schweiz ruhig */
.anm-bild-band { background-image: url(/brand/hintergrund/anmeldung-tiefe.jpg); background-position: 70% 60%; opacity: .26; transform: scaleX(-1);
  animation: anm-drift-b 44s ease-in-out infinite alternate; }
.anm[data-marke="med"] .anm-bild-textur { background-image: url(/brand/hintergrund/anmeldung-glut-med.jpg); }
.anm[data-marke="med"] .anm-bild-band { background-image: url(/brand/hintergrund/anmeldung-tiefe-med.jpg); }
.anm-lichter { position: absolute; inset: -10%; mix-blend-mode: screen; will-change: transform;
  background:
    radial-gradient(34% 46% at 22% 48%, var(--anm-licht-1), rgba(0, 0, 0, 0) 72%),
    radial-gradient(36% 42% at 84% 88%, var(--anm-licht-2), rgba(0, 0, 0, 0) 72%),
    radial-gradient(34% 38% at 64% 30%, var(--anm-licht-kuehl), rgba(0, 0, 0, 0) 72%),
    radial-gradient(30% 36% at 72% 52%, var(--anm-licht-3), rgba(0, 0, 0, 0) 74%);
  animation: anm-drift-c 60s ease-in-out infinite alternate; }
.anm-grund::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(125% 100% at 56% 44%, rgba(12, 13, 17, 0) 48%, rgba(12, 13, 17, .58) 100%); }
@keyframes anm-drift-a { from { transform: translate3d(-1.6%, -1.2%, 0) scale(1.02); } to { transform: translate3d(1.6%, 1.4%, 0) scale(1.07); } }
@keyframes anm-drift-b { from { transform: scaleX(-1) translate3d(-2%, 1.5%, 0) scale(1.03); } to { transform: scaleX(-1) translate3d(2.5%, -1.5%, 0) scale(1.08); } }
@keyframes anm-drift-c { from { transform: translate3d(-2.5%, 1.5%, 0); } to { transform: translate3d(2.5%, -2%, 0); } }

/* ---------- Karte (Hintergrund) ---------- */
.anm-flaeche { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--anm-l, 37%) - 17%), rgba(0, 0, 0, .55) calc(var(--anm-l, 37%) - 1%), #000 calc(var(--anm-l, 37%) + 15%));
  mask-image: linear-gradient(90deg, transparent calc(var(--anm-l, 37%) - 17%), rgba(0, 0, 0, .55) calc(var(--anm-l, 37%) - 1%), #000 calc(var(--anm-l, 37%) + 15%)); }
.anm-flaeche > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: hidden; }
.anm-basis { will-change: transform; }
.anm svg text { font-family: var(--mono); }
.anm-st-land-a { stop-color: var(--anm-land-a); } .anm-st-land-b { stop-color: var(--anm-land-b); }
.anm-st-ak { stop-color: var(--ak); }
.anm-glut { fill: none; stroke: var(--anm-glut); stroke-width: 12px; stroke-linejoin: round; }
.anm-glut2 { fill: none; stroke: var(--anm-glut2); stroke-width: 6px; stroke-linejoin: round; }
.anm-kontur { fill: none; stroke: var(--anm-kontur); stroke-width: 1.15px; stroke-linejoin: round; }
.anm-seen path { fill: var(--anm-see); stroke: var(--anm-see-rand); stroke-width: .8px; stroke-linejoin: round; }
.anm-bahn path { fill: none; stroke: var(--anm-bahn); stroke-width: 1px; stroke-linejoin: round; stroke-linecap: round; }
.anm-nachbarn text { font-size: 10px; letter-spacing: .32em; fill: var(--anm-nachbar); }

.anm-bogen { fill: none; stroke: rgba(var(--silber-rgb), .2); stroke-width: 1px; stroke-dasharray: 2px 5px; }
.anm-bogen.m { stroke: rgba(var(--silber-rgb), .36); stroke-dasharray: none; }
.anm-zbogen { animation: anm-fluss 14s linear infinite; }
@keyframes anm-fluss { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -56px; } }
.anm-paket circle { fill: var(--anm-paket); }
.anm-paket.z circle { fill: #fff; filter: drop-shadow(0 0 3px rgba(var(--ak-rgb), 1)); }
.anm[data-marke="med"] .anm-paket.z circle { filter: drop-shadow(0 0 3px rgba(46, 170, 96, 1)); }
.anm-mensch { fill: var(--silber); }
.anm-f-kern { fill: var(--ak); }
.anm-f-mitte { fill: #fff; }
.anm-f-ring { fill: none; stroke: var(--ak); stroke-width: 1.3px; transform-box: fill-box; transform-origin: center;
  animation: anm-ring 3.4s cubic-bezier(.2, .6, .3, 1) infinite; animation-delay: var(--d, 0s); }
@keyframes anm-ring { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(4.2); opacity: 0; } }
.anm-f-lab { font-size: 10.5px; letter-spacing: .08em; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--anm-halo); stroke-width: 3.5px; stroke-linejoin: round; }
.anm-z-kern { fill: var(--text); stroke: var(--app); stroke-width: 1.5px; }
.anm-z-mitte { fill: var(--ak); }
.anm[data-marke="med"] .anm-z-mitte { fill: var(--ak2); }
.anm-z-lab { font-size: 9.5px; letter-spacing: .1em; font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--anm-halo); stroke-width: 3px; stroke-linejoin: round; }
.anm-z-unter { font-weight: 400; fill: var(--muted); }
/* Fenster versteckt: Bewegung anhalten */
.anm-pause *, .anm-pause *::before, .anm-pause *::after { animation-play-state: paused !important; }

/* ---------- Produkt, Claim, Fusszeile ---------- */
.anm-oben { position: absolute; top: 22px; left: 32px; z-index: 2; display: flex; align-items: center; gap: 18px; pointer-events: none; }
.anm-produkt { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.anm-zeichen { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-3); background: var(--glas); flex: none; }
.anm-zeichen::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ak); box-shadow: 0 0 0 3px rgba(var(--ak-rgb), .18), 0 0 12px rgba(var(--ak-rgb), .8); }
.anm-claim { position: absolute; left: 41%; bottom: 8%; max-width: 30%; z-index: 1; pointer-events: none; }
.anm-claim[hidden] { display: none; }
.anm-claim h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; color: var(--text); text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.anm-claim h2 span { color: var(--muted); font-weight: 400; }
.anm-unten { position: absolute; left: 32px; right: 32px; bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  font-size: 12px; color: var(--muted-2); }
.anm-unten .lg-lizenz { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--muted-2); }

/* ---------- Glas-Karte mit Formular ---------- */
.anm-karte { position: relative; z-index: 1; width: min(412px, calc(100vw - 32px)); margin: 0 0 0 clamp(16px, 4.4vw, 72px); padding: 30px 30px 22px; border-radius: 24px;
  border: 1px solid var(--line-strong); color: var(--text);
  background: linear-gradient(180deg, rgba(22, 25, 31, .84), rgba(12, 14, 18, .9));
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06); }
.anm-karte::before { content: ""; position: absolute; top: -1px; left: 32px; width: 64px; height: 2px; border-radius: 2px; background: var(--ak); box-shadow: 0 0 14px rgba(var(--ak-rgb), .9); }
.anm[data-marke="med"] .anm-karte::before { width: 96px; background: linear-gradient(90deg, var(--ak), var(--ak2)); }
.anm-karte.anm-breit { width: min(780px, calc(100vw - 32px)); }
/* Logo: transparentes Markenlogo auf der dunklen Markenfläche (js/marke.js, css/marke.css), kein weisser Kasten */
.anm-logo { display: flex; align-items: center; min-height: 50px; }
/* Umschalter iPersonal | MediPersonal (Radiogruppe, Pfeiltasten in js/anmeldung.js) */
.anm-marken { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: -4px 0 20px; padding: 3px; border-radius: 13px;
  background: rgba(5, 6, 8, .38); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.anm .anm-marke { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; height: 34px; padding: 0 10px;
  border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: -.005em; cursor: pointer;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.anm .anm-marke:hover { color: var(--text); background: var(--hover); }
.anm .anm-marke[aria-checked="true"] { color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 6px 14px -8px rgba(0, 0, 0, .7); }
.anm .anm-marke[aria-checked="true"]::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 3px; height: 2px; border-radius: 2px; background: #E40313; }
.anm .anm-marke[data-marke="med"][aria-checked="true"]::after { background: linear-gradient(90deg, #0A9BD9, #2EAA60); }
.anm .anm-marke:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.anm-marke-punkt { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #E40313; box-shadow: 0 0 0 3px rgba(228, 3, 19, .18); }
.anm-marke[data-marke="med"] .anm-marke-punkt { background: linear-gradient(135deg, #0A9BD9 50%, #2EAA60 50%); box-shadow: 0 0 0 3px rgba(10, 155, 217, .2); }
/* Nicht gewählt: neutraler Punkt (MediPersonal-Seite ohne Rot, iPersonal-Seite ohne Blau) */
.anm .anm-marke[aria-checked="false"] .anm-marke-punkt { background: rgba(var(--silber-rgb), .45); box-shadow: none; }
.anm-titel, .anm-karte h1, .anm-karte h2 { margin: 24px 0 0; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.anm-unter { margin: 8px 0 4px; color: var(--muted); font-size: 14px; }
.anm-karte p { margin: 0; }
.anm-karte .muted { color: var(--muted); }
.anm-karte a { color: var(--ink); font-weight: 700; text-decoration: none; }
.anm-karte a:hover { text-decoration: underline; }
.anm-feld { display: block; margin-top: 16px; }
.anm-lbl { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.anm-eingabe { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; border-radius: 12px; background: var(--feld); border: 1px solid var(--line-strong); }
.anm-eingabe:focus-within { border-color: var(--ak-ln); box-shadow: 0 0 0 4px rgba(var(--ak-rgb), .12); }
.anm-eingabe > svg.i { width: 18px; height: 18px; color: var(--muted-2); }
.anm-eingabe:focus-within > svg.i { color: var(--ink); }
.anm .anm-eingabe > input, .anm .anm-eingabe > input:focus { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 8px 0 0; border: 0; border-radius: 0; outline: none; box-shadow: none;
  background: none; font: inherit; font-size: 14.5px; font-weight: 400; color: var(--text); }
.anm input:-webkit-autofill, .anm input:-webkit-autofill:hover, .anm input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 60px var(--feld) inset; box-shadow: 0 0 0 60px var(--feld) inset; transition: background-color 9999s; }
/* Passwort anzeigen: echtes Kontrollkästchen als Augen-Knopf (Tastatur mit Leertaste) */
.anm-auge { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--muted-2); }
.anm-auge:hover { color: var(--text); background: var(--hover); }
.anm .anm-auge > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1; }
.anm-auge:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 1px; color: var(--text); }
.anm-auge svg.i { width: 18px; height: 18px; pointer-events: none; }
.anm-auge .zu, .anm-auge:has(input:checked) .auf { display: none; }
.anm-auge:has(input:checked) .zu { display: block; }
.anm-auge:has(input:checked) { color: var(--ink); }
.anm-los { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 50px; margin-top: 20px; padding: 0 18px;
  border: 0; border-radius: 13px; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn-2)); box-shadow: 0 14px 30px -14px rgba(var(--ak-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.anm-los:hover { background: var(--ak-btn-h); }
.anm-los:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.anm-los:disabled { cursor: progress; opacity: .8; }
.anm-los-rechts { display: inline-flex; align-items: center; gap: 10px; }
.anm-los-rechts::before { content: "Enter"; padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .4); font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .07em; text-transform: uppercase; }
.anm-los svg.i { width: 18px; height: 18px; color: #fff; }
.anm-fehler { margin: 10px 0 0; min-height: 1em; font-size: 13px; color: var(--gefahr-tx); }
.anm-fehler:empty { margin-top: 4px; }
.anm-fuss { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-2); }
.anm-fuss svg.i { width: 15px; height: 15px; color: var(--muted); flex: none; }

/* ---------- Formulare anderer Seiten in der Karte (z.B. Vermittler-Registrierung, Formular #inv-reg) ----------
   Bausteine: label > input|select|textarea, fieldset > legend (Abschnitt), .anm-raster (2 Spalten, .anm-voll über beide),
   .anm-hinweis (kleiner Satz), .btn.primary (Hauptknopf), .error (Fehlerzeile) */
.anm-karte form:not(#login-form) > p.muted, .anm-karte .anm-hinweis { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.anm-karte fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
.anm-karte legend { padding: 0; margin: 0 0 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.anm[data-marke="med"] .anm-karte legend { color: var(--ink); }
.anm-karte label:not(.anm-feld):not(.anm-auge) { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.anm .anm-karte :not(.anm-eingabe):not(.anm-auge) > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.anm .anm-karte select, .anm .anm-karte textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--feld); border: 1px solid var(--line-strong); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 400; box-shadow: none; outline: none; }
.anm .anm-karte textarea { height: auto; min-height: 88px; padding: 10px 14px; }
.anm .anm-karte :not(.anm-eingabe):not(.anm-auge) > input:not([type="checkbox"]):not([type="radio"]):focus,
.anm .anm-karte select:focus, .anm .anm-karte textarea:focus { background: var(--feld); border-color: var(--ak-ln); box-shadow: 0 0 0 4px rgba(var(--ak-rgb), .12); }
.anm .anm-karte select option, .anm .anm-karte select optgroup { background: #111317; color: #EDEFF3; }
.anm .anm-karte input[type="checkbox"] { accent-color: var(--ak-btn); }
.anm .anm-karte .btn { min-height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--knopf); color: var(--text); }
.anm .anm-karte .btn.primary { width: 100%; min-height: 50px; margin-top: 20px; border: 0; border-radius: 13px; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn-2)); box-shadow: 0 14px 30px -14px rgba(var(--ak-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.anm .anm-karte .btn.primary:hover { background: var(--ak-btn-h); }
.anm .anm-karte .error { margin-top: 10px; min-height: 1em; font-size: 13px; color: var(--gefahr-tx); }
.anm-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.anm-raster > .anm-voll { grid-column: 1 / -1; }
/* Einfache Hinweiskarte direkt in der Bühne (z.B. Einladung ungültig) */
.anm > .login-card { z-index: 1; justify-self: center; width: min(420px, calc(100vw - 32px)); padding: 26px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--glas-voll); }

/* ---------- Breiten ---------- */
@media (max-width: 1180px) {
  .anm-claim { display: none; }
}
/* Gestapelt (Tablet hoch, Handy): Karte oben mit der ganzen Schweiz, Formular darunter überlappend */
@media (max-width: 900px) {
  .anm:not(.hidden) { display: flex; flex-direction: column; align-items: stretch; }
  .anm { padding: 0 0 20px; }
  .anm-flaeche { position: relative; inset: auto; order: 1; height: clamp(280px, 52vw, 400px); flex: none; z-index: 0;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
  .anm-oben { top: 14px; left: 16px; }
  /* Gestapelt: Licht und Band hinter dem Formular unten, die Karte der Schweiz oben bleibt klar */
  .anm-bild-band { background-position: 60% 40%; opacity: .3; }
  .anm-lichter { background:
    radial-gradient(60% 34% at 30% 74%, var(--anm-licht-1), rgba(0, 0, 0, 0) 72%),
    radial-gradient(60% 30% at 86% 96%, var(--anm-licht-2), rgba(0, 0, 0, 0) 72%),
    radial-gradient(70% 30% at 55% 22%, var(--anm-licht-kuehl), rgba(0, 0, 0, 0) 72%); }
  .anm-karte, .anm-karte.anm-breit { order: 2; width: auto; max-width: 560px; margin: -40px 12px 0; padding: 22px 18px 18px; border-radius: 20px; }
  .anm-karte.anm-breit { max-width: 720px; }
  .anm-titel, .anm-karte h1, .anm-karte h2 { margin-top: 20px; font-size: 24px; }
  .anm-unten { position: static; order: 3; margin: 16px 16px 0; flex-direction: column; align-items: flex-start; gap: 4px; }
  .anm-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 589px) and (max-width: 900px) {
  .anm-karte, .anm-karte.anm-breit { align-self: center; width: calc(100% - 24px); margin-left: auto; margin-right: auto; }
}
@media (max-width: 420px) {
  .anm-los-rechts::before { display: none; }
}
/* Weniger Bewegung: alles still */
@media (prefers-reduced-motion: reduce) {
  .anm *, .anm *::before, .anm *::after { animation: none !important; transition: none !important; }
}

/* ===================== Runde 2g: Anmeldung mit Microsoft (js/anmeldung.js, anmeldungZeigen) =====================
   Hauptknopf .anm-ms in den Farben der Marke, Markenfarben von Microsoft nur im Zeichen. Formular zurückgenommen im <details class="anm-pw">.
   MediPersonal ohne Rot: Fehlerhinweise in Blau (#0B6E9E). */
.anm-karte [hidden] { display: none !important; }
.anm-karte.anm-laedt { opacity: 0; }
.anm-karte { transition: opacity .18s ease; }
.anm[data-marke="med"] { --gefahr-bg: rgba(11, 110, 158, .22); --gefahr-tx: #A9DDF6; --gefahr-ln: rgba(11, 110, 158, .8); }
.anm .anm-ms { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin-top: 22px; padding: 7px 16px 7px 8px; border-radius: 13px;
  color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; letter-spacing: -.005em;
  background: linear-gradient(180deg, var(--ak-btn), var(--ak-btn-2)); box-shadow: 0 14px 30px -14px rgba(var(--ak-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.anm .anm-ms:hover { background: var(--ak-btn-h); text-decoration: none; }
.anm .anm-ms:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.anm-ms-zeichen { flex: none; display: block; width: 38px; height: 38px; padding: 9px; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.anm-ms-text { flex: 1; min-width: 0; }
.anm-ms-pfeil { display: inline-flex; }
.anm-ms-pfeil svg.i { width: 18px; height: 18px; color: #fff; }
.anm-karte .anm-ms-unter { margin-top: 9px; font-size: 12px; color: var(--muted); text-align: center; } /* --muted: Kontrast auch über dem blauen Schein bei 390 */
.anm-karte .anm-ms-fehler { margin-top: 14px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--gefahr-ln); background: var(--gefahr-bg); color: var(--gefahr-tx);
  font-size: 13px; line-height: 1.45; }
.anm-code { display: inline-block; margin-left: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.anm-hilfe { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.anm-hilfe > summary { width: max-content; max-width: 100%; margin: 0 auto; cursor: pointer; color: var(--muted); list-style: none; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.anm-hilfe > summary::-webkit-details-marker { display: none; }
.anm-hilfe > summary:hover { color: var(--text); }
.anm-hilfe > summary:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
.anm-hilfe ul { margin: 10px 0 0; padding: 10px 12px 10px 28px; border-radius: 11px; background: rgba(5, 6, 8, .32); border: 1px solid var(--line); line-height: 1.55; }
.anm-pw { margin-top: 18px; border-top: 1px solid var(--line); }
.anm-pw > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 2px 2px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 700; color: var(--muted); }
.anm-pw > summary::-webkit-details-marker { display: none; }
.anm-pw > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
.anm-pw[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.anm-pw > summary:hover { color: var(--text); }
.anm-pw > summary:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 6px; }
.anm-pw .anm-feld:first-child { margin-top: 12px; }
.anm-karte .anm-feld-hinweis { margin-top: 6px; font-size: 12.5px; color: var(--muted); } /* ruhig, kein Fehler (Markenfarbe wirkte bei iPersonal rot) */
/* Mit Microsoft-Knopf: Formular als zweiter Weg ruhiger */
.anm-karte.anm-mit-ms .anm-pw .anm-los { height: 46px; margin-top: 16px; background: var(--knopf); border: 1px solid var(--line-strong); box-shadow: none; }
.anm-karte.anm-mit-ms .anm-pw .anm-los:hover { background: var(--flaeche-3); }
.anm-karte.anm-mit-ms .anm-pw .anm-los-rechts::before { border-color: var(--line-3); color: var(--muted); }
/* Zugang beantragt */
.anm-karte .anm-zugang-text { margin-top: 12px; line-height: 1.55; }
.anm-ohne-enter::before { display: none; }
.anm-zurueck { margin-top: 22px; }
@media (max-width: 900px) {
  .anm .anm-ms { margin-top: 18px; }
}

/* ===================== Runde 2k: Anmeldung auf dem Handy luftig und klar =====================
   Nur Gestaltung, Funktion und Inhalt unverändert. Desktop ab 901 px bleibt wie bisher (Ausnahme: 16 px in Feldern bei Touch).
   Bis 900 px: grössere Tippflächen (Markenwahl 44 px, Microsoft-Knopf 56 px, Felder und Knöpfe 52 px), mehr Abstand.
   Handy hoch (bis 600 px): mehr Rand um die Formular-Karte, Karte der Schweiz kleiner und ruhiger (ohne Ländernamen),
   Lichtflächen nur oben und unten statt hinter dem Formular, Glas der Karte dichter.
   Handy quer (niedrig): Formular links, Karte der Schweiz rechts daneben, damit das Formular sofort sichtbar ist. */

/* Eingabefelder mindestens 16 px: iOS zoomt beim Antippen nicht hinein */
@media (max-width: 900px), (pointer: coarse) {
  .anm .anm-eingabe > input, .anm .anm-eingabe > input:focus,
  .anm .anm-karte :not(.anm-eingabe):not(.anm-auge) > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .anm .anm-karte select, .anm .anm-karte textarea { font-size: 16px; }
}
@media (max-width: 900px) {
  .anm-marken { margin: -4px 0 22px; border-radius: 14px; }
  .anm .anm-marke { height: 44px; font-size: 14px; border-radius: 11px; }
  .anm-titel, .anm-karte h1, .anm-karte h2 { margin-top: 22px; font-size: 26px; }
  .anm-unter { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; text-wrap: balance; }
  .anm .anm-ms { min-height: 56px; margin-top: 22px; padding: 8px 16px 8px 8px; border-radius: 14px; font-size: clamp(15px, 4.1vw, 16px); }
  .anm-ms-zeichen { width: 40px; height: 40px; padding: 10px; border-radius: 10px; }
  .anm-karte .anm-ms-unter { margin-top: 10px; font-size: 12.5px; line-height: 1.45; text-wrap: balance; }
  .anm-karte .anm-ms-fehler { margin-top: 16px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
  .anm-hilfe { margin-top: 4px; }
  .anm-hilfe > summary { padding: 13px 8px; }
  .anm-hilfe ul { margin-top: 2px; }
  .anm-pw { margin-top: 10px; }
  .anm-pw > summary { min-height: 52px; padding: 0 2px; font-size: 14px; }
  .anm-pw .anm-feld:first-child { margin-top: 6px; }
  .anm-feld { margin-top: 18px; }
  .anm-lbl { margin-bottom: 8px; font-size: 12.5px; }
  .anm-eingabe { height: 52px; border-radius: 13px; }
  .anm-auge { width: 44px; height: 44px; border-radius: 10px; }
  .anm-los, .anm-karte.anm-mit-ms .anm-pw .anm-los { height: 52px; }
  .anm-fuss { margin-top: 10px; padding-top: 16px; font-size: 12.5px; line-height: 1.45; text-wrap: balance; }
  /* Fokus im Formular: über und unter dem Feld bleibt Platz (Knopf «Anmelden» über der Tastatur) */
  .anm .anm-eingabe > input { scroll-margin: 56px 0 96px; }
}
/* Nur Touch: Tasten-Hinweis «Enter» im Knopf entfällt */
@media (hover: none) and (pointer: coarse) {
  .anm-los-rechts::before { display: none; }
}
/* 601 bis 900 px (Tablet hoch, Handy quer weiter unten übersteuert): Karte mit mehr Innenabstand, Fusszeile bündig unter der Karte, Lichtband ruhiger */
@media (min-width: 601px) and (max-width: 900px) {
  .anm-karte, .anm-karte.anm-breit { padding: 30px 30px 22px; }
  .anm-unten { align-self: center; width: min(560px, calc(100% - 24px)); margin: 18px auto 0; }
  .anm-bild-band { opacity: .2; }
}
@media (max-width: 600px) {
  .anm { padding-bottom: 28px; }
  .anm-oben { top: 18px; left: clamp(18px, 5.4vw, 26px); }
  .anm-flaeche { height: clamp(236px, 66vw, 300px); opacity: .8;
    -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent); mask-image: linear-gradient(180deg, #000 74%, transparent); }
  .anm-nachbarn { display: none; }
  .anm-bild-textur { opacity: .2; }
  .anm-bild-band { opacity: .12; }
  .anm-lichter { opacity: .75; background:
    radial-gradient(70% 20% at 16% 6%, var(--anm-licht-1), rgba(0, 0, 0, 0) 72%),
    radial-gradient(70% 18% at 62% 14%, var(--anm-licht-kuehl), rgba(0, 0, 0, 0) 72%),
    radial-gradient(64% 14% at 92% 102%, var(--anm-licht-2), rgba(0, 0, 0, 0) 72%); }
  .anm-karte, .anm-karte.anm-breit { margin: -14px clamp(16px, 5vw, 24px) 0; padding: 26px clamp(18px, 5.6vw, 26px) 20px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(22, 25, 31, .93), rgba(12, 14, 18, .95)); }
  .anm-karte::before { left: clamp(18px, 5.6vw, 26px); }
  .anm-unten { margin: 22px clamp(16px, 4.4vw, 28px) 0; gap: 6px; }
}
/* Handy quer: Formular links, Karte der Schweiz rechts (bleibt beim Blättern stehen).
   Formular mindestens 340 px breit, damit «Mit Microsoft anmelden» auch bei 667 × 375 und 740 × 360 auf einer Zeile bleibt. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 560px) {
  .anm { padding: 0 0 20px; }
  .anm-flaeche { position: fixed; inset: 0 0 0 auto; width: min(52%, calc(100% - 380px)); height: auto; opacity: .9;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%); mask-image: linear-gradient(90deg, transparent, #000 16%); }
  .anm-lichter { background:
    radial-gradient(40% 40% at 10% 4%, var(--anm-licht-1), rgba(0, 0, 0, 0) 72%),
    radial-gradient(40% 36% at 70% 30%, var(--anm-licht-kuehl), rgba(0, 0, 0, 0) 72%),
    radial-gradient(40% 30% at 96% 100%, var(--anm-licht-2), rgba(0, 0, 0, 0) 72%); }
  .anm-karte, .anm-karte.anm-breit { align-self: flex-start; width: max(calc(48% - 28px), 340px); max-width: 420px; margin: 54px 0 0 clamp(16px, 3.6vw, 32px); padding: 22px 22px 18px; }
  .anm-marken { margin-bottom: 16px; }
  .anm-titel, .anm-karte h1, .anm-karte h2 { margin-top: 14px; font-size: 24px; }
  .anm-unter { font-size: 14px; }
  .anm .anm-ms { margin-top: 18px; font-size: 15px; }
  .anm-unten { align-self: flex-start; width: max(calc(48% - 28px), 340px); max-width: 420px; margin: 18px 0 0 clamp(16px, 3.6vw, 32px); }
}
/* Tablet hoch und Handy quer: ohne Ländernamen (lagen auf den Grenzlinien), wie Handy hoch */
@media (max-width: 900px) {
  .anm-nachbarn { display: none; }
}
/* Touch ab 901 px (grosse Handys quer wie 932 × 430, Tablet quer): Tippflächen mindestens 44 px. Desktop mit Maus bleibt unverändert. */
@media (min-width: 901px) and (pointer: coarse) {
  .anm .anm-marke { height: 44px; }
  .anm-hilfe { margin-top: 2px; }
  .anm-hilfe > summary { padding: 13px 8px; }
  .anm-pw > summary { min-height: 44px; padding: 2px 2px 0; }
  .anm-auge { width: 44px; height: 44px; }
}
