/*! VERO Sim Engine — Animations + Schadenfilm
 *  Kontextuelle Overlays über der Bühne. Alle Animationen respektieren
 *  prefers-reduced-motion und passen sich dem Dark Mode an.
 */

/* =========================================================
 * FX-Layer (Effekte über der Bühne)
 * ========================================================= */
.vero-fx-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 30;
	border-radius: inherit;
	transition: opacity 0.4s ease;
}
.vero-fx-layer.hidden {
	opacity: 0;
}
.vero-fx-layer.running {
	opacity: 1;
}

/* === Sturm / Regen === */
.fx-rain {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,22,40,0.35) 0%, rgba(10,22,40,0.15) 100%);
}
.fx-rain .drop {
	position: absolute;
	top: -30px;
	width: 2px;
	background: linear-gradient(180deg, rgba(200,225,255,0.85), rgba(200,225,255,0));
	animation: fx-rain-fall linear infinite;
}
@keyframes fx-rain-fall {
	0%   { transform: translateY(-30px); opacity: 0; }
	10%  { opacity: 1; }
	100% { transform: translateY(105vh); opacity: 0; }
}

/* === Hagel === */
.fx-hail {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,22,40,0.25) 0%, rgba(10,22,40,0.1) 100%);
}
.fx-hail .drop {
	position: absolute;
	top: -30px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #ffffff 0%, #c8e0f0 50%, #8bb5d0 100%);
	box-shadow: 0 0 6px rgba(255,255,255,0.6);
	animation: fx-hail-fall linear infinite;
}
@keyframes fx-hail-fall {
	0%   { transform: translateY(-30px) rotate(0deg); opacity: 0; }
	10%  { opacity: 1; }
	100% { transform: translateY(105vh) rotate(180deg); opacity: 0.3; }
}

/* === Hochwasser === */
.fx-water-rise {
	position: absolute;
	inset: auto 0 0 0;
	height: 0;
	background: linear-gradient(180deg, rgba(0,90,160,0.55) 0%, rgba(0,60,130,0.85) 100%);
	animation: fx-water-rise 2.4s ease-out forwards;
}
@keyframes fx-water-rise {
	0% { height: 0; opacity: 0; }
	100% { height: 35%; opacity: 1; }
}

/* === Feuer / Küchenbrand === */
.fx-fire {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 100%, rgba(255,80,0,0.4) 0%, transparent 55%);
}
.fx-flame {
	position: absolute;
	bottom: 22%;
	left: 50%;
	width: 24px;
	height: 48px;
	background: linear-gradient(0deg, #ff4d00 0%, #ffb300 50%, #fff200 100%);
	border-radius: 50% 50% 40% 40% / 65% 65% 30% 30%;
	transform-origin: center bottom;
	filter: blur(1px);
	animation: fx-flame-flicker 0.9s ease-in-out infinite alternate;
	mix-blend-mode: screen;
}
.fx-flame.f1 { left: 45%; animation-delay: 0s; height: 52px; }
.fx-flame.f2 { left: 50%; animation-delay: 0.15s; height: 62px; width: 28px; }
.fx-flame.f3 { left: 55%; animation-delay: 0.3s; height: 48px; }
@keyframes fx-flame-flicker {
	0%   { transform: translateX(-50%) scaleY(0.95) scaleX(0.98); opacity: 0.85; }
	100% { transform: translateX(-50%) scaleY(1.15) scaleX(1.05); opacity: 1; }
}
.fx-smoke {
	position: absolute;
	bottom: 40%;
	left: 48%;
	width: 80px;
	height: 80px;
	background: radial-gradient(circle, rgba(60,60,60,0.6) 0%, rgba(60,60,60,0) 70%);
	border-radius: 50%;
	animation: fx-smoke-rise 2.2s ease-out infinite;
}
@keyframes fx-smoke-rise {
	0%   { transform: translateY(0) scale(0.6); opacity: 0.8; }
	100% { transform: translateY(-60%) scale(1.4); opacity: 0; }
}

/* === Einbrecher-Silhouette (an der User-Haustür) === */
.fx-dark {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 70%, transparent 10%, rgba(5,8,20,0.65) 70%);
}
.fx-dark.soft {
	background: radial-gradient(ellipse at 50% 60%, transparent 20%, rgba(5,8,20,0.45) 80%);
}
.fx-burglar {
	position: absolute;
	bottom: 18%;
	left: calc(50% - 20px);   /* User-Haus steht auf Pos 6 = Mitte */
	width: 40px;
	height: 80px;
	background:
		radial-gradient(circle at 50% 18%, #1a1a2e 28%, transparent 30%),
		linear-gradient(180deg, #1a1a2e 0%, #0a0a14 100%);
	background-size: 100% 100%;
	background-repeat: no-repeat;
	clip-path: polygon(
		30% 0%, 70% 0%, 80% 15%, 85% 40%,
		90% 55%, 85% 100%, 15% 100%, 10% 55%,
		15% 40%, 20% 15%
	);
	opacity: 0;
	animation: fx-burglar-sneak 2.4s ease-in-out forwards;
}
@keyframes fx-burglar-sneak {
	0%   { opacity: 0; transform: translateX(-40px); }
	20%  { opacity: 1; }
	60%  { transform: translateX(6px); }
	100% { opacity: 1; transform: translateX(0); }
}
.fx-beam {
	position: absolute;
	bottom: 32%;
	left: 50%;
	width: 120px;
	height: 14px;
	background: linear-gradient(90deg, rgba(255,220,120,0.8) 0%, rgba(255,220,120,0) 100%);
	transform-origin: left center;
	transform: translateX(-10px) rotate(-12deg);
	filter: blur(3px);
	opacity: 0;
	animation: fx-beam-sweep 2.4s ease-in-out forwards;
}
@keyframes fx-beam-sweep {
	0%   { opacity: 0; transform: translateX(-10px) rotate(-35deg); }
	25%  { opacity: 0.95; }
	50%  { transform: translateX(-10px) rotate(10deg); }
	100% { opacity: 0.2; transform: translateX(-10px) rotate(-5deg); }
}

/* === Wasserschaden (Tropfen) === */
.fx-drip {
	position: absolute;
	top: 28%;
	width: 10px;
	height: 14px;
	background: radial-gradient(circle at 50% 30%, #8dc8f0 0%, #2a7bb8 60%, #1a5a90 100%);
	border-radius: 50% 50% 60% 60% / 45% 45% 80% 80%;
	box-shadow: 0 0 8px rgba(100,170,220,0.6);
	animation: fx-drip-fall 1.6s ease-in infinite;
}
.fx-drip.d1 { left: 42%; animation-delay: 0s; }
.fx-drip.d2 { left: 50%; animation-delay: 0.35s; }
.fx-drip.d3 { left: 58%; animation-delay: 0.7s; }
@keyframes fx-drip-fall {
	0%   { top: 28%; opacity: 0; transform: scaleY(0.5); }
	15%  { opacity: 1; transform: scaleY(1); }
	100% { top: 72%; opacity: 0; transform: scaleY(1.4); }
}
.fx-puddle {
	position: absolute;
	bottom: 18%;
	left: 38%;
	width: 24%;
	height: 14px;
	background: radial-gradient(ellipse, rgba(100,170,220,0.7) 0%, rgba(100,170,220,0.1) 100%);
	border-radius: 50%;
	opacity: 0;
	animation: fx-puddle-grow 2.4s ease-out forwards;
}
@keyframes fx-puddle-grow {
	0%   { opacity: 0; transform: scale(0.2); }
	100% { opacity: 1; transform: scale(1); }
}

/* === Crash / Aufprall === */
.fx-impact {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 120px;
	height: 120px;
	margin: -60px 0 0 -60px;
	background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,200,80,0.6) 40%, transparent 70%);
	border-radius: 50%;
	opacity: 0;
	animation: fx-impact-flash 2s ease-out forwards;
}
@keyframes fx-impact-flash {
	0%   { opacity: 0; transform: scale(0.3); }
	15%  { opacity: 1; transform: scale(1.2); }
	100% { opacity: 0; transform: scale(2.2); }
}
.fx-sparks {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 140px;
	height: 140px;
	margin: -70px 0 0 -70px;
	background:
		radial-gradient(circle 3px at 20% 40%, #ffd93a, transparent),
		radial-gradient(circle 2px at 70% 30%, #ffb039, transparent),
		radial-gradient(circle 3px at 40% 70%, #ff8a1c, transparent),
		radial-gradient(circle 2px at 80% 60%, #ffd93a, transparent),
		radial-gradient(circle 2px at 50% 50%, #ffffff, transparent);
	animation: fx-sparks-fly 1.8s ease-out forwards;
}
@keyframes fx-sparks-fly {
	0%   { transform: scale(0.5); opacity: 1; }
	100% { transform: scale(2.5); opacity: 0; }
}

/* === Ausrufezeichen (Hundebiss etc.) === */
.fx-exclaim, .fx-question, .fx-tooth {
	position: absolute;
	top: 35%;
	left: 50%;
	transform: translate(-50%, 0) scale(0);
	font-family: 'Montserrat', sans-serif;
	font-size: 96px;
	font-weight: 900;
	color: #ef4444;
	text-shadow: 0 4px 24px rgba(239,68,68,0.6);
	animation: fx-symbol-pop 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.fx-question { color: #f59e0b; text-shadow: 0 4px 24px rgba(245,158,11,0.6); }
.fx-tooth    { color: #e8f0fe; text-shadow: 0 4px 24px rgba(0,163,224,0.6); font-size: 72px; }
.fx-lock {
	position: absolute;
	top: 40%;
	left: 50%;
	transform: translate(-50%, 0) scale(0);
	font-size: 72px;
	color: #ef4444;
	text-shadow: 0 4px 24px rgba(239,68,68,0.5);
	animation: fx-symbol-pop 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.fx-gavel {
	position: absolute;
	top: 40%;
	left: 50%;
	transform: translate(-50%, 0) scale(0) rotate(-20deg);
	font-size: 86px;
	color: #f59e0b;
	text-shadow: 0 4px 20px rgba(245,158,11,0.55);
	animation: fx-gavel-strike 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes fx-symbol-pop {
	0%   { transform: translate(-50%, 0) scale(0) rotate(-10deg); opacity: 0; }
	40%  { transform: translate(-50%, 0) scale(1.2) rotate(5deg); opacity: 1; }
	60%  { transform: translate(-50%, 0) scale(1) rotate(-3deg); }
	85%  { opacity: 1; }
	100% { transform: translate(-50%, 0) scale(1) rotate(0); opacity: 0; }
}
@keyframes fx-gavel-strike {
	0%   { transform: translate(-50%, 0) scale(0) rotate(-40deg); opacity: 0; }
	30%  { transform: translate(-50%, 0) scale(1.1) rotate(-10deg); opacity: 1; }
	50%  { transform: translate(-50%, 0) scale(1) rotate(20deg); }
	100% { transform: translate(-50%, 0) scale(1) rotate(0); opacity: 0; }
}

/* === Cyber / Matrix === */
.fx-matrix {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(0,30,0,0.4) 0%, rgba(0,60,0,0.15) 100%),
		repeating-linear-gradient(0deg,
			transparent 0px, transparent 2px,
			rgba(0,255,0,0.03) 2px, rgba(0,255,0,0.03) 3px);
	animation: fx-matrix-flicker 0.15s steps(2) infinite;
}
@keyframes fx-matrix-flicker {
	0%   { opacity: 0.85; }
	50%  { opacity: 1; }
	100% { opacity: 0.9; }
}

/* === Puls (Default / Gesundheit) === */
.fx-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 140px;
	height: 140px;
	margin: -70px 0 0 -70px;
	border: 3px solid rgba(239,68,68,0.8);
	border-radius: 50%;
	animation: fx-pulse-ring 1.8s ease-out infinite;
}
@keyframes fx-pulse-ring {
	0%   { transform: scale(0.3); opacity: 1; }
	100% { transform: scale(2.2); opacity: 0; }
}

/* =========================================================
 * FX-SCENE — konkrete Schaden-Szenen mit sichtbarem Motiv
 * Jede .fx-scene zeigt inline ein SVG mit dem wirklich
 * betroffenen Objekt (nicht nur ein generisches Symbol).
 *
 * Positionierung:
 *  - Default: zentral auf der Bühne (Standalone-/Dev-Trigger)
 *  - Während Schadenfilm (.si-schaden-active): oberes Drittel,
 *    damit die Schadenkarte mittig lesbar bleibt.
 * ========================================================= */
.fx-scene {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(56%, 320px);
	aspect-ratio: 4 / 3;
	transform: translate(-50%, -50%);
	pointer-events: none;
	animation: fx-scene-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)) drop-shadow(0 0 22px rgba(0,163,224,0.18));
}
.fx-scene svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
}
@keyframes fx-scene-in {
	from { opacity: 0; transform: translate(-50%, -46%) scale(0.86); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Während Schadenfilm: Szene über die Bühne, kompakter, damit die
 * Karte mit dem Schadentext (~50% mittig) ungestört lesbar bleibt. */
.si-schaden-active .fx-scene,
.canvas-wrapper.si-schaden-active .fx-scene {
	top: 24%;
	width: min(48%, 260px);
	animation: fx-scene-in-top 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55)) drop-shadow(0 0 26px rgba(239,68,68,0.25));
}
@keyframes fx-scene-in-top {
	from { opacity: 0; transform: translate(-50%, -54%) scale(0.86); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Mobile: noch kompakter und höher, damit die Frageblock-/Karten-
 * Überlagerung den Effekt nicht verdrängt. */
@media (max-width: 720px) {
	.fx-scene {
		width: min(60%, 220px);
	}
	.si-schaden-active .fx-scene,
	.canvas-wrapper.si-schaden-active .fx-scene {
		top: 20%;
		width: min(54%, 200px);
	}
}

/* Sanftes Pulsieren — Standard für fast alle Szenen */
.fx-scene-pulse {
	transform-box: fill-box;
	transform-origin: center;
	animation: fx-scene-pulse 1.6s ease-in-out infinite;
}
@keyframes fx-scene-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50%      { transform: scale(1.08); opacity: 0.92; }
}

/* Horizontale Mini-Vibration — Schock / Aufprall / Geräusch */
.fx-scene-shake {
	transform-box: fill-box;
	transform-origin: center;
	animation: fx-scene-shake 0.45s ease-in-out infinite;
}
@keyframes fx-scene-shake {
	0%, 100% { transform: translateX(0); }
	25%      { transform: translateX(-3px); }
	75%      { transform: translateX(3px); }
}

/* Fallen — Gegenstand kippt/fällt nach unten */
.fx-scene-fall {
	transform-box: fill-box;
	transform-origin: top center;
	animation: fx-scene-fall 2.2s cubic-bezier(0.55, 0, 0.6, 1) infinite;
}
@keyframes fx-scene-fall {
	0%   { transform: translateY(-20px); opacity: 0; }
	20%  { opacity: 1; }
	80%  { transform: translateY(22px); opacity: 1; }
	100% { transform: translateY(22px); opacity: 0; }
}

/* Fliegende Elemente — Insekt, Ball, schleuderndes Objekt */
.fx-scene-fly {
	transform-box: fill-box;
	transform-origin: center;
	animation: fx-scene-fly 1.8s ease-in-out infinite alternate;
}
@keyframes fx-scene-fly {
	from { transform: translate(-8px, 4px) rotate(-4deg); }
	to   { transform: translate(8px, -4px) rotate(4deg); }
}

/* Hammer- / Rechts-Schlag — Rotationsbewegung */
.fx-scene-strike {
	animation: fx-scene-strike 0.9s ease-in-out infinite;
}
@keyframes fx-scene-strike {
	0%, 100% { transform: rotate(-22deg); }
	50%      { transform: rotate(10deg); }
}

/* Blitz / Glühen — kurzes Aufblinken (Gewitter, Funken) */
.fx-scene-flash {
	transform-box: fill-box;
	transform-origin: center;
	animation: fx-scene-flash 1.1s ease-out infinite;
}
@keyframes fx-scene-flash {
	0%, 40%, 100% { opacity: 1; filter: brightness(1); }
	20%           { opacity: 0.9; filter: brightness(1.7); }
	60%           { opacity: 0.6; filter: brightness(0.8); }
}

@media (prefers-reduced-motion: reduce) {
	.fx-scene,
	.fx-scene-pulse,
	.fx-scene-shake,
	.fx-scene-fall,
	.fx-scene-fly,
	.fx-scene-strike,
	.fx-scene-flash {
		animation: none !important;
	}
	.fx-scene { opacity: 1; transform: translate(-50%, -50%); }
}

/* =========================================================
 * SCHADENFILM — 4-Phasen-Karten-Overlay
 * ========================================================= */
.schaden-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: radial-gradient(ellipse at center, rgba(10,22,40,0.55) 0%, rgba(10,22,40,0.85) 100%);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 1700;
	padding: 24px;
}
.schaden-overlay.active {
	display: flex;
}

/* === Inline-Variante: Karten im simInterface, Bühne bleibt sichtbar === */
.schaden-card-slot {
	display: none;
}
.schaden-overlay--inline {
	position: absolute;
	inset: 0;
	/* 2026-04-29: 64 px Reserve unten für Skip-Button, der dort jetzt sitzt */
	padding: 10px 10px 64px;
	/* simInterface hat dunkles Gradient-Background — Inline-Overlay passt sich an */
	background: linear-gradient(180deg, rgba(8,14,28,0.94) 0%, rgba(6,10,20,0.98) 100%);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border-radius: inherit;
	z-index: 20; /* über si-body / si-nav, aber unter globalen Overlays */
	/* 2026-04-19 (Timo-Request #83): overflow hidden → auto, damit lange
	   Schadensfilm-Cards (Wasserschaden) vollständig scrollen können,
	   auch wenn die Card höher als der Frageblock wird. */
	overflow-y: auto;
	align-items: center;
	justify-content: center;
}
.schaden-overlay--inline.active {
	display: flex;
}
.schaden-overlay--inline .schaden-card {
	width: 100%;
	max-width: 100%;
	/* 2026-04-19 (Timo #83): max-height ungekappt — der Overlay-Container
	   scrollt jetzt selbst (overflow-y:auto oben), deshalb darf die Card
	   ihre natürliche Höhe haben und wird nicht mehr innen abgeschnitten. */
	max-height: none;
	padding: 14px 14px 12px;
	border-radius: 14px;
	background: #0f1a2e;
	box-shadow:
		0 10px 24px -10px rgba(0,0,0,0.6),
		0 0 0 2px var(--accent);
	overflow-y: visible;
	display: flex;
	flex-direction: column;
	gap: 8px;
	scroll-behavior: smooth;
}
.schaden-overlay--inline .schaden-card__phase { margin-bottom: 2px; font-size: 10px; letter-spacing: 1.2px; }
.schaden-overlay--inline .schaden-card__title { font-size: 16px; color: #e8f0fe; margin: 0; line-height: 1.25; }
.schaden-overlay--inline .schaden-card__text  { font-size: 13px; color: #d0dae8; margin: 0; line-height: 1.45; }
.schaden-overlay--inline .schaden-card__cost  {
	font-size: 18px;
	padding: 8px 12px;
	margin: 2px 0 2px;
	border-radius: 10px;
	line-height: 1.15;
}
.schaden-overlay--inline .schaden-card__cost span { font-size: 11px; margin-top: 2px; }
.schaden-overlay--inline .schaden-card__cost.neg { background: rgba(239,68,68,0.18); color: #fecaca; }
.schaden-overlay--inline .schaden-card__cost.pos { background: rgba(16,185,129,0.18); color: #a7f3d0; }
.schaden-overlay--inline .schaden-card__next  {
	width: 100%;
	justify-content: center;
	padding: 10px;
	font-size: 13px;
	margin-top: 2px;
}
/* === Skip-All-Button im Schadenfilm-Overlay ===
   2026-04-29 (Timo-Folge): Position auf UNTEN verschoben, analog zum
   .si-skip-inline der normalen Fragen. Sitzt zwischen den Karten und
   dem unteren Rand des Sheets. Konsistente UX = User weiß, wo der
   Skip-Pfad immer ist. */
.schaden-overlay__skip-all {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 30;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 16px;
	min-height: 36px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.18);
	background: rgba(10,18,34,0.78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: rgba(255,255,255,0.78);
	font: 600 13px Montserrat, Arial, sans-serif;
	cursor: pointer;
	transition: all 0.2s;
}
.schaden-overlay__skip-all::after {
	/* 2026-04-29 (Timo): Nur "Überspringen" + Umlaut als echtes UTF-8-Zeichen
	   (vorher \00fcb wurde vom Browser als ein Codepoint zusammengezogen). */
	content: 'Überspringen';
}
.schaden-overlay__skip-all:hover,
.schaden-overlay__skip-all:focus-visible {
	color: #fff;
	border-color: rgba(0,163,224,0.6);
	background: rgba(0,85,164,0.55);
	outline: none;
}
.schaden-overlay__skip-all svg {
	width: 16px;
	height: 16px;
}
/* === "Nochmal ansehen"-Button auf der Folgefrage === */
.schaden-replay-hint {
	display: flex;
	justify-content: center;
	margin: 4px 0 10px;
}
.schaden-replay-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 20px;
	border: 1.5px solid rgba(0,163,224,0.35);
	background: rgba(0,85,164,0.08);
	color: rgba(0,163,224,0.95);
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	letter-spacing: 0.3px;
}
.schaden-replay-btn:hover {
	background: rgba(0,163,224,0.18);
	border-color: rgba(0,163,224,0.7);
	color: #fff;
	transform: translateY(-1px);
}
.schaden-replay-btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
	.schaden-replay-btn:hover { transform: none; }
}
/* 2026-04-19 (Timo-Request #83): Card-Cap +25 px größer, damit längere
   Schadensfilme (z. B. Wasserschaden) nicht mehr beschnitten werden.
   • width-Cap 520 → 545 px
   • max-height 90vh → calc(90vh + 25px)
   • padding leicht erhöht (30 statt 28 oben) für mehr Atmung. */
.schaden-card {
	--accent: #ef4444;
	position: relative;
	width: min(545px, 100%);
	max-height: calc(90vh + 25px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: 18px;
	padding: 30px 30px 26px;
	box-shadow:
		0 24px 48px -12px rgba(10,22,40,0.45),
		0 0 0 3px var(--accent);
	opacity: 0;
	transform: translateY(24px) scale(0.96);
	transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
	/* Sanftes Scroll-Verhalten für Mehr-Anzeigen-Button */
	scroll-behavior: smooth;
}
.schaden-card.visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}
.schaden-card__phase {
	display: inline-block;
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	margin-bottom: 10px;
}
.schaden-card__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1.3;
	margin: 0 0 12px;
}
.schaden-card__text {
	font-family: 'Open Sans', sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: #1a1a2e;
	margin: 0 0 18px;
}
.schaden-card__cost {
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 28px;
	font-weight: 800;
	margin: 6px 0 18px;
	padding: 14px 18px;
	border-radius: 12px;
	line-height: 1.2;
}
.schaden-card__cost span {
	display: block;
	font-size: 12px;
	font-weight: 500;
	margin-top: 4px;
	opacity: 0.75;
}
.schaden-card__cost.neg {
	background: rgba(239,68,68,0.1);
	color: #b91c1c;
}
.schaden-card__cost.pos {
	background: rgba(16,185,129,0.1);
	color: #047857;
}
.schaden-card__next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: var(--accent);
	color: #ffffff;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 700;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.schaden-card__next:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px -4px rgba(0,0,0,0.25);
}
.schaden-card__next:active {
	transform: translateY(0);
}
.schaden-card__next:focus-visible {
	outline: 3px solid rgba(0,163,224,0.5);
	outline-offset: 3px;
}

/* === "Mehr anzeigen" / "Weniger anzeigen" Detail-Toggle === */
.schaden-card__detail-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	align-self: flex-start;
	padding: 5px 14px;
	background: linear-gradient(135deg, rgba(0,163,224,0.10), rgba(0,85,164,0.06));
	border: 1.5px solid rgba(0,163,224,0.35);
	border-radius: 50px;
	font-family: 'Open Sans', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #00a3e0;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.schaden-card__detail-toggle:hover {
	border-color: #00a3e0;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px -2px rgba(0,163,224,0.25);
}
.schaden-card__detail-toggle:focus-visible {
	outline: 2px solid rgba(0,163,224,0.6);
	outline-offset: 2px;
}
.schaden-card__chev {
	font-size: 10px;
	display: inline-block;
	transition: transform 0.25s ease;
}
.schaden-card__detail-toggle[aria-expanded="true"] .schaden-card__chev {
	transform: translateY(-1px);
}
.schaden-card__detail-content {
	font-family: 'Open Sans', sans-serif;
	font-size: 13px;
	line-height: 1.55;
	color: #6b7280;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease, padding 0.25s ease, margin 0.25s ease;
}
.schaden-card__detail-content.open {
	/* 2026-04-29 (Timo Mobile-Bug): max-height aufheben, overflow visible —
	   sonst wird langer Schadenfilm-Text abgeschnitten und ist innerhalb
	   des Detail-Blocks NICHT scrollbar (overflow:hidden). Der äußere
	   schaden-overlay--inline-Container scrollt, das reicht. */
	max-height: none;
	overflow: visible;
	padding: 10px 2px 2px;
	margin-top: 4px;
	border-top: 1px solid rgba(0,163,224,0.15);
}

/* Inline-Variante: Detail-Toggle dunkel */
.schaden-overlay--inline .schaden-card__detail-toggle {
	font-size: 11px;
	padding: 4px 12px;
	background: rgba(0,163,224,0.12);
	color: #67c8ea;
}
.schaden-overlay--inline .schaden-card__detail-content {
	font-size: 12px;
	color: #a8b5c9;
	line-height: 1.5;
}
.schaden-overlay--inline .schaden-card__detail-content.open {
	border-top-color: rgba(0,163,224,0.25);
	max-height: none;
	overflow: visible;
}

/* Dark Mode (globaler Fullscreen-Overlay) */
@media (prefers-color-scheme: dark) {
	.schaden-card__detail-content { color: #a8b5c9; }
	.schaden-card__detail-content.open { border-top-color: rgba(0,163,224,0.25); }
}
.dark-mode .schaden-card__detail-content,
body.dark-mode .schaden-card__detail-content { color: #a8b5c9; }
.dark-mode .schaden-card__detail-content.open,
body.dark-mode .schaden-card__detail-content.open { border-top-color: rgba(0,163,224,0.25); }

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {
	.schaden-card {
		background: #0f1a2e;
		box-shadow:
			0 24px 48px -12px rgba(0,0,0,0.7),
			0 0 0 3px var(--accent);
	}
	.schaden-card__title { color: #e8f0fe; }
	.schaden-card__text  { color: #d0dae8; }
	.schaden-card__cost.neg { background: rgba(239,68,68,0.18); color: #fecaca; }
	.schaden-card__cost.pos { background: rgba(16,185,129,0.18); color: #a7f3d0; }
}
.dark-mode .schaden-card,
body.dark-mode .schaden-card {
	background: #0f1a2e;
	box-shadow:
		0 24px 48px -12px rgba(0,0,0,0.7),
		0 0 0 3px var(--accent);
}
.dark-mode .schaden-card__title,
body.dark-mode .schaden-card__title { color: #e8f0fe; }
.dark-mode .schaden-card__text,
body.dark-mode .schaden-card__text  { color: #d0dae8; }

/* === Mobile === */
@media (max-width: 640px) {
	.schaden-overlay { padding: 12px; }
	.schaden-card {
		padding: 22px 20px 20px;
		border-radius: 16px;
		max-height: 95vh;
	}
	.schaden-card__title { font-size: 19px; }
	.schaden-card__text  { font-size: 14px; }
	.schaden-card__cost  { font-size: 22px; padding: 12px 14px; }
	.schaden-card__next  { width: 100%; justify-content: center; padding: 14px; }
	/* Inline-Variante auf Mobile: noch kompakter */
	.schaden-overlay--inline { padding: 8px; }
	.schaden-overlay--inline .schaden-card {
		padding: 12px 12px 10px;
		border-radius: 12px;
		gap: 6px;
	}
	.schaden-overlay--inline .schaden-card__title { font-size: 15px; }
	.schaden-overlay--inline .schaden-card__text  { font-size: 12.5px; line-height: 1.4; }
	.schaden-overlay--inline .schaden-card__cost  { font-size: 16px; padding: 7px 10px; }
	.schaden-overlay--inline .schaden-card__cost span { font-size: 10px; }
	.schaden-overlay--inline .schaden-card__next  { padding: 9px; font-size: 12px; }
	.schaden-overlay--inline .schaden-card__detail-toggle { font-size: 10.5px; padding: 3px 10px; }
	.schaden-overlay--inline .schaden-card__detail-content { font-size: 11.5px; }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
	.vero-fx-layer *,
	.fx-rain .drop, .fx-hail .drop,
	.fx-flame, .fx-smoke,
	.fx-burglar, .fx-beam,
	.fx-drip, .fx-puddle,
	.fx-impact, .fx-sparks,
	.fx-exclaim, .fx-question, .fx-tooth, .fx-lock, .fx-gavel,
	.fx-matrix, .fx-pulse,
	.fx-water-rise {
		animation: none !important;
		transition: none !important;
	}
	.fx-flame { opacity: 0.9; }
	.fx-pulse { opacity: 0.6; transform: scale(1.2); }
	.fx-exclaim, .fx-question, .fx-tooth, .fx-lock, .fx-gavel {
		opacity: 1;
		transform: translate(-50%, 0) scale(1);
	}
	.fx-burglar { opacity: 1; }
	.schaden-card {
		transform: translateY(0) scale(1);
	}
	.vero-dev-toggle, .vero-dev-panel, .vero-dev-card {
		transition: none !important;
		animation: none !important;
	}
}

/* ============================================================
   DEV PANEL — Manual Scenario Trigger Grid
   Nur sichtbar bei ?dev=1 oder localStorage.verosim_dev='1'
   ============================================================ */
.vero-dev-toggle {
	position: fixed;
	bottom: 16px;
	right: 16px;
	z-index: 1600;
	padding: 10px 16px;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #fff;
	background: linear-gradient(135deg, #0055a4, #00a3e0);
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 85, 164, 0.4), 0 0 0 1px rgba(0, 85, 164, 0.3);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.vero-dev-toggle:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(0, 85, 164, 0.5), 0 0 0 1px rgba(0, 85, 164, 0.4);
}
.vero-dev-toggle:active {
	transform: translateY(0);
}

.vero-dev-panel {
	position: fixed;
	inset: 0;
	z-index: 1500;
	background: rgba(10, 22, 40, 0.78);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow-y: auto;
}
.vero-dev-panel.visible {
	opacity: 1;
	pointer-events: auto;
}

.vero-dev-panel__inner {
	width: 100%;
	max-width: 1040px;
	max-height: 92vh;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 85, 164, 0.1);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.96);
	transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vero-dev-panel.visible .vero-dev-panel__inner {
	transform: scale(1);
}

.vero-dev-panel__head {
	padding: 18px 24px 14px;
	border-bottom: 1px solid rgba(0, 85, 164, 0.1);
	background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
	position: relative;
}
.vero-dev-panel__head h3 {
	margin: 0 0 4px;
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	font-weight: 800;
	color: #003366;
	letter-spacing: -0.2px;
}
.vero-dev-panel__hint {
	margin: 0;
	font-size: 12px;
	color: #6b7280;
	font-family: 'Open Sans', sans-serif;
}
.vero-dev-panel__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 85, 164, 0.08);
	color: #003366;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}
.vero-dev-panel__close:hover {
	background: rgba(0, 85, 164, 0.18);
	transform: rotate(90deg);
}

.vero-dev-panel__filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 24px 4px;
	border-bottom: 1px solid rgba(0, 85, 164, 0.08);
	background: #fafbfd;
}
.vero-dev-chip {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1.5px solid rgba(0, 85, 164, 0.2);
	background: #fff;
	color: #6b7280;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.3px;
	cursor: pointer;
	transition: all 0.15s ease;
}
.vero-dev-chip:hover {
	border-color: var(--chip, #0055a4);
	color: var(--chip, #0055a4);
}
.vero-dev-chip.active {
	background: var(--chip, #0055a4);
	border-color: var(--chip, #0055a4);
	color: #fff;
}

.vero-dev-panel__grid {
	padding: 18px 24px 24px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
	overflow-y: auto;
}

.vero-dev-card {
	--accent: #0055a4;
	position: relative;
	padding: 12px 14px 14px;
	background: #fff;
	border: 1.5px solid rgba(0, 0, 0, 0.08);
	border-left: 4px solid var(--accent);
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	font-family: 'Open Sans', sans-serif;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.vero-dev-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	border-color: var(--accent);
}
.vero-dev-card:active {
	transform: translateY(0);
}
.vero-dev-card__cat {
	font-family: 'Montserrat', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--accent);
}
.vero-dev-card__label {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a2e;
	line-height: 1.3;
}
.vero-dev-card__key {
	margin-top: 2px;
	font-family: 'Courier New', monospace;
	font-size: 10px;
	color: #9ca3af;
	letter-spacing: 0.2px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
	.vero-dev-panel__inner {
		background: #1a2333;
		box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 163, 224, 0.18);
	}
	.vero-dev-panel__head {
		background: linear-gradient(180deg, #0f1a2c 0%, #1a2333 100%);
		border-bottom-color: rgba(0, 163, 224, 0.15);
	}
	.vero-dev-panel__head h3 { color: #e8f0fe; }
	.vero-dev-panel__hint  { color: #9ca3af; }
	.vero-dev-panel__close {
		background: rgba(0, 163, 224, 0.14);
		color: #e8f0fe;
	}
	.vero-dev-panel__close:hover { background: rgba(0, 163, 224, 0.28); }
	.vero-dev-panel__filter {
		background: #15202f;
		border-bottom-color: rgba(0, 163, 224, 0.12);
	}
	.vero-dev-chip {
		background: #1a2333;
		border-color: rgba(0, 163, 224, 0.25);
		color: #9ca3af;
	}
	.vero-dev-card {
		background: #1f2a3d;
		border-color: rgba(255, 255, 255, 0.06);
	}
	.vero-dev-card__label { color: #e8f0fe; }
	.vero-dev-card__key   { color: #6b7280; }
}
body.dark-mode .vero-dev-panel__inner {
	background: #1a2333;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 163, 224, 0.18);
}
body.dark-mode .vero-dev-panel__head {
	background: linear-gradient(180deg, #0f1a2c 0%, #1a2333 100%);
	border-bottom-color: rgba(0, 163, 224, 0.15);
}
body.dark-mode .vero-dev-panel__head h3 { color: #e8f0fe; }
body.dark-mode .vero-dev-panel__hint { color: #9ca3af; }
body.dark-mode .vero-dev-panel__close {
	background: rgba(0, 163, 224, 0.14);
	color: #e8f0fe;
}
body.dark-mode .vero-dev-panel__filter {
	background: #15202f;
	border-bottom-color: rgba(0, 163, 224, 0.12);
}
body.dark-mode .vero-dev-chip {
	background: #1a2333;
	border-color: rgba(0, 163, 224, 0.25);
	color: #9ca3af;
}
body.dark-mode .vero-dev-card {
	background: #1f2a3d;
	border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .vero-dev-card__label { color: #e8f0fe; }
body.dark-mode .vero-dev-card__key { color: #6b7280; }

/* Mobile */
@media (max-width: 640px) {
	.vero-dev-toggle {
		bottom: 12px;
		right: 12px;
		padding: 8px 12px;
		font-size: 11px;
	}
	.vero-dev-panel { padding: 12px; }
	.vero-dev-panel__inner { border-radius: 16px; }
	.vero-dev-panel__head { padding: 14px 18px 10px; }
	.vero-dev-panel__head h3 { font-size: 16px; }
	.vero-dev-panel__filter { padding: 10px 18px 4px; }
	.vero-dev-panel__grid {
		padding: 14px 18px 18px;
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 8px;
	}
	.vero-dev-card { padding: 10px 12px 12px; }
	.vero-dev-card__label { font-size: 13px; }
}
