.schlafanalyse-quiz {
	max-width: 640px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 10px 40px rgba(15, 40, 69, 0.08);
	padding: 32px;
	position: relative;
	overflow: hidden;
}

/* Dezentes Wellen-Deko-Element am unteren Rand, wie im Grafik-Konzept */
.schlafanalyse-quiz::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(180deg, rgba(20, 184, 166, 0) 0%, rgba(20, 184, 166, 0.04) 100%);
	pointer-events: none;
}

.schlafanalyse-quiz__progress {
	height: 8px;
	background: #eef4fb;
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 28px;
}

.schlafanalyse-quiz__progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #12213d, #8bc0a8);
	border-radius: 20px;
	transition: width 0.3s ease;
}

.schlafanalyse-quiz__step h3 {
	font-family: 'Baloo 2', 'Poppins', sans-serif;
	margin: 0 0 18px;
	font-size: 1.25em;
	font-weight: 700;
	color: #12213d;
	line-height: 1.35;
}

.schlafanalyse-quiz__options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 28px;
}

.schlafanalyse-quiz__option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	background: #f8fafc;
	border: 1.5px solid #eef1f5;
	border-radius: 14px;
	cursor: pointer;
	transition: all 0.15s ease;
	color: #1e293b;
	font-size: 0.98em;
}

.schlafanalyse-quiz__option:hover {
	border-color: #8bc0a8;
	background: #f4f1fb;
}

.schlafanalyse-quiz__option input {
	accent-color: #12213d;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.schlafanalyse-quiz__nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.schlafanalyse-quiz__nav button {
	padding: 14px 28px;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	font-size: 0.98em;
	font-weight: 600;
	transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.schlafanalyse-quiz__next,
.schlafanalyse-quiz__submit {
	background: #12213d;
	color: #fff;
	margin-left: auto;
	box-shadow: 0 6px 16px rgba(18, 33, 61, 0.25);
}

.schlafanalyse-quiz__next:hover,
.schlafanalyse-quiz__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(18, 33, 61, 0.35);
}

.schlafanalyse-quiz__back {
	background: #f1f5f9;
	color: #475569;
}

#schlafanalyse-phone {
	width: 100%;
	padding: 14px 16px;
	margin-bottom: 18px;
	border: 1.5px solid #eef1f5;
	background: #f8fafc;
	border-radius: 14px;
	font-size: 1em;
	box-sizing: border-box;
	color: #0f1c3f;
}

#schlafanalyse-phone:focus {
	outline: none;
	border-color: #8bc0a8;
	background: #fff;
}

.schlafanalyse-quiz__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 28px;
	font-size: 0.88em;
	color: #64748b;
	line-height: 1.5;
}

.schlafanalyse-quiz__consent input {
	accent-color: #12213d;
	margin-top: 2px;
	flex-shrink: 0;
}

.schlafanalyse-quiz__consent a {
	color: #12213d;
}

.schlafanalyse-quiz__crisis {
	background: #fef2f2;
	border: 1.5px solid #fca5a5;
	border-radius: 16px;
	padding: 28px;
}

.schlafanalyse-quiz__crisis h3 {
	color: #b91c1c;
	margin-top: 0;
}

.schlafanalyse-quiz__resources {
	list-style: none;
	padding: 0;
	margin-top: 18px;
}

.schlafanalyse-quiz__resources li {
	padding: 12px 0;
	border-top: 1px solid #fecaca;
	font-size: 1.05em;
	color: #1e293b;
}

.schlafanalyse-quiz__done {
	text-align: center;
	padding: 40px 10px;
}

.schlafanalyse-quiz__done h3 {
	color: #12213d;
	font-size: 1.4em;
	margin-bottom: 10px;
}

.schlafanalyse-quiz__done p {
	color: #475569;
	line-height: 1.6;
}

/* ------------------------------------------------------------------
   Abschlussbildschirm (Handynummer), Fehlermeldungen, Lade-Anzeige
   ------------------------------------------------------------------ */
.schlafanalyse-quiz__intro {
	margin: 0 0 22px;
	color: #475569;
	line-height: 1.6;
}

.schlafanalyse-quiz__field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.9em;
	font-weight: 600;
	color: #12213d;
}

.schlafanalyse-quiz__error {
	margin: 0 0 18px;
	padding: 12px 16px;
	background: #fef2f2;
	border: 1.5px solid #fca5a5;
	border-radius: 12px;
	color: #b91c1c;
	font-size: 0.92em;
	line-height: 1.45;
}

.schlafanalyse-quiz__error[hidden] {
	display: none;
}

.schlafanalyse-quiz__hint {
	font-size: 0.9em;
}

.schlafanalyse-quiz__loading {
	text-align: center;
	padding: 48px 10px;
	color: #475569;
}

.schlafanalyse-quiz__spinner {
	display: inline-block;
	width: 38px;
	height: 38px;
	margin-bottom: 14px;
	border: 4px solid #eef4fb;
	border-top-color: #12213d;
	border-radius: 50%;
	animation: schlafanalyse-spin 0.9s linear infinite;
}

@keyframes schlafanalyse-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.schlafanalyse-quiz__spinner {
		animation-duration: 2.4s;
	}
}

@media (max-width: 480px) {
	.schlafanalyse-quiz {
		padding: 22px 18px;
	}

	.schlafanalyse-quiz__nav button {
		padding: 13px 20px;
	}
}

/* ------------------------------------------------------------------
   Namensfelder (Vorname / Nachname) auf dem Abschlussbildschirm
   ------------------------------------------------------------------ */
.schlafanalyse-quiz__row {
	display: flex;
	gap: 12px;
	margin-bottom: 4px;
}

.schlafanalyse-quiz__col {
	flex: 1 1 0;
	min-width: 0;
}

.schlafanalyse-quiz__input {
	width: 100%;
	padding: 14px 16px;
	margin-bottom: 18px;
	border: 1.5px solid #eef1f5;
	background: #f8fafc;
	border-radius: 14px;
	font-size: 1em;
	box-sizing: border-box;
	color: #0f1c3f;
}

.schlafanalyse-quiz__input:focus {
	outline: none;
	border-color: #8bc0a8;
	background: #fff;
}

@media (max-width: 480px) {
	.schlafanalyse-quiz__row {
		flex-direction: column;
		gap: 0;
	}
}

/* Land/Vorwahl + Handynummer nebeneinander */
.schlafanalyse-quiz__phone-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.schlafanalyse-quiz__phone-row select.schlafanalyse-quiz__input {
	flex: 0 0 44%;
	min-width: 0;
	appearance: auto;
	text-overflow: ellipsis;
}

.schlafanalyse-quiz__phone-row input.schlafanalyse-quiz__input {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 480px) {
	.schlafanalyse-quiz__phone-row {
		flex-direction: column;
		gap: 0;
	}
	.schlafanalyse-quiz__phone-row select.schlafanalyse-quiz__input {
		flex: none;
		width: 100%;
	}
}
