/* Figtree (SIL Open Font License, siehe fonts/OFL.txt), selbst gehostet: keine Anfragen an Google. */
@font-face {
    font-family: "Figtree";
    src: url("fonts/figtree.woff2") format("woff2");
    font-weight: 300 900;
    font-display: swap;
}

/* Farben aus dem Handzettel. Weiß auf Orange ist für Text zu kontrastarm (2,3:1),
   daher dunkler Text auf Orange und ein dunkleres Orange für Links (5,4:1). */
:root {
    --brand: #f29400;
    --brand-light: #ffb341;
    --brand-soft: #fdf3e3;
    --link: #8a5200;
    --ink: #1f1f1f;
    --text: #2b2b2b;
    --muted: #666;
    --bg: #fffdf9;
    --card: #fff;
    --line: #f0e2cc;
    --danger: #b42318;
    --radius: 20px;
    --shadow: 0 1px 2px rgb(60 35 0 / 0.06), 0 8px 24px rgb(60 35 0 / 0.06);
    --shadow-hover: 0 2px 4px rgb(60 35 0 / 0.08), 0 16px 40px rgb(60 35 0 / 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }

body {
    margin: 0;
    font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main.page { padding-top: 48px; padding-bottom: 80px; min-height: 60vh; }

a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.015em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; margin: 0 0 24px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 6px; }
main.page > h1::after {
    content: ""; display: block; width: 64px; height: 6px; margin-top: 12px;
    border-radius: 3px; background: var(--brand);
}

/* Kopfzeile */
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgb(255 253 249 / 0.85);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 88px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { display: block; height: 64px; width: auto; }
.brand span { font-weight: 800; font-size: 1.15rem; line-height: 1.15; letter-spacing: -0.01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; margin-left: auto; }
.site-header nav a:not(.button) { color: var(--ink); font-weight: 600; text-decoration: none; position: relative; padding: 10px 0; }
.site-header nav a:not(.button)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; border-radius: 2px;
    background: var(--brand); transform: scaleX(0); transition: transform 0.2s ease;
}
.site-header nav a:not(.button):hover::after { transform: scaleX(1); }

/* Buttons */
button, .button {
    font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
    background: var(--brand); color: var(--ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:hover, .button:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.button-small { padding: 8px 18px; }
.button-dark { background: var(--ink); color: #fff; }
.button-light { background: #fff; color: var(--ink); }
button.danger { background: var(--danger); color: #fff; padding: 6px 14px; }
form.inline { display: inline; }

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

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(circle at 85% 20%, var(--brand-light), transparent 55%), var(--brand);
    color: var(--ink);
}
.hero-inner { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.2rem); line-height: 1; letter-spacing: -0.03em; margin: 16px 0 24px; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 34ch; margin: 0 0 32px; font-weight: 500; }
.pill {
    display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px;
    background: rgb(255 255 255 / 0.9); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.hero-swoosh { position: absolute; right: 2%; bottom: 8%; width: min(40vw, 480px); height: auto; opacity: 0.95; pointer-events: none; }

/* Abschnitte */
.section { padding-top: 88px; }
.section:last-child { padding-bottom: 88px; }
.eyebrow { margin: 0 0 8px; color: var(--link); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
h2.big { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0 0 40px; max-width: 24ch; hyphens: manual; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; }
.split { display: grid; gap: 56px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.empty { color: var(--muted); padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 4px; }

/* Karten */
.event, .news-card, .feature {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.event:hover, .news-card:hover, .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.event-list { display: grid; gap: 16px; }
.event { display: flex; gap: 20px; align-items: flex-start; padding: 20px; }
.event p:last-child { margin-bottom: 0; }
.date-badge {
    flex: none; width: 68px; padding: 10px 0; border-radius: 16px; text-align: center; line-height: 1.1;
    background: var(--brand); color: var(--ink);
}
.date-badge .day { display: block; font-size: 1.8rem; font-weight: 800; }
.event.is-past .date-badge { background: var(--brand-soft); }
.event-photos { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 0; }
.past-heading { margin-top: 56px; }
.date-badge .month { display: block; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.news-card { padding: 20px 24px; margin-bottom: 16px; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card { position: relative; }
.news-card p:last-child { margin-bottom: 0; }
.news-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.news-grid .news-card { margin: 0; }

/* Hellorange Band über die ganze Bildschirmbreite, wie der dunkle Beitragsblock. */
.band { margin-top: 88px; padding: 72px 0; background: var(--brand-soft); }
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 959px) {
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Eine übrig bleibende Karte nimmt die ganze Zeile statt einer halben. */
    .feature-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
    .feature-grid { grid-template-columns: minmax(0, 1fr); }
}
.feature { padding: 28px; }
.feature .icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
    background: var(--brand-soft);
}
.feature .icon svg { width: 30px; height: 30px; fill: none; stroke: var(--link); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.35rem; margin-bottom: 12px; }
.feature ul { margin: 0; padding: 0; list-style: none; }
.feature li { position: relative; padding-left: 22px; }
.feature li + li { margin-top: 10px; }
.feature li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* Beitrag */
.fee { margin-top: 96px; background: var(--ink); color: #eee; }
.fee-inner { display: grid; gap: 40px; grid-template-columns: auto 1fr; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.fee h2 { color: #fff; margin: 0 0 16px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.fee .eyebrow { color: var(--brand); }
.fee p { max-width: 60ch; }
.fee-amount { text-align: center; }
.fee-amount strong { display: block; font-size: clamp(4.5rem, 12vw, 8rem); line-height: 0.9; font-weight: 900; color: var(--brand); letter-spacing: -0.04em; }
.fee-amount span { display: block; margin-top: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.9rem; color: #fff; }
.iban { color: #bbb; font-size: 0.95rem; margin-bottom: 0; }
.iban span { color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* Zeitleiste */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 36px; font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.timeline li::before {
    content: ""; position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%;
    background: var(--brand); box-shadow: 0 0 0 6px var(--bg);
}
.timeline span { display: block; color: var(--link); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* Aufruf */
.cta {
    display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
    padding: 40px; border-radius: 28px; background: var(--brand-soft); border: 1px solid var(--line);
}
.cta h2 { margin: 0 0 8px; }
.cta p { margin: 0; }
.cta .mail { font-weight: 600; }

/* Fußzeile */
.site-footer { background: var(--ink); color: #ccc; font-size: 0.95rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; }
.site-footer strong { color: #fff; }
.site-footer a { color: var(--brand); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-footer a { display: inline-block; padding: 10px 0; }
.site-footer .footer-link { padding: 10px 0; background: none; border: 0; border-radius: 0; color: var(--brand); font: inherit; font-weight: 400; text-decoration: underline; cursor: pointer; }
.site-footer .footer-link:hover { transform: none; box-shadow: none; }
/* E-Mail und Schul-Link nebeneinander, bei wenig Platz untereinander */
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* Einzelseiten */
.prose { max-width: 70ch; }
.back { font-weight: 700; text-decoration: none; }

/* Formulare */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 640px; }
.form.narrow { max-width: 380px; }
.form label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 600; color: var(--ink); }
.form .checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
.form .checkbox input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date], select, textarea {
    font: inherit; padding: 12px 14px; border: 1.5px solid #dcc9a8; border-radius: 12px; width: 100%; background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgb(242 148 0 / 0.25); }
.form button { justify-self: start; }

.hp { position: absolute; left: -10000px; }

.notice { background: #e3f9e5; padding: 12px 16px; border-radius: 12px; margin-top: 24px; }
.errors { background: #fde8e8; color: var(--danger); padding: 12px 16px 12px 36px; border-radius: 12px; }
p.errors { padding-left: 16px; }

/* Verwaltung */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap table { box-shadow: none; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--brand-soft); color: var(--ink); }
.cards { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cards li { display: flex; }
.cards a { flex: 1; display: block; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.cards strong { display: block; font-size: 2.5rem; color: var(--ink); }
.cards-heading { margin: 32px 0 12px; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); }
.cards + .cards-heading { margin-top: 8px; }
.card-icon { display: block; width: 32px; height: 32px; margin-bottom: 8px; fill: none; stroke: var(--link); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cards a { padding: 16px; font-size: 0.95rem; overflow-wrap: break-word; hyphens: auto; }
    .cards strong { font-size: 2rem; }
}
.message { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }

/* Einblenden beim Scrollen: nur in Browsern mit Scroll-Animationen und ohne Wunsch nach weniger Bewegung.
   Ohne Unterstützung sind alle Inhalte sofort sichtbar. */
@keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    }
    .hero-inner > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .hero-inner > :nth-child(2) { animation-delay: 0.08s; }
    .hero-inner > :nth-child(3) { animation-delay: 0.16s; }
    .hero-inner > :nth-child(4) { animation-delay: 0.24s; }
    .hero-swoosh { animation: rise 1s 0.2s ease both; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

/* Schmale Bildschirme */
@media (max-width: 720px) {
    /* Erste Zeile: Logo und Mitmachen. Zweite Zeile: Menü über die ganze Breite. */
    .site-header .container { flex-wrap: wrap; row-gap: 0; min-height: 0; padding-top: 10px; }
    .brand { gap: 8px; }
    .brand img { height: 44px; }
    .brand span { font-size: 0.9rem; }
    .header-cta { margin-left: auto; }
    .site-header .button-small { padding: 10px 16px; }
    .site-header nav { order: 3; width: 100%; margin: 4px 0 0; justify-content: space-between; gap: 0 12px; }
    .site-header.is-admin { position: static; }
    .site-header.is-admin nav { justify-content: flex-start; gap: 0 18px; padding-bottom: 6px; }
    /* Tabellen der Verwaltung als Karten: Titel und Datum links, Löschen rechts. */
    .table-wrap table, .table-wrap tbody { display: block; }
    .table-wrap thead { display: none; }
    .table-wrap tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .table-wrap td { padding: 0; border: 0; }
    .table-wrap td:nth-child(2) { grid-row: 2; color: var(--muted); font-size: 0.95rem; }
    .table-wrap td:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    /* Dokumente haben Notizen und zwei Knöpfe: Knöpfe unter den Text statt daneben. */
    .table-wrap .documents tr { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .table-wrap .documents td:last-child { grid-column: 1; grid-row: auto; }
    .documents td:nth-child(2) br { display: none; }
    .documents td:nth-child(2) .sep { display: inline; }
    .hero-inner { padding-top: 48px; padding-bottom: 190px; }
    .hero-swoosh { width: 230px; right: -16px; bottom: -8px; }
    .section { padding-top: 64px; }
    .band { margin-top: 64px; padding: 56px 0; }
    .fee-inner { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
    .timeline { grid-auto-flow: row; grid-template-columns: 1fr; gap: 28px; }
    .timeline::before { left: 9px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
    .timeline li { padding-top: 0; padding-left: 44px; }
    .cta { padding: 28px; }
    .event { gap: 16px; padding: 16px; }
}

/* Fotos */
.intro-text { max-width: 65ch; margin-top: -8px; margin-bottom: 32px; }
.intro-text > :first-child, .prose > :first-child { margin-top: 0; }
.intro-text > :last-child { margin-bottom: 0; }
h2.big.flush { margin: 0; }
.section-head .big { max-width: none; }

.album-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.album-card {
    display: block; text-decoration: none; color: inherit; overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.album-cover { position: relative; aspect-ratio: 4 / 3; background: var(--brand-soft); display: grid; place-items: center; overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-count {
    position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
    background: rgb(31 31 31 / 0.75); color: #fff; font-size: 0.85rem; font-weight: 600;
}
.album-lock { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); }
.album-lock svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.album-body { padding: 16px 20px 20px; }
.album-body h3 { margin: 0; }

.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 32px; }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--brand-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.05); }
/* Videos: Play-Symbol über dem Vorschaubild */
.gallery a.is-video { position: relative; }
.gallery a.is-video::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
    background: rgb(0 0 0 / 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23fff'/%3E%3C/svg%3E") center / 28px no-repeat;
    pointer-events: none;
}
.admin-photos figure.is-video { position: relative; }
.video-tag { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / 0.65); color: #fff; font-size: 0.8rem; font-weight: 700; }
.upload-form progress { width: 100%; max-width: 420px; accent-color: var(--brand); }

.locked-box { max-width: 560px; padding: 32px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--line); margin-bottom: 32px; }
.locked-box h2 { margin: 16px 0 8px; }

/* Vorstand */
/* Vorstand auf „Über uns“; scroll-margin, damit #vorstand nicht unter dem festen Kopf landet */
.about-board { margin-top: 56px; scroll-margin-top: 100px; }
.about-board .intro-text { margin-bottom: 24px; }
.board-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.board-card { text-align: center; padding: 28px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.board-card h3 { margin: 16px 0 4px; }
.board-bio { margin: 12px 0 0; font-size: 0.95rem; line-height: 1.5; }
.board-photo { display: block; width: 160px; height: 160px; margin: 0 auto; border-radius: 50%; object-fit: cover; border: 4px solid var(--brand); }
/* Startseite: kleine Kreise mit Text daneben, abwechselnd links und rechts. */
.board-list { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; display: grid; gap: 20px; }
.board-list li { display: flex; align-items: center; gap: 20px; width: min(100%, 440px); padding: 12px 24px 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.board-list li:nth-child(even) { flex-direction: row-reverse; justify-self: end; text-align: right; padding: 12px 12px 12px 24px; }
.board-list .board-photo { flex: none; width: 88px; height: 88px; margin: 0; border-width: 3px; }
.board-list .board-initials { font-size: 1.7rem; }
.board-list h3 { margin: 0 0 2px; }
.board-list .meta { margin: 0; }
/* Mit genug Platz: zwei Spalten nebeneinander statt Zickzack */
@media (min-width: 860px) {
    .board-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin: 0; }
    .board-list li, .board-list li:nth-child(even) { width: auto; flex-direction: row; justify-self: stretch; text-align: left; padding: 12px 24px 12px 12px; }
}
@media (max-width: 480px) {
    .board-list { gap: 16px; }
    .board-list li { gap: 14px; padding: 10px 18px 10px 10px; }
    .board-list li:nth-child(even) { padding: 10px 10px 10px 18px; }
    .board-list .board-photo { width: 76px; height: 76px; }
    .board-list .board-initials { font-size: 1.55rem; }
    .board-list h3 { font-size: 1.05rem; }
}
.board-initials { display: grid; place-items: center; background: var(--brand-soft); color: var(--link); font-size: 2.6rem; font-weight: 800; }
.admin-board { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 24px; }
.admin-board figure { position: relative; margin: 0; padding: 20px 16px 16px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-board figure.is-dragging { opacity: 0.5; outline: 3px dashed var(--brand); }
/* Leere Liste bleibt als Ziel zum Hineinziehen sichtbar */
.admin-board[data-sort-list] { min-height: 120px; padding: 8px; border: 2px dashed transparent; border-radius: var(--radius); }
.admin-board.is-empty { border-color: var(--line); }
.admin-board.is-empty::before { content: attr(data-empty); grid-column: 1 / -1; align-self: center; text-align: center; color: var(--muted); }
.admin-board.is-drop-target { border-color: var(--brand); }
.admin-board .board-photo { width: 120px; height: 120px; }
.admin-board .board-initials { font-size: 2rem; }
.admin-board figcaption { display: grid; gap: 4px; margin-top: 12px; }
.board-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.board-actions button.danger, .board-actions .button-small { padding: 6px 14px; font-size: 0.9rem; }

/* Zuschneiden (app.js) */
.cropper { display: grid; gap: 12px; }
.cropper[hidden] { display: none; }
.crop-viewport {
    position: relative; width: min(100%, 320px); aspect-ratio: 1; overflow: hidden; border-radius: 16px;
    background: #ddd; cursor: grab; touch-action: none; user-select: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-viewport::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgb(0 0 0 / 0.45); pointer-events: none; }
.crop-zoom { max-width: 320px; }
.crop-zoom input { width: 100%; accent-color: var(--brand); }
.crop-viewport.is-picking { cursor: crosshair; }
.crop-background { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; max-width: 320px; }
.crop-color { display: flex; align-items: center; gap: 10px; }
.crop-color input { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.crop-background .button-light { border: 1px solid var(--line); }
.crop-background [aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }

/* Großansicht (app.js) */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgb(15 15 15 / 0.96); color: #fff; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.6); }
.lightbox img, .lightbox video { position: absolute; inset: 56px 16px 72px; width: calc(100% - 32px); height: calc(100% - 128px); object-fit: contain; }
.lightbox [hidden] { display: none; }
.lightbox button {
    position: absolute; width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%;
    background: rgb(255 255 255 / 0.12); color: #fff; font-size: 1.5rem; line-height: 1;
}
.lightbox button:hover { background: rgb(255 255 255 / 0.25); box-shadow: none; transform: none; }
.lightbox .lb-close { top: 8px; right: 8px; }
.lightbox .lb-prev { left: 12px; bottom: 12px; }
.lightbox .lb-next { right: 12px; bottom: 12px; }
.lightbox .lb-count { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font-weight: 600; }

/* Fotos in der Verwaltung */
.upload-form input[type=file] { font: inherit; padding: 12px; border: 2px dashed #dcc9a8; border-radius: 12px; background: #fff; }
.admin-photos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 24px; }
.admin-photos figure { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.admin-photos figure.is-dragging { opacity: 0.5; outline: 3px dashed var(--brand); }
.drag-handle {
    position: absolute; top: 6px; left: 6px; width: 44px; height: 44px; padding: 0; justify-content: center;
    border-radius: 12px; background: rgb(255 255 255 / 0.92); color: var(--ink); font-size: 1.4rem;
    cursor: grab; touch-action: none; box-shadow: var(--shadow);
}
.drag-handle:hover { transform: none; }
.is-dragging .drag-handle { cursor: grabbing; }
.sort-status { font-weight: 600; color: var(--link); min-height: 1.6em; margin: 0 0 8px; }
.admin-photos figure.is-cover { outline: 3px solid var(--brand); }
.admin-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-photos figcaption { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: center; padding: 8px; }
.admin-photos .button-small, .admin-photos button.danger { padding: 6px 12px; font-size: 0.85rem; }
.cover-tag { font-size: 0.85rem; font-weight: 700; color: var(--link); }

@media (max-width: 720px) {
    .gallery { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .gallery a { border-radius: 6px; }
    .album-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .site-header nav { font-size: 0.95rem; }
    .brand { gap: 6px; }
    .brand img { height: 36px; }
    .brand span { font-size: 0.8rem; }
    .site-header .button-small { padding: 9px 12px; font-size: 0.9rem; }
    .hero h1 { font-size: 2.15rem; }
}

/* Verwaltung: Texte */
.text-help { max-width: 640px; margin: 0 0 24px; padding: 14px 18px; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 12px; }
.text-help summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.text-help code { background: #fff; padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.tabs { display: flex; gap: 4px; margin: 0 0 24px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
@media (max-width: 480px) {
    .tabs { flex-wrap: wrap; gap: 8px; overflow-x: visible; border-bottom: 0; }
    .tabs a { margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
    .tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); }
}
.text-section { margin-bottom: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 140px; }
.text-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.text-section > summary::-webkit-details-marker { display: none; }
.text-section > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: rotate(45deg); transition: transform 0.2s ease; }
.text-section[open] > summary::after { transform: rotate(-135deg); }
.text-section h2 { margin: 0; font-size: 1.15rem; }
.text-section > :not(summary) { margin-left: 20px; margin-right: 20px; }
.text-section > :last-child { margin-bottom: 20px; }
.text-form label > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.text-form small.meta { font-weight: 400; margin: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--link); font-size: 0.75rem; font-weight: 700; }
.link-button { margin-top: 12px; padding: 0; background: none; border: 0; color: var(--link); font: inherit; font-size: 0.95rem; text-decoration: underline; cursor: pointer; }
.link-button:hover { background: none; color: var(--ink); transform: none; box-shadow: none; }
.form .field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 600; color: var(--ink); }
.row-editor { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 400; }
.row-editor li { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.row-editor li.is-dragging { opacity: 0.5; outline: 3px dashed var(--brand); }
.row-editor li > span { flex: 1; padding: 0 6px; color: var(--ink); }
.row-editor input, .row-editor textarea { flex: 1; min-width: 0; }
.row-editor textarea { resize: none; overflow: hidden; line-height: 1.4; }
.row-editor.is-sorting { user-select: none; -webkit-user-select: none; }
.row-editor .row-when { flex: 0 1 34%; }
.row-editor .drag-handle { position: static; flex: none; width: 40px; height: 40px; box-shadow: none; background: var(--brand-soft); }
.row-remove { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; background: none; color: var(--muted); font-size: 1.4rem; box-shadow: none; }
.row-remove:hover { background: #fde8e8; color: var(--danger); transform: none; box-shadow: none; }
.row-add { justify-self: start; padding: 8px 16px; background: var(--card); color: var(--ink); border: 1px dashed var(--line); font-size: 0.95rem; }
.nowrap { white-space: nowrap; }
.admin-photos figure { scroll-margin-top: 140px; }
.admin-photos figure.is-removing { opacity: 0.4; pointer-events: none; }
#fotos { scroll-margin-top: 140px; }
.password-box { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); scroll-margin-top: 140px; }
.password-box h2 { margin-top: 0; }

/* WhatsApp-Gruppe auf der Kontaktseite */
.whatsapp-box { margin-top: 56px; padding: 28px; max-width: 720px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 100px; }
.whatsapp-box h2 { margin-top: 0; }
.whatsapp-name { font-weight: 700; font-size: 1.15rem; }
.whatsapp-join { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin: 16px 0; }
.whatsapp-qr { width: 180px; flex: none; }
.whatsapp-qr:empty { display: none; }
.whatsapp-qr svg { display: block; width: 100%; height: auto; }
.whatsapp-join > div:last-child { flex: 1 1 220px; }
h2.big.board-subhead { margin: 56px 0 24px; }
@media (max-width: 639px) {
    /* Am Handy zuerst der Knopf; den QR-Code braucht man dort nur, um ihn jemandem zu zeigen. */
    .whatsapp-join > div:last-child { order: -1; }
}

/* Unterstützung anfragen: Kasten auf „Über uns“, Link in der Spalte „Wenn es eng wird“ */
.support-box { margin-top: 32px; padding: 20px 24px; border-left: 4px solid var(--brand); border-radius: var(--radius); background: var(--brand-soft); scroll-margin-top: 100px; }
.support-box h2 { margin-top: 0; }
.support-box p:last-child { margin-bottom: 0; }
.feature-link { margin: 12px 0 0; font-weight: 700; }
.documents .sep { display: none; }
.doc-folder { margin: 32px 0 12px; font-size: 1.25rem; }
/* Gleiche Spaltenbreiten in allen Ordnern, damit die Tabellen untereinander fluchten. */
table.documents { table-layout: fixed; }
.documents th:first-child { width: 55%; }
.documents th:nth-child(2) { width: 20%; }
.folder-rename { margin: 24px 0 0; }
.folder-rename summary { cursor: pointer; font-weight: 600; }
.folder-rename .form { margin-top: 12px; }
.stats-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; list-style: none; margin: 24px 0 0; padding: 0; }
.stats-totals li > div { display: block; height: 100%; padding: 18px 20px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.stats-totals strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--ink); }
.stats-block { margin-top: 32px; }
.stats-chart { display: block; width: 100%; height: auto; }
.stats-chart .views { fill: #f8d39a; }
.stats-chart .visitors { fill: var(--brand); }
.stats-chart line { stroke: var(--line); }
.stats-chart text { font-size: 12px; fill: var(--muted); }
.stats-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 12px; }
.stats-key:first-child { margin-left: 0; }
.stats-key-views { background: #f8d39a; }
.stats-key-visitors { background: var(--brand); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.stats-list { list-style: none; margin: 0; padding: 0; }
.stats-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stats-name { overflow-wrap: anywhere; }
.stats-hits { font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-bar { grid-column: 1 / -1; width: 100%; height: 4px; }
.stats-bar rect { fill: var(--brand); }
.photo-editor { margin-top: 16px; }
.pe-tools { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 12px; }
.pe-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-group .button-light { border: 1px solid var(--line); padding: 6px 12px; font-size: 0.9rem; }
.pe-group [aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.pe-frame { display: flex; justify-content: center; background: #2b2b2b; border-radius: var(--radius); padding: 16px; overflow: hidden; }
.pe-stage { position: relative; line-height: 0; user-select: none; }
.pe-stage canvas { display: block; max-width: 100%; }
.pe-box { position: absolute; box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.55); outline: 2px solid #fff; cursor: move; touch-action: none; }
.pe-box:focus-visible { outline: 3px solid var(--brand); }
.pe-handle { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid var(--brand); border-radius: 50%; touch-action: none; }
.pe-handle[data-corner="nw"] { left: -11px; top: -11px; cursor: nwse-resize; }
.pe-handle[data-corner="ne"] { right: -11px; top: -11px; cursor: nesw-resize; }
.pe-handle[data-corner="sw"] { left: -11px; bottom: -11px; cursor: nesw-resize; }
.pe-handle[data-corner="se"] { right: -11px; bottom: -11px; cursor: nwse-resize; }
.pe-size { text-align: center; margin-top: 8px; }
.photo-restore { margin-top: 16px; }
