/* =========================================================================
   Das Palais – Grundriss als Nachtplan (Block cvball/palais, 2.2.0)

   Heller Abschnitt wie die Einleitung; der Grundriss selbst liegt als dunkle
   Tafel in Nacht und Gold darauf – dieselbe Sprache wie Hero, Ballnacht und
   Tanzkarte. Rechts der Index der Säle als ruhige Hairline-Liste, darunter
   die Kulinarik. Das Markup (render.php, view.js) ist unverändert.
   ========================================================================= */
.cvball-palais {
	--pl-hell: var(--elfenbein, #FAF6EE);
	--pl-nacht: var(--dunkel, #2A1120);
	--pl-tief: #1B0A10;
	--pl-gold: #C9A24A;
	--pl-gold-hell: #E3C777;
	--pl-gold-dunkel: var(--gold-dunkel, #8A6A1F);
	--pl-champagner: #F1E4BF;
	--pl-bordeaux: #7A1B2F;
	--pl-samt: #B5243F;
	--pl-tinte: #2A1F22;
	--pl-anthrazit: #4C4B4D;
	--pl-bodoni: var(--wp--preset--font-family--bodoni, "Bodoni Moda", Didot, serif);
	--pl-sans: var(--wp--preset--font-family--source-sans, "Source Sans 3", sans-serif);
	--pl-kurve: cubic-bezier(0.22, 1, 0.36, 1);
	background: var(--pl-hell);
	color: var(--pl-tinte);
	padding-top: clamp(4.5rem, 10vw, 9rem);
	padding-bottom: clamp(4.5rem, 10vw, 9rem);
	position: relative;
	overflow: hidden;
}

/* Sanfter Goldschimmer rechts oben, wie Kerzenlicht auf Papier */
.cvball-palais::before {
	content: "";
	position: absolute;
	inset: -25% -10% auto auto;
	width: 55%;
	height: 70%;
	background: radial-gradient(closest-side, rgba(201, 162, 74, 0.16), transparent);
	pointer-events: none;
}

.cvball-palais__innen {
	position: relative;
	max-width: var(--wp--style--global--wide-size, 100rem);
	margin-inline: auto;
	padding-inline: var(--rand, clamp(1.25rem, 4vw, 3.5rem));
}

.cvball-palais .cvball-abschnitt__kopf p:not(.cvball-kicker) { color: var(--pl-anthrazit); }

.cvball-palais__raster {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(18rem, 4fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: start;
	isolation: isolate; /* Stapelkontext: der Versatzrahmen der Tafel liegt hinter ihr, aber über dem Abschnitt */
}

.cvball-palais__links {
	display: grid;
	gap: clamp(2.5rem, 4vw, 3.5rem);
	align-content: start;
	min-width: 0;
}

/* -------------------------------------------------------------------------
   Die Tafel: Grundriss auf Nacht
   ------------------------------------------------------------------------- */
.cvball-palais__plan {
	position: relative;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	color: var(--pl-champagner);
	background:
		radial-gradient(70rem 32rem at 12% -20%, rgba(201, 162, 74, 0.2), transparent 60%),
		radial-gradient(40rem 26rem at 100% 110%, rgba(122, 27, 47, 0.5), transparent 70%),
		linear-gradient(160deg, #35142A 0%, var(--pl-nacht) 50%, var(--pl-tief) 100%);
	border: 1px solid rgba(201, 162, 74, 0.4);
	box-shadow: 0 30px 80px -30px rgba(27, 10, 16, 0.55);
}

/* Goldener Versatzrahmen – dasselbe Motiv wie beim Bild der Einleitung */
.cvball-palais__plan::after {
	content: "";
	position: absolute;
	inset: 1.25rem -1.25rem -1.25rem 1.25rem;
	border: 1px solid var(--pl-gold);
	z-index: -1;
	pointer-events: none;
}

.cvball-palais__plan svg {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
}

/* Mauern als Goldbänder (Linienstärke und Deckkraft je Pfad aus der SVG-Datei, Farbe vom Theme),
   Stiege in Champagner, Pfeil behält sein Gold aus der Datei. */
.cvball-palais__plan .cvball-palais__gebaeude {
	fill: none;
	stroke: var(--pl-gold-hell);
	stroke-linejoin: round;
	stroke-linecap: round;
}
.cvball-palais__plan .cvball-palais__stiege {
	fill: none;
	stroke: var(--pl-champagner);
}
.cvball-palais__plan #symbole { color: var(--pl-gold-hell); }
.cvball-palais__plan .cvball-palais__hinweis {
	font-family: var(--pl-bodoni);
	font-style: italic;
	font-size: 22px;
	fill: rgba(241, 228, 191, 0.6);
	stroke: none;
	pointer-events: none;
}
.cvball-palais__plan .cvball-palais__strasse {
	font-family: var(--pl-sans);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	fill: rgba(241, 228, 191, 0.4);
	pointer-events: none;
}

/* Säle: transparente Flächen (die Kanten zeichnen die Mauern); gewählter Saal leuchtet in Samt */
.cvball-palais__raum { outline: none; cursor: pointer; }
.cvball-palais__raum > :is(path, circle, rect, polygon, ellipse, g) {
	fill: rgba(241, 228, 191, 0.07);
	stroke: rgba(201, 162, 74, 0.35);
	stroke-width: 1.5;
	stroke-linejoin: round;
	transition: fill 0.35s ease, stroke 0.35s ease, filter 0.35s ease;
}
.cvball-palais__raum.ist-hover > :is(path, circle, rect, polygon, ellipse, g),
.cvball-palais__raum:focus-visible > :is(path, circle, rect, polygon, ellipse, g) {
	fill: rgba(201, 162, 74, 0.26);
	stroke: var(--pl-gold-hell);
}
.cvball-palais__raum:focus-visible > :is(path, circle, rect, polygon, ellipse, g) { stroke: #fff; stroke-width: 2.5; }
.cvball-palais__raum.ist-aktiv > :is(path, circle, rect, polygon, ellipse, g) {
	fill: var(--pl-samt);
	stroke: var(--pl-gold-hell);
	stroke-width: 2;
	filter: drop-shadow(0 0 22px rgba(181, 36, 63, 0.55));
}

/* Galerien (1. Stock) liegen gestrichelt und schraffiert über Festsaal und Bildersaal */
.cvball-palais__raum.ist-schraffiert > :is(path, rect, polygon, g) {
	fill: url(#cvball-schraffur);
	fill-opacity: 0.45;
	stroke-dasharray: 6 5;
}
.cvball-palais__raum.ist-schraffiert.ist-hover > :is(path, rect, polygon, g) { fill: rgba(201, 162, 74, 0.26); fill-opacity: 1; }
.cvball-palais__raum.ist-schraffiert.ist-aktiv > :is(path, rect, polygon, g) { fill: var(--pl-samt); fill-opacity: 1; }

/* Saalnamen: Bodoni in Champagner mit dunklem Halo, damit sie auf jeder Fläche lesbar bleiben */
.cvball-palais__label {
	font-family: var(--pl-bodoni);
	font-weight: 500;
	font-size: 32px;
	letter-spacing: 0.01em;
	fill: var(--pl-champagner);
	text-anchor: middle;
	pointer-events: none;
	paint-order: stroke;
	stroke: rgba(27, 10, 16, 0.75);
	stroke-width: 6px;
	stroke-linejoin: round;
	transition: fill 0.35s ease, stroke 0.35s ease;
}
.cvball-palais__label.ist-klein { font-size: 21px; }
/* Schmale Räume im Flügel an der Landstraße: kleinere, entlang des Raums gedrehte Namen (Drehung kommt aus der SVG-Hilfslinie) */
.cvball-palais__raum:is([data-raum="gelber-saal"], [data-raum="blauer-saal"]) .cvball-palais__label { font-size: 27px; }
.cvball-palais__raum.ist-aktiv .cvball-palais__label { fill: #FFF7E6; stroke: rgba(122, 27, 47, 0.8); }

/* Genussstationen: goldene Punkte an den tatsächlichen Positionen, Name bei Berührung, Fokus oder Antippen */
.cvball-palais__station { outline: none; cursor: default; }
.cvball-palais__station-ring {
	fill: rgba(27, 10, 16, 0.55);
	stroke: var(--pl-gold);
	stroke-width: 1.25;
	transition: r 0.2s, stroke 0.2s;
}
.cvball-palais__station-punkt { fill: var(--pl-gold-hell); stroke: none; transition: r 0.2s; }
.cvball-palais__station:hover .cvball-palais__station-ring,
.cvball-palais__station:focus-visible .cvball-palais__station-ring,
.cvball-palais__station.ist-offen .cvball-palais__station-ring { r: 17; stroke: var(--pl-gold-hell); }
.cvball-palais__station:hover .cvball-palais__station-punkt,
.cvball-palais__station:focus-visible .cvball-palais__station-punkt,
.cvball-palais__station.ist-offen .cvball-palais__station-punkt { r: 8.5; }
.cvball-palais__plan .cvball-palais__station-text {
	font-family: var(--pl-sans);
	font-weight: 600;
	font-size: 24px;
	fill: var(--pl-champagner);
	paint-order: stroke;
	stroke: rgba(27, 10, 16, 0.85);
	stroke-width: 10px;
	stroke-linejoin: round;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}
.cvball-palais__station:hover .cvball-palais__station-text,
.cvball-palais__station:focus-visible .cvball-palais__station-text,
.cvball-palais__station.ist-offen .cvball-palais__station-text { opacity: 1; }

/* Legende unter dem Plan, noch auf der Tafel */
.cvball-palais__legende {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid rgba(201, 162, 74, 0.28);
	font-size: 0.85rem;
	line-height: 1.6;
	color: rgba(241, 228, 191, 0.72);
}
.cvball-palais__legende-punkt {
	display: inline-block;
	width: 0.55rem;
	height: 0.55rem;
	margin-right: 0.5rem;
	border-radius: 50%;
	background: var(--pl-gold-hell);
	box-shadow: 0 0 0 2px rgba(27, 10, 16, 0.8), 0 0 0 3px var(--pl-gold);
	vertical-align: 0.05em;
}

.cvball-palais__fehler { padding: 1rem; border: 1px dashed var(--pl-gold); color: var(--pl-champagner); }

/* -------------------------------------------------------------------------
   Index der Säle: Hairline-Liste, gewählter Saal mit Bordeaux-Kante
   ------------------------------------------------------------------------- */
.cvball-palais__liste {
	display: block;
	border-top: 1px solid rgba(201, 162, 74, 0.6);
	min-width: 0;
}

.cvball-palais__eintrag {
	border-bottom: 1px solid rgba(201, 162, 74, 0.3);
	background: transparent;
	transition: background 0.3s, box-shadow 0.3s;
}

.cvball-palais__karte {
	all: unset;
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 1rem 0.75rem 1rem 1rem;
	cursor: pointer;
	color: inherit;
}
.cvball-palais__karte:focus-visible { outline: 2px solid var(--pl-gold); outline-offset: -2px; }

.cvball-palais__name {
	display: block;
	font-family: var(--pl-bodoni);
	font-weight: 500;
	font-size: clamp(1.35rem, 1.6vw, 1.65rem);
	line-height: 1.1;
	color: var(--pl-tinte);
	transition: color 0.3s;
}
.cvball-palais__unter {
	display: block;
	margin-top: 0.25rem;
	font-family: var(--pl-bodoni);
	font-style: italic;
	font-size: 1rem;
	line-height: 1.35;
	color: var(--pl-gold-dunkel);
}

.cvball-palais__eintrag.ist-hover .cvball-palais__name,
.cvball-palais__karte:hover .cvball-palais__name { color: var(--pl-bordeaux); }

.cvball-palais__eintrag.ist-aktiv {
	background: #fff;
	box-shadow: inset 3px 0 0 var(--pl-bordeaux);
}
.cvball-palais__eintrag.ist-aktiv .cvball-palais__name { color: var(--pl-bordeaux); }

.cvball-palais__detail {
	display: none;
	padding: 0 0.75rem 1.1rem 1rem;
	color: var(--pl-anthrazit);
	font-size: 0.98rem;
	line-height: 1.55;
}
.cvball-palais__eintrag.ist-aktiv .cvball-palais__detail {
	display: block;
	animation: cvball-palais-auf 0.4s var(--pl-kurve);
}
.cvball-palais__detail p { margin: 0 0 0.6rem; }
.cvball-palais__detail p:last-child { margin-bottom: 0; }

@keyframes cvball-palais-auf {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Kulinarik: Caterer, Text und Bargeldlos-Hinweis unter der Tafel
   ------------------------------------------------------------------------- */
.cvball-palais__genuss {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
	gap: clamp(1.5rem, 3vw, 3rem);
	align-items: start;
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
	border-top: 1px solid rgba(201, 162, 74, 0.55);
}
.cvball-palais__genuss-logo {
	display: grid;
	place-items: center;
	padding: 1.25rem;
	background: #fff;
	border: 1px solid rgba(201, 162, 74, 0.35);
}
.cvball-palais__genuss-logo img { display: block; width: min(100%, 14rem); height: auto; }
.cvball-palais__genuss-text { max-width: 62ch; min-width: 0; }
.cvball-palais__genuss-text p { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.6; color: var(--pl-anthrazit); }
.cvball-palais__genuss-text .cvball-kicker { margin-bottom: 0.75rem; }

.cvball-cashless {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	border: 1px solid var(--pl-gold);
	background: #fff;
	padding: 0.75rem 1.25rem 0.75rem 0.75rem;
	margin-top: 0.5rem;
}
.cvball-cashless img { width: 5.5rem; height: auto; flex: 0 0 auto; }
.cvball-palais__genuss-text .cvball-cashless p { margin: 0; color: var(--pl-tinte); }

/* -------------------------------------------------------------------------
   Schmale Bildschirme: Tafel, dann Liste, dann Kulinarik
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.cvball-palais__raster,
	.cvball-palais__genuss { grid-template-columns: 1fr; }
	.cvball-palais__links { display: contents; }
	.cvball-palais__plan { order: 1; padding: 1rem; }
	.cvball-palais__plan::after { inset: 0.9rem -0.9rem -0.9rem 0.9rem; }
	.cvball-palais__liste { order: 2; margin-top: 0.5rem; }
	.cvball-palais__genuss { order: 3; margin-top: 1rem; }
	.cvball-palais__genuss-logo img { width: 12rem; }
	.cvball-palais__label { font-size: 44px; stroke-width: 9px; }
	.cvball-palais__label.ist-klein { font-size: 30px; }
	.cvball-palais__raum:is([data-raum="gelber-saal"], [data-raum="blauer-saal"]) .cvball-palais__label { font-size: 34px; }
	.cvball-palais__plan .cvball-palais__strasse,
	.cvball-palais__plan .cvball-palais__hinweis { font-size: 30px; }
	.cvball-palais__station-ring { r: 24; }
	.cvball-palais__station-punkt { r: 12; }
	.cvball-palais__station:hover .cvball-palais__station-ring,
	.cvball-palais__station.ist-offen .cvball-palais__station-ring { r: 28; }
	.cvball-palais__station:hover .cvball-palais__station-punkt,
	.cvball-palais__station.ist-offen .cvball-palais__station-punkt { r: 14; }
	.cvball-palais__plan .cvball-palais__station-text { font-size: 40px; stroke-width: 16px; transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
	.cvball-palais__eintrag.ist-aktiv .cvball-palais__detail { animation: none; }
	.cvball-palais__raum > :is(path, circle, rect, polygon, ellipse, g),
	.cvball-palais__label,
	.cvball-palais__station-ring,
	.cvball-palais__station-punkt,
	.cvball-palais__name,
	.cvball-palais__eintrag { transition: none; }
}
