/* Rhythmusfeuer Play Along Player */
.rfpa {
	--rfpa-farbe: #0a951f;
	--rfpa-akzent: #de2a29;
	--rfpa-dunkel: #002c5d;
	--rfpa-hell: #f3fbef;
	--rfpa-linie: #d5e9cd;
	box-sizing: border-box;
	max-width: 760px;
	margin: 1.5em auto 2em;
	padding: 22px 22px 18px;
	background: #fff;
	border: 3px solid var(--rfpa-dunkel);
	border-radius: 22px;
	box-shadow: 0 5px 0 var(--rfpa-dunkel);
	color: var(--rfpa-dunkel);
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
}
.rfpa *, .rfpa *::before, .rfpa *::after { box-sizing: border-box; }

.rfpa__kopf { margin: 0 0 14px; }
.rfpa__label { display: inline-flex; align-items: center; line-height: 1; background: var(--rfpa-akzent); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .4em .75em .34em; border-radius: 999px; }
.rfpa .rfpa__titel { margin: .3em 0 0 !important; padding: 0 !important; font-size: clamp(1.5rem, 4.5vw, 2.1rem) !important; line-height: 1.1 !important; color: var(--rfpa-farbe) !important; text-transform: none; border: 0 !important; }
.rfpa .rfpa__titel::after, .rfpa .rfpa__titel::before { display: none !important; }

.rfpa__gruppe { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.rfpa__gruppe legend { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0 0 8px; font-weight: 800; font-size: 1rem; color: var(--rfpa-dunkel); }
.rfpa__nr { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--rfpa-dunkel); color: #fff; font-size: .9rem; }
.rfpa__optionen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.rfpa__option { position: relative; display: block; margin: 0; cursor: pointer; }
.rfpa__option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rfpa__option > span {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-height: 64px; padding: 10px 8px; text-align: center;
	background: var(--rfpa-hell); border: 3px solid var(--rfpa-linie); border-radius: 14px;
	transition: background .15s, border-color .15s, transform .1s;
}
.rfpa__option strong { font-size: 1.25rem; line-height: 1; font-weight: 800; color: var(--rfpa-dunkel); }
.rfpa__option small { font-size: .78rem; color: #5d6b62; font-weight: 600; }
.rfpa__option:hover > span { border-color: var(--rfpa-farbe); }
.rfpa__option input:checked + span { background: var(--rfpa-farbe); border-color: var(--rfpa-farbe); transform: translateY(-1px); box-shadow: 0 3px 0 var(--rfpa-dunkel); }
.rfpa__option input:checked + span strong, .rfpa__option input:checked + span small { color: #fff; }
.rfpa__option input:focus-visible + span { outline: 3px solid var(--rfpa-akzent); outline-offset: 2px; }
.rfpa__option.is-leer > span { opacity: .55; border-style: dashed; }
.rfpa__option input:disabled + span { opacity: .4; cursor: not-allowed; border-style: dashed; }
.rfpa__balken { display: inline-flex; gap: 3px; margin-bottom: 3px; font-style: normal; }
.rfpa__balken b { display: block; width: 7px; height: 13px; border-radius: 2px; background: var(--rfpa-linie); }
.rfpa__balken b.an { background: var(--rfpa-akzent); }
.rfpa__option input:checked + span .rfpa__balken b { background: rgba(255,255,255,.35); }
.rfpa__option input:checked + span .rfpa__balken b.an { background: #fff; }

.rfpa__player { display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 4px; background: var(--rfpa-dunkel); border-radius: 16px; color: #fff; }
.rfpa__knopf {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; padding: 0; margin: 0; border: 0; border-radius: 50%;
	background: var(--rfpa-akzent); color: #fff; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.3);
	transition: transform .1s, filter .15s; -webkit-tap-highlight-color: transparent;
}
.rfpa__knopf svg { width: 24px; height: 24px; fill: currentColor; }
.rfpa__knopf:hover:not(:disabled) { filter: brightness(1.08); }
.rfpa__knopf:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.rfpa__knopf:disabled { opacity: .4; cursor: not-allowed; }
.rfpa__knopf:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rfpa__stop { width: 44px; height: 44px; background: rgba(255,255,255,.16); }
.rfpa__stop svg { width: 18px; height: 18px; }
.rfpa__icon-pause { display: none; }
.rfpa.is-spielt .rfpa__icon-play { display: none; }
.rfpa.is-spielt .rfpa__icon-pause { display: block; }

.rfpa__zeitleiste { flex: 1; min-width: 0; }
.rfpa__zeiten { display: flex; justify-content: space-between; font-size: .82rem; font-variant-numeric: tabular-nums; opacity: .85; margin-top: 2px; }
.rfpa__spulen {
	-webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 0; padding: 0;
	background: transparent; cursor: pointer; --rfpa-pos: 0%;
}
.rfpa__spulen:disabled { cursor: not-allowed; opacity: .5; }
.rfpa__spulen::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--rfpa-farbe) var(--rfpa-pos), rgba(255,255,255,.25) var(--rfpa-pos)); }
.rfpa__spulen::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); }
.rfpa__spulen::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--rfpa-farbe); }
.rfpa__spulen::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: #fff; border: 4px solid var(--rfpa-farbe); }
.rfpa__spulen::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--rfpa-farbe); }
.rfpa__spulen:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

.rfpa__loop { flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: rgba(255,255,255,.55); margin: 0; }
.rfpa__loop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rfpa__loop svg { width: 22px; height: 22px; fill: currentColor; }
.rfpa__loop:has(input:checked) { color: #fff; background: var(--rfpa-farbe); }
.rfpa__loop.is-an { color: #fff; background: var(--rfpa-farbe); }
.rfpa__loop:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }
.rfpa__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rfpa__status { min-height: 1.4em; margin: 8px 2px 0 !important; font-size: .92rem; font-weight: 600; color: #5d6b62; }
.rfpa__status.is-hinweis { color: var(--rfpa-akzent); }
.rfpa__status:empty { display: none; }
.rfpa__audio { display: none; }
.rfpa__noscript { margin: 10px 0 0; }

@media (max-width: 520px) {
	.rfpa { padding: 16px 14px 14px; border-radius: 18px; }
	.rfpa__optionen { gap: 6px; }
	.rfpa__option > span { min-height: 58px; padding: 8px 4px; }
	.rfpa__option strong { font-size: 1.05rem; }
	.rfpa__player { flex-wrap: wrap; gap: 8px; }
	.rfpa__zeitleiste { order: 3; flex-basis: 100%; }
	.rfpa__loop { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .rfpa * { transition: none !important; } }

/* Tempo: Voreinstellungen + genaue Zahl (wie beim Rhythmusgenerator) */
.rfpa__tempo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.rfpa__tempi { display: inline-flex; background: var(--rfpa-hell); border: 3px solid var(--rfpa-linie); border-radius: 999px; padding: 3px; }
.rfpa__tempi label { margin: 0; cursor: pointer; }
.rfpa__tempi input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rfpa__tempi span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: .95rem; color: var(--rfpa-dunkel); line-height: 1.2; }
.rfpa__tempi input:checked + span { background: var(--rfpa-farbe); color: #fff; }
.rfpa__tempi input:focus-visible + span { outline: 3px solid var(--rfpa-akzent); outline-offset: 1px; }
.rfpa__bpm { display: inline-flex; align-items: center; gap: 10px; }
.rfpa__bpm button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--rfpa-dunkel); background: #fff; color: var(--rfpa-dunkel); font-size: 1.5rem; font-weight: 800; line-height: 1; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; padding: 0; }
.rfpa__bpm button:hover { background: var(--rfpa-hell); }
.rfpa__bpm label { display: flex; flex-direction: column; align-items: center; margin: 0; }
.rfpa__bpm input { width: 3.2em; padding: 0; border: 0; border-bottom: 3px solid var(--rfpa-linie); background: transparent; text-align: center; font-size: 2rem; font-weight: 800; line-height: 1.05; color: var(--rfpa-dunkel); -moz-appearance: textfield; appearance: textfield; }
.rfpa__bpm input::-webkit-outer-spin-button, .rfpa__bpm input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rfpa__bpm input:focus { outline: none; border-bottom-color: var(--rfpa-farbe); }
.rfpa__bpm small { font-size: .72rem; font-weight: 700; color: #5d6b62; white-space: nowrap; }

/* Tempo eintippen */
.rf-tap { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 150px; min-height: 56px; margin: 0; align-self: center; padding: 8px 18px; border-radius: 14px; border: 3px solid var(--rfpa-dunkel, #002c5d); background: #fff; color: var(--rfpa-dunkel, #002c5d); font: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.rf-tap[hidden] { display: none; }
.rf-tap:hover { background: var(--rfpa-hell, #f3fbef); }
.rf-tap__text { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.rf-tap__hinweis { font-size: .75rem; font-weight: 700; color: #5d6b62; line-height: 1.1; }
.rf-tap.is-aktiv { border-color: var(--rfpa-akzent, #de2a29); }
.rf-tap.is-schlag { animation: rf-tap-schlag .18s ease-out; }
@keyframes rf-tap-schlag { 0% { transform: scale(.94); background: #ffe9e9; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .rf-tap.is-schlag { animation: none; } }

/* Version mit/ohne Melodie: zwei Knöpfe */
.rfpa__optionen--zwei { grid-template-columns: repeat(2, 1fr); }
