/* ---------- Grundlagen ---------- */

:root {
  --bg: #F5F5F7;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #F0F0F2;
  --label: #1D1D1F;
  --label-secondary: #6E6E73;
  --label-tertiary: #86868B;
  --separator: #D2D2D7;
  --accent: #0071E3;
  --accent-pressed: #0077ED;
  --success: #248A3D;
  --danger: #D70015;

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.12);
  --glass-fallback: rgba(255, 255, 255, 0.96);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --bg-elevated-2: #2C2C2E;
    --label: #F5F5F7;
    --label-secondary: #98989D;
    --label-tertiary: #6E6E73;
    --separator: #38383A;
    --accent: #0A84FF;
    --accent-pressed: #0A84FF;
    --success: #30D158;
    --danger: #FF453A;

    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-fallback: rgba(28, 28, 30, 0.96);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  /* Lange Wörter und E-Mail-Adressen brechen um, statt die Seite auf dem
     Handy breiter zu machen. Seitlich gescrollt wird nirgends. */
  overflow-wrap: break-word;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.52;
  letter-spacing: -0.008em;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  margin: 0;
}

/* Grid- und Flex-Kinder dürfen kleiner werden als ihr Inhalt; sonst
   sprengt ein langes Wort oder ein breites Bild die Spalte. */
.abschnitt,
.galerie,
.filter-chips,
.warenkorb-position,
.wahl-karte {
  min-width: 0;
}

/* ---------- Typenskala ---------- */

.display {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.022em;
}

h1, .h1 {
  font-size: 32px;
  line-height: 1.10;
  font-weight: 600;
  letter-spacing: -0.020em;
  margin: 0;
}

h2, .h2 {
  font-size: 25px;
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0;
}

h3, .h3 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0;
}

.klein {
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.caption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--label-secondary);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1080px) {
  .display { font-size: 64px; }
  h1, .h1 { font-size: 48px; }
  h2, .h2 { font-size: 34px; }
}

/* ---------- Layout ---------- */

.abschnitt {
  padding: 0 20px;
  margin: 0 auto;
  max-width: 1080px;
}

.abschnitt + .abschnitt {
  margin-top: 64px;
}

@media (min-width: 1080px) {
  .abschnitt + .abschnitt {
    margin-top: 120px;
  }
}

.abschnitt-kopf {
  margin-bottom: 24px;
  max-width: 44ch;
}

.abschnitt-kopf p {
  color: var(--label-secondary);
  margin: 8px 0 0;
}

/* ---------- Glas ---------- */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass { background: var(--glass-fallback); }
}

@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--bg-elevated); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Kopfzeile ---------- */

.kopfzeile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* 56px, damit die Knöpfe darin volle 44px Tippfläche haben */
  height: 56px;
  /* Drei Spalten: Knopf links, Logo mittig, Symbole rechts.
     minmax(0, 1fr) hält die Außenspalten exakt gleich breit — sonst sitzt
     das Logo nicht wirklich in der Mitte. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 20px;
  border-bottom: 0.5px solid var(--glass-border);
}

.kopfzeile-logo {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.008em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* Immer nur das Kartensymbol — die Beschriftung steckt im aria-label
   und steht ausgeschrieben im Menü und in den Abschnitten. */
.kopfzeile-cta {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  position: relative;
  overflow: hidden;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1),
              opacity 400ms cubic-bezier(0.32, 0.72, 0, 1);
}

.kopfzeile-cta svg {
  width: 22px;
  height: 22px;
}

.kopfzeile-cta:active {
  transform: scale(0.97);
}

.kopfzeile-cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Logo-Auftritt beim ersten Besuch ----------
   „Quick Information" steht kurz oben und zieht sich dann zu „QuInf" zusammen.
   Knopf und Symbole bleiben dabei im Layout stehen und werden nur ausgeblendet —
   so verrutscht beim Einblenden nichts, und das Logo bleibt die ganze Zeit mittig. */

.kopfzeile.zeigt-intro .kopfzeile-cta,
.kopfzeile.zeigt-intro .kopfzeile-rechts {
  opacity: 0;
  pointer-events: none;
}

.kopfzeile-logo .nh-rest,
.kopfzeile-logo .nh-luecke {
  display: inline-block;
  overflow: hidden;
  white-space: pre;
  vertical-align: bottom;
  width: 0;
  opacity: 0;
  color: var(--label-secondary);
}

.kopfzeile-logo.spielt-intro .nh-rest,
.kopfzeile-logo.spielt-intro .nh-luecke {
  animation: logo-einklappen 2.8s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

@keyframes logo-einklappen {
  0%, 45% { width: var(--breite); opacity: 1; }
  75%, 100% { width: 0; opacity: 0; }
}

/* Ein kurzer Lichtstreifen wandert alle paar Sekunden über den Knopf. */
.kopfzeile-cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: cta-schimmer 4.5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes cta-schimmer {
  0% { left: -60%; }
  30%, 100% { left: 115%; }
}

/* ---------- Kopfzeile rechts: Warenkorb und Menü ---------- */

.kopfzeile-rechts {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: opacity 400ms cubic-bezier(0.32, 0.72, 0, 1);
}

.kopfzeile-warenkorb {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--label);
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.kopfzeile-warenkorb:active {
  transform: scale(0.97);
}

.kopfzeile-warenkorb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

.kopfzeile-warenkorb svg {
  width: 22px;
  height: 22px;
}

.warenkorb-punkt {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Menü-Knopf (drei Striche) ---------- */

.menue-knopf {
  width: 44px;
  height: 44px;
  margin-right: -8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menue-knopf span {
  display: block;
  width: 19px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--label);
  transition: transform 250ms cubic-bezier(0.32, 0.72, 0, 1),
              opacity 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.menue-knopf:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

.menue-knopf.ist-offen span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menue-knopf.ist-offen span:nth-child(2) { opacity: 0; }
.menue-knopf.ist-offen span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Menü ----------
   Deckt die Seite vollständig ab: undurchsichtig, damit vom Inhalt dahinter
   nichts durchscheint oder zu wandern scheint. */

.menue-overlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--bg);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: transform 350ms cubic-bezier(0.32, 0.72, 0, 1),
              opacity 350ms cubic-bezier(0.32, 0.72, 0, 1);
}

.menue-overlay.ist-offen {
  opacity: 1;
  transform: translateY(0);
}

.menue-liste {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.menue-knopf-eintrag {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  color: var(--label);
  font-size: 17px;
  font-weight: 500;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.menue-knopf-eintrag:active {
  transform: scale(0.97);
}

.menue-knopf-eintrag:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Der eine wichtige Knopf im Menü */
.menue-knopf-eintrag.ist-primaer {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.menue-knopf-eintrag[aria-current="page"] {
  color: var(--label-secondary);
}

.menue-knopf-eintrag svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.menue-eintrag-zahl {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menue-fuss {
  display: flex;
  gap: 20px;
  max-width: 480px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 0.5px solid var(--separator);
}

.menue-fuss a {
  color: var(--label-secondary);
  font-size: 15px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ---------- Hero ---------- */

.hero {
  padding: 76px 20px 0;
  text-align: center;
}

.hero h1 {
  max-width: 20ch;
  margin: 0 auto;
}

.hero p {
  color: var(--label-secondary);
  max-width: 40ch;
  margin: 16px auto 0;
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Tap-Animation: Erst sieht man nur die NFC-Karte. Dann kommt das Handy von unten,
   stößt mit einem kurzen Nudge dagegen und bekommt die QuInf-Benachrichtigung. */

.tap-szene {
  margin: 32px auto 0;
  width: 100%;
  max-width: 240px;
  height: 290px;
  position: relative;
  overflow: hidden;
}

.tap-karte {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: 132px;
  height: 84px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #34AADC);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
}

.tap-karte-logo {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tap-karte-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.85);
}

.tap-karte-nfc {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.tap-karte-icon {
  width: 18px;
  height: 18px;
}

.tap-karte-icon svg {
  width: 100%;
  height: 100%;
}

.tap-ring {
  position: absolute;
  z-index: 2;
  top: 70px;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  animation: tap-ring-puls 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.tap-telefon {
  position: absolute;
  z-index: 3;
  width: 140px;
  height: 208px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.4);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  left: 50%;
  top: 300px;
  transform: translateX(-50%);
  animation: tap-telefon-bewegung 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@media (prefers-color-scheme: dark) {
  .tap-telefon {
    background: rgba(28, 28, 30, 0.45);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.tap-telefon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.tap-benachrichtigung {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 104px;
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  animation: tap-benachrichtigung-erscheinen 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.tap-benachrichtigung-icon {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tap-benachrichtigung-text {
  min-width: 0;
}

.tap-benachrichtigung-titel {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--label);
  line-height: 1.25;
}

.tap-benachrichtigung-zeile {
  display: block;
  font-size: 10px;
  color: var(--label-secondary);
  line-height: 1.25;
}

/* Handy fährt von unten hoch, stößt an die Karte und federt kurz zurück. */
@keyframes tap-telefon-bewegung {
  0%, 14% { top: 300px; }
  34% { top: 40px; }
  40% { top: 54px; }
  46%, 86% { top: 48px; }
  100% { top: 300px; }
}

@keyframes tap-ring-puls {
  0%, 32% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  40% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  54%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
}

@keyframes tap-benachrichtigung-erscheinen {
  0%, 48% { opacity: 0; transform: translateY(6px); }
  56%, 82% { opacity: 1; transform: translateY(0); }
  88%, 100% { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .tap-telefon, .tap-ring, .tap-benachrichtigung {
    animation: none;
  }
  .tap-telefon { top: 48px; }
  .tap-benachrichtigung { opacity: 1; transform: translateY(0); }
}

/* ---------- Erklär-Animationen (Unterseite) ----------
   Alle drei Szenen laufen im gleichen 5-Sekunden-Takt und starten erst,
   wenn sie sichtbar sind. Das spart Rechenzeit auf älteren Handys. */

.szene {
  margin: 24px auto 0;
  width: 100%;
  max-width: 240px;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.szene * {
  animation-play-state: paused;
}

.szene.laeuft * {
  animation-play-state: running;
}

.szene-karte {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 84px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #34AADC);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.szene-karte-logo {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* --- Szene 1: Karte wird beschrieben --- */

.szene-1 .szene-karte { bottom: 14px; }

.prog-geraet {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--label-secondary);
}

.prog-licht {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--success);
  animation: prog-licht 1.25s steps(1, end) infinite;
}

.prog-punkt {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 999px;
  background: var(--accent);
  animation: prog-punkt-fall 1.25s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.prog-punkt:nth-child(2) { animation-delay: -0.42s; }
.prog-punkt:nth-child(3) { animation-delay: -0.83s; }

.prog-balken {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.prog-balken span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: #fff;
  transform-origin: left;
}

.szene-1 .prog-balken span {
  /* gleichmäßig statt beschleunigt — ein Fortschrittsbalken soll ruhig laufen */
  animation: prog-balken-fuellen 5s linear infinite;
}

.prog-fertig {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  font-size: 11px;
  font-weight: 500;
  color: var(--success);
  opacity: 0;
  animation: prog-fertig-zeigen 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes prog-licht {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.25; }
}

@keyframes prog-punkt-fall {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(68px); opacity: 0; }
}

@keyframes prog-balken-fuellen {
  0% { transform: scaleX(0); }
  74%, 100% { transform: scaleX(1); }
}

@keyframes prog-fertig-zeigen {
  0%, 74% { opacity: 0; transform: translate(-50%, 4px); }
  80%, 94% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 4px); }
}

/* --- Szene 2: Karte wird gesperrt ---
   Schloss und volle Leiste starten in derselben neutralen Farbe. Beim Zuschnappen
   leuchten beide einmal grün auf. Die Leiste ist dieselbe wie in Szene 1, nur voll. */

.szene-2 .szene-karte { top: 104px; }

.szene-2 .prog-balken span {
  animation: balken-gruen-blitz 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.schloss {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  animation: schloss-klack 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.schloss-buegel {
  width: 24px;
  height: 18px;
  border: 3px solid var(--label);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  transform: translateY(-8px);
  animation: schloss-buegel-zu 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.schloss-koerper {
  width: 38px;
  height: 28px;
  border-radius: 8px;
  background: var(--label);
  animation: schloss-gruen-blitz 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

/* Bügel fällt zu und federt kurz zurück — das ist das „Klack“. */
@keyframes schloss-buegel-zu {
  0%, 28% { transform: translateY(-8px); }
  34% { transform: translateY(1px); }
  38% { transform: translateY(-2px); }
  42%, 88% { transform: translateY(0); }
  96%, 100% { transform: translateY(-8px); }
}

/* Das ganze Schloss zuckt im Moment des Zuschnappens kurz zusammen. */
@keyframes schloss-klack {
  0%, 32% { transform: translateX(-50%) scale(1); }
  35% { transform: translateX(-50%) scale(0.94); }
  40%, 100% { transform: translateX(-50%) scale(1); }
}

@keyframes schloss-gruen-blitz {
  0%, 33% { background: var(--label); }
  38%, 48% { background: var(--success); }
  58%, 100% { background: var(--label); }
}

@keyframes balken-gruen-blitz {
  0%, 33% { background: #fff; }
  38%, 48% { background: var(--success); }
  58%, 100% { background: #fff; }
}

/* --- Szene 3: Karte im Einsatz --- */

.szene-3 .szene-karte { top: 6px; }

.nutz-telefon {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 230px;
  width: 140px;
  height: 150px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  transform: translateX(-50%);
  animation: nutz-telefon-tippen 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@media (prefers-color-scheme: dark) {
  .nutz-telefon {
    background: rgba(28, 28, 30, 0.45);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.nutz-telefon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.szene-3 .tap-benachrichtigung {
  top: 76px;
}

.nutz-haken {
  position: absolute;
  z-index: 4;
  bottom: 40px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

/* Die Häkchen steigen erst auf, nachdem die Benachrichtigung da ist —
   deshalb laufen sie im selben 5-Sekunden-Takt wie Handy und Meldung. */
.nutz-haken-links {
  left: 8px;
  animation: nutz-haken-links 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

.nutz-haken-rechts {
  right: 8px;
  animation: nutz-haken-rechts 5s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

/* Gleiche Bewegung wie im Hero: von unten hoch, kurz andocken, zurück. */
@keyframes nutz-telefon-tippen {
  0%, 14% { top: 230px; }
  34% { top: 40px; }
  40% { top: 54px; }
  46%, 86% { top: 48px; }
  100% { top: 230px; }
}

/* Benachrichtigung ist ab 56 % zu sehen — die Häkchen folgen danach. */
@keyframes nutz-haken-links {
  0%, 58% { opacity: 0; transform: translateY(18px) scale(0.8); }
  66% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; transform: translateY(-34px) scale(1); }
  90%, 100% { opacity: 0; transform: translateY(-54px) scale(0.9); }
}

@keyframes nutz-haken-rechts {
  0%, 66% { opacity: 0; transform: translateY(18px) scale(0.8); }
  74% { opacity: 1; transform: translateY(0) scale(1); }
  86% { opacity: 1; transform: translateY(-34px) scale(1); }
  94%, 100% { opacity: 0; transform: translateY(-54px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .szene * { animation: none !important; }
  .schloss-buegel { transform: translateY(0); }
  .nutz-telefon { top: 48px; }
  .prog-fertig { opacity: 1; transform: translate(-50%, 0); }
  .prog-punkt { opacity: 0; }
  .nutz-haken { opacity: 1; }
  .szene-3 .tap-benachrichtigung { opacity: 1; transform: translateY(0); }
}

/* ---------- Gruppen-Liste (Kategorien, Designs — kompakt statt große Bildkarten) ---------- */

.gruppen-liste {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 18px;
  overflow: hidden;
}

.gruppen-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  text-align: left;
  color: inherit;
}

.gruppen-zeile + .gruppen-zeile {
  border-top: 0.5px solid var(--separator);
}

.gruppen-zeile:active {
  background: var(--bg-elevated-2);
}

.gruppen-zeile-text {
  flex: 1;
  min-width: 0;
}

/* Zeilentitel in Listen — sieht aus wie h3, ist aber im Button erlaubt */
.zeilen-titel {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.zeilen-text {
  display: block;
  margin-top: 2px;
  color: var(--label-secondary);
  font-size: 15px;
}

.gruppen-zeile-chevron {
  flex: none;
  color: var(--label-tertiary);
  font-size: 18px;
}

/* ---------- Karten-Galerie ----------
   Die Bilder sind freigestellt: kein Kasten, kein Rahmen, kein Hintergrund.
   Der Schatten kommt über drop-shadow, damit er der Kartenform folgt. */

.galerie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* dense füllt die Lücken, die breite Kacheln sonst hinterlassen */
  grid-auto-flow: dense;
  gap: 20px 16px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .galerie { grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
}

@media (min-width: 1024px) {
  .galerie { grid-template-columns: repeat(4, 1fr); }
}

.karten-kachel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: center;
  color: inherit;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

/* Größe und Preis stehen am unteren Rand der Kachel, damit sie über alle
   Kacheln hinweg auf einer Linie liegen — auch bei zweizeiligen Namen. */
.karten-groesse { margin-top: auto; }

/* Im Katalog stehen über hundert Kacheln. Was außerhalb des Bildschirms
   liegt, muss der Browser nicht zeichnen; die gemerkte Höhe hält den
   Scrollbalken trotzdem ruhig. */
.galerie > .karten-kachel {
  content-visibility: auto;
  /* Nur eine gemerkte Höhe vorgeben. Eine intrinsische Breite würde das
     Raster aufblähen und die Seite auf dem Handy zu breit machen. */
  contain-intrinsic-width: none;
  contain-intrinsic-height: auto 280px;
}

.karten-kachel:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 18px;
}

.karten-bild {
  display: block;
  width: 100%;
  /* height überschreibt das height-Attribut des Bildes, sonst greift
     aspect-ratio nicht. Gleich hohe Bildzone für Karten und Quadrate,
     damit die Zeilen darunter fluchten; das Bild bleibt unbeschnitten. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: none;
  border: none;
  /* Der Schatten liegt an der Kante der freigestellten Karte, nicht an einem
     Kasten. Im Dunkelmodus zeichnet ein heller Hauch die Kante nach, sonst
     verschwinden die dunklen Motive im Hintergrund. */
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.14));
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1),
              filter 260ms cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  .karten-bild {
    filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.28))
            drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  }
}

/* Hover nur, wo es einen Zeiger gibt. */
@media (hover: hover) {
  .karten-kachel:hover .karten-bild {
    transform: translateY(-8px);
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.20));
  }

  @media (prefers-color-scheme: dark) {
    .karten-kachel:hover .karten-bild {
      filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3))
              drop-shadow(0 16px 26px rgba(0, 0, 0, 0.65));
    }
  }
}

/* Auf dem Handy nur ein kurzes Tippen-Feedback. */
@media (hover: none) {
  .karten-kachel:active .karten-bild { transform: scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  .karten-bild { transition: none; }
  .karten-kachel:hover .karten-bild { transform: none; }
}

.karten-name {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--label);
}

.karten-groesse {
  display: block;
  padding-top: 4px;
  font-size: 13px;
  color: var(--label-secondary);
}

.karten-preis {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Breite Motive (Multi-Schild, 2:1) nehmen zwei Spalten ein, damit sie
   groß genug stehen und nichts verzerrt oder beschnitten wird. */
.karten-kachel.ist-breit {
  grid-column: span 2;
}

.karten-kachel.ist-breit .karten-bild {
  aspect-ratio: 2 / 1;
}

/* Ausgewählte Karte im Konfigurator */
.karten-kachel[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 18px;
}

.karten-haken {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
}

.karten-kachel[aria-pressed="true"] .karten-haken {
  display: flex;
}

/* Kleines Bild im Warenkorb und in der Auswahlliste */
.karten-bild-klein {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.14));
}

@media (prefers-color-scheme: dark) {
  .karten-bild-klein {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.22))
            drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
  }
}

/* ---------- Filter-Chip ----------
   Wird an zwei Stellen benutzt: für die Filter auf der Katalogseite und
   für den Umschalter über dem Video auf der Startseite. Die Chips brechen
   um und werden nie breiter als ihr Platz — seitlich gescrollt wird auf
   der Seite nirgends. */

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.filter-chip:active {
  transform: scale(0.97);
}

.filter-chip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

/* ---------- Filter auf der Katalogseite ---------- */

.filter-box {
  margin-bottom: 24px;
  border-radius: 18px;
  border: 0.5px solid var(--separator);
  background: var(--bg-elevated);
  padding: 4px 16px 16px;
}

.filter-box > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.filter-box > summary::-webkit-details-marker { display: none; }

.filter-box > summary > span:first-child { font-weight: 500; }

.filter-box > summary .treffer { margin-left: auto; margin-right: 10px; }

.filter-box > summary::after {
  content: "▾";
  color: var(--label-secondary);
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

.filter-box[open] > summary::after { transform: rotate(180deg); }

.filter-box > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

.filter-gruppe + .filter-gruppe { margin-top: 18px; }

.filter-gruppe-titel {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips .filter-chip { font-size: 14px; }

.filter-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 0.5px solid var(--separator);
}

.treffer {
  font-size: 15px;
  color: var(--label-secondary);
  font-variant-numeric: tabular-nums;
}

.katalog-leer {
  text-align: center;
  padding: 56px 20px;
  color: var(--label-secondary);
}

.katalog-leer p { margin: 0 0 16px; }

/* Ab Tablet steht der Filter offen und braucht keine Zusammenfassung. */
@media (min-width: 768px) {
  .filter-box > summary { display: none; }
  .filter-box { padding: 16px; }
}

/* ---------- Hinweisleiste (unten rechts, klein) ---------- */

.hinweis-leiste {
  position: fixed;
  z-index: 95;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  max-width: 320px;
  margin-left: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hinweis-leiste p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--label-secondary);
}

.hinweis-leiste a {
  color: var(--accent);
}

.hinweis-ok {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.hinweis-ok:active {
  transform: scale(0.97);
}

.hinweis-ok:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.008em;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
  border: none;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primaer {
  background: var(--accent);
  color: #fff;
  height: 50px;
  padding: 0 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .btn-primaer { width: auto; }
}

.btn-sekundaer {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  color: var(--label);
  height: 50px;
  padding: 0 24px;
}

.btn-text {
  background: none;
  color: var(--accent);
  padding: 0;
  min-height: 44px;
}

/* ---------- Zahlen ---------- */

.zahlen-raster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .zahlen-raster {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.zahl {
  display: block;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

@media (min-width: 1080px) {
  .zahl { font-size: 64px; }
}

.zahl-block h3 {
  margin: 8px 0 4px;
}

.zahl-block p {
  margin: 0;
  color: var(--label-secondary);
}

/* ---------- Woher der Name kommt ----------
   „Quick Information" zieht sich zu „QuInf" zusammen: erst fallen die
   überzähligen Buchstaben weg, dann schließt sich die Lücke.
   Die Breiten setzt JavaScript, damit es in jeder Schrift genau passt. */

.namens-herkunft {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.020em;
  white-space: nowrap;
}

@media (min-width: 1080px) {
  .namens-herkunft { font-size: 48px; }
}

.nh-teil {
  color: var(--accent);
}

.nh-rest,
.nh-luecke {
  display: inline-block;
  overflow: hidden;
  white-space: pre;
  vertical-align: bottom;
  width: var(--breite, auto);
  color: var(--label-secondary);
}

/* Buchstaben und Lücke gehen gleichzeitig weg — eine Bewegung,
   direkt von „Quick Information" zu „QuInf". */
.namens-herkunft.laeuft .nh-rest,
.namens-herkunft.laeuft .nh-luecke {
  animation: nh-einklappen 6s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes nh-einklappen {
  0%, 28% { width: var(--breite); opacity: 1; }
  50%, 88% { width: 0; opacity: 0; }
  96%, 100% { width: var(--breite); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .namens-herkunft .nh-rest,
  .namens-herkunft .nh-luecke { animation: none !important; }
}

/* ---------- Angabenliste (Impressum) ---------- */

.angaben {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.angaben-zeile dt {
  color: var(--label-secondary);
  font-size: 15px;
}

.angaben-zeile dd {
  margin: 2px 0 0;
}

/* ---------- Wer dahintersteckt ---------- */

.team {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}

.team-person {
  text-align: center;
}

.team-bild {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  color: var(--label-tertiary);
  font-size: 11px;
}

.team-person h3 {
  margin-top: 12px;
}

/* ---------- Abschluss-CTA ---------- */

.abschluss {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 0.5px solid var(--separator);
}

.abschluss p {
  color: var(--label-secondary);
  max-width: 36ch;
  margin: 8px auto 24px;
}

/* ---------- Fusszeile ---------- */

.fusszeile {
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  border-top: 0.5px solid var(--separator);
}

.fusszeile-inhalt {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fusszeile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.fusszeile-links a {
  color: var(--label-secondary);
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.fusszeile-copyright {
  /* --label-tertiary erreicht bei 13px keinen Kontrast von 4,5:1 */
  color: var(--label-secondary);
  font-size: 13px;
}

/* ---------- Hauptinhalt-Versatz wegen fixierter Kopfzeile ---------- */

main {
  padding-top: 56px;
}

/* ---------- Konfigurator: Hauptinhalt braucht Platz für die Warenkorb-Leiste ---------- */

main.hat-warenkorb-leiste {
  padding-bottom: 96px;
}

/* ---------- Chip ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-elevated-2);
  color: var(--label-secondary);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Seitenkopf (Unterseiten) ---------- */

.seiten-kopf {
  padding-top: 40px;
}

.seiten-kopf p {
  color: var(--label-secondary);
  max-width: 40ch;
  margin: 8px 0 0;
}

/* ---------- Konfigurator-Wizard ---------- */

.wizard-schritt {
  animation: wizard-schritt-eintritt 300ms cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes wizard-schritt-eintritt {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-zurueck {
  margin-bottom: 16px;
}

/* ---------- Auswahlknöpfe (Design-Schritt) ---------- */

.wahl-knoepfe {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.wahl-knopf {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  color: var(--label);
  text-align: left;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.wahl-knopf:active {
  transform: scale(0.97);
}

.wahl-knopf:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wahl-knopf[aria-pressed="true"] {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--accent);
}

.wahl-knopf-titel {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.wahl-knopf-text {
  color: var(--label-secondary);
  font-size: 15px;
  line-height: 1.45;
}

/* Ausgewählte Karte im Schritt „Menge & Ziel“ */
.wahl-karte {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wahl-karte + .wahl-karte {
  margin-top: 12px;
}

.wahl-karte-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wahl-karte-kopf h3 {
  margin: 0;
}

.wahl-karte-kopf p {
  margin: 2px 0 0;
  color: var(--label-secondary);
  font-size: 15px;
}

.rabatt-tabelle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-elevated-2);
}

.rabatt-zeile {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--label-secondary);
}

.rabatt-zeile.aktiv {
  color: var(--label);
  font-weight: 600;
}

.rabatt-ersparnis {
  margin-top: 4px;
  color: var(--success);
  font-weight: 500;
  font-size: 15px;
}

.warenkorb-liste + .rabatt-ersparnis {
  margin-top: 12px;
}

.formular {
  margin-top: 32px;
  border-top: 0.5px solid var(--separator);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-formular {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.weiter-frage {
  text-align: center;
  padding: 24px 0 8px;
}

.weiter-frage p {
  color: var(--label-secondary);
  margin: 8px 0 24px;
}

.weiter-frage .btn {
  width: 100%;
}

.weiter-frage .btn + .btn {
  margin-top: 12px;
}

/* ---------- Eingabefeld ---------- */

.eingabefeld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eingabefeld label {
  font-size: 15px;
  font-weight: 500;
}

.eingabefeld .hilfetext {
  font-size: 13px;
  color: var(--label-tertiary);
}

.eingabefeld input,
.eingabefeld textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0.5px solid var(--separator);
  background: var(--bg-elevated);
  color: var(--label);
  resize: none;
}

.eingabefeld input:focus,
.eingabefeld textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.eingabefeld .fehlertext {
  font-size: 13px;
  color: var(--danger);
  display: none;
}

.eingabefeld.hat-fehler input,
.eingabefeld.hat-fehler textarea {
  border-color: var(--danger);
}

.eingabefeld.hat-fehler .fehlertext {
  display: block;
}

/* ---------- Mengenwähler ---------- */

.mengen-waehler {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mengen-taste {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0.5px solid var(--separator);
  background: var(--bg-elevated);
  color: var(--label);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 100ms cubic-bezier(0.32, 0.72, 0, 1);
}

.mengen-taste:active {
  transform: scale(0.97);
}

.mengen-wert {
  min-width: 32px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Warenkorb-Leiste (Glas, fixiert unten) ---------- */

.warenkorb-leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  border-top: 0.5px solid var(--glass-border);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.12);
}

.warenkorb-leiste-inhalt {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.warenkorb-leiste-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.warenkorb-leiste-anzahl {
  font-size: 13px;
  color: var(--label-secondary);
}

.warenkorb-leiste-summe {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.warenkorb-leiste .btn-primaer {
  width: auto;
  height: 44px;
  padding: 0 20px;
}

/* ---------- Warenkorb-Seite ---------- */

.warenkorb-liste {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.warenkorb-position {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 18px;
  overflow: hidden;
}

.warenkorb-position-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  color: inherit;
}

.warenkorb-position-kopf:active {
  background: var(--bg-elevated-2);
}

.warenkorb-position-text {
  flex: 1;
  min-width: 0;
}

.warenkorb-position-meta {
  display: block;
  margin-top: 2px;
  color: var(--label-secondary);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.warenkorb-position-pfeil {
  flex: none;
  color: var(--label-tertiary);
  font-size: 13px;
  transition: transform 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.warenkorb-position-kopf[aria-expanded="true"] .warenkorb-position-pfeil {
  transform: rotate(180deg);
}

/* Aufklappbare Details */
/* Menge und Zeilensumme stehen immer sichtbar unter der Position —
   zum Ändern muss man nichts aufklappen. */
.warenkorb-steuerzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0 16px 14px;
}

.warenkorb-zeilensumme {
  font-size: 15px;
  font-weight: 500;
}

.mengen-taste[disabled] {
  opacity: 0.4;
  cursor: default;
}

.warenkorb-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.warenkorb-details.offen {
  grid-template-rows: 1fr;
}

.warenkorb-details-inhalt {
  overflow: hidden;
}

.warenkorb-details dl {
  margin: 0;
  padding: 16px;
  border-top: 0.5px solid var(--separator);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warenkorb-detail-zeile {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}

.warenkorb-detail-zeile dt {
  color: var(--label-secondary);
  flex: none;
}

.warenkorb-detail-zeile dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  min-width: 0;
}

.warenkorb-detail-zeile.gespart dd {
  color: var(--success);
}

.warenkorb-entfernen {
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  width: 100%;
  text-align: left;
  padding: 0 16px 8px;
}

.warenkorb-leer {
  text-align: center;
  padding: 48px 20px;
  color: var(--label-secondary);
}

.warenkorb-leer .btn-primaer {
  margin-top: 20px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.warenkorb-summe-zeile {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 0.5px solid var(--separator);
  font-size: 17px;
  font-weight: 600;
}

.warenkorb-summe-zeile span:last-child {
  font-variant-numeric: tabular-nums;
}
