/* Musterseiten FooEvents (inc/fooevents-muster.php, js/fooevents-muster.js)
   Nur auf /karten/muster-ohne-platzwahl/ und /karten/muster-mit-platzwahl/.
   Aufbau wie die Ausgabe von WooCommerce + FooEvents (+ Seating), Farben
   und Schriften aus den Tokens in style.css. Kein Gold auf Hell, Schatten
   nur im Weinrot des Logos. Knoepfe mind. 48 px, Schrift mind. 16 px. */

.ehc-fm {
	--fm-rand: #8a7f73;          /* Feldrand, 3,9:1 auf Weiss */
	--fm-frei: #5e5650;          /* freier Platz */
	--fm-frei-hover: #2a2533;
	--fm-belegt: #d6cdbf;
	--fm-belegt-text: #7a7064;
	--fm-gesperrt: #ece6dc;
	--fm-schatten: 0 1px 2px rgba(130, 0, 0, .06), 0 24px 48px -30px rgba(130, 0, 0, .35);
	--fm-sitz: 34px;
	--fm-luecke: 5px;
	color: var(--gh-text);
	font-family: var(--gh-schrift-text);
	font-size: 18px;
	line-height: 1.55;
}
#page-container .ehc-fm p,
#page-container .ehc-fm h1,
#page-container .ehc-fm h2,
#page-container .ehc-fm h3,
#page-container .ehc-fm h4 { margin: 0; padding: 0; }
#page-container .ehc-fm ul,
#page-container .ehc-fm li { list-style: none; margin: 0; padding: 0; }
.ehc-fm button,
.ehc-fm input,
.ehc-fm select { font-family: inherit; }
.ehc-fm img { max-width: 100%; height: auto; }
.ehc-fm [hidden] { display: none !important; }
.ehc-fm-ansage {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
#page-container .ehc-fm .ehc-fm-klein { font-size: 1rem; color: var(--gh-grau); margin-top: 12px; }
#page-container .ehc-fm .ehc-fm-anm { font-size: 1rem; color: var(--gh-grau); margin-top: 16px; }
#page-container .ehc-fm .ehc-fm-meldung { margin-top: 10px; font-weight: 700; color: var(--gh-akzent); }
#page-container .ehc-fm .ehc-fm-meldung:empty { display: none; }

/* ── Hinweis ganz oben: dunkel, damit ihn niemand uebersieht ───── */
.ehc-fm-hinweis {
	background: var(--gh-nacht);
	color: #fff;
	border-radius: var(--gh-radius);
	padding: 36px 44px 34px;
}
#page-container .ehc-fm .ehc-fm-hinweis__titel {
	font-family: var(--gh-schrift-titel);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(2.1rem, 4vw, 3.3rem);
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: #fff;
}
.ehc-fm-hinweis__marke { color: var(--gh-licht); font-style: normal; font-family: var(--gh-schrift-text); font-weight: 700; font-size: .62em; letter-spacing: .02em; vertical-align: .18em; margin-right: .2em; }
#page-container .ehc-fm .ehc-fm-hinweis__text { margin-top: 14px; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; color: #fff; }
#page-container .ehc-fm .ehc-fm-hinweis__klein { margin-top: 12px; font-size: 1.05rem; color: #ddd7e3; }

/* ── Was das Plugin kann / was nicht ───────────────────────────── */
.ehc-fm-kann {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	margin-top: 20px;
}
.ehc-fm-kann__spalte { background: #fff; border-radius: var(--gh-radius); padding: 28px 30px; box-shadow: var(--fm-schatten); }
.ehc-fm-kann__spalte--nicht { background: var(--gh-grund-hell); box-shadow: none; }
#page-container .ehc-fm .ehc-fm-kann__titel { font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500; font-size: 1.9rem; line-height: 1.1; margin-bottom: 14px; }
#page-container .ehc-fm .ehc-fm-kann__fuss { grid-column: 1 / -1; font-size: 1rem; color: var(--gh-grau); }

#page-container .ehc-fm .ehc-fm-liste li { position: relative; padding-left: 30px; margin-top: 12px; }
#page-container .ehc-fm .ehc-fm-liste li:first-child { margin-top: 0; }
.ehc-fm-liste li::before {
	content: ""; position: absolute; left: 4px; top: .42em;
	width: 7px; height: 12px; border: solid var(--gh-akzent); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.ehc-fm-kann__spalte--nicht .ehc-fm-liste li::before {
	left: 2px; top: .62em; width: 14px; height: 3px; border: 0; background: var(--gh-grau); transform: none;
}
.ehc-fm-quelle { display: block; font-size: .92rem; color: var(--gh-grau); margin-top: 2px; }

/* ── Schritte ──────────────────────────────────────────────────── */
.ehc-fm-schritt { margin-top: 80px; }
.ehc-fm-schritt__kopf {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	gap: 12px 56px;
	align-items: end;
	margin-bottom: 26px;
}
#page-container .ehc-fm .ehc-fm-schritt__titel {
	font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500;
	font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.01em;
}
#page-container .ehc-fm .ehc-fm-schritt__text { font-size: 1.15rem; color: var(--gh-grau); }

/* Rahmen um jede nachgebaute Ansicht */
.ehc-fm-rahmen { background: #fff; border-radius: var(--gh-radius); box-shadow: var(--fm-schatten); overflow: hidden; }
#page-container .ehc-fm .ehc-fm-rahmen__name {
	background: var(--gh-grund-hell); padding: 10px 24px; font-size: 1rem; font-weight: 700; color: var(--gh-grau);
}

/* ── Produktseite ──────────────────────────────────────────────── */
.ehc-fm-produkt { padding: 32px 36px 36px; }
.ehc-fm-produkt__oben { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.ehc-fm-produkt__bild img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
#page-container .ehc-fm .ehc-fm-produkt__titel {
	font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500;
	font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1.1; color: var(--gh-titel);
}
#page-container .ehc-fm .ehc-fm-produkt__preis { margin-top: 12px; font-size: 1.45rem; font-weight: 700; }
#page-container .ehc-fm .ehc-fm-produkt__kurz { margin-top: 10px; color: var(--gh-grau); }
.ehc-fm-form { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--gh-linie); }
.ehc-fm-varianten__name { display: block; font-weight: 700; margin-bottom: 8px; }
.ehc-fm-varianten__wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
#page-container .ehc-fm select {
	-webkit-appearance: none; appearance: none;
	min-width: 0; width: min(100%, 360px); height: 54px; padding: 0 48px 0 16px;
	border: 2px solid var(--fm-rand); border-radius: 10px; background-color: #fff; color: var(--gh-text);
	font-size: 1.1rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%23820000' stroke-width='2.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center;
	cursor: pointer;
}
#page-container .ehc-fm select:focus-visible,
#page-container .ehc-fm input:focus-visible { outline: 3px solid var(--gh-akzent); outline-offset: 2px; }
.ehc-fm-zuruecksetzen,
.ehc-fm-textknopf {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0; border: 0; background: none;
	color: var(--gh-akzent); font-size: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ehc-fm-zuruecksetzen:hover,
.ehc-fm-textknopf:hover { color: var(--gh-akzent-dunkel); }
.ehc-fm-variante { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
#page-container .ehc-fm .ehc-fm-variante .price { font-size: 1.6rem; font-weight: 700; }
#page-container .ehc-fm .ehc-fm-variante .stock { font-weight: 600; color: var(--gh-text); }

/* "Choose Seats (n)" von Seating, hier als deutlicher Umrissknopf */
.ehc-fm-platzlink { margin-top: 18px; }
.ehc-fm-platzlink__knopf {
	display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 26px;
	border: 2px solid var(--gh-akzent); border-radius: 999px; background: #fff;
	color: var(--gh-akzent); font-size: 1.1rem; font-weight: 700; cursor: pointer;
	transition: background-color .15s ease;
}
.ehc-fm-platzlink__knopf:hover { background: var(--gh-grund-hell); }
.ehc-fm-platzlink__knopf:active { transform: scale(.97); }
.ehc-fm-platzlink__knopf:focus-visible { outline: 3px solid var(--gh-akzent); outline-offset: 3px; }

.ehc-fm-kaufen { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 20px; }
#page-container .ehc-fm .ehc-fm-menge { display: flex; flex: none; align-items: center; gap: 8px; width: auto; max-width: none; margin: 0; float: none; }
.ehc-fm-menge label {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
#page-container .ehc-fm .ehc-fm-menge input {
	flex: none; box-sizing: border-box; min-height: 0;
	width: 68px; height: 54px; padding: 0; text-align: center; font-size: 1.2rem; font-weight: 700;
	border: 2px solid var(--fm-rand); border-radius: 10px; background: #fff; color: var(--gh-text);
	-moz-appearance: textfield;
}
#page-container .ehc-fm .ehc-fm-menge input::-webkit-inner-spin-button,
#page-container .ehc-fm .ehc-fm-menge input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#page-container .ehc-fm .ehc-fm-menge--platz input { background: var(--gh-grund-hell); border-color: var(--gh-linie); }
#page-container .ehc-fm .ehc-fm-menge__knopf {
	flex: none; box-sizing: border-box; min-width: 54px; padding: 0; margin: 0;
	width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--gh-akzent); background: #fff;
	color: var(--gh-akzent); font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer;
}
#page-container .ehc-fm .ehc-fm-menge__knopf:hover { background: var(--gh-akzent); color: #fff; }
.ehc-fm-menge__knopf:focus-visible { outline: 3px solid var(--gh-akzent); outline-offset: 3px; }
/* Der Knopf selbst kommt aus kartenweg.css und knoepfe.css (Vorhang) */
html body #page-container .ehc-fm .ehc-fm-einlegen { width: auto; flex: 1 1 240px; margin: 0 !important; }
html body #page-container .ehc-fm .ehc-fm-einlegen[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* WooCommerce-Meldung nach dem Einlegen */
.ehc-fm-notiz:empty { display: none; }
#page-container .ehc-fm .ehc-fm-notiz__text {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
	margin: 0 0 24px; padding: 16px 20px; border: 0; border-radius: 12px;
	background: var(--gh-grund-hell); color: var(--gh-text); font-size: 1.05rem;
}
#page-container .ehc-fm .ehc-fm-notiz__text::before { content: none; display: none; }
#page-container .ehc-fm .ehc-fm-notiz__text p { flex: 1 1 320px; }
#page-container .ehc-fm .ehc-fm-zurkasse { float: none; min-height: 48px; display: inline-flex; align-items: center; }

/* Reiter: Veranstaltungsdetails (FooEvents) und Beschreibung */
.ehc-fm-reiter { margin-top: 36px; }
.ehc-fm-reiter__leiste { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--gh-linie); }
.ehc-fm-reiter__knopf {
	min-height: 52px; padding: 0 20px; margin-bottom: -2px; border: 0; border-bottom: 3px solid transparent; background: none;
	color: var(--gh-grau); font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.ehc-fm-reiter__knopf[aria-selected="true"] { color: var(--gh-akzent); border-bottom-color: var(--gh-akzent); }
.ehc-fm-reiter__knopf:hover { color: var(--gh-akzent); }
.ehc-fm-reiter__knopf:focus-visible { outline: 3px solid var(--gh-akzent); outline-offset: -3px; }
.ehc-fm-reiter__inhalt { padding-top: 22px; }
.ehc-fm-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; margin: 0; }
.ehc-fm-details div { min-width: 0; }
.ehc-fm-details dt { font-weight: 700; }
.ehc-fm-details dd { margin: 0; color: var(--gh-grau); }

/* ── Kasse ─────────────────────────────────────────────────────── */
.ehc-fm-kasse { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 44px; padding: 32px 36px 36px; align-items: start; }
#page-container .ehc-fm .ehc-fm-kasse__titel { font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500; font-size: 1.9rem; line-height: 1.1; margin-bottom: 18px; }
.ehc-fm-felder--zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.ehc-fm-felder--drei { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 14px; }
#page-container .ehc-fm .ehc-fm-feld { margin-bottom: 16px; }
.ehc-fm-feld label { display: block; font-weight: 700; margin-bottom: 6px; }
.ehc-fm-feld abbr { color: var(--gh-akzent); text-decoration: none; border: 0; }
#page-container .ehc-fm .ehc-fm-feld input {
	box-sizing: border-box; width: 100%; height: 52px; padding: 0 14px;
	border: 2px solid var(--fm-rand); border-radius: 10px; background: #fff; color: var(--gh-text); font-size: 1.05rem;
}
.ehc-fm-feld small { display: block; margin-top: 6px; font-size: 1rem; color: var(--gh-grau); }
#page-container .ehc-fm .ehc-fm-gaeste__stueck { margin: 30px 0 4px; font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500; font-size: 1.5rem; line-height: 1.15; }
.ehc-fm-gast { margin: 14px 0 0; padding: 20px 22px 6px; border: 0; border-radius: 12px; background: var(--gh-grund-hell); min-width: 0; }
.ehc-fm-gast legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-size: 1.15rem; font-weight: 700; }
.ehc-fm-gast > * { clear: both; }
#page-container .ehc-fm .ehc-fm-gast__platz { margin-bottom: 12px; }
#page-container .ehc-fm .ehc-fm-gast__kopie { margin: -6px 0 6px; }

.ehc-fm-kasse__rechts { position: sticky; top: 110px; background: var(--gh-grund-hell); border-radius: 12px; padding: 24px 24px 26px; }
#page-container .ehc-fm table.ehc-fm-tabelle { width: 100%; margin: 0 0 20px; border-collapse: collapse; table-layout: auto; }
#page-container .ehc-fm .ehc-fm-tabelle th,
#page-container .ehc-fm .ehc-fm-tabelle td {
	padding: 12px 0; border: 0; border-bottom: 1px solid var(--gh-linie); background: transparent;
	color: var(--gh-text); font-weight: 400; text-align: left; vertical-align: top; width: auto;
}
#page-container .ehc-fm table.ehc-fm-tabelle td:first-child { width: auto; font-weight: 400; color: var(--gh-text); }
#page-container .ehc-fm .ehc-fm-tabelle thead th { font-weight: 700; font-size: 1rem; color: var(--gh-grau); }
#page-container .ehc-fm .ehc-fm-tabelle :is(th, td):last-child { text-align: right; white-space: nowrap; padding-left: 16px; }
#page-container .ehc-fm .ehc-fm-tabelle tfoot th { font-weight: 700; }
#page-container .ehc-fm .ehc-fm-tabelle tfoot td strong { font-size: 1.3rem; }
.ehc-fm-tabelle__name { display: block; }
.ehc-fm-tabelle small { display: block; font-size: .95rem; color: var(--gh-grau); margin-top: 2px; }
#page-container .ehc-fm .ehc-fm-bsp { margin: -8px 0 20px; font-size: 1rem; font-weight: 600; color: var(--gh-akzent); }
.ehc-fm-zahlung { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.ehc-fm-zahlung legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.ehc-fm-zahlung label {
	display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; margin-bottom: 8px;
	border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer;
}
.ehc-fm-zahlung input { width: 22px; height: 22px; accent-color: var(--gh-akzent); margin: 0; }
html body #page-container .ehc-fm .ehc-fm-bestellen { width: 100%; }

/* ── Karte in der E-Mail ───────────────────────────────────────── */
.ehc-fm-zwei { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 44px; align-items: start; }
.ehc-fm-zwei--app { grid-template-columns: 340px minmax(0, 1fr); }
#page-container .ehc-fm .ehc-fm-text h3 + .ehc-fm-liste + .ehc-fm-anm + h3 { margin-top: 34px; }
#page-container .ehc-fm .ehc-fm-text h3 { font-family: var(--gh-schrift-titel); font-style: italic; font-weight: 500; font-size: 1.8rem; line-height: 1.1; margin-bottom: 16px; }

.ehc-fm-mail { background: #fff; border-radius: var(--gh-radius); box-shadow: var(--fm-schatten); overflow: hidden; }
#page-container .ehc-fm .ehc-fm-mail__betreff { background: var(--gh-grund-hell); padding: 12px 24px; font-size: 1rem; font-weight: 600; }
.ehc-fm-mail__betreff span { color: var(--gh-grau); font-weight: 400; }
.ehc-fm-mail__inhalt { padding: 26px 28px 28px; }
.ehc-fm-mail__logo { display: block; width: 150px; margin-bottom: 16px; }
.ehc-fm-mail__kopf { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 8px; }
#page-container .ehc-fm .ehc-fm-mail__text { margin: 18px 0 20px; }
#page-container .ehc-fm .ehc-fm-mail__fuss { margin-top: 20px; font-size: 1rem; color: var(--gh-grau); }
.ehc-fm-karte { display: grid; grid-template-columns: 170px minmax(0, 1fr); border: 1px solid #d9d0c3; border-radius: 4px; margin-top: 16px; }
.ehc-fm-karte__code { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 12px; border-right: 1px dashed #c9bfb1; font-size: .95rem; }
.ehc-fm-qr { display: block; width: 120px; height: 120px; }
.ehc-fm-qr rect { fill: var(--gh-nacht); }
.ehc-fm-qr rect.w { fill: #fff; }
.ehc-fm-karte__daten { padding: 16px 22px 18px; min-width: 0; }
#page-container .ehc-fm .ehc-fm-karte__titel { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
#page-container .ehc-fm .ehc-fm-karte__kal span { color: var(--gh-akzent); text-decoration: underline; text-underline-offset: 3px; }
.ehc-fm-karte dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 18px; margin: 12px 0 0; }
.ehc-fm-karte dl div { display: contents; }
.ehc-fm-karte dt { color: var(--gh-grau); }
.ehc-fm-karte dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ehc-fm-leer { color: var(--gh-grau); font-weight: 400; font-style: italic; }

/* ── Einlass-App (nachgezeichnet) ──────────────────────────────── */
.ehc-fm-app {
	width: 100%; max-width: 340px; box-sizing: border-box; min-height: 470px;
	border: 10px solid var(--gh-nacht); border-radius: 36px; background: #f6f3ee; overflow: hidden;
	box-shadow: var(--fm-schatten);
}
.ehc-fm-app__leiste { background: var(--gh-akzent); color: #fff; padding: 20px 20px 16px; }
.ehc-fm-app__leiste span { display: block; font-size: 1.2rem; font-weight: 700; }
.ehc-fm-app__leiste small { display: block; font-size: 1rem; color: #f3dede; }
.ehc-fm-app__suche { margin: 14px; padding: 12px 14px; border-radius: 10px; background: #fff; color: var(--gh-grau); font-size: 1rem; }
#page-container .ehc-fm .ehc-fm-app__liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--gh-linie); background: #fff; }
.ehc-fm-app__liste b { display: block; font-size: 1.05rem; }
.ehc-fm-app__liste small { display: block; font-size: .92rem; color: var(--gh-grau); }
.ehc-fm-app__liste em { flex: none; font-style: normal; font-size: .85rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #e9e2d6; color: var(--gh-text); }
.ehc-fm-app__liste em.ist-drin { background: #2e6b3c; color: #fff; }
.ehc-fm-app__scan { margin: 22px 16px 18px; padding: 16px; border-radius: 12px; background: var(--gh-nacht); color: #fff; text-align: center; font-weight: 700; }

/* ── Sitzplan-Dialog (Seating) ─────────────────────────────────── */
html.ehc-fm-offen { overflow: hidden; }
.ehc-fm-dialog { position: fixed; inset: 0; z-index: 1000000; }
.ehc-fm-dialog__grund { position: absolute; inset: 0; background: rgba(22, 19, 28, .62); }
.ehc-fm-dialog__fenster {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	box-sizing: border-box; width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	display: flex; flex-direction: column;
	background: #fff; border-radius: var(--gh-radius); overflow: hidden;
	box-shadow: 0 30px 80px -20px rgba(130, 0, 0, .45);
}
.ehc-fm-dialog__leiste { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 24px; border-bottom: 1px solid var(--gh-linie); }
#page-container .ehc-fm .ehc-fm-dialog__titel { font-size: 1.3rem; font-weight: 700; font-family: var(--gh-schrift-text); }
.ehc-fm-dialog__zu {
	width: 52px; height: 52px; border: 0; border-radius: 50%; background: none; color: var(--gh-text);
	font-size: 2rem; line-height: 1; cursor: pointer;
}
.ehc-fm-dialog__zu:hover { background: var(--gh-grund-hell); }
.ehc-fm-dialog__zu:focus-visible { outline: 3px solid var(--gh-akzent); outline-offset: -3px; }
.ehc-fm-dialog__inhalt { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 20px 24px 8px; }
.ehc-fm-dialog__fuss { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 24px 16px; border-top: 1px solid var(--gh-linie); }
html body #page-container .ehc-fm .ehc-fm-uebernehmen { width: auto; flex: none; }
#page-container .ehc-fm .ehc-fm-dialog__stand { flex: 1 1 260px; font-size: 1rem; color: var(--gh-grau); }

#page-container .ehc-fm .ehc-fm-legende {
	display: inline-flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 16px;
	border: 1px solid var(--gh-linie); border-radius: 8px; font-size: 1rem;
}
#page-container .ehc-fm .ehc-fm-legende li { display: flex; align-items: center; gap: 8px; }
.ehc-fm-legende__farbe { width: 16px; height: 16px; background: var(--fm-frei); }
.ehc-fm-legende__farbe.ist-belegt { background: var(--fm-belegt); }
.ehc-fm-legende__farbe.ist-gesperrt { background: linear-gradient(135deg, transparent 44%, #a3160f 44% 56%, transparent 56%), var(--fm-gesperrt); }
.ehc-fm-legende__farbe.ist-gewaehlt { background: var(--gh-akzent); }

#page-container .ehc-fm .ehc-fm-buehne {
	margin: 18px 0 26px; padding: 8px; background: var(--gh-grund-hell);
	text-align: center; font-size: .95rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gh-grau);
}
.ehc-fm-reihe { margin-bottom: 12px; }
#page-container .ehc-fm .ehc-fm-reihe__name { font-size: 1rem; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.ehc-fm-reihe__plaetze { display: flex; flex-wrap: wrap; gap: var(--fm-luecke); }

/* Ein Platz: Farbe als Flaeche, darueber ein weisser Ausschnitt in
   Stuhlform (eigene Zeichnung), die Nummer sitzt auf dem Stuhl. */
.ehc-fm-sitz {
	flex: none; box-sizing: border-box; width: var(--fm-sitz); height: var(--fm-sitz); padding: 0 0 3px; margin: 0;
	display: inline-grid; place-items: center;
	border: 0; border-radius: 0; background-color: var(--fm-frei); color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M0 0H24V24H0Z M7 2H17Q19 2 19 4V8H21Q22 8 22 9V17Q22 18 21 18H19V22H16V18H8V22H5V18H3Q2 18 2 17V9Q2 8 3 8H5V4Q5 2 7 2Z'/%3E%3C/svg%3E");
	background-size: 100% 100%;
	font-size: .8rem; font-weight: 700; line-height: 1; cursor: pointer;
	transition: background-color .12s ease;
}
.ehc-fm-sitz.ist-gang { margin-right: 30px; }
.ehc-fm-sitz:hover { background-color: var(--fm-frei-hover); }
.ehc-fm-sitz.ist-gewaehlt { background-color: var(--gh-akzent); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gh-akzent); }
.ehc-fm-sitz.ist-belegt { background-color: var(--fm-belegt); color: var(--fm-belegt-text); cursor: not-allowed; }
.ehc-fm-sitz:focus-visible { outline: 3px solid var(--gh-nacht); outline-offset: 3px; position: relative; z-index: 1; }
.ehc-fm-sitz:active:not(.ist-belegt) { transform: scale(.94); }

/* ── Media-Queries: hinter den Grundregeln ─────────────────────── */
@media (max-width: 980px) {
	.ehc-fm-kann,
	.ehc-fm-schritt__kopf,
	.ehc-fm-produkt__oben,
	.ehc-fm-kasse,
	.ehc-fm-zwei { grid-template-columns: minmax(0, 1fr); }
	.ehc-fm-kasse__rechts { position: static; }
	.ehc-fm-felder--drei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.ehc-fm-felder--drei .ehc-fm-feld--mail { grid-column: 1 / -1; }
	.ehc-fm-zwei--app { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
	.ehc-fm-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.ehc-fm-zwei--app { grid-template-columns: minmax(0, 1fr); }
	.ehc-fm-app { margin: 0 auto; }
	/* FooEvents bricht lange Reihen auf dem Handy um. Hier liegt der
	   Umbruch an der Treppe: zwei Zeilen mit je 11 Plaetzen. */
	.ehc-fm-reihe__plaetze { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
	.ehc-fm-sitz { width: 100%; height: auto; aspect-ratio: 1; font-size: .72rem; }
	.ehc-fm-sitz.ist-gang { margin-right: 0; }
	.ehc-fm-reihe__plaetze .ehc-fm-sitz:nth-child(n + 12) { margin-top: 2px; }
	.ehc-fm-dialog__fenster { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
	.ehc-fm-dialog__inhalt { padding: 16px 14px 8px; }
	.ehc-fm-dialog__fuss { padding: 12px 14px 14px; }
}
@media (max-width: 600px) {
	.ehc-fm { font-size: 17px; }
	.ehc-fm-hinweis { padding: 26px 22px 24px; }
	.ehc-fm-kann__spalte { padding: 22px 20px; }
	.ehc-fm-schritt { margin-top: 60px; }
	.ehc-fm-produkt,
	.ehc-fm-kasse { padding: 22px 18px 24px; }
	.ehc-fm-kasse__rechts { padding: 20px 16px; }
	.ehc-fm-felder--zwei,
	.ehc-fm-felder--drei { grid-template-columns: minmax(0, 1fr); }
	.ehc-fm-details { grid-template-columns: minmax(0, 1fr); }
	.ehc-fm-mail__inhalt { padding: 20px 16px 22px; }
	.ehc-fm-karte { grid-template-columns: minmax(0, 1fr); }
	.ehc-fm-karte__code { border-right: 0; border-bottom: 1px dashed #c9bfb1; }
	.ehc-fm-gast { padding: 18px 16px 4px; }
	html body #page-container .ehc-fm .ehc-fm-einlegen { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.ehc-fm-sitz,
	.ehc-fm-platzlink__knopf { transition: none; }
	.ehc-fm-sitz:active:not(.ist-belegt),
	.ehc-fm-platzlink__knopf:active { transform: none; }
}

/* Kartenarten nie mitten im Wort trennen (Pruefrunde 5) */
.ehc-fm-tabelle__name, .ehc-fm-tabelle dd, .ehc-fm-tabelle dt{ overflow-wrap:normal; word-wrap:normal; word-break:normal; hyphens:manual; }
@media (max-width: 400px){ .ehc-fm-tabelle__name, .ehc-fm-tabelle dd{ font-size:.95rem; } }
