/* =====================================================================
   iHeifDa! / iHelpU! — Design-System
   Struktur: Tokens → Basis → Navigation → Layout → Komponenten → Views
   ===================================================================== */

:root {
  /* Farben */
  --bg: #f2f5f4;
  --surface: #ffffff;
  --ink: #17221e;
  --muted: #5c6a65;
  --line: #e3e8e6;
  --line-strong: #d2dbd8;
  --teal: #0f766e;
  --teal-dark: #0b5a53;
  --teal-soft: #d8efea;
  --teal-050: #eef7f5;
  --amber: #b45309;
  --red: #b91c1c;
  --green: #15803d;

  /* Form */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 40, 35, .06);
  --shadow: 0 1px 2px rgba(10, 40, 35, .04), 0 10px 30px -14px rgba(10, 40, 35, .14);
  --ring: 0 0 0 3px rgba(15, 118, 110, .18);

  /* Typo-Skala */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-hero: clamp(26px, 5vw, 32px);

  /* Abstände */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 28px;

  /* Navigation */
  --bnav-h: 62px;
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-md);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  min-height: 58px;
  padding: 8px clamp(14px, 3vw, 24px);
  padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-group { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; flex: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; display: block; object-fit: cover; }
.brand-name { font-size: 16px; display: inline-flex; align-items: baseline; gap: 12px; }
.brand-alt { font-size: 12px; font-weight: 600; color: var(--teal); opacity: .75; padding-left: 12px; border-left: 1px solid var(--line); }
.brand-tagline { font-size: 13px; color: var(--muted); white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* Nav-Links (Desktop) */
.nav-link {
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  padding: 8px 13px; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--teal-dark); background: var(--teal-050); }
.nav-link.active { color: var(--teal-dark); background: var(--teal-soft); }
.nav-cta { margin-left: 4px; }
.nav-feedback-mobile {
  display: none;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  padding: 8px 13px; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-feedback-mobile:hover { color: var(--teal-dark); background: var(--teal-050); }
.nav-feedback-mobile.active { color: var(--teal-dark); background: var(--teal-soft); }

/* Anfragen-Icon (Handshake) mit hochgestellter roter Badge-Zahl */
.nav-requests { display: inline-flex; align-items: center; gap: 7px; }
.nav-requests-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.nav-requests-icon { font-size: 17px; line-height: 1; }
.nav-req-badge {
  position: absolute; top: -7px; right: -9px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: #e5484d; color: #fff;
  font-size: 9px; font-weight: 800; line-height: 15px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.nav-req-badge[hidden] { display: none; }

/* Konto-Avatar in der Topbar */
.nav-avatar {
  flex: none; width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-soft); color: var(--teal-dark);
  font-weight: 800; font-size: 15px; text-decoration: none;
  border: 2px solid transparent; margin-left: 4px;
  transition: border-color .15s;
}
.nav-avatar:hover, .nav-avatar.active { border-color: var(--teal); }

/* ---------- Bottom-Navigation (Mobil) ---------- */
.bottomnav { display: none; }
@media (max-width: 760px) {
  .nav-desktop { display: none !important; }
  .brand-alt { display: none; }
  .brand-tagline { display: none; }
  /* Feedback schrumpft zum Icon-Button, damit Anmelden/Avatar + Sprache in
     einer Zeile bleiben (statt umzubrechen und die Topbar zu vergrößern). */
  .nav-feedback-mobile {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0; font-size: 0; flex: none;
  }
  .nav-feedback-mobile::before { content: "💬"; font-size: 16px; line-height: 1; }
  /* Auf Mobil wird die Anfragen-Zahl als Badge auf dem Netzwerk-Reiter der
     Bottom-Nav angezeigt – das Handshake-Icon in der Topbar entfällt hier,
     um Doppelungen zu vermeiden. */
  .nav-requests { display: none !important; }
  .lang-seg button { padding: 4px 8px; min-height: 28px; font-size: 12px; }
  .topbar { gap: 8px; padding-left: clamp(10px, 3vw, 24px); padding-right: clamp(10px, 3vw, 24px); }
  .topnav { gap: 2px; }
  .bottomnav:not(:empty) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    min-height: var(--bnav-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 2px 6px;
  min-height: 56px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  color: var(--muted); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--teal); }
/* Anfragen-Zahl als Badge auf dem Netzwerk-Reiter (Mobil-Bottom-Nav) */
.bn-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.bn-req-badge {
  position: absolute; top: -5px; right: -10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e5484d; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.bn-req-badge[hidden] { display: none; }
.bn-item:focus-visible { box-shadow: none; }
.bn-item:focus-visible svg { filter: drop-shadow(0 0 3px rgba(15, 118, 110, .5)); }

/* Mittiger „Neu"-Button, leicht erhaben */
.bn-new .bn-plus {
  width: 46px; height: 46px; margin-top: -20px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal); color: #fff;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .38);
  transition: background .15s, transform .1s;
}
.bn-new .bn-plus svg { width: 24px; height: 24px; }
.bn-new:active .bn-plus { transform: scale(.94); }
.bn-new.active .bn-plus, .bn-new .bn-plus:hover { background: var(--teal-dark); }
.bn-new.active { color: var(--teal); }

/* ---------- Layout ---------- */
.container {
  max-width: 740px;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) 96px;
}
@media (max-width: 760px) {
  .container { padding-bottom: calc(var(--bnav-h) + 40px + env(safe-area-inset-bottom)); }
}
.loading { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: var(--fs-base); font-weight: 600;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .05s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(11, 90, 83, .25); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: var(--surface); color: var(--teal); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-050); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #f0caca; }
.btn-danger:hover { background: #fdecec; }
.btn-sm { min-height: 34px; padding: 5px 13px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3.5vw, 22px);
  margin-bottom: var(--sp-4);
}
.card h2 { margin: 0 0 4px; font-size: var(--fs-lg); }
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 var(--sp-4); }

/* ---------- Hero (Start) ---------- */
.hero { text-align: center; padding: clamp(20px, 5vw, 40px) 8px 12px; }
.hero h1 { font-size: var(--fs-hero); margin: 10px 0 8px; }
.hero p { color: var(--muted); font-size: var(--fs-md); max-width: 44ch; margin: 0 auto 24px; }

/* ---------- Formulare ---------- */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: var(--fs-md);
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: var(--ring);
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:disabled { background: var(--bg); color: var(--muted); }
.row { display: flex; gap: var(--sp-3); }
.row > * { flex: 1; }
@media (max-width: 520px) { .row { flex-direction: column; gap: 0; } }

/* Suchfeld (z. B. Entdecken) */
.search-input {
  width: 100%; font: inherit; font-size: var(--fs-md);
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: var(--ring);
}
@media (min-width: 761px) {
  .search-input { font-size: 17px; min-height: 48px; padding: 12px 16px; }
}

/* Segment-Schalter */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg button {
  font: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; min-height: 40px;
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  transition: background .15s, color .15s;
}
.seg button.active { background: var(--teal); color: #fff; }
.seg-block { display: flex; width: 100%; }
.seg-block button { flex: 1; padding: 10px 12px; }
.lang-seg { border-radius: 999px; }
.lang-seg button { padding: 5px 11px; min-height: 30px; font-size: 13px; }

.avail-field { background: var(--teal-050); border: 1px solid #cfe4e0; border-radius: 12px; padding: 12px 14px; margin-bottom: var(--sp-4); }
.avail-field label { font-size: 15px; }
.avail-field input { border-color: var(--teal); }

.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; min-height: 28px; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--teal); flex: none; }

/* ---------- Status-Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill-offen { background: #e6f4ea; color: var(--green); }
.pill-voll { background: #fef3e2; color: var(--amber); }
.pill-geschlossen { background: #eef0ef; color: var(--muted); }
.pill-archiviert { background: #eef0ef; color: var(--muted); }
.pill-urgent { background: #fdecec; color: var(--red); }

/* ---------- Dringend-Markierung ---------- */
.urgent-toggle { background: #fff6f6; border: 1px solid #f5d6d6; border-radius: var(--radius-sm); padding: 12px; }
.urgent-banner {
  display: flex; align-items: center; gap: 8px;
  background: #fdecec; color: var(--red);
  border: 1px solid #f0caca; border-radius: var(--radius-sm);
  font-weight: 700; padding: 11px 14px; margin-bottom: 12px;
  animation: urgentPulse 1.8s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
  50% { box-shadow: 0 0 0 4px rgba(185, 28, 28, .12); }
}
.card.is-urgent { border-color: #e9a8a8; box-shadow: 0 0 0 2px rgba(185, 28, 28, .12), var(--shadow); }
@media (prefers-reduced-motion: reduce) {
  .urgent-banner { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Zähler ---------- */
.counter { display: flex; gap: var(--sp-3); margin: var(--sp-4) 0; }
.counter .box { flex: 1; text-align: center; background: var(--teal-050); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; }
.counter .box .num { font-size: 26px; font-weight: 800; color: var(--teal); line-height: 1; font-variant-numeric: tabular-nums; }
.counter .box .lbl { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.progress { height: 8px; background: #e7edeb; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress > span { display: block; height: 100%; background: var(--teal); transition: width .3s; }

/* ---------- Meta-Liste ---------- */
.meta { list-style: none; padding: 0; margin: var(--sp-3) 0; }
.meta li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-base); }
.meta li:last-child { border-bottom: 0; }
.meta .k { color: var(--muted); min-width: 118px; flex: none; }
.meta .v { font-weight: 500; }

/* ---------- Beiträge (wird mitgebracht) ---------- */
.contrib-box { margin-top: 14px; padding: 12px 14px; background: var(--teal-050); border: 1px solid var(--line); border-radius: 12px; }
.contrib-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.contrib-list { list-style: none; padding: 0; margin: 0; }
.contrib-list li { font-size: var(--fs-base); padding: 3px 0; }
.contrib-list .who { font-weight: 600; }

/* ---------- Helferliste ---------- */
.helpers { list-style: none; padding: 0; margin: 0; }
.helpers li { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; background: #fafbfa; }
.helpers .name { font-weight: 600; }
.helpers .det { font-size: 14px; color: var(--muted); }

/* ---------- Listen (Meine Gesuche u. a.) ---------- */
.list { display: grid; gap: var(--sp-3); }
.list-item { display: block; text-decoration: none; color: inherit; }
.list-item .card { margin: 0; transition: border-color .15s, box-shadow .15s; }
.list-item:hover .card { border-color: var(--teal); box-shadow: var(--shadow), 0 0 0 1px var(--teal-soft); }
.list-item .title-row { display: flex; justify-content: space-between; align-items: start; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 60;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  body:has(.bottomnav:not(:empty)) .toast { bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom)); }
}

/* ---------- Footer / Modus-Badge ---------- */
.footer { position: fixed; left: 0; bottom: 0; padding: 6px 12px; z-index: 20; }
.badge { font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.footer-link { margin-left: 12px; color: var(--teal); text-decoration: none; font-size: 13px; font-weight: 600; }
.footer-link:hover { text-decoration: underline; }
@media (max-width: 760px) {
  body:has(.bottomnav:not(:empty)) .footer { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  #mode-badge { display: none; }
  #feedback-link { display: none; }
}

/* ---------- Kaffee spendieren ---------- */
.coffee-card { text-align: center; background: linear-gradient(180deg, #fffdf7, #fff); border-color: #ecdfc4; }
.coffee-icon { font-size: 38px; line-height: 1; }
.coffee-card h2 { margin: 6px 0 4px; }
.coffee-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.coffee-amt { min-width: 72px; font-size: 17px; font-weight: 700; border-color: #e3c98f; color: var(--amber); }
.coffee-amt:hover { border-color: var(--amber); background: #fff7e9; }

/* ---------- Idee dahinter ---------- */
.idea-card p.sub { color: var(--ink); line-height: 1.6; margin: 0; font-size: var(--fs-base); }
.idea-card p.sub + p.sub { margin-top: 12px; }
.idea-card h2 { font-size: var(--fs-lg) !important; }
.idea-feedback-lead { font-weight: 600; }
.idea-feedback-btn { font-weight: 700; }
@media (min-width: 761px) {
  .idea-card p.sub { font-size: var(--fs-md); }
}

/* ---------- Login: Vorteile für angemeldete Nutzer ---------- */
.login-benefits { background: var(--teal-050); border-color: var(--teal-soft); }
.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-list li {
  position: relative; padding: 6px 0 6px 22px; font-size: var(--fs-base); color: var(--ink);
}
.benefit-list li::before {
  content: "✓"; position: absolute; left: 0; top: 6px; color: var(--teal); font-weight: 700;
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.mt { margin-top: var(--sp-4); }
.mb { margin-bottom: var(--sp-4); }
.stack > * + * { margin-top: 10px; }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }
.error-box { background: #fdecec; color: var(--red); border: 1px solid #f0caca; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 13px; }

/* ---------- Soziales (Personen, Kreise) ---------- */
.person-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.person-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-name { font-weight: 700; }
.person-meta { font-size: var(--fs-sm); color: var(--muted); }
.avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-soft); color: var(--teal-dark); font-weight: 800; font-size: 16px;
}
.avatar-verein { background: #fef3e2; color: var(--amber); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  min-height: 32px; padding: 5px 12px; cursor: pointer;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.chip-on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip-on:hover { color: #fff; }
.chip input { width: auto; min-height: 0; margin: 0 4px 0 0; accent-color: var(--teal); }

/* ---------- QR-Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 25, 22, .5);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 70;
}
.modal-card {
  position: relative; background: #fff; border-radius: 16px; padding: 22px;
  max-width: 340px; width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.modal-close {
  position: absolute; top: 8px; right: 8px; border: 0; background: transparent;
  width: 36px; height: 36px; border-radius: 999px;
  font-size: 18px; cursor: pointer; color: var(--muted);
}
.modal-close:hover { background: var(--bg); }
.qr-box { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.qr-box img, .qr-box canvas { border-radius: 8px; }

/* ---------- Kreis-Typen ---------- */
.circle-group { margin-bottom: 14px; }
.circle-group-h {
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .01em;
  color: var(--muted); margin: 12px 0 6px;
}
.add-circle-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.add-circle-row input { flex: 1 1 160px; min-width: 140px; }
.add-circle-row select { flex: 0 1 auto; }
@media (max-width: 480px) {
  .add-circle-row input, .add-circle-row select, .add-circle-row .btn { flex: 1 1 100%; }
}

/* ---------- Netzwerk: Überschriften ---------- */
.net-sect-h { font-size: 16px; margin: var(--sp-5) 0 8px; }
.net-sub-h { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin: var(--sp-4) 0 6px; }
.net-col-h { font-size: 17px; margin: 0 0 2px; }

/* ---------- Netzwerk: Zwei Spalten ---------- */
.net-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
.net-col { min-width: 0; }
.net-col > .sub { margin: 0 0 10px; }
@media (max-width: 760px) { .net-cols { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* Breakout: auf großen Screens darf das Netzwerk breiter sein als der Container */
@media (min-width: 900px) {
  .net-cols {
    width: min(1040px, calc(100vw - 48px));
    margin-left: calc((100% - min(1040px, calc(100vw - 48px))) / 2);
  }
}

/* ---------- Kreis-Karte ---------- */
.circle-card { margin: 0 0 14px; }
.circle-acts { display: flex; gap: 4px; }
.circle-acts .btn { padding: 4px 10px; min-height: 32px; }
.circle-members { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mchip { font-size: var(--fs-xs); font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); }
.circle-addbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.circle-addbar .hint { font-size: var(--fs-xs); color: var(--muted); }
.circle-connectbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.circle-connectbar .hint { font-size: var(--fs-xs); color: var(--muted); }
.circle-pending { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.circle-pending .hint { font-size: var(--fs-xs); color: var(--muted); }
.mchip-pending { background: var(--line); color: var(--muted); font-style: italic; }
.mchip-member { display: inline-flex; align-items: center; gap: 6px; }
.mchip-member .cc-invite-other { font-size: var(--fs-xs); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 2px 6px; max-width: 160px; }
.circle-default { border-color: var(--teal); }
.circle-default .pill { background: var(--teal-soft); color: var(--teal-dark); }

/* ---------- Feed ---------- */
.feed-h { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 6px; }
.feed { display: grid; gap: 8px; }
.feed-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.feed-item:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.feed-title { font-weight: 700; font-size: 14px; }
.feed-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

/* ---------- Kreis-Chat ---------- */
.chat-toggle { margin-top: 8px; }
.chat-wrap { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.chat-msgs { max-height: 220px; overflow-y: auto; display: grid; gap: 6px; padding-right: 2px; }
.msg { font-size: 14px; background: var(--teal-050); border-radius: var(--radius-sm); padding: 7px 11px; }
.msg.mine { background: var(--teal-soft); }
.msg-who { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.msg-text { display: block; }
.chat-input { display: flex; gap: 6px; margin-top: 8px; }
.chat-field { flex: 1; min-width: 0; }

/* ---------- Kreis erstellen ---------- */
.create-circle { margin: 4px 0 0; background: #fbfdfc; }
.create-circle input, .create-circle select { width: 100%; }
.cc-members { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.cc-members .chip, .ann-circles .chip, .aud-check { cursor: pointer; }

/* ---------- Ankündigungen ---------- */
.ann-compose textarea, .ann-compose { margin-bottom: 0; }
.ann-compose textarea { width: 100%; margin-bottom: 8px; }
.ann-circles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.ann-item { margin: 0; }
.ann-from { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ann-body { font-size: 14px; }

/* ---------- Gesuch-Formular: Zielgruppe ---------- */
.aud-field { display: block; }
.aud-group { margin: 8px 0; }
.aud-group-h { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.aud-check { font-weight: 500; margin: 5px 0; }

/* ---------- Meine Gesuche: Fußzeile mit Löschen ---------- */
.mine-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Netzwerk: Verbinden-Aufruf (leerer Zustand) ---------- */
.net-connect-cta { background: linear-gradient(180deg, #f4faf9, #ffffff); border-color: #cfe4e0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Feed (gerankte Startansicht) ---------- */
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feed-sect-h { font-size: 15px; margin: var(--sp-5) 0 8px; }
.feed-list { display: grid; gap: 10px; }
.feed-card { display: block; text-decoration: none; color: inherit; margin: 0; }
a.feed-card:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.feed-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.feed-card-title { font-weight: 700; font-size: var(--fs-base); }
.feed-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.feed-card .feed-meta { font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; }
.feed-ann-body { font-size: 14px; margin-top: 6px; }
.feed-why { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }
.feed-why-k { font-weight: 700; }
.empty-card { text-align: center; display: grid; gap: 10px; justify-items: center; }

/* Neu-Punkt (Akzent, NICHT rot – Rot bleibt „urgent" vorbehalten) */
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; vertical-align: middle; }

/* Kreis-Badge: Farbe nur als Akzent (Punkt + Rand), immer mit Icon + Label */
.cbadge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink);
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.cbadge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--teal)); flex: none; }
.cbadge-ann { background: var(--teal-050); }
.cbadge-ann::before { background: var(--muted); }
.cbadge-lg { font-size: var(--fs-md); padding: 5px 13px; }
.cbadge-lg::before { width: 11px; height: 11px; }

/* ---------- Netzwerk: kompakte Kreisliste ---------- */
.circle-list { display: grid; gap: 8px; margin-bottom: 12px; }
.circle-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.circle-row.is-default { border-color: var(--line-strong); background: #fbfdfc; }
.circle-row-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.circle-row-link:hover .circle-row-name { color: var(--teal-dark); }
.circle-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--teal)); flex: none; }
.circle-row-icon { font-size: 18px; flex: none; }
.circle-row-main { min-width: 0; display: grid; }
.circle-row-name { font-weight: 700; font-size: var(--fs-base); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.circle-row-meta { font-size: var(--fs-xs); color: var(--muted); }
.circle-prio-wrap { display: flex; align-items: center; gap: 6px; flex: none; }
.circle-prio-wrap .hint { display: none; }
.circle-prio { font-size: var(--fs-xs); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 4px 8px; max-width: 140px; }
@media (min-width: 560px) { .circle-prio-wrap .hint { display: inline; } }

/* ---------- Kreis-Detail (#/kreis/:id) ---------- */
.circle-detail.circle-default { border-color: var(--line-strong); }
.cd-head { flex-wrap: wrap; gap: 8px; align-items: center; }
.cd-controls { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0 2px; }
.cd-ctrl { display: flex; align-items: center; gap: 8px; }
.cd-ctrl select { font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 4px 8px; }
.cd-ctrl input[type="color"] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.cd-sub { font-size: 15px; margin: 16px 0 6px; }
