/* Wettenberg bleibt bunt – farbenfrohe Demokratie-Plattform (PHP) */
:root {
  /* Theme „Erklärvideo" – warmes Creme, tiefes Indigo, gedämpft-bunte Akzente */
  --background: #faf9f5;   /* warmes Creme */
  --foreground: #221c30;   /* tiefes Indigo-Anthrazit */
  --card: #ffffff;
  --paper: #fbf7ef;        /* cremefarbene Fläche */
  --ink: #191528;          /* tiefes Indigo (dunkle Bereiche) */
  --border: #e8e1d4;       /* warmes Sand */
  --muted: #6f6657;        /* warmes Taupe */
  --stone-50: #faf8f2;
  --stone-100: #f3efe6;
  --stone-200: #e7e0d2;
  --violet: #6c4ab6;       /* gedämpftes Violett (Primärfarbe) */
  --pink: #ff8a80;         /* Koralle */
  --orange: #ef8a3c;       /* warmes Orange */
  --yellow: #f2c53d;       /* Gold-Gelb */
  --green: #2ea56a;        /* Smaragd */
  --blue: #2b8fc9;         /* Himmelblau */
  --red: #c0463c;          /* warmes Rot (Fehler) */
  /* Elevation & Form – weiche Tiefe wie im Erklärvideo */
  --shadow-1: 0 1px 2px rgba(34,28,48,.05), 0 1px 3px rgba(34,28,48,.04);
  --shadow-2: 0 2px 6px rgba(34,28,48,.06), 0 16px 32px -20px rgba(34,28,48,.18);
  --radius: .7rem;
  --radius-lg: 1.1rem;
  --tabbar-h: 4rem;
  --brand: linear-gradient(90deg,var(--violet),var(--pink),var(--orange),var(--green),var(--blue));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Figtree', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
/* Überschriften & Wortmarke im Display-Grotesk des Erklärvideos */
h1, h2, h3, .logo, .hero h1, .brand-text, .btn-brand {
  font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  letter-spacing: -0.01em;
}
a { color: inherit; }

/* App-Modus (PWA/Homescreen) & Touch */
body { -webkit-tap-highlight-color: rgba(108,74,182,.12); overscroll-behavior-y: contain; }
@supports (padding: max(0px)) {
  .appbar { padding-top: env(safe-area-inset-top); }      /* Inhalt nicht unter die Statusleiste */
  .appbar-inner { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
  main.container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(3rem, env(safe-area-inset-bottom));   /* nicht unter den Home-Indikator */
  }
}
/* Tall Dialoge auf kleinen Displays scrollbar machen – Buttons bleiben erreichbar */
dialog { max-height: 92vh; overflow: auto; }

.brand-bar { height: 6px; width: 100%; background: linear-gradient(90deg,var(--violet),var(--pink),var(--orange),var(--yellow),var(--green),var(--blue)); }
.brand-gradient { background: linear-gradient(90deg,var(--violet),var(--pink),var(--orange),var(--yellow),var(--green),var(--blue)); color:#fff; }
.brand-text {
  background: linear-gradient(90deg,var(--violet),var(--pink),var(--orange),var(--green),var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0; }

/* Header / Nav – klebt oben wie eine native App-Titelleiste */
.appbar { border-bottom: 1px solid var(--border); background: rgba(255,255,255,.82); position: sticky; top: 0; z-index: 30; -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .appbar { background: var(--card); } }
.appbar-inner { display:flex; align-items:center; gap:1rem; padding:.6rem 0; flex-wrap:wrap; }
.nav { display:flex; align-items:center; gap:.25rem; flex-wrap: wrap; flex:1; }
.nav a { padding:.45rem .7rem; border-radius:.5rem; text-decoration:none; font-size:.9rem; font-weight:500; }
.nav a:hover { background: var(--stone-100); }
.nav a.active { background: rgba(108,74,182,.1); color: var(--violet); }
/* Zwei-Säulen-Navigation: Gruppen-Labels (mobil), Trenner (Desktop), Vereins-Kontext */
.nav-group { display: none; }
.nav-sep { width: 1px; align-self: stretch; margin: .3rem .4rem; background: var(--border); }
.nav-context { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: .6rem; background: var(--stone-100); text-decoration: none; font-size: .85rem; font-weight: 600; color: inherit; margin-right: .2rem; }
.nav-context:hover { background: var(--stone-200); }
.nav-context .dot { flex: none; }
.nav-context-name { white-space: nowrap; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
.appbar-util { font-size: .85rem; font-weight: 500; text-decoration: none; padding: .35rem .55rem; border-radius: .5rem; color: var(--muted); white-space: nowrap; }
.appbar-util:hover { background: var(--stone-100); color: inherit; }
.appbar-util.active { color: var(--violet); }
.nav-role { font-size: .68rem; font-weight: 700; padding: .08rem .35rem; border-radius: .4rem; background: var(--stone-200); color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.org-switch { position: relative; }
.org-switch > summary { list-style: none; cursor: pointer; }
.org-switch > summary::-webkit-details-marker { display: none; }
.org-switch-caret { font-size: .7rem; color: var(--muted); margin-left: .1rem; }
.org-switch-menu { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 40; min-width: 15rem; background: var(--card); border: 1px solid var(--border); border-radius: .7rem; box-shadow: var(--shadow-2); padding: .35rem; }
.org-switch-item { margin: 0; }
.org-switch-item button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; background: none; border: none; font: inherit; font-size: .9rem; padding: .5rem; border-radius: .5rem; cursor: pointer; color: inherit; }
.org-switch-item button:hover, .org-switch-item button:focus-visible { background: var(--stone-100); }
.org-switch-item button.active { background: rgba(108,74,182,.1); }
.org-switch-all { display: block; padding: .5rem; color: var(--violet); text-decoration: none; border-top: 1px solid var(--border); margin-top: .2rem; }
@media (max-width: 820px) { .org-switch-menu { position: static; box-shadow: none; border: none; min-width: 0; padding: .2rem 0 .2rem .9rem; } }
.subnav-wrap { border-bottom: 1px solid var(--border); background: var(--stone-50); position: sticky; top: 0; z-index: 20; }
.subnav { display: flex; align-items: center; gap: .15rem; padding: .4rem 0; overflow-x: auto; }
.subnav-label { font-size: .78rem; font-weight: 700; color: var(--muted); margin-right: .5rem; white-space: nowrap; }
.subnav a { padding: .3rem .6rem; border-radius: .5rem; text-decoration: none; font-size: .85rem; font-weight: 500; white-space: nowrap; color: inherit; }
.subnav a:hover { background: var(--stone-100); }
.subnav a.active { background: rgba(108,74,182,.12); color: var(--violet); }
.viewas-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #fde68a; border: 1px solid #f59e0b; color: #7c2d12; padding: .6rem .9rem; border-radius: .7rem; margin-bottom: 1rem; font-size: .9rem; }
.info-card { border-color: rgba(108,74,182,.35); background: rgba(108,74,182,.06); }
.info-card-wichtig { border-color: #f59e0b; border-width: 2px; background: #fff8ec; }
.badge-wichtig { background: #f59e0b; color: #7c2d12; }
@media (max-width: 820px) {
  .nav-group { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .7rem .8rem .15rem; }
  .nav-sep { display: none; }
  .nav-context { display: flex; width: 100%; margin: .15rem 0; justify-content: flex-start; }
}
.logo { font-weight:800; font-size:1.15rem; text-decoration:none; }
.appbar-right { display:flex; align-items:center; gap:.6rem; margin-left:auto; }
.nav-toggle { display:none; background:none; border:1px solid var(--border); border-radius:.5rem; padding:.45rem .7rem; cursor:pointer; font-size:1.1rem; line-height:1; }
.avatar { width:2rem; height:2rem; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:700; }
.bell { color: var(--muted); }
.bell.active, .bell:hover { color: var(--foreground); }
.nav-badge { position:absolute; top:-.35rem; right:-.5rem; min-width:1.05rem; height:1.05rem; padding:0 .25rem; border-radius:999px; background:var(--red); color:#fff; font-size:.66rem; font-weight:800; line-height:1.05rem; text-align:center; }

@media (max-width:820px) {
  .nav-toggle { display:inline-flex; }
  .appbar .nav { display:none; order:3; width:100%; flex-direction:column; align-items:stretch; gap:.15rem; margin-top:.5rem; }
  .appbar.open .nav { display:flex; }
  .appbar .nav a { padding:.7rem .8rem; }      /* größere Tippziele */
}

main.container { padding-top: 2rem; padding-bottom: 3rem; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; border:none; cursor:pointer; border-radius:999px; padding:.6rem 1.2rem; font-size:.9rem; font-weight:600; text-decoration:none; line-height:1.2; transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease, border-color .2s ease; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-brand { background: var(--brand); color:#fff; box-shadow: 0 6px 16px -8px rgba(108,74,182,.7); }
.btn-brand:hover { opacity:.94; box-shadow: 0 8px 20px -8px rgba(108,74,182,.85); }
.btn-outline { background: var(--card); border:1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { border-color: var(--violet); }
.btn-soft { background: rgba(108,74,182,.1); color: var(--violet); }
.btn-soft:hover { background: rgba(108,74,182,.18); }
.btn-sm { padding:.4rem .75rem; font-size:.8rem; }
.btn-link { background:none; border:none; color:var(--muted); cursor:pointer; font-size:.85rem; padding:.4rem .55rem; border-radius:.4rem; min-height:2rem; }
.btn-link:hover { color: var(--red); }
.btn[disabled] { opacity:.6; cursor:default; }

/* Cards */
.card { background: var(--card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.25rem; box-shadow: var(--shadow-1); transition: box-shadow .2s ease, transform .12s ease, border-color .2s ease; }
a.card:hover, a.card:focus-visible { box-shadow: var(--shadow-2); border-color: rgba(108,74,182,.35); transform: translateY(-2px); }
.grid { display:grid; gap:1rem; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width:800px){ .grid-2,.grid-3 { grid-template-columns:1fr; } }

.stack > * + * { margin-top: 1rem; }
.row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.between { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.spacer { flex:1; }

/* Forms */
label { font-size:.9rem; font-weight:500; display:block; margin-bottom:.3rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url], select, textarea {
  width:100%; border:1px solid var(--border); border-radius:.6rem; padding:.6rem .75rem; font: inherit; font-size:16px; background:#fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--violet); box-shadow:0 0 0 3px rgba(108,74,182,.25); }
.field + .field { margin-top:.75rem; }
.inline-form { display:inline; }

/* Dots & badges */
.dot { width:.9rem; height:.9rem; border-radius:999px; display:inline-block; flex:none; }
.badge { display:inline-block; border-radius:999px; padding:.1rem .55rem; font-size:.72rem; font-weight:600; }
.badge-admin { background: rgba(108,74,182,.1); color: var(--violet); }
.badge-editor { background: rgba(43,143,201,.1); color: var(--blue); }
.badge-viewer { background: var(--stone-200); color:#5b5346; }
.badge-vorstand { background: rgba(242,197,61,.25); color:#7a5600; }

/* Tables */
table { width:100%; border-collapse:collapse; font-size:.9rem; }
thead th { text-align:left; font-size:.75rem; color:var(--muted); font-weight:500; padding:.5rem .75rem; border-bottom:1px solid var(--border); background:var(--stone-50); }
tbody td { padding:.5rem .75rem; border-bottom:1px solid var(--border); }
tbody tr:last-child td { border-bottom:none; }
.table-card { border:1px solid var(--border); border-radius:1rem; overflow-x:auto; background:var(--card); }
.table-card table { min-width:32rem; }   /* Desktop/Tablet: horizontal scrollen statt abschneiden */

/* Smartphone: Tabellenzeilen werden zu Karten mit Feld-Labels – kein
   abgeschnittenes Horizontal-Scrollen mehr. Opt-in über die Zusatzklasse
   „table-cards" (nur für Tabellen mit data-label je Zelle); dichte Admin-
   Tabellen ohne die Klasse behalten das horizontale Scrollen. Der
   Monatskalender nutzt Divs (.cal-grid) und ist ohnehin nicht betroffen. */
@media (max-width:600px) {
  .table-cards { border:none; background:none; overflow:visible; border-radius:0; }
  .table-cards table { min-width:0; }
  .table-cards thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .table-cards tbody tr { display:block; background:var(--card); border:1px solid var(--border); border-radius:1rem;
    box-shadow:var(--shadow-1); padding:.55rem .9rem; margin-bottom:.7rem; }
  .table-cards tbody td { display:block; padding:.32rem 0; border:none; text-align:left !important; white-space:normal !important; }
  .table-cards tbody tr td:last-child { padding-bottom:.1rem; }
  .table-cards tbody td::before { content:attr(data-label); display:block; font-size:.7rem; font-weight:600;
    text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin-bottom:.1rem; }
  .table-cards tbody td:not([data-label])::before, .table-cards tbody td[data-label=""]::before { content:none; }
  .table-cards tbody td[data-label=""] { margin-top:.35rem; }
  .table-cards tbody td[data-label=""] .btn { width:100%; min-height:2.75rem; }
}

/* Flash */
.verify-banner { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap;
  background:rgba(242,197,61,.18); border:1px solid rgba(242,197,61,.5); color:#5b4300;
  border-radius:.6rem; padding:.55rem .9rem; font-size:.9rem; margin-bottom:1rem; }
/* Smartphone: Hinweis-Banner kompakter, damit oben nicht der halbe Bildschirm
   von Bannern belegt ist. */
@media (max-width:600px) {
  .verify-banner { padding:.45rem .7rem; font-size:.8rem; gap:.45rem; margin-bottom:.6rem; }
  .verify-banner .btn { padding:.35rem .7rem; font-size:.78rem; }
}
.flash { border-radius:.6rem; padding:.6rem .9rem; font-size:.9rem; margin-bottom:1rem; }
.flash-info { background: rgba(43,143,201,.08); color: var(--blue); }
.flash-success { background: rgba(46,165,106,.1); color: var(--green); }
.flash-error { background: rgba(192,70,60,.08); color: var(--red); }

/* Auth shell */
.auth-wrap { min-height:100vh; display:flex; flex-direction:column; }
.auth-center { flex:1; display:flex; align-items:center; justify-content:center; padding:3rem 1rem; }
.auth-box { width:100%; max-width:26rem; }

/* Landing */
.hero { text-align:center; padding:4rem 1rem; }
.hero h1 { font-size:2.4rem; max-width:46rem; margin:0 auto 1rem; }
.feature { text-align:left; }
.feature .ico { font-size:1.8rem; }

/* Calendar */
/* minmax(0,1fr) statt 1fr: sonst wachsen die Spalten auf die min-content-Breite
   der (nowrap-)Termin-Titel und das Raster läuft horizontal über. */
.cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.cal-head { text-align:center; font-size:.72rem; font-weight:600; color:var(--muted); padding:.4rem 0; border-bottom:1px solid var(--border); background:var(--stone-50); }
.cal-cell { min-width:0; min-height:6rem; border-right:1px solid var(--border); border-bottom:1px solid var(--border); padding:.35rem; }
.cal-cell.out { background:#faf9f5; color:var(--muted); }
.cal-daynum { display:inline-flex; width:1.5rem; height:1.5rem; align-items:center; justify-content:center; border-radius:999px; font-size:.75rem; }
.cal-daynum.today { color:#fff; font-weight:700; }
.cal-event { font-size:.7rem; color:#fff; padding:.05rem .3rem; border-radius:.3rem; margin-top:.15rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Ansichts-Umschaltung Monat/Liste – Standard: Desktop Monat, Smartphone Liste.
   Explizite Wahl (Umschalt-Buttons) gewinnt auf allen Größen. */
.cal-list-view { display:none; }
.cal-page[data-explicit="1"][data-view="liste"] .cal-month-view { display:none; }
.cal-page[data-explicit="1"][data-view="liste"] .cal-list-view { display:block; }
@media (max-width:600px) {
  .cal-page[data-explicit="0"] .cal-month-view { display:none; }
  .cal-page[data-explicit="0"] .cal-list-view { display:block; }
}
/* Umschalt-Buttons: Basis = Outline, aktiv = Soft (per CSS passend zur jeweils sichtbaren Ansicht) */
.cal-toggle { background:var(--card); border:1px solid var(--border); color:var(--foreground); }
.cal-page[data-explicit="0"] .cal-toggle-monat,
.cal-page[data-explicit="1"][data-view="monat"] .cal-toggle-monat,
.cal-page[data-explicit="1"][data-view="liste"] .cal-toggle-liste {
  background:rgba(108,74,182,.1); color:var(--violet); border-color:transparent;
}
@media (max-width:600px) {
  .cal-page[data-explicit="0"] .cal-toggle-monat { background:var(--card); color:var(--foreground); border:1px solid var(--border); }
  .cal-page[data-explicit="0"] .cal-toggle-liste { background:rgba(108,74,182,.1); color:var(--violet); border-color:transparent; }
}
/* Monatsraster auf dem Smartphone: kompakter, Termine als farbige Balken (Text würde nicht lesbar passen) */
@media (max-width:600px) {
  .cal-head { font-size:.62rem; padding:.25rem 0; }
  .cal-cell { min-height:3.4rem; padding:.15rem; }
  .cal-daynum { width:1.3rem; height:1.3rem; font-size:.72rem; }
  .cal-month-view .cal-event { font-size:0; height:.45rem; padding:0; margin-top:.18rem; border-radius:999px; }
}

/* Kanban */
.board { display:flex; gap:1rem; overflow-x:auto; padding-bottom:1rem; align-items:flex-start; }
.column { width:18rem; flex:none; background:var(--stone-100); border-radius:1rem; padding:.75rem; }
.column h3 { font-size:.95rem; }
.column-count { background:#fff; border-radius:999px; padding:.05rem .5rem; font-size:.72rem; color:var(--muted); }
.col-cards { min-height:1rem; display:flex; flex-direction:column; gap:.5rem; margin-top:.6rem; }
.kcard { background:#fff; border:1px solid var(--border); border-radius:.7rem; padding:.6rem; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.kcard.dragging { opacity:.5; }
.kcard .ktitle { font-size:.85rem; font-weight:500; }
.kcard .kmeta { margin-top:.4rem; display:flex; gap:.4rem; flex-wrap:wrap; font-size:.7rem; }
.col-cards.drop-hover { outline:2px dashed rgba(108,74,182,.4); border-radius:.6rem; }
.dragging-handle { cursor:grab; }

/* Karte verschieben (touch-freundliche Alternative zum Ziehen) */
.kmove { margin-top:.5rem; }
.kmove-btn { width:100%; background:none; border:1px dashed var(--border); border-radius:.5rem;
  color:var(--muted); font-size:.75rem; padding:.35rem .6rem; min-height:2.2rem; cursor:pointer; }
.kmove-btn:hover { border-color:var(--violet); color:var(--violet); }
.kmove-menu { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.4rem; }
.kmove-menu::before { content:"In Spalte:"; width:100%; font-size:.7rem; color:var(--muted); }
.kmove-target { background:rgba(108,74,182,.1); color:var(--violet); border:none; border-radius:.5rem;
  padding:.45rem .65rem; font-size:.78rem; min-height:2.2rem; cursor:pointer; }
.kmove-target:hover { background:rgba(108,74,182,.2); }
.kcard.just-moved { animation: kflash 1.3s ease; }
@keyframes kflash { 0% { box-shadow:0 0 0 3px rgba(108,74,182,.55); } 100% { box-shadow:0 1px 2px rgba(0,0,0,.04); } }

/* details-based toggles */
details > summary { cursor:pointer; list-style:none; }
details > summary::-webkit-details-marker { display:none; }

.toc a { display:flex; gap:.5rem; padding:.4rem .5rem; border-radius:.5rem; text-decoration:none; font-size:.9rem; }
.toc a:hover { background: var(--stone-100); }

footer.site { border-top:1px solid var(--border); padding:1.5rem 0; text-align:center; color:var(--muted); font-size:.85rem; }

/* Mobile-Feinschliff */
@media (max-width:600px) {
  h1 { font-size:1.4rem; }
  .hero { padding:2.5rem 1rem; }
  .hero h1 { font-size:1.9rem; }
  dialog { width:94% !important; max-width:none !important; }
  /* Kanban: Spalten auf dem Smartphone untereinander stapeln (wie im Erklärvideo) */
  .board { flex-direction:column; align-items:stretch; gap:1rem; overflow-x:visible; scroll-snap-type:none; }
  .column { width:100%; scroll-snap-align:none; }
  main.container { padding-top:1.25rem; }
  .card { padding:1rem; }
  /* Mehrspaltige Auswahl-Raster einspaltig (z. B. Partner-/Forum-Checkboxen) */
  .grid-2, .grid-3 { grid-template-columns:1fr; }
}

/* ============================================================
   Native-App-Gefühl & Barrierefreiheit (Erklärvideo-Feinschliff)
   ============================================================ */

/* Sichtbarer Fokusrahmen für Tastatur-Navigation (nicht bei Maus-Klick). */
a:focus-visible, button:focus-visible, .btn:focus-visible, .tab:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--violet); outline-offset: 2px; border-radius: .5rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* Nur-für-Screenreader (z. B. sr-only-Überschriften der Widgets). */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* „Zum Inhalt springen": unsichtbar, bis er per Tastatur fokussiert wird. */
.skip-link { position:absolute; left:.5rem; top:-3rem; z-index:200; padding:.55rem .9rem; border-radius:.5rem;
  background:var(--violet); color:#fff; text-decoration:none; font-weight:600; box-shadow:var(--shadow-2);
  transition:top .15s ease; }
.skip-link:focus { top:.5rem; }

/* Sanfte Bedien-Rückmeldung; respektiert Systemeinstellung „Bewegung reduzieren". */
.btn-soft:active, .btn-outline:active, .kmove-target:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Untere Tab-Leiste – erscheint nur auf dem Smartphone (native App-Navigation). */
.tabbar { display: none; }
@media (max-width: 820px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px -12px rgba(34,28,48,.25);
  }
  .tabbar .tab {
    position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 3.4rem; padding: .35rem .2rem; text-decoration: none; background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: .68rem; font-weight: 600; font-family: inherit; transition: color .15s ease;
  }
  /* Farbverlaufs-Strich über dem aktiven Tab (greift die Marken-Leiste oben auf). */
  .tabbar .tab::before {
    content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%) scaleX(0);
    width: 2rem; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); transition: transform .2s ease;
  }
  .tabbar .tab.active::before { transform: translateX(-50%) scaleX(1); }
  .tabbar .tab .ico { display: flex; align-items: center; justify-content: center; width: 2.7rem; height: 1.75rem; border-radius: 999px; transition: background .18s ease, transform .12s ease; }
  .tabbar .tab .ico .ic { width: 25px; height: 25px; }
  .tabbar .tab.active { color: var(--violet); }
  .tabbar .tab.active .ico { background: rgba(108,74,182,.14); }         /* weiches Pill hinter dem aktiven Icon */
  .tabbar .tab.active .ic { stroke-width: 2.05; }
  .tabbar .tab:active .ico { transform: scale(.92); }

  /* Platz schaffen, damit Inhalt nicht hinter der Tab-Leiste verschwindet. */
  main.container { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + .5rem); }

  /* Oben genügt jetzt das „Mehr" in der Tab-Leiste – klassischen Hamburger ausblenden. */
  .nav-toggle { display: none !important; }

  /* Aufklapp-Menü („Mehr") als sauberes Panel unter der Titelleiste. */
  .appbar.open .nav { box-shadow: var(--shadow-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: .5rem; background: var(--card); }
}

/* Touch-Ziele: auf Fingerbedienung mindestens ~44 px hoch. */
@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .btn-link { min-height: 44px; padding-inline: .7rem; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
}

/* Inline-Linien-Icons (currentColor) – Grundgröße + Kopfzeilen-Glocke. */
.ic { width: 1.5rem; height: 1.5rem; display: inline-block; vertical-align: middle; flex: none; }
.bell .ic { width: 1.45rem; height: 1.45rem; display: block; }

/* „Abmelden": Desktop = Kopfzeile, Smartphone = „Mehr"-Menü (aufgeräumte Titelleiste). */
.nav-logout { display: none; }
@media (max-width: 820px) {
  .header-logout { display: none; }
  .logo { font-size: 1.02rem; }
  .appbar.open .nav-logout { display: block; margin-top: .3rem; border-top: 1px solid var(--border); padding-top: .35rem; }
  .nav-logout button { width: 100%; text-align: left; background: none; border: none; color: var(--muted); font: inherit; font-weight: 500; padding: .7rem .8rem; border-radius: .5rem; cursor: pointer; min-height: 44px; }
  .nav-logout button:hover, .nav-logout button:focus-visible { background: var(--stone-100); color: var(--red); }
}
