/* Grundlagen: Farben, Schrift, Knöpfe, Felder, Dialoge, Hinweise.
   Bewusst nur Systemschriften – keine Google Fonts (Datenschutz). */
:root {
  --akzent: #ee7203;
  --akzent-text: #fff;
  --akzent-hell: color-mix(in srgb, var(--akzent) 12%, #fff);
  --dunkel: #222639;
  --text: #1d1d1b;
  --text-2: #5b5f6b;
  --text-3: #8a8f9c;
  --linie: #e6e7eb;
  --linie-2: #d4d6dc;
  --flaeche: #ffffff;
  --grund: #f5f5f7;
  --gruen: #1f9d6b;
  --gelb: #f2b01e;
  --rot: #d8443a;
  --radius: 14px;
  --radius-k: 9px;
  --schatten: 0 1px 2px rgba(20, 22, 35, .06), 0 8px 24px rgba(20, 22, 35, .07);
  --schatten-gross: 0 24px 64px rgba(20, 22, 35, .22);
  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); color: var(--text); background: var(--grund); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--schrift-titel); letter-spacing: -.01em; line-height: 1.15; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .55em 1em; border-radius: 999px; border: 1px solid var(--linie-2);
  background: var(--flaeche); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  text-decoration: none; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.knopf:hover { border-color: var(--text-3); }
.knopf:active { transform: scale(.97); }
.knopf:focus-visible, .feld:focus-visible, .ikon:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 2px; }
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--akzent) 35%, transparent); }
.knopf.haupt:hover { filter: brightness(1.05); }
.knopf.dunkel { background: var(--dunkel); color: #fff; border-color: transparent; }
.knopf.leise { border-color: transparent; background: transparent; }
.knopf.leise:hover { background: rgba(0, 0, 0, .05); }
.knopf.gefahr { color: var(--rot); }
.knopf.klein { padding: .35em .75em; font-size: 13px; }
.knopf[disabled] { opacity: .5; pointer-events: none; }
.knopf svg, .ikon svg { width: 18px; height: 18px; flex: none; }
.ikon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); }
.ikon:hover { background: rgba(0, 0, 0, .06); color: var(--text); }

/* Felder */
.feld {
  width: 100%; padding: .6em .8em; border: 1px solid var(--linie-2); border-radius: var(--radius-k);
  background: var(--flaeche); transition: border-color .15s;
}
.feld:hover { border-color: var(--text-3); }
.feld:focus { border-color: var(--akzent); outline: none; }
textarea.feld { resize: vertical; min-height: 70px; }
label.beschr { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 5px; }
.zeile { display: flex; gap: 10px; align-items: center; }
.schalter { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.schalter input { appearance: none; width: 36px; height: 21px; border-radius: 99px; background: var(--linie-2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.schalter input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.schalter input:checked { background: var(--akzent); }
.schalter input:checked::after { transform: translateX(15px); }
.segment { display: inline-flex; background: var(--grund); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segment button { border: 0; background: transparent; padding: .38em .8em; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.segment button[aria-pressed="true"] { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Dialoge */
dialog { border: 0; padding: 0; border-radius: 18px; box-shadow: var(--schatten-gross); max-width: min(640px, calc(100vw - 32px)); width: 100%; color: var(--text); }
dialog::backdrop { background: rgba(20, 22, 35, .45); backdrop-filter: blur(3px); }
.dlg-kopf { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
.dlg-kopf h2 { font-size: 19px; }
.dlg-inhalt { padding: 8px 22px 18px; }
.dlg-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--linie); }

/* Hinweise */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 9999; pointer-events: none; }
.toast { background: var(--dunkel); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--schatten-gross); font-size: 14px; animation: toast-rein .25s ease-out; max-width: min(520px, calc(100vw - 32px)); }
.toast.fehler { background: var(--rot); }
.toast.ok { background: var(--gruen); }
@keyframes toast-rein { from { opacity: 0; transform: translateY(10px); } }

.lade { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: drehen .7s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.leer { text-align: center; color: var(--text-3); padding: 40px 16px; }
.marke-kopf { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.marke-kopf img { height: 28px; width: auto; }
.marke-punkt { width: 28px; height: 28px; border-radius: 8px; background: var(--akzent); display: grid; place-items: center; color: var(--akzent-text); }
.marke-punkt svg { width: 16px; height: 16px; }
