/**
 * Karten (KOMP-06, KOMP-07) — nur var(--zy-…)
 *
 * 1. Einsatzgebietskarte: statisches SVG (ohne JS) und Leaflet ohne Kacheln teilen dieselben
 *    Klassen (zy-karte__kreis/__stadt). CSS schlägt Leaflets Präsentationsattribute.
 */

/* hidden muss gegen display-Regeln gewinnen (Knopf ist inline-flex). */
.zy-karte [hidden] {
	display: none !important;
}

/* ---------- 1. Einsatzgebietskarte ---------- */
.zy-karte-gebiet {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--zy-abstand-xl);
	align-items: start;
}

@media (min-width: 1100px) {
	.zy-karte-gebiet {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); /* Karte größer (Ilia, 11.10.2026) */
		gap: var(--zy-abstand-2xl);
		align-items: center;
	}
}

.zy-karte {
	position: relative;
	height: 480px;
	border-radius: var(--zy-radius-karte);
	background: var(--zy-farbe-flaeche);
	overflow: hidden;
}

@media (max-width: 639.98px) {
	.zy-karte {
		height: 360px;
	}
}

.zy-karte__statisch,
.zy-karte__leaflet {
	width: 100%;
	height: 100%;
}

.zy-karte__statisch {
	padding: var(--zy-abstand-md);
}

.zy-karte__statisch svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Gebietsflächen — SVG und Leaflet-Pfade */
.zy-karte .zy-karte__kreis,
.zy-karte .zy-karte__stadt {
	fill: var(--zy-karte-gebiet);
	fill-opacity: .7;
	stroke: var(--zy-karte-linie);
	stroke-opacity: 1;
	stroke-width: 1.5px;
	vector-effect: non-scaling-stroke;
}

.zy-karte .zy-karte__stadt {
	fill-opacity: 1;
}

/* Statisches SVG: Orte + Beschriftung (viewBox 800 × 1034, daher größere Einheiten) */
.zy-karte__ort {
	fill: var(--zy-farbe-dunkel);
	r: 9px;
}

.zy-karte__ort--sitz {
	fill: var(--zy-karte-sitz);
	r: 13px;
}

.zy-karte__label {
	fill: var(--zy-farbe-text);
	font-family: var(--zy-schrift-text);
	font-size: 34px;
	font-weight: 600;
	paint-order: stroke;
	stroke: var(--zy-farbe-flaeche);
	stroke-width: 6px;
	stroke-linejoin: round;
}

/* Leaflet-Container */
.zy-karte .leaflet-container {
	background: var(--zy-farbe-flaeche);
	font: inherit;
}

.zy-karte .leaflet-control-attribution {
	background: var(--zy-farbe-grund);
	color: var(--zy-farbe-text-leise);
	font-size: 12px;
}

.zy-karte .leaflet-control-attribution a {
	color: var(--zy-farbe-blau);
}

/* Ortsmarker (divIcon ohne Größe: Element sitzt mit der linken oberen Ecke auf dem Punkt) */
.zy-karte__marker {
	position: relative;
	width: 0;
	height: 0;
	background: none;
	border: 0;
}

.zy-karte__punkt {
	position: absolute;
	left: -4px;
	top: -4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--zy-farbe-dunkel);
}

.zy-karte__marker--sitz .zy-karte__punkt {
	left: -6px;
	top: -6px;
	width: 12px;
	height: 12px;
	background: var(--zy-karte-sitz);
}

.zy-karte__name {
	position: absolute;
	left: 10px;
	top: -12px;
	white-space: nowrap;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: var(--zy-farbe-text);
	text-shadow: 0 0 3px var(--zy-farbe-flaeche), 0 0 3px var(--zy-farbe-flaeche), 0 0 6px var(--zy-farbe-flaeche);
}

/* Fürth steht dicht neben Nürnberg — Beschriftung nach links (wie im SVG). */
.zy-karte__marker--sitz .zy-karte__name {
	left: auto;
	right: 12px;
}

.zy-karte__vermerk {
	margin: var(--zy-abstand-sm) 0 0;
	font-size: 12px;
	color: var(--zy-farbe-text-leise);
}

.zy-karte__vermerk a {
	color: inherit;
}

/* Leaflet zeigt den Vermerk selbst (Attribution) — doppelt nur ohne JS vermeiden. */
.zy-karte--leaflet + .zy-karte__vermerk {
	display: none;
}

/* Ortsliste */
.zy-karte-gebiet__liste h3 {
	font-size: var(--zy-titel-h3);
	margin-bottom: var(--zy-abstand-md);
}

.zy-karte-gebiet__orte {
	list-style: none;
	margin: 0 0 var(--zy-abstand-lg);
	padding: 0;
	display: grid;
	gap: var(--zy-abstand-sm);
}

.zy-karte-gebiet__orte li::before,
.zy-karte-gebiet__orte li::after {
	content: none;
}

.zy-karte-gebiet__orte .zy-link-pfeil {
	min-height: 32px;
}

.zy-karte-gebiet__satz {
	margin: 0;
	color: var(--zy-farbe-text-leise);
}

/* ======================================================================
   Einsatzgebiete-Globus (D-45, Ilia 11.10.2026): eigenes SVG, durchgezogene Linien, Gebiete
   klickbar. Farben nur über Tokens (Verlaufsstopps per CSS).
   ====================================================================== */
.zy-globus {
	position: relative;
	width: 100%;
	max-width: 820px;
	margin-inline: auto;
	touch-action: pan-y;
	user-select: none;
}

.zy-globus__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	/* Rand weich ausblenden – Bayern läuft aus, nur die Einsatzgebiete stehen klar (Ilia, 11.10.2026). */
	-webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 80%, transparent 100%);
	mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 80%, transparent 100%);
}

.zy-globus__landflaeche {
	stroke: none;
	pointer-events: none;
}

.zy-globus__stop-kugel-1 { stop-color: var(--zy-globus-kugel-1); }
.zy-globus__stop-kugel-2 { stop-color: var(--zy-globus-kugel-2); }
.zy-globus__stop-gebiet-1 { stop-color: var(--zy-globus-gebiet-1); }
.zy-globus__stop-gebiet-2 { stop-color: var(--zy-globus-gebiet-2); }
.zy-globus__stop-aktiv-1 { stop-color: var(--zy-globus-aktiv-1); }
.zy-globus__stop-aktiv-2 { stop-color: var(--zy-globus-aktiv-2); }

.zy-globus__netz,
.zy-globus__kreise,
.zy-globus__land {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.zy-globus__netz {
	stroke: var(--zy-globus-netz);
	stroke-width: 1;
}

.zy-globus__kreise {
	stroke: var(--zy-globus-kreise);
	stroke-width: 1;
}

/* Landesgrenze ohne Linie (Ilia, 11.10.2026) – nur die Fläche zeigt, wo Bayern ist. */
.zy-globus__land {
	display: none;
}

.zy-globus__rand {
	fill: none;
	stroke: var(--zy-globus-kreise);
	stroke-width: 1.5;
	pointer-events: none;
}

/* Flächen einfarbig, damit der Wechsel Iris → Indigo weich überblendet (Verläufe lassen sich nicht animieren). */
.zy-globus__gebiet {
	fill: var(--zy-globus-gebiet-2);
	stroke: var(--zy-farbe-grund);
	stroke-width: 1.5;
	stroke-linejoin: round;
	cursor: pointer;
	outline: none;
	transition: fill var(--zy-dauer-globus) var(--zy-ease), stroke-width var(--zy-dauer-globus) var(--zy-ease);
}

/* Die Indigo-Fläche liegt als eigene Ebene darüber und breitet sich vom Mauszeiger aus (globus.js, Kreis-Clip). */
.zy-globus__gebiet.ist-aktiv {
	stroke-width: 3;
}

.zy-globus__fuellung {
	fill: var(--zy-globus-aktiv-2);
	stroke: var(--zy-farbe-akzent-auf-dunkel); /* Rand des gewählten Gebiets in Idee (Ilia, 11.10.2026) */
	stroke-width: 3.5;
	stroke-linejoin: round;
	pointer-events: none;
}

.zy-globus__gebiet:focus-visible {
	stroke: var(--zy-farbe-fokus);
	stroke-width: 4;
}

.zy-globus__schild {
	opacity: 0;
	cursor: pointer;
	transition: opacity var(--zy-dauer-hover) var(--zy-ease);
}

.zy-globus__schild.ist-sichtbar {
	opacity: 1;
}

.zy-globus__schild-grund,
.zy-globus__schild-spitze {
	fill: var(--zy-farbe-dunkel);
}

.zy-globus__schild-text {
	fill: var(--zy-farbe-akzent-auf-dunkel);
	font-family: var(--zy-schrift-text);
	font-size: 15px;
	font-weight: 600;
	text-anchor: middle;
}

.zy-globus__schild:hover .zy-globus__schild-grund,
.zy-globus__schild:hover .zy-globus__schild-spitze,
.zy-globus__schild:focus-visible .zy-globus__schild-grund {
	fill: var(--zy-farbe-blau);
}

/* Ortsliste: gewähltes Gebiet hervorheben (Linie steht, Pfeil gedreht) */
.zy-karte-gebiet__orte .zy-link-pfeil.ist-aktiv {
	color: var(--zy-farbe-dunkel);
}

.zy-karte-gebiet__orte .zy-link-pfeil.ist-aktiv .zy-link-pfeil__text::after {
	transform: scaleX(1);
	transform-origin: left center;
}

/* Mit Globus: keine feste Höhe, kein Kasten – die Kugel steht frei auf dem Abschnitt. */
.zy-karte:has(> .zy-globus:not([hidden])) {
	height: auto;
	background: none;
	overflow: visible;
}

/* Ortsnamen als kleine Pillen ohne Pfeil (Ilia, 11.10.2026): weiß mit Indigo-Schrift, gewählt Indigo mit Idee-Schrift. */
.zy-globus__pille {
	cursor: pointer;
	outline: none;
}

.zy-globus__pille-grund {
	fill: var(--zy-farbe-grund);
	filter: drop-shadow(0 2px 4px rgb(20 39 74 / .25));
	transition: fill var(--zy-dauer-globus) var(--zy-ease), transform var(--zy-dauer-globus) var(--zy-ease);
	transform-box: fill-box;
	transform-origin: center;
}

.zy-globus__pille.ist-aktiv .zy-globus__pille-grund {
	transform: scale(1.08);
}

.zy-globus__pille-text {
	fill: var(--zy-farbe-dunkel);
	font-family: var(--zy-schrift-text);
	font-size: 13px;
	font-weight: 600;
	text-anchor: middle;
	dominant-baseline: middle;
	pointer-events: none;
	transition: fill var(--zy-dauer-globus) var(--zy-ease);
}

.zy-globus__pille.ist-aktiv .zy-globus__pille-grund {
	fill: var(--zy-farbe-dunkel);
}

.zy-globus__pille.ist-aktiv .zy-globus__pille-text {
	fill: var(--zy-farbe-akzent-auf-dunkel);
}

.zy-globus__pille:focus-visible .zy-globus__pille-grund {
	stroke: var(--zy-farbe-fokus);
	stroke-width: 3;
}

.zy-globus__schild {
	display: none;
}

/* Mit Globus: nur die Karte, groß und mittig – die Ortsliste bleibt im HTML (Links, Screenreader),
   ist aber unsichtbar; ohne JS erscheint sie wie bisher neben der statischen Karte. */
.zy-karte-gebiet:has(.zy-globus:not([hidden])) {
	grid-template-columns: minmax(0, 1fr);
}

.zy-karte-gebiet:has(.zy-globus:not([hidden])) .zy-karte-gebiet__liste {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.zy-karte-gebiet:has(.zy-globus:not([hidden])) .zy-globus {
	width: 100%;
	max-width: 1000px;
	margin-inline: auto;
}

/* Nur Handy (Ilia, 11.10.2026: „nur auf mobile“): Karte breiter als die Spalte, der weiche Rand läuft aus dem Bild;
   der Abschnitt schneidet waagerecht ab (kein Seitenscroll). */
@media (max-width: 767.98px) {
	.zy-abschnitt:has(.zy-globus) {
		overflow-x: clip;
	}

	.zy-karte-gebiet:has(.zy-globus:not([hidden])) .zy-globus {
		width: var(--zy-globus-mobil-breite);
		max-width: none;
		margin-inline: calc((100% - var(--zy-globus-mobil-breite)) / 2);
	}
}

/* ---------- Person-Karte (Betriebsleiter, Ilia 16.10.2026) ---------- */
.zy-person {
	display: grid;
	gap: var(--zy-abstand-lg);
	align-items: center;
	max-width: 62rem;
	margin-inline: auto;
	padding: var(--zy-abstand-xl);
	border-radius: var(--zy-radius-karte, 1.5rem);
	background: var(--zy-farbe-grund);
	box-shadow: 0 12px 40px color-mix(in srgb, var(--zy-farbe-dunkel) 10%, transparent);
}

.zy-person__bild img {
	display: block;
	width: 100%;
	max-width: 26rem;
	height: auto;
	margin-inline: auto;
}

.zy-person__rolle {
	margin: 0 0 var(--zy-abstand-xs);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: var(--zy-label-sperrung);
	text-transform: uppercase;
	color: var(--zy-farbe-blau);
}

.zy-person__name {
	margin: 0 0 var(--zy-abstand-md);
	font-family: var(--zy-schrift-titel);
	font-weight: 400;
	font-size: var(--zy-titel-h2);
	line-height: 1.05;
	color: var(--zy-farbe-dunkel);
}

.zy-person__absatz {
	margin: 0 0 var(--zy-abstand-lg);
	max-width: 40ch;
}

@media (min-width: 768px) {
	.zy-person {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
		gap: var(--zy-abstand-2xl);
		padding: var(--zy-abstand-2xl);
	}
}

@media (max-width: 767.98px) {
	.zy-person {
		text-align: center;
	}

	.zy-person__absatz {
		margin-inline: auto;
	}
}
