/* Anmeldung und Weltenübersicht: „Lagekarte" — Höhenlinien, taktische Zeichen,
   Funk in Monospace. Hell (Papier) und dunkel (Leitstelle bei Nacht).

   Alles hier hängt unter eigenen Namen (lage-, lk-, anm-, wel-) und fasst die
   Leitstelle (app.css) nicht an. Nicht .lage und nicht .fms: beide sind in der
   Leitstelle vergeben, und der Lage-Chip wäre sonst ein bildschirmfüllender
   Rahmen geworden (Architekturtest EinstiegsseitenTests).

   Das Design folgt dem System; wer umschaltet, setzt data-theme auf <html>
   (index.html, Components/ThemaKnopf.razor). */

/* ── Schriften (selbst ausgeliefert, SIL Open Font License) ──────────────── */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ui/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ui/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ui/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ui/barlow-semi-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ui/barlow-semi-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ui/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ui/ibm-plex-mono-500.woff2") format("woff2"); }

/* ── Farben ─────────────────────────────────────────────────────────────── */

.lage-seite {
  --l-bg: #F3F0E8;
  --l-surface: #FFFFFF;
  --l-raised: #FAF8F3;
  --l-ink: #172231;
  --l-muted: #586271;
  --l-line: #E1DACB;
  --l-line2: #CFC6B3;
  --l-hero: #ECE6D8;
  --l-contour: #D6CCB6;
  --l-road: #C9BEA6;
  --l-amber: #D99A1E;
  --l-amber-text: #8A5A00;
  --l-amber-soft: #FBF1DC;
  --l-btn: #172231;
  --l-btn-hover: #24344A;
  --l-btn-text: #FFFFFF;
  --l-free: #1E7A4A;
  --l-free-soft: #E3F2E9;
  --l-danger: #B3261E;
  --l-danger-soft: #FBE7E5;
  --l-input: #FFFFFF;
  --l-chip: #EFEBE1;
  --l-an: #FFFFFF;
  --l-mono: #3A4453;
  --l-shadow: 0 1px 2px rgba(23, 34, 49, .06), 0 8px 24px rgba(23, 34, 49, .06);
  color-scheme: light;

  --l-sans: "Barlow", "Segoe UI", system-ui, sans-serif;
  --l-cond: "Barlow Semi Condensed", "Barlow", "Segoe UI", sans-serif;
  --l-mono-font: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="hell"]) .lage-seite {
    --l-bg: #0A0F16; --l-surface: #111923; --l-raised: #172230; --l-ink: #E8EDF3;
    --l-muted: #95A3B5; --l-line: #223043; --l-line2: #2C3C52; --l-hero: #0D141D;
    --l-contour: #1C2939; --l-road: #243447; --l-amber: #F4B63F; --l-amber-text: #F4B63F;
    --l-amber-soft: #2A2314; --l-btn: #F4B63F; --l-btn-hover: #FFC857; --l-btn-text: #1A1204;
    --l-free: #45D192; --l-free-soft: #12291F; --l-danger: #FF7A70; --l-danger-soft: #2E1614;
    --l-input: #0D141D; --l-chip: #0D141D; --l-an: #223043; --l-mono: #B9C4D2;
    --l-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

html[data-theme="dunkel"] .lage-seite {
  --l-bg: #0A0F16; --l-surface: #111923; --l-raised: #172230; --l-ink: #E8EDF3;
  --l-muted: #95A3B5; --l-line: #223043; --l-line2: #2C3C52; --l-hero: #0D141D;
  --l-contour: #1C2939; --l-road: #243447; --l-amber: #F4B63F; --l-amber-text: #F4B63F;
  --l-amber-soft: #2A2314; --l-btn: #F4B63F; --l-btn-hover: #FFC857; --l-btn-text: #1A1204;
  --l-free: #45D192; --l-free-soft: #12291F; --l-danger: #FF7A70; --l-danger-soft: #2E1614;
  --l-input: #0D141D; --l-chip: #0D141D; --l-an: #223043; --l-mono: #B9C4D2;
  --l-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ── Grundlagen ─────────────────────────────────────────────────────────── */

/* body ist für die Leitstelle overflow: hidden - diese Seiten rollen selbst. */
.lage-seite {
  position: fixed; inset: 0; overflow-y: auto;
  background: var(--l-bg); color: var(--l-ink);
  font-family: var(--l-sans); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.lage-seite *, .lage-seite *::before, .lage-seite *::after { box-sizing: border-box; }
.lage-seite h1, .lage-seite h2, .lage-seite h3 { margin: 0; font-family: var(--l-cond); font-weight: 700; color: var(--l-ink); }
.lage-seite p { margin: 0; }
/* :where, damit ein Link als Knopf (.lage-knopf) seine Schriftfarbe behält -
   mit „.lage-seite a" schlug die Linkfarbe die des Knopfs, und „Zur Leitstelle" stand
   dunkel auf dunkel. */
:where(.lage-seite) a { color: inherit; }
.lage-seite :focus-visible { outline: 2px solid var(--l-amber); outline-offset: 2px; border-radius: 6px; }
:where(.lage-seite) button { font-family: inherit; }

.lage-oberzeile {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--l-mono-font); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--l-amber-text);
}
.lage-oberzeile.leise { color: var(--l-muted); font-size: 11px; }
.lage-text { color: var(--l-muted); font-size: 15px; line-height: 1.5; }
.lage-text.gross { font-size: 17px; }
.lage-text strong { color: var(--l-ink); font-weight: 600; }
.lage-hinweis { color: var(--l-muted); font-size: 14px; line-height: 1.5; }
.lage-hinweis.klein { font-size: 13px; }
.lage-fehler {
  padding: 12px 14px; border-radius: 10px; background: var(--l-danger-soft);
  color: var(--l-danger); font-size: 14px; font-weight: 500;
}
.lage-tipp {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
  background: var(--l-amber-soft); color: var(--l-ink); font-size: 14px; line-height: 1.5;
}
.lage-tipp > .lage-symbol { flex-shrink: 0; margin-top: 1px; color: var(--l-amber-text); }
.lage-tipp b { font-weight: 600; }
.lage-tipp.klein { padding: 10px 12px; font-size: 13px; }

/* Wortmarke */
.lage-marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lage-marke-haus { width: 30px; height: 30px; flex-shrink: 0; }
.lage-marke-dach { fill: var(--l-surface); }
.lage-marke-koerper { fill: var(--l-amber); }
.lage-marke-umriss { fill: none; stroke: var(--l-ink); stroke-width: 2; stroke-linejoin: miter; stroke-linecap: butt; }
.lage-marke-strich { fill: none; stroke: var(--l-ink); stroke-width: 1.6; }
.lage-marke-wort {
  font-family: var(--l-cond); font-weight: 700; font-size: 22px; letter-spacing: .06em;
  line-height: 1; color: var(--l-ink);
}
.lage-marke-wort span { color: var(--l-amber-text); }
.lage-marke.gross .lage-marke-haus { width: 34px; height: 34px; }
.lage-marke.gross .lage-marke-wort { font-size: 26px; }

/* Knöpfe */
.lage-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--l-btn); color: var(--l-btn-text);
  font-family: var(--l-sans); font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background-color .12s, border-color .12s;
}
.lage-knopf:hover:not(:disabled) { background: var(--l-btn-hover); }
.lage-knopf:disabled, .lage-knopf.aus { opacity: .55; cursor: not-allowed; }
.lage-knopf.aus { background: transparent; border: 1px dashed var(--l-line2); color: var(--l-muted); font-weight: 500; opacity: 1; }
.lage-knopf.breit { width: 100%; }
.lage-knopf.gross { min-height: 52px; font-size: 17px; border-radius: 12px; }
.lage-knopf.klein { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.lage-knopf.zweit { background: transparent; border-color: var(--l-line2); color: var(--l-ink); }
.lage-knopf.zweit:hover:not(:disabled) { background: var(--l-chip); }
.lage-knopf.leise { background: transparent; color: var(--l-muted); font-weight: 500; }
.lage-knopf.leise:hover:not(:disabled) { background: var(--l-chip); color: var(--l-ink); }
.lage-knopf.gefahr { background: transparent; color: var(--l-danger); font-weight: 500; }
.lage-knopf.gefahr:hover:not(:disabled) { background: var(--l-danger-soft); }
.lage-knopf.gefahr-voll { background: var(--l-danger); color: #FFFFFF; }
.lage-knopf.gefahr-voll:hover:not(:disabled) { background: var(--l-danger); filter: brightness(1.08); }

/* Discord (Anmeldung mit Discord, docs/08) */
.lage-discord-knopf { background: #5865F2; color: #FFFFFF; }
.lage-discord-knopf:hover:not(:disabled) { background: #4752C4; }
.lage-discord-logo { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; }
.lage-discord-logo svg { width: 100%; height: 100%; }
.anm-trenner { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--l-muted); font-size: 13px; }
.anm-trenner::before, .anm-trenner::after { content: ""; flex: 1; height: 1px; background: var(--l-line2); }

.ein-discord {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: 16px; background: #5865F2; color: #FFFFFF;
}
.ein-discord h2 { margin: 0 0 4px; color: #FFFFFF; }
.ein-discord p { margin: 0; color: #E7E9FC; }
.ein-discord .lage-discord-knopf { background: #FFFFFF; color: #5865F2; flex-shrink: 0; }
.ein-discord .lage-discord-knopf:hover { background: #EEF0FF; }
.ein-discord .lage-discord-logo { color: #5865F2; }

/* Doppelte Klasse: .lage-karte steht weiter unten und würde Hintergrund und Abstand überschreiben. */
.lage-karte.wel-discord-karte {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: #FFFFFF;
  background: #5865F2; border-color: transparent; font-weight: 600; font-size: 16px;
  padding: 16px 20px; margin-bottom: 20px; min-height: 56px; box-sizing: border-box;
}
.lage-karte.wel-discord-karte:hover { background: #4752C4; }
.lage-karte.wel-discord-karte .lage-discord-logo { width: 26px; height: 26px; }
.wel-discord-karte .lage-discord-logo { color: #FFFFFF; }

@media (max-width: 720px) {
  .ein-discord { flex-direction: column; align-items: stretch; text-align: center; padding: 24px 20px; }
  .ein-discord .lage-discord-knopf { width: 100%; }
}

.lage-thema {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--l-line2);
  background: var(--l-surface); color: var(--l-ink); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer;
}
.lage-thema:hover { background: var(--l-chip); }

/* Felder */
.lage-label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--l-ink); }
.lage-feld {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--l-line2);
  background: var(--l-input); color: var(--l-ink); font-family: var(--l-sans); font-size: 16px; font-weight: 400;
}
.lage-feld::placeholder { color: var(--l-muted); opacity: .8; }
.lage-feld:focus { outline: none; border: 2px solid var(--l-amber); padding: 0 13px; }
select.lage-feld {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--l-muted) 50%), linear-gradient(135deg, var(--l-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

/* Umschalter mit zwei Stellungen */
.lage-umschalter {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--l-chip);
}
.lage-umschalter button {
  height: 42px; border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: var(--l-muted); font-size: 15px; font-weight: 500; cursor: pointer;
}
.lage-umschalter button[aria-pressed="true"] {
  background: var(--l-an); border-color: var(--l-line); color: var(--l-ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* Zustimmungsfenster (docs/16 "Zustimmung bei der Registrierung"): eigene, kleine
   Fensterklasse statt der Leitstellen-Modale (app.css), damit die Einstiegsseiten ihren
   eigenen Namensraum behalten (EinstiegsseitenTests). */
.lage-modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 15, 22, .55); padding: 20px;
}
.lage-modal {
  background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 16px; box-shadow: var(--l-shadow);
  max-width: 480px; width: 100%; padding: 24px; display: flex; flex-direction: column; gap: 14px;
}

/* Impressum, AGB, Datenschutzerklärung (docs/16 "Rechtliches"): vertrauenswürdige
   HTML-Fragmente aus dem Content-Paket, hier nur typografisch eingekleidet. */
.lage-rechtstext-spalte { max-width: 820px; }
.lage-rechtstext { padding: 24px 28px; color: var(--l-muted); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.lage-rechtstext > :first-child { margin-top: 0; }
.lage-rechtstext h2 { font-size: 21px; margin: 30px 0 10px; }
.lage-rechtstext h3 { font-size: 16px; margin: 22px 0 8px; }
.lage-rechtstext p { margin: 0 0 14px; }
.lage-rechtstext ul, .lage-rechtstext ol { margin: 0 0 14px; padding-left: 22px; }
.lage-rechtstext li { margin: 0 0 6px; }
.lage-rechtstext a { color: var(--l-ink); }
.lage-rechtstext table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; display: block; overflow-x: auto; }
.lage-rechtstext th, .lage-rechtstext td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--l-line); white-space: normal; }
.lage-rechtstext th { color: var(--l-ink); font-weight: 600; }
.lage-karte {
  background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 16px; box-shadow: var(--l-shadow);
}

.lage-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--l-chip); color: var(--l-muted); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.lage-chip.frei { background: var(--l-free-soft); color: var(--l-free); font-weight: 600; }
.lage-chip.marke {
  background: var(--l-amber-soft); color: var(--l-amber-text); font-family: var(--l-mono-font);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px;
}

.lage-symbol { flex-shrink: 0; }
.lage-symbol.gedreht { transform: rotate(180deg); }

/* ── Skizzen ─────────────────────────────────────────────────────────────── */

.lk-kontur { fill: none; stroke: var(--l-contour); stroke-width: 1; }
.lk-strasse { fill: none; stroke: var(--l-road); stroke-linecap: round; }
.lk-strasse-innen { fill: none; stroke: var(--l-hero); stroke-linecap: round; }
.lk-weg { fill: none; stroke: var(--l-road); stroke-width: 2; stroke-dasharray: 10 6; }
.lk-anfahrt { fill: none; stroke: var(--l-amber); stroke-width: 3.5; stroke-dasharray: 8 6; stroke-linecap: round; }
.lk-schild { fill: var(--l-surface); stroke: var(--l-line2); }
.lk-schild-text { fill: var(--l-mono); font-family: var(--l-mono-font); font-size: 11px; }

/* FMS-Status: dieselben Farben wie die Pillen in der Leitstelle (app.css).
   Eigener Name, weil die Klasse dort schon vergeben ist. */
.lage-fms {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; display: inline-flex;
  align-items: center; justify-content: center; color: #0A0F16;
  font-family: var(--l-mono-font); font-size: 12px; font-weight: 500;
}
.lage-fms.s3 { background: #f4c542; }
.lage-fms.s7 { background: #f97316; }

/* ── Anmeldung ──────────────────────────────────────────────────────────── */

.anm { display: flex; min-height: 100%; }

.anm-held {
  position: relative; flex: 0 0 57%; min-height: 100dvh; overflow: hidden;
  background: var(--l-hero); border-right: 1px solid var(--l-line);
}
.lk-karte { position: absolute; inset: 0; width: 100%; height: 100%; }
.anm-held-text {
  position: relative; display: flex; flex-direction: column; gap: 40px;
  max-width: 560px; padding: 56px 64px 0;
}
.anm-aufmacher { display: flex; flex-direction: column; gap: 18px; }
.anm-aufmacher h1 { font-size: clamp(44px, 4.2vw, 60px); line-height: 1; letter-spacing: -.01em; }
.anm-aufmacher p { font-size: 18px; line-height: 1.55; color: var(--l-muted); max-width: 470px; }
.anm-punkte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.anm-punkte li { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; color: var(--l-muted); }
.anm-punkte b { display: block; font-size: 16px; font-weight: 600; color: var(--l-ink); }
.anm-punkt-symbol {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
  background: var(--l-surface); border: 1px solid var(--l-line2); color: var(--l-ink);
}
.anm-funk {
  position: absolute; left: 64px; bottom: 56px; width: min(470px, calc(100% - 128px));
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 14px;
  background: var(--l-surface); border: 1px solid var(--l-line2); box-shadow: var(--l-shadow);
}
.anm-funk-zeile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  font-family: var(--l-mono-font); font-size: 12.5px; color: var(--l-mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.anm-seite {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 56px 32px;
}
.anm-kopf {
  position: absolute; top: 24px; right: 24px; display: flex; align-items: center; gap: 12px;
}
.anm-marke-schmal { display: none; }
.anm-karte { width: min(440px, 100%); padding: 40px; display: flex; flex-direction: column; gap: 26px; }
.anm-karte h2 { font-size: 34px; line-height: 1.1; }
.anm-titel { display: flex; flex-direction: column; gap: 8px; }
.anm-formular { display: flex; flex-direction: column; gap: 18px; }
.anm-formular .lage-knopf { margin-top: 6px; }
.anm-passwort { position: relative; display: flex; }
.anm-passwort .lage-feld { padding-right: 48px; }
.anm-passwort .lage-feld:focus { padding-right: 47px; }
.anm-auge {
  position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--l-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.anm-auge:hover { color: var(--l-ink); background: var(--l-chip); }
.anm-reihe { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1100px) {
  .anm-held { display: none; }
  .anm-seite { padding: 96px 16px 40px; justify-content: flex-start; }
  .anm-kopf { position: static; width: min(440px, 100%); justify-content: space-between; }
  .anm-marke-schmal { display: inline-flex; }
}
@media (max-width: 520px) {
  .anm-seite { padding-top: 24px; }
  .anm-karte { padding: 28px 22px; }
  .anm-karte h2 { font-size: 28px; }
}

/* ── Einstiegsseite ─────────────────────────────────────────────────────── */

/* Besuch ohne Anmeldung (Components/Einstieg.razor). Oben der Aufmacher mit der
   Anfahrt, darunter vier Abschnitte mit Aufnahmen aus dem Spiel, am Ende noch
   einmal der Weg zum Konto. */

.ein-kopf {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 40px; background: var(--l-bg); border-bottom: 1px solid var(--l-line);
}
.ein-konto { display: flex; align-items: center; gap: 10px; }
/* Gleiche Höhe wie der Themen-Knopf (40 px): kleine Knöpfe haben sonst 36 px und
   stehen neben ihm sichtbar niedriger. */
.ein-konto .lage-knopf { min-height: 40px; }

/* Der Kopf ist jetzt eine echte, aber unbedienbare Karte (docs/07 „Kartenkopf"):
   eine erfundene Großschadenslage bei Coesfeld läuft in Endlosschleife im
   Hintergrund, Überschrift und Knöpfe liegen darüber, lesbar durch einen festen,
   dunklen Verlauf. Weder Karte noch Verlauf tragen eigenen Text; hell/dunkel der
   Seite betrifft nur den Rahmen darum, nicht die Kulisse selbst (js/kartenkopf.js,
   tools/geo/Szenenbau). */
.ein-held {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: 620px; border-bottom: 1px solid var(--l-line);
}
.ein-kartenkopf { position: absolute; inset: 0; overflow: hidden; }
/* Sofort da (reines CSS, kein Bild, keine Anfrage): haelt die Stelle, bis die
   Karte Sekunden spaeter nachlaedt - und bleibt bei prefers-reduced-motion für
   immer stehen ("ruhiges Standbild ohne Bewegung", js/kartenkopf.js bricht dort
   vor dem ersten Kartenaufbau ab). */
.ein-kartenkopf-platzhalter {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--l-hero) 0%, var(--l-contour) 55%, var(--l-road) 100%);
}
.ein-kartenkopf-karte { position: absolute; inset: 0; }
.ein-kartenkopf-karte .maplibregl-ctrl-attrib { font-size: 10px; }
/* Der Filter liegt auf .maplibregl-canvas-container (nur die Kartenflaeche
   selbst - Kacheln, 3D-Haeuser, alle Kopf-Ebenen), NICHT auf dem gesamten
   .ein-kartenkopf-karte-Wurzelelement: das enthaelt auch
   .maplibregl-control-container mit der Namensnennung
   ("OpenFreeMap © OpenMapTiles, Daten von OpenStreetMap"), die in jedem Thema
   lesbar bleiben muss (Pflicht der Kachelquelle). Ein Filter auf der Wurzel
   wuerde alle Kind-Elemente beim Zusammensetzen mit abdunkeln, auch die
   Namensnennung - genau das darf hier nicht passieren.
   Der Kartenstil selbst kennt kein dunkles Thema (OpenFreeMap Liberty ist immer
   hell) - im dunklen Seitenmodus sonst ein heller Fleck mitten in einer sonst
   dunklen Seite. Ein Filter auf die Karte statt auf den Verlauf: der Verlauf
   bleibt fuer die Textlesbarkeit unveraendert, nur die Karte darunter wird
   dunkler und etwas blaustichig, passend zur Leitstelle bei Nacht. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="hell"]) .lage-seite .ein-kartenkopf-karte .maplibregl-canvas-container {
    filter: brightness(.55) saturate(.75) hue-rotate(-4deg);
  }
}
html[data-theme="dunkel"] .lage-seite .ein-kartenkopf-karte .maplibregl-canvas-container {
  filter: brightness(.55) saturate(.75) hue-rotate(-4deg);
}
.ein-kartenkopf-verlauf {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 9, 14, .74) 0%, rgba(6, 9, 14, .3) 42%, rgba(6, 9, 14, .8) 100%);
}
/* KEIN max-width hier zusaetzlich zum grossen seitlichen Padding: box-sizing ist
   global border-box (oben), ein max-width unter der Padding-Summe zwaengte den
   Inhalt auf Null und liess jedes Wort einzeln umbrechen. Die Spalte schmal
   halten uebernimmt allein .ein-aufmacher (max-width 480px); h1 und Knoepfe
   brauchen keine. */
.ein-held-text {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px;
  padding: 108px max(40px, calc((100% - 1160px) / 2)) 64px;
}
/* Feste, helle Farben statt der Theme-Variablen: die Kulisse darunter ist immer
   ein helles Kartenbild, ganz gleich ob die Seite hell oder dunkel steht. */
.ein-held .lage-oberzeile { color: #F7C55C; }
.ein-held h1 { font-size: clamp(44px, 4.6vw, 66px); line-height: 1; letter-spacing: -.01em; color: #FFFFFF; }
/* Die Oberzeile mit dem Markennamen steht in der Überschrift (Suchmaschinen sehen
   "ILS Manager" im h1), sieht aber aus wie vorher: eigene Zeile, kleine Schrift. */
.ein-held h1 .lage-oberzeile { margin-bottom: 22px; line-height: 1.4; font-weight: 400; }
.ein-aufmacher { font-size: 18px; line-height: 1.55; color: #D7DDE7; max-width: 480px; }
.ein-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
/* Beide Knöpfe gleich breit: sonst ist "Konto anlegen" mit Pfeil deutlich breiter als
   "Anmelden", und das Paar wirkt verschoben. Auf dem Handy volle Breite (unten). */
.ein-knoepfe .lage-knopf { min-width: 210px; }
.ein-held .lage-hinweis { color: #B9C2D0; }
.ein-held .ein-knoepfe .lage-knopf.zweit { border-color: rgba(255, 255, 255, .5); color: #FFFFFF; }
.ein-held .ein-knoepfe .lage-knopf.zweit:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }

.ein-bild img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--l-line2); box-shadow: var(--l-shadow); background: var(--l-surface);
}

.ein-abschnitte {
  max-width: 1240px; margin: 0 auto; padding: 96px 40px; display: flex; flex-direction: column; gap: 104px;
}
.ein-abschnitt {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 56px;
}
.ein-abschnitt:nth-child(even) .ein-bild { order: 2; }
/* Das Bild bekommt immer die breite Spalte, auch rechts: ein Fenster mit Schrift
   (etwa Disposition) ist in der schmalen Spalte nicht mehr zu lesen. */
.ein-abschnitt:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.ein-bild { margin: 0; }
.ein-abschnitt-text { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.ein-abschnitt-text h2 { font-size: 36px; line-height: 1.1; }

.ein-faq { max-width: 880px; margin: 0 auto; padding: 0 40px 96px; display: flex; flex-direction: column; gap: 28px; }
.ein-faq h2 { font-size: 36px; line-height: 1.1; }
.ein-faq-liste { margin: 0; display: flex; flex-direction: column; gap: 22px; }
.ein-faq-eintrag { padding-bottom: 22px; border-bottom: 1px solid var(--l-line); }
.ein-faq-eintrag dt { font-weight: 600; font-size: 18px; color: var(--l-ink); margin-bottom: 6px; }
.ein-faq-eintrag dd { margin: 0; }
.ein-faq-wiki { margin: 0; }

.ein-schluss {
  display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 88px 24px 104px;
  text-align: center; background: var(--l-hero); border-top: 1px solid var(--l-line);
}
.ein-schluss h2 { font-size: clamp(34px, 3.4vw, 46px); line-height: 1.05; }

.ein-fuss {
  display: flex; justify-content: center; gap: 24px; padding: 20px 24px;
  background: var(--l-hero); border-top: 1px solid var(--l-line); font-size: 13.5px;
}
.ein-fuss a { color: var(--l-muted); text-decoration: none; }
.ein-fuss a:hover { color: var(--l-ink); text-decoration: underline; }

@media (max-width: 960px) {
  .ein-held { min-height: 480px; }
  .ein-held-text { padding: 88px 24px 40px; gap: 18px; }
  .ein-held h1 .lage-oberzeile { margin-bottom: 18px; }
  .ein-faq { padding: 0 24px 64px; }
  .ein-abschnitte { padding: 64px 24px; gap: 64px; }
  .ein-abschnitt, .ein-abschnitt:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ein-abschnitt:nth-child(even) .ein-bild { order: 0; }
  .ein-abschnitt-text { max-width: none; }
}
@media (max-width: 560px) {
  .ein-kopf { padding: 12px 16px; }
  .ein-nur-breit { display: none; }
  /* "Kopf nicht höher als nötig" (Auftrag): auf dem Handy reicht die Karte als
     ruhiger Hintergrund für Titel und Knöpfe, ohne den ganzen ersten Bildschirm
     zu füllen. */
  .ein-held { min-height: 0; }
  .ein-held-text { padding: 40px 16px 32px; gap: 16px; max-width: none; }
  .ein-held h1 { font-size: 34px; }
  .ein-held h1 .lage-oberzeile { margin-bottom: 16px; }
  .ein-faq { padding: 0 16px 48px; }
  .ein-faq h2 { font-size: 28px; }
  .ein-aufmacher { max-width: none; }
  /* Auf dem Handy steht der Text über der ganzen Karte, nicht links neben dem
     Geschehen: der Verlauf muss dort durchgehend dunkel sein, sonst laufen
     Beschriftungen der Karte mitten durch den Absatz. */
  .ein-kartenkopf-verlauf {
    background: linear-gradient(180deg, rgba(6, 9, 14, .84) 0%, rgba(6, 9, 14, .7) 50%, rgba(6, 9, 14, .88) 100%);
  }
  .ein-knoepfe .lage-knopf { flex: 1 1 100%; }
  .ein-abschnitte { padding: 48px 16px; gap: 48px; }
  .ein-abschnitt-text h2 { font-size: 28px; }
  .ein-schluss { padding: 56px 16px 72px; }
}

/* ── Weltenübersicht ────────────────────────────────────────────────────── */

.wel-kopf {
  position: sticky; top: 0; z-index: 5; height: 76px; padding: 0 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--l-surface); border-bottom: 1px solid var(--l-line);
}
.wel-konto { display: flex; align-items: center; gap: 14px; }
/* Profil, Abmelden, Zurück: so hoch wie der Knopf für hell und dunkel daneben. */
.wel-konto .lage-knopf { min-height: 40px; }
.wel-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--l-chip); border: 1px solid var(--l-line2); font-weight: 600; font-size: 14px;
}
.wel-wer { display: flex; flex-direction: column; line-height: 1.2; }
.wel-wer b { font-weight: 600; font-size: 15px; }
.wel-wer span { font-size: 13px; color: var(--l-muted); }

.wel {
  display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 36px; align-items: start;
  max-width: 1400px; margin: 0 auto; padding: 44px 56px 56px;
}
.wel-haupt { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.wel-gruss { display: flex; flex-direction: column; gap: 10px; }
.wel-gruss h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.05; }
.wel-gruss .lage-text { max-width: 640px; }

.wel-abschnitt { display: flex; flex-direction: column; gap: 16px; }
.wel-abschnitt h2 { font-size: 24px; }
.wel-abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wel-abschnitt-kopf span { font-size: 14px; color: var(--l-muted); }

.wel-leitstellen { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.wel-ls {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--l-surface); border: 1px solid var(--l-line); border-radius: 16px; box-shadow: var(--l-shadow);
}
.wel-ls-kopf { position: relative; height: 120px; background: var(--l-hero); border-bottom: 1px solid var(--l-line); overflow: hidden; }
.lk-kopf { position: absolute; inset: 0; width: 100%; height: 100%; }
.wel-code {
  position: absolute; left: 20px; top: 16px; padding: 3px 8px; border-radius: 6px;
  background: var(--l-surface); border: 1px solid var(--l-line2);
  font-family: var(--l-mono-font); font-size: 12px; color: var(--l-mono);
}
.wel-ls-inhalt { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.wel-ls-welt { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--l-muted); }
.wel-ls h3 { font-size: 28px; line-height: 1.1; margin-top: -8px; }
.wel-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--l-muted); }
.wel-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--l-muted); }
.wel-status.ok::before { background: var(--l-free); }
.wel-status.warn { color: var(--l-amber-text); }
.wel-status.warn::before { background: var(--l-amber); }
/* Zwei feste Reihen: der Weg hinein über die ganze Breite, darunter klein das
   Seltene - links weitere Kreise, rechts, mit Abstand, das Abgeben. */
.wel-ls-aktionen { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.wel-ls-neben { display: flex; justify-content: space-between; gap: 8px; margin: 0 -10px -8px; }
.wel-abgeben {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px;
  background: var(--l-danger-soft); color: var(--l-ink); font-size: 14px; line-height: 1.5;
}
.wel-reihe { display: flex; gap: 8px; flex-wrap: wrap; }

.wel-kreise { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.wel-kreise-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wel-kreise-kopf h3 { font-size: 20px; }

.wel-rangliste { display: flex; flex-direction: column; gap: 4px; }
.wel-rangliste h3 { font-size: 16px; margin-bottom: 4px; }
.wel-rang-zeile { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.wel-rang-platz { width: 1.6em; color: var(--l-muted); }
.wel-rang-name { flex: 1; min-width: 0; }
.wel-rang-quote { color: var(--l-muted); white-space: nowrap; }

.wel-liste { overflow: hidden; }
.wel-liste-kopf, .wel-zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 180px; align-items: center; gap: 16px;
}
.wel-liste-kopf {
  padding: 12px 22px; font-family: var(--l-mono-font); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--l-muted);
}
.wel-zeile { padding: 14px 22px; border-top: 1px solid var(--l-line); }
.wel-zeile-name { font-weight: 600; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.wel-zeile-zahl { font-size: 15px; color: var(--l-muted); }
.wel-zeile-knopf { justify-self: end; }
.wel-zeile.offen .wel-zeile-knopf { background: var(--l-chip); }
.wel-zeile-kreise { padding: 4px 22px 22px; }

/* Einspaltige Seiten der Weltübersicht (Bugs & Ideen, Impressum): ohne die rechte
   Spalte, sonst stünde der Inhalt schmal links neben einer leeren Seitenleiste. */
.wel.wel-einspaltig { grid-template-columns: minmax(0, 1fr); max-width: 1100px; }

/* Bugs & Ideen (Issues.razor): Filter, Liste, Detail. */
.wel-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -16px; }
.wel-filter .lage-knopf.an { background: var(--l-chip); border-color: var(--l-ink); }
.wel-filter-zahl { color: var(--l-muted); font-weight: 500; margin-left: 4px; }
.wel-issue {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) 120px 90px; gap: 16px; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--l-line); color: inherit; text-decoration: none;
}
.wel-issue-kopf {
  border-top: none; padding-block: 12px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--l-muted);
}
.wel-issue:not(.wel-issue-kopf):hover { background: var(--l-chip); }
.wel-issue:focus-visible { outline: 2px solid var(--l-ink); outline-offset: -2px; }
.wel-issue-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wel-issue-titel b { overflow-wrap: anywhere; }
.wel-issue-kurz { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wel-chip-bug { background: var(--l-danger-soft); color: var(--l-danger); font-weight: 600; }
.wel-chip-arbeit { color: var(--l-ink); font-weight: 600; }
.wel-chip-aus { text-decoration: line-through; }
.wel-issue-marken { display: flex; flex-wrap: wrap; gap: 8px; }
.wel-issue-detail { padding: 22px 24px; display: flex; flex-direction: column; gap: 20px; }
.wel-issue-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.wel-issue-daten { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 14px; }
.wel-issue-daten dt { color: var(--l-muted); }
.wel-issue-daten dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .wel-issue { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 16px; }
  .wel-issue-kopf { display: none; }
  .wel-issue > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .wel-issue > :nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
  .wel-issue > .wel-issue-titel { grid-column: 1 / -1; grid-row: 2; }
  .wel-issue > :nth-child(4) { display: none; }
}

.wel-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wel-kacheln > .lage-hinweis { grid-column: 1 / -1; }
.wel-kachel {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px;
  border: 1.5px solid var(--l-line); background: var(--l-raised);
}
.wel-kachel-name { font-weight: 600; font-size: 16px; }
.wel-kachel-code { font-family: var(--l-mono-font); font-size: 11.5px; color: var(--l-muted); }
.wel-kachel-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--l-muted); }
.wel-kachel-wer { min-height: 36px; display: flex; align-items: center; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.wel-kachel-warn { font-size: 13px; font-weight: 600; color: var(--l-amber-text); }
.wel-kachel.meiner { border-color: var(--l-amber); background: var(--l-amber-soft); }
.wel-kachel.meiner .wel-kachel-status { color: var(--l-amber-text); font-weight: 600; }
.wel-kachel.frei { border-color: var(--l-line2); background: var(--l-surface); }
.wel-kachel.frei .wel-kachel-status { color: var(--l-free); font-weight: 600; }
.wel-kachel.frei .wel-kachel-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--l-free); }
.wel-kachel.frei .lage-knopf.zweit { border-color: var(--l-ink); }

.wel-fussnote { display: flex; gap: 10px; align-items: flex-start; max-width: 760px; font-size: 14px; line-height: 1.5; color: var(--l-muted); }
.wel-fussnote .lage-symbol { margin-top: 1px; }

.wel-fuss { display: flex; gap: 18px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--l-line); font-size: 13.5px; }
.wel-fuss a { color: var(--l-muted); text-decoration: none; }
.wel-fuss a:hover { color: var(--l-ink); text-decoration: underline; }

.wel-seite { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 100px; }
.wel-seitenkarte { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.wel-seitenkarte h2 { font-size: 24px; margin-bottom: 6px; }
.wel-seitenkarte .lage-feld { height: 46px; font-size: 15px; }

.wel-tarif {
  display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px;
  border: 1px solid var(--l-line2); background: var(--l-surface);
}
.wel-tarif.meiner { border: 1.5px solid var(--l-amber); background: var(--l-amber-soft); }
.wel-tarif-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wel-tarif-name { font-family: var(--l-cond); font-weight: 700; font-size: 22px; }
.wel-tarif-preis { font-size: 15px; font-weight: 600; }
.wel-tarif-stand {
  font-family: var(--l-mono-font); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--l-amber-text);
}
.wel-tarif-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.wel-tarif-liste li { display: flex; gap: 8px; align-items: center; }
.wel-tarif-liste .lage-symbol { color: var(--l-muted); }
.wel-tarif.meiner .wel-tarif-liste .lage-symbol { color: var(--l-amber-text); }
.wel-tarif .lage-knopf.gefahr { align-self: flex-start; padding: 0 8px; }

.wel-leer { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.wel-leer-karte { width: min(440px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.wel-leer-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

@media (max-width: 1100px) {
  .wel { grid-template-columns: minmax(0, 1fr); padding: 32px 24px 48px; }
  .wel-seite { position: static; }
  .wel-kopf { padding: 0 24px; }
}
@media (max-width: 640px) {
  .wel { padding: 24px 16px 40px; gap: 28px; }
  .wel-kopf { padding: 0 16px; height: 64px; }
  .wel-wer, .wel-avatar { display: none; }
  .wel-liste-kopf { display: none; }
  .wel-zeile { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; padding: 14px 16px; }
  .wel-zeile-zahl { display: none; }
  .wel-zeile-knopf { grid-column: 1 / -1; justify-self: stretch; }
  .wel-zeile-kreise { padding: 4px 16px 16px; }
  .wel-leitstellen { grid-template-columns: minmax(0, 1fr); }
}
/* Schmale Handys (ab ca. 400 px abwärts): Wortmarke, Profil-Knopf, Thema und
   Abmelden liefen zusammen rechts über den Rand — "Abmelden" stand abgeschnitten
   da, mit waagerechter Scrollleiste. Enger statt weglassen: alles bleibt bedienbar,
   nur mit weniger Luft. Der Kopf ab 641 px ist davon unberührt. */
@media (max-width: 400px) {
  .wel-kopf { padding: 0 10px; gap: 8px; }
  .lage-marke-wort { font-size: 17px; }
  .wel-konto { gap: 6px; }
  .wel-konto .lage-knopf.klein { padding: 0 8px; font-size: 13px; }
}

/* ── Viele Welten, viele Kreise: Suche, Schiene, Blättern ────────────────── */

.lage-filter { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.lage-suche { position: relative; display: flex; flex: 1 1 260px; max-width: 420px; }
.lage-suche .lage-symbol {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--l-muted); pointer-events: none;
}
.lage-suche .lage-feld { height: 42px; padding-left: 38px; font-size: 15px; }
.lage-suche .lage-feld:focus { padding-left: 37px; }
.lage-schalter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  font-size: 14px; color: var(--l-ink); cursor: pointer; user-select: none;
}
.lage-schalter input { width: 18px; height: 18px; margin: 0; accent-color: var(--l-amber); cursor: pointer; }
/* Widerrufsverzicht im Kaufbereich (docs/08 "Kaufablauf"): ein ganzer Satz statt eines
   kurzen Wortes, deshalb oben ausgerichtet statt mittig. */
.wel-tarif-verzicht { display: flex; align-items: flex-start; white-space: normal; text-align: left; }
.wel-tarif-verzicht input { flex-shrink: 0; margin-top: 2px; }

.lage-pfeil {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--l-line2);
  background: var(--l-surface); color: var(--l-ink); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer;
}
.lage-pfeil:hover:not(:disabled) { background: var(--l-chip); }
.lage-pfeil:disabled { opacity: .35; cursor: default; }

/* Die Schiene: Karten nebeneinander, zwei auf einmal sichtbar, der Rest per
   Pfeil oder Wischen. Die Pfeile blendet js/lage.js ein (data-voll). */
.lage-schiene { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lage-schiene-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lage-schiene-kopf h2 { font-size: 24px; }
.lage-schiene-pfeile { display: none; gap: 8px; margin-left: auto; }
.lage-schiene[data-voll="1"] .lage-schiene-pfeile { display: flex; }
.lage-schiene-spur {
  /* max(), nicht minmax(): in einer übervollen Spur wächst eine minmax-Spalte nie
     über ihr Minimum - dann standen drei angeschnittene Karten da statt zwei. */
  display: grid; grid-auto-flow: column; grid-auto-columns: max(300px, calc((100% - 20px) / 2));
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 2px 2px 12px; margin: -2px -2px 0;
  scrollbar-width: thin; scrollbar-color: var(--l-line2) transparent;
}
.lage-schiene-spur > * { scroll-snap-align: start; }
.lage-schiene-spur .wel-ls { box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.lage-schiene-spur:focus-visible { outline-offset: 4px; }
.wel-meine-suche { flex: 0 1 300px; }

.lage-blaettern { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lage-blaettern-stand { font-size: 13px; color: var(--l-muted); }
.lage-blaettern-knoepfe { display: flex; align-items: center; gap: 10px; }
.lage-blaettern-seite {
  min-width: 118px; text-align: center; font-family: var(--l-mono-font); font-size: 12.5px; color: var(--l-muted);
}
.wel-liste-fuss { padding: 12px 22px; border-top: 1px solid var(--l-line); }
.wel-zeile-kreise { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 640px) {
  .lage-schiene-spur { grid-auto-columns: 86%; }
  .wel-meine-suche { flex-basis: 100%; }
  .wel-liste-fuss { padding: 12px 16px; }
  .lage-blaettern-stand { width: 100%; }
}

/* ── Profil (Seite /profil, im Namensraum der Weltenübersicht) ───────────── */
.wel-pro { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; display: flex; flex-direction: column; gap: 20px; }
.wel-pro-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.wel-pro-karte { padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.wel-pro-karte h2 { margin: 0; font-size: 17px; color: var(--l-ink); }
.wel-pro-karte .lage-label { width: 100%; }
.wel-pro-breit { grid-column: 1 / -1; }
.wel-pro-gefahr { border-color: var(--l-danger); }
.wel-pro-bild-zeile { display: flex; gap: 16px; align-items: center; }
.wel-pro-bild { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--l-line2); flex-shrink: 0; }
.wel-pro-bild.leer { display: inline-flex; align-items: center; justify-content: center; background: var(--l-chip); color: var(--l-ink); font-weight: 700; font-size: 22px; }
.wel-pro-bild-knoepfe { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wel-pro-datei { position: relative; overflow: hidden; }
.wel-pro-datei input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* Jede Stellung mindestens so breit wie ihr Wort: „Wie das Gerät“ brach bei
   schmalen Karten in zwei Zeilen. */
.wel-pro-drei { grid-template-columns: repeat(3, minmax(max-content, 1fr)); width: 100%; }
.lage-umschalter button { white-space: nowrap; padding: 0 10px; }
.wel-pro-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.wel-pro-tabelle th { text-align: left; color: var(--l-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--l-line); }
.wel-pro-tabelle td { padding: 8px; border-bottom: 1px solid var(--l-line); color: var(--l-ink); }
.wel-avatar-bild { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
@media (max-width: 560px) { .wel-pro { padding: 16px 16px 48px; } .wel-pro-bild-zeile { flex-direction: column; align-items: flex-start; } }
.wel-konto-profil { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }

/* ── Kreiswahl: Land, dann Kreis (Welt anlegen und Kreise einer Welt) ────── */

.wel-land-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.wel-land-kachel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px;
  border-radius: 12px; border: 1.5px solid var(--l-line); background: var(--l-raised);
  font-family: var(--l-sans); color: var(--l-ink); cursor: pointer; text-align: left;
}
.wel-land-kachel:hover { border-color: var(--l-line2); background: var(--l-surface); }
.wel-land-kachel b { font-size: 16px; }
.wel-land-kachel > span:not(.lage-chip) { font-size: 13px; color: var(--l-muted); }
.wel-land-zurueck { align-self: flex-start; }
.wel-kachel-land {
  margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--l-chip);
  font-size: 10.5px; color: var(--l-muted); text-transform: uppercase;
}

/* Das kompakte Feld fuer die eigene Partie: ein Knopf, der wie ein Eingabefeld
   aussieht, und darunter, solange offen, das Panel mit Suche, Laendern und Kreisen. */
.wel-kw { position: relative; }
.wel-kw-feld { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; }
.wel-kw-feld-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wel-kw-feld-code { font-family: var(--l-mono-font); font-size: 12px; color: var(--l-muted); }
.wel-kw-feld-platz { flex: 1; color: var(--l-muted); }
.wel-kw-panel { margin-top: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* .lage-suche setzt "flex: 1 1 260px" fuer eine waagerechte Filterleiste; im
   senkrechten Panel hier wuerde daraus eine 260px hohe Haupt-Achse (Hoehe statt
   Breite), und das Suchfeld ragte mit riesigem Freiraum darunter. */
.wel-kw-such { flex: 0 0 auto; width: 100%; max-width: none; }
.wel-kw-land-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wel-kw-land {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--l-line); background: var(--l-surface); color: var(--l-ink);
  font-family: var(--l-sans); text-align: left; cursor: pointer;
}
.wel-kw-land b { font-size: 14px; }
.wel-kw-land span { font-size: 12px; color: var(--l-muted); }
.wel-kw-land.aktiv, .wel-kw-land:hover { border-color: var(--l-amber); background: var(--l-amber-soft); }
.wel-kw-zurueck { align-self: flex-start; }
.wel-kw-kreis-liste {
  display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto;
  margin: 0 -6px; padding: 0 6px;
}
.wel-kw-kreis {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 8px; border: none; background: transparent;
  font-family: var(--l-sans); color: var(--l-ink); text-align: left; cursor: pointer;
}
.wel-kw-kreis-name { font-size: 14px; overflow-wrap: anywhere; }
.wel-kw-kreis-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.wel-kw-kreis-land { font-size: 11.5px; color: var(--l-muted); }
.wel-kw-kreis-code { font-family: var(--l-mono-font); font-size: 11.5px; color: var(--l-muted); }
.wel-kw-kreis.aktiv, .wel-kw-kreis:hover { background: var(--l-chip); }
.wel-kw-kreis.an { background: var(--l-amber-soft); }
.wel-kw-kreis.an .wel-kw-kreis-name { font-weight: 600; }
.wel-kw-leer { padding: 4px 2px; }

@media (max-width: 400px) {
  .wel-kw-land-liste { grid-template-columns: 1fr; }
}

/* Mit dem Finger (docs/07 „Mobil“): kein Bedienelement unter 44 × 44 px. */
@media (pointer: coarse) {
  .lage-marke { min-height: 44px; }
  .lage-knopf.klein, .ein-konto .lage-knopf, .lage-schalter, .wel-kw-kreis { min-height: 44px; }
  .lage-thema, .lage-pfeil, .anm-auge { width: 44px; height: 44px; }
  .anm-auge { top: 2px; right: 2px; }
  .lage-umschalter button, .lage-suche .lage-feld { height: 44px; }
  .lage-schalter input { width: 22px; height: 22px; }
}
