/* ==========================================================================
   DBV Beratung – Formularerfassung · Grundlagen
   Gestaltungswerte der Produktfamilie (übernommen aus der Schwesteranwendung
   „DBV Beratung – Kommunikationsplattform“), Bausteine, Zustände.

   Schriften: Es werden bewusst keine Schriftdateien aus dem Netz geladen. Die Stapel
   nennen die Familienschriften zuerst und fallen auf gute Systemschriften zurück.
   Sobald lokale Dateien unter web/public/schrift/ liegen, genügt es, hier die
   @font-face-Regeln zu ergänzen (font-src 'self' ist in der CSP bereits erlaubt):

   @font-face { font-family: "Bricolage Grotesque"; src: url("../schrift/bricolage-grotesque-var.woff2") format("woff2");
                font-weight: 200 800; font-display: swap; }
   @font-face { font-family: "Figtree"; src: url("../schrift/figtree-var.woff2") format("woff2");
                font-weight: 300 900; font-display: swap; }
   ========================================================================== */

:root {
  color-scheme: light;

  /* Farben der Produktfamilie */
  --tinte: #12241f;
  --sand: #f6f2ea;
  --tanne: #0b3a33;
  --teal: #0e7d6d;
  --linie: #e4e7e2;
  --gedaempft: #64766f;
  --weiss: #ffffff;
  --akzent: #25d366;

  /* Abgeleitete Töne */
  --teal-tief: #0a6558;
  --teal-hauch: #e4f1ee;
  --teal-ring: rgba(14, 125, 109, .28);
  --sand-tief: #ece6da;
  --sand-linie: #ddd6c7;
  --gedaempft-tief: #52635c;
  --tanne-text: #d5e4df;
  --tanne-gedaempft: #9fbab3;
  --tanne-flaeche: rgba(255, 255, 255, .07);

  /* Zustandsfarben (Text / Fläche / Rand) */
  --ok: #0b6247;      --ok-flaeche: #e1f3ea;      --ok-rand: #b9dfcc;
  --warn: #7a4a00;    --warn-flaeche: #fcefd2;    --warn-rand: #efd49a;
  --fehler: #9c2219;  --fehler-flaeche: #fbe6e2;  --fehler-rand: #f0bdb6;
  --lauf: #1d557f;    --lauf-flaeche: #e2eef6;    --lauf-rand: #bcd5e7;
  --neutral: #46584f; --neutral-flaeche: #edf0ec; --neutral-rand: #d9dfd8;
  --gefahr: #b3261c;  --gefahr-tief: #8f1d15;

  /* Radien und Schatten */
  --radius-karte: 1.25rem;
  --radius-feld: .9rem;
  --radius-m: .5rem;
  --radius-s: .375rem;
  --radius-pille: 9999px;
  --schatten-karte: 0 1px 2px rgba(11, 42, 36, .05), 0 6px 24px rgba(11, 42, 36, .07);
  --schatten-klein: 0 1px 3px rgba(11, 42, 36, .07);
  --schatten-hoch: 0 2px 6px rgba(11, 42, 36, .08), 0 18px 48px rgba(11, 42, 36, .18);

  /* Schrift */
  --schrift-display: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --schrift-text: "Figtree", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --schrift-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;

  --kurve: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--sand);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: #b9c2bb transparent;
}

::selection { background: #bfe3db; color: var(--tinte); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--schrift-display); font-weight: 700; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; }
h2 { font-size: 1.0625rem; letter-spacing: -.012em; }
h3 { font-size: .9375rem; letter-spacing: -.005em; }
h1:focus { outline: none; }
a { color: var(--teal-tief); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tanne); }
strong { font-weight: 650; }
code { font-family: var(--schrift-mono); font-size: .92em; }
q { quotes: "„" "“"; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: var(--radius-s); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.versteckt-sichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gedaempft { color: var(--gedaempft); }
.nowrap { white-space: nowrap; }
.umbruch { overflow-wrap: anywhere; }

.ton-ok { color: var(--ok); }
.ton-warn { color: var(--warn); }
.ton-fehler { color: var(--fehler); }
.ton-neutral { color: var(--neutral); }

/* ---- Start-/Ladeanzeigen (ruhig, in Anlehnung an boot-breathe / boot-bar) ---- */

.start, .startfehler {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem;
  background: var(--sand); text-align: center; padding: 2rem;
}
.start-marke { width: 56px; height: 56px; border-radius: 16px; box-shadow: var(--schatten-karte); }
.start-atmen { animation: atmen 2.4s ease-in-out infinite; }
.start-text { color: var(--gedaempft-tief); font-size: .875rem; }
.start-leiste, .laufleiste {
  position: relative; width: 9rem; height: 3px; border-radius: var(--radius-pille); background: var(--sand-linie); overflow: hidden;
}
.start-leiste span, .laufleiste span {
  position: absolute; inset-block: 0; left: 0; width: 40%; border-radius: inherit; background: var(--teal);
  animation: laufen 1.5s var(--kurve) infinite;
}
.laufleiste-schmal { width: 100%; max-width: 14rem; margin-top: .5rem; background: rgba(18, 36, 31, .1); }
.startfehler p { color: var(--gedaempft-tief); max-width: 32rem; }
.ohne-skript { padding: 2rem; text-align: center; }

@keyframes atmen { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.94); opacity: .78; } }
@keyframes laufen { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes drehen { to { transform: rotate(360deg); } }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } }

.laden { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 3.5rem 1rem; color: var(--gedaempft-tief); }
.laden-text { font-size: .875rem; }

.leer { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 3.25rem 1.5rem; text-align: center; }
.leer-titel { font-family: var(--schrift-display); font-weight: 650; font-size: 1.0625rem; letter-spacing: -.01em; }
.leer-text { color: var(--gedaempft-tief); max-width: 34rem; }
.leer .knopf { margin-top: .75rem; }

/* ---- Schaltflächen ---- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.1rem; border: 1px solid transparent; border-radius: var(--radius-feld);
  font-weight: 650; font-size: .875rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s var(--kurve);
  position: relative;
}
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf:disabled { cursor: not-allowed; opacity: .5; }
.knopf .icon { width: 1.125rem; height: 1.125rem; }
.knopf.icon-rechts .icon { order: 2; }
.knopf-primaer { background: var(--teal); color: #fff; box-shadow: var(--schatten-klein); }
.knopf-primaer:hover:not(:disabled) { background: var(--teal-tief); color: #fff; }
.knopf-sekundaer { background: var(--weiss); border-color: var(--sand-linie); color: var(--tinte); box-shadow: var(--schatten-klein); }
.knopf-sekundaer:hover:not(:disabled) { border-color: #b7c2ba; background: #fbfaf7; color: var(--tinte); }
.knopf-still { background: transparent; color: var(--tinte); }
.knopf-still:hover:not(:disabled) { background: rgba(18, 36, 31, .06); }
.knopf-gefahr { background: var(--gefahr); color: #fff; }
.knopf-gefahr:hover:not(:disabled) { background: var(--gefahr-tief); }
.knopf-gefahr-still { background: transparent; color: var(--gefahr); }
.knopf-gefahr-still:hover:not(:disabled) { background: var(--fehler-flaeche); }
.knopf-klein { min-height: 2.25rem; padding: .35rem .8rem; border-radius: .7rem; font-size: .8125rem; }
.knopf-voll { width: 100%; }
/* Ladezustand: Text bleibt als Platzhalter stehen, darüber dreht ein Ring */
.knopf.laedt { color: transparent !important; }
.knopf.laedt > * { visibility: hidden; }
.knopf.laedt::after {
  content: ""; position: absolute; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: drehen .7s linear infinite;
}
.knopf-sekundaer.laedt::after, .knopf-still.laedt::after, .knopf-gefahr-still.laedt::after { border-color: rgba(18, 36, 31, .2); border-top-color: var(--teal); }

.textlink {
  padding: 0; border: 0; background: none; color: var(--teal-tief); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px;
}
.textlink:hover { color: var(--tanne); }

.symbolknopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 2.25rem; height: 2.25rem; padding: 0 .4rem;
  border: 0; border-radius: var(--radius-m); background: transparent; color: var(--tinte); cursor: pointer; font-size: .8125rem; font-weight: 600;
}
.symbolknopf:hover { background: rgba(18, 36, 31, .07); }
.symbolknopf.mit-text { padding: 0 .6rem; }
.symbolknopf .icon { width: 1.125rem; height: 1.125rem; }

/* ---- Formularelemente ---- */

.feldgruppe { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.beschriftung {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--gedaempft-tief);
}
.feldhinweis { font-size: .8125rem; color: var(--gedaempft-tief); max-width: 68ch; }

.eingabe {
  width: 100%; min-height: 2.75rem; padding: .6rem .85rem; border: 1px solid var(--sand-linie); border-radius: var(--radius-feld);
  background: var(--weiss); color: var(--tinte); caret-color: var(--teal);
  transition: border-color .15s, box-shadow .15s;
}
.eingabe::placeholder { color: #6c7c75; }
.eingabe:hover { border-color: #b7c2ba; }
.eingabe:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-ring); }
.eingabe:disabled { background: #f4f3ee; color: var(--gedaempft-tief); cursor: not-allowed; }
textarea.eingabe { resize: vertical; min-height: 5.5rem; line-height: 1.45; }
select.eingabe { appearance: none; padding-right: 2.25rem; background-image: url("../bild/pfeil-unten.svg"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem; }
.eingabe-code { font-family: var(--schrift-mono); font-size: 1.25rem; letter-spacing: .3em; }
.eingabe-mono { font-family: var(--schrift-mono); font-size: .875rem; }

.iconfeld { position: relative; flex: 1; min-width: 0; }
.iconfeld-icon { position: absolute; left: .85rem; top: 50%; translate: 0 -50%; color: var(--gedaempft); pointer-events: none; }
.iconfeld .eingabe { padding-left: 2.75rem; }
.iconfeld:focus-within .iconfeld-icon { color: var(--teal); }

/* Schalter (Kontrollkästchen mit role="switch") */
.schalter { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: start; padding: .9rem 1rem; border: 1px solid var(--linie); border-radius: var(--radius-feld); background: #fbfaf7; }
.schalter-eingabe {
  appearance: none; width: 2.75rem; height: 1.6rem; margin: .1rem 0 0; border-radius: var(--radius-pille); background: #b4beb7; cursor: pointer;
  position: relative; transition: background-color .18s; flex: none;
}
.schalter-eingabe::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.6rem - 6px); height: calc(1.6rem - 6px); border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(11, 42, 36, .3); transition: transform .2s var(--kurve);
}
.schalter-eingabe:checked { background: var(--teal); }
.schalter-eingabe:checked::after { transform: translateX(1.15rem); }
.schalter-text { display: flex; flex-direction: column; gap: .15rem; cursor: pointer; }
.schalter-text span { color: var(--gedaempft-tief); font-size: .8125rem; }

.formular { display: flex; flex-direction: column; gap: 1.1rem; }
.formular-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.formular-fuss { display: flex; justify-content: flex-end; gap: .75rem; padding-top: .25rem; }
.reihe-eng { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.reihe-eng .eingabe { flex: 1 1 14rem; }
.trenner { height: 1px; background: var(--linie); }

/* ---- Pillen ---- */

.pille {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem .2rem .45rem; border-radius: var(--radius-pille);
  font-size: .75rem; font-weight: 650; line-height: 1.35; white-space: nowrap; border: 1px solid transparent;
}
.pille .icon { width: .875rem; height: .875rem; stroke-width: 2.2; }
.pille:not(:has(.icon)) { padding-left: .6rem; }
.pille-ok { background: var(--ok-flaeche); color: var(--ok); }
.pille-warn { background: var(--warn-flaeche); color: var(--warn); }
.pille-fehler { background: var(--fehler-flaeche); color: var(--fehler); }
.pille-lauf { background: var(--lauf-flaeche); color: var(--lauf); }
.pille-neutral { background: var(--neutral-flaeche); color: var(--neutral); }
.pille-test { background: transparent; border-color: var(--warn-rand); color: var(--warn); }
.pillen { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---- Karten ---- */

.karte { background: var(--weiss); border-radius: var(--radius-karte); box-shadow: var(--schatten-karte); padding: 1.35rem 1.5rem; min-width: 0; }
.karte-liste { padding: 0; overflow: hidden; }
.karten-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1rem; }
.karten-neben { color: var(--gedaempft-tief); font-size: .8125rem; }
.kopf-aktion { display: flex; align-items: center; gap: .75rem; }
.unterblock { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--linie); display: grid; gap: .5rem; }

.stapel { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.stapel-gross { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.raster-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.spalte-schmal { display: flex; flex-direction: column; gap: 1.25rem; max-width: 44rem; }

.zeile { display: flex; gap: .55rem; align-items: flex-start; }
.zeile .icon { margin-top: .08rem; }
.zeile > span, .zeile > div { color: var(--tinte); }
.schlicht { margin-top: .35rem; padding-left: 1.1rem; list-style: disc; color: var(--gedaempft-tief); }

.werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 1rem 1.25rem; }
.werte dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--gedaempft-tief); }
.werte dd { margin-top: .15rem; font-family: var(--schrift-display); font-weight: 650; font-size: 1.25rem; letter-spacing: -.015em; }
.werte .ton-fehler dd { color: var(--fehler); }
.werte-liste { grid-template-columns: 1fr; gap: .45rem; margin-top: .6rem; }
.werte-liste > div { display: flex; justify-content: space-between; gap: 1rem; }
.werte-liste dt { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8125rem; }
.werte-liste dd, .werte-breit dd { margin: 0; font-family: var(--schrift-text); font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.werte-breit { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.werte-breit dd { margin-top: .3rem; }

/* ---- Hinweisflächen ---- */

.hinweis {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; padding: .9rem 1.1rem;
  border-radius: var(--radius-feld); border: 1px solid var(--neutral-rand); background: var(--neutral-flaeche); color: var(--tinte);
}
.hinweis > .icon { margin-top: .1rem; color: var(--neutral); }
.hinweis strong { display: block; font-family: var(--schrift-display); font-size: .9375rem; letter-spacing: -.005em; }
.hinweis p { margin-top: .2rem; max-width: 78ch; }
.hinweis-ok { background: var(--ok-flaeche); border-color: var(--ok-rand); }
.hinweis-ok > .icon { color: var(--ok); }
.hinweis-warn { background: var(--warn-flaeche); border-color: var(--warn-rand); }
.hinweis-warn > .icon { color: var(--warn); }
.hinweis-fehler { background: var(--fehler-flaeche); border-color: var(--fehler-rand); }
.hinweis-fehler > .icon { color: var(--fehler); }
.hinweis-lauf { background: var(--lauf-flaeche); border-color: var(--lauf-rand); }
.hinweis-lauf > .icon { color: var(--lauf); }
.hinweis-konflikt { background: #fff; border: 2px solid var(--gefahr); box-shadow: var(--schatten-karte); }
.hinweis-konflikt > .icon { color: var(--gefahr); }
.hinweis-konflikt:focus { outline: none; }

.karten-meldung { padding: .65rem .85rem; border-radius: var(--radius-m); font-size: .875rem; font-weight: 550; }
.karten-meldung.ton-fehler { background: var(--fehler-flaeche); }
.karten-meldung.ton-warn { background: var(--warn-flaeche); }
.karten-meldung.ton-ok { background: var(--ok-flaeche); }

/* ---- Tabellen ---- */

.tabellen-flaeche { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tabelle th {
  padding: .7rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: var(--gedaempft-tief); background: #faf8f3; border-bottom: 1px solid var(--linie); white-space: nowrap;
}
.tabelle td { padding: .8rem 1rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle th:first-child, .tabelle td:first-child { padding-left: 1.5rem; }
.tabelle th:last-child, .tabelle td:last-child { padding-right: 1.5rem; }
.tabelle .zahl { text-align: right; }
.tabelle .aktion { text-align: right; white-space: nowrap; }
.tabelle tr.klickbar { cursor: pointer; transition: background-color .12s; }
.tabelle tr.klickbar:hover { background: #f8f6f0; }
.tabelle tr.inaktiv td { color: var(--gedaempft-tief); }
.tabelle-dicht td { padding-block: .55rem; font-size: .8125rem; }
.tabelle-schlicht td { padding: .6rem 0; }
.tabelle-schlicht td:first-child, .tabelle-schlicht td:last-child { padding-inline: 0; }
.tabelle-schlicht td:last-child { text-align: right; padding-left: 1rem; }

.person { display: flex; flex-direction: column; gap: .05rem; }
.person-name { font-weight: 650; }
.person-geb { color: var(--gedaempft-tief); font-size: .8125rem; }
.vorgangsnr { font-family: var(--schrift-mono); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
a.vorgangsnr { color: var(--teal-tief); }

.blaettern { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.5rem; border-top: 1px solid var(--linie); }
.blaettern:empty { display: none; }
.blaettern-text, .blaettern-seite { color: var(--gedaempft-tief); font-size: .8125rem; }
.blaettern-knoepfe { display: flex; align-items: center; gap: .75rem; }

.fortschritt { height: 6px; border-radius: var(--radius-pille); background: rgba(18, 36, 31, .1); overflow: hidden; }
.fortschritt span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .35s var(--kurve); }

/* ---- Dialog ---- */

.dialog {
  width: min(30rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--radius-karte);
  background: var(--weiss); color: var(--tinte); box-shadow: var(--schatten-hoch); overflow: hidden;
}
.dialog[open] { display: flex; animation: einblenden .22s var(--kurve); }
.dialog-mittel { width: min(38rem, calc(100vw - 2rem)); }
.dialog-breit { width: min(52rem, calc(100vw - 2rem)); }
.dialog::backdrop { background: rgba(11, 42, 36, .5); backdrop-filter: blur(2px); }
.dialog-form { display: flex; flex-direction: column; min-height: 0; width: 100%; }
.dialog-kopf { display: flex; align-items: flex-start; gap: .75rem; padding: 1.35rem 1.5rem .25rem; }
.dialog-titel { flex: 1; font-size: 1.25rem; letter-spacing: -.02em; padding-top: .1rem; }
.dialog-zeichen { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; flex: none; }
.dialog-zeichen.ton-gefahr, .dialog-zeichen.ton-warnung { background: var(--fehler-flaeche); color: var(--gefahr); }
.dialog-zeichen.ton-info { background: var(--teal-hauch); color: var(--teal-tief); }
.dialog-zu { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin: -.25rem -.5rem 0 0; border: 0; border-radius: var(--radius-m); background: none; color: var(--gedaempft-tief); cursor: pointer; }
.dialog-zu:hover { background: rgba(18, 36, 31, .07); color: var(--tinte); }
.dialog-inhalt { display: flex; flex-direction: column; gap: .85rem; padding: .85rem 1.5rem 1.25rem; overflow-y: auto; }
.dialog-inhalt > p { max-width: 68ch; }
.dialog-neben { color: var(--gedaempft-tief); font-size: .8125rem; }
.dialog-kasten { display: flex; gap: .6rem; padding: .75rem .9rem; border-radius: var(--radius-m); background: var(--teal-hauch); }
.dialog-kasten .icon { color: var(--teal-tief); margin-top: .1rem; }
.dialog-kasten.ton-warn { background: var(--warn-flaeche); color: var(--tinte); }
.dialog-kasten.ton-warn .icon { color: var(--warn); }
.dialog-fehler { padding: .65rem .85rem; border-radius: var(--radius-m); background: var(--fehler-flaeche); color: var(--fehler); font-weight: 600; }
.dialog-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; padding: .9rem 1.5rem; background: #faf8f3; border-top: 1px solid var(--linie); }

.aktionsliste { display: flex; flex-direction: column; }
.aktionszeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--linie); }
.aktionszeile:first-child { border-top: 0; padding-top: .2rem; }
.aktionszeile p { display: flex; flex-direction: column; }
.aktionszeile p span { color: var(--gedaempft-tief); font-size: .8125rem; }

/* ---- Meldungen (nicht blockierend) ---- */

.meldungen { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: flex; flex-direction: column; gap: .6rem; width: min(26rem, calc(100vw - 2rem)); pointer-events: none; }
.meldung {
  pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: start; padding: .8rem .7rem .8rem 1rem;
  border-radius: var(--radius-feld); background: var(--tanne); color: #fff; box-shadow: var(--schatten-hoch); animation: einblenden .25s var(--kurve);
}
.meldung-icon { margin-top: .08rem; color: var(--akzent); }
.meldung-fehler { background: #7f1b14; }
.meldung-fehler .meldung-icon { color: #ffd0ca; }
.meldung-warn .meldung-icon { color: #f6d27a; }
.meldung-info .meldung-icon { color: #a9d8ce; }
.meldung-text { font-weight: 550; overflow-wrap: anywhere; }
.meldung-zu { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 0; border-radius: var(--radius-s); background: none; color: rgba(255, 255, 255, .75); cursor: pointer; }
.meldung-zu:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.meldung-zu .icon { width: 1rem; height: 1rem; }
.meldung-zu:focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
  .raster-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .karte { padding: 1.1rem 1.1rem; border-radius: 1rem; }
  .karte-liste { padding: 0; }
  .meldungen { right: 1rem; bottom: 1rem; }
  .dialog-fuss .knopf { flex: 1 1 auto; }

  /* Tabellen werden zu gestapelten Einträgen mit Beschriftung je Zeile */
  .tabelle-karten thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tabelle-karten, .tabelle-karten tbody, .tabelle-karten tr, .tabelle-karten td { display: block; }
  .tabelle-karten tr { padding: .85rem 1.1rem; border-bottom: 1px solid var(--linie); }
  .tabelle-karten tbody tr:last-child { border-bottom: 0; }
  .tabelle-karten td, .tabelle-karten td:first-child, .tabelle-karten td:last-child {
    display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .25rem 0; border: 0; text-align: left;
  }
  .tabelle-karten td::before { content: attr(data-titel); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--gedaempft-tief); padding-top: .1rem; }
  .tabelle-karten td > * { justify-self: start; }
  .tabelle-karten td:not([data-titel]) { grid-template-columns: minmax(0, 1fr); }
  .tabelle-karten td.aktion { display: flex; justify-content: flex-start; padding-top: .5rem; }
  .tabelle-karten td.aktion::before { content: none; }
  .tabelle-karten td.aktion:empty { display: none; }
  .blaettern { padding-inline: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .start-leiste span, .laufleiste span { animation: none; width: 100%; opacity: .45; }
  .knopf.laedt::after { animation: drehen 1.4s linear infinite !important; animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
}
