/*
 * CAV Hörspiele – Player-Styles („Hör zu & mal mit").
 *
 * Nutzt die CAV-Design-Tokens aus dem Child-Theme (style.css) mit Fallbacks.
 * Alles ist mit .cavh- präfixiert und wird nur auf Player-/Konto-Seiten geladen.
 * Fredoka wird vom Theme lokal geladen (fonts.css) – hier nur referenziert.
 */

/* =====================================================================
 * 1. Tokens & Grundlagen
 * =================================================================== */

.cavh-main,
.cavh-konto {
	--cavh-navy: var(--cav-navy, #2A3A52);
	--cavh-navy-hover: var(--cav-navy-hover, #22304a);
	--cavh-navy-2: var(--cav-navy-grad-1, #34465f);
	--cavh-navy-3: var(--cav-navy-grad-2, #3E5C8A);
	--cavh-hafer: var(--cav-hafer, #F4F1E9);
	--cavh-hafer-2: var(--cav-hafer-2, #F7F4EC);
	--cavh-hafer-3: var(--cav-hafer-3, #F0ECE2);
	--cavh-cover-bg: var(--cav-cover-bg, #EDE8DD);
	--cavh-ink: var(--cav-ink, #33322E);
	--cavh-ink-2: var(--cav-ink-2, #5C574F);
	--cavh-meta: var(--cav-meta-text, #6E6A63);
	--cavh-warm: var(--cav-warm, #8C8882);
	--cavh-warm-light: var(--cav-warm-light, #C9C4BB);
	--cavh-honey: var(--cav-honey, #D9A441);
	--cavh-honey-dark: var(--cav-honey-dark, #B07D1E);
	--cavh-teal: var(--cav-teal, #2E8B86);
	--cavh-berry: var(--cav-berry, #8C4A5C);
	--cavh-white: var(--cav-white, #FFFFFF);
	--cavh-card-border: var(--cav-card-border, rgba(140, 136, 130, 0.18));
	--cavh-font-head: var(--cav-font-head, "Fredoka", "Nunito Sans", system-ui, sans-serif);
	--cavh-font-body: var(--cav-font-body, "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--cavh-radius-sm: var(--cav-radius-sm, 12px);
	--cavh-radius-md: var(--cav-radius-md, 16px);
	--cavh-radius-card: 18px;
	--cavh-radius-band: var(--cav-radius-band, 22px);
	--cavh-radius-pill: var(--cav-radius-pill, 999px);
	--cavh-shadow-sm: var(--cav-shadow-sm, 0 12px 30px -18px rgba(42, 58, 82, 0.30));
	--cavh-shadow-card: var(--cav-shadow-card, 0 16px 40px -30px rgba(42, 58, 82, 0.35));
	--cavh-shadow-md: var(--cav-shadow-md, 0 18px 40px -24px rgba(42, 58, 82, 0.40));
	--cavh-ease: var(--cav-ease, cubic-bezier(.16, 1, .3, 1));
	--cavh-ease-bounce: var(--cav-ease-bounce, cubic-bezier(.34, 1.28, .64, 1));

	/* Zarte Pastell-Tönungen für Malbuch-Flächen (Strichzeichnungen darauf). */
	--cavh-tint-honey: #FBF1DC;
	--cavh-tint-berry: #F6E7EB;
	--cavh-tint-teal: #E2F1EF;
	--cavh-tint-navy: #E8EDF5;
	--cavh-tint-green: #EDF1E6;
}

.cavh-main {
	background: var(--cavh-hafer);
	color: var(--cavh-ink);
	font-family: var(--cavh-font-body);
	font-size: 16px;
	line-height: 1.55;
	padding-bottom: 40px;
}

.cavh-main *,
.cavh-main *::before,
.cavh-main *::after,
.cavh-konto *,
.cavh-konto *::before,
.cavh-konto *::after {
	box-sizing: border-box;
}

.cavh-main [hidden],
.cavh-konto [hidden] {
	display: none !important;
}

.cavh-seite {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 16px 56px;
}

.cavh-card {
	background: var(--cavh-white);
	border: 1px solid var(--cavh-card-border);
	border-radius: var(--cavh-radius-card);
	box-shadow: var(--cavh-shadow-card);
}

.cavh-main h1,
.cavh-main h2,
.cavh-main h3,
.cavh-konto h2 {
	font-family: var(--cavh-font-head);
	font-weight: 600;
	color: var(--cavh-navy);
	line-height: 1.15;
	letter-spacing: 0;
	margin: 0 0 10px;
}

.cavh-main a {
	color: var(--cavh-navy);
}

.cavh-main a:focus-visible,
.cavh-main button:focus-visible,
.cavh-main input:focus-visible,
.cavh-konto a:focus-visible {
	outline: 3px solid var(--cavh-navy);
	outline-offset: 3px;
}

/* =====================================================================
 * 2. Buttons (angelehnt an .cav-btn der CAV-Seite)
 * =================================================================== */

.cavh-btn,
.cavh-main a.cavh-btn,
.cavh-konto a.cavh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	border: 1.5px solid transparent;
	border-radius: var(--cavh-radius-pill);
	padding: 13px 26px;
	font-family: var(--cavh-font-body);
	font-size: 15.5px;
	font-weight: 800;
	line-height: 1.1;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .15s var(--cavh-ease), box-shadow .15s ease;
}

.cavh-btn-navy {
	background: var(--cavh-navy);
	color: var(--cavh-white) !important;
	box-shadow: 0 12px 24px -16px rgba(42, 58, 82, 0.8);
}

.cavh-btn-navy:hover {
	background: var(--cavh-navy-hover);
	transform: translateY(-1px);
}

.cavh-btn-honey {
	background: var(--cavh-honey);
	color: #3a2c07 !important;
}

.cavh-btn-honey:hover {
	background: var(--cavh-honey-dark);
	color: var(--cavh-white) !important;
	transform: translateY(-1px);
}

.cavh-btn-ghost {
	background: var(--cavh-white);
	border-color: rgba(42, 58, 82, 0.22);
	color: var(--cavh-navy) !important;
}

.cavh-btn-ghost:hover {
	background: var(--cavh-hafer-2);
	border-color: rgba(42, 58, 82, 0.4);
}

/* =====================================================================
 * 3. Reihen-Pille („Hör zu & mal mit")
 * =================================================================== */

.cavh-reihe {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
	padding: 7px 15px 7px 11px;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-navy);
	color: var(--cavh-white);
	font-family: var(--cavh-font-body);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .02em;
	box-shadow: 0 10px 22px -16px rgba(42, 58, 82, 0.9);
}

.cavh-konto .cavh-reihe {
	padding-left: 15px;
}

.cavh-reihe__icon {
	color: var(--cavh-honey);
}

.cavh-reihe__band {
	padding-left: 9px;
	border-left: 1.5px solid rgba(255, 255, 255, 0.35);
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
}

/* =====================================================================
 * 4. Hero (Buch-Titelbild + Titel)
 * =================================================================== */

.cavh-held {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr;
	justify-items: center;
	gap: 26px;
	padding: 34px 20px 30px;
	margin-bottom: 22px;
	text-align: center;
	border: 1px solid var(--cavh-card-border);
	border-radius: var(--cavh-radius-band);
	background:
		radial-gradient(120% 90% at 0% 0%, rgba(217, 164, 65, 0.16) 0%, rgba(217, 164, 65, 0) 55%),
		radial-gradient(110% 90% at 100% 100%, rgba(140, 74, 92, 0.12) 0%, rgba(140, 74, 92, 0) 55%),
		linear-gradient(160deg, #FBF8F1 0%, var(--cavh-hafer-2) 60%, #F1EEE6 100%);
	box-shadow: var(--cavh-shadow-card);
}

.cavh-held__deko {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	fill: var(--cavh-honey);
	opacity: .5;
}

.cavh-held__linie {
	fill: none;
	stroke: var(--cavh-berry);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-dasharray: 2 9;
	opacity: .55;
}

.cavh-held__bild {
	position: relative;
	z-index: 1;
	padding: 6px 14px 14px;
}

/* Das „Buch": weißes Passepartout, leichte Schräglage, Papier dahinter. */
.cavh-buch {
	position: relative;
	width: min(230px, 62vw);
	transform: rotate(-3deg);
	transition: transform .5s var(--cavh-ease-bounce);
}

.cavh-held:hover .cavh-buch {
	transform: rotate(-1.5deg) translateY(-2px);
}

.cavh-buch__blatt {
	position: absolute;
	inset: 6px -8px -8px 10px;
	border-radius: 16px;
	background: var(--cavh-tint-berry);
	border: 1px solid rgba(140, 74, 92, 0.18);
	transform: rotate(6deg);
	box-shadow: 0 16px 30px -24px rgba(42, 58, 82, 0.6);
}

.cavh-main .cavh-buch__cover {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	padding: 12px;
	border-radius: 16px;
	background: var(--cavh-white);
	border: 1px solid rgba(140, 136, 130, 0.22);
	box-shadow:
		inset 7px 0 0 rgba(42, 58, 82, 0.06),
		0 2px 0 rgba(140, 136, 130, 0.15),
		0 28px 46px -24px rgba(42, 58, 82, 0.55);
}

.cavh-main .cavh-buch__cover--leer {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 220 / 313;
	color: var(--cavh-navy);
	background: var(--cavh-tint-navy);
}

.cavh-held__stift {
	position: absolute;
	right: -22px;
	bottom: 4px;
	width: 120px;
	transform: rotate(-28deg);
	filter: drop-shadow(0 6px 6px rgba(42, 58, 82, 0.18));
	pointer-events: none;
}

.cavh-held__stift svg {
	display: block;
	width: 100%;
	height: auto;
}

.cavh-stift__koerper { fill: var(--cavh-honey); }
.cavh-stift__band { fill: var(--cavh-berry); }
.cavh-stift__holz { fill: #F2D9AE; }
.cavh-stift__mine { fill: var(--cavh-navy); }
.cavh-stift__ende { fill: #E9A6B4; }

.cavh-held__text {
	position: relative;
	z-index: 1;
	max-width: 560px;
}

.cavh-main .cavh-held__titel {
	font-size: clamp(30px, 7vw, 48px);
	font-weight: 600;
	line-height: 1.08;
	margin: 0 0 12px;
	text-wrap: balance;
}

.cavh-held__unter {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
	color: var(--cavh-ink-2);
}

.cavh-held__fakten {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
}

.cavh-fakt {
	margin: 0;
	padding: 7px 14px;
	border-radius: var(--cavh-radius-pill);
	background: rgba(255, 255, 255, 0.75);
	border: 1px solid var(--cavh-card-border);
	font-size: 14px;
	font-weight: 700;
	color: var(--cavh-ink-2);
}

.cavh-fakt strong {
	font-family: var(--cavh-font-head);
	font-weight: 600;
	font-size: 16px;
	color: var(--cavh-berry);
}

@media (min-width: 860px) {
	.cavh-held {
		grid-template-columns: auto minmax(0, 1fr);
		justify-items: start;
		align-items: center;
		gap: 48px;
		padding: 44px 56px 44px 48px;
		text-align: left;
	}
	.cavh-buch {
		width: 250px;
	}
	.cavh-held__fakten {
		justify-content: flex-start;
	}
}

/* =====================================================================
 * 5. Gesperrt / Meldung / Fehlerseite
 * =================================================================== */

.cavh-gesperrt,
.cavh-meldung {
	padding: 38px 24px 34px;
	text-align: center;
	max-width: 620px;
	margin: 0 auto 22px;
}

.cavh-gesperrt__icon,
.cavh-meldung__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--cavh-tint-honey);
	font-size: 42px;
	line-height: 1;
}

.cavh-main .cavh-bildmarke {
	background: none;
}

.cavh-bildmarke svg {
	display: block;
	width: 96px;
	height: 96px;
}

.cavh-bildmarke__grund { fill: var(--cavh-tint-honey); }
.cavh-bildmarke__flaeche { fill: var(--cavh-navy); }
.cavh-bildmarke__punkt { fill: var(--cavh-honey); }
.cavh-bildmarke__strich {
	fill: none;
	stroke: var(--cavh-navy);
	stroke-width: 6;
	stroke-linecap: round;
}

.cavh-main .cavh-gesperrt__titel,
.cavh-main .cavh-meldung__titel {
	font-size: 28px;
}

.cavh-gesperrt__text,
.cavh-meldung__text {
	color: var(--cavh-ink-2);
	font-size: 16.5px;
	margin: 0 auto 22px;
	max-width: 440px;
}

.cavh-meldung__aktion {
	margin: 0;
}

.cavh-gesperrt__aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* =====================================================================
 * 6. Claim-Hinweis
 * =================================================================== */

.cavh-claim {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 16px;
	background: #FBF3E0;
	border: 1px solid rgba(217, 164, 65, 0.45);
	border-radius: var(--cavh-radius-card);
	padding: 16px 18px;
	margin-bottom: 22px;
}

.cavh-claim__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--cavh-white);
	color: var(--cavh-teal);
}

.cavh-claim__text {
	margin: 0;
	flex: 1 1 280px;
	color: var(--cavh-ink-2);
}

.cavh-claim__text strong {
	color: var(--cavh-navy);
}

/* =====================================================================
 * 7. Bühne: Player + Märchenliste (ab 860px zweispaltig)
 * =================================================================== */

.cavh-buehne {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 26px;
	align-items: start;
}

@media (min-width: 860px) {
	.cavh-buehne {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 28px;
	}
}

/* =====================================================================
 * 8. Player-Karte
 * =================================================================== */

.cavh-spieler {
	position: relative;
	overflow: hidden;
	padding: 20px 20px 22px;
	text-align: center;
}

.cavh-spieler::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 110px;
	background: linear-gradient(180deg, var(--cavh-hafer-2) 0%, rgba(247, 244, 236, 0) 100%);
	pointer-events: none;
}

.cavh-spieler > * {
	position: relative;
}

.cavh-spieler__kopf {
	display: flex;
	align-items: center;
	gap: 14px;
	text-align: left;
}

.cavh-spieler__bild {
	flex: none;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	padding: 4px;
	border-radius: 16px;
	background: var(--cavh-white);
	border: 1px solid rgba(140, 136, 130, 0.22);
	box-shadow: 0 12px 22px -14px rgba(42, 58, 82, 0.6);
	transform: rotate(-3deg);
	color: var(--cavh-navy);
}

.cavh-spieler__bild-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 11px;
	background: var(--cavh-tint-honey);
}

.cavh-spieler__bild-platzhalter {
	display: none;
}

.cavh-spieler__bild.is-leer {
	background: var(--cavh-tint-honey);
}

.cavh-spieler__bild.is-leer .cavh-spieler__bild-platzhalter {
	display: block;
}

.cavh-spieler__jetzt {
	flex: 1;
	min-width: 0;
	margin: 0;
}

.cavh-spieler__jetzt-label {
	display: block;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--cavh-berry);
}

.cavh-spieler__jetzt-titel {
	display: block;
	font-family: var(--cavh-font-head);
	font-size: clamp(21px, 5vw, 26px);
	font-weight: 600;
	line-height: 1.15;
	color: var(--cavh-navy);
	margin-top: 2px;
	overflow-wrap: anywhere;
}

/* Kleine Klangwelle – tanzt nur, solange abgespielt wird. */
.cavh-welle {
	flex: none;
	display: inline-flex;
	align-items: flex-end;
	gap: 3px;
	width: 25px;
	height: 22px;
}

.cavh-welle i {
	display: block;
	width: 4px;
	height: 6px;
	border-radius: 2px;
	background: var(--cavh-berry);
	opacity: .35;
}

.cavh-spieler:has(.is-playing) .cavh-welle i {
	opacity: 1;
	animation: cavh-welle 1s ease-in-out infinite;
}

.cavh-spieler:has(.is-playing) .cavh-welle i:nth-child(2) { animation-delay: -.3s; }
.cavh-spieler:has(.is-playing) .cavh-welle i:nth-child(3) { animation-delay: -.6s; }
.cavh-spieler:has(.is-playing) .cavh-welle i:nth-child(4) { animation-delay: -.15s; }

@keyframes cavh-welle {
	0%, 100% { height: 6px; }
	50% { height: 22px; }
}

/* --- Steuerung --- */

.cavh-steuerung {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin: 26px 0 22px;
}

.cavh-main .cavh-rund {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 60px;
	height: 60px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 1.5px solid rgba(42, 58, 82, 0.16);
	background: var(--cavh-white);
	color: var(--cavh-navy);
	font-family: var(--cavh-font-body);
	line-height: 1;
	text-transform: none;
	box-shadow: 0 10px 20px -16px rgba(42, 58, 82, 0.7);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background .15s ease, transform .2s var(--cavh-ease-bounce), box-shadow .15s ease;
}

.cavh-main .cavh-rund:hover,
.cavh-main .cavh-rund:focus {
	background: var(--cavh-hafer-2);
	color: var(--cavh-navy);
}

.cavh-main .cavh-rund:active {
	transform: scale(.94);
}

.cavh-rund__pfeil {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
}

.cavh-rund__zahl {
	position: relative;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .01em;
	margin-top: 1px;
}

/* Großer Play-Knopf */
.cavh-main .cavh-rund--gross,
.cavh-main .cavh-rund--gross:hover,
.cavh-main .cavh-rund--gross:focus {
	width: 92px;
	height: 92px;
	border: 0;
	color: var(--cavh-white);
	background: radial-gradient(120% 120% at 30% 20%, var(--cavh-navy-3) 0%, var(--cavh-navy-2) 45%, var(--cavh-navy) 100%);
	box-shadow:
		inset 0 2px 0 rgba(255, 255, 255, 0.18),
		0 20px 34px -14px rgba(42, 58, 82, 0.7);
}

.cavh-main .cavh-rund--gross:hover {
	transform: scale(1.04);
}

.cavh-main .cavh-rund--gross:active {
	transform: scale(.96);
}

.cavh-main .cavh-rund--gross:focus-visible {
	outline: 3px solid var(--cavh-berry);
	outline-offset: 4px;
}

.cavh-rund--gross::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(62, 92, 138, 0.45);
	pointer-events: none;
}

.cavh-rund--gross.is-playing::after {
	animation: cavh-puls 2s ease-out infinite;
}

@keyframes cavh-puls {
	0% { box-shadow: 0 0 0 0 rgba(62, 92, 138, 0.45); }
	70% { box-shadow: 0 0 0 18px rgba(62, 92, 138, 0); }
	100% { box-shadow: 0 0 0 18px rgba(62, 92, 138, 0); }
}

.cavh-icon {
	display: block;
	margin: 0 auto;
}

/* Play/Pause-Symbol: standardmäßig Play, bei .is-playing Pause zeigen. */
.cavh-icon--pause {
	display: none;
}

.is-playing .cavh-icon--play {
	display: none;
}

.is-playing .cavh-icon--pause {
	display: block;
}

/* --- Fortschrittsleiste (Füllstand über --cavh-pos aus dem JS) --- */

.cavh-fortschritt {
	padding: 0 2px;
}

.cavh-main .cavh-suche {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.cavh-main .cavh-suche:focus {
	outline: none;
	box-shadow: none;
}

.cavh-main .cavh-suche:focus-visible {
	outline: 3px solid var(--cavh-navy);
	outline-offset: 2px;
	border-radius: var(--cavh-radius-pill);
}

.cavh-suche::-webkit-slider-runnable-track {
	height: 12px;
	border-radius: var(--cavh-radius-pill);
	background: linear-gradient(90deg, var(--cavh-navy-3) 0%, var(--cavh-navy) var(--cavh-pos, 0%), var(--cavh-hafer-3) var(--cavh-pos, 0%), var(--cavh-hafer-3) 100%);
	box-shadow: inset 0 1px 2px rgba(42, 58, 82, 0.12);
}

.cavh-suche::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 30px;
	height: 30px;
	margin-top: -9px;
	border-radius: 50%;
	background: var(--cavh-white);
	border: 7px solid var(--cavh-navy);
	box-shadow: 0 6px 14px -4px rgba(42, 58, 82, 0.55);
	transition: transform .15s var(--cavh-ease-bounce);
}

.cavh-suche:active::-webkit-slider-thumb {
	transform: scale(1.12);
}

.cavh-suche::-moz-range-track {
	height: 12px;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-hafer-3);
}

.cavh-suche::-moz-range-progress {
	height: 12px;
	border-radius: var(--cavh-radius-pill);
	background: linear-gradient(90deg, var(--cavh-navy-3), var(--cavh-navy));
}

.cavh-suche::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--cavh-white);
	border: 7px solid var(--cavh-navy);
	box-shadow: 0 6px 14px -4px rgba(42, 58, 82, 0.55);
}

.cavh-zeit {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 800;
	color: var(--cavh-meta);
	margin-top: 2px;
	font-variant-numeric: tabular-nums;
}

/* --- Tempo als Segment-Pille --- */

.cavh-tempo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
}

.cavh-tempo__label {
	font-size: 12.5px;
	font-weight: 800;
	color: var(--cavh-meta);
	text-transform: uppercase;
	letter-spacing: .1em;
}

.cavh-tempo__segment {
	display: inline-flex;
	gap: 2px;
	padding: 4px;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-hafer-3);
	border: 1px solid var(--cavh-card-border);
}

.cavh-main .cavh-tempo__btn,
.cavh-main .cavh-tempo__btn:hover,
.cavh-main .cavh-tempo__btn:focus {
	min-width: 66px;
	min-height: 44px;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: var(--cavh-radius-pill);
	background: transparent;
	color: var(--cavh-navy);
	font-family: var(--cavh-font-body);
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.cavh-main .cavh-tempo__btn:hover {
	background: rgba(255, 255, 255, 0.7);
}

.cavh-main .cavh-tempo__btn.is-aktiv,
.cavh-main .cavh-tempo__btn[aria-pressed="true"] {
	background: var(--cavh-navy);
	color: var(--cavh-white);
	box-shadow: 0 6px 14px -8px rgba(42, 58, 82, 0.8);
}

/* --- „Welche Seite malst du gerade?" --- */

.cavh-seiten {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 2px dashed var(--cavh-hafer-3);
	text-align: left;
}

/* Keine Kapitel → JS setzt [hidden] an der Leiste; Überschrift mit ausblenden. */
.cavh-seiten:has(> .cavh-kapitel[hidden]) {
	display: none;
}

.cavh-main .cavh-seiten__titel {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 19px;
	margin: 0 0 8px;
}

.cavh-seiten__icon {
	color: var(--cavh-berry);
}

.cavh-kapitel {
	display: flex;
	gap: 12px;
	margin: 0 -20px;
	padding: 14px 20px 14px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scroll-padding-inline: 20px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--cavh-warm-light) transparent;
}

.cavh-main .cavh-kapitel__btn,
.cavh-main .cavh-kapitel__btn:hover,
.cavh-main .cavh-kapitel__btn:focus {
	position: relative;
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	width: 104px;
	min-height: 44px;
	margin: 0;
	padding: 8px 8px 10px;
	border: 2px solid var(--cavh-card-border);
	border-radius: var(--cavh-radius-md);
	background: var(--cavh-white);
	color: var(--cavh-navy);
	font-family: var(--cavh-font-body);
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: none;
	box-shadow: 0 10px 20px -18px rgba(42, 58, 82, 0.7);
	scroll-snap-align: start;
	cursor: pointer;
	transition: border-color .15s ease, transform .2s var(--cavh-ease-bounce), box-shadow .15s ease;
}

.cavh-main .cavh-kapitel__btn:hover {
	border-color: rgba(42, 58, 82, 0.3);
	transform: translateY(-2px);
}

.cavh-kapitel__bild {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 10px;
	background: var(--cavh-tint-navy);
}

.cavh-kapitel__label {
	display: block;
}

/* Ohne Bilder: runde Zahl-Kacheln */
.cavh-main .cavh-kapitel__btn--nur-text,
.cavh-main .cavh-kapitel__btn--nur-text:hover,
.cavh-main .cavh-kapitel__btn--nur-text:focus {
	width: 84px;
	padding: 10px 6px;
}

.cavh-kapitel__zahl {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--cavh-tint-navy);
	font-family: var(--cavh-font-head);
	font-size: 23px;
	font-weight: 600;
	color: var(--cavh-navy);
}

.cavh-kapitel__btn:nth-child(4n+2) .cavh-kapitel__zahl { background: var(--cavh-tint-honey); }
.cavh-kapitel__btn:nth-child(4n+3) .cavh-kapitel__zahl { background: var(--cavh-tint-teal); }
.cavh-kapitel__btn:nth-child(4n+4) .cavh-kapitel__zahl { background: var(--cavh-tint-berry); }

.cavh-kapitel__btn--nur-text .cavh-kapitel__label {
	font-size: 12.5px;
	color: var(--cavh-meta);
}

/* Schon gehörte Seiten (vor der aktuellen Stelle): Häkchen */
.cavh-kapitel__btn.is-gehoert::after {
	content: "\2713";
	position: absolute;
	top: -8px;
	right: -8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--cavh-teal);
	border: 2px solid var(--cavh-white);
	color: var(--cavh-white);
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

/* Aktuelle Seite */
.cavh-main .cavh-kapitel__btn.is-aktiv,
.cavh-main .cavh-kapitel__btn.is-aktiv:hover,
.cavh-main .cavh-kapitel__btn.is-aktiv:focus {
	border-color: var(--cavh-berry);
	color: var(--cavh-berry);
	box-shadow: 0 0 0 3px rgba(140, 74, 92, 0.16), 0 14px 26px -18px rgba(140, 74, 92, 0.8);
	transform: translateY(-2px);
}

.cavh-main .cavh-kapitel__btn.is-aktiv .cavh-kapitel__zahl {
	background: var(--cavh-berry);
	color: var(--cavh-white);
}

.cavh-main .cavh-kapitel__btn--nur-text.is-aktiv .cavh-kapitel__label {
	color: var(--cavh-berry);
}

.cavh-kapitel__btn.is-aktiv::before {
	content: "Jetzt";
	position: absolute;
	z-index: 1;
	top: -11px;
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 9px;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-berry);
	color: var(--cavh-white);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1.2;
	white-space: nowrap;
}

.cavh-spieler__tipp {
	margin: 16px 0 0;
	padding: 10px 14px;
	border-radius: var(--cavh-radius-sm);
	background: var(--cavh-tint-berry);
	font-size: 14.5px;
	font-weight: 700;
	color: var(--cavh-berry);
}

/* =====================================================================
 * 9. Märchen-Liste (Karten-Raster)
 * =================================================================== */

.cavh-main .cavh-liste__titel {
	font-size: 24px;
	margin: 4px 0 14px;
}

.cavh-maerchen {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}

.cavh-maerchen__item {
	display: flex;
	margin: 0;
	padding: 0;
}

.cavh-main .cavh-karte,
.cavh-main .cavh-karte:hover,
.cavh-main .cavh-karte:focus {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 9px 9px 12px;
	text-align: left;
	text-transform: none;
	background: var(--cavh-white);
	border: 2px solid var(--cavh-card-border);
	border-radius: var(--cavh-radius-card);
	box-shadow: var(--cavh-shadow-card);
	font-family: var(--cavh-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--cavh-ink);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: border-color .15s ease, box-shadow .2s ease, transform .2s var(--cavh-ease-bounce);
}

.cavh-main .cavh-karte:hover {
	border-color: rgba(42, 58, 82, 0.28);
	box-shadow: var(--cavh-shadow-md);
	transform: translateY(-3px);
}

.cavh-main .cavh-karte:active {
	transform: scale(.98);
}

.cavh-karte__bild {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: var(--cavh-tint-honey);
}

.cavh-maerchen__item:nth-child(5n+2) .cavh-karte__bild { background: var(--cavh-tint-teal); }
.cavh-maerchen__item:nth-child(5n+3) .cavh-karte__bild { background: var(--cavh-tint-berry); }
.cavh-maerchen__item:nth-child(5n+4) .cavh-karte__bild { background: var(--cavh-tint-navy); }
.cavh-maerchen__item:nth-child(5n+5) .cavh-karte__bild { background: var(--cavh-tint-green); }

/* Strichzeichnung: Weiß wird zur Pastellfläche dahinter. */
.cavh-karte__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: multiply;
}

.cavh-karte__nr {
	position: absolute;
	top: 8px;
	left: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--cavh-white);
	color: var(--cavh-navy);
	font-family: var(--cavh-font-head);
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 4px 10px -6px rgba(42, 58, 82, 0.6);
}

/* Ohne Titelbild: große Zahl in der Mitte */
.cavh-karte--ohne-bild .cavh-karte__nr {
	position: static;
	width: 58px;
	height: 58px;
	font-size: 28px;
	box-shadow: 0 10px 20px -12px rgba(42, 58, 82, 0.5);
}

.cavh-karte__status {
	position: absolute;
	right: 8px;
	bottom: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding-left: 2px;
	border-radius: 50%;
	background: var(--cavh-white);
	color: var(--cavh-navy);
	font-size: 13px;
	line-height: 1;
	box-shadow: 0 6px 14px -6px rgba(42, 58, 82, 0.6);
	transition: background .15s ease, color .15s ease;
}

.cavh-karte.is-fertig .cavh-karte__status {
	padding-left: 0;
	background: var(--cavh-teal);
	color: var(--cavh-white);
	font-size: 17px;
	font-weight: 800;
}

.cavh-karte__jetzt {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 4px 10px;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-berry);
	color: var(--cavh-white);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .03em;
	line-height: 1.2;
}

.cavh-karte__kopf {
	flex: 1;
	display: block;
	padding: 10px 4px 0;
}

.cavh-karte__text {
	display: block;
	min-width: 0;
}

.cavh-karte__titel {
	display: block;
	font-family: var(--cavh-font-head);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--cavh-navy);
	overflow-wrap: anywhere;
}

.cavh-karte__meta {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cavh-meta);
}

.cavh-karte__seiten::before {
	content: "\00B7";
	margin: 0 6px;
}

.cavh-karte__balken {
	display: block;
	height: 8px;
	margin: 12px 4px 0;
	border-radius: var(--cavh-radius-pill);
	background: var(--cavh-hafer-3);
	overflow: hidden;
}

.cavh-karte__fuellung {
	display: block;
	height: 100%;
	width: 0;
	border-radius: var(--cavh-radius-pill);
	background: linear-gradient(90deg, var(--cavh-navy-3), var(--cavh-navy));
	transition: width .3s linear;
}

.cavh-karte.is-fertig .cavh-karte__fuellung {
	background: var(--cavh-teal);
}

/* Aktive Karte */
.cavh-main .cavh-karte.is-aktiv,
.cavh-main .cavh-karte.is-aktiv:hover,
.cavh-main .cavh-karte.is-aktiv:focus {
	border-color: var(--cavh-berry);
	box-shadow: 0 0 0 3px rgba(140, 74, 92, 0.15), 0 18px 34px -22px rgba(140, 74, 92, 0.7);
}

.cavh-karte.is-aktiv .cavh-karte__jetzt {
	display: inline-block;
}

.cavh-karte.is-aktiv:not(.is-fertig) .cavh-karte__status {
	background: var(--cavh-berry);
	color: var(--cavh-white);
}

.cavh-main .cavh-karte:focus-visible {
	outline: 3px solid var(--cavh-navy);
	outline-offset: 3px;
}

@media (max-width: 380px) {
	.cavh-maerchen {
		grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
		gap: 10px;
	}
	.cavh-karte__titel {
		font-size: 15.5px;
	}
}

/* =====================================================================
 * 10. Konto-Endpunkt „Meine Hörspiele"
 * =================================================================== */

.cavh-konto {
	color: var(--cavh-ink);
	font-family: var(--cavh-font-body);
}

.cavh-konto__kopf {
	margin-bottom: 20px;
}

.cavh-konto .cavh-reihe {
	margin-bottom: 10px;
}

.cavh-konto .cavh-konto__titel {
	font-size: 28px;
	margin: 0 0 6px;
}

.cavh-konto__unter {
	margin: 0;
	color: var(--cavh-ink-2);
	font-size: 16px;
}

.cavh-konto__leer {
	background:
		radial-gradient(120% 90% at 0% 0%, rgba(217, 164, 65, 0.14) 0%, rgba(217, 164, 65, 0) 60%),
		var(--cavh-white);
	border: 1px solid var(--cavh-card-border);
	border-radius: var(--cavh-radius-card);
	box-shadow: var(--cavh-shadow-card);
	padding: 30px 24px 32px;
	text-align: center;
	color: var(--cavh-ink-2);
}

.cavh-konto__leer p {
	max-width: 460px;
	margin: 0 auto 16px;
}

.cavh-konto__leer .cavh-konto__leer-titel {
	margin-bottom: 8px;
	font-size: 20px;
}

.cavh-konto__leer-titel strong {
	font-family: var(--cavh-font-head);
	font-weight: 600;
	color: var(--cavh-navy);
}

.cavh-konto__bild {
	display: block;
	width: 160px;
	height: auto;
	margin: 0 auto 14px;
}

.cavh-ill__schatten { fill: rgba(42, 58, 82, 0.08); }
.cavh-ill__grund { fill: var(--cavh-tint-honey); }
.cavh-ill__buegel {
	fill: none;
	stroke: var(--cavh-navy);
	stroke-width: 7;
	stroke-linecap: round;
}
.cavh-ill__muschel { fill: var(--cavh-navy); }
.cavh-ill__stift { fill: var(--cavh-berry); }
.cavh-ill__band { fill: var(--cavh-honey); }
.cavh-ill__holz { fill: #F2D9AE; }
.cavh-ill__mine { fill: var(--cavh-navy); }
.cavh-ill__stern { fill: var(--cavh-honey); }

.cavh-konto__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.cavh-konto a.cavh-konto-karte,
.cavh-konto a.cavh-konto-karte:hover,
.cavh-konto a.cavh-konto-karte:focus {
	display: flex;
	gap: 18px;
	align-items: center;
	padding: 16px;
	color: inherit;
	text-decoration: none !important;
	transition: border-color .15s ease, box-shadow .2s ease, transform .2s var(--cavh-ease-bounce);
}

.cavh-konto a.cavh-konto-karte:hover {
	border-color: rgba(140, 74, 92, 0.4);
	box-shadow: var(--cavh-shadow-md);
	transform: translateY(-3px);
}

.cavh-konto-karte__rahmen {
	flex: none;
	display: block;
	width: 96px;
	padding: 8px;
	border-radius: 14px;
	background: var(--cavh-tint-berry);
	transform: rotate(-3deg);
	transition: transform .3s var(--cavh-ease-bounce);
}

.cavh-konto-karte:nth-child(3n+2) .cavh-konto-karte__rahmen { background: var(--cavh-tint-honey); }
.cavh-konto-karte:nth-child(3n+3) .cavh-konto-karte__rahmen { background: var(--cavh-tint-teal); }

.cavh-konto-karte:hover .cavh-konto-karte__rahmen {
	transform: rotate(-1deg);
}

.cavh-konto-karte__cover {
	display: block;
	width: 100%;
	height: auto;
	padding: 5px;
	border-radius: 8px;
	background: var(--cavh-white);
	box-shadow: inset 4px 0 0 rgba(42, 58, 82, 0.06), 0 12px 22px -14px rgba(42, 58, 82, 0.6);
}

.cavh-konto-karte__cover--leer {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 120 / 170;
	color: var(--cavh-navy);
}

.cavh-konto-karte__text {
	flex: 1;
	min-width: 0;
	display: block;
}

.cavh-konto-karte__name {
	display: block;
	font-family: var(--cavh-font-head);
	font-size: 19px;
	font-weight: 600;
	color: var(--cavh-navy);
	line-height: 1.2;
}

.cavh-konto-karte__meta {
	display: block;
	font-size: 13.5px;
	color: var(--cavh-meta);
	margin: 4px 0 14px;
}

.cavh-konto .cavh-konto-karte__btn {
	min-height: 44px;
	padding: 10px 20px;
	font-size: 14.5px;
}

.cavh-konto-karte:hover .cavh-konto-karte__btn {
	background: var(--cavh-navy-hover);
}

/* =====================================================================
 * 11. Mobiler Feinschliff, Bewegung, Druck
 * =================================================================== */

@media (max-width: 560px) {
	.cavh-seite {
		padding: 14px 12px 46px;
	}
	.cavh-held {
		padding: 28px 16px 26px;
	}
	.cavh-held__stift {
		width: 96px;
		right: -12px;
	}
	.cavh-spieler {
		padding: 18px 16px 20px;
	}
	.cavh-kapitel {
		margin: 0 -16px;
		padding-left: 16px;
		padding-right: 16px;
		scroll-padding-inline: 16px;
	}
	.cavh-steuerung {
		gap: 16px;
	}
	.cavh-main .cavh-rund {
		width: 56px;
		height: 56px;
	}
	.cavh-main .cavh-rund--gross,
	.cavh-main .cavh-rund--gross:hover,
	.cavh-main .cavh-rund--gross:focus {
		width: 86px;
		height: 86px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cavh-main *,
	.cavh-main *::before,
	.cavh-main *::after,
	.cavh-konto *,
	.cavh-konto *::before,
	.cavh-konto *::after {
		transition-duration: .001ms !important;
		animation: none !important;
	}
	.cavh-held:hover .cavh-buch {
		transform: rotate(-3deg);
	}
}

@media print {
	.cavh-spieler,
	.cavh-maerchen,
	.cavh-claim {
		display: none !important;
	}
}

/* Ausbaustufe 2: Einstiege in App/Elternbereich im Konto-Endpunkt. */
.cavh-konto__app {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 22px;
}
