/* =========================================================
   CoPost – gemeinsames Basis-Design (Eingabe & Freigabe)
   Freundlich · verspielt · trotzdem Corporate. Eine Akzentfarbe für die Hauptaktion,
   ein Marken-Verlauf (Blau → Violett) für Co und Erfolge, drückbare Knöpfe wie im Spiel.
   ========================================================= */
/* ---------------------------------------------------------------
   LERNEN: CSS-Grundlagen dieser Datei (gilt für Eingabe UND Freigabe – beide laden basis.css zuerst).
     Reihenfolge der Stylesheets im HTML: basis.css → vorschau.css/zeitplan.css … → styles.css der App.
     Was später kommt, gewinnt bei gleicher Spezifität („Kaskade“ = das C in CSS). Die App kann also Basis-Regeln
     gezielt überschreiben.

     @font-face: Die Schrift „Inter“ liegt als eigene Datei auf unserem Server (nicht von Google Fonts):
       + kein Datenabfluss an Google (DSGVO!), funktioniert mit der strengen CSP (font-src 'self')
       font-display: swap → Text erscheint sofort in einer Ersatzschrift und wechselt, wenn Inter geladen ist
       (statt unsichtbarem Text). unicode-range → nur laden, wenn diese Zeichen wirklich vorkommen.
       woff2 = stark komprimiertes Webfont-Format, das alle modernen Browser können.
   --------------------------------------------------------------- */
/* ✔ Best Practice: Schriften selbst hosten (Datenschutz, CSP), font-display: swap, woff2, unicode-range. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("schrift/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------
   LERNEN: Design-Tokens als CSS-Variablen („Custom Properties“). Statt überall #3b5bff zu schreiben, nutzt jede Regel
     var(--accent). Vorteile:
       - Eine Farbe ändern = eine Zeile ändern.
       - Dunkles Design = nur die VARIABLEN neu belegen (siehe unten), keine einzige Regel doppelt.
       - Bedeutung statt Wert: --danger sagt „Fehler“, #d70015 sagt nichts.
     Benennung nach Rolle (surface, ink, line, accent) statt nach Farbe (blau, grau) – so bleibt „--accent“ richtig,
     auch wenn die Marke morgen grün wird. Das ist die Grundidee jedes Design-Systems (Material, Tailwind-Themes …).
   --------------------------------------------------------------- */
/* ✔ Best Practice: Design-Tokens nach Rolle benennen – die Grundlage jedes Design-Systems. */
:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f1f2f9;
  --field-bg: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #3a3a3f;
  --muted: #5f5f64;
  --faint: #6e6e73;
  --line: #e4e6f0;
  --line-strong: #d0d3e2;
  --accent: #2f4ef5;            /* als Schrift auf hellblauen Flächen ≥ 4,5 : 1 */
  --accent-btn: #3b5bff;
  --accent-hover: #2f4ef5;
  --accent-press: #2539c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(59, 91, 255, .09);
  --accent-line: rgba(59, 91, 255, .32);
  --brand: linear-gradient(135deg, #3b5bff 0%, #7c4dff 100%);
  --bubble: #eef1ff;
  --glow-1: rgba(59, 91, 255, .10);
  --glow-2: rgba(124, 77, 255, .08);
  --sun: #ffc23d;
  --danger: #d70015;
  --danger-soft: rgba(215, 0, 21, .07);
  --danger-line: rgba(215, 0, 21, .28);
  --ok: #0f7a44;
  --ok-btn: #0c6e3d;
  --ok-soft: rgba(19, 138, 78, .09);
  --ok-line: rgba(19, 138, 78, .3);
  --warn: #a34900;
  --warn-soft: rgba(230, 120, 0, .09);
  --warn-line: rgba(230, 120, 0, .3);
  --li-text: #0a66c2;   /* LinkedIn-Blau als Schrift/Symbol (ADR 0127) */
  --fill: #e9ebf5;              /* Sekundär-Knöpfe, Segment-Schiene */
  --fill-hover: #dfe2f0;
  --fill-press: #cdd1e3;
  --ok-press: #085a32;
  --shadow: 0 1px 2px rgba(30, 40, 90, .04), 0 6px 20px rgba(30, 40, 90, .05);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .18);
  --topbar-bg: rgba(244, 245, 251, .8);
  --segment-bg: #e9ebf5;
  --segment-thumb: #ffffff;
  --overlay-bg: rgba(255, 255, 255, .92);
  --toast-bg: #1d1d1f;
  --toast-ink: #ffffff;
  --backdrop: rgba(0, 0, 0, .38);
  --focus: 0 0 0 4px rgba(59, 91, 255, .22);
  color-scheme: light;
  --radius: 24px;
  --radius-sm: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --topbar-h: 56px;
}

/* ---------- Dunkles Design: System-Einstellung oder Schalter (data-theme) ---------- */
/* ---------------------------------------------------------------
   LERNEN: Dunkles Design auf zwei Wegen (und beide Blöcke müssen gleich bleiben – Wartungsfalle!):
     1. :root[data-theme="dark"]  → der Nutzer hat im Schalter (theme.js) „dunkel“ gewählt
     2. @media (prefers-color-scheme: dark) mit :root:not([data-theme="light"])
                                   → System steht auf dunkel UND der Nutzer hat nicht ausdrücklich „hell“ gewählt
     Dunkle Farben sind nicht einfach invertiert: Flächen werden HELLER, je „höher“ sie liegen (Karten heller als
     Hintergrund), und Akzentfarben etwas heller, damit sie auf Schwarz genug Kontrast haben.
     ⚠ Duplikat: Ändert man eine Farbe nur in einem der beiden Blöcke, sieht „System dunkel“ anders aus als
       „Schalter dunkel“. ↔ Moderne Lösung: die CSS-Funktion light-dark() (neuere Browser).
   --------------------------------------------------------------- */
/* ≈ Teilweise Best Practice: richtig umgesetzt, aber die doppelte Pflege ist eine bekannte Fehlerquelle. ↔ Mit
       light-dark() oder einem kleinen Build-Schritt (der beide Blöcke aus einer Liste erzeugt) gäbe es nur eine Quelle. */
:root[data-theme="dark"] {
  --bg: #0a0a0c;
  --surface: #1f1f25;
  --surface-2: #27272e;
  --field-bg: #131317;
  --ink: #f5f5f7;
  --ink-2: #dedee3;
  --muted: #a3a3ab;
  --faint: #96969e;
  --line: #35353d;
  --line-strong: #4d4d57;
  --accent: #9dabff;
  --accent-btn: #4a66ff;
  --accent-hover: #5c76ff;
  --accent-press: #2c3fb8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(141, 160, 255, .2);
  --accent-line: rgba(141, 160, 255, .58);
  --brand: linear-gradient(135deg, #4a66ff 0%, #7c4dff 100%);
  --bubble: #323b7c;
  --glow-1: rgba(74, 102, 255, .16);
  --glow-2: rgba(138, 92, 255, .12);
  --sun: #ffc23d;
  --danger: #ff7a73;
  --danger-soft: rgba(255, 105, 97, .12);
  --danger-line: rgba(255, 105, 97, .36);
  --ok: #5be397;
  --ok-btn: #127343;
  --ok-soft: rgba(76, 217, 135, .12);
  --ok-line: rgba(76, 217, 135, .32);
  --warn: #ffb340;
  --warn-soft: rgba(255, 179, 64, .11);
  --warn-line: rgba(255, 179, 64, .32);
  --li-text: #70b5f9;
  --fill: #31313a;
  --fill-hover: #3c3c46;
  --fill-press: #1a1a1d;
  --ok-press: #0f5e36;
  --shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .7);
  --topbar-bg: rgba(11, 11, 13, .78);
  --segment-bg: #23232a;
  --segment-thumb: #4a4a55;
  --overlay-bg: rgba(22, 22, 25, .9);
  --toast-bg: #f5f5f7;
  --toast-ink: #1d1d1f;
  --backdrop: rgba(0, 0, 0, .6);
  --focus: 0 0 0 4px rgba(141, 160, 255, .42);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c;
    --surface: #1f1f25;
    --surface-2: #27272e;
    --field-bg: #131317;
    --ink: #f5f5f7;
    --ink-2: #dedee3;
    --muted: #a3a3ab;
    --faint: #96969e;
    --line: #35353d;
    --line-strong: #4d4d57;
    --accent: #9dabff;
    --accent-btn: #4a66ff;
    --accent-hover: #5c76ff;
    --accent-press: #2c3fb8;
    --accent-ink: #ffffff;
    --accent-soft: rgba(141, 160, 255, .2);
    --accent-line: rgba(141, 160, 255, .58);
    --brand: linear-gradient(135deg, #4a66ff 0%, #7c4dff 100%);
    --bubble: #323b7c;
    --glow-1: rgba(74, 102, 255, .16);
    --glow-2: rgba(138, 92, 255, .12);
    --sun: #ffc23d;
    --danger: #ff7a73;
    --danger-soft: rgba(255, 105, 97, .12);
    --danger-line: rgba(255, 105, 97, .36);
    --ok: #5be397;
    --ok-btn: #127343;
    --ok-soft: rgba(76, 217, 135, .12);
    --ok-line: rgba(76, 217, 135, .32);
    --warn: #ffb340;
    --warn-soft: rgba(255, 179, 64, .11);
    --warn-line: rgba(255, 179, 64, .32);
    --li-text: #70b5f9;
    --fill: #31313a;
    --fill-hover: #3c3c46;
    --fill-press: #1a1a1d;
    --ok-press: #0f5e36;
    --shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .7);
    --topbar-bg: rgba(11, 11, 13, .78);
    --segment-bg: #23232a;
    --segment-thumb: #4a4a55;
    --overlay-bg: rgba(22, 22, 25, .9);
    --toast-bg: #f5f5f7;
    --toast-ink: #1d1d1f;
    --backdrop: rgba(0, 0, 0, .6);
    --focus: 0 0 0 4px rgba(141, 160, 255, .42);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* ---------------------------------------------------------------
   LERNEN: Ein kleines, aber wichtiges Reset: Das HTML-Attribut hidden versteckt Elemente – aber jede CSS-Regel mit
     display: flex/grid würde es überschreiben. !important stellt sicher, dass hidden IMMER versteckt.
     Die Apps blenden sehr viel über el.hidden = true/false ein und aus – darum ist diese Zeile Gold wert.
   --------------------------------------------------------------- */
/* ✔ Best Practice (verbreitete Reset-Regel). Hinweis: !important sonst sparsam einsetzen – hier ist es berechtigt. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* nur für Screenreader */
/* Sprunglink „Zum Inhalt“ (WCAG 2.4.1): unsichtbar, bis er per Tab den Fokus bekommt – schiebt nichts */
.sprung { position: fixed; left: 12px; top: 8px; z-index: 1000; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--surface); font-weight: 650; text-decoration: none;
  transform: translateY(-160%); }
.sprung:focus { transform: none; outline: 3px solid var(--accent); outline-offset: 2px; }
main[tabindex="-1"]:focus { outline: none; }
/* Windows-Kontrastmodus: Hintergrundfarben fallen weg – Gewähltes bekommt einen Rahmen (WCAG 1.4.11) */
@media (forced-colors: active) {
  [role="tab"][aria-selected="true"], [aria-pressed="true"], [aria-checked="true"], [aria-current="page"],
  label:has(input[type="radio"]:checked) { outline: 2px solid Highlight; outline-offset: -2px; }
}
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-feature-settings: "cv11", "ss03";     /* Inter: ruhigeres a, runde Satzzeichen */
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -8%, var(--glow-1), transparent 62%),
    radial-gradient(760px 480px at 100% 4%, var(--glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
svg { display: block; }
::selection { background: var(--accent-soft); }
/* ---------------------------------------------------------------
   LERNEN: :focus-visible statt :focus – der Fokus-Ring erscheint nur bei Tastatur-Bedienung (Tab), nicht bei jedem
     Mausklick. Tastatur-Nutzer brauchen ihn zwingend (Barrierefreiheit, WCAG 2.4.7). Ihn ganz zu entfernen
     (outline: none ohne Ersatz) ist einer der häufigsten Barrierefreiheits-Fehler im Web.
   --------------------------------------------------------------- */
/* ✔ Best Practice (WCAG 2.4.7). box-shadow statt outline folgt den runden Ecken – ⚠ im Windows-Kontrastmodus werden
       Schatten aber ausgeblendet; eine transparente outline zusätzlich würde dort den Ring sichtbar halten. */
:focus-visible { outline: none; box-shadow: var(--focus); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; font-size: .86em; }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 32px);
  background: var(--topbar-bg);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand);
  box-shadow: 0 2px 0 var(--accent-press), 0 4px 12px rgba(59, 91, 255, .3); }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark rect { fill: transparent; }
.brand-mark path { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.brand-name { font-weight: 650; letter-spacing: -.025em; font-size: 1.06rem; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

/* ADR 0129/0131: Schließen (×) und Zurück (‹) – überall derselbe Knopf: gleiche Größe wie der Menü-Knopf, gleiche
   Ecken, gleicher Strich. Oben links heißt immer „eine Ebene zurück“. Mehr in gemeinsam/web/menue.css. */
.fenster-zu, .zurueck-knopf { display: inline-grid; place-items: center; flex: none; width: var(--zu-gross, 40px);
  height: var(--zu-gross, 40px); padding: 0; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; transition: background .15s; }
:is(button.fenster-zu, .zurueck-knopf) svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
:is(.fenster-zu, .zurueck-knopf):hover { background: var(--fill); }
:is(.fenster-zu, .zurueck-knopf):focus-visible { outline: none; box-shadow: var(--focus); }
/* Mit Beschriftung („‹ Übersicht“, „‹ Zurück zu CoPost“), wo kein Titel daneben steht: gleiche Höhe, Ecken und Pfeil */
.zurueck-knopf.mit-text { display: inline-flex; align-items: center; gap: 2px; width: auto; padding: 0 14px 0 8px;
  font-size: .95rem; font-weight: 600; background: var(--fill); }
.zurueck-knopf.mit-text:hover { background: var(--line); }
.fenster-zu[hidden], .zurueck-knopf[hidden] { display: none; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Felder ---------- */
.field { display: grid; gap: 8px; position: relative; border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label { font-weight: 600; font-size: .875rem; color: var(--ink); letter-spacing: -.005em; }
.input, .field input[type="text"], .field input[type="url"], .field textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--field-bg); padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.input:focus, .field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: var(--focus);
}

/* ---------- Avatar ---------- */
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 650; color: #fff;
  background: var(--brand); letter-spacing: .02em;
}

/* ---------- Auswahl-Chips ---------- */
/* ---------------------------------------------------------------
   LERNEN: Muster „verstecktes Input + sichtbares Label“: Die echte Checkbox liegt unsichtbar (opacity: 0) über dem
     hübschen <span>. Der Selektor input:checked + span färbt den Span, wenn die Box angehakt ist – ganz ohne JS.
     „+“ heißt „direkt folgendes Geschwister-Element“. Tastatur und Screenreader bedienen die echte Checkbox.
   --------------------------------------------------------------- */
/* ✔ Best Practice: echte Formular-Elemente behalten, nur die Optik ersetzen (statt div mit Klick-Logik). */
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 99px;
  border: 1px solid var(--line-strong); font-size: .9rem; font-weight: 550; user-select: none; background: var(--surface);
  transition: border-color .15s, background .15s, color .15s;
}
.chip span:hover { border-color: var(--ink-2); }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip input:checked + span::before { content: "✓"; font-weight: 700; }
.chip input:focus-visible + span { box-shadow: var(--focus); }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }

/* ---------- Buttons ---------- */
/* ---------------------------------------------------------------
   LERNEN: Knopf-Hierarchie (siehe CLAUDE.md „Gewichtung“): .btn ist die Basis, Varianten nur ergänzen:
     .btn-primary (EIN Hauptknopf pro Ansicht) · .btn-secondary (Nebenaktion) · .btn-ghost (selten/abbrechen).
     Diese Zusammensetzung aus Basis + Modifikator ist die Idee hinter BEM/Utility-Klassen: kleine, kombinierbare
     Bausteine statt einer eigenen Klasse für jeden Knopf.
     Höhe 48 px: Touch-Ziele sollten mindestens ~44–48 px groß sein (Apple/Google-Richtlinien), sonst trifft man
     am Handy daneben.
   --------------------------------------------------------------- */
/* ✔ Best Practice: Basis-Klasse + Modifikatoren, Touch-Ziele ≥ 44 px. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 650; font-size: .95rem; letter-spacing: -.01em;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s, box-shadow .08s;
  white-space: nowrap; position: relative;
}
/* Wie ein echter Knopf: unten eine Kante, beim Drücken geht er runter */
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
/* Gewichtung: EIN farbiger Hauptknopf pro Ansicht (Verlauf, plastisch) – Nebenknöpfe flach mit Rand – Links ganz leise */
.btn-primary { background: var(--brand); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-press), 0 8px 22px rgba(59, 91, 255, .32); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--accent-press), 0 3px 10px rgba(59, 91, 255, .24); }
.btn-ok { background: var(--ok-btn); color: #fff; box-shadow: 0 4px 0 var(--ok-press), 0 8px 22px rgba(19, 138, 78, .24); }
.btn-ok:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ok:active:not(:disabled) { box-shadow: 0 1px 0 var(--ok-press); }
.btn-secondary { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--fill); color: var(--ink); }
.btn-secondary:active:not(:disabled) { transform: translateY(1px); }
.btn-danger-outline { background: transparent; border-color: var(--danger-line); color: var(--danger); }
.btn-danger-outline:hover:not(:disabled) { background: var(--danger-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--fill); }
.btn.is-busy span::after { content: " …"; }

/* ---------- Dialoge ---------- */
.dialog { border: 0; border-radius: 28px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.dialog-body { padding: 28px; display: grid; gap: 18px; }
.dialog-body h3 { margin: 0; font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--toast-bg); color: var(--toast-ink); padding: 12px 18px; border-radius: 14px; font-size: .9rem; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,.24); transition: opacity .2s, transform .2s; z-index: 50;
  max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); color: #fff; }
/* Meldung mit Knopf (z. B. „Rückgängig“, ADR 0132): dann antippbar */
.toast.hat-aktion { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast.hat-aktion.is-visible { pointer-events: auto; }
.toast:not(.is-visible) .toast-aktion { visibility: hidden; }
.toast-aktion {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; font: inherit; font-weight: 700;
}
.toast-aktion:hover { background: color-mix(in srgb, currentColor 26%, transparent); }
.toast-aktion:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   LERNEN: Barrierefreiheit: Manche Menschen bekommen von Animationen Schwindel oder Übelkeit und stellen im System
     „Bewegung reduzieren“ ein. Diese Media-Query respektiert das und schaltet Animationen ab.
   --------------------------------------------------------------- */
/* ✔ Best Practice (WCAG 2.3.3). ≈ Der Holzhammer „* { animation: none !important }“ ist einfach und sicher; feiner
       wäre, nur große Bewegungen abzuschalten und sanfte Überblendungen zu behalten. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- iPhone/Touch: kein ungewolltes Zoomen (ADR 0036) ----------
   iOS zoomt beim Antippen in jedes Feld mit Schrift unter 16 px hinein und bleibt dann verschoben. Darum auf
   Touch-Geräten alle Eingabefelder mindestens 16 px. Doppeltipp-Zoom aus (touch-action), Pinch-Zoom bleibt erlaubt
   (Barrierefreiheit – nie user-scalable=no). text-size-adjust: keine Schriftvergrößerung beim Drehen. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }   /* Doppeltipp-Zoom überall aus, Pinch bleibt (ADR 0043) */
a, button, label, input, textarea, select, summary, [role="button"], [role="tab"], [role="radio"] { touch-action: manipulation; }
@media (hover: none) and (pointer: coarse), (max-width: 560px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), textarea, select { font-size: max(16px, 1em); }
}

/* ---------- Ruhig wischen (ADR 0048) ----------
   1. Offenes Fenster (<dialog>: Profil, Zuschnitt, Video schneiden, Galerie, Erfolg) = Seite dahinter steht still.
      Ohne das scrollte die Seite beim Wischen im oder neben dem Fenster mit (gemessen: bis 290 px) und man stand nach
      dem Schließen woanders. overflow: hidden am <html> sperrt das Scrollen der Seite (iOS ab 16, Android, Desktop).
   2. overscroll-behavior: contain – erreicht ein Bereich mit eigenem Scrollen (Fenster, Menü, langes Textfeld) sein
      Ende, wird der Schwung NICHT an die Seite weitergegeben („Scroll-Chaining“). */
html:has(dialog[open]) { overflow: hidden; padding-right: var(--scroll-breite, 0px); }
/*  ↑ ADR 0120: Mit dem Sperren verschwindet der Scrollbalken (Windows: ~15 px) – die Seite rutschte nach rechts. Der Rand
    in seiner Breite (gemessen in theme.js, nur wenn die Seite wirklich einen hat) hält alles an seinem Platz. */
dialog { overscroll-behavior: contain; }   /* Textfelder bewusst NICHT: ist ein Feld zu Ende gescrollt, soll der Schwung die Karte weiterbewegen (ADR 0049) */
