/* Freunde Andertens e.V. – Entwurf im neuen Erscheinungsbild (Lila, Gelb, Grün, Schlaufen) */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- Farben ---------- */
:root {
  --bg: #faf8fc;
  --surface: #ffffff;
  --surface-2: #efe9fb;
  --ink: #2f2833;
  --muted: #5e5468;
  --line: #ddd4ea;
  --link: #5a3ea6;
  --lila: #b8a4e6;
  --gelb: #fff200;
  --gruen: #b5dc00;
  --rosa: #ecc9cf;
  --k5: #3fb3c4;
  --k6: #f09a4a;
  --k7: #6f87f2;
  --k8: #b9ad93;
  --schraffur: #2b3f8f;
  --on-farbe: #2f2833;          /* Text auf Gelb, Grün, Lila */
  --hero-bg: #9d86d8;
  --hero-ink: #1c1720;
  --hero-head: #ffffff;
  --hero-kasten-bg: rgb(255 255 255 / .92);   /* Textkasten und Steuerung über dem Bilderkarussell */
  --vorschlag: #d9480f;
  --platzhalter-bg: #fff6b0;
  --shadow: 0 1px 2px rgb(47 40 51 / .06), 0 8px 24px rgb(47 40 51 / .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #19161e;
    --surface: #231f2a;
    --surface-2: #2c2638;
    --ink: #f1edf5;
    --muted: #b9b0c4;
    --line: #3b3448;
    --link: #cdbcff;
    --lila: #8d77c9;
    --gelb: #f2e600;
    --gruen: #a8cc00;
    --rosa: #c9a3aa;
  --k5: #2f97a6;
  --k6: #d9853a;
  --k7: #7f95ff;
  --k8: #9a8f78;
    --schraffur: #1b2a66;
    --on-farbe: #221d27;
    --hero-bg: #3a2f55;
    --hero-ink: #ece6f7;
    --hero-head: #ffffff;
    --hero-kasten-bg: rgb(35 31 42 / .9);
    --vorschlag: #ff8a50;
    --platzhalter-bg: #4a4410;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #19161e;
  --surface: #231f2a;
  --surface-2: #2c2638;
  --ink: #f1edf5;
  --muted: #b9b0c4;
  --line: #3b3448;
  --link: #cdbcff;
  --lila: #8d77c9;
  --gelb: #f2e600;
  --gruen: #a8cc00;
  --rosa: #c9a3aa;
  --k5: #2f97a6;
  --k6: #d9853a;
  --k7: #7f95ff;
  --k8: #9a8f78;
  --schraffur: #1b2a66;
  --on-farbe: #221d27;
  --hero-bg: #3a2f55;
  --hero-ink: #ece6f7;
  --hero-head: #ffffff;
  --hero-kasten-bg: rgb(35 31 42 / .9);
  --vorschlag: #ff8a50;
  --platzhalter-bg: #4a4410;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.12; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 8vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.h1-klein { font-size: clamp(2rem, 6vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 42rem; }
.muted { color: var(--muted); }
.kicker {
  font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 .6rem;
}

/* ---------- Entwurfsbanner und Markierungen ---------- */
.entwurf {
  background: #2f2833; color: #faf8fc;   /* bewusst in beiden Modi gleich */
  font-size: .85rem; padding: .5rem 0;
}
.entwurf .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.entwurf strong { color: #fff200; }
.entwurf .v { border-bottom: 2px dashed var(--vorschlag); }
.entwurf .ph { background: var(--platzhalter-bg); color: var(--ink); padding: 0 .3em; border-radius: 3px; }
.vorschlag { outline: 2px dashed var(--vorschlag); outline-offset: 4px; border-radius: 2px; }
.ph { background: var(--platzhalter-bg); color: var(--ink); padding: 0 .3em; border-radius: 3px; }

/* ---------- Kopf und Navigation ---------- */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.1; }
.logo {
  display: block; width: 74px; aspect-ratio: 1024 / 604; background: var(--ink);
  -webkit-mask: url("img/logo-maske.png") center / contain no-repeat;
          mask: url("img/logo-maske.png") center / contain no-repeat;
}
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
/* Navigation als Buttons: Rahmen und Fläche, Gelb beim Drüberfahren, aktuelle Seite dunkel gefüllt */
.nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: .45rem .95rem; border-radius: 999px;
  color: var(--ink); background: var(--surface); border: 2px solid var(--line);
  text-decoration: none; font-weight: 600; font-size: .93rem; line-height: 1.2;
  box-shadow: 0 1px 2px rgb(47 40 51 / .06);
  transition: background-color .15s, border-color .15s, color .15s;
}
.nav a:hover { background: var(--gelb); border-color: var(--gelb); color: var(--on-farbe); }
.nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (max-width: 720px) {
  .site-head { position: static; }
  .nav { width: 100%; gap: .35rem; }
  .nav a { padding: .4rem .8rem; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) { .nav a { transition: none; } }

/* ---------- Bühne mit Schlaufen ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; padding: clamp(1.5rem, 4.5vw, 2.75rem) 0; }
.hero h1 { color: var(--hero-head); text-shadow: 0 1px 0 rgb(0 0 0 / .04); max-width: 18ch; font-size: clamp(1.9rem, 5vw, 3.1rem); margin-bottom: .35em; }
.hero .lead { font-size: clamp(1rem, 1.9vw, 1.12rem); max-width: 34rem; }
.hero .claim { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin-bottom: .5rem; }
.hero .wrap > :last-child { margin-bottom: 0; }
.hero-small .wrap { padding: clamp(1.25rem, 3.5vw, 2.1rem) 0; }
.hero-small h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); max-width: none; }
.schlaufen { position: absolute; top: 0; right: 0; width: min(46%, 560px); height: 100%; pointer-events: none; }
.schlaufen .s-gelb { stroke: var(--gelb); }
.schlaufen .s-gruen { stroke: var(--gruen); }
.schlaufen .s-rosa { stroke: var(--rosa); }
.schlaufen .s-schraffur { stroke: var(--schraffur); }
.schlaufen .f-gruen { fill: var(--gruen); }
.hero .wrap > * { max-width: min(36rem, 56%); }
@media (max-width: 720px) {
  .schlaufen { width: 100%; height: 80px; top: 0; }
  .hero .wrap { padding-top: 88px; }
  .hero .wrap > * { max-width: none; }
}

/* Startseite: Bilderkarussell im Kopf (in Seitenbreite, etwa 2,2 : 1), Text kleiner in einem Kasten davor */
.hero-bilder .wrap { padding: clamp(1rem, 3vw, 2rem) 0; }
.hero-bilder .wrap > * { max-width: none; }
.hero-bilder .schlaufen { width: min(40%, 520px); }
.karussell-rahmen { position: relative; aspect-ratio: 11 / 5; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); display: flex; align-items: flex-end; padding: clamp(.75rem, 2.5vw, 1.5rem); }
.karussell { position: absolute; inset: 0; }
.karussell .dia { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.karussell .dia.ist-aktiv { opacity: 1; }
.karussell .dia-oben { object-position: 50% 20%; }   /* Ausschnitt weiter oben, z. B. wenn sonst Köpfe abgeschnitten werden */
.hero-kasten { position: relative; background: var(--hero-kasten-bg); color: var(--ink); border-radius: 18px; padding: clamp(.9rem, 2.2vw, 1.4rem) clamp(1rem, 2.6vw, 1.6rem); max-width: 30rem; box-shadow: var(--shadow); }
.hero-bilder .hero-kasten h1 { color: var(--ink); text-shadow: none; font-size: clamp(1.4rem, 3vw, 2rem); }
.hero-bilder .hero-kasten .lead { font-size: .93rem; margin-bottom: 0; }
.hero-bilder .hero-kasten .claim { color: var(--link); }
/* Startseite: Wegweiser-Kacheln neben „Wer wir sind“ */
.wegweiser { display: grid; gap: .75rem; }
.wegweiser .card-link { padding: 1rem 1.2rem; }
.wegweiser h3 { margin-bottom: .2rem; }
.wegweiser h3::after { content: " →"; color: var(--link); }
.wegweiser p { font-size: .95rem; }
.karussell-steuerung { position: absolute; right: clamp(.75rem, 2.5vw, 1.5rem); bottom: clamp(.75rem, 2.5vw, 1.5rem); z-index: 1; display: flex; align-items: center; gap: .6rem; background: var(--hero-kasten-bg); border-radius: 999px; padding: .35rem .5rem .35rem .8rem; }
.karussell-steuerung[hidden] { display: none; }
.karussell-pause { font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink); background: none; border: 0; cursor: pointer; padding: .2rem .3rem; }
.karussell-punkte { display: flex; gap: .4rem; }
.karussell-punkte button { width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--ink); background: transparent; padding: 0; cursor: pointer; }
.karussell-punkte button[aria-current="true"] { background: var(--ink); }
/* Schmalere Bildschirme: Bild oben, Text darunter statt darüber */
@media (max-width: 860px) {
  .karussell-rahmen { aspect-ratio: auto; display: block; padding: 0; background: var(--surface); }
  .karussell { position: relative; aspect-ratio: 16 / 9; }
  .hero-kasten { max-width: none; border-radius: 0; box-shadow: none; background: var(--surface); }
  .karussell-steuerung { right: .6rem; bottom: .6rem; }
}
@media (max-width: 720px) {
  .hero-bilder .wrap { padding-top: 88px; }
}
@media (prefers-reduced-motion: reduce) { .karussell .dia { transition: none; } }

.btn {
  display: inline-block; padding: .65rem 1.15rem; border-radius: 999px; font-weight: 600;
  text-decoration: none; background: var(--gelb); color: var(--on-farbe); border: 2px solid var(--on-farbe);
}
.btn:hover { background: var(--gruen); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* ---------- Abschnitte ---------- */
section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.tint { background: var(--surface-2); }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
/* Karte über alle Spalten, z. B. allein in der letzten Reihe */
@media (min-width: 640px) { .grid > .ganze-zeile { grid-column: 1 / -1; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--lila); transform: translateY(-2px); }
.card .meta { color: var(--muted); font-size: .92rem; margin-bottom: .5rem; }
/* Mitmachen: Themenkacheln mit Beispielen */
/* Alle Kacheln gleich hoch (auch über die Reihen hinweg); „Mehr erfahren“ steht jeweils unten */
.themen { align-items: stretch; }
@media (min-width: 640px) { .themen { grid-auto-rows: 1fr; } }
.themen > div.thema, .themen > .thema-ideen { display: flex; flex-direction: column; }
.themen > div.thema .tag, .themen > .thema-ideen .tag { align-self: flex-start; }
.themen > div.thema .thema-auf, .themen > .thema-ideen .mehr { margin-top: auto; }
/* Mit JavaScript werden die Kacheln zu Karten, die ein Fenster öffnen (site.js); ohne klappen sie auf */
div.thema { cursor: pointer; transition: border-color .15s, transform .15s; }
div.thema:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { div.thema { transition: none; } div.thema:hover { transform: none; } }
button.thema-auf { font: inherit; font-size: .95rem; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; align-self: flex-start; }
button.thema-auf:hover { text-decoration: underline; text-underline-offset: .15em; }
div.thema .thema-auf::after { transform: rotate(-45deg); }
.thema-fenster { overflow: hidden; }
.thema-fenster .tag { margin-bottom: .5rem; }
.thema-fenster-einleitung { margin: 0 0 1.1rem; }
.thema-fenster .beispiele-titel { margin-top: 0; }
.thema-fenster .mehr { margin: .75rem 0 0; font-size: .95rem; }
.thema > summary { list-style: none; cursor: pointer; }
.thema > summary::-webkit-details-marker { display: none; }
.thema > summary p { margin-bottom: .5rem; }
.thema-kurz { font-size: .92rem; color: var(--muted); }
.thema-auf { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .95rem; color: var(--link); }
.thema-auf::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.thema[open] .thema-auf::after { transform: rotate(-135deg) translate(-2px, 0); }
.thema[open] .thema-kurz { display: none; }
.thema:hover { border-color: var(--lila); }
.beispiele-titel { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .3rem; }
.beispiele { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.beispiele li { padding: .55rem 0; border-top: 1px solid var(--line); }
.beispiele .naechstes { margin: .25rem 0 0; font-size: .88rem; }
.card .mehr { margin-top: .9rem; font-size: .95rem; }
.card.thema-ideen { background: var(--gruen); color: var(--on-farbe); border-color: var(--gruen); }
.card.thema-ideen .tag { background: var(--surface); color: var(--ink); }
.card.thema-ideen .mehr { font-weight: 600; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); margin-bottom: .6rem;
}
.tag.gelb { background: var(--gelb); color: var(--on-farbe); }
.tag.gruen { background: var(--gruen); color: var(--on-farbe); }
.tag.lila { background: var(--lila); color: var(--on-farbe); }

/* Highlight auf der Startseite (News oder besondere Veranstaltung) */
.highlight-bereich { padding-bottom: clamp(2rem, 5vw, 3rem); }
.highlight-bereich .wrap { display: grid; gap: .75rem; }
.highlight {
  position: relative; overflow: hidden; border-radius: 20px;
  background: var(--lila); color: var(--on-farbe);
  padding: clamp(1rem, 3vw, 1.35rem) clamp(1.1rem, 3.5vw, 1.75rem);
}
.highlight-schlaufe { position: absolute; right: -10px; top: 0; width: min(22%, 170px); height: 100%; pointer-events: none; opacity: .8; }
.highlight-schlaufe .s-gelb { stroke: var(--gelb); }
.highlight-schlaufe .s-rosa { stroke: var(--rosa); }
.highlight-inhalt { position: relative; display: grid; gap: .3rem; justify-items: start; padding-right: min(18%, 140px); }
.highlight-kicker {
  margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--gelb); color: var(--on-farbe); padding: .12rem .55rem; border-radius: 999px;
}
.highlight-titel { margin: 0; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.highlight-wann { margin: 0; font-weight: 600; font-size: .95rem; }
.highlight-text {
  margin: 0; font-size: .95rem; max-width: 42rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
/* Klick auf die Box oder „Weiterlesen“ öffnet ein Fenster mit allem (site.js) */
.highlight.hat-fenster { cursor: pointer; }
.highlight.hat-fenster:hover .highlight-titel { text-decoration: underline; text-underline-offset: .15em; }
.hl-fenster-wann { margin: 0 0 .9rem; font-weight: 600; }
.hl-fenster-bild { display: block; width: auto; max-width: 100%; max-height: min(24rem, 50vh); border-radius: 14px; margin: 0 auto 1rem; } /* ganz, nicht zugeschnitten */
.hl-fenster-text { margin: 0 0 1rem; white-space: pre-line; } /* Absätze wie im Kalender */
.thema-fenster .btns { margin-top: .5rem; }
.highlight .highlight-mehr { margin-top: -.2rem; color: var(--on-farbe); justify-self: start; align-self: start; }
.highlight .btn { margin-top: .35rem; padding: .45rem 1rem; font-size: .92rem; }
.highlight .btn[hidden] { display: none; }
.highlight a:not(.btn) { color: var(--on-farbe); }
/* Breit: Knopf rechts neben dem Text statt darunter */
@media (min-width: 760px) {
  .highlight-inhalt { grid-template-columns: 1fr auto; column-gap: 1.5rem; }
  .highlight-inhalt > * { grid-column: 1; }
  .highlight-inhalt > .btn { grid-column: 2; grid-row: 1 / span 5; align-self: center; margin-top: 0; }
}
@media (max-width: 720px) { .highlight-schlaufe { opacity: .3; width: 40%; } .highlight-inhalt { padding-right: 0; } }
/* Highlight mit Bild zur Veranstaltung: schmal Bild oben, breit links neben dem Text */
.highlight.mit-bild { display: grid; gap: .9rem 1.5rem; }
.highlight-bild { position: relative; display: block; justify-self: start; }
.highlight-bild img { display: block; width: auto; max-width: 100%; max-height: 15rem; border-radius: 14px; } /* ganz, nicht zugeschnitten */
@media (min-width: 760px) {
  .highlight.mit-bild { grid-template-columns: minmax(0, 16rem) 1fr; align-items: center; }
  .highlight.mit-bild .highlight-bild { justify-self: center; }
}

/* Termine */
.termin { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1rem; align-items: start; }
.datum {
  background: var(--gelb); color: var(--on-farbe); border-radius: 14px; text-align: center;
  padding: .55rem .2rem; font-weight: 600; line-height: 1.05;
}
.datum .tag-nr { display: block; font-size: 1.7rem; letter-spacing: -.03em; }
.datum .monat { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.datum.offen { background: var(--surface-2); color: var(--ink); }
.datum.gruen { background: var(--gruen); }
.datum.lila { background: var(--lila); }
/* Datumsfarben wechseln von Karte zu Karte: Gelb, Grün, Lila; bei lila Datum wird das Rhythmus-Etikett gelb */
.termin:not(.vergangen):nth-child(3n+2) .datum:not(.offen) { background: var(--gruen); }
.termin:not(.vergangen):nth-child(3n) .datum:not(.offen) { background: var(--lila); }
.termin:not(.vergangen):nth-child(3n) .rhythmus { background: var(--gelb); }
.termin-liste { display: grid; gap: 1rem; }
/* Veranstaltungen und Rückblick: Kacheln gleich hoch, lange Beschreibungen aufklappbar („Weiterlesen“) */
.gleich-hoch { grid-auto-rows: 1fr; }
.gleich-hoch:has(.termin.offen) { grid-auto-rows: auto; }
.gleich-hoch .termin-text {
  margin: 0; white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.gleich-hoch .termin.offen .termin-text { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.mehr-knopf {
  margin-top: .35rem; padding: 0; border: 0; background: none; font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--link); text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.mehr-knopf[hidden] { display: none; }
/* „Regelmäßig bei uns“: Rhythmus als deutliches Etikett über dem Titel */
.termin .rhythmus { margin-bottom: .4rem; }
.mehr-knopf:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* Klick auf Karte oder Kalenderzeile öffnet das Fenster mit allen Angaben (der Link im Titel reicht über die ganze Fläche) */
.termin:has(.termin-link), .kal:has(.termin-link) { position: relative; }
.termin-link { color: inherit; text-decoration: none; }
.termin-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.termin-link:focus-visible { outline: none; }
.termin:has(.termin-link:focus-visible), .kal:has(.termin-link:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.termin:has(.termin-link):hover { border-color: var(--ink); }
.termin:has(.termin-link):hover .termin-link, .kal:has(.termin-link):hover .termin-link { text-decoration: underline; text-underline-offset: .15em; }
.kal:has(.termin-link):hover { background: var(--surface-2); }
.termin .mehr-knopf { position: relative; z-index: 1; }
/* Bilder nie zuschneiden (oft Plakate mit Schrift): ganz zeigen, Höhe begrenzt */
.termin-bild { display: block; width: auto; max-width: 100%; max-height: 16rem; border-radius: 12px; margin: 0 auto .7rem; }
#start-termine .termin-bild { display: none; }

/* Fenster mit allen Angaben zu einem Termin (eigene Adresse: termine.html#termin-…) */
.termin-fenster { overflow: hidden; }
.tf-innen { display: grid; gap: 1rem; max-height: calc(100dvh - 1.5rem); overflow-y: auto; padding: 1.25rem clamp(1rem, 4vw, 1.75rem) 1.5rem; }
.tf-verein { display: flex; align-items: center; gap: .45rem; margin: 0 0 .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tf-verein::before { content: ""; flex: none; width: .65rem; height: .65rem; border-radius: 50%; background: var(--verein); box-shadow: 0 0 0 1px var(--line); }
.tf-verein:empty { display: none; }
.tf-hinweis { margin: 0; padding: .55rem .8rem; border-radius: 10px; background: var(--surface-2); font-weight: 600; }
.tf-bild { display: block; }
.tf-bild img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.tf-daten { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.tf-daten dt { font-weight: 600; }
.tf-daten dd { margin: 0; }
.tf-text { white-space: pre-line; line-height: 1.6; }
.tf-text:empty { display: none; }
.tf-knoepfe { margin-top: 0; }
.tf-adresse { font: inherit; font-size: .85rem; width: 100%; padding: .45rem .6rem; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
/* Termine-Seite: Veranstaltungen und Regelmäßige Treffen nebeneinander */
.zwei-spalten { display: grid; gap: 2.5rem; }
.zwei-spalten .section-head { margin-bottom: .5rem; }
.treffen-liste { display: grid; gap: 1rem; }
@media (min-width: 860px) { .zwei-spalten { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; } }
/* Startseite: „Nächste Termine“ kompakt (kleine Datumskachel, Beschreibung einzeilig) */
section:has(#start-termine) { padding-block: clamp(1.75rem, 4vw, 2.5rem); }
section:has(#start-termine) .section-head { margin-bottom: 1rem; }
#start-termine { gap: .75rem; }
#start-termine .termin { grid-template-columns: 3.1rem 1fr; gap: .75rem; padding: .75rem .9rem; box-shadow: none; }
#start-termine .datum { padding: .35rem .1rem; border-radius: 10px; }
#start-termine .datum .tag-nr { font-size: 1.25rem; }
#start-termine .datum .monat { font-size: .68rem; }
#start-termine h3 { font-size: 1.02rem; margin-bottom: .1rem; }
#start-termine .meta { font-size: .85rem; margin-bottom: .2rem; }
#start-termine .termin p:not(.meta) { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--muted); }
#start-termine .termin > div { min-width: 0; }
.vergangen { box-shadow: none; }
.vergangen .datum { background: var(--surface-2); color: var(--muted); }
/* Gemeinsamer Kalender der Anderter Vereine: eine Farbe pro Verein, vergeben in der Reihenfolge von kalender/vereine.php */
.f1 { --verein: var(--gelb); }
.f2 { --verein: var(--gruen); }
.f3 { --verein: var(--lila); }
.f4 { --verein: var(--rosa); }
.f5 { --verein: var(--k5); }
.f6 { --verein: var(--k6); }
.f7 { --verein: var(--k7); }
.f8 { --verein: var(--k8); }
.beispiel-hinweis { font-size: .9rem; }
.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 1.5rem; }
.chip {
  font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .85rem; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--verein);
}
.chip::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--verein); }
.chip[aria-pressed="false"] { opacity: .55; border-style: dashed; }
.chip[aria-pressed="false"]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--verein); }
.chip:focus-visible, .btn:focus-visible, .nav a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.kalender { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .5rem 1.25rem 1rem; }
.monat-titel { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.1rem 0 .3rem; }
.kal-liste { list-style: none; margin: 0; padding: 0; }
.kal {
  display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .25rem 1rem; align-items: baseline;
  padding: .6rem 0 .6rem .9rem; border-bottom: 1px solid var(--line);
  border-left: 5px solid var(--verein); margin-bottom: .35rem; border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.kal-datum { font-weight: 600; }
.kal-text { min-width: 0; }
.kal-verein { font-size: .82rem; color: var(--muted); }
.kal-beschreibung {
  grid-column: 2 / -1; grid-row: 2; min-width: 0; color: var(--muted); font-size: .92rem; line-height: 1.45;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
@media (max-width: 640px) {
  .kal { grid-template-columns: 1fr; }
  .kal-verein { order: -1; }
  .kal-beschreibung { grid-column: auto; grid-row: auto; }
}
/* Umschalter Liste / Monat */
.kopf-aktionen { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
/* Kalender abonnieren: aufklappbares Menü */
.abo { position: relative; }
.abo > summary { list-style: none; cursor: pointer; }
.abo > summary::-webkit-details-marker { display: none; }
.abo > summary::after { content: " ▾"; }
.abo[open] > summary::after { content: " ▴"; }
.abo-menue {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; width: min(26rem, calc(100vw - 2rem));
  display: grid; gap: .5rem; padding: 1rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.abo-hinweis { margin: 0 0 .25rem; font-size: .9rem; color: var(--muted); }
.abo-vereine { border: 0; padding: 0; margin: 0 0 .25rem; min-width: 0; }
.abo-vereine legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: .35rem; }
.abo-haken { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.abo-haken .haken input { accent-color: var(--link); }
.abo-keiner { margin: .4rem 0 0; font-size: .88rem; font-weight: 600; color: var(--vorschlag); }
.abo-option.aus { opacity: .45; cursor: not-allowed; }
.abo-option {
  display: grid; gap: .15rem; padding: .7rem .85rem; border: 2px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; background: var(--surface);
}
a.abo-option:hover { border-color: var(--ink); }
a.abo-option:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.abo-option span { font-size: .88rem; color: var(--muted); }
.abo-zeile { display: flex; gap: .5rem; margin-top: .4rem; }
.abo-zeile input { flex: 1; min-width: 0; font: inherit; font-size: .85rem; padding: .45rem .6rem; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.abo-zeile .btn { padding: .45rem .9rem; }
@media (max-width: 640px) { .abo-menue { position: static; margin-top: .5rem; width: auto; } }
.umschalter { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 2px; background: var(--surface); }
.umschalter button {
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  border: 0; border-radius: 999px; padding: .4rem .95rem; background: transparent; color: var(--ink);
}
.umschalter button[aria-pressed="true"] { background: var(--gelb); color: var(--on-farbe); }
.umschalter button:focus-visible, .monat-pfeil:focus-visible, .tag-knopf:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* Monatsübersicht */
.monat-ansicht { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.25rem 1.25rem; }
.monat-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.monat-name { margin: 0; font-size: 1.25rem; }
.monat-pfeil {
  font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.monat-pfeil:hover:not(:disabled) { border-color: var(--lila); }
.monat-pfeil:disabled { opacity: .35; cursor: default; }
.monat-rahmen { overflow-x: auto; }
.monat-tabelle { table-layout: fixed; width: 100%; border-collapse: separate; border-spacing: 4px; font-size: .85rem; }
.monat-tabelle th { text-align: center; padding: .2rem 0; border: 0; }
.monat-tabelle td { padding: 0; border: 0; vertical-align: top; height: 6.2rem; }
.monat-tabelle td.leer { background: transparent; }
.tag-knopf {
  display: flex; flex-direction: column; gap: .2rem; width: 100%; height: 100%; text-align: left;
  font: inherit; color: var(--ink); background: var(--surface-2); border: 2px solid transparent;
  border-radius: 10px; padding: .3rem .35rem; overflow: hidden;
}
div.tag-knopf { background: transparent; border-color: var(--line); border-width: 1px; }
button.tag-knopf { cursor: pointer; }
button.tag-knopf:hover { border-color: var(--lila); }
button.tag-knopf[aria-pressed="true"] { border-color: var(--ink); }
.vorbei .tag-knopf { opacity: .5; }
.heute .tag-zahl { background: var(--gelb); color: var(--on-farbe); border-radius: 999px; padding: 0 .4rem; }
.tag-zahl { font-weight: 600; align-self: flex-start; font-variant-numeric: tabular-nums; }
.tag-termine { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tag-termin { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.tag-punkt { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--verein); box-shadow: 0 0 0 1px var(--line); }
.tag-titel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.tag-mehr { font-size: .75rem; color: var(--muted); }
.monat-detail { margin-top: 1rem; }
.monat-detail-titel { font-size: 1rem; margin: 0 0 .4rem; }
@media (max-width: 640px) {
  .monat-ansicht { padding: .75rem .5rem 1rem; }
  .monat-tabelle { border-spacing: 2px; }
  .monat-tabelle td { height: 3.4rem; }
  .tag-knopf { align-items: center; padding: .25rem .1rem; }
  .tag-zahl { align-self: center; }
  /* Auf schmalen Bildschirmen nur farbige Punkte, die Termine stehen nach Antippen darunter */
  .tag-termine { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .tag-titel, .tag-mehr { display: none; }
}
.naechstes { font-weight: 600; font-size: .95rem; margin-top: .4rem; }
.naechstes::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--gruen); margin-right: .45rem; }

/* Interner Bereich */
.intern-hero { background: var(--surface-2); color: var(--ink); }
.intern-hero h1 { color: var(--ink); }
.intern-hero.hero-small { padding-bottom: 1rem; }

/* Reiter im internen Bereich (intern.js); schmal seitlich wischbar, ohne die Seite zu verbreitern */
.reiter-leiste { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.reiter { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.25rem; }
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  flex: none; padding: .75rem .9rem .65rem; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: .95rem; color: var(--muted); border-bottom: 3px solid transparent;
}
.reiter a:hover { color: var(--ink); }
.reiter a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--link); }
.reiter a:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; border-radius: 6px; }
.reiter-titel { margin-bottom: .4rem; }
.reiter-einleitung { color: var(--muted); max-width: 46rem; margin-bottom: 1.25rem; }
.section-head .reiter-titel { margin-bottom: 0; }

/* Statistik im internen Bereich: eine Datenreihe in der Linkfarbe, Zahlen immer als Text daneben */
.st-zeitraum { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.st-zeitraum .chip { --verein: var(--line); padding: .3rem .8rem; }
.st-zeitraum .chip::before { display: none; }
.st-zeitraum .chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.st-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .st-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-kachel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .1rem; }
.st-kachel strong { font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.st-kachel span { font-size: .85rem; color: var(--muted); }
.st-karte { margin-bottom: 1rem; min-width: 0; }
.st-karte h3 { margin-bottom: .5rem; }
.st-karte > .feld-hilfe { margin-bottom: .8rem; }
.st-raster { display: grid; gap: 0 1rem; }
@media (min-width: 860px) { .st-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-unter { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.st-balken { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.st-balken li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .75rem; font-size: .92rem; }
.st-name { overflow-wrap: anywhere; }
.st-wert { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.st-wert small { font-weight: 400; color: var(--muted); }
.st-spur { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.st-spur span { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--link); }
.st-saeulen { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; height: 12rem; padding-top: 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.st-s { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; outline: none; }
.st-saeule { display: block; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--link); }
.st-s:hover .st-saeule, .st-s:focus .st-saeule { opacity: .75; }
.st-achse { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: .3rem; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.st-saeulen { margin-bottom: 1.6rem; }
.st-tipp {
  position: absolute; bottom: calc(100% + .3rem); left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--ink); color: var(--surface); font-size: .8rem; font-weight: 600; padding: .25rem .5rem; border-radius: 6px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s;
}
.st-s { --tipp-y: 0; }
.st-s:hover .st-tipp, .st-s:focus .st-tipp { opacity: 1; }
.st-s:first-child .st-tipp { left: 0; transform: none; }
.st-s:last-child .st-tipp { left: auto; right: 0; transform: none; }
.st-geraet .haken { font-weight: 600; }
.liste + p { margin-top: .9rem; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }

/* Termine pflegen: Farbe je Art */
.a-veranstaltung { --art: var(--gelb); }
.a-treffen { --art: var(--gruen); }
.a-kurs { --art: var(--lila); }
.a-neuigkeit { --art: var(--rosa); }
.testmodus { border: 2px dashed var(--vorschlag); border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; background: var(--surface); }
.editor-meldung { border-left: 5px solid var(--gruen); background: var(--surface); padding: .6rem .9rem; border-radius: 8px; margin: 0 0 1rem; }
.editor-meldung.fehler { border-left-color: var(--vorschlag); font-weight: 600; }
.stoerung { border: 2px solid var(--vorschlag); border-left-width: 8px; border-radius: 12px; padding: 1rem 1.2rem; background: var(--surface); }
.stoerung strong { display: block; font-size: 1.1rem; margin-bottom: .4rem; }
.stoerung p { margin: 0 0 .5rem; }
.stoerung p:last-child { margin-bottom: 0; color: var(--muted); }
.editor-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; margin-bottom: .75rem; }
.editor-kopf .monat-kopf { margin: 0; }
.editor-kopf .monat-name { min-width: 9.5em; text-align: center; font-size: 1.5rem; }
.editor-kopf .kopf-aktionen { gap: .5rem; }
.art-legende { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; }
.art-legende li { display: inline-flex; align-items: center; gap: .4rem; }
.art-legende li::before { content: ""; width: .85rem; height: .85rem; border-radius: 3px; background: var(--art); box-shadow: 0 0 0 1px var(--line); }
.editor { transition: opacity .15s; }
.editor.laedt { opacity: .5; }
.ed-tabelle td { height: 7.2rem; }
.ed-zelle { position: relative; height: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.anderer-monat .ed-zelle { opacity: .45; }
.vorbei .ed-zelle { background: var(--bg); }
.gewaehlt .ed-zelle { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ed-neu {
  position: absolute; inset: 0; width: 100%; display: flex; justify-content: space-between; align-items: flex-start;
  padding: .3rem .4rem; font: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 10px; cursor: pointer; text-align: left;
}
.ed-neu:hover { background: var(--surface-2); }
.ed-neu:focus-visible, .ed-eintrag:focus-visible, .ed-mehr:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.ed-plus { opacity: 0; font-weight: 700; color: var(--muted); }
.ed-neu:hover .ed-plus, .ed-neu:focus-visible .ed-plus { opacity: 1; }
.ed-eintraege { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 1.75rem .25rem .25rem; pointer-events: none; }
.ed-eintraege > * { pointer-events: auto; }
.ed-eintrag {
  display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; width: 100%; min-width: 0;
  font: inherit; font-size: .78rem; text-align: left; color: var(--ink); cursor: pointer;
  background: var(--surface-2); border: 0; border-left: 4px solid var(--art); border-radius: 4px; padding: .12rem .3rem;
}
.ed-eintrag:hover { box-shadow: inset 0 0 0 2px var(--art); }
.ed-punkt { display: none; }
.ed-titel { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-mehr { font: inherit; font-size: .75rem; background: none; border: 0; color: var(--link); cursor: pointer; text-align: left; padding: 0 .3rem; }
.editor-tag { margin-top: 1.25rem; }
.editor-tag:empty { display: none; }
.editor-tag-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.editor-tag-kopf h3 { margin: 0; }
.ed-tagliste { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }
.ed-tagliste .ed-eintrag { font-size: 1rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--art); border-radius: 10px; }
.ed-tagliste .ed-titel { flex-basis: 100%; white-space: normal; font-weight: 600; }
.ed-meta { font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) {
  .editor-kopf .monat-name { font-size: 1.2rem; min-width: 8em; }
  .ed-tabelle td { height: 3.8rem; }
  .ed-plus { display: none; }
  .ed-eintraege { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; padding-top: 1.7rem; pointer-events: none; }
  .ed-eintraege > * { pointer-events: none; }
  /* Schmal: nur farbige Punkte; Antippen des Tages zeigt die Termine darunter */
  .ed-tabelle .ed-eintrag { width: .6rem; height: .6rem; padding: 0; border: 0; border-radius: 50%; background: var(--art); box-shadow: 0 0 0 1px var(--line); }
  .ed-tabelle .ed-titel, .ed-tabelle .ed-mehr { display: none; }
}

/* Formularfenster */
.termin-dialog {
  width: min(44rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 0;
  border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .35);
}
.termin-dialog::backdrop { background: rgb(20 16 26 / .55); }
#termin-form { padding: 1.25rem clamp(1rem, 4vw, 1.75rem) 0; display: grid; gap: 1.1rem; }
.dialog-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dialog-kopf h2 { margin: 0; font-size: 1.5rem; }
.dialog-zu {
  flex: none; font: inherit; font-size: 1.6rem; line-height: 1; width: 2.4rem; height: 2.4rem; cursor: pointer;
  border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.dialog-zu:hover { border-color: var(--ink); }
.termin-dialog fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.termin-dialog legend { font-weight: 600; padding: 0; margin-bottom: .45rem; }
.form-felder { display: grid; gap: 1.2rem; }
.ohne-art .form-felder > :not(.art-wahl) { display: none; }
.art-wahl { display: grid; gap: .5rem; }
@media (min-width: 560px) { .art-wahl { grid-template-columns: 1fr 1fr; } }
.art-karte {
  position: relative; display: grid; gap: .15rem; cursor: pointer;
  padding: .7rem .85rem .75rem 2.3rem; border: 2px solid var(--line); border-radius: 14px; background: var(--surface);
}
.art-karte::before { content: ""; position: absolute; left: .8rem; top: .95rem; width: .9rem; height: .9rem; border-radius: 50%; background: var(--art); box-shadow: 0 0 0 1px var(--line); }
.art-karte input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.art-karte:hover { border-color: var(--muted); }
.art-karte:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.art-karte:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.art-name { font-weight: 600; }
.art-text { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.feld { display: grid; gap: .3rem; min-width: 0; }
.feld > label { font-weight: 600; font-size: .95rem; }
.feld input, .feld select, .feld textarea {
  font: inherit; width: 100%; padding: .55rem .7rem; border: 2px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
}
.feld textarea { resize: vertical; min-height: 6rem; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.termin-dialog [aria-invalid="true"] { border-color: var(--vorschlag); }
.feld-hilfe { margin: 0; font-size: .85rem; color: var(--muted); }
.bild-feld { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.bild-feld img { max-width: 14rem; max-height: 9rem; border-radius: 10px; object-fit: contain; background: var(--surface-2); }
.bild-feld .btn-loeschen { margin-left: 0; }
.feld-gruppe { display: grid; gap: .6rem; }
.feld-reihe { display: flex; flex-wrap: wrap; gap: .75rem; }
.feld-reihe > .feld { flex: 1 1 9rem; }
.feld-raster { display: grid; gap: .75rem; }
@media (min-width: 560px) { .feld-raster { grid-template-columns: 1fr 1fr; } }
.haken { display: flex; align-items: center; gap: .55rem; font-size: .95rem; cursor: pointer; }
.haken input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--link); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-fehler { margin: 0; padding: .6rem .8rem; border-radius: 8px; border-left: 5px solid var(--vorschlag); background: var(--surface-2); font-weight: 600; }
.dialog-fuss, .loeschen-frage {
  position: sticky; bottom: 0; z-index: 1; background: var(--surface);
  border-top: 1px solid var(--line); padding: .85rem 0 1.25rem;
}
.dialog-fuss { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn-loeschen { margin-left: auto; font: inherit; font-weight: 600; background: none; border: 0; color: var(--vorschlag); text-decoration: underline; cursor: pointer; padding: .5rem; }
.loeschen-frage p { margin: 0; font-weight: 600; }
.loeschen-frage .btns { margin-top: .75rem; }
.btn.btn-gefahr { background: var(--vorschlag); color: var(--surface); border-color: var(--vorschlag); }
.reihe-wahl p { margin: 0; }
.wahl-knoepfe { display: grid; gap: .6rem; margin: .9rem 0 1.25rem; }
.wahl {
  display: grid; gap: .2rem; font: inherit; text-align: left; color: var(--ink); cursor: pointer;
  padding: .85rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--surface);
}
.wahl:hover { border-color: var(--ink); }
.wahl:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.wahl span { color: var(--muted); font-size: .9rem; }

/* Zugänge */
.zugang-raster { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 860px) { .zugang-raster { grid-template-columns: 1fr 1.4fr; } }
.zugang-form { display: grid; gap: .9rem; margin-top: 1rem; }
.zugang-form .feld-reihe { flex-wrap: nowrap; align-items: center; }
.zugang-form .feld-reihe input { flex: 1; min-width: 0; }
.zugang-form .btns { margin-top: 0; }
.zugang-liste { list-style: none; padding: 0; margin: 0; display: grid; }
.zugang-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.zugang-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-weight: 600; }
.zugang-name .tag { margin: 0; font-weight: 600; }
.zugang-aktionen { display: inline-flex; gap: 1rem; }
.link-knopf { font: inherit; font-size: .92rem; font-weight: 600; background: none; border: 0; padding: .2rem 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.link-knopf.gefahr { color: var(--vorschlag); }
.link-knopf:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.zugang-frage { flex-basis: 100%; border: 2px solid var(--vorschlag); border-radius: 12px; padding: .75rem .9rem; }
.zugang-frage p { margin: 0; }
.zugang-frage .btns { margin-top: .6rem; }
.startpasswort { margin-top: 1rem; border: 2px dashed var(--gruen); border-radius: 12px; padding: .8rem 1rem; background: var(--bg); }
.startpasswort p { margin: 0 0 .4rem; }
.sp-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.sp-zeile code { font-size: 1.15rem; padding: .3rem .6rem; letter-spacing: .04em; }
.status-raster { display: grid; gap: 1rem; }
@media (min-width: 860px) { .status-raster { grid-template-columns: 1.2fr 1fr; } }
.status-punkt { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; background: var(--gruen); }
.status-punkt.fehler { background: var(--vorschlag); }
.status-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.status-liste li { border-left: 4px solid var(--lila); padding-left: .75rem; }
.status-liste li.aktiv { border-left-color: var(--gelb); }
.status-liste .meta { margin: 0; }

/* Kurse aus dem Kurskalender */
.kurs h3 { margin-bottom: .2rem; }
.kurs-daten { margin: .6rem 0; font-size: .95rem; }
.kurs-text { color: var(--muted); font-size: .95rem; }
.rueckblick-mehr { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.25rem; }
.rueckblick-mehr summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.rueckblick-mehr .termin-liste { margin-top: 1rem; }
.archiv { display: grid; gap: .75rem; }
.archiv details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.25rem; }
.archiv summary { cursor: pointer; font-weight: 600; font-size: 1.15rem; }
.archiv ul { margin-top: .9rem; }

/* Bild und Text */
.split { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 1fr; gap: 3rem; } .split.rev > :first-child { order: 2; } }
.split.top { align-items: start; }
.card.ideenwerkstatt { align-items: start; }
.card.ideenwerkstatt .foto { margin: 0; }
.termin-info { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2); }
.termin-info .naechstes { margin: 0; }
.termin-info .termin-offen { margin: 0; }
.termin-info .naechstes:not([hidden]) ~ .termin-offen { display: none; }
/* Sprungmarken unter der Überschrift einer langen Seite */
/* Bild beginnt auf Höhe des ersten Absatzes statt der Überschrift (Höhe einer h2 samt Abstand) */
@media (min-width: 860px) { .split .unter-h2 { margin-top: calc(clamp(1.6rem, 4.5vw, 2.3rem) * 1.62); } }
[id] { scroll-margin-top: 90px; }
.foto { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* Karte ohne Foto: Text in gut lesbarer Zeilenlänge */
.card.ohne-foto > div { max-width: 46rem; }
figure { margin: 0; }
.foto.foto-ganz { box-shadow: var(--shadow); }
.foto.foto-ganz img { aspect-ratio: auto; object-fit: contain; }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
/* Mit Bildunterschrift: Rahmen und Schatten nur ums Bild, die Unterschrift steht frei darunter */
.foto:has(figcaption) { border-radius: 0; overflow: visible; box-shadow: none; }
.foto:has(figcaption) img { border-radius: 22px; box-shadow: var(--shadow); }

.galerie { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .galerie { grid-template-columns: repeat(4, 1fr); } .galerie figure:first-child { grid-column: span 2; grid-row: span 2; } }
/* gleichmäßiges Raster, z. B. sechs Bilder in 3 × 2 */
@media (min-width: 860px) { .galerie.galerie-raster { grid-template-columns: repeat(3, 1fr); } .galerie.galerie-raster figure:first-child { grid-column: auto; grid-row: auto; } }
.galerie img.bild-banner { object-position: 50% 42%; }
.galerie img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }

/* Mitmachen-Kasten */
.mitmachen {
  background: var(--gruen); color: var(--on-farbe); border-radius: 26px;
  padding: clamp(1.5rem, 5vw, 2.75rem); position: relative; overflow: hidden;
}
.mitmachen a:not(.btn) { color: var(--on-farbe); }
.mitmachen .btn { background: var(--surface); color: var(--ink); border-color: var(--on-farbe); }
.mitmachen .btn:hover { background: var(--gelb); color: var(--on-farbe); }
.mitmachen ul { padding-left: 1.1rem; }
.mitmachen.lila { background: var(--lila); }
/* Newsletter-Formular von Brevo (wird erst nach Klick geladen) */
.newsletter-form { margin-top: 1rem; }
.newsletter-rahmen { display: block; width: 100%; max-width: 640px; height: 805px; border: 0; border-radius: 12px; background: var(--surface); }

/* schmales Band, z. B. „Mach mit!“ auf der Startseite */
.mitmachen.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.4rem; }
.mitmachen.band h2 { font-size: 1.5rem; margin-bottom: .2rem; }
.mitmachen.band p { margin: 0; }
.mitmachen.band .btns { margin-top: 0; }

/* Listen und Tabellen */
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.liste li { padding-left: 1.4rem; position: relative; }
.liste li::before { content: ""; position: absolute; left: 0; top: .55em; width: .65rem; height: .65rem; border-radius: 50%; background: var(--lila); }
.partner { columns: 2 14rem; column-gap: 2rem; padding-left: 1.1rem; margin: 0; }
.partner li { break-inside: avoid; margin-bottom: .3rem; }
.tabelle-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; }
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: block; border: 0; padding: .1rem 0; }
  table.stack td:first-child { font-weight: 600; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
dl.daten dt { color: var(--muted); }
dl.daten dd { margin: 0; }

/* Chronik */
details.chronik { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.25rem; }
details.chronik summary { cursor: pointer; font-weight: 600; }
.chronik ol { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .45rem; }
.chronik li { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; }
.chronik .jahr { font-weight: 600; }

/* Vorstand: Name und Funktion mit Farbstrich (statt Initialen-Kreisen) */
.person { border-left: 4px solid var(--lila); padding: .15rem 0 .15rem .9rem; }
.person:nth-child(4n+2) { border-left-color: var(--gelb); }
.person:nth-child(4n+3) { border-left-color: var(--gruen); }
.person h3 { margin: 0; }
.person p { margin: 0; }

/* Fuß */
.site-foot { background: var(--ink); color: var(--bg); padding: 2.5rem 0 2rem; margin-top: 0; }
.site-foot a { color: var(--bg); }
.site-foot .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 760px) {
  .site-foot .wrap { grid-template-columns: 1.3fr 1fr 1fr; }
  /* Spalte ohne Überschrift auf eine Linie mit dem Text der anderen Spalten (Höhe der h2 plus Abstand) */
  .site-foot .wrap > div > ul:first-child { margin-top: calc(1.12rem + .6rem); }
}
.site-foot h2 { font-size: 1rem; margin-bottom: .6rem; }
.site-foot p, .site-foot li { font-size: .92rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.social a { display: inline-flex; align-items: center; gap: .45rem; }
.social .icon { flex: none; }
.foerderung { font-size: .85rem; opacity: .85; grid-column: 1 / -1; border-top: 1px solid rgb(255 255 255 / .15); padding-top: 1rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .foerderung { border-top-color: rgb(0 0 0 / .2); } }

.mt { margin-top: 1.25rem; }
.mt-l { margin-top: 2.5rem; }

.entwurf a { color: #fff200; font-weight: 600; }
