/* Faschingsverein Wertach – Anmeldung & interner Bereich
   Farben aus dem Vereinslogo: Narrenkappe (Rot, Gelb, Blau) und grünes Wappen.
   Keine externen Schriften (Datenschutz). */

:root {
    /* Hauptfarbe: das Rot der Vereinsseite */
    --gruen: #8c3531;
    --gruen-dunkel: #6f2724;
    --gruen-hell: #f7eceb;
    /* Grün nur noch für "in Ordnung" (bestätigt, gültig, geöffnet) */
    --ok: #1e7a3c;
    --ok-dunkel: #145a2b;
    --ok-hell: #e6f2ea;
    --rot: #d7262e;
    --gelb: #f2c230;
    --blau: #1f6fc5;
    --tinte: #1c2621;
    --grau: #5b6660;
    --linie: #d5dbd7;
    --flaeche: #f5f3f2;
    --weiss: #ffffff;
    --fehler: #c0262d;
    --fehler-hell: #fdecea;
    --radius: 6px;
    --schrift: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-titel: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font: 1rem/1.55 var(--schrift);
    color: var(--tinte);
    background: var(--flaeche);
}

a { color: var(--gruen-dunkel); text-underline-offset: 2px; }
a:hover { color: var(--rot); }

:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

h1, h2 {
    font-family: var(--schrift-titel);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(1.5rem, 4.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }

/* Das Narrenband: Rauten in den Farben der Narrenkappe */
.narrenband {
    height: 14px;
    background:
        conic-gradient(from 45deg at 50% 50%, var(--rot) 0 25%, var(--gelb) 0 50%, var(--blau) 0 75%, var(--gruen) 0)
        0 0 / 28px 14px;
}

.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.kopf-innen {
    max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem;
}
.marke { text-decoration: none; color: var(--tinte); display: flex; flex-direction: column; }
.marke-name { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.2rem; }
.marke-zusatz { color: var(--grau); font-size: .9rem; }

.hauptnav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; }
.hauptnav a, .hauptnav .link {
    padding: .4rem .7rem; border-radius: var(--radius); text-decoration: none; color: var(--tinte); font-size: .95rem;
}
.hauptnav a:hover, .hauptnav .link:hover { background: var(--flaeche); color: var(--tinte); }
.hauptnav a[aria-current="page"] { background: var(--gruen-hell); color: var(--gruen-dunkel); font-weight: 600; }
.nav-trenner { width: 1px; height: 1.4rem; background: var(--linie); margin: 0 .3rem; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; }

.inhalt { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.inhalt-breit { max-width: 72rem; }

.fuss {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem;
    padding: 1.5rem; font-size: .9rem; border-top: 1px solid var(--linie); background: var(--weiss);
}
.fuss a { color: var(--grau); }

/* Titel der Anmeldeseite */
.titel { margin-bottom: 1rem; }
.titel h1 { margin-bottom: .25rem; }
.termine { display: grid; grid-template-columns: repeat(2, minmax(0, 12rem)); gap: .6rem; margin-top: .75rem; }
.termin {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem;
    background: var(--weiss); border: 1px solid var(--linie); border-left: 5px solid var(--gruen); border-radius: var(--radius);
}
.termine .termin:nth-child(2) { border-left-color: var(--gelb); }
.termin-tag { font-family: var(--schrift-titel); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--tinte); }
.termin-text { display: flex; flex-direction: column; line-height: 1.2; font-size: .9rem; color: var(--grau); }
.termin-text strong { color: var(--tinte); font-size: 1rem; }
.vorspann { color: var(--grau); max-width: 65ch; }

/* Karten & Hinweise */
.karte {
    background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.5rem;
}
.karte-schmal { max-width: 26rem; margin: 2rem auto; }
.karte-danke { border-top: 6px solid var(--gruen); }
.karte-gefahr { border-left: 6px solid var(--rot); }

.hinweis { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border-left: 5px solid; }
.hinweis-ok { background: var(--ok-hell); border-color: var(--ok); }
.hinweis-info { background: #e8f0fa; border-color: var(--blau); }
.hinweis-fehler { background: var(--fehler-hell); border-color: var(--fehler); }

/* Formulare */
.formular fieldset {
    border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss);
    padding: 1rem 1.1rem .35rem; margin: 0 0 1rem;
}
.formular legend { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.2rem; padding: 0 .4rem; }
.intern-felder { border-left: 6px solid var(--blau) !important; }

.zeile { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 .75rem; }
.feld { margin-bottom: .85rem; display: flex; flex-direction: column; }
.feld-voll { grid-column: 1 / -1; }
.zeile > .feld { grid-column: 1 / -1; }
.zeile > .feld-schmal { grid-column: span 2; }
.zeile > .feld-rest { grid-column: span 4; }
.zeile > .feld-halb { grid-column: span 3; }
@media (min-width: 560px) {
    .zeile > .feld { grid-column: span 3; }
    .zeile > .feld-voll { grid-column: 1 / -1; }
    .zeile > .feld-schmal { grid-column: span 2; }
    .zeile > .feld-rest { grid-column: span 4; }
}

label { font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"],
input[type="search"], input[type="date"], input:not([type]), select, textarea {
    font: inherit; color: inherit; width: 100%;
    padding: .6rem .7rem; border: 1px solid #aab4ae; border-radius: var(--radius); background: var(--weiss);
    min-height: 2.75rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gruen); outline: 3px solid rgba(140, 53, 49, .22); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--fehler); background: var(--fehler-hell); }

.pflicht { color: var(--rot); }
.feldhilfe { color: var(--grau); font-size: .88rem; margin: 0 0 .85rem; }
.infokasten { background: #e8f0fa; border-left: 5px solid var(--blau); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .93rem; }
.infokasten p { margin: 0 0 .5rem; }
.infokasten p:last-child { margin-bottom: 0; }
.feldfehler { color: var(--fehler); font-size: .9rem; font-weight: 600; margin: .3rem 0 0; flex-basis: 100%; }

/* Auswahl-Kacheln (Tage, Art, GEMA) */
.auswahl { margin-bottom: 1rem; }
.auswahl-titel { margin: 0 0 .3rem; font-weight: 600; font-size: .92rem; }
.auswahl-optionen { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; }
.auswahl-senkrecht .auswahl-optionen { grid-template-columns: minmax(0, 1fr); }
.auswahl:not(.auswahl-senkrecht) .kachel > span { white-space: nowrap; }
.auswahl .feldhilfe { margin: .4rem 0 0; }
.kachel { position: relative; margin: 0; font-weight: 500; font-size: .95rem; cursor: pointer; display: flex; }
.kachel input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kachel > span {
    display: block; flex: 1; padding: .62rem .8rem .62rem 2.3rem; border: 1px solid #aab4ae;
    border-radius: var(--radius); background: var(--weiss); position: relative; min-height: 2.75rem; line-height: 1.35;
}
.kachel > span a { position: relative; z-index: 1; }
/* Einheitliches Kästchen für alle Auswahlfelder (egal ob Einzel- oder Mehrfachauswahl) */
.kachel > span::before {
    content: ""; position: absolute; left: .75rem; top: 50%; width: 1.1rem; height: 1.1rem; margin-top: -.55rem;
    border: 2px solid #8a958f; border-radius: 4px; background: var(--weiss);
}
.kachel > span::after {
    content: ""; position: absolute; left: calc(.75rem + .38rem); top: 50%; width: .32rem; height: .6rem; margin-top: -.42rem;
    border: solid var(--weiss); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); opacity: 0;
}
.kachel input:checked + span { border-color: var(--gruen); background: var(--gruen-hell); }
.kachel input:checked + span::before { border-color: var(--gruen); background: var(--gruen); }
.kachel input:checked + span::after { opacity: 1; }
.kachel input:focus-visible + span { outline: 3px solid var(--blau); outline-offset: 2px; }

.haken { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; margin-bottom: 1rem; cursor: pointer; }
.haken input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex-shrink: 0; accent-color: var(--gruen); }

.unsichtbar {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0;
}

.absenden { margin-top: 1.5rem; }

/* Knöpfe */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    padding: .6rem 1.1rem; min-height: 2.75rem; border-radius: var(--radius);
    background: var(--gruen); color: var(--weiss); border: 1px solid var(--gruen);
}
.knopf:hover { background: var(--gruen-dunkel); color: var(--weiss); }
.knopf-gross { font-size: 1.1rem; padding: .8rem 1.8rem; }
.knopf-zweit { background: var(--weiss); color: var(--gruen-dunkel); }
.knopf-zweit:hover { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.knopf-gefahr { background: var(--weiss); color: var(--fehler); border-color: var(--fehler); }
.knopf-gefahr:hover { background: var(--fehler); color: var(--weiss); }
.knopf-klein { padding: .3rem .7rem; min-height: 2.2rem; font-size: .9rem; }

/* Interner Bereich */
.seitenkopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.seitenkopf h1 { margin: 0; }
.aktionen { display: flex; flex-wrap: wrap; gap: .5rem; }

.zahlen { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.zahlen div { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem 1rem; min-width: 8rem; }
.zahlen div:first-child { border-top: 4px solid var(--rot); }
.zahlen dt { font-size: .85rem; color: var(--grau); }
.zahlen dd { margin: 0; font-size: 1.4rem; font-weight: 700; font-family: var(--schrift-titel); }
.zahlen small { font-size: .8rem; font-weight: 400; font-family: var(--schrift); color: var(--grau); }

.filter {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem;
    background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem; margin: 1rem 0;
}
.filter label { display: flex; flex-direction: column; font-size: .85rem; margin: 0; }
.filter select, .filter input { min-height: 2.5rem; padding: .4rem .5rem; }
.filter-suche { flex: 1 1 12rem; }

.tabelle-rahmen { overflow-x: auto; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabelle th, .tabelle td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { background: var(--flaeche); font-weight: 600; white-space: nowrap; }
.tabelle tbody tr:hover { background: #f8faf9; }
.tabelle .zahl { text-align: right; }
.tabelle small { color: var(--grau); }
.status-abgesagt td { color: #8a958f; text-decoration: line-through; }
.status-abgesagt td:last-child, .status-abgesagt td:nth-last-child(2) { text-decoration: none; }
.marke-status { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .82rem; background: var(--flaeche); white-space: nowrap; }
.status-neu .marke-status { background: var(--gelb); }
.status-bestaetigt .marke-status { background: var(--ok-hell); color: var(--ok-dunkel); }
.status-warteliste .marke-status { background: #e8f0fa; color: var(--blau); }
.inline-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form input { min-height: 2.2rem; padding: .3rem .5rem; max-width: 12rem; }
.inline-form select { min-height: 2.2rem; padding: .3rem .5rem; width: auto; }

.leer { text-align: center; padding: 2.5rem 1rem; background: var(--weiss); border: 1px dashed #aab4ae; border-radius: var(--radius); color: var(--grau); }
.loeschen { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linie); }

/* Dateien */
.hochladen summary { cursor: pointer; font-weight: 700; font-family: var(--schrift-titel); font-size: 1.2rem; }
.hochladen[open] summary { margin-bottom: 1rem; }
.ordner { margin-bottom: 1.75rem; }
.ordner h2 small { font-weight: 400; color: var(--grau); font-family: var(--schrift); font-size: .9rem; }
.dateiliste { list-style: none; margin: 0; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.dateiliste li { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--linie); }
.dateiliste li:last-child { border-bottom: 0; }
.datei-info { display: flex; flex-direction: column; min-width: 0; }
.datei-name { font-weight: 600; word-break: break-word; }
.datei-beschr { font-size: .92rem; }
.datei-meta { font-size: .82rem; color: var(--grau); }
.datei-aktionen { display: flex; gap: .4rem; }
.datei-aktionen form { margin: 0; }
.datei-aktionen label { margin: 0; }

/* Druckansicht */
.druck { background: var(--weiss); padding: 1.5rem; }
.druck-leiste { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.druck-leiste .feldhilfe { margin: 0; }
.druck-titel { font-size: 1.5rem; margin-bottom: .2rem; }
.druck-stand { color: var(--grau); margin: 0 0 1rem; font-size: .9rem; }
.druck-tabelle { font-size: .85rem; }
.druck-tabelle tfoot td { font-weight: 700; border-top: 2px solid var(--tinte); }
.druck-tabelle .schreibfeld { min-width: 5rem; }
.nowrap { white-space: nowrap; }
.druck-blatt { max-width: 42rem; }
.druck-details { width: 100%; border-collapse: collapse; }
.druck-details th, .druck-details td { text-align: left; vertical-align: top; padding: .5rem .6rem; border-bottom: 1px solid var(--linie); }
.druck-details th { width: 38%; font-weight: 600; }

@media print {
    @page { size: A4 landscape; margin: 12mm; }
    .druck { padding: 0; }
    .druck-leiste { display: none; }
    .druck-blatt { max-width: none; }
    .tabelle th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tabelle tr { break-inside: avoid; }
    .tabelle tbody tr:hover { background: none; }
    a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

@media (max-width: 640px) {
    .inhalt { padding: 1rem .75rem 2rem; }
    .kopf-innen { padding: .6rem .9rem; }
    .marke-name { font-size: 1.05rem; }
    .marke-zusatz { font-size: .82rem; }
    .formular fieldset { padding: .85rem .8rem .2rem; }
    .knopf-gross { width: 100%; }
}

/* Übersicht: Projekt-Kacheln */
.projekte { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.projekt {
    display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: var(--tinte);
    background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.2rem;
    border-top: 6px solid var(--gruen);
}
.projekt:nth-child(4n+2) { border-top-color: var(--rot); }
.projekt:nth-child(4n+3) { border-top-color: var(--blau); }
.projekt:nth-child(4n+4) { border-top-color: var(--gelb); }
.projekt:hover { border-color: var(--gruen); color: var(--tinte); }
.projekt-titel { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.3rem; }
.projekt-text { color: var(--grau); font-size: .93rem; }
.projekt-info { font-weight: 600; font-size: .93rem; margin-top: .3rem; }
.abstand-oben { margin-top: 1rem; }

/* Unternavigation innerhalb eines Projekts / der Dateiablage */
.unternav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; margin: -.25rem 0 1.25rem; font-size: .95rem; }
.unternav span { color: var(--grau); }
.offen { color: var(--ok-dunkel); }
.zu { color: var(--fehler); }

/* Projekt-Freigaben in der Benutzerliste */
.projekt-haken { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.projekt-haken label { font-weight: 400; margin: 0; display: flex; gap: .4rem; align-items: center; white-space: nowrap; }
.projekt-haken input { accent-color: var(--gruen); width: 1.05rem; height: 1.05rem; }
.ordner-link { color: inherit; text-decoration: none; }
.ordner-link:hover { text-decoration: underline; }

/* Update */
.update-liste { list-style: none; margin: 0 0 1rem; padding: 0; }
.update-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--linie); font-size: .93rem; word-break: break-all; }
.update-liste li:last-child { border-bottom: 0; }
.marke-neu { background: var(--gruen-hell); color: var(--gruen-dunkel); }

/* IBAN-Prüfung beim Tippen */
.iban-info { margin: .3rem 0 0; min-height: 1.2em; }
.iban-ok { color: var(--ok-dunkel); font-weight: 600; }
.iban-falsch { color: var(--fehler); font-weight: 600; }
#f-iban { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* E-Mails */
.empfaenger .kachel > span { white-space: normal; }
.empfaenger .kachel > span strong, .empfaenger .kachel > span small { display: block; }
.empfaenger .kachel small { color: var(--grau); font-weight: 400; font-size: .85rem; word-break: break-word; }
.abstand-unten { margin-bottom: .75rem; }
.trenner { border: 0; border-top: 1px solid var(--linie); margin: 1.25rem 0 1rem; }
.mail-vorschau {
    white-space: pre-wrap; word-break: break-word; font: .93rem/1.5 var(--schrift);
    background: var(--flaeche); border-radius: var(--radius); padding: 1rem; margin: 0;
}
.platzhalter { margin: 0 0 1rem; font-size: .9rem; }
.platzhalter summary { cursor: pointer; color: var(--gruen-dunkel); font-weight: 600; }
.platzhalter dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .2rem 1rem; margin: .6rem 0 0; }
.platzhalter dl div { display: flex; gap: .5rem; }
.platzhalter dt { min-width: 7.5rem; }
.platzhalter dd { margin: 0; color: var(--grau); }
.platzhalter code { background: var(--gruen-hell); padding: 0 .3rem; border-radius: 3px; }

/* Rollen */
.rolle-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.rolle-kopf h2 { margin: 0; }
.rolle-kopf .feld { flex: 1 1 14rem; margin: 0; }
.auswahl-optionen.rechte { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.auswahl-optionen.rechte .kachel > span { white-space: normal; }
.rolle-loeschen { margin-top: .75rem; }

/* Passwort vergessen */
.login-vergessen { margin: 1rem 0 0; font-size: .93rem; }

/* Verlauf */
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding: .5rem 0; border-bottom: 1px solid var(--linie); font-size: .93rem; }
.verlauf li:last-child { border-bottom: 0; }
.verlauf-zeit { color: var(--grau); min-width: 8.5rem; }
.verlauf-details { display: block; color: var(--grau); font-size: .88rem; }
.verlauf-tabelle .verlauf-details { min-width: 14rem; }

/* Spalten anordnen & Startnummern */
.spalten-einstellen summary, .nummern summary { cursor: pointer; font-family: var(--schrift-titel); font-weight: 700; font-size: 1.15rem; }
.spalten-einstellen[open] summary, .nummern[open] summary { margin-bottom: .75rem; }
.spalten-liste { list-style: none; margin: 0 0 .75rem; padding: 0; }
.spalten-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .35rem 0; border-bottom: 1px solid var(--linie); }
.spalten-liste li:last-child { border-bottom: 0; }
.spalten-name { flex: 1 1 8rem; font-weight: 600; }
.spalten-liste form { margin: 0; }
.spalten-liste button:disabled { opacity: .45; cursor: default; }
.nummern { margin-top: 1rem; }

/* ---------- Liste am Handy: Karten statt Tabelle ---------- */
.karten-liste { display: none; list-style: none; margin: 0; padding: 0; }
.ka {
    background: var(--weiss); border: 1px solid var(--linie); border-left: 5px solid var(--linie);
    border-radius: var(--radius); margin-bottom: .6rem; overflow: hidden;
}
.ka.status-neu { border-left-color: var(--gelb); }
.ka.status-bestaetigt { border-left-color: var(--ok); }
.ka.status-warteliste { border-left-color: var(--blau); }
.ka.status-abgesagt { opacity: .6; }
.ka.status-abgesagt .ka-titel strong { text-decoration: line-through; }
.ka-link { display: block; padding: .7rem .8rem .6rem; color: var(--tinte); text-decoration: none; }
.ka-link:hover, .ka-link:active { background: #f8faf9; color: var(--tinte); }
.ka-kopf { display: flex; align-items: center; gap: .6rem; }
.ka-nr {
    flex: 0 0 auto; min-width: 2.2rem; height: 2.2rem; padding: 0 .3rem; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: var(--flaeche); font-family: var(--schrift-titel); font-weight: 700; font-size: 1.05rem;
}
.ka-titel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ka-titel strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.ka-titel span { color: var(--grau); font-size: .9rem; overflow-wrap: anywhere; }
.ka-kopf .marke-status { flex: 0 0 auto; }
.ka-motto { margin: .4rem 0 0; font-size: .9rem; font-style: italic; color: var(--grau); overflow-wrap: anywhere; }
.ka-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.ka-chips span { font-size: .8rem; padding: .12rem .5rem; border-radius: 999px; background: var(--flaeche); white-space: nowrap; }
.ka-chips .ka-offen { background: var(--fehler-hell); color: var(--fehler); font-weight: 600; }
.ka-tel {
    display: block; padding: .55rem .8rem; border-top: 1px solid var(--linie);
    font-size: .9rem; font-weight: 600; color: var(--gruen-dunkel); text-decoration: none;
}

@media (max-width: 700px) {
    .liste-tabelle, .intern .spalten-einstellen { display: none; }
    .karten-liste { display: block; }

    /* Kennzahlen kompakt in zwei Spalten */
    .zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
    .zahlen div { min-width: 0; padding: .45rem .7rem; }
    .zahlen dd { font-size: 1.2rem; }

    /* Kopf und Knöpfe */
    .seitenkopf { gap: .6rem; margin-bottom: .75rem; }
    .seitenkopf .aktionen { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .seitenkopf .aktionen .knopf:first-child { grid-column: 1 / -1; }
    .seitenkopf .aktionen .knopf { padding: .5rem .6rem; font-size: .92rem; }
    .unternav { gap: .3rem .9rem; font-size: .9rem; }

    /* Filter kompakt in zwei Spalten */
    .filter { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem; }
    .filter .filter-suche, .filter button { grid-column: 1 / -1; }
}


/* ---------- Hauptmenü: am Handy aufklappbar ---------- */
.nav-schalter { position: absolute; opacity: 0; pointer-events: none; }
.nav-knopf { display: none; }

@media (max-width: 760px) {
    .kopf-innen { flex-wrap: nowrap; align-items: center; position: relative; }
    .marke { min-width: 0; }
    .marke-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .nav-knopf {
        display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; margin: 0 0 0 auto;
        padding: .45rem .75rem; min-height: 2.6rem; border: 1px solid var(--linie); border-radius: var(--radius);
        background: var(--weiss); font-weight: 600; font-size: .95rem; cursor: pointer; user-select: none;
    }
    .nav-knopf-text { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-symbol, .nav-symbol::before, .nav-symbol::after {
        display: block; width: 1.1rem; height: 2px; background: var(--tinte); border-radius: 2px; position: relative;
        transition: transform .15s ease;
    }
    .nav-symbol::before, .nav-symbol::after { content: ""; position: absolute; left: 0; }
    .nav-symbol::before { top: -6px; }
    .nav-symbol::after { top: 6px; }
    .nav-schalter:checked + .nav-knopf .nav-symbol { background: transparent; }
    .nav-schalter:checked + .nav-knopf .nav-symbol::before { top: 0; transform: rotate(45deg); }
    .nav-schalter:checked + .nav-knopf .nav-symbol::after { top: 0; transform: rotate(-45deg); }
    .nav-schalter:focus-visible + .nav-knopf { outline: 3px solid var(--blau); outline-offset: 2px; }

    .hauptnav {
        display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--weiss); border-bottom: 1px solid var(--linie); box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        padding: .3rem .6rem .6rem;
    }
    .nav-schalter:checked ~ .hauptnav { display: flex; }
    .hauptnav a, .hauptnav .link {
        display: block; width: 100%; text-align: left; padding: .7rem .8rem; font-size: 1rem; border-radius: var(--radius);
    }
    .hauptnav .inline { display: block; }
    .nav-trenner { width: auto; height: 1px; margin: .35rem 0; }
    .nav-ich { color: var(--grau) !important; }
}

/* ---------- Mitglieder ---------- */
.mg-schutz { font-size: .72rem; font-weight: 600; color: var(--blau); background: #e8f0fa; padding: .05rem .4rem; border-radius: 999px; margin-left: .3rem; vertical-align: middle; }
.mg-ausgetreten td, .ka.mg-ausgetreten { opacity: .55; }
.ka.mg-aktiv { border-left-color: var(--ok); }
.ka.mg-passiv { border-left-color: var(--blau); }
.ka.mg-ehrenmitglied { border-left-color: var(--gelb); }
.filter-haken { flex-direction: row !important; align-items: center; margin: 0; font-weight: 400; }
.mg-gruppe legend { font-size: 1.1rem; }
.mg-feldtabelle input[type="text"], .mg-feldtabelle select, .mg-feldtabelle textarea { min-height: 2.2rem; padding: .3rem .45rem; font-size: .9rem; }
.mg-feldtabelle td { vertical-align: middle; }
.mg-feldtabelle textarea { min-width: 10rem; }
.mg-feldtabelle .haken { margin: 0; justify-content: center; }
.import-tabelle select { min-height: 2.2rem; padding: .3rem .45rem; font-size: .9rem; }
.import-vorschau td { font-size: .85rem; color: var(--grau); }
.mg-nr { font-family: var(--schrift); font-size: .95rem; font-weight: 500; color: var(--grau); margin-left: .4rem; }
.mg-ansicht { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem 1.2rem; margin: 0; }
.mg-ansicht dt { font-size: .82rem; color: var(--grau); }
.mg-ansicht dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Menü wie beim Dorfverein ---------- */
.kopf { border-bottom: 0; }
.intern .kopf-innen { padding-bottom: .5rem; }
.menue { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem .75rem; }
.bereiche {
    display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: .2rem; padding: .3rem;
    background: #f3ecea; border: 1px solid #e2d4d1; border-radius: 999px;
}
.bereiche::-webkit-scrollbar, .reiter-innen::-webkit-scrollbar { display: none; }
.bereiche a {
    flex: 0 0 auto; padding: .5rem 1.15rem; border-radius: 999px; white-space: nowrap;
    color: #5f665f; font-weight: 600; text-decoration: none; font-size: 1rem;
}
.bereiche a:hover { color: var(--tinte); background: rgba(0, 0, 0, .04); }
.bereiche a[aria-current="page"] { background: var(--gruen-dunkel); color: #fff; }
.menue-links { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin: .55rem 0 0; font-size: .92rem; color: var(--grau); }
.menue-links a, .menue-links .link { color: var(--grau); text-decoration: underline; text-underline-offset: 3px; padding: 0; font: inherit; }
.menue-links a:hover, .menue-links .link:hover { color: var(--tinte); background: none; }
.menue-links .inline { display: inline; margin: 0; }
.menue-links button.link { padding: 0; margin: 0; border: 0; background: none; cursor: pointer; }
.menue-ich { color: var(--tinte); }
.reiter { background: var(--gruen-dunkel); position: relative; }
.reiter-innen {
    max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; display: flex; gap: .15rem;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.reiter a {
    flex: 0 0 auto; padding: .85rem .9rem .75rem; white-space: nowrap; text-decoration: none;
    color: rgba(255, 255, 255, .72); font-weight: 500; border-bottom: 3px solid transparent;
}
.reiter a:hover { color: #fff; }
.reiter a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.reiter a:focus-visible, .bereiche a:focus-visible { outline: 3px solid var(--gelb); outline-offset: -3px; }
@media (max-width: 760px) {
    .menue { padding: 0 .75rem .6rem; }
    .reiter-innen { padding: 0 .5rem; }
    /* Hinweis, dass man seitlich wischen kann */
    .reiter::after {
        content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1.5rem; pointer-events: none;
        background: linear-gradient(to right, rgba(111, 39, 36, 0), var(--gruen-dunkel));
    }
    .bereiche a { padding: .45rem .7rem; font-size: .88rem; }
    .menue-links { font-size: .84rem; gap: .25rem .35rem; }
    .menue-links .inline, .menue-links .link { margin: 0; }
}
@media print { .menue, .reiter { display: none; } }

@media (max-width: 430px) { .menue-links .nur-breit { display: none; } }

/* ---------- Kopf bleibt stehen, verschwindet nur auf langen Seiten beim Runterwischen ---------- */
.kopf.kopf-klebt { position: sticky; top: 0; z-index: 30; transition: transform .25s ease, box-shadow .2s ease; will-change: transform; }
.kopf.kopf-weg { transform: translateY(-100%); }
.kopf.kopf-schatten { box-shadow: 0 2px 12px rgba(0, 0, 0, .14); }
.intern main [id] { scroll-margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { .kopf.kopf-klebt { transition: none; } }
@media print { .kopf.kopf-klebt { position: static; transform: none; box-shadow: none; } }

/* Homepage-Bereich */
.link-kopie { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0 0; }
.link-kopie input, .link-kopie textarea { flex: 1 1 16rem; min-height: 2.3rem; padding: .35rem .5rem; font-size: .85rem; background: var(--flaeche); }
.text-vorschau h2 { font-size: 1.1rem; }
.text-vorschau p.pkt { padding-left: 1.6rem; text-indent: -1.6rem; }
.text-vorschau p.pkt span { display: inline-block; width: 1.6rem; text-indent: 0; font-weight: 600; }

/* Hilfe / Handbücher */
.hilfe { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem 1.4rem; max-width: 60rem; }
.hilfe h2 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--linie); color: var(--gruen-dunkel); scroll-margin-top: 1rem; }
.hilfe h2:first-of-type { border-top: 0; margin-top: .5rem; }
.hilfe p, .hilfe li { line-height: 1.6; }
.hilfe ul, .hilfe ol { padding-left: 1.4rem; }
.hilfe li { margin: .2rem 0; }
.hilfe .tabelle-rahmen { margin: .6rem 0 1rem; }
.hilfe-inhalt { background: var(--flaeche); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }
.hilfe-inhalt ol { margin: .4rem 0 0; columns: 2 14rem; }
.hilfe-inhalt a { text-decoration: none; }
@media (max-width: 640px) { .hilfe { padding: 1rem .9rem; } }
@media print {
    .hilfe { border: 0; padding: 0; max-width: none; }
    .seitenkopf .aktionen, .unternav, .fuss { display: none; }
    .hilfe-inhalt { display: none; }
    .hilfe h2 { break-after: avoid; }
}

/* Platzhalter zum Antippen */
.platzhalter-knopf {
    font: .85rem/1.3 ui-monospace, Menlo, Consolas, monospace; cursor: pointer;
    background: var(--gruen-hell); color: var(--gruen-dunkel); border: 1px solid transparent; border-radius: 4px; padding: .15rem .4rem;
}
.platzhalter-knopf:hover { border-color: var(--gruen); }
.platzhalter-knopf:focus-visible { outline: 2px solid var(--blau); outline-offset: 1px; }
.platzhalter-knopf.eingefuegt { background: var(--ok-hell); color: var(--ok-dunkel); }

/* Link nach außen im roten Band (z. B. Anmeldeformular), rechts angeordnet */
.reiter a.reiter-extern { color: #fff; font-weight: 600; }
.reiter a.reiter-extern-erster { margin-left: auto; }
.reiter a.reiter-extern:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .reiter a.reiter-extern-erster { margin-left: 0; } }
