/* ---------- Schriften (lokal gehostet, keine Google-Verbindung) ---------- */
@font-face { font-family: 'Fraunces'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }

/* ---------- Farben & Maße ---------- */
:root {
  color-scheme: light;
  --bg: #F3F6F2;
  --surface: #FFFFFF;
  --surface-2: #EAF0EA;
  --ink: #1F2E28;
  --muted: #5B6B63;
  --line: #D9E1DA;
  --accent: #2F6F5E;
  --accent-ink: #FFFFFF;
  --accent-soft: #DFECE5;
  --sun: #E6B544;
  --sun-soft: #FBF1D6;
  --danger: #A9473B;
  --danger-soft: #F6E4E1;
  --cat-verein: #2F6F5E;
  --cat-kita: #4C82B0;
  --cat-fest: #D9A12E;
  --cat-sitzung: #7F6FAF;
  --cat-ferien: #A8745A;
  --shadow: 0 1px 2px rgba(31, 46, 40, .06), 0 8px 24px -12px rgba(31, 46, 40, .18);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131A17; --surface: #1A2320; --surface-2: #212C28; --ink: #E5ECE7; --muted: #9AAAA2; --line: #2D3934;
    --accent: #84C3AD; --accent-ink: #10201A; --accent-soft: #223630; --sun: #E3B34B; --sun-soft: #3A3220;
    --danger: #E08B7E; --danger-soft: #3B2522;
    --cat-verein: #84C3AD; --cat-kita: #7DB0DB; --cat-fest: #E3B34B; --cat-sitzung: #ADA0DB; --cat-ferien: #D29F84;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose { white-space: pre-line; max-width: 68ch; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Buttons & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1;
  padding: .75em 1.15em; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
  min-height: 44px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface-2); filter: none; }
.btn-ghost { background: transparent; color: var(--muted); padding-inline: .7em; }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); filter: none; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 36px; padding: .55em .9em; font-size: .875rem; }
.btn-icon { padding: 0; width: 40px; min-height: 40px; border-radius: 50%; }
.btn[disabled] { opacity: .55; cursor: default; }

.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field > span, .field-label { font-weight: 700; font-size: .92rem; }
.field small { color: var(--muted); font-size: .85rem; }
input:not([type]), input[type="url"], input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .65em .8em; width: 100%; min-height: 44px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; padding: .35rem 0; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--muted); font-size: .85rem; }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); padding: .65rem .85rem; margin-bottom: 1rem; font-size: .95rem; }

/* ---------- Öffentliche Startseite ---------- */
.site-header {
  max-width: 1160px; margin: 0 auto; padding: 1.1rem clamp(1rem, 4vw, 2rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.25; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { max-width: 28ch; }

.notice {
  max-width: 1160px; margin: 0 auto .5rem; padding: 0 clamp(1rem, 4vw, 2rem);
}
.notice-inner {
  display: flex; gap: .85rem; align-items: center;
  background: var(--sun-soft); border-radius: var(--r-md); padding: .85rem 1.1rem; font-weight: 700;
}
.notice-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); flex: none; box-shadow: 0 0 0 5px color-mix(in srgb, var(--sun) 25%, transparent); }

.hero {
  max-width: 1160px; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 4vw, 4.4rem); line-height: 1.05; letter-spacing: -0.025em; margin-bottom: .45em; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Das eine prägende Element: Fotos als Kieselsteine */
.pebbles { position: relative; aspect-ratio: 1 / .92; }
.pebble { position: absolute; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.pebble img { width: 100%; height: 100%; object-fit: cover; }
.pebble-1 { inset: 0 22% 26% 0; border-radius: 56% 44% 48% 52% / 52% 46% 54% 48%; }
.pebble-2 { inset: 38% 0 0 46%; border-radius: 46% 54% 42% 58% / 56% 48% 52% 44%; }
.pebble-3 { inset: 62% 62% 2% 8%; border-radius: 50% 50% 46% 54% / 58% 52% 48% 42%; }
.pebble-empty { display: grid; place-items: center; color: var(--muted); font-size: .9rem; text-align: center; padding: 1rem; }
.pebble-empty svg { width: 34px; height: 34px; opacity: .6; }

.section { max-width: 1160px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-alt { background: var(--surface); }
.section-alt-wrap { background: var(--surface); }

.news-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.news-date { color: var(--muted); font-size: .92rem; padding-top: .2rem; }
.news-item h3 { margin-bottom: .35rem; }
.news-item .prose { color: var(--ink); }
.pin { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .15rem .55rem; border-radius: 999px; margin-left: .5rem; vertical-align: middle; font-family: var(--font-body); }
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: .25rem; } }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.date-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.date-item { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start; }
.date-badge { background: var(--accent-soft); color: var(--accent); border-radius: var(--r-md); text-align: center; padding: .45rem 0 .5rem; line-height: 1.1; }
.date-badge b { display: block; font-family: var(--font-head); font-size: 1.4rem; }
.date-badge span { font-size: .8rem; font-weight: 700; }
.date-item h4 { margin: .1rem 0 .1rem; font-size: 1.05rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: .75rem; }
.gallery figure { margin: 0; }
.gallery button { padding: 0; border: 0; background: var(--surface-2); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; width: 100%; aspect-ratio: 4 / 3; display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: .88rem; color: var(--muted); padding: .4rem .15rem 0; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1160px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2rem); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.site-footer nav { display: flex; gap: 1.25rem; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--ink); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .pebbles { max-width: 460px; width: 100%; justify-self: center; }
}
@media (max-width: 520px) { .brand-name { font-size: .92rem; } .site-header .btn span { display: none; } }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.5rem, 5vw, 2.5rem); box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 1.75rem; }
.login-card h1 { font-size: 1.9rem; }
.login-card .btn { width: 100%; margin-top: .5rem; }
.login-back { display: block; text-align: center; margin-top: 1.25rem; color: var(--muted); font-size: .95rem; }

/* ---------- Mitgliederbereich ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 1.25rem .85rem;
}
.sidebar .brand { padding: 0 .5rem 1.25rem; font-size: .95rem; }
.nav { display: grid; gap: .15rem; }
.nav a {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: .98rem;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: .75rem .5rem; }
.nav-label { font-size: .8rem; color: var(--muted); padding: .25rem .8rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.me { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sun-soft); color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.me-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.me-role { font-size: .82rem; color: var(--muted); }

.topbar, .scrim { display: none; }
.main { padding: clamp(1.25rem, 4vw, 2.75rem); min-width: 0; }
.main-inner { max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.page-head h1 { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(1rem, 3vw, 1.5rem); }
.panel + .panel { margin-top: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { font-size: 1.3rem; margin: 0; }

.greeting { margin-bottom: 2rem; }
.greeting h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); margin-bottom: .2em; }
.overview { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; }
.overview .wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .overview { grid-template-columns: 1fr; } }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty svg { width: 40px; height: 40px; margin: 0 auto .75rem; opacity: .5; }
.empty p { margin-bottom: 1rem; }

/* News im Mitgliederbereich */
.news-card { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.news-card:first-child { padding-top: 0; }
.news-card:last-child { border-bottom: 0; padding-bottom: 0; }
.news-card h3 { margin-bottom: .25rem; }
.meta { color: var(--muted); font-size: .88rem; display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-public { background: var(--sun-soft); color: var(--ink); }
.item-actions { display: flex; gap: .25rem; margin-top: .5rem; }

/* Kalender */
.cal-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-toolbar h2 { margin: 0 auto 0 .5rem; font-size: 1.4rem; min-width: 10ch; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.cal-dow { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.cal-day {
  min-height: 108px; padding: .4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .2rem; background: var(--surface); font: inherit; text-align: left; color: inherit; cursor: pointer; border-top: 0; border-left: 0;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.other { color: var(--muted); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.cal-day .num { font-size: .88rem; font-weight: 700; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .num { background: var(--accent); color: var(--accent-ink); }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-ev { font-size: .78rem; line-height: 1.25; padding: .15rem .35rem; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .75rem; color: var(--muted); padding-left: .35rem; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; padding-left: .2rem; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .cal-day { min-height: 58px; padding: .25rem; align-items: center; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; justify-content: center; }
  .cal-dow { padding: .4rem 0; font-size: .72rem; }
}
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .85rem; font-size: .85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i, .cat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }

/* Terminliste */
.event-row { display: grid; grid-template-columns: 4rem 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.event-row:last-child { border-bottom: 0; }
.event-row .date-badge { border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--ink); }
.event-row h3 { font-size: 1.1rem; margin: 0 0 .15rem; font-family: var(--font-body); font-weight: 700; }
.month-label { font-family: var(--font-head); font-size: 1.15rem; margin: 1.75rem 0 .25rem; color: var(--muted); }
.month-label:first-child { margin-top: 0; }
@media (max-width: 560px) { .event-row { grid-template-columns: 3.4rem 1fr; } .event-row .item-actions { grid-column: 2; margin-top: 0; } }

/* Dateien */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; font-size: .95rem; }
.crumbs a { text-decoration: none; padding: .2rem .4rem; border-radius: 6px; font-weight: 700; }
.crumbs a:hover { background: var(--surface-2); }
.crumbs .sep { color: var(--muted); }
.crumbs .current { padding: .2rem .4rem; font-weight: 700; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: .85rem; align-items: center; padding: .7rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--surface-2); }
.file-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.file-ico svg { width: 20px; height: 20px; }
.file-ico.folder { background: var(--sun-soft); color: var(--ink); }
.file-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; display: block; }
a.file-name:hover { text-decoration: underline; }
.file-sub { font-size: .84rem; color: var(--muted); }
.file-size { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.row-actions { display: flex; gap: .15rem; }
@media (max-width: 600px) { .file-row { grid-template-columns: 40px 1fr auto; } .file-size { display: none; } }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r-md); padding: 1.25rem; text-align: center; color: var(--muted);
  margin-bottom: 1rem; transition: border-color .15s, background-color .15s;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .75rem; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* Fotoalben */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1.25rem; }
.album { text-decoration: none; color: inherit; display: block; }
.album-cover { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album:hover .album-cover img { transform: scale(1.03); }
.album-cover svg { width: 36px; height: 36px; opacity: .5; }
.album h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: .65rem 0 .1rem; }
.photo-tile { position: relative; }
.photo-tile .tile-actions { position: absolute; top: .4rem; right: .4rem; display: flex; gap: .25rem; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .tile-actions, .photo-tile:focus-within .tile-actions { opacity: 1; }
.tile-actions .btn { background: rgba(255,255,255,.92); color: #1F2E28; }
@media (hover: none) { .photo-tile .tile-actions { opacity: 1; } }

/* Verwaltung */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 700; background: none; border: 0; padding: .75rem 1rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.admin-photo { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.admin-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.admin-photo .body { padding: .6rem; display: grid; gap: .5rem; }
.admin-photo input { min-height: 38px; padding: .45em .6em; font-size: .9rem; }
.admin-photo .row-actions { justify-content: space-between; }

.table-wrap { overflow-x: auto; }
.user-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.user-table th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.user-table td { padding: .75rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.user-table tr:last-child td { border-bottom: 0; }
.perm-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1.25rem; padding: .75rem 1rem; background: var(--surface-2); border-radius: var(--r-sm); margin-bottom: 1rem; }
@media (max-width: 560px) { .perm-grid { grid-template-columns: 1fr; } }
.perm-group { grid-column: 1 / -1; font-weight: 700; font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* ---------- Dialoge ---------- */
dialog {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100vw - 2rem));
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0,0,0,.4);
  max-height: calc(100dvh - 2rem);
}
dialog::backdrop { background: rgba(20, 30, 26, .45); backdrop-filter: blur(2px); }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem .5rem; }
.dlg-head h2 { margin: 0; font-size: 1.4rem; }
.dlg-body { padding: .75rem 1.5rem; }
.dlg-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem 1.5rem 1.5rem; flex-wrap: wrap; }
.dlg-foot .spacer { margin-right: auto; }
@media (max-width: 560px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; }
  .dlg-foot .btn { flex: 1; }
  .dlg-foot .spacer { flex: 0 0 100%; order: 3; }
}

/* Bildbetrachter */
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: rgba(12, 18, 16, .94); color: #fff; padding: 0; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; gap: .5rem; }
.lb-top .btn { background: rgba(255,255,255,.12); color: #fff; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 3.5rem; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; }
.lb-prev { left: .75rem; } .lb-next { right: .75rem; }
.lb-caption { text-align: center; padding: .75rem 1rem 1.25rem; color: rgba(255,255,255,.85); min-height: 3rem; }
@media (max-width: 600px) { .lb-stage { padding: 0 .5rem; } .lb-nav { top: auto; bottom: -3.2rem; transform: none; } }

/* Hinweise */
.toast-wrap { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: .5rem; width: max-content; max-width: calc(100vw - 2rem); }
.toast { background: var(--ink); color: var(--bg); padding: .75rem 1.15rem; border-radius: 999px; font-weight: 700; font-size: .95rem; box-shadow: var(--shadow); animation: pop .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Mobil: Mitgliederbereich ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .65rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { font-size: .92rem; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .app.nav-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(20,30,26,.4); z-index: 30; display: none; }
  .app.nav-open .scrim { display: block; }
}

/* Kategorien (Klassen statt Inline-Styles wegen Content-Security-Policy) */
.c-verein { --c: var(--cat-verein); }
.c-kita { --c: var(--cat-kita); }
.c-fest { --c: var(--cat-fest); }
.c-sitzung { --c: var(--cat-sitzung); }
.c-ferien { --c: var(--cat-ferien); }
.tag svg, .pin svg { width: 13px; height: 13px; }
.panel h3 { margin-top: .25rem; }
form.panel h3 { margin: 1.75rem 0 .75rem; font-size: 1.15rem; }
.sidebar-foot .btn { justify-content: flex-start; }
.perm-group-row { grid-column: 1 / -1; }

/* =====================================================================
   Version 2: gemeinsames Menü, Gäste-Modus, Rechtstexte, Finanzen
   ===================================================================== */
.nav a.is-locked { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.nav a.is-locked:hover { background: transparent; color: var(--muted); }
.nav a .lock { width: 15px; height: 15px; margin-left: auto; opacity: .7; }
.sidebar-me { display: grid; gap: .4rem; }
.sidebar-me > .btn { width: 100%; }
.guest-hint { margin: .25rem .25rem 0; line-height: 1.4; }
.legal-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding: .5rem .5rem 0; font-size: .82rem; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 420px) { .hide-xs { display: none; } }

.locked-page { text-align: center; max-width: 34rem; margin: 10vh auto 0; }
.locked-page > svg { width: 44px; height: 44px; color: var(--muted); margin: 0 auto 1rem; display: block; }
.legal { max-width: 75ch; }

/* Startseite innerhalb des App-Rahmens */
.home .notice-inner { margin-bottom: .5rem; }
.home .hero { padding: clamp(1.25rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem); max-width: none; }
.home-block { padding: clamp(1.75rem, 4vw, 2.75rem) 0; border-top: 1px solid var(--line); }
.home .section-head a { font-weight: 700; font-size: .95rem; }

/* Tabs als Links (Finanzbereich) */
.tabs a { font-weight: 700; padding: .75rem 1rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { color: var(--ink); }
.year-pick select { min-height: 44px; font-weight: 700; width: auto; }

.pos { color: var(--cat-verein); }
.neg { color: var(--danger); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok { color: var(--cat-verein); font-weight: 700; }
.warn { color: #8A6100; }
.error { color: var(--danger); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn { color: var(--sun); } }

/* ---------- Dateiauswahl ---------- */
.file-pick { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .55rem .8rem; border: 1px dashed var(--line); border-radius: var(--r-sm); cursor: pointer; color: var(--muted); position: relative; overflow: hidden; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-pick svg { width: 18px; height: 18px; flex: none; }
.file-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pick:hover, .file-pick:focus-within { border-color: var(--accent); color: var(--ink); }
.file-pick.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.file-existing { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .2rem 0 .6rem; }
.file-existing a { display: inline-flex; gap: .4rem; align-items: center; overflow-wrap: anywhere; font-weight: 700; }
.file-existing svg { width: 18px; height: 18px; flex: none; }

/* =====================================================================
   Version 3: Originale Startseite, Menü über das Logo, Lauftext, Fotorad
   ===================================================================== */
.app { display: block; min-height: 100vh; min-height: 100dvh; }
.site-bar { position: sticky; top: 0; z-index: 25; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); }
.app.is-home .site-bar { background: color-mix(in srgb, var(--bg) 85%, transparent); }
.brand-btn { font: inherit; color: var(--ink); background: none; border: 0; cursor: pointer; padding: .3rem .6rem .3rem .3rem; margin-left: -.3rem; border-radius: 999px; text-align: left; }
.brand-btn:hover { background: var(--surface-2); }
.brand-btn .brand-mark { transition: transform .25s; }
.app.nav-open .brand-btn .brand-mark { transform: rotate(-20deg); }
.menu-chip { display: inline-grid; gap: 3px; margin-left: .35rem; padding: 7px 6px; border-radius: 8px; background: var(--surface-2); }
.menu-chip i { display: block; width: 14px; height: 2px; border-radius: 2px; background: var(--ink); }
.top-me { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 700; padding: .25rem .8rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--line); }
.top-me:hover { background: var(--surface-2); }
@media (max-width: 560px) { .hide-sm { display: none; } .top-me { padding-right: .25rem; } }

/* Menü-Schublade: standardmäßig geschlossen */
.drawer {
  position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 40; background: var(--surface);
  display: flex; flex-direction: column; padding: 1rem .85rem 1.25rem; overflow-y: auto;
  transform: translateX(-104%); transition: transform .24s ease; box-shadow: 0 0 40px -10px rgba(0,0,0,.35); visibility: hidden;
}
.app.nav-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .25rem 1rem; }
.drawer-head .brand { font-size: .95rem; }
.drawer-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.scrim { position: fixed; inset: 0; background: rgba(20,30,26,.42); z-index: 30; display: none; }
.app.nav-open .scrim { display: block; }
.drawer .sidebar-me .btn-ghost { justify-content: flex-start; }

.nav a.is-locked { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.nav a.is-locked:hover { background: transparent; color: var(--muted); }
.nav a .lock { width: 15px; height: 15px; margin-left: auto; opacity: .7; }
.sidebar-me { display: grid; gap: .4rem; }
.sidebar-me > .btn { width: 100%; }
.guest-hint { margin: .25rem .25rem 0; line-height: 1.4; }
.legal-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding: .5rem .5rem 0; font-size: .82rem; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }

/* Inhaltsrahmen: Startseite volle Breite (eigene Abschnitte), Unterseiten mittig */
.main { padding: 0; }
.main-inner { max-width: none; }
.app:not(.is-home) .main-inner { max-width: 1160px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 3rem; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--ink); }
.locked-page { text-align: center; max-width: 34rem; margin: 8vh auto; }
.locked-page > svg { width: 44px; height: 44px; color: var(--muted); margin: 0 auto 1rem; display: block; }
.legal { max-width: 75ch; }
.tabs a { font-weight: 700; padding: .75rem 1rem; color: var(--muted); text-decoration: none; }

/* Lauftext */
.ticker { background: var(--accent); color: var(--accent-ink); overflow: hidden; }
.ticker-track { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-run { display: inline-flex; align-items: center; gap: 1.25rem; padding: .55rem 0 .55rem 1.25rem; animation: ticker 40s linear infinite; will-change: transform; }
.ticker:hover .ticker-run { animation-play-state: paused; }
.tick-item { font-weight: 700; font-size: .98rem; }
.tick-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); flex: none; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-run { animation: none !important; white-space: normal; flex-wrap: wrap; }
  .ticker-track { white-space: normal; mask-image: none; }
}

/* Mitglied werden */
.join { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; background: var(--sun-soft); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.75rem); }
.join h2 { margin-bottom: .4em; }
.join .prose { margin: 0; }
.join-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
@media (max-width: 760px) { .join { grid-template-columns: 1fr; } }

/* News-Anhänge */
.news-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); gap: .5rem; margin: .75rem 0 .5rem; max-width: 640px; }
.news-images.one { grid-template-columns: minmax(0, 420px); }
.news-images button { padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--surface-2); }
.news-images.one button { aspect-ratio: 16 / 10; }
.news-images img { width: 100%; height: 100%; object-fit: cover; }
.news-files { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .35rem; }
.news-files a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 700; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.news-files a:hover { border-color: var(--accent); }
.news-files svg { width: 18px; height: 18px; flex: none; }
.news-files small { color: var(--muted); font-weight: 400; }
.att-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.att-edit li { display: grid; grid-template-columns: 48px 1fr auto; gap: .75rem; align-items: center; padding: .35rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.att-edit img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.att-name { overflow-wrap: anywhere; font-size: .92rem; }
.att-name small { display: block; color: var(--muted); }

/* Menü-Einstellungen */
.menu-table td, .menu-table th { text-align: center; }
.menu-table td:first-child, .menu-table th:first-child { text-align: left; }
.radio-cell { display: inline-flex; padding: .4rem; cursor: pointer; }
.radio-cell input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Fotorad */
.wheel-panel { overflow: hidden; margin-bottom: 1.25rem; }
.wheel { position: relative; outline: none; user-select: none; touch-action: pan-y; }
.wheel:focus-visible { box-shadow: inset 0 0 0 3px var(--sun); border-radius: var(--r-md); }
.wheel-stage { perspective: 1400px; perspective-origin: 50% 40%; display: flex; justify-content: center; padding-top: 20px; cursor: grab; }
.wheel-stage:active { cursor: grabbing; }
.wheel-ring { position: relative; width: clamp(150px, 26vw, 240px); aspect-ratio: 4 / 3; transform-style: preserve-3d; }
.wheel-big .wheel-ring { width: clamp(170px, 32vw, 320px); }
.wheel-card { position: absolute; inset: 0; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); cursor: pointer;
  backface-visibility: hidden; box-shadow: 0 18px 30px -18px rgba(0,0,0,.55); transition: filter .3s; filter: saturate(.8) brightness(.92); }
.wheel-card.is-front { filter: none; }
.wheel-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wheel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .75rem; }
.wheel-caption { min-width: 12ch; text-align: center; color: var(--muted); font-size: .95rem; }
.app .notice { margin-top: 1rem; }
.overview > *, .two-col > * { min-width: 0; }
@media (max-width: 900px) { .overview { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.news-item > * { min-width: 0; }
@media (max-width: 640px) { .news-item { grid-template-columns: minmax(0, 1fr); } }
.news-list { grid-template-columns: minmax(0, 1fr); }

/* =====================================================================
   Version 4: Design-Themen, Startseiten-Blöcke, Freigaben
   ===================================================================== */
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 400; font-display: swap; src: url('/fonts/lora-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 600; font-display: swap; src: url('/fonts/lora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 600; font-display: swap; src: url('/fonts/caveat-latin-600-normal.woff2') format('woff2'); }

/* ---------- Farbwelten (10) ---------- */
:root[data-palette="salbei"]      { --accent: #2F6F5E; --accent-soft: #DFECE5; --sun: #E6B544; --sun-soft: #FBF1D6; --bg: #F3F6F2; --surface-2: #EAF0EA; --cat-verein: #2F6F5E; }
:root[data-palette="himmel"]      { --accent: #2F6496; --accent-soft: #DCEAF6; --sun: #F2B33D; --sun-soft: #FDF0D3; --bg: #F2F6FA; --surface-2: #E6EEF6; --cat-verein: #2F6496; }
:root[data-palette="sonnenblume"] { --accent: #855600; --accent-soft: #FBEFC4; --sun: #F2C230; --sun-soft: #FFF5D6; --bg: #FBF8EF; --surface-2: #F4EEDC; --cat-verein: #855600; }
:root[data-palette="lavendel"]    { --accent: #5B4A99; --accent-soft: #E9E4F7; --sun: #E9A23B; --sun-soft: #FCEFD9; --bg: #F6F4FA; --surface-2: #EEEAF6; --cat-verein: #5B4A99; }
:root[data-palette="koralle"]     { --accent: #B2463F; --accent-soft: #FBE3DD; --sun: #2E8C83; --sun-soft: #DDF0EE; --bg: #FBF5F2; --surface-2: #F5E9E4; --cat-verein: #B2463F; }
:root[data-palette="wald"]        { --accent: #2E5E2B; --accent-soft: #E2EEDC; --sun: #D98E2B; --sun-soft: #F8EAD5; --bg: #F4F6F0; --surface-2: #E8EEE2; --cat-verein: #2E5E2B; }
:root[data-palette="ozean"]       { --accent: #0E6E7E; --accent-soft: #D7EFF1; --sun: #F09A54; --sun-soft: #FCE9DA; --bg: #F1F7F8; --surface-2: #E3EFF1; --cat-verein: #0E6E7E; }
:root[data-palette="beere"]       { --accent: #8E2F5E; --accent-soft: #F6E0EA; --sun: #E7B73E; --sun-soft: #FBF0D4; --bg: #FAF4F6; --surface-2: #F2E6EC; --cat-verein: #8E2F5E; }
:root[data-palette="apfel"]       { --accent: #4C7A12; --accent-soft: #EAF4D9; --sun: #E4572E; --sun-soft: #FCE3DA; --bg: #F6F8F0; --surface-2: #EBF0DF; --cat-verein: #4C7A12; }
:root[data-palette="regenbogen"]  { --accent: #2C6FB7; --accent-soft: #E1ECF8; --sun: #F2C230; --sun-soft: #FEF5D4; --bg: #F7F7F4; --surface-2: #EEEEE8; --cat-verein: #3E9B44; }
@media (prefers-color-scheme: dark) {
  :root[data-palette]:not([data-theme="light"]) { --bg: #131A17; --surface-2: #212C28; --accent-soft: #223630; --sun-soft: #3A3220; --accent-ink: #10201A; }
  :root[data-palette="himmel"]:not([data-theme="light"])      { --accent: #8FB8E6; --cat-verein: #8FB8E6; --bg: #121820; --surface-2: #1F2A36; --accent-soft: #1F3044; }
  :root[data-palette="sonnenblume"]:not([data-theme="light"]) { --accent: #F2C230; --cat-verein: #F2C230; --bg: #19160F; --surface-2: #2B2618; --accent-soft: #3A321A; }
  :root[data-palette="lavendel"]:not([data-theme="light"])    { --accent: #B4A6EC; --cat-verein: #B4A6EC; --bg: #16141D; --surface-2: #26222F; --accent-soft: #2E2842; }
  :root[data-palette="koralle"]:not([data-theme="light"])     { --accent: #F09A8F; --cat-verein: #F09A8F; --sun: #6CC9BF; --bg: #1B1514; --surface-2: #2E2321; --accent-soft: #42282A; }
  :root[data-palette="wald"]:not([data-theme="light"])        { --accent: #9CCB8F; --cat-verein: #9CCB8F; --accent-soft: #24331F; }
  :root[data-palette="ozean"]:not([data-theme="light"])       { --accent: #7FD0DB; --cat-verein: #7FD0DB; --bg: #11191B; --surface-2: #1D2B2E; --accent-soft: #1B3539; }
  :root[data-palette="beere"]:not([data-theme="light"])       { --accent: #E79BC0; --cat-verein: #E79BC0; --bg: #1A1418; --surface-2: #2C2129; --accent-soft: #3D2433; }
  :root[data-palette="apfel"]:not([data-theme="light"])       { --accent: #B2D97A; --cat-verein: #B2D97A; --accent-soft: #2A3519; --sun: #F08A6C; }
  :root[data-palette="regenbogen"]:not([data-theme="light"])  { --accent: #8DB8EA; --cat-verein: #8BD08F; --bg: #15171B; --surface-2: #23262D; --accent-soft: #1F2F44; }
}

/* ---------- Schriftthemen (4) ---------- */
:root[data-font="rund"] { --font-head: 'Nunito', system-ui, sans-serif; --font-body: 'Nunito', system-ui, sans-serif; }
:root[data-font="rund"] h1, :root[data-font="rund"] h2, :root[data-font="rund"] h3 { font-weight: 700; letter-spacing: -0.015em; }
:root[data-font="klassisch"] { --font-head: 'Lora', Georgia, serif; }
:root[data-font="verspielt"] { --font-head: 'Caveat', 'Comic Sans MS', cursive; --font-body: 'Nunito', system-ui, sans-serif; }
:root[data-font="verspielt"] h1, :root[data-font="verspielt"] h2, :root[data-font="verspielt"] h3 { letter-spacing: 0; line-height: 1.05; }
:root[data-font="verspielt"] h1 { font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.8rem); }
:root[data-font="verspielt"] h2 { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.7rem); }
:root[data-font="verspielt"] h3 { font-size: 1.6rem; }
:root[data-font="verspielt"] .kpi b, :root[data-font="verspielt"] .date-badge b { font-family: var(--font-body); }

/* ---------- News: Hintergrund und Schrift je Beitrag ---------- */
[class*="nb-"] { --nb-ink: #1F2E28; color: var(--nb-ink); border-radius: var(--r-md); padding: 1rem 1.15rem !important; border: 0 !important; }
[class*="nb-"] a { color: inherit; }
[class*="nb-"] .news-date, [class*="nb-"] .meta { color: color-mix(in srgb, var(--nb-ink) 70%, transparent); }
.news-list .news-item[class*="nb-"], .news-timeline li[class*="nb-"] { margin: .5rem 0; }
.nb-sonne { background: #FDF1C7; } .nb-salbei { background: #DFECE5; } .nb-himmel { background: #DCEAF6; }
.nb-rose { background: #FBE1E4; } .nb-flieder { background: #E9E4F7; } .nb-minze { background: #D8F2E6; }
.nb-sand { background: #F2E8D8; }
.nb-akzent { background: var(--accent); --nb-ink: var(--accent-ink); }
.nf-rund h3, .nf-rund .prose { font-family: 'Nunito', system-ui, sans-serif; }
.nf-klassisch h3, .nf-klassisch .prose { font-family: 'Lora', Georgia, serif; }
.nf-serif h3, .nf-serif .prose { font-family: 'Fraunces', Georgia, serif; }
.nf-handschrift h3, .nf-handschrift .prose { font-family: 'Caveat', cursive; }
.nf-handschrift .prose { font-size: 1.35em; line-height: 1.35; }
.nf-handschrift h3 { font-size: 1.7rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.swatch { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 3px; }
.sw-none { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 4px, var(--surface-2) 4px, var(--surface-2) 8px); }
.sw-sonne { background: #FDF1C7; } .sw-salbei { background: #DFECE5; } .sw-himmel { background: #DCEAF6; } .sw-rose { background: #FBE1E4; }
.sw-flieder { background: #E9E4F7; } .sw-minze { background: #D8F2E6; } .sw-sand { background: #F2E8D8; } .sw-akzent { background: var(--accent); }

/* ---------- News-Layouts auf der Startseite ---------- */
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 1rem; }
.ncard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.ncard[class*="nb-"] { padding: 0 !important; }
.ncard-img { display: block; padding: 0; border: 0; aspect-ratio: 16 / 10; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.ncard-img img { width: 100%; height: 100%; object-fit: cover; }
.ncard-body { padding: 1rem 1.15rem 1.15rem; }
.ncard h3 { margin: .2rem 0 .4rem; }
.news-highlight { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.news-rest { display: grid; gap: 1rem; }
.news-rest .ncard-img { aspect-ratio: 21 / 9; }
.ncard-big h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
@media (max-width: 760px) { .news-highlight { grid-template-columns: minmax(0, 1fr); } }
.news-timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; position: relative; }
.news-timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.news-timeline li { position: relative; padding: .25rem 0 1.5rem; }
.news-timeline li[class*="nb-"] { margin-bottom: 1rem; }
.tl-dot { position: absolute; left: -1.75rem; top: .45rem; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); transform: translateX(.05rem); }
.news-timeline h3 { margin: .1rem 0 .3rem; }

/* ---------- Startseiten-Blöcke ---------- */
.blk { padding: clamp(2.25rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem); }
.blk-inner { max-width: 1160px; margin: 0 auto; }
.blk-hero { padding: 0; }
.blk-hero .hero { padding-top: clamp(2rem, 6vw, 4.5rem); }
.band-a { background: var(--surface); }
.band-b { background: var(--bg); }
.blk.bg-soft { background: var(--accent-soft); }
.blk.bg-sun { background: var(--sun-soft); }
.blk.bg-accent { background: var(--accent); color: var(--accent-ink); }
.blk.bg-accent a, .blk.bg-accent figcaption { color: inherit; }
.hero-stage-img { display: none; }
.news-two { gap: clamp(2rem, 5vw, 4rem); }
/* Ausrichtung je Block */
.al-center .blk-inner { text-align: center; }
.al-right .blk-inner { text-align: right; }
.al-center .prose, .al-right .prose { max-width: 68ch; }
.al-center .prose { margin-inline: auto; }
.al-right .prose { margin-left: auto; }
.al-center .section-head { justify-content: center; }
.al-right .section-head { justify-content: flex-end; }
.al-center .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.al-center .hero p { margin-inline: auto; }
.al-center .hero-actions { justify-content: center; }
.al-center .pebbles { width: min(460px, 100%); }
.al-right .hero-text { order: 2; text-align: right; }
.al-right .hero p { margin-left: auto; }
.al-right .hero-actions { justify-content: flex-end; }
.al-center .join { text-align: left; }
.al-center .gallery figcaption { text-align: center; }
.al-center .news-item, .al-center .ncard, .al-center .news-timeline, .al-right .news-item, .al-right .ncard, .al-right .news-timeline { text-align: left; }
.al-center .date-list, .al-right .date-list { text-align: left; }
/* Fotoblock: links / Mitte / rechts */
.photo-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.al-left .photo-row { justify-content: flex-start; }
.al-center .photo-row { justify-content: center; }
.al-right .photo-row { justify-content: flex-end; }
.photo-row figure { margin: 0; flex: 0 1 var(--pw); min-width: 0; }
.size-s { --pw: 220px; } .size-m { --pw: 330px; } .size-l { --pw: 480px; }
.size-l.count-3 { --pw: 360px; }
.photo-row button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--surface-2); }
.photo-row img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-row button:hover img { transform: scale(1.03); }
.photo-row figcaption { font-size: .9rem; color: var(--muted); padding-top: .4rem; }
.bg-accent .photo-row figcaption { color: inherit; opacity: .85; }
@media (max-width: 600px) { .photo-row figure { flex: 1 1 100%; } }

/* ---------- Seitenlayouts (5) ---------- */
/* Zentriert */
[data-layout="zentriert"] .blk-inner { max-width: 840px; text-align: center; }
[data-layout="zentriert"] .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
[data-layout="zentriert"] .hero p { margin-inline: auto; }
[data-layout="zentriert"] .hero-actions, [data-layout="zentriert"] .section-head { justify-content: center; }
[data-layout="zentriert"] .pebbles { width: min(420px, 100%); }
[data-layout="zentriert"] .two-col { grid-template-columns: minmax(0, 1fr); }
[data-layout="zentriert"] .prose { margin-inline: auto; }
[data-layout="zentriert"] .news-item, [data-layout="zentriert"] .ncard, [data-layout="zentriert"] .date-list, [data-layout="zentriert"] .news-timeline { text-align: left; }
[data-layout="zentriert"] .date-list { max-width: 520px; margin-inline: auto; }
[data-layout="zentriert"] .site-header { justify-content: space-between; }
/* Bühne: großes Titelfoto */
[data-layout="buehne"] .blk-hero { position: relative; overflow: hidden; color: #fff; background: #1d2622; }
[data-layout="buehne"] .blk-hero .blk-inner { max-width: none; }
[data-layout="buehne"] .hero { position: static; max-width: 1160px; min-height: clamp(380px, 62vh, 640px); grid-template-columns: minmax(0, 720px); align-content: end; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
[data-layout="buehne"] .al-center .hero { justify-content: center; }
[data-layout="buehne"] .al-right .hero { justify-content: end; }
[data-layout="buehne"] .hero p { color: rgba(255,255,255,.88); }
[data-layout="buehne"] .hero .btn-quiet { color: #fff; border-color: rgba(255,255,255,.55); }
[data-layout="buehne"] .hero .btn-quiet:hover { background: rgba(255,255,255,.12); }
[data-layout="buehne"] .pebbles { display: none; }
[data-layout="buehne"] .hero-stage-img { display: block; position: absolute; inset: 0; z-index: 0; }
[data-layout="buehne"] .hero-stage-img img { width: 100%; height: 100%; object-fit: cover; }
[data-layout="buehne"] .hero-stage-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,14,.15) 0%, rgba(10,16,14,.72) 100%); }
/* Karten: jeder Bereich als Karte */
[data-layout="karten"] .band-a, [data-layout="karten"] .band-b { background: transparent; }
[data-layout="karten"] .blk:not(.blk-hero) { padding-top: .75rem; padding-bottom: .75rem; }
[data-layout="karten"] .blk:not(.blk-hero) .blk-inner { background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
[data-layout="karten"] .blk.bg-soft, [data-layout="karten"] .blk.bg-sun, [data-layout="karten"] .blk.bg-accent { background: transparent; color: inherit; }
[data-layout="karten"] .blk.bg-soft .blk-inner { background: var(--accent-soft); }
[data-layout="karten"] .blk.bg-sun .blk-inner { background: var(--sun-soft); }
[data-layout="karten"] .blk.bg-accent .blk-inner { background: var(--accent); color: var(--accent-ink); }
[data-layout="karten"] .blk-join .join { background: transparent; padding: 0; }
[data-layout="karten"] .main { padding-bottom: 2rem; }
/* Bänder: kräftige Abschnitte über die volle Breite */
[data-layout="baender"] .band-a { background: var(--accent-soft); }
[data-layout="baender"] .band-b { background: var(--sun-soft); }
[data-layout="baender"] .blk-hero { background: var(--accent); color: var(--accent-ink); }
[data-layout="baender"] .blk-hero .hero p { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
[data-layout="baender"] .blk-hero .btn { background: var(--sun); color: #1F2E28; }
[data-layout="baender"] .blk-hero .btn-quiet { background: transparent; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
[data-layout="baender"] .blk-join .join { background: var(--surface); }
[data-layout="baender"] .news-item { border-color: color-mix(in srgb, var(--ink) 12%, transparent); }

/* ---------- Verwaltung: Aufbau & Design ---------- */
.block-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .5rem; }
.block-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.block-row.is-off { opacity: .55; }
.block-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.block-ico svg { width: 20px; height: 20px; }
.block-name small { display: block; color: var(--muted); font-size: .85rem; }
.btn-icon-spacer { display: inline-block; width: 40px; }
@media (max-width: 820px) { .block-row { grid-template-columns: 40px minmax(0, 1fr); } .block-row > .seg, .block-row > .switch, .block-row > .row-actions { grid-column: 1 / -1; } }
.block-add, .bk-save { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span { display: block; padding: .45rem .9rem; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--muted); position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--sun); outline-offset: 2px; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .slots { grid-template-columns: 1fr; } }
.slot { display: grid; gap: .4rem; align-content: start; padding: .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.slot-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.slot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.slot input[type="text"] { min-height: 38px; padding: .4em .6em; font-size: .9rem; }
.slot-pick { aspect-ratio: 4 / 3; flex-direction: column; justify-content: center; text-align: center; }
.design h3 { margin: 1.75rem 0 .75rem; font-size: 1.15rem; }
.design h3:first-child { margin-top: 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: .75rem; }
.pick-sm { grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); }
.pick { position: relative; display: grid; gap: .3rem; padding: .75rem; border: 2px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--surface); }
.pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.pick small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.dots { display: flex; gap: 4px; }
.dots i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.font-sample { font-size: 1.15rem; line-height: 1.2; min-height: 2.6em; }
.fs-standard { font-family: 'Fraunces', serif; font-weight: 600; } .fs-rund { font-family: 'Nunito', sans-serif; font-weight: 700; }
.fs-klassisch { font-family: 'Lora', serif; font-weight: 600; } .fs-verspielt { font-family: 'Caveat', cursive; font-size: 1.5rem; }
.mini { display: grid; gap: 4px; height: 70px; padding: 6px; border-radius: 8px; background: var(--surface-2); margin-bottom: .25rem; }
.mini i { display: block; border-radius: 3px; background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.mini-klassisch { grid-template-columns: 1.2fr 1fr; grid-template-rows: 1.4fr 1fr; } .mini-klassisch i:nth-child(2) { border-radius: 50%; background: var(--sun); }
.mini-zentriert { grid-template-columns: 1fr; padding: 6px 26%; } .mini-zentriert i:first-child { background: var(--accent); }
.mini-buehne { grid-template-rows: 2fr 1fr; grid-template-columns: 1fr 1fr; } .mini-buehne i:first-child { grid-column: 1 / -1; background: #2a3531; } .mini-buehne i:nth-child(2) { grid-column: 1 / -1; }
.mini-karten { grid-template-columns: 1fr 1fr; padding: 8px; } .mini-karten i { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); border-radius: 5px; }
.mini-baender { gap: 0; padding: 0; overflow: hidden; } .mini-baender i { border-radius: 0; } .mini-baender i:nth-child(1) { background: var(--accent); } .mini-baender i:nth-child(2) { background: var(--accent-soft); } .mini-baender i:nth-child(3) { background: var(--sun-soft); }
.mini-n-liste i { height: 10px; } .mini-n-karten { grid-template-columns: 1fr 1fr; } .mini-n-zeitleiste { border-left: 3px solid var(--accent); padding-left: 10px; } .mini-n-highlight { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; } .mini-n-highlight i:first-child { grid-row: 1 / 3; background: var(--accent); }
.menu-table td, .menu-table th { text-align: center; }

/* ---------- Freigaben ---------- */
.tag-lock { background: var(--surface-2); color: var(--muted); }
.tag svg { width: 12px; height: 12px; }
.choices { display: grid; gap: .4rem; margin-bottom: 1rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--accent); flex: none; }
.choice small { display: block; color: var(--muted); font-size: .85rem; }
.acl-table td, .acl-table th { text-align: center; }
.acl-table td:first-child, .acl-table th:first-child { text-align: left; }
.acl-table input { width: 20px; height: 20px; accent-color: var(--accent); }
.ufolders { margin-bottom: 1rem; }
.crumbs .tag { margin-left: .5rem; }

[data-layout="buehne"] .hero-text { position: relative; z-index: 1; }

/* =====================================================================
   Flohmarkt
   ===================================================================== */
.nav-badge, .count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; font-style: normal; margin-left: auto; }
.menu-chip { position: relative; }
.menu-chip .nav-badge { position: absolute; top: -8px; right: -10px; margin: 0; min-width: 18px; height: 18px; font-size: .7rem; }
.count-badge { margin-left: .25rem; }
.market-filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.market-filter input[type="search"] { flex: 1 1 200px; width: auto; }
.market-filter select { width: auto; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.ad-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.ad-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ad-card.is-reserviert, .ad-card.is-erledigt { opacity: .7; }
.ad-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.ad-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-img > svg { width: 40px; height: 40px; opacity: .5; }
.ad-kind { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; color: #fff; }
.ad-img .ad-kind { position: absolute; top: .6rem; left: .6rem; }
.k-verkaufe { background: var(--accent); color: var(--accent-ink); }
.k-verschenke { background: #C2410C; }
.k-suche { background: #4C82B0; }
.ad-status { position: absolute; top: .6rem; right: .6rem; background: rgba(20,30,26,.78); color: #fff; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.ad-rank { position: absolute; bottom: .6rem; left: .6rem; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: #1F2E28; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; display: grid; place-items: center; box-shadow: var(--shadow); z-index: 1; }
.ad-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.ad-body h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 0; }
.ad-body p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.ad-price { font-weight: 700; color: var(--accent); }
.ad-price.big { font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; margin-bottom: .75rem; }
.ad-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; margin-top: auto; padding-top: .5rem; font-size: .85rem; color: var(--muted); }
.ad-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.ad-meta svg { width: 15px; height: 15px; }
.ad-owner { margin-left: auto; }
.ad-unread { color: var(--danger); font-weight: 700; }
.ad-top .ad-card { border-color: color-mix(in srgb, var(--sun) 50%, var(--line)); }
/* Detailansicht */
.ad-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 2.5rem); align-items: start; margin-bottom: 1.5rem; }
@media (max-width: 820px) { .ad-detail { grid-template-columns: minmax(0, 1fr); } }
.ad-main { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); cursor: zoom-in; }
.ad-main img { width: 100%; height: 100%; object-fit: cover; }
.ad-noimg { display: grid; place-items: center; color: var(--muted); cursor: default; }
.ad-noimg svg { width: 56px; height: 56px; opacity: .45; }
.ad-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .5rem; }
.ad-thumbs button { padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--surface-2); }
.ad-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ad-info h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: .4rem 0 .4rem; }
.ad-tags { display: flex; gap: .4rem; align-items: center; }
.ad-contact { margin: 1rem 0; }
.ad-contact a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.ad-contact svg { width: 16px; height: 16px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.ad-stat { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 700; font-size: .95rem; }
.ad-stat svg { width: 18px; height: 18px; }
.like-btn.is-liked { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: var(--danger-soft); }
.like-btn.is-liked svg { fill: currentColor; }
.ad-owner-actions { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.seg-kind { margin-bottom: 1rem; }
.ad-edit-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
.ad-edit-imgs div { position: relative; }
.ad-edit-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.ad-edit-imgs .btn { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.92); color: #1F2E28; width: 32px; min-height: 32px; }
/* Nachrichten */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .35rem; }
.msg-list li:last-child { border-bottom: 0; }
.msg-list li.is-new { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); padding-left: .75rem; border-radius: var(--r-sm); }
.msg-head { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; }
.msg-contact { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.msg-contact svg { width: 16px; height: 16px; }
.msg-list .btn { justify-self: start; }
.ad-msgs { margin-top: 1rem; }
.dl { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 700; font-size: .9rem; }
.dl dd { margin: 0; }

/* =====================================================================
   Logos, Wichtige Links, Sponsoren, Externe Links
   ===================================================================== */
.logo-img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.logo-img.has-plate { background: #fff; border-radius: 14px; padding: .4rem .6rem; box-shadow: var(--shadow); }
/* Kopfzeile: Höhe nach Größe, Breite passt sich an */
.brand-btn .brand-img { width: auto; max-width: min(46vw, 320px); }
.brand-btn .brand-img.sz-s { height: 36px; } .brand-btn .brand-img.sz-m { height: 48px; }
.brand-btn .brand-img.sz-l { height: 64px; } .brand-btn .brand-img.sz-xl { height: 84px; }
@media (max-width: 560px) { .brand-btn .brand-img.sz-l, .brand-btn .brand-img.sz-xl { height: 52px; } }
.drawer-head .brand-img { width: auto; max-width: 220px; }
.drawer-head .brand-img.sz-s { height: 40px; } .drawer-head .brand-img.sz-m { height: 56px; } .drawer-head .brand-img.sz-l, .drawer-head .brand-img.sz-xl { height: 84px; }
.drawer-head .brand:has(.brand-img.sz-l), .drawer-head .brand:has(.brand-img.sz-xl) { flex-direction: column; align-items: flex-start; gap: .4rem; }
.footer-logo-wrap .logo-img { width: auto; }
.footer-logo-wrap .sz-s { height: 44px; } .footer-logo-wrap .sz-m { height: 64px; } .footer-logo-wrap .sz-l { height: 96px; } .footer-logo-wrap .sz-xl { height: 130px; }
.site-footer .inner { align-items: center; }
.login-logo { width: auto; margin-bottom: .25rem; }
.login-logo.sz-s { height: 60px; } .login-logo.sz-m { height: 100px; } .login-logo.sz-l { height: 150px; } .login-logo.sz-xl { height: 200px; }
.brand-stack { flex-direction: column; align-items: flex-start; }
.hero-logo { margin-bottom: 1rem; }
.hero-logo .logo-img { width: auto; }
.hero-logo .sz-s { height: 70px; } .hero-logo .sz-m { height: 110px; } .hero-logo .sz-l { height: 160px; } .hero-logo .sz-xl { height: 220px; }
.al-center .hero-logo .logo-img, [data-layout="zentriert"] .hero-logo .logo-img { margin-inline: auto; }
.hero-title-row { display: flex; align-items: center; gap: 1rem; margin-bottom: .45em; }
.hero-title-row h1 { margin: 0; }
.hero-title-row .logo-img { width: auto; flex: none; }
.hero-title-row .sz-s { height: 56px; } .hero-title-row .sz-m { height: 84px; } .hero-title-row .sz-l { height: 120px; } .hero-title-row .sz-xl { height: 160px; }
.hero-biglogo { display: grid; place-items: center; }
.hero-biglogo .logo-img { width: 100%; max-height: 460px; }
.hero-biglogo .sz-s { max-width: 260px; } .hero-biglogo .sz-m { max-width: 420px; } .hero-biglogo .sz-l { max-width: 560px; } .hero-biglogo .sz-xl { max-width: 720px; }
[data-layout="buehne"] .hero-biglogo { display: none; }
/* Wasserzeichen */
.logo-watermark { position: fixed; z-index: 0; pointer-events: none; }
.logo-watermark img { width: 100%; height: auto; }
.logo-watermark.sz-s { width: 160px; } .logo-watermark.sz-m { width: 280px; } .logo-watermark.sz-l { width: 420px; } .logo-watermark.sz-xl { width: 600px; }
.wm-rechts-unten { right: 1.5rem; bottom: 1.5rem; } .wm-links-unten { left: 1.5rem; bottom: 1.5rem; }
.wm-rechts-oben { right: 1.5rem; top: 6rem; } .wm-links-oben { left: 1.5rem; top: 6rem; }
.wm-mitte { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.app { position: relative; z-index: 1; }
.app .main, .app .site-footer { background: transparent; }
/* Deko-Elemente */
.blk { position: relative; }
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco .logo-img { width: 100%; }
.deco.sz-s { width: 90px; } .deco.sz-m { width: 160px; } .deco.sz-l { width: 260px; } .deco.sz-xl { width: 380px; }
.deco-hero-links { left: clamp(.25rem, 2vw, 2rem); top: 1rem; }
.deco-hero-rechts { right: clamp(.25rem, 2vw, 2rem); top: 1rem; }
.deco-ueber-news { right: clamp(1rem, 4vw, 3rem); top: -2.5rem; }
.deco-seite-links, .deco-seite-rechts { position: fixed; top: 45%; z-index: 0; }
.deco-seite-links { left: -.5rem; } .deco-seite-rechts { right: -.5rem; }
.deco-row { display: flex; justify-content: center; gap: 2rem; padding: 1rem; }
.deco-row .deco { position: static; }
.blk-inner { position: relative; z-index: 1; }
@media (max-width: 760px) { .deco-hero-links, .deco-hero-rechts, .deco-seite-links, .deco-seite-rechts { display: none; } .deco.sz-l, .deco.sz-xl { width: 140px; } }

/* Logo-Editor */
.logo-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: .75rem; }
.logo-item { display: grid; gap: .45rem; padding: .6rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.logo-prev { aspect-ratio: 4 / 3; border-radius: var(--r-sm); display: grid; place-items: center; padding: .5rem;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 18px 18px; }
.logo-prev img { max-height: 100%; max-width: 100%; object-fit: contain; }
.logo-item input[type="text"] { min-height: 38px; padding: .4em .6em; font-size: .92rem; }
.logo-item .row-actions { justify-content: space-between; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.logo-add { place-items: center; align-content: center; text-align: center; color: var(--muted); border-style: dashed; cursor: pointer; position: relative; min-height: 200px; font-weight: 700; }
.logo-add svg { width: 28px; height: 28px; }
.logo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slot-list { display: grid; gap: .5rem; }
.slot-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.2fr) auto minmax(150px, 1fr) auto; gap: .6rem 1rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.slot-row select { min-height: 40px; }
.slot-name small { display: block; color: var(--muted); font-size: .82rem; }
.slot-extra { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; }
.deco-edit { grid-template-columns: minmax(160px, 1.2fr) minmax(150px, 1fr) auto minmax(150px, 1fr) auto; margin-bottom: .5rem; }
@media (max-width: 980px) { .slot-row, .deco-edit { grid-template-columns: 1fr 1fr; } .slot-name { grid-column: 1 / -1; } }
.op-range { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); font-weight: 700; }
.op-range input { accent-color: var(--accent); width: 100%; }
.op-range output { min-width: 3.2em; text-align: right; color: var(--ink); }
.panel h3:first-child { margin-top: 0; }
.panel > h3 { margin: 1.5rem 0 .6rem; font-size: 1.15rem; }
.mini-thumb { width: 72px; height: 54px; object-fit: contain; border-radius: 6px; background: var(--surface-2); }

/* Wichtige Links */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1rem; }
.link-grid.tiles { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.link-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.link-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.link-img { aspect-ratio: 16 / 9; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.link-img img { width: 100%; height: 100%; object-fit: cover; }
.link-img span { font-family: var(--font-head); font-size: 2.6rem; color: var(--accent); font-weight: 600; }
.is-tile .link-img { aspect-ratio: 3 / 2; }
.link-body { padding: .85rem 1rem 1rem; display: grid; gap: .3rem; }
.link-body b { font-size: 1.05rem; }
.link-body p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.link-host { display: inline-flex; align-items: center; gap: .3rem; color: var(--accent); font-size: .85rem; font-weight: 700; }
.link-host svg { width: 14px; height: 14px; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.link-row { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: center; padding: .6rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); }
a.link-row:hover { border-color: var(--accent); }
.link-row img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.link-ico { width: 64px; height: 48px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.link-ico svg { width: 22px; height: 22px; }
.link-row small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.link-row em { display: block; font-style: normal; color: var(--accent); font-size: .82rem; font-weight: 700; }
.edit-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.edit-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.edit-list .link-row { margin: 0; }
.preview-h { font-size: 1.2rem; margin-top: 1rem; }

/* Sponsoren */
.sp-intro { margin-bottom: 1rem; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; }
.sp-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: var(--ink); text-align: center; }
a.sp-card:hover { box-shadow: var(--shadow); }
.sp-img { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 1rem; background: #fff; }
.sp-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sp-img span { font-family: var(--font-head); font-size: 1.3rem; color: #1F2E28; }
.sp-body { padding: .8rem 1rem 1rem; display: grid; gap: .25rem; }
.sp-body p { margin: 0; color: var(--muted); font-size: .9rem; }
.sp-strip { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.al-center .sp-strip { justify-content: center; } .al-right .sp-strip { justify-content: flex-end; }
.sp-strip a, .sp-strip span { display: grid; place-items: center; height: 80px; padding: .5rem 1rem; background: #fff; border-radius: var(--r-sm); text-decoration: none; color: #1F2E28; }
.sp-strip img { max-height: 64px; max-width: 180px; object-fit: contain; filter: grayscale(.2); transition: filter .2s; }
.sp-strip a:hover img { filter: none; }
.sp-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.sp-run { display: inline-flex; gap: 2.5rem; align-items: center; animation: ticker 40s linear infinite; padding: .5rem 0; }
.sp-marquee:hover .sp-run { animation-play-state: paused; }
.sp-chip { display: grid; place-items: center; height: 76px; padding: .5rem 1rem; background: #fff; border-radius: var(--r-sm); flex: none; color: #1F2E28; }
.sp-chip img { max-height: 60px; max-width: 170px; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .sp-run { animation: none; flex-wrap: wrap; } }

/* Externe Links: Dialog */
.explain { background: var(--accent-soft); border-radius: var(--r-md); padding: .8rem 1rem; margin-bottom: 1rem; }
.explain summary { cursor: pointer; font-weight: 700; display: flex; gap: .5rem; align-items: center; }
.explain summary svg { width: 18px; height: 18px; }
.explain p, .explain ul { font-size: .93rem; margin: .5rem 0 0; }
.explain ul { padding-left: 1.2rem; }
.share-result { display: grid; grid-template-columns: 200px 1fr; gap: 1.25rem; align-items: start; padding: 1rem; border: 2px solid var(--accent); border-radius: var(--r-md); margin: .5rem 0 1rem; background: var(--surface); }
@media (max-width: 560px) { .share-result { grid-template-columns: 1fr; justify-items: center; } }
.share-qr { background: #fff; border-radius: var(--r-sm); padding: .4rem; }
.share-qr img { width: 100%; max-width: 200px; }
.copy-row { display: flex; gap: .4rem; margin: .3rem 0 .6rem; }
.copy-row input { font-size: .88rem; }
.share-btns { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.qr-text { overflow-wrap: anywhere; margin: 0; }
.share-new-ok { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--accent); }
.share-new-ok svg { width: 18px; height: 18px; }
.share-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .4rem; }
.share-list li { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.share-list li > span { flex: 1 1 220px; }
.share-list small { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .84rem; }
.share-list small svg { width: 14px; height: 14px; }

/* Externe Links: öffentliche Galerie */
.share-page { min-height: 100dvh; display: flex; flex-direction: column; }
.share-head { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem clamp(1rem, 4vw, 2rem); padding-top: max(.75rem, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.share-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .95rem; }
.share-brand .brand-img { height: 40px; width: auto; }
.share-exp { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; }
.share-exp svg { width: 15px; height: 15px; }
.share-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.25rem clamp(.75rem, 3vw, 2rem) 2rem; }
.share-title { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin-bottom: .2rem; }
.share-folders { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.share-folder { display: inline-flex; gap: .6rem; align-items: center; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; }
.share-folder svg { width: 20px; height: 20px; color: var(--accent); }
.share-folder small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 31%), 1fr)); gap: 4px; margin-top: 1rem; }
@media (min-width: 700px) { .share-grid { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.share-grid button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); cursor: zoom-in; border-radius: 4px; }
@media (min-width: 700px) { .share-grid button { border-radius: var(--r-sm); } }
.share-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.share-grid button:hover img { transform: scale(1.04); }
.share-files { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .4rem; }
.share-files a { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; }
.share-files svg { width: 20px; height: 20px; color: var(--accent); }
.share-files small { display: block; color: var(--muted); font-weight: 400; }
.share-gone { text-align: center; margin: 12vh auto; max-width: 30rem; }
.share-gone svg { width: 48px; height: 48px; color: var(--muted); margin: 0 auto 1rem; display: block; }
.share-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom)); }

/* Regenbogen-Farbwelt: Streifen unter der Kopfzeile wie im Vereinslogo */
:root[data-palette="regenbogen"] .site-bar::after, :root[data-palette="regenbogen"] .share-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #D7362F 0 20%, #F2C230 20% 40%, #3E9B44 40% 60%, #2C6FB7 60% 80%, #8E4FA8 80%); }
.site-bar, .share-head { position: sticky; }
:root[data-palette="regenbogen"] .ticker { background: linear-gradient(90deg, #2C6FB7, #3E9B44); }
.al-center .sp-grid, .al-center .link-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 260px)); justify-content: center; }
.al-right .sp-grid, .al-right .link-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 260px)); justify-content: end; }
.logo-prev { aspect-ratio: auto; height: 140px; overflow: hidden; }
.logo-prev img { max-height: 124px; max-width: 100%; width: auto; height: auto; }
