/* Grundlage des Looptrail-CRM und der Kundenseite (aus Muster D, 22.11.2026).
   Farben, Schriften und Formen wie auf looptrail.de im Pastellteil: Creme als Grund, Nachtblau als Schrift,
   Kobalt als Akzent, Himmel mit Kuppel als Kopf, Aprikose nur für den Knopf auf dem Himmel. */

@font-face { font-family: "Sora"; src: url("../assets/fonts/sora-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../assets/fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --grund: #fcefe6; --flaeche: #fffaf6; --flaeche-2: #f4e4d8; --flaeche-3: #efdccd;
  --schrift: #10284a; --leise: #52607a; --linie: rgba(16,40,74,.11); --linie-stark: rgba(16,40,74,.24);
  --akzent: #1559b0; --akzent-hell: #e3ecf8; --himmel: #1f5aa8; --aprikose: #f4a77c; --hell: #fff8ef;
  --gruen: #2f6b4f; --gruen-hell: #e2efe6; --warnung: #8a4b10; --warnung-hell: #f8e6cf; --fehler: #b3261e;
  --modern: "Sora", "Helvetica Neue", system-ui, sans-serif;
  --text: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --rand: clamp(16px, 3.2vw, 40px);
  --rund: 16px; --rund-klein: 10px;
  --schatten: 0 0 0 1px var(--linie), 0 24px 48px -32px rgba(16,40,74,.35);
  --weich: cubic-bezier(.22,.7,.2,1);
  --kuppel-unten: 0 0 clamp(60px, 18vw, 360px) clamp(60px, 18vw, 360px) / 0 0 clamp(36px, 7vh, 80px) clamp(36px, 7vh, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--grund); color-scheme: light; }
body { margin: 0; min-height: 100vh; background: var(--grund); color: var(--schrift); font: 400 15px/1.55 var(--text); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--modern); font-weight: 500; letter-spacing: -.02em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

.marke-wort { display: block; width: 112px; aspect-ratio: 4708 / 1192; background: currentColor;
  -webkit-mask: url("../assets/img/looptrail.svg") left center / contain no-repeat; mask: url("../assets/img/looptrail.svg") left center / contain no-repeat; }
.klein { font: 600 11.5px/1.2 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--leise); }
.leise { color: var(--leise); }
.zahl { font-variant-numeric: tabular-nums; }

/* Himmel mit Kuppel als Kopf einer Ansicht */
.himmel { position: relative; isolation: isolate; color: var(--hell); text-shadow: 0 1px 18px rgba(8,36,84,.3); }
.himmel::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--himmel); border-radius: var(--kuppel-unten); }
.himmel__bild { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 100%; border-radius: var(--kuppel-unten); }
.himmel::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--kuppel-unten); pointer-events: none;
  background: linear-gradient(90deg, #1d56a4 0%, rgba(29,86,164,.94) 38%, rgba(29,86,164,0) 68%); }
.himmel .klein { color: rgba(255,248,239,.82); }
.himmel .leise { color: rgba(255,248,239,.88); }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px;
  background: var(--akzent); color: var(--hell); font: 500 15px/1 var(--text); text-decoration: none; cursor: pointer;
  transition: filter .2s, transform .15s var(--weich), background-color .2s; white-space: nowrap; }
.knopf:hover { filter: brightness(1.08); }
.knopf:active { transform: scale(.98); }
.knopf--himmel { background: var(--aprikose); color: var(--schrift); text-shadow: none; box-shadow: 0 12px 26px -14px rgba(8,36,84,.6); }
.knopf--leise { background: transparent; color: var(--schrift); box-shadow: inset 0 0 0 1px var(--linie-stark); }
.knopf--leise:hover { box-shadow: inset 0 0 0 1px var(--schrift); filter: none; }
.knopf--klein { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.knopf--text { background: none; color: var(--akzent); padding: 0 4px; min-height: 36px; }
.knopf--text:hover { text-decoration: underline; text-underline-offset: 3px; filter: none; }

/* Kennzeichen für Zustände, ohne Punkte mit Hof */
.marker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 12.5px/1.2 var(--text); white-space: nowrap;
  background: var(--flaeche-2); color: var(--schrift); }
.marker--offen { background: var(--warnung-hell); color: var(--warnung); }
.marker--bezahlt { background: var(--gruen-hell); color: var(--gruen); }
.marker--akzent { background: var(--akzent-hell); color: var(--akzent); }

/* Karten, Felder */
.karte { background: var(--flaeche); border-radius: var(--rund); box-shadow: var(--schatten); }
.feld { display: grid; gap: 7px; min-width: 0; }
.feld > span { font: 500 13px/1.2 var(--text); color: var(--leise); }
.feld input, .feld textarea, .feld select { width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid var(--linie-stark); border-radius: 12px;
  background: var(--grund); color: var(--schrift); font: 400 16px/1.4 var(--text); }
.feld textarea { min-height: 110px; resize: vertical; }
.feld input, .feld textarea, .feld select { min-width: 0; max-width: 100%; }
.feld input[type="datetime-local"], .feld input[type="date"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
.feld input::-webkit-date-and-time-value { text-align: left; }
.feld input:focus, .feld textarea:focus, .feld select:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wahl label { position: relative; display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--linie-stark); cursor: pointer; }
.wahl input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.wahl label:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: 2px; }
.wahl label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--akzent); background: var(--akzent-hell); }
.wahl b { font: 500 14px/1.3 var(--text); }
.wahl small { font-size: 12.5px; color: var(--leise); }

/* Stationen: der Weg von der Idee bis zum Ziel */
.weg { --n: 6; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.weg::before { content: ""; position: absolute; left: 8px; top: 7px; width: calc((var(--n) - 1) / var(--n) * 100%); height: 1.5px; background: var(--linie-stark); }
.weg::after { content: ""; position: absolute; left: 8px; top: 6.25px; height: 3px; width: calc(min(var(--fort, 0), (var(--n) - 1) / var(--n)) * 100%); background: var(--akzent); border-radius: 2px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.weg__punkt { position: relative; z-index: 1; display: grid; justify-items: start; align-content: start; gap: 8px; font: 500 12.5px/1.25 var(--text); color: var(--leise); }
.weg__punkt::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--grund); box-shadow: inset 0 0 0 1.5px var(--linie-stark); }
.weg__punkt.ist-erledigt::before { background: var(--akzent); box-shadow: none; }
.weg__punkt.ist-jetzt { color: var(--schrift); }
.weg__punkt.ist-jetzt::before { background: var(--flaeche); box-shadow: inset 0 0 0 4px var(--akzent); }

/* Dialog */
.dialog { overflow-x: hidden; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--flaeche); color: var(--schrift);
  box-shadow: 0 40px 90px -30px rgba(8,36,84,.55); }
.dialog::backdrop { background: rgba(16,40,74,.35); backdrop-filter: blur(3px); }
.dialog__kopf { padding: 24px 26px 6px; }
.dialog__kopf h2 { font-size: 22px; }
.dialog__inhalt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 26px; }
.dialog__fuss { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 26px 24px; }
.mailvorschau { padding: 16px 18px; border-radius: 12px; background: var(--grund); box-shadow: inset 0 0 0 1px var(--linie); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.mailvorschau b { display: block; margin-bottom: 8px; font-weight: 600; }

/* Kurzmeldung */
.meldung { position: fixed; left: 50%; bottom: 24px; z-index: 50; translate: -50% 0; padding: 12px 18px; border-radius: 12px; background: var(--schrift); color: var(--hell);
  font: 500 14px/1.4 var(--text); box-shadow: 0 20px 40px -20px rgba(8,36,84,.6); opacity: 0; transition: opacity .25s, translate .25s var(--weich); pointer-events: none; }
.meldung.ist-da { opacity: 1; translate: -50% -6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Am Handy liegen die Wolken unter der Schrift: Blau von oben statt von links */
@media (max-width: 700px) {
  .himmel::after { background: linear-gradient(180deg, #1d56a4 0%, rgba(29,86,164,.93) 62%, rgba(29,86,164,.35) 100%); }
}

/* Datum unter einem bestätigten Punkt des Zeitstrahls */
.weg__punkt small { display: block; margin-top: 2px; font: 400 11.5px/1.2 var(--text); color: var(--leise); }
.weg__punkt.ist-jetzt small { color: var(--akzent); font-weight: 500; }

/* Große Dialoge (Leos iPhone-Aufnahme 22.11.2026): Titel und Knöpfe stehen fest, nur der Inhalt dazwischen scrollt.
   Die Höhe folgt dem sichtbaren Bereich (dvh), damit Safaris Leisten oben und unten nichts verdecken. Solange ein
   Dialog offen ist, steht die Seite dahinter still (Sperre nur auf html, siehe web-frontend-fallen). */
.dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.dialog[open] { display: flex; flex-direction: column; }
.dialog > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dialog__kopf, .dialog__fuss { flex: none; }
.dialog__inhalt { flex: 1 1 auto; min-height: 0; align-content: start; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dialog__fuss { border-top: 1px solid var(--linie); }
html:has(dialog[open]) { overflow: hidden; }
@media (max-width: 600px) {
  .dialog { width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; inset: 0; border-radius: 0; }
  .dialog__kopf { padding: max(18px, env(safe-area-inset-top)) 20px 4px; }
  .dialog__kopf h2 { font-size: 20px; }
  .dialog__inhalt { padding: 14px 20px; }
  .dialog__fuss { padding: 12px 20px max(14px, env(safe-area-inset-bottom)); }
  .dialog__fuss .knopf { flex: 1; }
}
