/*
Theme Name: KT97 Base
Description: Schlankes Darstellungs-Theme der Kaisertreuen 97 Münster. Keine Fachlogik – alle Daten aus dem Plugin "KT97 Fanclub Core".
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.2
Author: Kaisertreuen 97 Münster
License: GPL-2.0-or-later
Text Domain: kt97
*/

/* ---------- Tokens (design/tokens.json) ---------- */
:root {
	--brand: #DC052D;
	--brand-strong: #A50021;
	--brand-soft: #FDECEF;
	--surface: #FFFFFF;
	--surface-alt: #F5F5F7;
	--line: #E3E3E8;
	--text: #1D1D1F;
	--text-muted: #6E6E73;
	--focus: #0A66C2;
	--radius-s: 8px;
	--radius-m: 12px;
	--radius-l: 20px;
	--touch: 44px;
	--max: 1180px;
	--gutter: 16px;
	--header-h: 60px;
	--tabbar-h: 64px;
	--shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .05);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light;
}
@media (min-width: 760px) { :root { --gutter: 32px; --header-h: 68px; } }

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	font: 17px/1.55 var(--font);
	color: var(--text);
	background: var(--surface-alt);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); }
.skip-link:focus { top: 12px; color: #fff; }

.icon { width: 22px; height: 22px; flex: none; }
.icon--s { width: 16px; height: 16px; }
.icon--xs { width: 13px; height: 13px; }
.icon--xl { width: 48px; height: 48px; color: var(--text-muted); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
/* Fuß schließt direkt an den Inhalt an; bei kurzen Seiten bleibt er trotzdem unten am Fensterrand. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.site-header, .site-main, .site-footer { width: 100%; }
.site-main { flex: 1 0 auto; padding-block: 20px 16px; }
@media (min-width: 760px) { .site-main { padding-block: 32px 24px; } }
.center { text-align: center; }

/* ---------- Kopfleiste ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgb(255 255 255 / .86);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid rgb(0 0 0 / .06);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: var(--touch); }
.brand:hover { color: var(--text); }
.brand__logo { width: 40px; height: 40px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand__text span { font-size: 13px; color: var(--text-muted); }

.main-nav { display: none; margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
	display: flex; align-items: center; min-height: var(--touch); padding: 0 14px;
	border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none;
}
.main-nav a:hover { background: var(--surface-alt); }
.main-nav a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); }
@media (min-width: 900px) { .main-nav { display: block; } }

/* ---------- Untere Navigationsleiste (Smartphone/Tablet) ---------- */
.tab-bar {
	position: fixed; inset: auto 0 0 0; z-index: 60;
	background: rgb(255 255 255 / .92);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-top: 1px solid rgb(0 0 0 / .08);
	padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar > ul { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; height: var(--tabbar-h); }
.tab-bar > ul > li > a, .tab-bar summary {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	height: 100%; font-size: 11px; font-weight: 500; color: var(--text-muted); text-decoration: none; cursor: pointer;
	list-style: none;
}
.tab-bar summary::-webkit-details-marker { display: none; }
.tab-bar > ul > li > a[aria-current="page"], .tab-bar details[open] summary { color: var(--brand); }
.tab-bar > ul > li > a .icon, .tab-bar summary .icon { width: 26px; height: 26px; }
.tab-bar__more { height: 100%; }
.sheet {
	position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
	background: var(--surface); border-radius: var(--radius-l); box-shadow: 0 10px 40px rgb(0 0 0 / .2);
	padding: 8px; display: grid;
}
.sheet a {
	display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px;
	font-size: 17px; color: var(--text); text-decoration: none; border-radius: var(--radius-m);
}
.sheet a:hover { background: var(--surface-alt); }
.sheet .icon { color: var(--brand); }
.sheet .sheet__small { min-height: var(--touch); font-size: 15px; color: var(--text-muted); padding-left: 48px; }
@media (min-width: 900px) { .tab-bar { display: none; } }

/* ---------- Header-Illustration (Startseite) ---------- */
.hero {
	position: relative; overflow: hidden; isolation: isolate;
	height: clamp(200px, 38vw, 400px);
	background: var(--surface-alt);
}
.hero__media img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; object-position: 75% 72%;
}
/* Weicher Übergang: unten in den Seitenhintergrund, links in Weiß (Platz für Schrift) – keine harte Bildkante. */
.site-main--flush { padding-top: 0; }
.hero::after {
	content: ""; position: absolute; inset: 0 0 -2px; z-index: 1; pointer-events: none;
	background:
		linear-gradient(to bottom, rgb(245 245 247 / 0) 34%, rgb(245 245 247 / .3) 52%, rgb(245 245 247 / .72) 70%, rgb(245 245 247 / .93) 82%, var(--surface-alt) 92%),
		linear-gradient(to right, rgb(255 255 255 / .8) 0%, rgb(255 255 255 / .35) 30%, rgb(255 255 255 / 0) 48%);
}
.hero--fallback {
	background:
		radial-gradient(120% 90% at 85% 40%, #ff3355 0%, var(--brand) 35%, #7d0019 75%),
		var(--brand);
}
.hero__content {
	position: relative; z-index: 2; height: 100%;
	display: flex; flex-direction: column; justify-content: center;
	max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter) 64px;
}
.hero__title { font-size: clamp(28px, 5.4vw, 52px); font-weight: 750; margin: 0 0 6px; max-width: 16ch; color: var(--text); }
.hero__subtitle { font-size: clamp(15px, 2vw, 19px); color: #3a3a3c; margin: 0; font-weight: 500; }
@media (max-width: 599px) {
	.hero { height: 200px; }
	.hero__media img { object-position: 88% 60%; }
	.hero__content { justify-content: flex-start; padding-top: 22px; }
	/* Schleier nur hinter der Schrift oben links – die Arena unten rechts bleibt kräftig. */
	.hero::after {
		background:
			linear-gradient(to bottom, rgb(245 245 247 / 0) 40%, rgb(245 245 247 / .45) 60%, rgb(245 245 247 / .85) 78%, var(--surface-alt) 92%),
			radial-gradient(130% 75% at 0% 18%, rgb(255 255 255 / .92) 0%, rgb(255 255 255 / .6) 45%, rgb(255 255 255 / 0) 72%);
	}
}

/* ---------- Karten, Titel, Hinweise ---------- */
.card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.card--padded { padding: 20px; }
@media (min-width: 760px) { .card--padded { padding: 32px; } }
.card__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.card__title { display: flex; align-items: center; gap: 8px; font-size: 19px; margin: 0; }
.card__title .icon { color: var(--brand); }
.card__link, .card__foot a { font-size: 15px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--touch); }
.card__foot { margin: 0; padding: 0 18px 8px; border-top: 1px solid var(--line); }
.section-title { font-size: 22px; margin: 4px 4px 12px; }
.section-title--small { font-size: 19px; margin: 32px 0 12px; }
.page-head { margin: 4px 0 20px; }
.page-title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; margin: 0 0 6px; }
.page-meta { color: var(--text-muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.empty { color: var(--text-muted); padding: 20px; margin: 0; }
.tag {
	display: inline-flex; align-items: center; gap: 4px; margin: 0;
	font-size: 12px; font-weight: 600; letter-spacing: .02em;
	padding: 2px 8px; border-radius: 999px; background: var(--surface-alt); color: var(--text-muted); text-decoration: none;
}
a.tag:hover { background: var(--brand-soft); color: var(--brand-strong); }
.tag--alert { background: var(--brand); color: #fff; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin: 20px 0; font-size: 15px; }
.notice--lock .icon { color: var(--brand); margin-top: 1px; }
.notice a { font-weight: 600; white-space: nowrap; }
.back-link { margin: 28px 0 0; }
.back-link--top { margin: 0 0 14px; }
.back-link a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); text-decoration: none; font-weight: 500; font-size: 15px; }
.back-link .icon { width: 18px; height: 18px; }

.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: var(--touch); padding: 0 20px; border-radius: 999px; border: 0;
	background: var(--brand); color: #fff; font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--brand-strong); color: #fff; }
.button .icon { width: 20px; height: 20px; }
.button--ghost { background: var(--surface-alt); color: var(--text); }
.button--ghost:hover { background: var(--line); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions--center { justify-content: center; }

/* ---------- Startseite 70 / 30 ---------- */
.home-layout { display: grid; gap: 20px; grid-template-areas: "events" "news"; }
.home-layout--overlap { margin-top: -64px; position: relative; z-index: 3; }
@media (max-width: 599px) { .home-layout--overlap { margin-top: -52px; } }
.home-events { grid-area: events; align-self: start; }
.home-news { grid-area: news; min-width: 0; }
@media (min-width: 900px) {
	.home-layout { grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); grid-template-areas: "news events"; gap: 32px; }
	.home-events { position: sticky; top: calc(var(--header-h) + 20px); }
	.home-layout--overlap .home-news .section-title { color: var(--text); }
}
/* Auf Smartphones nur die nächsten Termine – die volle Liste ist einen Tipp entfernt. */
@media (max-width: 899px) {
	.home-events .event-row:nth-child(n+4) { display: none; }
}

/* ---------- Nachrichtenliste (textorientiert) ---------- */
.news-list { list-style: none; margin: 0; padding: 4px 0; }
.news-item { padding: 16px 18px; }
.news-item + .news-item { border-top: 1px solid var(--line); }
@media (min-width: 760px) { .news-item { padding: 20px 24px; } }
.news-item article { position: relative; }
.news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 14px; color: var(--text-muted); }
.news-item__photos { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
.news-item__title { font-size: 19px; font-weight: 650; margin: 0 0 4px; }
@media (min-width: 760px) { .news-item__title { font-size: 21px; } }
.news-item__title a { color: var(--text); text-decoration: none; }
.news-item__title a::after { content: ""; position: absolute; inset: 0; } /* ganze Zeile tippbar */
.news-item:hover .news-item__title a { color: var(--brand-strong); }
.news-item__excerpt { margin: 0; color: #3a3a3c; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Termine ---------- */
.event-list { list-style: none; margin: 0; padding: 4px 0; }
.event-row + .event-row { border-top: 1px solid var(--line); }
.event-row a { display: flex; gap: 14px; align-items: center; padding: 12px 18px; min-height: 64px; color: var(--text); text-decoration: none; }
.event-row a:hover { background: var(--surface-alt); }
.event-row__body { display: flex; flex-direction: column; min-width: 0; }
.event-row__title { font-weight: 600; line-height: 1.3; }
.event-row__meta { font-size: 14px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.event-row.is-cancelled .event-row__title { text-decoration: line-through; color: var(--text-muted); }
.date-badge {
	display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
	width: 52px; height: 52px; border-radius: var(--radius-m);
	background: var(--brand-soft); color: var(--brand-strong); line-height: 1;
}
.date-badge__day { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.date-badge__month { font-size: 11px; font-weight: 700; letter-spacing: .06em; margin-top: 3px; }
.date-badge--large { width: 72px; height: 72px; }
.date-badge--large .date-badge__day { font-size: 30px; }
.date-badge--large .date-badge__month { font-size: 13px; }

.segmented { display: inline-flex; background: #E8E8ED; border-radius: 999px; padding: 3px; margin-top: 8px; }
.segmented a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

.event__head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.event__head .tag { margin: 0 6px 6px 0; }
.event__title { font-size: clamp(24px, 4vw, 32px); margin: 0; }
.event__image { margin: 0 -20px 20px; }
.event__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 760px) { .event__image { margin: 0 0 24px; } .event__image img { border-radius: var(--radius-m); } }
.event.is-cancelled .event__title { text-decoration: line-through; }
.facts { margin: 0 0 8px; display: grid; gap: 2px; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) { .facts > div { grid-template-columns: 190px 1fr; gap: 16px; } }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.facts dt .icon { width: 18px; height: 18px; color: var(--brand); }
.facts dd { margin: 0; font-weight: 500; }

/* ---------- Einzelne Nachricht ---------- */
.article-hero { position: relative; height: clamp(240px, 52vw, 560px); margin-bottom: -20px; overflow: hidden; }
.article-hero__img {
	width: 100%; height: 100%; object-fit: cover;
	/* weicher Übergang nach unten in den Hintergrund – keine harte Bildkante */
	-webkit-mask-image: linear-gradient(to bottom, #000 45%, rgb(0 0 0 / .35) 75%, transparent 96%);
	mask-image: linear-gradient(to bottom, #000 45%, rgb(0 0 0 / .35) 75%, transparent 96%);
}
.article__body { position: relative; }
.article__head { margin-bottom: 20px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--text-muted); font-size: 15px; margin-bottom: 8px; }
.article__title { font-size: clamp(28px, 4.6vw, 42px); font-weight: 750; }

.prose { font-size: 18px; line-height: 1.65; overflow-wrap: break-word; }
.prose > * { max-width: 100%; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose figure { margin: 1.5em 0; }
.prose img { border-radius: var(--radius-m); }
.prose figcaption { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-m); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose blockquote { margin: 1.5em 0; padding-left: 16px; border-left: 3px solid var(--brand); color: #3a3a3c; }
.prose .wp-block-gallery, .prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.prose .wp-block-gallery figure, .prose .gallery figure { margin: 0; }
.prose .alignleft { float: left; margin: 0 1em 1em 0; }
.prose .alignright { float: right; margin: 0 0 1em 1em; }
.prose .aligncenter { margin-inline: auto; }
/* Alte Elementor-Inhalte neutral darstellen (Elementor-CSS wird nicht geladen). */
.prose [class*="elementor-"] { width: auto !important; max-width: 100%; }
.prose--wide { font-size: 16px; }

/* ---------- Galerien ---------- */
.gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 600px) { .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (min-width: 1000px) { .container:not(.container--narrow) .gallery__grid { grid-template-columns: repeat(4, 1fr); } }
.gallery__item { display: block; border-radius: var(--radius-s); overflow: hidden; background: var(--line); }
.gallery__item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s ease; }
.gallery__item:hover img { transform: scale(1.03); }

.gallery-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .gallery-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery-cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.gallery-card a { display: block; background: var(--surface); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); color: var(--text); text-decoration: none; height: 100%; }
.gallery-card__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--surface-alt); }
.gallery-card__media img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.gallery-card__title { font-weight: 650; font-size: 18px; }
.gallery-card__meta { display: flex; gap: 8px; align-items: center; color: var(--text-muted); font-size: 14px; }

/* ---------- Vollbildansicht ---------- */
/* Geschlossene Fenster nie anzeigen – auch wenn fremdes CSS (alte Plugins) dialog { display: … } setzt */
dialog:not([open]) { display: none !important; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: #000; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox__figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: pan-y; user-select: none; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; }
.lightbox__caption { font-size: 15px; color: #d1d1d6; padding: 10px 16px; text-align: center; min-height: 1em; }
.lightbox__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; }
.lightbox__btn:hover { background: rgb(255 255 255 / .26); }
.lightbox__close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; top: max(22px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; margin: 0; font-size: 14px; color: #d1d1d6; pointer-events: none; }
@media (hover: none) { .lightbox__prev, .lightbox__next { display: none; } } /* auf Touch-Geräten wischen */

/* ---------- Seiten-Navigation, Fuß ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.pager__info { font-size: 14px; color: var(--text-muted); }
.pager .icon { width: 18px; height: 18px; }

/*
 * Fußbereich – Gegenstück zum Arena-Header: weicher Übergang vom Seitengrau in Bayern-Rot,
 * links ein halbtransparentes Rautengitter (Fassade der Arena), das nach oben und zur Mitte ausläuft.
 * Nur CSS-Verläufe und ein winziges SVG-Muster (inline) – keine zusätzliche Datei, keine Animation.
 */
.site-footer {
	--fade: 140px;
	position: relative; isolation: isolate; overflow: hidden;
	flex-shrink: 0; padding-top: var(--fade);
	color: #fff;
	background:
		linear-gradient(to bottom,
			var(--surface-alt) 0,
			rgb(244 222 227) calc(var(--fade) * .3),
			rgb(236 140 158) calc(var(--fade) * .58),
			rgb(222 46 78) calc(var(--fade) * .82),
			#D0042B var(--fade),
			#B8022A calc(var(--fade) + 160px),
			#A50021 100%);
}
.site-footer__art {
	position: absolute; inset: 0 auto 0 0; width: min(760px, 70%); z-index: -1; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='28' viewBox='0 0 44 28'%3E%3Cpath d='M22 1.5 42.5 14 22 26.5 1.5 14Z' fill='%23fff' fill-opacity='.07' stroke='%23fff' stroke-opacity='.38' stroke-width='1.2'/%3E%3C/svg%3E") left bottom / 44px 28px repeat;
	-webkit-mask-image: radial-gradient(95% 115% at 0% 100%, #000 0%, rgb(0 0 0 / .7) 30%, rgb(0 0 0 / .25) 55%, transparent 75%);
	        mask-image: radial-gradient(95% 115% at 0% 100%, #000 0%, rgb(0 0 0 / .7) 30%, rgb(0 0 0 / .25) 55%, transparent 75%);
}
.site-footer__inner {
	max-width: var(--max); margin-inline: auto;
	padding: 8px var(--gutter) 36px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
	font-size: 15px;
}
.site-footer__brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.site-footer__logo { width: 56px; height: 56px; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .25)); }
.site-footer__club { display: flex; flex-direction: column; line-height: 1.35; }
.site-footer__club strong { font-size: 17px; font-weight: 650; color: #fff; }
.site-footer__club span { color: rgb(255 255 255 / .9); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: var(--touch); color: #fff; text-decoration: none; text-underline-offset: 4px; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
@media (max-width: 899px) {
	/* Unter der festen Navigationsleiste läuft das Rot weiter statt eines grauen Streifens. */
	body { padding-bottom: 0; }
	.site-footer__inner { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }
}
@media (max-width: 599px) {
	.site-footer { --fade: 88px; }
	.site-footer__art { width: 100%; background-size: 34px 22px; }
	.site-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
	.site-footer__logo { width: 44px; height: 44px; }
	.site-footer__club strong { font-size: 16px; }
	.site-footer__links { gap: 0 18px; }
}

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

/* Platzhalter in Seiten (Impressum, Mitglied werden) – nicht zu übersehen, bis der Vorstand sie ersetzt */
.kt97-placeholder { background: #FFF6D6; border-left: 4px solid #E0A800; border-radius: var(--radius-s); padding: 10px 14px; font-size: 16px; }

/* ---------- Mitgliederbereich & Teilnahme (Stufe 4) ---------- */
.notice--ok { border-color: #b7e1c2; background: #EEF8F1; }
.notice--error { border-color: #f1c7cf; background: var(--brand-soft); }
.tag--ok { background: #E6F4EA; color: #1E6B34; }
.rsvp { margin: 8px 0 0; }
.rsvp__status { margin: 0 0 12px; }
.rsvp__hint { color: var(--text-muted); font-size: 15px; margin: 0; }
.rsvp__form { display: flex; flex-wrap: wrap; gap: 8px; }
.rsvp__form .button { flex: 1 1 160px; }
.rsvp .rsvp__yes, .rsvp .rsvp__no { background: var(--surface-alt); color: var(--text); border: 2px solid transparent; }
.rsvp .rsvp__yes:hover { background: #E6F4EA; color: #1E6B34; }
.rsvp .rsvp__no:hover { background: var(--brand-soft); color: var(--brand-strong); }
.rsvp .rsvp__yes.is-active { background: #1E7D3C; color: #fff; }
.rsvp .rsvp__no.is-active { background: var(--brand-strong); color: #fff; }
.button--link { background: none; color: var(--brand-strong); text-decoration: underline; padding: 0 8px; flex: 0 0 auto !important; }
.button--link:hover { background: none; color: var(--brand); }
.rsvp--compact .rsvp__form .button { flex: 1 1 0; min-height: 40px; font-size: 15px; }
.event__rsvp { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 4px; }
.member-login { text-align: center; }
.member-login .icon--xl { color: var(--brand); margin: 0 auto 8px; display: block; }
.member-login__join { margin: 16px 0 0; font-size: 15px; }
.member-events { list-style: none; margin: 0; padding: 4px 0; }
.member-event { padding: 8px 18px 14px; }
.member-event + .member-event { border-top: 1px solid var(--line); }
.member-event__link { display: flex; gap: 14px; align-items: center; color: var(--text); text-decoration: none; padding: 6px 0 4px; }
.member-event .rsvp { margin-left: 66px; }
@media (max-width: 480px) { .member-event .rsvp { margin-left: 0; } }
/* Reiter in "Mein Bereich" */
.member-tabs { display: flex; gap: 4px; background: #E8E8ED; border-radius: 999px; padding: 4px; margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.member-tabs::-webkit-scrollbar { display: none; }
.member-tabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.member-tabs a:hover { color: var(--brand-strong); }
.member-tabs a[aria-selected="true"] { background: var(--surface); color: var(--brand-strong); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.member-tabs .icon { width: 18px; height: 18px; }
.member-tabs__short { display: none; }
@media (max-width: 520px) {
	.member-tabs a { flex: 1 1 0; padding: 0 6px; font-size: 14px; }
	.member-tabs .icon { display: none; }
	.member-tabs__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.member-tabs__short { display: inline; }
}
.member-panel:focus { outline: none; }
.member-panel .section-head { margin: 4px 0 12px; }
.member-panel .section-head .section-title { margin: 0; }
.member-panel .member-pages + .section-head { margin-top: 32px; }
.member-panel__foot { margin: 12px 0 0; font-size: 15px; }
.member-panel__text { color: var(--text-muted); font-size: 15px; margin: 8px 0 0; }
.member-profile { display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 12px; }
.member-profile__avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; background: var(--brand-soft); color: var(--brand-strong); font-size: 20px; font-weight: 700; }
.member-profile__name { font-size: 19px; font-weight: 600; margin: 0; }
.member-profile__meta { color: var(--text-muted); font-size: 15px; margin: 2px 0 0; word-break: break-all; }

/* ---------- Untermenü "Fanclub" ---------- */
.nav-sub { position: relative; }
.nav-sub details { position: relative; }
.nav-sub summary {
	display: flex; align-items: center; gap: 4px; min-height: var(--touch); padding: 0 12px 0 14px;
	border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; list-style: none;
}
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub summary:hover, .nav-sub details[open] summary { background: var(--surface-alt); }
.nav-sub summary[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); }
.nav-sub details[open] summary .icon { transform: rotate(180deg); }
.nav-sub__menu {
	position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; z-index: 70;
	list-style: none; margin: 0; padding: 6px; display: grid !important; gap: 0 !important;
	background: var(--surface); border-radius: var(--radius-m); box-shadow: 0 10px 40px rgb(0 0 0 / .16);
}
.main-nav .nav-sub__menu a { border-radius: var(--radius-s); justify-content: flex-start; white-space: nowrap; }
.sheet__group { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; padding: 8px 14px 2px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.sheet__group .icon { color: var(--brand); }
.sheet .sheet__child { min-height: var(--touch); padding-left: 48px; font-size: 16px; }
.sheet { max-height: calc(100dvh - var(--tabbar-h) - 40px); overflow-y: auto; }

/* ---------- Seiten-Vorlagen ---------- */
.container--medium { max-width: calc(980px + 2 * var(--gutter)); }
.split { display: grid; gap: 20px; }
.split__media { margin: 0; }
.split__media img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) {
	.split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
	.split__media { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* ---------- "Neue News"-Fenster ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head .section-title { margin-bottom: 12px; }
.button--small { min-height: 38px; padding: 0 14px; font-size: 15px; margin-bottom: 12px; }
.button--small .icon { width: 18px; height: 18px; }
.qn { width: min(640px, 100vw); max-width: 100vw; max-height: 100dvh; padding: 0; border: 0; border-radius: var(--radius-l); background: var(--surface-alt); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.qn::backdrop { background: rgb(0 0 0 / .45); }
@media (max-width: 640px) { .qn { width: 100vw; height: 100dvh; border-radius: 0; margin: 0; } }
.qn__form { display: flex; flex-direction: column; max-height: inherit; height: 100%; }
.qn__head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px; background: rgb(255 255 255 / .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: max(10px, env(safe-area-inset-top)); }
.qn__title { margin: 0; font-size: 17px; text-align: center; }
.qn__cancel, .qn__save { min-height: var(--touch); border: 0; background: none; font: 500 16px var(--font); color: var(--brand-strong); cursor: pointer; padding: 0 6px; }
.qn__cancel { justify-self: start; }
.qn__save { justify-self: end; font-weight: 700; }
.qn__body { overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.qn__field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.qn__label { font-size: 14px; font-weight: 600; color: #3a3a3c; display: flex; align-items: center; gap: 4px; }
.qn__label small { font-weight: 400; color: var(--text-muted); }
.qn input[type=text], .qn input[type=tel], .qn input[type=date], .qn input[type=time], .qn select, .qn textarea {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #D2D2D7; border-radius: var(--radius-m); background: var(--surface); font: 17px/1.4 var(--font); color: var(--text);
}
.qn textarea { min-height: 150px; resize: vertical; }
.qn input:focus, .qn textarea:focus, .qn select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.qn__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.qn__row [hidden] { display: none; }
.qn__check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-size: 16px; }
.qn__check input, .qn__choice input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.qn__choices { display: flex; flex-wrap: wrap; gap: 8px; }
.qn__choices legend { width: 100%; margin-bottom: 6px; }
.qn__choice { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 14px; background: var(--surface); border: 1px solid #D2D2D7; border-radius: 999px; cursor: pointer; }
.qn__choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.qn__upload { position: relative; justify-self: start; }
.qn__file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qn__previews { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qn__previews li { width: 76px; height: 76px; border-radius: var(--radius-s); overflow: hidden; background: var(--line); }
.qn__previews img { width: 100%; height: 100%; object-fit: cover; }
.qn__previews li:first-child { box-shadow: 0 0 0 3px var(--brand); }
.qn__hint { font-size: 13px; color: var(--text-muted); }
.qn__error { display: block; font-size: 14px; font-weight: 600; color: #B42318; }
.qn__error[hidden] { display: none; }
.qn__event { background: var(--surface); border-radius: var(--radius-m); border: 1px solid var(--line); }
.qn__event summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; font-weight: 600; cursor: pointer; list-style: none; }
.qn__event summary::-webkit-details-marker { display: none; }
.qn__event summary .icon { color: var(--brand); }
.qn__event summary small { font-weight: 400; color: var(--text-muted); }
.qn__event summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--brand); }
.qn__event[open] summary::after { content: "–"; }
.qn__event-toggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.qn__event-body { display: grid; gap: 14px; padding: 0 14px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.qn__submit { width: 100%; min-height: 50px; font-size: 17px; }

/* Termin-Karte in einer Nachricht */
.news-event { margin: 24px 0; padding: 4px 16px 14px; }
.news-event__link { display: flex; gap: 14px; align-items: center; padding: 12px 0 8px; color: var(--text); text-decoration: none; }
.news-event__link > .icon { margin-left: auto; color: var(--brand); }
.news-event__kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-strong); }
.news-event .rsvp { margin-left: 66px; }
@media (max-width: 480px) { .news-event .rsvp { margin-left: 0; } }

/* ---------- Fenster "Seite anlegen / bearbeiten" ---------- */
.qp__layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 520px) { .qp__layouts { grid-template-columns: repeat(2, 1fr); } }
.qp__layout { position: relative; display: grid; gap: 6px; justify-items: center; padding: 10px 8px; background: var(--surface); border: 1px solid #D2D2D7; border-radius: var(--radius-m); cursor: pointer; text-align: center; font-size: 13px; }
.qp__layout input { position: absolute; opacity: 0; pointer-events: none; }
.qp__layout svg { width: 100%; max-width: 110px; height: auto; }
.qp__layout:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.qp__layout:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.qp__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--surface); border: 1px solid #D2D2D7; border-bottom: 0; border-radius: var(--radius-m) var(--radius-m) 0 0; }
.qp__toolbar button { min-width: 40px; min-height: 40px; border: 0; border-radius: var(--radius-s); background: var(--surface-alt); font: 600 15px var(--font); color: var(--text); cursor: pointer; }
.qp__toolbar button:hover { background: var(--brand-soft); color: var(--brand-strong); }
.qp__editor { min-height: 220px; max-height: 50vh; overflow-y: auto; padding: 12px 14px; background: var(--surface); border: 1px solid #D2D2D7; border-radius: 0 0 var(--radius-m) var(--radius-m); font-size: 17px; outline: none; }
.qp__editor:focus { box-shadow: 0 0 0 2px var(--focus); }
.qp__editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); }
.qp__editor > :first-child { margin-top: 0; }
.qp__images { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qp__images li { position: relative; width: 76px; height: 76px; border-radius: var(--radius-s); overflow: hidden; background: var(--line); }
.qp__images li:first-child { box-shadow: 0 0 0 3px var(--brand); }
.qp__images img { width: 100%; height: 100%; object-fit: cover; }
.qp__remove { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .65); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.qp__trash { padding: 4px 16px 24px; text-align: center; background: var(--surface-alt); }
.qp__trash .button--link { color: #B42318; }
.page-tools { display: flex; justify-content: flex-end; margin: 0 0 -8px; }
.page-tools + .page-head { margin-top: 0; }
.page-tools { gap: 8px; flex-wrap: wrap; }
.qp__trash-inline { display: inline; margin: 0; }
.button--danger { color: #B42318; }
.qp__trash-button { width: 100%; justify-content: center; border: 1px solid #F4C7C3; }
.notice--draft { border-color: #F5D58A; background: #FFF8E6; }
.notice--draft .button--link { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.drafts-hint { margin: 0 0 12px; font-size: 15px; }
.drafts-hint a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #FFF8E6; border: 1px solid #F5D58A; color: var(--text); text-decoration: none; }
.button--danger:hover { background: #FEE4E2; }
.qp__trash .qp__trash-inline .button--link { color: #B42318; }
/* Stift zum Bearbeiten in Listen (nur für Redaktion/Vorstand sichtbar) */
.has-edit { position: relative; }
.has-edit:has(.edit-link) > article, .has-edit:has(.edit-link) > a:not(.edit-link) { padding-right: 60px; }
li.has-edit > .edit-link { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; gap: 0; border-radius: 50%; color: var(--text-muted); background: var(--surface-alt); }
li.has-edit > .edit-link:hover, li.has-edit > .edit-link:focus-visible { color: var(--brand); background: var(--line); }
.member-pages { list-style: none; margin: 8px 0 0; padding: 4px 0; }
.member-pages li + li { border-top: 1px solid var(--line); }
.member-pages a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 18px; color: var(--text); text-decoration: none; }
.member-pages a:hover { background: var(--surface-alt); }
.member-pages .tag { margin-left: auto; }
.member-pages-box { margin: 0 0 12px; padding: 0; background: none; box-shadow: none; }
.member-pages-box summary { list-style: none; display: inline-flex; cursor: pointer; }
.member-pages-box summary::-webkit-details-marker { display: none; }
.member-pages-box[open] .member-pages { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); }
