/* Tracks als Karussell (Viktor 12.11.2026): Mitte gross, zwei Nachbarn kleiner und abgedunkelt dahinter.
   Wirkt nur, wenn js/karussell.js .is-karussell setzt; ohne JS bleibt die Liste aus site.css. Erweiterung um einen 4./5. Track: nur im HTML einen li ergänzen. */
.karussell { container-type: inline-size; overflow-x: hidden; overflow-x: clip; }   /* Nachbarn werden am Rand der Spalte angeschnitten, kein waagrechtes Scrollen der Seite */
.is-karussell ol { grid-template-columns: minmax(0, 1fr); gap: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; padding-block: 6px; }
.listen__list.is-karussell ol > li { grid-area: 1 / 1; justify-self: center; align-self: start; width: min(62%, 320px); transform-origin: 50% 50%;
  transition: transform 560ms var(--ease-out), opacity 560ms var(--ease-out), filter 560ms var(--ease-out); transition-delay: 0s; }   /* Delay aus der Einblendung (.js-reveal) hier aus */
.listen__list.is-karussell ol > li[data-pos="m"] { z-index: 3; transform: none; }
.listen__list.is-karussell ol > li[data-pos="l"], .listen__list.is-karussell ol > li[data-pos="r"] { z-index: 2; filter: brightness(.55); cursor: pointer; }
.listen__list.is-karussell ol > li[data-pos="l"] { transform: translateX(-80%) scale(.72); }
.listen__list.is-karussell ol > li[data-pos="r"] { transform: translateX(80%) scale(.72); }
.listen__list.is-karussell ol > li[data-pos="l"]:hover, .listen__list.is-karussell ol > li[data-pos="r"]:hover { filter: brightness(.78); }
.listen__list.is-karussell ol > li[data-pos="ll"], .listen__list.is-karussell ol > li[data-pos="rr"] { z-index: 1; opacity: 0; pointer-events: none; filter: brightness(.3); }   /* ab dem 4. Track: weitere warten unsichtbar dahinter */
.listen__list.is-karussell ol > li[data-pos="ll"] { transform: translateX(-110%) scale(.5); }
.listen__list.is-karussell ol > li[data-pos="rr"] { transform: translateX(110%) scale(.5); }

.is-karussell .listen__item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 0; background: none; align-items: baseline; }
.is-karussell .listen__item:hover, .is-karussell .listen__item[aria-expanded="true"] { background: none; }
.is-karussell .listen__mini { grid-column: 1 / -1; grid-row: 1; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; box-shadow: 0 16px 44px rgb(0 0 0 / .6); }
.is-karussell .listen__t { font-size: 20px; line-height: 1.2; }
.is-karussell .listen__t, .is-karussell .listen__d { transition: opacity 300ms var(--ease-out); }
.listen__list.is-karussell ol > li:not([data-pos="m"]) .listen__t, .listen__list.is-karussell ol > li:not([data-pos="m"]) .listen__d { opacity: 0; }   /* Nachbarn zeigen nur das Cover */
.listen__list.is-karussell ol > li[data-pos="m"] .listen__item[aria-expanded="false"]::after { content: ''; grid-column: 1 / -1; grid-row: 1; place-self: center; width: 68px; height: 68px; border-radius: 50%;
  border: 2px solid #fff; background: rgb(10 10 10 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.5 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 60% no-repeat;
  transition: background-color 160ms var(--ease-out); pointer-events: none; }   /* Spielzeichen: Klick auf die Mitte spielt */
.listen__list.is-karussell ol > li[data-pos="m"] .listen__item:hover::after { background-color: rgb(109 191 75 / .85); }
.is-karussell .listen__box:has(.player__frame) { width: 100cqw; margin: 16px 0 0 calc((100% - 100cqw) / 2); }   /* Player in Spaltenbreite unter der Mitte, wie die aufgeklappte Zeile heute */

.karussell__nav { position: relative; display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; }
.karussell__btn { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid var(--green); background: rgb(10 10 10 / .6); color: var(--green); cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.karussell__btn:hover { background: var(--green); color: var(--bg); }
.karussell__btn:active { transform: scale(.94); }
.karussell__stand { min-width: 56px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; font-size: 16px; }
.karussell__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 599px) { .listen__list.is-karussell ol > li { width: min(60%, 320px); } .is-karussell .listen__t { font-size: 18px; } }   /* Telefon: die Nachbarn ragen deutlicher an den Rand */
@media (max-width: 599px) { .karussell { margin-inline: -20px; } .is-karussell .listen__box:has(.player__frame) { width: calc(100cqw - 40px); margin-left: calc((100% - 100cqw + 40px) / 2); } }   /* Telefon: Bühne bis an den Bildschirmrand (.wrap-Rand 20 px), die Nachbarn werden am Rand angeschnitten; Player bleibt auf Seitenrand */
@media (prefers-reduced-motion: reduce) { .listen__list.is-karussell ol > li, .karussell__btn, .is-karussell .listen__t, .is-karussell .listen__d { transition: none; } .karussell__btn:active { transform: none; } }

/* Viktor 13.11.: Platz bei den Tracks nutzen, Karussell bis ganz an den Seitenrand, Player darunter am grössten.
   Ab 600 px bricht die Bühne aus der Spalte auf die volle Fensterbreite aus (--kar-l/--kar-w aus karussell.js); Mitte gross, je ein Nachbar ganz, je einer am Rand angeschnitten. */
@media (min-width: 600px) {
  .karussell { width: var(--kar-w, 100%); margin-left: calc(-1 * var(--kar-l, 0px)); }
  .listen__list.is-karussell ol > li { width: clamp(240px, 30vw, 440px); }
  .listen__list.is-karussell ol > li[data-pos="l"] { transform: translateX(-100%) scale(.8); }
  .listen__list.is-karussell ol > li[data-pos="r"] { transform: translateX(100%) scale(.8); }
  .listen__list.is-karussell ol > li[data-pos="l2"], .listen__list.is-karussell ol > li[data-pos="r2"] { z-index: 1; filter: brightness(.4); cursor: pointer; }
  .listen__list.is-karussell ol > li[data-pos="l2"] { transform: translateX(-182%) scale(.65); }
  .listen__list.is-karussell ol > li[data-pos="r2"] { transform: translateX(182%) scale(.65); }
  .listen__list.is-karussell ol > li[data-pos="ll"] { transform: translateX(-240%) scale(.5); }
  .listen__list.is-karussell ol > li[data-pos="rr"] { transform: translateX(240%) scale(.5); }
  .is-karussell .listen__box:has(.player__frame) { width: min(calc(var(--kar-w, 100cqw) - 40px), 1280px); margin-left: calc((100% - min(calc(var(--kar-w, 100cqw) - 40px), 1280px)) / 2); }
}
@media (max-width: 599px) { .listen__list.is-karussell ol > li[data-pos="l2"], .listen__list.is-karussell ol > li[data-pos="r2"] { z-index: 1; opacity: 0; pointer-events: none; } .listen__list.is-karussell ol > li[data-pos="l2"] { transform: translateX(-110%) scale(.5); } .listen__list.is-karussell ol > li[data-pos="r2"] { transform: translateX(110%) scale(.5); } }
/* Die breite Bühne darf die Spalten nicht aufweiten (sonst wandert die Liste und --kar-l stimmt nicht mehr) */
@media (min-width: 600px) { .listen__list.is-karussell { min-width: 0; } }
/* Viktor 13.11. Skizze: Titel «Tracks» links an den Inhaltsrand (--kar-sp aus karussell.js) */
.listen__list.is-karussell h2 { margin-left: calc(-1 * var(--kar-sp, 0px)); }
@media (min-width: 900px) { .listen__in:has(.is-karussell) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1600px) { .listen__in:has(.is-karussell) { grid-template-columns: minmax(0, 1fr); } }

/* Die breite Inhaltsbühne ersetzt den per JS berechneten Fensterausbruch. */
@media (min-width: 1600px) {
  .karussell { width: 100%; margin-left: 0; }
  .listen__list.is-karussell h2 { margin-left: 0; }
  .listen__list.is-karussell ol > li { width: min(clamp(300px, 20vw, 640px), calc(100svh - 440px)); }
  .is-karussell .listen__t { font-size: clamp(22px, 1vw, 28px); }
  /* Korrektur 13.11. (Prüfer vor Live): Player nie höher als das Fenster und höchstens 1280 px breit wie zuvor live */
  /* 14.11.2026 (Prüfer Korrektur 2, Auffälligkeit 1): 220 statt 180 px abziehen, damit die 48-px-Pfeile unter dem Player bei 1600×900 ganz im Fenster liegen (site.js stellt den Player mittig unter den 60-px-Kopf; Pfeile enden 72 px unter dem Player: 204 px = bündig, 220 px = 8 px Luft) */
  .is-karussell .listen__box:has(.player__frame) { width: min(100cqw, 1280px, calc((100svh - 220px) * 16 / 9)); margin-left: calc((100% - min(100cqw, 1280px, calc((100svh - 220px) * 16 / 9))) / 2); }
}
