/* ==========================================================================
   Eazy-Ortsring – Stylesheet
   Mobile First. Alle Farben laufen über CSS-Variablen.
   ========================================================================== */

/* Schriften werden lokal aus /fonts ausgeliefert (siehe public/fonts/README.txt) – nichts wird von externen Servern geladen. */
/* Inter: Fließtext (Variable Font, 100–900) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Source Serif 4: Überschriften */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Vorgegebene Farbpalette */
  --c-bg: #ffffff;         /* Hintergrund / helle Elemente */
  --c-primary: #25768b;    /* Primärfarbe */
  --c-secondary: #4baeb3;  /* Sekundärfarbe / Highlights */
  --c-accent: #10766b;     /* Akzentfarbe / Buttons */
  --c-text: #000000;       /* Text & dunkle Elemente */

  /* Abgeleitete Neutraltöne (aus der Palette gemischt) */
  --c-surface: #f1f7f8;
  --c-border: #d3e2e5;
  --c-muted: #48595d;
  --c-primary-dark: #1b5c6d;
  --c-accent-dark: #0b5a51;
  --c-danger: #a8241c;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;

  --container: 68rem;
  --radius: 10px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(37, 118, 139, .09);
}

*, *::before, *::after { box-sizing: border-box; }

/* Das Attribut „hidden“ muss immer gewinnen, auch gegenüber display-Regeln wie bei .form oder .field */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; background: var(--c-surface); }
/* Unter und hinter der Seite (z. B. unter der schwebenden Leiste von Safari auf dem iPhone) soll nie eine weiße Fläche erscheinen:
   Je nach Browser kommt die Farbe dieser Fläche aus html oder aus body. Beide haben deshalb die Farbe der Fußzeile.
   Weiß sind nur die Kopfzeile und der Inhalt (main). */
body {
  margin: 0;
  background: var(--c-surface);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; background: var(--c-bg); }
#site-header { background: var(--c-bg); }
main:focus { outline: none; }

img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--c-primary); text-underline-offset: .18em; }
a:hover { color: var(--c-primary-dark); }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 3px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pre-line { white-space: pre-line; }

/* Sehr lange Links, Adressen und Wörter brechen in der Zeile um, statt die Seite seitlich zu verbreitern (v. a. auf dem Handy). */
body:not(.admin-mode) main,
.site-header, .admin-header, .site-footer,
.rte-area, .admin-panel .message, .admin-panel .pre-line { word-break: break-word; overflow-wrap: anywhere; }
.rich pre { overflow-x: auto; max-width: 100%; }
.rich table { max-width: 100%; }
.muted { color: var(--c-muted); }
.notice { padding: 2rem 0; }

.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--c-accent); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ------------------------------ Buttons ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: .75rem 1.25rem; border-radius: var(--radius);
  background: var(--c-accent); color: #fff; border: 2px solid var(--c-accent);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-small { padding: .45rem .8rem; font-size: .95rem; }
.btn-outline { background: transparent; color: var(--c-accent); }
.btn-outline:hover { background: var(--c-accent); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-surface); color: var(--c-primary-dark); border-color: transparent; }
.btn-danger { background: transparent; color: var(--c-danger); border-color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary-dark); border-color: #fff; }
.btn-light:hover { background: var(--c-surface); border-color: var(--c-surface); color: var(--c-primary-dark); }
.btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-line:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }

/* ------------------------------ Kopfbereich ------------------------------ */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-bg); border-bottom: 1px solid var(--c-border); box-shadow: 0 6px 18px rgba(37, 118, 139, .06); }
.site-header::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--c-primary), var(--c-secondary)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 1rem; flex: 1 1 0; text-decoration: none; color: var(--c-text); min-width: 0; padding: .8rem 0; transition: padding .25s ease; }
.brand:hover { color: var(--c-text); }
.brand-logo { width: 3.5rem; height: 3.5rem; object-fit: contain; flex: none; border-radius: 10px; transition: width .25s ease, height .25s ease; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; transition: font-size .25s ease; }
.brand-tag { font-size: .92rem; color: var(--c-muted); line-height: 1.3; margin-top: .15rem; }

/* Beim Scrollen schrumpft der Kopf, damit er nicht zu viel Platz nimmt */
.site-header.is-scrolled .brand { padding: .4rem 0; }
.site-header.is-scrolled .brand-logo { width: 2.6rem; height: 2.6rem; }
.site-header.is-scrolled .brand-name { font-size: 1.1rem; }
.site-header.is-scrolled .brand-tag { display: none; }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 3.1rem; height: 3.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.nav-toggle:hover, .nav-open .nav-toggle { background: #fff; border-color: var(--c-primary); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.35rem; height: 2px; background: var(--c-primary-dark); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -.43rem; }
.nav-toggle-bars::after { top: .43rem; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(.43rem) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-.43rem) rotate(-45deg); }

/* Mobil: aufklappbares Menü als Karte */
.main-nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
.nav-open .main-nav { display: block; max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); overflow-y: auto; overscroll-behavior: contain; animation: nav-in .2s ease-out; }
.main-nav ul { list-style: none; margin: 0; padding: .4rem; display: flex; flex-direction: column; gap: .15rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; }
.main-nav a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border-radius: 11px; color: var(--c-text); text-decoration: none; font-weight: 600; }
.main-nav a::after { content: "\203A"; font-size: 1.5rem; line-height: 1; color: var(--c-secondary); }
.main-nav a:hover { background: #fff; color: var(--c-primary-dark); }
.main-nav a[aria-current="page"] { background: var(--c-primary); color: #fff; }
.main-nav a[aria-current="page"]::after { color: #fff; }

@keyframes nav-in { from { opacity: 0; transform: translateY(-.4rem); } to { opacity: 1; transform: none; } }

/* Desktop: Navigation als eigene Zeile unter dem Namen, Unterstreichung als Markierung */
@media (min-width: 64em) {
  .brand { gap: 1.25rem; padding: 1.1rem 0 1rem; }
  .brand-logo { width: 4.5rem; height: 4.5rem; }
  .brand-name { font-size: 1.85rem; }
  .brand-tag { font-size: 1rem; }
  .site-header.is-scrolled .brand-logo { width: 2.75rem; height: 2.75rem; }
  .site-header.is-scrolled .brand-name { font-size: 1.25rem; }

  .nav-toggle { display: none; }
  .main-nav { display: block; padding: 0; max-height: none; overflow: visible; border-top: 1px solid var(--c-border); }
  /* Passen nicht alle Menüpunkte in eine Zeile (z. B. viele eigene Seiten), rutschen sie in die nächste Zeile; ein extrem langer Titel bricht um. */
  .main-nav ul { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 0; padding: 0; background: none; border: 0; border-radius: 0; }
  .main-nav li { min-width: 0; max-width: 100%; }
  .main-nav a { position: relative; display: block; padding: .85rem .55rem .8rem; border-radius: 0; font-size: .93rem; font-weight: 600; }
  .main-nav a::after { content: ""; position: absolute; left: .55rem; right: .55rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--c-secondary); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
  .main-nav a:hover { background: none; color: var(--c-primary); }
  .main-nav a:hover::after { transform: scaleX(1); }
  .main-nav a[aria-current="page"] { background: none; color: var(--c-primary-dark); }
  .main-nav a[aria-current="page"]::after { background: var(--c-primary); transform: scaleX(1); }
}
@media (min-width: 76em) {
  .main-nav a { padding-inline: .8rem; font-size: .97rem; }
  .main-nav a::after { left: .8rem; right: .8rem; }
}

/* ------------------------------ Chronik: Filter + Karten ------------------------------ */

.chronik-tools { display: grid; gap: .85rem; margin-bottom: 1.75rem; padding: 1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; }
.chronik-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.chronik-row .input { margin: 0; }
.chronik-row input[type="search"] { flex: 1 1 16rem; }
.chronik-row select { flex: 0 1 13rem; }
.chronik-tools .result-count { margin: 0; font-size: .92rem; color: var(--c-muted); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { font: inherit; font-size: .92rem; font-weight: 600; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--c-border); background: var(--c-bg); color: var(--c-text); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.chip small { font-size: .8rem; font-weight: 400; margin-left: .3rem; opacity: .75; }
.chip:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--c-primary); text-decoration: underline; cursor: pointer; }

.chronik-group + .chronik-group { margin-top: 2.25rem; }
.chronik-year { display: flex; align-items: baseline; gap: .75rem; margin: 0 0 1rem; font-size: 1.6rem; }
.chronik-year small { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: var(--c-muted); }
.chronik-year::after { content: ""; flex: 1; height: 1px; background: var(--c-border); align-self: center; }
.chronik-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.chronik-card { display: flex; min-width: 0; }
.chronik-link { display: flex; flex-direction: column; gap: .2rem; width: 100%; padding: 1.1rem 1.2rem 1rem; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 14px; color: var(--c-text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.chronik-link:hover { color: var(--c-text); border-color: var(--c-primary); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37, 118, 139, .16); }
.chronik-top { display: flex; align-items: center; gap: .9rem; }
.chronik-mark { flex: none; width: 2.5rem; height: 3.1rem; font-size: .72rem; }
.chronik-heading { display: flex; flex-direction: column; min-width: 0; }
.chronik-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.chronik-date { color: var(--c-muted); font-size: .95rem; margin-top: .1rem; }
.chronik-desc { margin-top: .55rem; color: var(--c-muted); font-size: .95rem; }
.chronik-cta { margin-top: auto; padding-top: .85rem; font-weight: 700; font-size: .95rem; color: var(--c-accent); }
.chronik-link:hover .chronik-cta { text-decoration: underline; }

/* ------------------------------ Start: Hero ------------------------------ */

.hero {
  position: relative; overflow: hidden;
  background: var(--c-primary); color: #fff;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem);
  border-bottom-right-radius: var(--radius-lg);
  margin-right: clamp(0rem, 4vw, 3rem);
}
.hero::before { /* Farbfläche in der Sekundärfarbe */
  content: ""; position: absolute; right: -8rem; bottom: -9rem; width: 26rem; height: 26rem;
  border-radius: 50%; background: var(--c-secondary); opacity: .35;
}
.hero::after {
  content: ""; position: absolute; right: 3rem; top: -6rem; width: 12rem; height: 12rem;
  border-radius: 50%; border: 1.25rem solid rgba(255, 255, 255, .1);
}
.hero .container { position: relative; z-index: 1; margin-left: max(1.25rem, calc((100vw - var(--container)) / 2)); margin-right: 0; } /* Text bündig mit dem übrigen Seiteninhalt, obwohl das Farbband rechts eingerückt ist */
.hero h1 { color: #fff; max-width: 20ch; margin-bottom: .6rem; }
.hero-lead { font-size: 1.25rem; max-width: 34rem; margin-bottom: 1.75rem; color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Optionales Startseiten-Bild rechts neben der Begrüßung (auf dem Handy darunter). Gestaltung passend zur Seite:
   weißer Rahmen wie bei den weißen Buttons, dahinter ein Kreis und ein Ring wie die Dekor-Formen im Farbband.
   Das Bild wird nie beschnitten (es behält sein Seitenverhältnis); die Rundung der Ecken hängt von der Form ab.
   Der weiße Hintergrund hinter dem Bild sorgt dafür, dass auch Grafiken auf Weiß oder transparente PNGs sauber wirken. */
.hero-grid.has-image { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-right: clamp(1.25rem, 4vw, 3rem); }
.hero-text { min-width: 0; }
.hero-with-image::before { display: none; } /* der große Kreis des Farbbands wandert hinter das Bild (siehe .hero-image::before) */
.hero-image { position: relative; isolation: isolate; margin: 0; padding: .5rem; justify-self: end; max-width: 100%; }
.hero-image img {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 20rem;
  background: #fff; border-radius: 1rem;
  box-shadow: 0 0 0 .5rem #fff, 0 22px 46px rgba(7, 45, 57, .32);
}
.hero-image img[data-shape="square"] { border-radius: 1.5rem; max-height: 18rem; }
.hero-image img[data-shape="tall"] { border-radius: 1.25rem; max-height: 22rem; }
.hero-image::before { /* Kreis in der Sekundärfarbe, hinten rechts unten */
  content: ""; position: absolute; z-index: -1; width: 62%; aspect-ratio: 1; right: -2.4rem; bottom: -2.6rem;
  border-radius: 50%; background: var(--c-secondary); opacity: .6;
}
.hero-image::after { /* Ring wie im Farbband, vorn links oben */
  content: ""; position: absolute; z-index: -1; width: 6.5rem; height: 6.5rem; left: -1.9rem; top: -1.9rem;
  border-radius: 50%; border: 1.1rem solid rgba(255, 255, 255, .16);
}
@media (max-width: 47.99em) {
  .hero-grid.has-image { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-right: 1.25rem; }
  .hero-image { justify-self: start; padding: .4rem; }
  .hero-image img { max-height: 15rem; box-shadow: 0 0 0 .4rem #fff, 0 16px 34px rgba(7, 45, 57, .3); }
  .hero-image img[data-shape="square"] { max-height: 14rem; }
  .hero-image img[data-shape="tall"] { max-height: 17rem; }
  .hero-image::before { right: -1.3rem; bottom: -1.5rem; }
  .hero-image::after { display: none; } /* der Ring würde am linken Bildschirmrand abgeschnitten */
}

.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-tint { background: var(--c-surface); }
.intro { max-width: 44rem; font-size: 1.15rem; }
.page-head { margin-bottom: 2rem; max-width: 46rem; }
.page-head.narrow { max-width: 46rem; }

.home-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60em) { .home-grid { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.stack { display: grid; gap: 1rem; }
.empty { color: var(--c-muted); padding: 1rem 0; }

/* ------------------------------ Rich-Text-Inhalte ------------------------------ */

.rich { display: flow-root; }
.rich > :first-child { margin-top: 0; }
.rich h2 { margin-top: 1.6em; }
.rich h3, .rich h4 { margin-top: 1.4em; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 1em; }
.rich li { margin-bottom: .3em; }
.rich blockquote { margin: 1.2em 0; padding: .2em 1.2em; border-left: 4px solid var(--c-secondary); color: var(--c-muted); font-family: var(--font-head); font-size: 1.1em; }
.rich img { border-radius: var(--radius); }
.rich img.img-left { float: left; max-width: 45%; margin: .3em 1.25rem .75rem 0; }
.rich img.img-right { float: right; max-width: 45%; margin: .3em 0 .75rem 1.25rem; }
.rich img.img-full { display: block; width: 100%; margin: 1em 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.rich th, .rich td { border: 1px solid var(--c-border); padding: .5em .7em; text-align: left; }
.rich hr { border: 0; border-top: 1px solid var(--c-border); margin: 2em 0; }
@media (max-width: 34em) {
  .rich img.img-left, .rich img.img-right { float: none; display: block; max-width: 100%; margin: 1em 0; }
}

/* ------------------------------ Karten: Termine, News ------------------------------ */

/* Mobil: Datum als schmale Pill über dem Beitrag, der Text nutzt die volle Kartenbreite */
.event { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem 1.15rem; box-shadow: var(--shadow); }
.event-date { grid-area: date; display: inline-flex; align-items: baseline; gap: .4rem; justify-self: start; padding: .3rem .85rem; background: var(--c-primary); color: #fff; border-radius: 999px; line-height: 1.1; }
.event-day { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; }
.event-month { font-size: .95rem; font-weight: 600; }
.event-year { font-size: .85rem; opacity: .9; }
.event-body { grid-area: body; min-width: 0; overflow-wrap: anywhere; }
.event-body h3 { margin-bottom: .2rem; }
.event-body p:last-child { margin-bottom: 0; }
.event-sub { color: var(--c-primary-dark); font-weight: 600; margin-bottom: .3rem; }
.event-meta { color: var(--c-muted); font-size: .95rem; }
.event-img { grid-area: img; display: block; border-radius: var(--radius); background: var(--c-surface); }
.event { grid-template-areas: "date" "body"; }

/* Horizontal (Querformat): Bild über dem Beitrag, volle Breite */
.event.img-horizontal { grid-template-areas: "img" "date" "body"; }
.event.img-horizontal .event-img { width: 100%; height: auto; max-height: 24rem; object-fit: cover; }

/* Vertikal (Hochformat): mobil unter dem Text, ab Tablet rechts neben dem Text */
.event.img-vertical { grid-template-areas: "date" "body" "img"; }
.event.img-vertical .event-img { justify-self: center; width: min(100%, 16rem); height: auto; max-height: 26rem; object-fit: cover; }

/* Ab Tablet: Datum als Block links neben dem Text */
@media (min-width: 40em) {
  .event { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "date body"; gap: 1rem 1.25rem; padding: 1.1rem; }
  .event-date { flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 4.6rem; padding: .6rem .3rem; border-radius: var(--radius); text-align: center; align-self: start; justify-self: auto; }
  .event-day { font-size: 1.9rem; }
  .event-year { font-size: .75rem; margin-top: .15rem; }
  .event.img-horizontal { grid-template-areas: "img img" "date body"; }
  .event.img-vertical { grid-template-columns: auto minmax(0, 1fr) 14rem; grid-template-areas: "date body img"; }
  .event.img-vertical .event-img { align-self: start; justify-self: stretch; width: 100%; }
}

.news-list, .past .stack { display: grid; gap: 1rem; }
.news-item { background: var(--c-bg); border: 1px solid var(--c-border); border-left: 5px solid var(--c-secondary); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.section-tint .news-item { background: var(--c-bg); }
.news-item h3 { margin-bottom: .35rem; }
.news-item p { margin-bottom: .5rem; }
/* Formatierter Text in den Karten von Aktuelles und Veranstaltungen: kompakter als ein Seitentext */
.rich-compact { font-size: 1rem; }
.rich-compact > :last-child { margin-bottom: 0; }
.rich-compact p { margin-bottom: .6em; }
.rich-compact h2 { font-size: 1.2rem; margin: 1em 0 .35em; }
.rich-compact h3 { font-size: 1.05rem; margin: .9em 0 .3em; }
.rich-compact ul, .rich-compact ol { margin-bottom: .6em; }
.rich-compact blockquote { margin: .8em 0; font-size: 1rem; }
.news-date { display: block; font-size: .9rem; color: var(--c-muted); margin-bottom: .2rem; }
.more-link { font-weight: 600; }

.past { margin-top: 2.5rem; }
.past summary { cursor: pointer; font-weight: 600; color: var(--c-primary-dark); padding: .6rem 0; }
.past .stack { margin-top: 1rem; }
.past .event { box-shadow: none; opacity: .9; }
.past .event-date { background: var(--c-muted); }

/* ------------------------------ Vorstand ------------------------------ */

.board-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); }
/* Kleine Bildschirme: immer zwei Karten nebeneinander, etwas kompakter */
@media (max-width: 39.99em) {
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .person-body { padding: .7rem .75rem .85rem; }
  .person-body h3 { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
  .person-role { font-size: .86rem; line-height: 1.35; margin-bottom: .75rem; overflow-wrap: anywhere; }
  .person-avatar { font-size: 2.1rem; }
  .person-actions { flex-direction: column; align-items: stretch; gap: .4rem; }
  .person-actions .btn { width: 100%; justify-content: center; text-align: center; padding: .5rem .5rem; font-size: .85rem; }
}
.person { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.person-photo { width: 100%; aspect-ratio: 472 / 602; object-fit: cover; object-position: center top; display: block; border-radius: 0; } /* Hochformat wie die Fotos (ca. 472 × 602 px). Fotos mit anderem Format werden beschnitten: breitere seitlich, höhere unten statt oben, damit der Kopf sichtbar bleibt */
.person-avatar { display: flex; align-items: center; justify-content: center; background: var(--c-secondary); color: var(--c-text); font-family: var(--font-head); font-size: 3.2rem; font-weight: 700; }
.person-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.person-body h3 { margin-bottom: .1rem; }
.person-role { color: var(--c-primary-dark); font-weight: 600; margin-bottom: 1rem; }
.person-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }

/* ------------------------------ Mitglieder ------------------------------ */

.result-count { margin: 0; color: var(--c-muted); font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table thead th { background: var(--c-surface); border-bottom: 2px solid var(--c-primary); white-space: nowrap; }
.table tbody tr:hover { background: var(--c-surface); }
.badge { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.badge-yes { background: var(--c-accent); color: #fff; }
.badge-no { background: var(--c-surface); color: var(--c-muted); border: 1px solid var(--c-border); }

/* Mitglieder als klar getrennte Karten, gruppiert nach Anfangsbuchstabe */
/* Ein Mitglied pro Zeile, überall */
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.member-card { display: flex; gap: .9rem; align-items: flex-start; min-width: 0; padding: 1rem 1.1rem; background: var(--c-bg); border: 1px solid var(--c-border); border-left: 5px solid var(--c-secondary); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.member-card:hover { border-color: var(--c-primary); box-shadow: 0 8px 22px rgba(37, 118, 139, .12); }
.member-avatar { flex: none; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-primary-dark); font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.member-body { min-width: 0; flex: 1; }
@media (min-width: 44em) {
  /* Am Desktop: Name + Ansprechpartner links, Homepage rechts in derselben Zeile */
  .member-card { align-items: center; padding: .9rem 1.25rem; }
  .member-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; align-items: center; }
  .member-body .member-name, .member-body .member-contact { grid-column: 1; }
  .member-body .member-web { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; justify-content: flex-end; }
  .member-body:not(:has(.member-contact)) .member-web { grid-row: 1; }
}
.member-name { margin: 0; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.member-contact { margin: .25rem 0 0; color: var(--c-muted); font-size: .97rem; overflow-wrap: anywhere; }
.member-contact span { font-weight: 600; color: var(--c-text); }
.member-web { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .65rem; }
.member-link { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .3rem .8rem; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-primary-dark); font-size: .92rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; transition: background .15s, border-color .15s; }
.member-link:hover { background: var(--c-bg); border-color: var(--c-primary); color: var(--c-primary-dark); }
.badge-sm { padding: .1rem .55rem; font-size: .78rem; }

/* ------------------------------ Chronik ------------------------------ */

.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.download { display: grid; grid-template-columns: auto 1fr; gap: .75rem 1rem; align-items: center; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.download-body h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.download-body p { margin: 0; color: var(--c-muted); }
.download-year { font-weight: 400; color: var(--c-muted); }
.download .btn { grid-column: 1 / -1; justify-self: start; }
.file-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 3.6rem; background: var(--c-primary); color: #fff; font-size: .78rem; font-weight: 700; border-radius: 6px 12px 6px 6px; }
@media (min-width: 40em) {
  .download { grid-template-columns: auto 1fr auto; }
  .download .btn { grid-column: auto; }
}

/* ------------------------------ Formulare ------------------------------ */

.form { display: grid; gap: 1.1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.req { color: var(--c-danger); }
.input {
  width: 100%; font: inherit; color: var(--c-text); background: var(--c-bg);
  padding: .7rem .85rem; border: 2px solid var(--c-border); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 7rem; }
.input:hover { border-color: var(--c-secondary); }
.input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(75, 174, 179, .35); }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.input[readonly] { background: var(--c-surface); color: var(--c-muted); }
.hint { margin: .3rem 0 0; font-size: .9rem; color: var(--c-muted); }
.field-error { margin: .35rem 0 0; color: var(--c-danger); font-size: .93rem; font-weight: 500; }
.field label.check, .check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--c-accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { background: #fbeceb; border: 1px solid var(--c-danger); color: #7a1912; padding: .75rem 1rem; border-radius: var(--radius); }
.form-success { background: #e7f4f2; border: 1px solid var(--c-accent); color: var(--c-accent-dark); padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; }

/* Erfolgsanzeige nach dem Absenden: ersetzt das Formular, ruhig und professionell */
.contact-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(2rem, 6vw, 3.25rem) 1.5rem; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 16px; box-shadow: var(--shadow); animation: done-in .45s ease-out both; }
.contact-done[hidden] { display: none; }
.contact-done:focus { outline: none; }
.contact-done-icon { display: grid; place-items: center; width: 6.5rem; height: 6.5rem; margin-bottom: 1.25rem; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-border); animation: done-pop .5s cubic-bezier(.2, .9, .3, 1.25) .05s both; }
.contact-done-icon svg { width: 4.4rem; height: 4.4rem; overflow: visible; }
.cd-bit { transform-box: fill-box; transform-origin: 0% 100%; animation: done-bit .55s ease-out var(--d, .2s) both; }
.contact-done h2 { margin-bottom: .35rem; }
.contact-done p { margin: 0 0 1.5rem; color: var(--c-muted); font-size: 1.1rem; max-width: 26rem; }
.contact-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
@media (max-width: 30em) { .contact-done-actions { width: 100%; flex-direction: column; } .contact-done-actions .btn { width: 100%; } }
@keyframes done-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes done-pop { from { opacity: 0; transform: scale(.7); } }
@keyframes done-bit { from { opacity: 0; transform: scale(.4) translate(-6px, 6px); } }

.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 56em) { .contact-grid { grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; } }
@media (min-width: 56em) { .contact-grid.contact-grid-single { grid-template-columns: minmax(0, 42rem); } } /* statische Kontaktseite: nur der E-Mail-Kasten */
.contact-mail { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.contact-mail h2 { margin-top: 0; }
.contact-mail-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 1rem; }
.contact-mail-addr { margin: 0; color: var(--c-muted); font-size: .95rem; overflow-wrap: anywhere; }
.contact-mail-status { margin: .6rem 0 0; min-height: 1.4em; color: var(--c-accent-dark); font-size: .92rem; }
@media (max-width: 30em) { .contact-mail-actions .btn { width: 100%; } }
.contact-card { background: var(--c-surface); border-radius: var(--radius); padding: 1.5rem; border-top: 5px solid var(--c-secondary); }
.contact-card h2 { font-size: 1.3rem; }
.contact-card p:last-child { margin-bottom: 0; }

/* ------------------------------ Fußbereich ------------------------------ */

/* Fußzeile: hell und freundlich, mit demselben Farbstreifen wie die Kopfzeile */
.site-footer { position: relative; margin-top: auto; padding: 2.75rem 0 1.5rem; background: var(--c-surface); color: var(--c-text); border-top: 1px solid var(--c-border); font-size: .97rem; }
.site-footer::before { content: ""; position: absolute; inset: -1px 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--c-primary), var(--c-secondary)); }
.site-footer a { color: var(--c-primary-dark); }
.site-footer a:hover { color: var(--c-primary); }
.footer-inner { display: grid; gap: 1.75rem 3rem; }
.footer-brand { display: flex; align-items: center; gap: .85rem; margin-bottom: .85rem; }
.footer-logo { width: 2.75rem; height: 2.75rem; flex: none; object-fit: contain; border-radius: 10px; }
.footer-brand strong { font-family: var(--font-head); font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
.footer-col p { margin: .2rem 0 0; color: var(--c-muted); }
.footer-col p a { font-weight: 500; }
.footer-title { margin: 0 0 .6rem !important; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary-dark) !important; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-links a { text-decoration-color: transparent; transition: text-decoration-color .15s, color .15s; }
.footer-links a:hover { text-decoration-color: currentColor; }
.footer-copy { margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: .9rem; }
@media (min-width: 48em) {
  .footer-inner { grid-template-columns: 1.6fr 1fr; }
  .footer-copy { grid-column: 1 / -1; }
}

/* ------------------------------ Hinweis-Toast ------------------------------ */

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); z-index: 300; max-width: min(92vw, 30rem); background: var(--c-text); color: #fff; padding: .8rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--c-danger); }

/* ==========================================================================
   Admin-Bereich
   ========================================================================== */

/* Im Admin-Bereich ersetzt eine eigene Kopfzeile die Website-Navigation; die Fußzeile bleibt. */
body.admin-mode:not(.admin-auth) #site-header { display: none; } /* Anmeldeseiten zeigen die öffentliche Kopfzeile */

body.admin-mode:not(.admin-auth) { --container: 78rem; } /* Verwaltung darf etwas breiter sein; Kopf, Farbband und Fußzeile bleiben bündig */

/* Kopfzeile im Stil der Website (Farbstreifen, Logo, Vereinsname) */
.admin-header { background: var(--c-bg); border-bottom: 1px solid var(--c-border); box-shadow: 0 6px 18px rgba(37, 118, 139, .06); }
.admin-header::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--c-primary), var(--c-secondary)); }
.admin-header .header-inner { padding-block: .1rem; }
.admin-header .brand { flex: 1 1 0; min-width: 0; }
.admin-top-actions { flex: none; }
.admin-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* Benutzer-Pill: Avatar + Name + Rolle */
.user-pill { display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; padding: .28rem .35rem .28rem .3rem; font: inherit; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.user-pill:hover { background: var(--c-bg); border-color: var(--c-primary); box-shadow: 0 2px 10px rgba(37, 118, 139, .15); }
.user-pill-avatar { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--c-primary); color: #fff; font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; line-height: 1; }
.user-pill-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; }
.user-pill-role { flex: none; padding: .22rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.user-pill-role.role-superadmin { background: var(--c-primary-dark); color: #fff; }
.user-pill-role.role-admin { background: var(--c-primary); color: #fff; }
.user-pill-role.role-moderator { background: var(--c-secondary); color: var(--c-text); }

/* Farbband wie auf der Startseite, aber kompakter */
.hero-compact { padding: clamp(1.4rem, 3.5vw, 2.4rem) 0 clamp(1.6rem, 4vw, 2.7rem); }
.hero-compact::before { width: 18rem; height: 18rem; right: -6rem; bottom: -8rem; }
.hero-compact::after { width: 9rem; height: 9rem; right: 4rem; top: -4.5rem; border-width: 1rem; }
.hero-compact h1 { margin-bottom: .2rem; max-width: none; font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem); }
.hero-compact .hero-lead { margin: 0; font-size: 1.05rem; max-width: 40rem; }
.hero-auth { padding-bottom: clamp(4.5rem, 9vw, 5.5rem); }

.admin-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem 0 3rem; }
@media (min-width: 60em) { .admin-body { grid-template-columns: 15rem minmax(0, 1fr); gap: 1.75rem; padding: 2rem 0 3.5rem; align-items: start; } }

/* Bereichsmenü: wie das aufklappbare Menü der Website */
.admin-tabs { display: none; } /* mobil ersetzt durch das Burger-Menü in der Kopfzeile */
.admin-tabs button { font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; text-align: left; background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: 999px; padding: .5rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; transition: background .15s, border-color .15s, color .15s; }
.admin-tabs button:hover { background: var(--c-bg); border-color: var(--c-primary); color: var(--c-primary-dark); }
@media (min-width: 60em) { .admin-tabs button { white-space: normal; line-height: 1.25; } } /* lange Namen wie „Statische Webseite exportieren“ brechen um statt abgeschnitten zu werden */
.admin-tabs button[aria-current="page"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.admin-tabs .count { background: var(--c-accent); color: #fff; border-radius: 999px; font-size: .78rem; padding: .05rem .5rem; }
.admin-tabs [aria-current="page"] .count { background: #fff; color: var(--c-primary-dark); }
@media (min-width: 60em) {
  .admin-tabs { display: flex; flex-direction: column; gap: .15rem; overflow: visible; position: sticky; top: 1rem; padding: .4rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; }
  .admin-tabs button { border: 0; border-radius: 11px; background: transparent; padding: .7rem 1rem; }
  .admin-tabs button:hover { background: var(--c-bg); }
  .admin-tabs button[aria-current="page"] { background: var(--c-primary); }
}

.admin-panel { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 16px; padding: 1.25rem; min-width: 0; box-shadow: var(--shadow); }
@media (min-width: 40em) { .admin-panel { padding: 1.75rem; } }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.panel-head h2 { margin-bottom: .2rem; }
.panel-head .hint { margin: 0; max-width: 42rem; }
.narrow-form { max-width: 34rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }

.admin-table td { font-size: .97rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
/* Tabellenmodus: kurze Werte einzeilig, lange Werte brechen auf höchstens zwei Zeilen um und enden dann mit „…“
   (der volle Text steht im Tooltip und im Bearbeiten-Dialog). Jede Spalte darf bis auf 8rem schrumpfen; reicht das nicht, folgt der Kartenmodus. */
.admin-table td .cell { display: block; max-width: 20rem; overflow-wrap: anywhere; }
.admin-table td .cell-long { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-width: 8rem; }
.admin-table th, .admin-table td { padding: .7rem .75rem; }
.admin-table td.row-actions { display: table-cell; text-align: right; vertical-align: middle; white-space: nowrap; }
.admin-table td.row-actions .btn + .btn { margin-left: .4rem; }

/* Kartenmodus (setzt das Skript, sobald eine Tabelle nicht ohne seitliches Scrollen passt) */
.admin-table.is-cards thead { position: absolute; left: -9999px; }
.admin-table.is-cards, .admin-table.is-cards tbody, .admin-table.is-cards tr, .admin-table.is-cards td { display: block; width: 100%; }
.admin-table.is-cards tr { border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: .8rem; padding: .35rem 0; }
.admin-table.is-cards td { border: 0; padding: .3rem .9rem; display: flex; align-items: baseline; gap: .75rem; justify-content: space-between; text-align: right; min-width: 0; white-space: normal; }
.admin-table.is-cards td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--c-muted); text-align: left; flex: none; }
.admin-table.is-cards td .cell { display: block; max-width: none; min-width: 0; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.admin-table.is-cards td.row-actions { display: flex; justify-content: flex-start; padding-bottom: .6rem; }
/* Zellinhalt als ein Block: bricht in der Karte um, statt die Karte zu verbreitern (z. B. Protokoll mit IP und Proxy) */
.admin-table.is-cards td > .cv { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }

/* Dialog */
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(94vw, 52rem); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--c-text); background: var(--c-bg); }
/* Offener Dialog: Die Seite dahinter bleibt stehen. Die Scrollleiste behält ihren Platz, damit nichts verrutscht. */
html.modal-open { overflow: hidden; scrollbar-gutter: stable; }
dialog.modal::backdrop { background: rgba(0, 0, 0, .5); }
dialog.modal > form { padding: 1.5rem; }
dialog.modal h2 { margin-bottom: .25rem; }

/* Datei-Feld */
.file-field { display: grid; gap: .6rem; padding: .75rem; border: 2px dashed var(--c-border); border-radius: var(--radius); }
.file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.thumb { max-height: 7rem; max-width: 100%; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface); }

/* Editor */
.rte { border: 2px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.rte:focus-within { border-color: var(--c-primary); }
.rte > .hint { padding: 0 .75rem .6rem; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .5rem; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.rte-btn { font: inherit; font-size: .88rem; cursor: pointer; padding: .3rem .6rem; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 6px; color: var(--c-text); }
.rte-btn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary-dark); }
.rte-btn:disabled { opacity: .45; cursor: not-allowed; }
.rte-btn.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.rte-btn.is-bold { font-weight: 800; }
.rte-btn.is-italic { font-style: italic; }
.rte-btn.is-underline { text-decoration: underline; }
.rte-sep { width: 1px; height: 1.4rem; background: var(--c-border); margin: 0 .2rem; }
.rte-area { min-height: 16rem; max-height: 55vh; overflow: auto; padding: 1rem; outline: none; }
.rte-area img { cursor: pointer; }
.rte-area img.is-selected { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.rte-source { width: 100%; min-height: 16rem; border: 0; padding: 1rem; font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; display: block; }
.rte-source[hidden], .rte-area[hidden] { display: none; }

/* Nachrichten */
.messages { display: grid; gap: 1rem; }
.message { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.message.unread { border-left: 5px solid var(--c-accent); background: #f5fbfa; }
.message header { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; margin-bottom: .4rem; }
.message header time { margin-left: auto; font-size: .88rem; }
.message h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.message .row-actions { justify-content: flex-start; }

/* Anmelden: Karte überlappt das Farbband, wie eine Karte auf der Startseite */
.login-wrap { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -3.6rem; padding: 0 1.25rem 3.5rem; }
.login-card { width: min(100%, 28rem); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 16px; padding: 1.75rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 36px rgba(37, 118, 139, .16); }
.login-card .btn { width: 100%; }
.login-card .hint { margin: 0; }
.back-link { margin: 0; text-align: center; font-size: .95rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .skip-link, .hero-actions, .hero-image { display: none !important; }
  .hero { background: none; color: #000; }
  .hero h1, .hero-lead { color: #000; }
}

/* ------------------------------ Benutzerverwaltung / Konto ------------------------------ */

.badge.role-superadmin { background: var(--c-primary-dark); color: #fff; }
.badge.role-admin { background: var(--c-primary); color: #fff; }
.badge.role-moderator { background: var(--c-secondary); color: var(--c-text); }
.role-help { list-style: none; margin: 0 0 1.25rem; padding: 1rem 1.1rem; display: grid; gap: .6rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; font-size: .95rem; }
.form-success { background: #e8f5f2; border: 1px solid var(--c-accent); color: #0b4a43; padding: .75rem 1rem; border-radius: var(--radius); }
.account-nav { margin-bottom: 1.25rem; }
.narrow-form + .hint, .panel-head + .form-success, .panel-head + .form-alert { margin-top: 0; }
.panel-head + .form-success, .panel-head + .form-alert { margin-bottom: 1.25rem; max-width: 42rem; }

/* Einstellungs-Abschnitte im Admin (z. B. Kontaktformular-Empfänger) */
.settings-section { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--c-border); }
.settings-section > h3 { margin-bottom: .3rem; }
.settings-section > .hint { max-width: 42rem; margin-bottom: 1rem; }
.settings-section > .form-alert, .settings-section > .form-success { max-width: 42rem; margin-bottom: 1.25rem; }
.recipient-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.recipient-row { display: flex; gap: .5rem; align-items: center; }
.recipient-row .input { flex: 1; min-width: 0; }

/* Backup und Wiederherstellung */
.backup-facts { margin: 0 0 1.25rem; padding-left: 1.2rem; max-width: 42rem; color: var(--c-muted); font-size: .95rem; display: grid; gap: .35rem; }
.pw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; margin: -.25rem 0 1rem; }
.pw-tools .check { margin: 0; }
.danger-zone { padding: 1.4rem 1.5rem; background: #fdf6f5; border: 1px solid #ecc9c5; border-radius: 16px; }
.danger-zone > h3 { color: var(--c-danger); }

/* Protokoll */
.audit-tools { display: grid; gap: .75rem; margin-bottom: .75rem; }
.audit-search { display: flex; flex-wrap: wrap; gap: .6rem; }
.audit-search .input { flex: 1 1 16rem; min-width: 0; margin: 0; }
.audit-body .table-wrap { margin-top: .5rem; }
.audit-table td { vertical-align: top; }
.audit-time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--c-muted); }
.audit-action { font-weight: 600; }
.audit-detail { margin-top: .15rem; font-size: .92rem; color: var(--c-muted); overflow-wrap: anywhere; }
.audit-detail > span + span::before { content: " · "; }
.audit-target { font-weight: 600; color: var(--c-text); }
.audit-ip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-via { font-size: .82rem; }
.audit-flag { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; margin-right: .45rem; border-radius: 50%; background: var(--c-danger); color: #fff; font-size: .78rem; font-weight: 700; vertical-align: .05rem; }
.audit-table tr.audit-warn td:first-child { box-shadow: inset 4px 0 0 var(--c-danger); }
.cat-badge { font-size: .8rem; padding: .12rem .6rem; white-space: nowrap; }
.cat-login { background: var(--c-primary); color: #fff; }
.cat-user { background: var(--c-primary-dark); color: #fff; }
.cat-change { background: var(--c-secondary); color: var(--c-text); }
.cat-settings { background: var(--c-accent); color: #fff; }
.cat-system { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); }
.audit-more { margin-top: 1.25rem; text-align: center; }
.audit-table.is-cards tr.audit-warn { border-left: 4px solid var(--c-danger); }
.audit-table.is-cards tr.audit-warn td:first-child { box-shadow: none; }

/* ------------------------------ Verwaltung mobil: schlanke Kopfzeile + Burger-Menü ------------------------------ */

.admin-menu { display: none; flex-basis: 100%; padding-bottom: .9rem; }
.admin-header.nav-open .admin-menu { display: block; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overscroll-behavior: contain; overflow-y: auto; animation: nav-in .2s ease-out; }
.admin-menu ul { list-style: none; margin: 0; padding: .35rem; display: flex; flex-direction: column; gap: .1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; }
.admin-menu-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .56rem .9rem; font: inherit; font-size: .96rem; font-weight: 600; text-align: left; text-decoration: none; color: var(--c-text); background: transparent; border: 0; border-radius: 11px; cursor: pointer; }
.admin-menu-label { flex: 1; min-width: 0; }
.admin-menu-item:hover { background: var(--c-bg); color: var(--c-primary-dark); }
.admin-menu-item[aria-current="page"] { background: var(--c-primary); color: #fff; }
.admin-menu-item[data-tab]::after { content: "\203A"; font-size: 1.4rem; line-height: 1; color: var(--c-secondary); }
.admin-menu-item[aria-current="page"]::after { color: #fff; }
.admin-menu .count { background: var(--c-accent); color: #fff; border-radius: 999px; font-size: .75rem; padding: .05rem .5rem; }
.admin-menu [aria-current="page"] .count { background: #fff; color: var(--c-primary-dark); }
.admin-menu-sep { height: 1px; margin: .3rem .6rem; background: var(--c-border); }
.admin-menu-logout { color: var(--c-danger); }
.admin-menu-logout:hover { color: var(--c-danger); }

/* Farbband mit Titel und (kleiner) Benutzer-Pill */
.hero-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hero-bar-text { min-width: 0; }
.user-pill--hero { flex: none; min-width: 0; gap: .4rem; padding: .16rem .3rem .16rem .18rem; font-size: .84rem; }
.user-pill--hero .user-pill-avatar { width: 1.65rem; height: 1.65rem; font-size: .88rem; }
.user-pill--hero .user-pill-name { max-width: 6.2rem; }
.user-pill--hero .user-pill-role { padding: .1rem .5rem; font-size: .68rem; }

@media (max-width: 59.99em) {
  .admin-header .header-inner { gap: 0 .75rem; }
  .admin-header .brand { padding: .5rem 0; gap: .65rem; }
  .admin-header .brand-logo { width: 2.5rem; height: 2.5rem; border-radius: 9px; }
  .admin-header .brand-name { font-size: 1.05rem; }
  .admin-header .brand-tag { font-size: .78rem; margin-top: 0; }
  .admin-header .nav-toggle { width: 2.6rem; height: 2.6rem; border-radius: 12px; }
  .admin-actions-desktop { display: none; }
  .hero-compact { padding: .95rem 0 1.1rem; }
  .hero-compact h1 { font-size: 1.45rem; margin-bottom: 0; }
  .hero-compact::before { width: 11rem; height: 11rem; right: -4rem; bottom: -6rem; }
  .hero-compact::after { display: none; }
  .admin-body { padding: 1rem 0 2rem; gap: 0; }
  .admin-panel { padding: 1rem; border-radius: 14px; }
  .panel-head h2 { font-size: 1.45rem; }
}
@media (max-width: 39.99em) {
  .hero-compact .hero-lead { display: none; }
}
/* Anmelden, Passwort vergessen: Das Farbband bleibt höher, weil die Karte es überlappt */
@media (max-width: 59.99em) {
  .hero-compact.hero-auth { padding-bottom: 4.9rem; }
  .hero-compact.hero-auth .hero-lead { display: block; }
}
@media (min-width: 60em) {
  .admin-burger, .admin-menu, .user-pill--hero { display: none !important; }
}

/* Automatische Backups (SFTP) */
.ab-card { margin: 2.5rem 0 1.75rem; border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-bg); }
.ab-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; list-style: none; border-radius: 16px; }
.ab-card > summary::-webkit-details-marker { display: none; }
.ab-card > summary::after { content: "\203A"; font-size: 1.7rem; line-height: 1; color: var(--c-primary); transform: rotate(90deg); transition: transform .2s; flex: none; }
.ab-card[open] > summary::after { transform: rotate(-90deg); }
.ab-card > summary:hover { background: var(--c-surface); }
.ab-card > summary:focus-visible { outline: 3px solid var(--c-secondary); outline-offset: -3px; }
.ab-card > summary h3 { margin: 0; }
.ab-sub-title { display: block; margin-top: .15rem; color: var(--c-muted); font-size: .92rem; overflow-wrap: anywhere; }
.ab-card > summary.ab-on .ab-sub-title { color: var(--c-accent-dark); font-weight: 600; }
.ab-body { padding: 1.1rem 1.25rem 1.4rem; border-top: 1px solid var(--c-border); min-width: 0; }
.ab-form { max-width: 46rem; }
.ab-form, .ab-form .field, .ab-form .ab-storage, .ab-row > * { min-width: 0; }
.ab-form select.input, .ab-form .input { width: 100%; max-width: 100%; min-width: 0; }
.ab-form select.input { text-overflow: ellipsis; }
.ab-form .hint, .ab-form label, .ab-hostkey p { overflow-wrap: anywhere; } /* lange Adressen in den Hinweistexten brechen um */
.ab-sub { margin: 1.6rem 0 .7rem; padding-top: 1.1rem; border-top: 1px solid var(--c-border); font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary-dark); }
.ab-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }
@media (min-width: 40em) { .ab-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ab-status { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius); overflow-wrap: anywhere; }
.ab-status.ab-info { background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text); }
.ab-status.ab-running { background: var(--c-surface); border: 1px solid var(--c-secondary); color: var(--c-primary-dark); font-weight: 600; }
.ab-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; min-height: 7rem; resize: vertical; }
.ab-hostkey { margin: 0 0 1rem; }
.ab-hk-ok { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.ab-hk-ok code, .ab-hk-ask code { overflow-wrap: anywhere; word-break: break-all; font-size: .85rem; background: rgba(255, 255, 255, .7); padding: .1rem .4rem; border-radius: 6px; }
.ab-hk-ask { padding: .9rem 1rem; border: 1px solid var(--c-secondary); border-radius: var(--radius); background: var(--c-surface); }
.ab-hk-ask p { margin: 0 0 .6rem; }
.ab-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 1rem; }
.ab-test { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius); overflow-wrap: anywhere; }
.ab-test.ab-info { background: var(--c-surface); border: 1px solid var(--c-border); }
.ab-files { margin: 0 0 1rem; }
.ab-filelist, .ab-history { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.ab-filelist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .55rem .8rem; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); font-size: .93rem; }
.ab-fname { overflow-wrap: anywhere; font-weight: 600; min-width: 0; }
.ab-history li { display: flex; align-items: flex-start; gap: .75rem; padding: .65rem .85rem; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); min-width: 0; }
.ab-history li > div { min-width: 0; overflow-wrap: anywhere; }
.ab-mark { flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .85rem; font-weight: 700; color: #fff; background: var(--c-accent); }
.ab-bad .ab-mark { background: var(--c-danger); }
.ab-err { color: var(--c-danger); font-size: .93rem; }
.ab-empty { color: var(--c-muted); }

/* Einstellung „Kopfzeile und Menü beim Scrollen“ = fixiert: Der Container der Kopfzeile bleibt oben stehen. */
html.header-sticky #site-header { position: sticky; top: 0; z-index: 50; }
/* … und in der Verwaltung die Verwaltungs-Kopfzeile; die mitwandernde Seitenleiste bleibt darunter */
html.header-sticky .admin-header { position: sticky; top: 0; z-index: 60; }
@media (min-width: 60em) { html.header-sticky .admin-tabs { top: calc(var(--admin-header-h, 7rem) + 1rem); } }
/* scroll-padding: Sprungziele und Tastaturfokus verschwinden nicht unter der Kopfzeile. overflow-anchor: ohne Scroll-Verankerung, denn sonst verschiebt
   das Kompaktwerden der Kopfzeile die Scrollposition und die Kopfzeile flackert an der Schwelle. */
html.header-sticky { scroll-padding-top: 9rem; overflow-anchor: none; }

/* Dezente Versionsangabe ganz unten in den Einstellungen */
.hint.version-info, .narrow-form + .hint.version-info { margin-top: 2.25rem; max-width: 34rem; padding-top: .9rem; border-top: 1px solid var(--c-border); font-size: .8rem; opacity: .75; }

/* Statische Webseite exportieren (Verwaltung) */
.export-howto { max-width: 42rem; margin: 0 0 1.75rem; padding: 1rem 1.25rem; background: var(--c-surface); border-left: 5px solid var(--c-secondary); border-radius: var(--radius); }
.export-howto h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.export-howto ol { margin: .2rem 0 .7rem 1.15rem; padding: 0; }
.export-howto li { margin-bottom: .25rem; }
.export-howto .hint { margin: 0; }
.export-section > h3 { margin-bottom: .6rem; }
.export-checks { display: grid; gap: .5rem; max-width: 42rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.export-check { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem .8rem; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); overflow-wrap: anywhere; }
.export-check-icon { flex: none; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; margin-top: .05rem; border-radius: 50%; color: #fff; font-size: .82rem; font-weight: 700; }
.export-check.is-ok .export-check-icon { background: var(--c-accent); }
.export-check.is-info .export-check-icon { background: var(--c-primary-dark); }
.export-check.is-warn { background: #fff8ee; border-color: #e6cba6; }
.export-check.is-warn .export-check-icon { background: #b3651a; }
.export-take { margin: -.35rem 0 1.1rem; }
.export-result { max-width: 42rem; margin-top: 1.25rem; }
.export-done { padding: 1.1rem 1.25rem; background: var(--c-surface); border: 1px solid var(--c-border); border-top: 5px solid var(--c-accent); border-radius: var(--radius); }
.export-done h3 { margin: 0 0 .4rem; }
.export-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0 .6rem; }
.export-warn { margin: .8rem 0; }
.export-warn ul { margin: .35rem 0 0 1.1rem; padding: 0; }
.export-files { margin-top: .8rem; font-size: .9rem; }
.export-files summary { cursor: pointer; font-weight: 600; }
.export-files ul { max-height: 18rem; overflow: auto; margin: .5rem 0 0; padding: .6rem .8rem; list-style: none; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); }
.export-files li { padding: .12rem 0; overflow-wrap: anywhere; }
@media (max-width: 30em) { .export-actions .btn { width: 100%; } }
.export-ftp { margin: 1.6rem 0 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--c-border); }
.export-ftp h3 { margin: 0 0 .3rem; }
.export-baselines .hint { margin: .2rem 0; }
.export-baselines .btn { margin-left: .4rem; vertical-align: middle; }
.export-upload { max-width: 42rem; margin-top: 1rem; }
.export-progress { height: .65rem; margin: .7rem 0 .4rem; background: var(--c-border); border-radius: 999px; overflow: hidden; }
.export-progress > span { display: block; height: 100%; background: var(--c-accent); transition: width .35s; }

