/* Impact-Matrix — UNEQ Brand (design.uneq.de) */

/* Schriften vom eigenen Server (public/fonts), damit beim Aufruf keine IP-Adresse an Google geht.
   Montserrat und Mulish (SIL Open Font License 1.1) als variable Schnitte von Google Fonts, je Zeichensatz latin und latin-ext. */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/montserrat-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;
}
@font-face {
  font-family: 'Mulish'; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url('/fonts/mulish-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Mulish'; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url('/fonts/mulish-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;
}

:root {
  color-scheme: dark;
  /* UNEQ tokens */
  --page: #2B2931;            /* UNEQ Ground */
  --surface-1: #353340;       /* ground-soft: cards */
  --surface-2: #1F1D24;       /* ground-deep: inputs / layering */
  --text-primary: #FFFFFF;
  --text-secondary: #C9C5CF;
  --text-muted: #8A8693;
  --grid: rgba(255,255,255,0.08);
  --baseline: #58595B;        /* UNEQ Gray — lines only */
  --border: rgba(255,255,255,0.08);
  --peach: #FAB784;           /* thin lines / outlines ONLY */
  --peach-700: #E89456;
  --accent: #FBB040;          /* UNEQ Orange — fills, focus, highlights */
  --accent-strong: #E89A28;
  --green: #00A79D;
  --font-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Mulish', 'Helvetica Neue', Arial, sans-serif;
  /* Kategorische Punkt-Farben (validierte Datenviz-Palette) */
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #009500; --series-7: #9085e9; --series-8: #e66767;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 13px; }
.sub { color: var(--text-secondary); margin: 4px 0 16px; }
.error { color: #e66767; min-height: 1.2em; font-size: 13px; }

h1, h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; }

.view { min-height: 100vh; }
.center-view { display: flex; align-items: center; justify-content: center; padding: 24px; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
}
.auth-card { width: 400px; text-align: center; }
.lobby-card { width: 540px; max-width: 100%; }
/* Einstellungen: Kopfzeile wie die Verwaltung, Karten darunter mittig gestapelt */
.settings-wrap { display: flex; justify-content: center; padding: 40px 18px 64px; }
.settings-stack { display: flex; flex-direction: column; gap: 16px; width: 540px; max-width: 100%; }
.settings-card > h2:first-child, .settings-section > h2:first-child { margin-top: 0; }
/* Abschnitte innerhalb einer Karte mit Abstand und Trennlinie statt direkt aneinander (Manuel 01.10.2026) */
.settings-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--grid); }
/* Hilfetexte stehen jetzt über den Feldern statt darunter, gekürzt (Manuel 01.10.2026) */
.settings-hint { margin: 0 0 10px; }

.logo {
  font-size: 24px; margin: 0; font-weight: 900;
}
.logo span { color: var(--accent); }
/* Signatur: dünne Peach-Linie unter der Marke */
.auth-card .logo::after, .lobby-head .logo::after {
  content: ""; display: block; width: 56px; height: 2px;
  background: var(--peach); margin: 12px auto 0;
}
.lobby-head .logo::after { margin-left: 0; }

/* Buttons — Markenregeln: Peach nur als Linie, Orange als einzige Füllung */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border); border-left: 5px solid var(--peach);
  border-radius: 2px;
  padding: 10px 16px; cursor: pointer;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: border-color 220ms cubic-bezier(0.22,1,0.36,1);
}
.btn:hover { border-left-color: var(--peach-700); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--page);
  border: 1px solid var(--accent); font-weight: 800;
}
.btn-primary:hover { background: #FFC15C; border-color: #FFC15C; }
/* Ghost ist immer eine Nebenaktion (Abbrechen, Zurück, Abmelden …), nie der Hauptknopf eines Bereichs – deshalb
   normale Schreibweise statt Großbuchstaben, wie .topbar .btn-ghost und .btn-quiet (Manuel 01.10.2026). Bisher
   hatte das nur #vote-cancel einzeln bekommen; jetzt gilt es für jedes „Abbrechen" in jedem Dialog gleichermaßen.
   Form/Größe bleiben wie bei .btn, damit es neben einem .btn-primary in derselben Zeile passt. */
.btn-ghost {
  border: 1px solid transparent; color: var(--text-secondary);
  font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none;
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
/* Ruhiger Knopf für Nebenaktionen außerhalb der Kopfzeile: gleiche Gestalt wie .topbar .btn-ghost (PR #94) –
   normale Schreibweise, kein Peach-Balken, dezenter Rahmen (Manuel 01.10.2026) */
.btn-quiet {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 32px; padding: 0 12px; white-space: nowrap;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
  font: 600 13px/1 var(--font-body); letter-spacing: 0; text-transform: none;
  transition: color 120ms cubic-bezier(0.22,1,0.36,1), background-color 120ms cubic-bezier(0.22,1,0.36,1), border-color 120ms cubic-bezier(0.22,1,0.36,1);
}
.btn-quiet:hover { color: var(--text-primary); background: var(--surface-2); border-color: transparent; }
.btn-quiet:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-quiet.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .btn-quiet { transition: none; } }
.btn-google {
  width: 100%; background: #ffffff; color: #1f1f1f;
  border: 1px solid #ffffff; font-weight: 800; text-decoration: none;
}
.btn-google:hover { background: #f1f1f1; }

input, textarea {
  width: 100%; background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 2px;
  padding: 10px 12px; font-size: 14px; font-family: var(--font-body);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* Rich-Text-Eingabe (Beschreibung) */
.rich-input {
  min-height: 68px; max-height: 220px; overflow-y: auto;
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 2px;
  padding: 10px 12px; font-size: 14px; font-family: var(--font-body);
  line-height: 1.45; text-align: left; cursor: text;
}
.rich-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.rich-input:empty::before {
  content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}
.rich-input ul, .rich-input ol { margin: 2px 0; padding-left: 20px; }
.rich-input li > ul, .rich-input li > ol { margin: 0; }
.rich-input b, .rich-input strong { font-weight: 800; }
label { display: block; text-align: left; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
label input { margin-top: 4px; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
label.inline input { width: 80px; margin: 0; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.row input { flex: 1; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-family: var(--font-display); font-weight: 700; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--grid); }

/* Lobby */
.lobby-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.me-row { display: flex; align-items: center; gap: 8px; }
h2 { font-size: 14px; margin: 20px 0 8px; letter-spacing: 0.08em; }
.ws-list { list-style: none; padding: 0; margin: 0 0 16px; }
.ws-list li { margin-bottom: 6px; }
.ws-list button.ws-item {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--peach);
  border-radius: 2px;
  color: var(--text-primary); padding: 13px 14px; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
}
.ws-list button.ws-item:hover { border-color: var(--peach-700); border-left-color: var(--peach-700); }
/* Persönliche Einträge (Meine Matrix / Mein Kanban): auffällig in Orange */
.ws-list button.ws-item-primary {
  background: var(--accent); border-color: var(--accent); border-left-color: var(--accent);
  color: var(--page); font-weight: 800;
}
.ws-list button.ws-item-primary .muted { color: rgba(43, 41, 49, 0.72); }
.ws-list button.ws-item-primary:hover {
  background: #FFC15C; border-color: #FFC15C; border-left-color: #FFC15C;
}
.lobby-forms { display: grid; gap: 8px; }

/* Workshop-Layout */
/* App-Rahmen (Manuel 01.10.2026): Seitenleiste und Seite teilen sich oben eine 56 px hohe Zeile mit durchgehender Linie */
.topbar {
  display: flex; align-items: center; gap: 14px; min-height: 56px;
  padding: 8px 18px; border-bottom: 1px solid var(--grid); background: var(--surface-1);
}
/* Kopfzeile der Matrix (Manuel 01.10.2026: „sehr voll“): alles in einer Zeile, Titel notfalls gekürzt (voller Name im
   Tooltip), Code einzeilig, Knöpfe ohne Großbuchstaben, Mitglieder als Kreise */
.topbar h1 { flex: 0 1 auto; min-width: 0; font-size: 15px; margin: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar > :not(h1) { flex: none; }
.code-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; white-space: nowrap;
  background: transparent; border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
  color: #A19DAA; font: 600 12px/1 var(--font-body);
  transition: border-color 120ms cubic-bezier(0.22,1,0.36,1), color 120ms cubic-bezier(0.22,1,0.36,1);
}
.code-chip .code-value { font: 600 13px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: 0.06em; color: var(--text-primary); }
.code-chip:hover { border-color: var(--peach); color: var(--text-secondary); }
.code-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar .btn-ghost {
  height: 32px; padding: 0 10px; border-radius: 4px; text-transform: none; letter-spacing: 0;
  font: 600 13px/1 var(--font-body); color: var(--text-secondary);
}
.topbar .btn-ghost:hover { color: var(--text-primary); background: var(--surface-2); border-color: transparent; }
/* Board-Auswahl im Kanban-Kopf wie der Code-Knopf gestaltet, ohne Peach-Balken (Manuel 01.10.2026) */
.topbar .board-select {
  background: transparent; color: #A19DAA; border: 1px solid var(--border); border-radius: 4px;
  height: 32px; padding: 0 10px; font-family: var(--font-body); font-weight: 600;
  font-size: 13px; letter-spacing: 0; max-width: 260px;
}
.topbar .board-select:hover { border-color: var(--peach); color: var(--text-secondary); }
.topbar .board-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Gruppe aus Code-Knopf und Sichtbar-Schalter: bleibt eine Einheit, bricht nicht intern um
   (Manuel 01.10.2026) */
.ws-head-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vt-label-short { display: none; }
.topbar .visible-toggle { font-size: 13px; }
.topbar .visible-toggle input { width: 34px; height: 20px; }
.topbar .visible-toggle input::after { width: 14px; height: 14px; }
.topbar .visible-toggle input:checked::after { transform: translateX(14px); }
.members { position: relative; display: flex; align-items: center; margin-left: auto; }
.member-stack {
  display: flex; align-items: center; padding: 2px 4px; margin: 0 -2px;
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
  transition: background 120ms cubic-bezier(0.22,1,0.36,1);
}
.member-stack:hover, .member-stack[aria-expanded="true"] { background: var(--surface-2); }
.member-stack:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.member-face {
  position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -4px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--surface-1); color: var(--text-secondary);
  font: 700 11px/1 var(--font-display); letter-spacing: 0.02em;
}
.member-face:first-child { margin-left: 0; }
.member-face.master { box-shadow: 0 0 0 1px var(--peach); }
.member-face.online::after {
  content: ''; position: absolute; z-index: 1; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--surface-1);
}
.member-more { color: #A19DAA; font-family: var(--font-body); font-size: 12px; }
.member-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 248px; max-height: 60vh; overflow-y: auto;
  padding: 8px 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(31, 29, 36, 0.45);
}
.member-pop-head { margin: 0; padding: 8px 16px; font: 700 11px/1.4 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #A19DAA; }
.member-pop ul { list-style: none; margin: 0; padding: 0; }
.member-pop li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 14px; color: #A19DAA; }
.member-pop li.online { color: var(--text-primary); }
.member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-role {
  font: 700 10px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--peach); border: 1px solid var(--peach); border-radius: 2px; padding: 3px 6px;
}
.member-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
li.online .member-dot { background: var(--green); }

#view-workshop { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 0; flex: 1; min-height: 0; }
.sidebar { overflow-y: auto; min-height: 0; padding: 14px; border-right: 1px solid var(--grid); }
.chart-area { position: relative; padding: 10px; display: flex; min-height: 0; min-width: 0; }
#chart { flex: 1; min-width: 0; }
#chart svg { width: 100%; height: 100%; display: block; }
/* Leerzustand der persönlichen Matrix im Mein-Bereich, siehe Kommentar in index.html */
.chart-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; text-align: center; padding: 24px;
}
.chart-empty p { margin: 0; color: var(--text-secondary); font-size: 14px; max-width: 280px; }

/* Notiz-Formular */
.add-note { margin-bottom: 14px; padding: 14px 16px; }
.add-note summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}
.add-note form { margin-top: 12px; display: grid; gap: 8px; }
/* Zuerst nur der Titel; beim Hineinklicken klappt der Rest auf (app.js, Manuel 01.10.2026) */
.add-note form:not(.is-open) > :not(#note-title) { display: none; }
.add-note form.is-open > #note-title { margin-bottom: 0; }
.add-note .rich-input { min-height: 56px; }
/* Formatierungs-Hinweis erscheint als Platzhalter, sobald man ins leere Beschreibungsfeld klickt */
.rich-input[data-hint]:focus:empty::before { content: attr(data-hint); font-size: 12px; line-height: 1.5; }
.add-note form:has(#note-values-on:checked) .values-hint { display: none; }
/* Farben in zwei gleich langen Reihen statt drei */
/* Zwei gleich lange Reihen auch im Dialog „Idee bearbeiten“ (Manuel 01.10.2026), wie im Formular „Neue Idee“ */
.add-note .swatches, #edit-colors { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin: 4px 0; }
.add-note .swatch, #edit-colors .swatch { width: 100%; height: auto; aspect-ratio: 1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 24px; height: 24px; border-radius: 4px; cursor: pointer;
  border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.swatch[aria-checked="true"] { border-color: var(--text-primary); outline: 2px solid var(--accent); outline-offset: 1px; }

.form-hint { margin: 0; font-size: 12px; }

/* Notiz-Liste */
.note-group-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 16px 4px 8px;
}
.note-group-row .note-group-label { margin: 0; }
.sort-select {
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 2px;
  font-family: var(--font-body); font-size: 12px; padding: 3px 6px;
}
.sort-select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.note-group-label {
  font-family: var(--font-display); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.18em; font-weight: 700;
  color: var(--text-muted); margin: 16px 4px 8px;
}
/* Post-it-Optik: die Karte trägt die Notiz-Farbe als Fläche */
.note-card {
  border-radius: 2px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(31, 29, 36, 0.35);
}
.note-card.ink-dark { color: #1F1D24; }
.note-card.ink-light { color: #FFFFFF; }
.note-card.dark-fill { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 3px 10px rgba(31, 29, 36, 0.35); }
.note-card.voting { outline: 3px solid var(--text-primary); outline-offset: 1px; }
.note-head { display: flex; align-items: baseline; gap: 8px; }
.note-title { font-weight: 800; font-size: 14px; flex: 1; color: inherit; }
.note-values { font-size: 12px; color: inherit; opacity: 0.8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.note-desc { font-size: 13px; color: inherit; opacity: 0.85; margin: 4px 0 0; }
.note-desc ul, .note-desc ol { margin: 2px 0; padding-left: 18px; }
.note-desc li > ul, .note-desc li > ol { margin: 0; }
/* Lange Kartenbeschreibung: gekürzt, unten ausgeblendet (Maske, damit es auf jeder Kartenfarbe passt) */
.note-desc.clampable { overflow: hidden; transition: max-height 220ms cubic-bezier(0.23, 1, 0.32, 1); }
.note-desc.clamped {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.desc-toggle {
  display: block; margin-top: 4px; padding: 6px 0; background: none; border: 0;
  color: inherit; font: inherit; font-size: 12px; font-weight: 700; opacity: 0.8; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; transition: transform 160ms ease-out;
}
.desc-toggle:hover { opacity: 1; }
.desc-toggle:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .note-desc.clampable { transition: none; } }
.rich-gap { height: 8px; }
.note-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.note-meta .author {
  font-size: 12px; color: inherit; opacity: 0.65; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note-actions { display: flex; gap: 2px; flex: none; }
.note-card.flash { animation: card-flash 1.4s ease; }
@keyframes card-flash {
  0%, 100% { outline: 0 solid transparent; transform: none; }
  15% { outline: 3px solid var(--accent); outline-offset: 2px; transform: scale(1.03); }
  60% { outline: 3px solid var(--accent); outline-offset: 2px; }
}
.icon-btn {
  background: none; border: none; color: inherit; opacity: 0.7; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; padding: 3px 6px; border-radius: 2px;
  display: inline-flex; align-items: center;
}
.icon-btn svg { width: 15px; height: 15px; display: block; }
.icon-btn:hover { opacity: 1; background: rgba(0, 0, 0, 0.18); color: inherit; }
.icon-btn.danger:hover { background: rgba(0, 0, 0, 0.3); }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31, 29, 36, 0.75);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal { width: 480px; max-width: calc(100vw - 32px); max-height: 90vh; overflow-y: auto; }
.modal-kicker {
  font-family: var(--font-display); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--text-muted); margin: 0 0 6px; font-weight: 700;
  padding-left: 14px; position: relative;
}
.modal-kicker::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--peach);
}
.modal h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: 0; }
/* Langer Matrixname brach vorher um (Manuel 01.10.2026): einzeilig gekürzt, voller Name im Tooltip */
#ws-manage-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal form { display: grid; gap: 8px; }

.slider-block { margin: 18px 0; }
.slider-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px;
}
.slider-head output { font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--accent); font-size: 20px; font-weight: 800; }
.slider-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
input[type="range"] { padding: 0; accent-color: var(--accent); height: 28px; }

.master-panel { margin-top: 10px; }
/* Nebenknopf in normaler Schreibweise statt Großbuchstaben (Manuel 01.10.2026) */
#vote-cancel { text-transform: none; letter-spacing: 0.02em; }

.limit-img {
  display: block;
  width: calc(100% + 48px);
  margin: -24px -24px 18px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
}
.limit-caption {
  font-size: 11px; color: var(--text-muted); font-style: italic;
  margin: -10px 0 14px; text-align: center;
}
.limit-message {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 2px; padding: 10px 14px; margin: 12px 0 14px;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.modal-closable { position: relative; }
.modal-x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(31, 29, 36, 0.72); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: rgba(31, 29, 36, 0.92); }
.limit-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.limit-settings-btn {
  background: transparent; cursor: pointer;
  border: 1px dashed var(--baseline); border-radius: 2px;
  font-family: var(--font-body); font-size: 12px; font-weight: 400;
  letter-spacing: 0; text-transform: none;
  color: var(--text-muted); padding: 7px 12px;
}
.limit-settings-btn:hover { color: var(--text-secondary); border-color: var(--text-muted); }

.result-values { display: flex; gap: 32px; margin: 14px 0; }
.stat-label {
  display: block; font-family: var(--font-display); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--text-muted);
}
.stat-value { font-size: 32px; font-weight: 800; }
.vote-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.vote-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--grid); }
.vote-table td { padding: 4px 8px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }

/* Kanban */
.kanban-wrap {
  padding: 14px 18px 18px;
  display: flex; flex-direction: column;
  min-height: calc(100vh - 56px);
}
body.embed .kanban-wrap { min-height: 100vh; }
.kanban-board {
  display: flex; gap: 0; align-items: stretch;
  overflow-x: auto; padding-bottom: 8px; flex: 1;
}
.kanban-col { min-height: 340px; flex: 1 1 256px; min-width: 224px; max-width: 420px; }
.board-select {
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); border-left: 3px solid var(--peach);
  border-radius: 2px; font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.06em; padding: 6px 10px; max-width: 260px;
}
.board-select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* „Für Unternehmen“ beim Anlegen (nur UNEQ, nur bei mehreren Unternehmen) */
.company-pick { margin-top: 10px; }
.company-pick .board-select { display: block; width: 100%; max-width: none; margin-top: 4px; }
/* Phasen direkt am Board: Plus in der Lücke, Grip zum Verschieben */
.phase-gap {
  flex: 0 0 18px; align-self: stretch; position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: flex-basis 150ms ease;
}
.phase-add-btn {
  opacity: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px dashed var(--baseline); background: var(--surface-2);
  color: var(--text-secondary); cursor: pointer; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 150ms ease;
}
.phase-gap:hover .phase-add-btn, .phase-add-btn:focus-visible { opacity: 1; border-color: var(--peach); color: var(--text-primary); }
.phase-gap.editing { flex-basis: 200px; }
.phase-gap.editing input { width: 100%; }
.kanban-board.phase-dragging .phase-gap {
  background: repeating-linear-gradient(135deg, rgba(250,183,132,0.25) 0, rgba(250,183,132,0.25) 1px, transparent 1px, transparent 8px);
}
.kanban-board.phase-dragging .phase-add-btn { opacity: 0; }
.phase-gap.drop-target { background: var(--peach); opacity: 0.6; }
.phase-grip {
  cursor: grab; color: var(--text-muted); font-size: 13px; line-height: 1;
  user-select: none; flex: none; letter-spacing: -1px;
  width: 20px; height: 20px; margin-right: 12px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.phase-grip:hover { background: var(--surface-2); }
.kanban-col-head { align-items: flex-start; }
.kanban-col-label { line-height: 1.35; }
/* Ruhiger Knopf direkt unter der letzten Karte statt Peach-Balken ganz unten in der Spalte (Manuel 01.10.2026) */
.add-card-btn {
  margin-top: 8px; padding: 8px 12px; width: 100%;
  background: transparent; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-secondary); cursor: pointer; text-align: center;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  transition: color 220ms cubic-bezier(0.22,1,0.36,1), border-color 220ms cubic-bezier(0.22,1,0.36,1), background-color 220ms cubic-bezier(0.22,1,0.36,1);
}
.add-card-btn:hover { color: var(--text-primary); background: var(--surface-2); border-color: var(--peach); }
.add-card-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.phase-grip:hover { color: var(--text-primary); }
.phase-grip:active { cursor: grabbing; }
.kanban-col-label {
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.phase-del { font-size: 15px; padding: 0 4px; line-height: 1; }

.btn-danger { border: 1px solid #d03b3b; border-left-width: 1px; color: #e66767; background: transparent; }
.btn-danger:hover { border-color: #e66767; }
.btn-danger.armed { background: #d03b3b; border-color: #d03b3b; color: #fff; }

/* Schlichte Auswahl ohne eigenen Peach-Balken je Zeile (Manuel 01.10.2026) – der Dialog hat schon einen
   Akzent am Rand, in jeder Mitgliederzeile wirkte das unruhig */
.role-select { flex: none !important; font-size: 11px; padding: 4px 8px; border-left-color: var(--border); }
.member-controls { display: inline-flex; align-items: center; gap: 4px; }
.member-row { margin-bottom: 14px; }
.member-row select { flex: 1; }
.modal .row select { flex: 1; min-width: 0; }
.manage-list { list-style: none; padding: 0; margin: 0 0 10px; }
.manage-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--grid); font-size: 14px;
}
.modal-section {
  font-size: 12px; letter-spacing: 0.14em; margin: 26px 0 10px;
  padding-top: 18px; border-top: 1px solid var(--grid);
}
#ws-rename-form p { margin: 6px 0 0; }
#card-edit-form p { margin: 8px 0 0; }
.kanban-col {
  background: rgba(31, 29, 36, 0.45); border: 1px solid var(--border);
  border-radius: 4px; padding: 12px; display: flex; flex-direction: column;
  min-height: 300px;
}
/* Leere Phase niedriger statt in voller Spaltenhöhe (Manuel 01.10.2026: „sehr hoch“ bei neuen Boards). Hat keine
   Phase eine Karte, strecken sich die Spalten sonst trotzdem per Flexbox auf die volle Seite – dann zählt die
   eigene Höhe statt der Höhe der Reihe. Gibt es mindestens eine Karte, bleiben Spalten wie bisher gleich hoch. */
.kanban-col.kanban-col-empty { min-height: 170px; }
.kanban-board.kanban-board-empty .kanban-col { align-self: flex-start; }
.kanban-zone-empty {
  margin: 0; padding: 10px 2px; text-align: center; color: var(--text-muted); font-size: 12px;
}
.kanban-zone:has(.kanban-zone-empty) { display: flex; align-items: center; justify-content: center; min-height: 44px; }
/* Normale Schreibweise statt Großbuchstaben mit weitem Abstand, höchstens zwei Zeilen (Manuel 01.10.2026) */
.kanban-col-head {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0;
  text-transform: none; font-weight: 700; margin: 0 2px 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.kanban-count { color: var(--text-muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.kanban-count.over { color: var(--accent); }
.kanban-sub-head {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700; color: var(--text-muted);
  margin: 14px 2px 8px; padding-top: 10px; border-top: 1px dashed var(--baseline);
}
.btn-icon { width: 14px; height: 14px; flex: none; }

/* Anlege-Maske unter den Spalten: farblich abgesetzt, immer offen */
.kanban-new {
  width: 100%; max-width: 680px; margin: 16px auto 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--peach);
  border-radius: 4px;
  padding: 14px 16px 16px;
  margin-top: 8px;
}
.kanban-new-grid { display: grid; gap: 10px; }
.kanban-new-fields { display: grid; gap: 8px; }
.kanban-new-side {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
}

/* Prominenter Kanban-Button in der Lobby */
.nav-kanban-btn { flex: 1; padding: 12px 16px; font-size: 13px; }
.kanban-zone { min-height: 70px; border-radius: 4px; flex: 0 0 auto; }
.kanban-hold { min-height: 60px; flex: 0 0 auto; }
/* On-Hold klebte vorher am Spaltenende (Manuel 01.10.2026): die Hauptzone wuchs per flex:1 auf die volle
   Spaltenhöhe, dadurch rutschten „+ Neue Karte" und On-Hold weit nach unten, wenn eine Nachbarspalte viele
   Karten hat. Jetzt bleibt die Hauptzone bei ihrer Inhaltsgröße, und ein unsichtbarer Füller am Spaltenende
   nimmt die übrige Höhe – Karten, Knopf und On-Hold-Bereich rücken zusammen direkt untereinander. */
.kanban-col-filler { flex: 1 1 auto; }
.kanban-col.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.kanban-zone.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.kanban-card { cursor: grab; }
.kanban-card.dragging { opacity: 0.5; }
.kanban-card .note-title { font-size: 13px; }
.kanban-source {
  margin-top: 8px; font-size: 11px; opacity: 0.65; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.kanban-source:hover { opacity: 1; }

.nav-row { margin: 4px 0 8px; }
.visible-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12px; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
/* iOS-artiger Schalter: Zustand ist auf einen Blick erkennbar */
.visible-toggle input {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; margin: 0; flex: none;
  border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--baseline); position: relative; cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.visible-toggle input::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted);
  transition: transform 160ms ease, background 160ms ease;
}
.visible-toggle input:checked { background: var(--accent); border-color: var(--accent); }
.visible-toggle input:checked::after { transform: translateX(18px); background: #FFFFFF; }

/* Seitennavigation */
/* Ein- und Ausblenden: offen am rechten Rand der Kopfzeile der Seitenleiste, geschlossen links in der Kopfzeile der
   Seite. Ohne eigenen Kasten, fährt mit der Seitenleiste mit (Manuel 01.10.2026) */
.nav-burger {
  position: fixed; top: 10px; left: 10px; z-index: 210;
  width: 36px; height: 36px; border-radius: 4px; padding: 0;
  background: transparent; color: var(--text-muted); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: left 200ms cubic-bezier(0.22,1,0.36,1), color 120ms ease, background-color 120ms ease;
}
.nav-burger:hover { color: var(--text-primary); background: var(--surface-2); }
.nav-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.nav-open .nav-burger { left: 194px; }   /* 240 Breite − 10 Rand − 36 Knopf */
@media (prefers-reduced-motion: reduce) { .nav-burger { transition: none; } }
.sidenav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  width: 240px; background: var(--surface-1);
  border-right: 1px solid var(--grid);
  padding: 0 12px 12px; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform 200ms cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
}
body.nav-open .sidenav { transform: none; }
body.authed.nav-open .view { margin-left: 240px; transition: margin-left 200ms cubic-bezier(0.22,1,0.36,1); }
body.authed .view { transition: margin-left 200ms cubic-bezier(0.22,1,0.36,1); }
body.authed:not(.nav-open) .topbar { padding-left: 58px; }
body.authed .center-view { padding-top: 60px; }
.sidenav-head {
  flex: none; height: 56px; margin: 0 -12px 12px; padding: 0 56px 0 22px;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--grid);
}
.sidenav-head .logo { font-size: 17px; }
/* Zeichen der Matrix vor der Wortmarke, in der App kleiner als auf den öffentlichen Seiten (Manuel 01.10.2026) */
.sidenav-mark { flex: none; width: 18px; height: 18px; }
.sidenav-mark rect { fill: var(--accent); }
.sidenav-mark .pm-dim { opacity: 0.45; }
/* Hauptlinks: Linien-Symbol und normale Schreibweise; Großbuchstaben bleiben den Abschnittsnamen vorbehalten */
.sidenav-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; color: var(--text-secondary);
  font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  padding: 9px 10px; border-radius: 4px; cursor: pointer; text-align: left;
  transition: color 120ms ease, background-color 120ms ease;
}
.sidenav-link .sn-icon { flex: none; width: 18px; height: 18px; color: var(--text-muted); transition: color 120ms ease; }
.sidenav-link:hover { color: var(--text-primary); background: var(--surface-2); }
.sidenav-link:hover .sn-icon { color: var(--text-primary); }
.sidenav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidenav-link.is-active { color: var(--text-primary); background: var(--surface-2); }
.sidenav-link.is-active .sn-icon { color: var(--accent); }
.sidenav-logout { margin-top: 6px; color: var(--text-muted); }
.sidenav-section {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
  margin: 24px 10px 8px;
}
/* Ohne gestrichelten Rahmen, wie die ruhigen Knöpfe der Kopfzeile – Tooltip bleibt über title (Manuel 01.10.2026) */
.sn-plus {
  width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--border);
  background: none; color: var(--text-muted); cursor: pointer; font-size: 13px; line-height: 1;
  transition: color 120ms cubic-bezier(0.22,1,0.36,1), border-color 120ms cubic-bezier(0.22,1,0.36,1), background-color 120ms cubic-bezier(0.22,1,0.36,1);
}
.sn-plus:hover { color: var(--text-primary); background: var(--surface-2); border-color: transparent; }
.sn-plus:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sn-plus { transition: none; } }
.sidenav-list { list-style: none; padding: 0; margin: 0; }
/* Etwas größer als vorher (9,5 px wirkte „sehr klein“, Manuel 01.10.2026) */
.sidenav-subhead {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
  padding: 7px 10px 4px;
}
.sidenav-subhead::before { content: '▾'; font-size: 8px; transition: transform 140ms ease; }
details:not([open]) > .sidenav-subhead::before { transform: rotate(-90deg); }
.sidenav-subhead::-webkit-details-marker { display: none; }
.sidenav details .sidenav-list { padding-left: 8px; }
.sidenav-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; border-left: 3px solid transparent;
  color: var(--text-secondary); font-family: var(--font-body); font-size: 13px;
  padding: 7px 10px; border-radius: 0 4px 4px 0; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidenav-item:hover { color: var(--text-primary); background: var(--surface-2); }
/* Orange markiert nur den aktiven Eintrag (Manuel 01.10.2026: „primary“ war immer orange, dazu kam die graue
   Markierung – das sah nach zwei aktiven Einträgen aus). „primary“ (eigene Matrix/eigenes Kanban) bleibt fett,
   ohne eigene Farbe; aktiv ist orange, wie bei Mein Bereich/Einstellungen/Verwaltung oben (.sidenav-link.is-active). */
.sidenav-item.primary { font-weight: 700; }
.sidenav-item.active { border-left-color: var(--accent); background: var(--surface-2); color: var(--accent); font-weight: 700; }
.sidenav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--grid); display: flex; flex-direction: column; gap: 2px; }

/* Mein Bereich: Matrix links (Ansicht), Kanban rechts */
.home-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 12px 18px 18px; height: calc(100vh - 56px);
}
.home-panel { display: flex; flex-direction: column; min-height: 0; }
.home-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary);
  padding: 0 0 8px;
}
.home-panel iframe {
  width: 100%; flex: 1; border: 1px solid var(--border);
  border-radius: 4px; background: var(--page);
}
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; height: auto; }
  .home-panel iframe { height: 74vh; }
  /* Matrix zuerst statt Kanban (Manuel 01.10.2026: Kanban stand per order:-1 vorn) – die Matrix ist der
     Hauptarbeitsbereich, am Handy soll sie zuerst zu sehen sein wie die Reihenfolge im Markup es vorsieht */
  /* Sidebar liegt auf Mobile über dem Inhalt statt ihn zu verschieben */
  body.authed.nav-open .view { margin-left: 0; }
}
body.embed .topbar { display: none; }
body.embed #view-workshop { height: 100vh; }
/* Reine Matrix-Ansicht im Mein-Bereich: ohne Seitenleiste/Formular, volle Höhe */
body.embed-view .sidebar { display: none; }
body.embed-view .layout { grid-template-columns: 1fr; height: 100vh; }
body.embed-view .chart-area { height: auto; padding: 6px; }

/* Abhaken & Konfetti */
.check-btn {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent;
  color: inherit; opacity: 0.55; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity 140ms ease, background 140ms ease, transform 140ms ease;
}
.check-btn svg { width: 12px; height: 12px; opacity: 0; transition: opacity 140ms ease; }
.check-btn:hover { opacity: 1; transform: scale(1.08); }
.check-btn:hover svg { opacity: 1; }
.check-btn.is-done {
  background: currentColor; opacity: 0.9; cursor: default;
}
.check-btn.is-done svg { opacity: 1; }
.kanban-card.card-done .note-title { text-decoration: line-through; opacity: 0.75; }
.confetti-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 400;
}

/* Tooltip */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 2px solid var(--peach);
  border-radius: 2px;
  padding: 10px 12px; max-width: 300px; box-shadow: 0 20px 40px rgba(31,29,36,0.5);
}
.tooltip .tt-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.tooltip .tt-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tooltip .tt-desc { font-size: 12px; color: var(--text-secondary); margin: 6px 0; white-space: pre-wrap; }
.tooltip .tt-values { font-size: 12px; color: var(--text-secondary); }
.tooltip .tt-values strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Chart-Text */
.axis-label {
  fill: var(--text-muted); font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.18em; font-weight: 700;
}
/* Etwas größer und besser lesbar als vorher, auch am Handy (Manuel 01.10.2026) – Breitenberechnung in
   app.js (textWidth-Default, Zeile „th") an diese Größe angepasst, sonst stoßen Labels zusammen */
.dot-label { fill: var(--text-secondary); font-family: var(--font-body); font-size: 11px; }
.tick-label { fill: var(--text-muted); font-family: var(--font-body); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.dot-hit { touch-action: none; }
.tooltip .tt-desc ul, .tooltip .tt-desc ol { margin: 2px 0; padding-left: 16px; }
.cluster-count {
  fill: var(--text-muted); font-family: var(--font-body);
  font-size: 10px; font-weight: 800; text-anchor: middle;
}
.dot-hit { cursor: pointer; }
.dot-hit:focus { outline: none; }
.dot-hit:focus + circle, .dot-hit:hover + circle { stroke: var(--text-primary); }

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  #view-workshop { height: auto; overflow: visible; }

  /* Topbar: umbrechen statt quetschen, Titel einzeilig gekürzt */
  .topbar { flex-wrap: wrap; row-gap: 10px; padding: 10px 12px; }
  .topbar h1 {
    flex: 1 1 auto; min-width: 0; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #ws-me, #kanban-me { display: none; }
  .members { margin-left: 0; }
  .board-select { max-width: 46vw; }
  /* Kürzerer Text für den Schalter, damit er mit dem Code-Knopf in eine Zeile passt (Manuel 01.10.2026) */
  .vt-label-full { display: none; }
  .vt-label-short { display: inline; }

  /* Kanban: Spalten untereinander, Lücken immer sichtbar (kein Hover auf Touch) */
  .kanban-board { flex-direction: column; overflow-x: visible; }
  /* Untereinander bleiben auch leere Spalten so breit wie das Board (in „Mein Bereich“ ist das Kanban schmal eingebettet) */
  .kanban-board.kanban-board-empty .kanban-col { align-self: stretch; }
  .kanban-col { flex: none; max-width: none; min-height: 0; }
  .phase-gap { flex-basis: 26px; }
  .phase-add-btn { opacity: 1; }
  .kanban-wrap { padding: 12px; }
  /* Seitenleiste: Overlay-Symbol ebenfalls immer sichtbar (kein Hover auf Touch) */
  .sn-overlay { opacity: 0.6; }

  /* Workshop: Luft zwischen Formular und Matrix */
  .layout { grid-template-columns: 1fr; height: auto; }
  .sidebar {
    border-right: none; border-bottom: 1px solid var(--grid);
    max-height: 45vh; padding-bottom: 22px;
  }
  .chart-area { height: 60vh; padding-top: 18px; }
}

/* Dezente Handlungsanweisungen in den Matrix-Quadranten */
.quad-label {
  fill: var(--text-secondary); opacity: 0.07;
  font-family: var(--font-display); font-weight: 800;
  font-size: 30px; letter-spacing: 0.22em;
  pointer-events: none; dominant-baseline: middle;
}

/* Idee wird gerade auf die Matrix gezogen */
.note-card.dragging { opacity: 0.45; }

/* Overlay-Auswahl in der Matrix-Kopfzeile */
.overlay-select { max-width: 240px; font-weight: 600; letter-spacing: 0.03em; }

/* Overlay-Icon in der Sidebar */
.sidenav-row { display: flex; align-items: center; gap: 2px; }
.sidenav-row .sidenav-item { flex: 1; min-width: 0; }
/* Nur Matrizen haben das Overlay-Symbol, Kanbans keins (Manuel 01.10.2026: dadurch sahen beide Listen
   unterschiedlich aus). In Ruhe zeigt deshalb keine der beiden Listen ein Symbol; bei Matrizen erscheint es beim
   Überfahren oder per Tastatur-Fokus – die Funktion bleibt, nur ständig sichtbar ist sie nicht mehr.
   Seit 02.10.2026 rechts vom Namen statt links davor: links war dafür freier Platz reserviert, die Matrizen standen
   dadurch eingerückter als die Kanbans (Manuel: „zu viel Platz frei“). */
.sn-overlay {
  flex: none; width: 22px; height: 22px; border-radius: 3px;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 120ms cubic-bezier(0.22,1,0.36,1);
}
.sn-overlay svg { width: 13px; height: 13px; }
.sidenav-row:hover .sn-overlay, .sn-overlay.active { opacity: 0.6; }
.sn-overlay:hover { opacity: 1; color: var(--text-primary); background: var(--surface-2); }
.sn-overlay:focus-visible { opacity: 1; color: var(--text-primary); outline: 2px solid var(--accent); outline-offset: 1px; }
.sn-overlay.active { opacity: 1; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .sn-overlay { transition: none; } }

/* Overlay-Ideen in der Liste: nur zur Ansicht */
.note-card.overlay-note { background: transparent; box-shadow: none; }
.note-card.overlay-note .note-title { font-weight: 700; }

/* Abstimmung: Enthaltung & Teilnehmer-Status */
.head-right { display: inline-flex; align-items: center; gap: 10px; }
.abstain-btn {
  background: transparent; border: 1px dashed var(--baseline); border-radius: 2px;
  color: var(--text-muted); cursor: pointer; font-family: var(--font-body);
  font-size: 11px; padding: 3px 8px;
}
.abstain-btn:hover { color: var(--text-secondary); border-color: var(--text-muted); }
/* Noch nicht bewegt = Enthaltung. Hell statt abgedunkelt (Manuel 02.10.2026: wirkte wie ausgeschaltet); orange wird der
   Regler, sobald man ihn bewegt, der Wert oben zeigt bis dahin „–“ */
.slider-block.unset input[type="range"] { accent-color: var(--text-secondary); }
.slider-block.unset .slider-head output { color: var(--text-muted); }
.vote-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.vote-person {
  font-size: 12px; color: var(--text-muted); background: var(--surface-2);
  border-radius: 999px; padding: 3px 10px;
}
.vote-person.voted { color: var(--page); background: var(--accent); font-weight: 700; }

/* Glocke & Benachrichtigungen */
/* Glocke wie der Knopf der Seitenleiste: ohne Kasten, Teil der Kopfzeile (01.10.2026) */
.bell {
  position: fixed; top: 10px; right: 10px; z-index: 210;
  width: 36px; height: 36px; border-radius: 4px; padding: 0;
  background: transparent; color: var(--text-muted);
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 120ms ease, background-color 120ms ease;
}
.bell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bell:hover { color: var(--text-primary); background: var(--surface-2); }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px;
  border-radius: 999px; background: var(--accent); color: var(--page);
  font-size: 10px; font-weight: 800; line-height: 16px; padding: 0 4px;
}
.topbar { padding-right: 58px; }
/* Aufklapper direkt unter der Glocke statt Dialog in der Mitte (Manuel 01.10.2026), gleiche Machart wie
   .member-pop: feste Position, Schatten, Klick daneben und Escape schließen (app.js) */
.notif-pop {
  position: fixed; top: 54px; right: 10px; z-index: 215;
  width: 360px; max-width: calc(100vw - 20px); max-height: 70vh; overflow-y: auto;
  padding: 10px 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 12px 32px rgba(31, 29, 36, 0.5);
}
.notif-pop-head {
  margin: 0; padding: 2px 16px 10px;
  font: 700 11px/1.4 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #A19DAA;
}
.notif-pop .notif-list { padding: 0 16px; }
.notif-pop-foot { padding: 10px 16px 2px; border-top: 1px solid var(--grid); }
.notif-pop .notif-read-all {
  display: inline; width: auto; min-height: auto; margin: 0; padding: 0; text-align: left; font-size: 12px;
}
.notif-list { max-height: 50vh; overflow-y: auto; display: grid; gap: 7px; margin-bottom: 10px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  text-align: left; background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid transparent; border-radius: 4px; padding: 10px 12px;
  color: var(--text-secondary); cursor: pointer; font-family: var(--font-body);
}
.notif-item.unread {
  border-left-color: var(--nf-color, var(--accent));
  color: var(--text-primary);
  background: color-mix(in srgb, var(--nf-color, var(--accent)) 7%, var(--surface-2));
}
.notif-item:hover { border-color: var(--peach-700); border-left-color: var(--nf-color, var(--peach-700)); }
.notif-ico {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--nf-color, var(--accent)) 18%, transparent);
  color: var(--nf-color, var(--accent));
}
.notif-ico svg { width: 15px; height: 15px; }
.notif-body { min-width: 0; }
.notif-head { font-weight: 700; font-size: 13px; }
.notif-snippet { font-size: 12px; opacity: 0.85; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* Kommentare */
.comments-modal { width: 560px; }
.comments-list { max-height: 42vh; overflow-y: auto; display: grid; gap: 10px; margin: 6px 0 12px; }
.comment { background: var(--surface-2); border-radius: 4px; padding: 9px 12px; }
.comment-head { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 4px; }
.comment-author { font-weight: 800; }
.comment-tools { margin-left: auto; display: inline-flex; }
.comment-text { font-size: 14px; white-space: pre-wrap; }
.mention { color: var(--accent); font-weight: 700; }
.mention-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mention-chip {
  background: none; border: 1px dashed var(--baseline); border-radius: 999px;
  color: var(--text-muted); font-size: 12px; padding: 3px 10px; cursor: pointer;
}
.mention-chip:hover { color: var(--accent); border-color: var(--accent); }
.cmt-count { font-size: 10px; font-weight: 800; margin-left: 2px; }

/* @-Autovervollständigung (Slack-Stil) */
.comment-input-wrap { position: relative; }
.mention-dd {
  position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: 0 12px 28px rgba(31,29,36,0.55);
  max-height: 200px; overflow-y: auto; z-index: 60;
}
.mention-dd-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-secondary);
  font-family: var(--font-body); font-size: 14px; padding: 8px 12px; cursor: pointer;
}
.mention-dd-item.sel, .mention-dd-item:hover { background: var(--surface-1); color: var(--text-primary); }

/* Einfüge-Indikator beim Karten-Sortieren */
.drop-indicator {
  height: 3px; border-radius: 2px; background: var(--accent);
  margin: 3px 0; pointer-events: none;
  box-shadow: 0 0 6px rgba(251, 176, 64, 0.6);
}

/* Link-Badges (Slack-Stil) + Überlauf-Schutz */
.link-badge {
  display: inline-block; max-width: 100%; vertical-align: bottom;
  background: rgba(0, 0, 0, 0.16); border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 4px; padding: 0 6px;
  color: inherit; text-decoration: none; font-size: 0.92em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-badge:hover { text-decoration: underline; border-color: currentColor; }
.note-desc, .tt-desc, .comment-text, .note-title { overflow-wrap: anywhere; }
.note-desc div, .tt-desc div { overflow-wrap: anywhere; }

/* App-Dialog */
.dialog-modal { width: 420px; }
.dialog-actions { justify-content: flex-end; }

/* ---------- Anmelden, Einladung, Einladungslink (Block 2.2) ---------- */
.auth-form { display: grid; gap: 8px; text-align: left; margin-top: 4px; }
.auth-form label { margin: 8px 0 0; }
/* 16 px verhindert das automatische Hineinzoomen auf dem iPhone; 44 px hohe Ziele für Touch */
.auth-card input { font-size: 16px; min-height: 44px; }
.btn-block { width: 100%; min-height: 44px; margin-top: 8px; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.btn:focus-visible, .btn-google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-notice {
  text-align: left; margin: 0 0 16px; padding: 10px 12px; font-size: 14px; line-height: 1.5;
  color: var(--text-primary); background: var(--surface-2); border-left: 2px solid var(--accent);
}
.auth-done { text-align: left; margin-top: 8px; }
.auth-done p { margin: 0 0 8px; line-height: 1.5; }
.auth-kicker { text-align: left; margin-top: 24px; }
.auth-title { text-align: left; font-size: 22px; margin: 0 0 8px; letter-spacing: 0; overflow-wrap: anywhere; }
#view-invite .sub, #view-signin .sub { text-align: left; line-height: 1.55; }
@media (max-width: 480px) {
  .center-view { padding: 16px; align-items: flex-start; }
  .auth-card { width: 100%; padding: 20px 16px; }
}
.auth-card .error:empty { min-height: 0; margin: 0; }

/* ---------- Verwaltung (Block 2.3, Aufbau nach der Benutzerverwaltung der DNA-App seit 29.09.) ---------- */
/* Eine Spalte: Überschrift mit Peach-Linie, ein Satz Erklärung, Aktionen untereinander, darunter Gruppen mit
   umrandeten Listen. Zeilen: Symbol · Name und Adresse · Rolle · Status · Menü „⋯“. */
.admin-wrap { padding: 32px 40px 64px; overflow-x: clip; }
.admin-page { max-width: 880px; margin: 0 auto; }
.admin-back { margin: 0 0 16px -10px; }
.admin-title {
  font-size: 20px; line-height: 1.25; letter-spacing: 0; margin: 0;
  padding-left: 14px; border-left: 2px solid var(--peach);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; overflow-wrap: anywhere;
}
.admin-intro { color: var(--text-secondary); line-height: 1.55; margin: 12px 0 0; max-width: 68ch; font-variant-numeric: tabular-nums; }
/* Knöpfe nebeneinander statt zwei großer Knöpfe untereinander (Manuel 01.10.2026) */
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.admin-actions .btn { justify-content: flex-start; min-height: 44px; }
.admin-inline-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-left: -10px; }
.admin-flash { min-height: 1.2em; margin: 16px 0 0; font-size: 13px; color: var(--text-secondary); }
.admin-flash:empty { min-height: 0; margin: 0; }
/* Abschnitte der Verwaltung wie die Hilfe gegliedert (Manuel 05.10.2026): Peach-Linie über die ganze Breite der Seite,
   .admin-wrap schneidet sie am Rand ab */
.admin-group, .admin-crm, .admin-companies { position: relative; margin-top: 40px; padding-top: 32px; }
.admin-group::before, .admin-crm::before, .admin-companies::before {
  content: ''; position: absolute; top: 0; left: -100vw; right: -100vw; height: 1px; background: var(--peach);
}
.admin-crm > .admin-group-title:first-child, .admin-companies > .admin-group-title:first-child { margin-top: 0; }
/* Ältere Browser ohne overflow: clip (Safari vor 16): Linien nur so breit wie der Inhalt, sonst ließe sich zur Seite scrollen */
@supports not (overflow-x: clip) {
  .admin-group::before, .admin-crm::before, .admin-companies::before, .help-topic::before { left: 0; right: 0; }
}
.admin-subgroup { margin-top: 24px; }
.admin-subgroup-head { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; font: 700 15px/1.3 var(--font-display);
  color: var(--text-primary); letter-spacing: 0; text-transform: none; }
.admin-subgroup-head .admin-count { font: 400 14px/1.3 var(--font-body); color: #A19DAA; }
.admin-subgroup-empty { margin: 0; font-size: 14px; color: #A19DAA; }
.admin-group > p { color: var(--text-secondary); font-size: 14px; line-height: 1.55; margin: 8px 0 0; max-width: 72ch; }
.admin-group-head {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font: 700 15px/1.3 var(--font-display); color: var(--text-primary); letter-spacing: 0; text-transform: none;
}
.admin-group-head.is-uneq { color: var(--accent); }
.admin-group-head .admin-count { font: 400 14px/1.3 var(--font-body); color: #A19DAA; }
.admin-group-title {
  font: 700 14px/1.3 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-primary);
  margin: 48px 0 0; padding-left: 14px; border-left: 2px solid var(--peach);
}
.admin-create-link { margin-top: 16px; }
.admin-icon { width: 16px; height: 16px; flex: none; }
.admin-icon svg { display: block; width: 100%; height: 100%; }
.admin-box { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--border); }
.admin-box > li + li { border-top: 1px solid var(--border); }
.admin-item { position: relative; display: flex; align-items: center; gap: 8px 16px; min-height: 60px; padding: 10px 12px 10px 16px; }
.admin-item > .admin-icon { color: var(--text-muted); }
.admin-item > .admin-icon.is-admin { color: var(--accent); }
.admin-item-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.admin-item-name { font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; }
.admin-item-sub { font-size: 13px; color: #A19DAA; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.admin-item.is-off .admin-item-name, .admin-item.is-off .admin-item-sub { opacity: 0.6; }
.admin-tags { display: flex; align-items: center; gap: 12px; flex: none; }
.admin-end { flex: none; width: 36px; display: flex; justify-content: center; font-size: 12px; color: #A19DAA; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px; font: 700 11px/1.4 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary); white-space: nowrap;
}
.badge-admin { border-color: rgba(251, 176, 64, 0.5); color: var(--accent); }
.state { font-size: 12px; color: #A19DAA; white-space: nowrap; }
.state-on { color: var(--green); }
.state-warn { color: var(--accent); }
/* Unternehmen in der Übersicht: ganze Zeile ist ein Knopf */
button.admin-item {
  width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: background 120ms cubic-bezier(0.22,1,0.36,1);
}
button.admin-item:hover { background: var(--surface-1); }
button.admin-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.admin-empty { padding: 16px; color: #A19DAA; font-size: 14px; line-height: 1.5; margin: 0; }
/* Menü „⋯“ je Zeile (eigene Klasse, damit die Symbole auf den Ideenkarten ihre Farbe behalten) */
.row-menu-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--text-muted); cursor: pointer;
  transition: background 120ms cubic-bezier(0.22,1,0.36,1), color 120ms cubic-bezier(0.22,1,0.36,1);
}
.row-menu-btn:hover, .row-menu-btn[aria-expanded="true"] { background: var(--surface-1); color: var(--text-primary); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-menu {
  position: absolute; right: 8px; top: calc(100% - 6px); z-index: 30; min-width: 232px; padding: 4px 0;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.row-menu button {
  display: block; width: 100%; padding: 10px 16px; background: none; border: 0; text-align: left; cursor: pointer;
  font: 400 14px/1.3 var(--font-body); color: var(--text-primary);
}
.row-menu button:hover, .row-menu button:focus-visible { background: var(--surface-2); outline: none; }
.row-menu button.danger { color: #e66767; }
.copy-field { display: flex; gap: 8px; margin: 16px 0 8px; }
.copy-field input { min-width: 0; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 13px; }
.copy-field .btn { flex: none; }
.label-note { color: var(--text-muted); font-weight: 400; }
.admin-form { display: grid; gap: 8px; }
.admin-form label { margin: 8px 0 0; }
.admin-form .board-select { width: 100%; max-width: none; padding: 10px 12px; font-size: 14px; }
.admin-form .form-hint { line-height: 1.5; }
#ai-result .row, .admin-form .row { justify-content: flex-end; }
.backup-watch {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.backup-watch::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.backup-watch.warn { color: var(--accent); font-weight: 700; }
.backup-watch.warn::before { background: var(--accent); }
@media (max-width: 900px) {
  .admin-wrap { padding: 24px 16px 48px; }
  .backup-watch { width: 100%; margin-left: 0; }
  .admin-actions { max-width: none; }
}
@media (max-width: 600px) {
  /* Rolle und Status unter den Namen, das Menü bleibt oben rechts */
  .admin-item { flex-wrap: wrap; align-items: flex-start; padding: 12px 8px 12px 16px; }
  .admin-item > .admin-icon { margin-top: 3px; }
  .admin-item-main { flex: 1 1 0; }
  .admin-tags { order: 3; flex-basis: 100%; padding-left: 32px; flex-wrap: wrap; gap: 8px 12px; }
  .admin-end { width: 44px; }
  .admin-end { margin-top: -6px; }
  .icon-btn { width: 44px; height: 44px; }
}


/* ---------- Feinschliff nach der Durchsicht aller Seiten (28.09.2026) ---------- */
/* Zwischenüberschriften in Dialogen: klein wie vorgesehen (.modal h2 hatte sie auf 19 px gezogen) */
.modal h2.modal-section { font-size: 12px; letter-spacing: 0.14em; margin: 24px 0 10px; }
/* Auswahlfelder in Formularen sehen aus wie die Eingabefelder daneben */
.admin-form .board-select, .company-pick .board-select, .field-select {
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0; text-transform: none;
}
.admin-form .board-select, .company-pick .board-select, .field-select { font-size: 14px; padding: 10px 12px; }
.field-label { display: block; margin: 16px 0 4px; }
.field-select { display: block; width: 100%; max-width: none; margin-bottom: 8px; }
/* Links, die wie Knöpfe aussehen, nicht unterstreichen */
a.btn { text-decoration: none; }
/* Einladungs- und Anmeldeseite: alles linksbündig, nur die Marke mittig */
#view-invite .auth-card, #view-signin .auth-card { text-align: left; }
#view-invite .logo, #view-signin .logo { text-align: center; }
#invite-home, #signin-home { margin-top: 16px; }
/* Namen und Zähler nicht mitten im Wort umbrechen */
#ws-me, #kanban-me, #home-me { white-space: nowrap; }
.note-group-label { white-space: nowrap; }
/* Kanban-Karte: Fußzeile mit Herkunft links und Symbolen rechts */
.kanban-card .note-meta .kanban-source {
  margin-top: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kanban-card .note-title { overflow-wrap: anywhere; }
/* Einstellungen: Datei-Knopf auf Deutsch statt „Choose File“ */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.file-btn { cursor: pointer; }
#limit-image-file:focus-visible + .file-btn, .file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
#settings-form .row, #admin-defaults-form .row { flex-wrap: wrap; }
@media (max-width: 1100px) {
  /* Mein Bereich am Handy: Kanban und Matrix in voller Höhe (flex:1 hatte die Höhe auf ~150 px gedrückt) */
  .home-panel iframe { flex: none; height: 74vh; }
  .home-panel:not(.home-panel-kanban) iframe { height: 64vh; }
}
@media (max-width: 480px) {
  .lobby-card { padding: 20px 16px; }
}

/* Textknopf für Nebenwege, z. B. „Lieber mit Google oder einer anderen Adresse anmelden“ */
.link-btn {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 0; background: none; border: 0;
  color: var(--text-secondary); font: inherit; font-size: 13px; text-align: center; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text-primary); }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Anmeldeseite: Beispiel-Animation rechts (public/intro.js) ---------- */
.auth-layout { display: flex; justify-content: center; width: 100%; }
.intro { display: none; }
@media (min-width: 1000px) {
  .auth-layout {
    display: grid; grid-template-columns: 400px minmax(0, 720px); gap: clamp(40px, 5vw, 80px);
    align-items: center; justify-content: center; max-width: 1240px;
  }
  .intro { display: flex; flex-direction: column; position: relative; height: min(72vh, 620px); }
}
.intro-window {
  flex: 1; margin: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 24px 60px rgba(14, 12, 18, 0.55);
}
.intro-bar {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); font-size: 12px; color: #A19DAA;
}
.intro-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--baseline); }
.intro-bar span { margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro-chart { flex: 1; min-height: 0; min-width: 0; padding: 6px; }
.intro-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.iq-quad {
  fill: var(--text-secondary); opacity: 0.07; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.22em;
  dominant-baseline: middle; transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), fill 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.iq-quad.is-win { opacity: 0.16; fill: var(--peach); }
.iq-axis { fill: #A19DAA; font-family: var(--font-display); letter-spacing: 0.18em; font-weight: 700; }
.iq-tick { fill: #A19DAA; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.iq-label { fill: var(--text-secondary); font-family: var(--font-body); }
.iq-dot { opacity: 0; transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1); }
.iq-dot.on { opacity: 1; }
.intro-notes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; z-index: 3; }
.intro-note {
  --note-w: clamp(130px, 11vw, 176px);
  position: absolute; width: var(--note-w); padding: 10px 12px 16px; box-sizing: border-box;
  background: var(--c); color: var(--ink, #1F1D24); border-radius: 2px;
  font: 700 13px/1.3 var(--font-body); box-shadow: 0 10px 24px rgba(10, 8, 14, 0.45);
  will-change: transform, opacity; transform-origin: 50% 50%;
}
.intro-note span { display: block; }
@media (prefers-reduced-motion: reduce) {
  .iq-dot, .iq-quad { transition: none; }
}

/* ---------- Kopfzeile der öffentlichen Seiten: „IMPACT·MATRIX von UNEQ“ oben links ---------- */
.public-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; padding: 22px clamp(16px, 3vw, 40px);
}
/* Absender „von UNEQ“: dünne Peach-Linie als Trenner, UNEQ-Logo auf Versalhöhe der Wortmarke (Manuel, 29.09.2026) */
.public-brand { display: flex; align-items: center; gap: 16px; color: var(--text-primary); }
.public-bar .logo { font: 900 21px/1 var(--font-display); letter-spacing: -0.01em; text-transform: uppercase; }
.public-by {
  display: inline-flex; align-items: baseline; gap: 9px; padding: 4px 0 4px 16px; border-left: 1px solid var(--peach);
  font: 400 14px/1 var(--font-body); letter-spacing: 0.02em; color: #A19DAA;
}
/* „Consulting GmbH“ klein neben dem Logo, auf derselben Grundlinie (Manuel, 29.09.2026) */
.public-firm { margin-left: 1px; font: 600 10px/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.public-by svg { height: 15px; width: auto; overflow: visible; color: var(--text-primary); }
/* Zeichen der Matrix vor der Wortmarke (wie das Favicon), näher an ihr als der Abstand zu „von UNEQ“ */
.public-mark { flex: none; width: 26px; height: 26px; margin-right: -6px; }
.public-mark rect { fill: var(--accent); }
.public-mark .pm-dim { opacity: 0.45; }
body:not(.authed) .center-view { padding-top: 80px; }
.auth-heading { font-size: 22px; margin: 0 0 4px; letter-spacing: 0; }
@media (max-width: 480px) {
  .public-bar { padding: 16px; }
  .public-bar .logo { font-size: 17px; }
  .public-brand { gap: 12px; }
  .public-by { padding: 3px 0 3px 12px; gap: 7px; font-size: 12px; }
  .public-firm { font-size: 8.5px; letter-spacing: 0.12em; }
  .public-by svg { height: 12px; }
  .public-mark { width: 21px; height: 21px; margin-right: -4px; }
  body:not(.authed) .center-view { padding-top: 64px; }
}
/* Schmale Handys: „Consulting GmbH“ unter „von UNEQ“, sonst ragt die Kopfzeile über den Rand (ab ca. 360 px) */
@media (max-width: 420px) {
  .public-by { width: min-content; flex-wrap: wrap; row-gap: 4px; }
  .public-firm { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 360px) {
  .public-bar .logo { font-size: 15px; }
  .public-mark { width: 18px; height: 18px; }
}

/* ---------- Rechtliches: Fußzeile der öffentlichen Seiten, Links in der Seitenleiste, Seiten Impressum und Datenschutz ---------- */
.legal-foot {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px;
  min-height: 56px; padding: 0 16px; font-size: 13px; color: #A19DAA;
}
.legal-foot a, .sidenav-legal a { color: #A19DAA; text-decoration: none; }
.legal-foot a { padding: 14px 6px; }
.legal-foot a:hover, .sidenav-legal a:hover, .legal-foot a[aria-current] { color: var(--text-primary); }
.legal-foot a:hover, .sidenav-legal a:hover { text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 4px; }
.legal-foot a:focus-visible, .sidenav-legal a:focus-visible, .public-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Anmelden, Einladung, Link aus der Mail: Platz für die Fußzeile unter der vollen Höhe */
#view-auth, #view-invite, #view-signin { min-height: calc(100vh - 56px); }
.sidenav-legal { display: flex; align-items: center; gap: 6px; padding: 12px 10px 0; font-size: 12px; color: #A19DAA; }
.sidenav-legal a { padding: 6px 0; }

body.legal-page { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
.legal-page .public-bar { position: static; }
a.public-brand { text-decoration: none; }
.legal {
  flex: 1; width: 100%; max-width: 720px; margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 40px) 48px;
  font-size: 16px; line-height: 1.6; color: var(--text-secondary);
}
.legal h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; color: var(--text-primary); margin: 24px 0 8px; letter-spacing: 0; }
.legal h1::after { content: ''; display: block; width: 48px; height: 2px; margin-top: 16px; background: var(--peach); }
.legal-stand { font-size: 14px; color: #A19DAA; margin: 0 0 32px; }
.legal h2 {
  font-size: 18px; line-height: 1.3; color: var(--text-primary); letter-spacing: 0.02em;
  margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--border);
}
.legal h3 { font: 700 16px/1.4 var(--font-display); color: var(--text-primary); margin: 24px 0 8px; }
.legal p, .legal ul, .legal address { margin: 0 0 12px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal address { font-style: normal; }
.legal strong { color: var(--text-primary); }
.legal a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal a:hover { color: var(--accent); }
.legal a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Impressum: Bezeichnung links, Angabe rechts; auf dem Handy untereinander */
.legal-facts { display: grid; grid-template-columns: 176px 1fr; margin: 0 0 32px; border-top: 1px solid var(--border); }
.legal-facts dt, .legal-facts dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--border); }
.legal-facts dt { font: 700 12px/1.4 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: #A19DAA; padding-top: 20px; }
.legal-facts address { margin: 0; }
@media (max-width: 560px) {
  .legal-facts { grid-template-columns: 1fr; }
  .legal-facts dt { border-bottom: 0; padding: 16px 0 0; }
  .legal-facts dd { padding-top: 4px; }
}

/* ---------- Dankeseite nach dem Kauf ohne Konto (kauf-danke.html) ----------
   01.10.2026 (Manuel): eine Spalte, Schritte untereinander als senkrechte Schrittfolge (gängiges Muster für
   „So geht es weiter“ auf Bestätigungsseiten), Abstände im 8er-Raster zwischen „gequetscht“ und „zu viel“. */
.thanks { max-width: 760px; padding-bottom: 80px; }
.thanks-head { padding-top: 48px; }
.thanks-eyebrow { margin: 0 0 12px; font: 700 12px/1.4 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: #A19DAA; }
.thanks h1 { margin: 0; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.05; }
.thanks h1::after { margin-top: 24px; }
/* Abschnitte trennt der Abstand, keine Linie über der Überschrift */
.thanks h2 { margin: 64px 0 24px; padding-top: 0; border-top: 0; font-size: 18px; }
.thanks section[aria-labelledby="weiter"] h2 { margin-top: 56px; }
/* Schritte: Nummer im Peach-Rahmen, dünne Linie hinunter zum nächsten Schritt, Titel auf Höhe der Nummer */
.thanks .thanks-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.thanks .thanks-steps li { position: relative; margin: 0; padding: 0 0 32px 56px; counter-increment: step; }
.thanks-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  display: grid; place-items: center; border: 1px solid var(--peach); border-radius: 2px;
  font: 800 14px/1 var(--font-display); color: var(--text-primary);
}
.thanks-steps li::after { content: ''; position: absolute; left: 16px; top: 40px; bottom: 8px; width: 1px; background: var(--border); }
.thanks .thanks-steps li:last-child { padding-bottom: 0; }
.thanks-steps li:last-child::after { display: none; }
.thanks-steps h3 { margin: 4px 0 4px; font-size: 17px; line-height: 24px; }
.thanks-steps p { margin: 0; max-width: 60ch; line-height: 1.65; }
/* Notiz von Max: Karte mit Peach-Akzent links, Foto daneben, auf dem Handy darüber */
.thanks-note {
  display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: center;
  margin: 64px 0 0; padding: 32px; background: var(--surface-1); border-left: 3px solid var(--peach); border-radius: 0 4px 4px 0;
}
.thanks-note picture { display: block; }
.thanks-note picture img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 2px; }
.thanks-note blockquote { margin: 0; }
.thanks-note blockquote p { margin: 0 0 12px; font-size: 17px; line-height: 1.65; color: var(--text-primary); }
.thanks-note blockquote footer { margin-top: 20px; }
.thanks-signature { display: block; width: 152px; height: auto; margin: 0 0 8px -4px; opacity: 0.9; }
.thanks-note cite { display: block; font-style: normal; font-size: 14px; line-height: 1.5; color: #A19DAA; }
.thanks-note cite strong { display: block; font-weight: 600; font-size: 15px; color: var(--text-primary); }
@media (max-width: 560px) {
  .thanks { padding-bottom: 56px; }
  .thanks-head { padding-top: 24px; }
  .thanks h2 { margin: 48px 0 20px; }
  .thanks section[aria-labelledby="weiter"] h2 { margin-top: 40px; }
  .thanks .thanks-steps li { padding-left: 48px; padding-bottom: 28px; }
  .thanks-note { grid-template-columns: 1fr; gap: 20px; margin-top: 48px; padding: 24px; }
  .thanks-note picture img { aspect-ratio: 3 / 2; object-position: 50% 22%; }
}
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--border); }
.legal th { font: 700 12px/1.4 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: #A19DAA; }
.legal td:first-child { color: var(--text-primary); }
/* Handy: jede Tabellenzeile als Block, Spaltenname vor dem Wert */
@media (max-width: 560px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .legal td { padding: 2px 0; border-bottom: 0; }
  .legal td:first-child { font-weight: 700; padding-bottom: 4px; }
  .legal td[data-label]::before { content: attr(data-label) ': '; color: #A19DAA; }
}

/* ---------- Zugang (Block 3.1): Sperrseite, Hinweis während der Karenz, Dialog ---------- */
#view-locked { min-height: calc(100vh - 56px); }
/* Etwas breiter als die Anmeldekarte, der Titel brach sonst um (Manuel 01.10.2026). max-width zusätzlich zur
   mobilen .auth-card-Regel, da diese Regel später in der Kaskade steht und sie sonst am Handy überschreiben würde */
.locked-card { width: 560px; max-width: 100%; text-align: left; padding: 32px; }
.locked-card a { color: var(--text-primary); text-decoration-color: var(--peach); text-underline-offset: 3px; }
/* Neu gegliedert am 02.10.2026 (Manuel: „schöner machen“): Blöcke mit Trennlinien statt einer Folge gleich wichtiger
   Absätze; der Plan als abgesetzte Box mit Preis, Bedingungen und Knopf */
.locked-head { padding-bottom: 24px; }
.locked-head .auth-title { margin: 4px 0 12px; }
.locked-lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--text-primary); }
.locked-row {
  display: grid; grid-template-columns: 24px 1fr; gap: 16px; align-items: start;
  padding: 20px 0; border-top: 1px solid var(--grid);
}
.locked-row p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.locked-row-title { margin: 0; font: 700 15px/1.4 var(--font-display); text-transform: none; letter-spacing: 0; color: var(--text-primary); }
.locked-icon {
  width: 24px; height: 24px; margin-top: 1px; fill: none; stroke: var(--peach);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.locked-plan {
  margin: 4px 0 0; padding: 20px 24px 24px; background: var(--surface-2);
  border: 1px solid var(--border); border-left: 2px solid var(--peach); border-radius: 4px;
}
.locked-plan-title { margin: 0; font: 700 15px/1.4 var(--font-display); text-transform: none; letter-spacing: 0; color: var(--text-secondary); }
.locked-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 8px 0 16px; }
.locked-price-num { font: 800 36px/1 var(--font-display); color: var(--text-primary); letter-spacing: -0.01em; }
.locked-price-unit { font-size: 14px; color: var(--text-secondary); }
.locked-terms { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--grid); }
.locked-terms li {
  position: relative; margin: 0 0 10px; padding-left: 26px; font-size: 14px; line-height: 1.5; color: var(--text-secondary);
}
/* Haken als Linie (Icons nur als Strich, Peach nur als Linie) */
.locked-terms li::before {
  content: ""; position: absolute; left: 3px; top: 4px; width: 11px; height: 6px;
  border-left: 1.5px solid var(--peach); border-bottom: 1.5px solid var(--peach); transform: rotate(-45deg);
}
.locked-fine { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: #A19DAA; }
.locked-plan .btn-block { margin-top: 20px; }
.locked-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 24px; }
.locked-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--grid);
}
.locked-foot p { margin: 0; font-size: 13px; color: #A19DAA; }
/* „Abmelden“ als ruhiger Textlink statt Knopf (Manuel 01.10.2026) */
.locked-logout {
  display: inline-block; width: auto; min-height: auto; margin: 0; padding: 4px 0;
  text-align: left; font-size: 13px; color: var(--text-muted);
  text-decoration-color: var(--peach); text-underline-offset: 3px;
}
.locked-logout:hover { color: var(--text-secondary); }
@media (max-width: 560px) {
  .locked-card { padding: 24px 16px; }
  .locked-plan { padding: 16px 16px 20px; }
  .locked-actions .btn { flex: 1 1 auto; }
}
.access-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px;
  padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--grid);
  border-left: 3px solid var(--accent); font-size: 14px; line-height: 1.45; color: var(--text-primary);
}
.access-banner a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.access-banner a:hover { text-decoration: underline; }
.access-banner a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.authed.nav-open .access-banner { margin-left: 240px; }
body.authed:not(.nav-open) .access-banner { padding-left: 58px; }
@media (max-width: 1100px) { body.authed.nav-open .access-banner { margin-left: 0; } }
.check-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
#af-until:disabled { opacity: 0.45; }
/* Anmeldeseite: Hinweis auf die Angebotsseite (seit 29.09.2026) */
.auth-offer { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: #A19DAA; }
.auth-offer a { color: var(--text-primary); text-decoration-color: var(--peach); text-underline-offset: 3px; }
.auth-offer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.btn { text-decoration: none; }
/* CRM-Abgleich unter der Unternehmensliste (docs/crm-anbindung.md) */
/* Abschnitt „Zugang aus dem CRM“ über der Liste der Unternehmen (Manuel 02.10.2026) */
.admin-crm-state { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: #A19DAA; }
.admin-crm-report { margin: 12px 0 0; padding: 12px 16px 12px 32px; border: 1px solid var(--border); border-left: 2px solid var(--peach); color: var(--text-secondary); line-height: 1.5; }
/* Programme festlegen (CRM-Abgleich) */
.cpm-status { min-height: 1.2em; margin: 0 0 8px; font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.cpm-group { margin: 16px 0 0; font: 700 11px/1.3 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #A19DAA; }
.cpm-box { margin-top: 8px; }
.cpm-item { min-height: 52px; padding: 8px 16px; }
.cpm-item .visible-toggle { flex: none; }
/* Hinweis „AVV fehlt“ aus dem CRM-Abgleich (nur UNEQ-Admins) */
.admin-notice { margin: 24px 0 0; padding: 14px 18px; border: 1px solid rgba(251, 176, 64, 0.35); border-left: 3px solid var(--accent); background: var(--surface-1); font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.admin-notice p { margin: 0; }
.admin-notice strong, .admin-avv strong { color: var(--accent); }
.admin-notice ul { margin: 8px 0 0; padding-left: 20px; }
.admin-notice .link-btn { display: inline; width: auto; text-align: left; background: none; border: 0; padding: 2px 0; font: inherit; color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 3px; cursor: pointer; }
.admin-notice .link-btn:hover { color: var(--accent); }
.admin-avv { margin: 8px 0 0; font-size: 14px; color: var(--text-secondary); }
/* Zahlungsstand für UNEQ-Admins: Link zum Stripe-Kunden */
.admin-stripe { margin: 8px 0 0; font-size: 14px; color: #A19DAA; }
.admin-stripe a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); text-decoration: underline;
  text-decoration-color: var(--peach); text-underline-offset: 3px; }
.admin-stripe a:hover { color: var(--accent); }
.admin-stripe .admin-icon svg { width: 16px; height: 16px; }
a.row-menu-btn { text-decoration: none; }
.badge-warn { border-color: rgba(251, 176, 64, 0.5); color: var(--accent); }

/* Plan und Bezahlung (Block 3.4): Knöpfe in der Hinweisleiste, Hinweis vor dem Ende, Kurzfassung auf der Sperrseite */
.access-banner.is-urgent { border-left-width: 5px; background: var(--surface-1); }
.access-banner .banner-action {
  background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; color: var(--accent);
  cursor: pointer; white-space: nowrap;
}
.access-banner .banner-action:hover { text-decoration: underline; }
.access-banner .banner-action:focus-visible, .access-banner .banner-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.access-banner .banner-action:disabled { opacity: .6; cursor: default; text-decoration: none; }
.access-banner .banner-hint { color: var(--text-secondary); }
.access-banner .banner-close {
  margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 4px; background: none;
  color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer;
}
.access-banner .banner-close:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.admin-billing { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-billing-note { margin: 8px 0 0; font-size: 14px; color: var(--text-secondary); max-width: 64ch; }
/* Die Glocke steht fest oben rechts: Platz wie links für den Menüknopf */
body.authed .access-banner { padding-right: 58px; }

/* Nutzungsbedingungen und AVV: nummerierte Absätze */
.legal ol { padding-left: 22px; }
.legal ol li { margin: 0 0 8px; }
/* Lange Einwort-Überschriften (Nutzungsbedingungen, Datenschutzhinweise) passen am Handy nicht in 28 px */
.legal h1 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) { .legal h1 { font-size: 22px; } }

/* ---------- Geführte Einführung (public/tour.js, Manuel 29.09./01.10.2026) ----------
   Rahmen in Peach um das Ziel, der Rest der Seite abgedunkelt; Sprechblase mit Peach-Akzent links wie die Karten */
#tour-root { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
/* Hinweis an einem Punkt auch während der Einführung über der Abdunklung (Schritt „Jeder Punkt ist eine Idee“) */
body:has(#tour-root) .tooltip { z-index: 450; }
.tour-frame {
  position: fixed; border: 2px solid var(--peach); border-radius: 4px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(31, 29, 36, 0.66);
  transition: left 220ms cubic-bezier(0.22,1,0.36,1), top 220ms cubic-bezier(0.22,1,0.36,1),
    width 220ms cubic-bezier(0.22,1,0.36,1), height 220ms cubic-bezier(0.22,1,0.36,1);
}
.tour-frame.is-empty { border-color: transparent; }
.tour-block { position: fixed; pointer-events: auto; }
/* Spur „vorher → jetzt“, wenn sich Werte ändern (Einführung, Manuel 06.10.2026) */
.tour-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; pointer-events: none; }
.tour-trail line { stroke: var(--peach); stroke-width: 1.5; stroke-dasharray: 4 4; }
.tour-trail-ghost { fill: none; stroke: var(--peach); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tour-trail-mover { fill: var(--accent); }
.tour-pop {
  position: fixed; width: min(340px, calc(100vw - 32px)); pointer-events: auto;
  padding: 20px 20px 16px; background: var(--surface-1); border: 1px solid var(--border);
  border-left: 3px solid var(--peach); border-radius: 0 4px 4px 0; box-shadow: 0 12px 32px rgba(31, 29, 36, 0.5);
  animation: tour-in 160ms cubic-bezier(0.22,1,0.36,1);
}
.tour-pop:focus { outline: none; }
.tour-pop.is-center { width: min(420px, calc(100vw - 32px)); padding: 28px 28px 24px; }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } }
.tour-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.tour-head .tour-count { margin: 0; }
.tour-head .tour-back { display: inline-block; width: auto; min-height: 0; margin: 0; padding: 4px 0; font-size: 13px; }
.tour-count { margin: 0 0 8px; font: 700 11px/1.4 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #A19DAA; }
.tour-title { margin: 0 0 8px; font: 700 17px/1.3 var(--font-display); text-transform: none; letter-spacing: 0; color: var(--text-primary); }
.tour-pop.is-center .tour-title { font-size: 20px; }
.tour-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.tour-text p { margin: 0; }
.tour-text p + p { margin-top: 10px; }
.tour-wait { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: #A19DAA; }
.tour-notice { margin: 12px 0 0; padding-left: 10px; border-left: 2px solid var(--peach); font-size: 14px; line-height: 1.5; color: var(--text-primary); }
.tour-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 20px; }
.tour-actions .btn { min-height: 40px; }
.tour-actions .link-btn { display: inline-block; width: auto; min-height: 40px; margin: 0 0 0 auto; padding: 8px 2px; }
/* „Für mich erledigen“: leise Textverknüpfung links, „Später weitermachen“ bleibt rechts */
.tour-actions .tour-do { margin: 0; }
.tour-pop.is-center .tour-actions { justify-content: center; }
.tour-pop.is-center .tour-actions .link-btn { flex-basis: 100%; margin: 0; }
/* Auswahl der Themen (Manuel 01.10.2026): Karten untereinander, Peach-Linie links beim Überfahren, Stand rechts */
.tour-pop.is-chooser { width: min(520px, calc(100vw - 32px)); }
.tour-topics { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.tour-topic {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; padding: 14px 16px; text-align: left;
  background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); border-left: 3px solid transparent;
  border-radius: 4px; cursor: pointer; font: inherit;
  transition: border-color 120ms cubic-bezier(0.22,1,0.36,1), background-color 120ms cubic-bezier(0.22,1,0.36,1);
}
.tour-topic:hover { border-left-color: var(--peach); background: var(--surface-1); }
.tour-topic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour-topic-title { grid-column: 1; font: 700 15px/1.3 var(--font-display); }
.tour-topic-text { grid-column: 1; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.tour-topic-state { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: #A19DAA; white-space: nowrap; }
.tour-topic-state.is-done { color: var(--green); }
.tour-pop.is-chooser .tour-actions { justify-content: space-between; }
.tour-pop.is-chooser .tour-actions .link-btn { flex-basis: auto; }
@media (prefers-reduced-motion: reduce) { .tour-topic { transition: none; } }
/* Pfeil rechts an Karten ohne Stand: Ein Klick startet das Thema */
.tour-topic-go {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; color: var(--text-muted);
  transition: transform 120ms cubic-bezier(0.22,1,0.36,1), color 120ms cubic-bezier(0.22,1,0.36,1);
}
.tour-topic:hover .tour-topic-go, .tour-topic:focus-visible .tour-topic-go { color: var(--peach); transform: translateX(2px); }
/* Begrüßung beim ersten Besuch (Manuel 02.10.2026: „gedrungen“): mehr Luft um Überschrift und Absatz, größere Schrift,
   kleine Zeile über den Themen, unten Hinweis und „Überspringen“ in einer Zeile.
   .is-center.is-welcome, damit die allgemeinen Handy-Regeln für .tour-pop.is-center weiter unten nicht greifen */
.tour-pop.is-center.is-welcome { width: min(600px, calc(100vw - 32px)); padding: 48px 48px 32px; }
.tour-pop.is-center.is-welcome .tour-title { margin: 0 0 16px; font-size: 28px; line-height: 1.2; }
.tour-pop.is-center.is-welcome .tour-text { margin: 0 0 40px; font-size: 16px; line-height: 1.7; max-width: 52ch; }
.tour-topics-label { margin: 0 0 12px; font: 700 12px/1.4 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: #A19DAA; }
.tour-pop.is-center.is-welcome .tour-topics { margin: 0; gap: 12px; }
.tour-pop.is-center.is-welcome .tour-topic { padding: 20px 20px 20px 24px; gap: 6px 16px; }
.tour-pop.is-center.is-welcome .tour-topic-title { font-size: 16px; }
.tour-pop.is-center.is-welcome .tour-topic-text { font-size: 14px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
.tour-foot .tour-hint-note { flex: 1 1 auto; min-width: 0; margin: 0; }
.tour-foot .link-btn { flex: none; width: auto; min-height: 40px; margin: 0; padding: 8px 2px; white-space: nowrap; }
@media (max-width: 600px) {
  .tour-pop.is-center.is-welcome { padding: 28px 22px 20px; }
  .tour-pop.is-center.is-welcome .tour-title { margin-bottom: 12px; font-size: 22px; }
  .tour-pop.is-center.is-welcome .tour-text { margin-bottom: 24px; font-size: 15px; line-height: 1.6; }
  .tour-pop.is-center.is-welcome .tour-topic { padding: 16px 16px 16px 18px; }
  .tour-foot { flex-direction: column-reverse; align-items: flex-start; gap: 4px; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .tour-topic-go { transition: none; } }
/* Hinweis in „Mein Bereich“ für alle, die die Einführung noch nicht abgeschlossen oder ausgeblendet haben */
.tour-hint {
  position: fixed; right: 24px; bottom: 24px; z-index: 150; width: min(340px, calc(100vw - 32px));
  padding: 20px 20px 16px; background: var(--surface-1); border: 1px solid var(--border);
  border-left: 3px solid var(--peach); border-radius: 0 4px 4px 0; box-shadow: 0 12px 32px rgba(31, 29, 36, 0.45);
  animation: tour-in 220ms cubic-bezier(0.22,1,0.36,1);
}
.tour-hint-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-primary); }
.tour-hint-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #A19DAA; }
.tour-hint .tour-actions { margin-top: 16px; }
/* Handy: kompakt, damit der Hinweis nicht den halben Bildschirm bedeckt */
@media (max-width: 600px) {
  .tour-hint { right: 16px; bottom: 16px; padding: 14px 16px 12px; }
  .tour-hint-text { font-size: 14px; line-height: 1.5; }
  .tour-hint .tour-actions { margin-top: 12px; }
  .tour-hint .tour-hint-note { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tour-hint { animation: none; } }
/* Handy: kompakter, damit neben hohen Dialogen Platz bleibt */
@media (max-width: 600px) {
  .tour-pop, .tour-pop.is-center { width: auto; right: 16px; padding: 14px 16px 12px; }
  .tour-count { margin-bottom: 4px; }
  .tour-title, .tour-pop.is-center .tour-title { font-size: 16px; margin-bottom: 4px; }
  .tour-text { font-size: 14px; line-height: 1.5; }
  .tour-actions { margin-top: 12px; }
  .tour-actions .btn { min-height: 36px; padding: 8px 14px; }
  .tour-pop.is-compact .tour-text, .tour-pop.is-compact .tour-count { display: none; }
}
#chart-empty-tour { font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .tour-frame { transition: none; }
  .tour-pop { animation: none; }
}

/* Erklärung an Symbol-Knöpfen (app.js, Manuel 01.10.2026): dunkle Fläche, Peach-Linie oben, über dem Knopf */
.ui-tip {
  position: fixed; z-index: 450; max-width: 260px; padding: 6px 10px; pointer-events: none;
  background: var(--page); color: var(--text-primary); border: 1px solid var(--border); border-top: 2px solid var(--peach);
  border-radius: 4px; box-shadow: 0 6px 18px rgba(31, 29, 36, 0.45);
  font: 600 12px/1.4 var(--font-body); opacity: 0; transform: translateY(2px);
  transition: opacity 120ms cubic-bezier(0.22,1,0.36,1), transform 120ms cubic-bezier(0.22,1,0.36,1);
}
.ui-tip.is-on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ui-tip { transition: none; transform: none; } }

/* ---------- Hilfe (Ansicht #hilfe, Inhalt aus views/hilfe.html) ---------- */
/* Neu gestaltet am 02.10.2026 (Manuel: „richtig geil aussehen und anfühlen“): Die Seitenleiste zeigt in der Hilfe das
   Inhaltsverzeichnis mit Suche (body.help-mode), der Inhalt bekommt die volle Breite. Text höchstens 70 Zeichen breit,
   Bilder und Videos dürfen die ganze Spalte nutzen. Peach nur als Linie, Orange nur für Markierungen. */

/* Seitenleiste im Hilfe-Modus */
.help-nav { display: none; }
body.help-mode .sidenav > :not(.sidenav-head):not(.help-nav) { display: none !important; }
body.help-mode .help-nav { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.help-back {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; margin: 0 0 8px;
  background: none; border: 0; border-radius: 4px; cursor: pointer; text-align: left;
  color: var(--text-secondary); font: 600 13px/1.35 var(--font-display);
  transition: color 120ms ease, background-color 120ms ease;
}
.help-back .sn-icon { width: 18px; height: 18px; flex: none; color: var(--accent); }
.help-back:hover { color: var(--text-primary); background: var(--surface-2); }
.help-back:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.help-search { position: relative; margin: 0 0 16px; }
.help-search input {
  width: 100%; height: 40px; padding: 0 34px 0 36px; border-radius: 4px;
  background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border);
  font: 14px var(--font-body);
}
.help-search input::placeholder { color: #A19DAA; }
.help-search input:focus { outline: none; border-color: var(--peach); }
.help-search input::-webkit-search-cancel-button { display: none; }
.help-search-icon { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; color: #A19DAA; pointer-events: none; }
.help-search-key {
  position: absolute; right: 9px; top: 10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 2px;
  border: 1px solid var(--border); color: #A19DAA; font: 600 11px/18px var(--font-body); text-align: center;
}
.help-search input:focus + .help-search-key, .help-search input:not(:placeholder-shown) + .help-search-key { display: none; }

/* Inhaltsverzeichnis: Kapitel und ihre Unterpunkte; das aktuelle Kapitel klappt seine Unterpunkte auf */
.htoc, .htoc-sub { list-style: none; margin: 0; padding: 0; }
.htoc-ch { margin: 0 0 2px; }
.htoc-link {
  display: block; padding: 6px 10px; border-radius: 4px; border-left: 2px solid transparent;
  color: var(--text-secondary); text-decoration: none; font: 13px/1.4 var(--font-body);
}
.htoc-chapter { font: 600 13px/1.4 var(--font-display); color: var(--text-primary); }
.htoc-link:hover { background: var(--surface-2); color: var(--text-primary); }
.htoc-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.htoc-link[aria-current] { color: var(--text-primary); border-left-color: var(--peach); background: var(--surface-2); border-radius: 0 4px 4px 0; }
.htoc-sub { display: none; margin: 2px 0 8px 10px; padding-left: 8px; border-left: 1px solid var(--grid); }
.htoc-sub .htoc-link { padding: 5px 10px; font-size: 13px; color: #A19DAA; }
/* Nummern in der Seitenleiste, dicht vor dem Text (Manuel 06.10.2026) */
.htoc-link { display: flex; gap: 6px; align-items: baseline; }
.htoc-num { flex: none; min-width: 1.5em; font-variant-numeric: tabular-nums; color: #A19DAA; }
.htoc-sub .htoc-num { min-width: 2.4em; }
.htoc-chapter .htoc-num { color: var(--accent); }
.htoc-text { min-width: 0; }
.htoc-sub .htoc-link:hover, .htoc-sub .htoc-link[aria-current] { color: var(--text-primary); }
.htoc-ch.is-open .htoc-sub { display: block; }
/* Kapitelzeile: Name links, Pfeil zum Auf- und Zuklappen rechts (Manuel 05.10.2026) */
.htoc-row { display: flex; align-items: center; gap: 2px; }
.htoc-row .htoc-link { flex: 1; min-width: 0; }
.htoc-toggle {
  flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #A19DAA;
}
.htoc-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1); }
.htoc-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.htoc-toggle:hover { color: var(--text-primary); background: var(--surface-2); }
.htoc-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .htoc-toggle svg { transition: none; } }

/* Vorschläge der Suche: unter dem Suchfeld, breiter als die Seitenleiste */
.help-suggest {
  position: fixed; z-index: 260; width: min(460px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--surface-1);
  border: 1px solid var(--border); border-top: 2px solid var(--peach); border-radius: 4px;
  box-shadow: 0 12px 32px rgba(31, 29, 36, 0.55);
}
.help-hit { display: grid; gap: 2px; padding: 10px 12px; border-radius: 4px; cursor: pointer; }
.help-hit[aria-selected="true"] { background: var(--surface-2); }
.help-hit-title { font: 700 14px/1.35 var(--font-display); color: var(--text-primary); }
.help-hit-chapter { font-size: 12px; color: #A19DAA; }
.help-hit-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.help-hit mark { background: none; color: var(--accent); font-weight: 700; }
.help-hit-none { padding: 12px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

/* Knopf „Inhalt und Suche“: nur, wenn die Seitenleiste zu ist */
.help-open-nav { margin-left: auto; }
body.nav-open .help-open-nav { display: none; }

/* Inhalt */
.help-wrap { flex: 1; width: 100%; overflow-x: clip; }
.help { width: 100%; max-width: 1200px; margin: 0 auto; padding: 56px clamp(20px, 5vw, 64px) 120px; color: var(--text-secondary); container-type: inline-size; }
/* Ganzes Inhaltsverzeichnis oben (Manuel 06.10.2026): untereinander und nummeriert (1, 1.1, 1.2, 2 …), Kapitel durch
   Linien getrennt. nav.help-toc im Selektor, damit die Lesebreite für Listen weiter unten (.help ol:not(…)) hier nicht greift */
.help .help-toc { margin: 40px 0 0; max-width: 760px; }
.help .help-toc .help-toc-title { margin: 0 0 12px; font: 700 13px/1.3 var(--font-display); letter-spacing: 0.14em;
  text-transform: uppercase; color: #A19DAA; }
.help nav.help-toc ol.hov { list-style: none; max-width: none; margin: 0; padding: 0; border-top: 1px solid var(--grid); }
.help .help-toc .hov-ch { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--grid); }
.help .help-toc .hov-row { display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: 4px; align-items: baseline;
  text-decoration: none; color: var(--text-secondary); }
.help .help-toc .hov-num { font-variant-numeric: tabular-nums; color: #A19DAA; }
.help .help-toc .hov-chapter { font: 700 16px/1.4 var(--font-display); color: var(--text-primary); }
.help .help-toc .hov-chapter .hov-num { color: var(--accent); }
/* Unterpunkte beginnen unter dem Titeltext des Kapitels (2.1em + 4px), ihre Nummer dicht davor */
.help nav.help-toc ol.hov-sub { list-style: none; max-width: none; margin: 6px 0 0; padding: 0 0 0 calc(2.1em + 4px); }
.help .help-toc .hov-sub li { margin: 0; font-size: 14px; line-height: 1.5; }
.help .help-toc .hov-sub .hov-row { grid-template-columns: 2.6em minmax(0, 1fr); padding: 3px 0; }
.help .help-toc .hov-row:hover .hov-text { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 3px; }
.help .help-toc .hov-chapter:hover .hov-text { color: var(--accent); text-decoration: none; }
.help-head { margin: 0 0 8px; }
.help .help-title { margin: 0; font: 800 clamp(30px, 3.4vw, 44px)/1.12 var(--font-display); color: var(--text-primary); letter-spacing: -0.01em; max-width: 22ch; }
.help .help-title::after { content: ''; display: block; width: 56px; height: 2px; margin-top: 24px; background: var(--peach); }
/* Gliederung (Manuel 02.10.2026: „nichts soll in der Luft schweben“): Kapitel mit abgesetztem Kopf, Unterpunkte als
   Blöcke mit Trennlinie, deren Anfang ein kurzes Stück Peach markiert. Aufbau aus layoutHelp in public/app.js */
.help-body > section { margin-top: 88px; scroll-margin-top: 24px; }
.help-chapter-head {
  padding: 28px 32px; background: var(--surface-1); border: 1px solid var(--border);
  border-left: 2px solid var(--peach); border-radius: 0 8px 8px 0;
}
.help h2 { margin: 0; font: 800 clamp(26px, 2.4vw, 32px)/1.2 var(--font-display); color: var(--text-primary); letter-spacing: -0.005em; text-transform: none; scroll-margin-top: 24px; }
.help .help-chapter-head .help-chapter-lead { margin: 12px 0 0; max-width: 72ch; font-size: 17px; line-height: 1.65; color: var(--text-secondary); }
.help-topic { position: relative; padding: 36px 0 8px; }
/* Trennlinie ganz in Peach und über die ganze Breite der Seite (Manuel 05.10.2026); .help-wrap schneidet sie am Rand ab */
.help-topic::before { content: ''; position: absolute; top: 0; left: -100vw; right: -100vw; height: 1px; background: var(--peach); }
/* Sprungziel ist die Überschrift; beim Kapitel soll der ganze Kopf zu sehen sein */
.help .help-chapter-head h2 { scroll-margin-top: 56px; }
.help-chapter-head + .help-topic { padding-top: 32px; }
.help-chapter-head + .help-topic::before { display: none; }
.help-topic + .help-topic { margin-top: 24px; }
.help h3 { margin: 0 0 14px; font: 700 20px/1.3 var(--font-display); color: var(--text-primary); letter-spacing: 0; text-transform: none; scroll-margin-top: 24px; }
/* Schmale Bilder rechts neben dem Text, sobald die Hilfe breit genug ist; sie bleiben beim Lesen langer Abschnitte stehen */
.help-split { display: grid; grid-template-columns: minmax(0, 1fr); }
.help-split-main > :last-child { margin-bottom: 0; }
.help-split-aside .help-figure:first-child { margin-top: 24px; }
@container (min-width: 860px) {
  .help-split { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 48px; align-items: start; }
  .help-split-aside { position: sticky; top: 24px; }
  .help-split-aside .help-figure { margin: 4px 0 24px; }
  .help-split-aside .help-figure:last-child { margin-bottom: 16px; }
}
.help p, .help li, .help dd { font-size: 16px; line-height: 1.7; }
.help p, .help ul, .help ol:not(.htoc):not(.htoc-sub) { max-width: 70ch; margin: 0 0 16px; }
.help strong { color: var(--text-primary); font-weight: 700; }
.help a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--peach); text-underline-offset: 3px; }
.help a:hover { color: var(--accent); }
.help a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.help ul { list-style: none; padding: 0; }
.help ul > li { position: relative; padding-left: 22px; margin: 0 0 10px; }
.help ul > li::before { content: ''; position: absolute; left: 2px; top: 0.85em; width: 10px; height: 1.5px; background: var(--peach); }
.help kbd { padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; font: 600 13px var(--font-body); color: var(--text-primary); background: var(--surface-2); }
/* Ziel eines Sprungs kurz hervorheben */
.help .is-target { animation: help-target 1.6s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes help-target { 0%, 35% { color: var(--accent); } 100% { color: var(--text-primary); } }
@media (prefers-reduced-motion: reduce) { .help .is-target { animation: none; } }

/* Die vier Felder der Matrix */
.help-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px 0 32px; max-width: 760px; }
.help-fields > div { padding: 16px 20px; background: var(--surface-1); border: 1px solid var(--border); border-left: 2px solid var(--peach); border-radius: 0 4px 4px 0; }
.help-fields dt { font: 700 16px/1.4 var(--font-display); color: var(--text-primary); }
.help-fields dt span { display: block; margin-top: 2px; font: 600 12px/1.4 var(--font-body); color: #A19DAA; }
.help-fields dd { margin: 6px 0 0; font-size: 15px; line-height: 1.6; }
@media (min-width: 560px) {
  .help-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-fields > div:nth-child(1) { order: 2; }
  .help-fields > div:nth-child(2) { order: 1; }
  .help-fields > div:nth-child(3) { order: 4; }
  .help-fields > div:nth-child(4) { order: 3; }
}

/* Bilder und Videos: höchstens so breit wie aufgenommen, Rahmen und Schatten zurückhaltend, Unterschrift darunter */
.help-figure { margin: 32px 0 40px; }
.help .help-figure a { display: inline-block; max-width: 100%; text-decoration: none; vertical-align: top; }
.help-figure img, .help-figure video {
  display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); box-shadow: 0 16px 40px rgba(31, 29, 36, 0.45);
}
.help-figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: #8A8693; }
.help-video-frame { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.help-video { cursor: pointer; }
.help-video-btn {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; padding: 0; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(43, 41, 49, 0.88); color: var(--text-primary); border: 1px solid var(--border);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 120ms ease;
}
.help-video-btn:hover { background: var(--page); }
.help-video-btn:active { transform: scale(0.95); }
.help-video-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-video-btn svg { width: 16px; height: 16px; }
.help-video-btn .i-play { display: none; }
.help-video-btn.is-paused .i-play { display: block; }
.help-video-btn.is-paused .i-pause { display: none; }
/* Angehalten: großer Abspielknopf in der Mitte, damit klar ist, dass es ein Video ist */
.help-video-btn.is-paused { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--page); border: 0; }
.help-video-btn.is-paused svg { width: 26px; height: 26px; margin-left: 3px; }
.help-video-btn.is-paused:active { transform: translate(50%, 50%) scale(0.95); }
@media (prefers-reduced-motion: reduce) { .help-video-btn { transition: none; } }
.help .help-top { margin-top: 56px; font-size: 14px; }
/* Rechtliches in „Hilfe und Kontakt“ untereinander als Tabelle (Manuel 02.10.2026); in den Einstellungen steht es nicht mehr */
.help .help-legal { width: 100%; max-width: 760px; border-collapse: collapse; margin: 4px 0 16px; border-top: 1px solid var(--grid); }
.help .help-legal th, .help .help-legal td { padding: 14px 0; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
.help .help-legal th { width: 44%; padding-right: 24px; font: 600 16px/1.5 var(--font-body); }
.help .help-legal td { font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
@media (max-width: 560px) {
  .help .help-legal tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--grid); }
  .help .help-legal th, .help .help-legal td { display: block; width: auto; padding: 0; border: 0; }
  .help .help-legal td { margin-top: 2px; }
}

@media (max-width: 700px) {
  .help { padding-top: 32px; }
  .help-body > section { margin-top: 64px; }
  .help-chapter-head { padding: 20px 18px; }
  /* Menü- und Glockenknopf liegen am Handy über dem Inhalt */
  .help h3 { scroll-margin-top: 64px; }
  .help .help-chapter-head h2 { scroll-margin-top: 84px; }
  .help-topic { padding-top: 28px; }
  .help-figure img, .help-figure video { box-shadow: none; }
}

/* Ansicht als Unternehmen (UNEQ-Admins, nur ansehen, Entscheidung Manuel 02.10.2026): Leiste oben, Peach nur als Linie */
.view-as-bar {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px;
  padding: 12px 24px; background: var(--surface-2); border-bottom: 1px solid var(--peach);
  font-size: 14px; line-height: 1.45; color: var(--text-primary);
}
.view-as-text { flex: 1 1 320px; min-width: 0; }
.view-as-title { margin: 0; font: 700 15px/1.6 var(--font-display); overflow-wrap: anywhere; }
.view-as-title .admin-icon { display: inline-block; margin-right: 8px; vertical-align: -2px; color: var(--accent); }
.view-as-tag { display: inline-block; padding: 0 8px; border: 1px solid var(--accent); border-radius: 2px;
  color: var(--accent); font: 700 11px/20px var(--font-display); letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap; vertical-align: 1px; }
.view-as-sub { margin: 4px 0 0; font-size: 13px; color: #A19DAA; }
.view-as-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.view-as-tabs { display: inline-flex; gap: 0; }
.view-as-tab { border-left-width: 1px; }
.view-as-tab + .view-as-tab { margin-left: -1px; }
.view-as-tab.is-active { border-color: var(--peach); background: var(--surface-1); }
.view-as-off { cursor: not-allowed !important; }
a.view-as-off { pointer-events: none; }
.btn.view-as-off, .icon-btn.view-as-off, .link-btn.view-as-off, .banner-action.view-as-off, .banner-close.view-as-off { opacity: 0.45; }
/* Seitenleiste und ihr Knopf sind im Modus ausgeblendet: kein Platz dafür freihalten */
body.authed.view-as .topbar, body.authed.view-as .access-banner { padding-left: 24px; margin-left: 0; }
body.authed.view-as .view { margin-left: 0; }
body.view-as .public-bar { position: static; }   /* Kopfzeile der Sperrseite unter der Leiste statt dahinter */
/* Ansicht als Person (02.10.2026): ganze App mit Seitenleiste, die Leiste steht rechts davon wie der Zugangshinweis und lässt
   Menüknopf und Glocke frei */
body.authed.person-view .view-as-bar { padding-right: 64px; }
body.authed.person-view:not(.nav-open) .view-as-bar { padding-left: 58px; }
body.authed.person-view.nav-open .view-as-bar { margin-left: 240px; }
@media (max-width: 1100px) { body.authed.person-view.nav-open .view-as-bar { margin-left: 0; padding-left: 58px; } }
@media (max-width: 600px) {
  .view-as-bar { position: static; padding: 12px 16px; }   /* am Handy nicht dauerhaft oben, die Leiste ist dort hoch */
  body.authed.view-as .topbar, body.authed.view-as .access-banner { padding-left: 16px; }
}

/* Rückfragen und Hinweise: Absätze im Text (\n\n) bleiben sichtbar (Manuel 02.10.2026, Rückfrage „Plan kündigen“) */
#dialog-text { white-space: pre-line; }

/* Plätze dazubuchen: Zusammenfassung unter dem Feld in Zeilen (Manuel 02.10.2026) */
.seats-summary { white-space: pre-line; font-size: 13px; line-height: 1.6; margin-top: 4px; }
