/* Warenkorb und Kasse (Shop-Session, 16.11.2026). Baut auf /styles.css auf (Farben, Schriften, .btn, .panel), eigene Klassen
   mit Präfix kb- (Warenkorb) und ka- (Kasse). Kein Grau, keine Transparenz, nichts unter 16 px. */

.kb-seite, .ka-seite {
  /* Flacher als die Karten im Rest der Seite: nur Kante plus ein Hauch Schatten (Joshi 16.11.2026) */
  --shadow-card: 0 1px 0 #d4e1f4, 0 4px 10px -8px #8eaad6;
  padding: var(--sp-8) 0 var(--sp-16);
}
.ka-seite { overflow-x: hidden; overflow-x: clip; } /* Konfetti darf nicht seitlich scrollen lassen */

/* ---------- Kopf Warenkorb: schlicht, mit der Ente ---------- */
.kb-kopf { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.kb-kopf img { width: 110px; height: 110px; flex: none; }
.kb-kopf h1 { margin: 0; font-size: var(--fs-h1); }
.kb-kopf p { font-size: var(--fs-md); margin-top: 4px; }
@media (min-width: 760px) { .kb-kopf img { width: 150px; height: 150px; } }
/* Am Handy kleiner, damit "Weiter zur Kasse" ohne Scrollen zu sehen ist (Joshi 16.11.2026) */
@media (max-width: 759px) {
  .kb-seite { padding-top: var(--sp-4); }
  .kb-kopf { gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .kb-kopf img { width: 64px; height: 64px; }
  .kb-kopf h1 { font-size: clamp(26px, 7vw, 32px); }
  .kb-kopf p { font-size: var(--fs-sm); margin-top: 2px; }
}

/* Handy: feste Leiste unten, solange "Weiter zur Kasse" nicht im Bild ist (warenkorb/seite.js) */
.kb-leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 2px solid var(--primary-line);
}
.kb-leiste[hidden] { display: none; }
.kb-leiste-summe { display: grid; line-height: 1.15; }
.kb-leiste-summe span { font-size: var(--fs-sm); }
.kb-leiste-summe b { font-family: var(--display); font-weight: 800; font-size: var(--fs-title); white-space: nowrap; }
.kb-leiste .btn { flex: 1; max-width: 260px; }
@media (min-width: 900px) { .kb-leiste { display: none !important; } }
@media (max-width: 899px) { .kb-seite ~ .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* ---------- Raster ---------- */
.kb-raster, .ka-raster { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 900px) {
  /* "Passt dazu" direkt unter den Produkten, die Summe läuft rechts über beide Zeilen (Joshi 16.11.2026) */
  .kb-raster { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; }
  .kb-raster > .kb-summe { grid-column: 2; grid-row: 1 / span 2; }
  .kb-raster > .kb-vorschlaege { grid-column: 1; grid-row: 2; }
  .ka-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); }
}

/* ---------- Positionen ---------- */
.kb-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.kb-pos {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: center;
  --pos-pad: var(--sp-4);
  --pos-rad: var(--r-lg);
  padding: var(--pos-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--pos-rad);
  box-shadow: var(--shadow-card);
}
.kb-bild {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: var(--r-md);
}
.kb-bild img { width: 64px; height: 64px; object-fit: contain; }
.kb-name { font-family: var(--display); font-weight: 800; font-size: var(--fs-title); line-height: 1.2; }
.kb-text { font-size: var(--fs-sm); color: var(--text); margin-top: 2px; }
.kb-preis { font-weight: 800; font-size: var(--fs-md); white-space: nowrap; text-align: right; }
.kb-weg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.kb-weg:hover { background: #fdecea; border-color: var(--red); color: var(--red); }
.kb-weg svg { width: 18px; height: 18px; }
.kb-je { display: block; font-size: var(--fs-sm); font-weight: 600; }
.kb-rechts { display: grid; justify-items: end; gap: 6px; }

/* Menge für Kristall-Pakete: Minus bei 1 entfernt (Joshi 16.11.2026) */
.kb-menge { display: inline-flex; align-items: center; background: #ffffff; border: 2px solid var(--line-strong); border-radius: var(--r-full); }
.kb-menge-knopf {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--primary-dark);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s ease, transform .1s ease;
}
.kb-menge-knopf svg { width: 20px; height: 20px; }
.kb-menge-knopf:hover:not(:disabled) { background: var(--primary-soft); }
.kb-menge-knopf:active:not(:disabled) { transform: scale(.9); }
.kb-menge-knopf:disabled { color: var(--line-strong); cursor: not-allowed; }
.kb-menge-knopf:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.kb-menge-zahl { min-width: 30px; text-align: center; font-family: var(--display); font-weight: 800; font-size: var(--fs-md); }
.kb-menge-zahl[data-spring="true"] { animation: kb-spring .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kb-spring { 0% { transform: scale(1); } 50% { transform: scale(1.35); color: var(--primary); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .kb-menge-zahl[data-spring="true"] { animation: none; } }
@media (max-width: 520px) {
  .kb-pos { grid-template-columns: 64px minmax(0, 1fr); }
  .kb-bild { width: 64px; height: 64px; }
  .kb-bild img { width: 54px; height: 54px; }
  .kb-rechts { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .kb-weg { margin-top: 0; }
}

/* ---------- Summe ---------- */
.kb-summe, .ka-summe { display: grid; gap: var(--sp-3); }
.kb-summe h2, .ka-box h2 { font-size: var(--fs-h3); margin: 0; }
.kb-zeile, .ka-zeile { display: flex; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-md); }
.kb-gesamt, .ka-gesamt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 2px solid var(--primary-line);
}
.kb-gesamt b, .ka-gesamt b { font-family: var(--display); font-size: var(--fs-h3); line-height: 1.1; }
.kb-steuer, .ka-steuer { font-size: var(--fs-sm); text-align: right; }
.kb-summe .btn, .ka-bestellen { width: 100%; }
.kb-weiter { justify-self: center; font-weight: 600; }

/* ---------- Leer ---------- */
.kb-leer { text-align: center; display: grid; gap: var(--sp-4); justify-items: center; padding: var(--sp-10) var(--sp-6); }
.kb-leer img { width: 140px; height: 140px; }
.kb-leer h2 { margin: 0; font-size: var(--fs-h3); }

/* ---------- Vorschläge ---------- */
.kb-vorschlaege { margin-top: var(--sp-10); }
.kb-raster > .kb-vorschlaege { margin-top: var(--sp-2); }
.kb-vorschlaege h2 { font-size: var(--fs-h3); margin: 0 0 var(--sp-4); }
.kb-karten { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.kb-karte {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: 1fr auto; /* Knöpfe stehen auf einer Linie, auch wenn ein Titel umbricht */
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.kb-karte img { width: 56px; height: 56px; object-fit: contain; }
.kb-karte b { display: block; line-height: 1.25; }
.kb-karte .btn-small { grid-column: 1 / -1; width: 100%; }
/* Preis kräftig, Streichpreis wie im Shop (rote Linie) */
.kb-karte-preis { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; margin-top: 2px; }
.kb-jetzt { font-family: var(--display); font-weight: 800; font-size: var(--fs-md); white-space: nowrap; }
.kb-statt {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
.kb-hinweis { margin-top: var(--sp-3); font-size: var(--fs-sm); }

/* Upgrade aufs größere Paket: Fuß der Produktkarte, randlos bis an die Kante, eine Zeile, Knopf zweitrangig (Joshi 16.11.2026) */
.kb-upgrade {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  margin: 0 calc(var(--pos-pad) * -1) calc(var(--pos-pad) * -1);
  padding: var(--sp-3) var(--pos-pad);
  background: var(--primary-soft);
  border-top: 1px solid var(--primary-line);
  border-radius: 0 0 calc(var(--pos-rad) - 1px) calc(var(--pos-rad) - 1px);
}
.kb-upgrade img { width: 44px; height: 44px; object-fit: contain; }
.kb-upgrade-text { display: grid; gap: 1px; line-height: 1.3; min-width: 0; }
.kb-upgrade-text b { font-family: var(--display); font-weight: 800; font-size: var(--fs-ui); }
.kb-upgrade-text span { font-size: var(--fs-sm); text-wrap: pretty; }
.kb-upgrade-text em { font-style: normal; font-weight: 800; color: var(--green-dark); }
.kb-upgrade-knopf.btn-small { min-height: 44px; padding: 8px 16px 10px; white-space: nowrap; }
@media (max-width: 520px) {
  .kb-upgrade { grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-3); }
  .kb-upgrade img { width: 40px; height: 40px; }
  .kb-upgrade-knopf.btn-small { padding: 8px 14px 10px; }
}

/* ---------- Kasse: Kopf ohne Navigation ---------- */
.ka-kopf { background: #ffffff; border-bottom: 1px solid var(--line); }
.ka-kopf .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: var(--sp-3); }
.ka-zurueck { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; justify-self: start; }
.ka-zurueck svg { width: 20px; height: 20px; }
.ka-logo img { height: 52px; width: auto; }
.ka-sicher { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--green-dark); }
.ka-sicher svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .ka-zurueck span { position: absolute; left: -9999px; }
  .ka-sicher span { position: absolute; left: -9999px; }
}

.ka-titel { font-size: var(--fs-h1); margin: 0 0 var(--sp-6); }
.ka-box { display: grid; gap: var(--sp-4); }
.ka-box + .ka-box { margin-top: var(--sp-6); }

/* Formularfelder */
.ka-feld { display: grid; gap: 6px; }
.ka-feld label, .ka-legende { font-weight: 800; font-size: var(--fs-ui); }
.ka-feld input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  font: inherit;
  font-size: 18px;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-sm);
}
.ka-feld input { transition: border-color .2s ease, box-shadow .2s ease; }
.ka-feld input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-line); }
.ka-feld input[aria-invalid="true"] { border-color: var(--red); }
.ka-feld input[data-ok="true"] { border-color: var(--green); }
.ka-feld input[data-ok="true"]:focus { box-shadow: 0 0 0 3px #c9ecd0; }
.ka-feld input::placeholder { color: #5b6b8a; }
.ka-hilfe { font-size: var(--fs-sm); }
.ka-fehler { font-size: var(--fs-sm); font-weight: 600; color: var(--red); }
.ka-fehler[hidden] { display: none; }
.ka-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Spieler: Name, Suche im Profil, Kopf mit Geräte-Abzeichen ---------- */
.ka-name-zeile { position: relative; }
.ka-name-zeile input { padding-right: 50px; }
.ka-name-zeichen { position: absolute; right: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; pointer-events: none; }
.ka-name-zeichen[data-art="sucht"] { border: 3px solid var(--primary-line); border-top-color: var(--primary); border-radius: 50%; animation: kb-dreh .8s linear infinite; }
/* Verifiziert-Siegel statt einfachem Haken */
.ka-name-zeichen[data-art="ok"] { right: 10px; width: 30px; height: 30px; margin-top: -15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%232fb344'%3E%3Crect x='4.6' y='4.6' width='14.8' height='14.8' rx='3.2'/%3E%3Crect x='4.6' y='4.6' width='14.8' height='14.8' rx='3.2' transform='rotate(45 12 12)'/%3E%3C/g%3E%3Cpath d='M8.2 12.3l2.6 2.6 5-5.2' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; animation: ka-plopp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
/* Skin-Kopf links im Feld, sobald der Name gefunden oder gewählt ist */
.ka-name-zeile .ka-name-skin { --g: 32px; position: absolute; left: 10px; top: 50%; margin-top: -16px; border-radius: 6px; box-shadow: none; pointer-events: none; animation: ka-plopp .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.ka-name-zeile[data-skin="false"] .ka-name-skin { display: none; }
.ka-name-zeile[data-skin="true"] input { padding-left: 52px; }

.ka-skin {
  --g: 56px;
  display: inline-block;
  width: var(--g);
  height: var(--g);
  border-radius: var(--r-sm);
  background-color: var(--primary-soft);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
  box-shadow: 0 3px 0 #1f7d2e33;
}
.ka-skin[data-skin="true"] {
  background-size: calc(var(--g) * 8) auto, calc(var(--g) * 8) auto;
  background-position: calc(var(--g) * -5) calc(var(--g) * -1), calc(var(--g) * -1) calc(var(--g) * -1);
}
.ka-wahl-symbol svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--primary-dark); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Version wählen (nur ohne eindeutigen Treffer) und Auswahl bei zwei Treffern */
.ka-wahl { border: 0; margin: 0; padding: 0; display: grid; gap: var(--sp-2); min-width: 0; animation: ka-rein .4s ease both; }
.ka-wahl[hidden] { display: none; }
.ka-wahl-karten { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
@media (max-width: 400px) { .ka-wahl-karten { grid-template-columns: 1fr; } }
.ka-wahl-karte {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.ka-wahl-karte:hover { border-color: var(--primary); }
.ka-wahl-karte:active { transform: scale(.98); }
.ka-wahl-karte input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.ka-wahl-karte > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.ka-wahl-karte > span:last-child span { font-size: var(--fs-sm); }
.ka-wahl-karte b { overflow-wrap: anywhere; }
.ka-wahl-karte:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.ka-wahl-karte:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.ka-wahl-karte .ka-skin { --g: 40px; box-shadow: none; }
.ka-wahl-symbol { display: grid; place-items: center; width: 40px; height: 40px; flex: none; background: var(--primary-soft); border-radius: var(--r-sm); }
.ka-wahl-symbol svg { width: 24px; height: 24px; }

/* Bestellübersicht */
.ka-posten { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.ka-posten li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; }
.ka-posten .kb-bild { width: 56px; height: 56px; }
.ka-posten .kb-bild img { width: 46px; height: 46px; }
.ka-posten b { line-height: 1.25; }
.ka-posten .kb-preis { font-size: var(--fs-ui); }

/* Zahlung */
/* Apple Pay / Google Pay so hoch wie die Zeilen darunter, gleicher Abstand über und unter "oder" (Joshi 16.11.2026) */
.ka-express { position: relative; display: grid; gap: inherit; }
.ka-express[hidden] { display: none; }
.ka-express-feld { min-height: 55px; }
.ka-express-ph { height: 55px; border-radius: 10px; background: #000000; }
.ka-oder { display: flex; align-items: center; gap: var(--sp-3); font-weight: 700; }
.ka-oder::before, .ka-oder::after { content: ""; flex: 1; height: 2px; background: var(--primary-line); }
.ka-zahlung { position: relative; }
.ka-laden { display: flex; align-items: center; gap: 10px; font-weight: 600; }
/* Stripe lädt unsichtbar an derselben Stelle, bis es fertig ist; bis dahin stehen die Platzhalter da */
.ka-zahlung-feld[data-wartet], .ka-express-feld[data-wartet] { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; }
.ka-ph { display: grid; gap: 10px; padding: 1px 0 2px; }
.ka-ph-zeile {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 17px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 10px;
  font: 600 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
}
.ka-ph-radio { flex: none; width: 16px; height: 16px; margin: 0 15px 0 1px; border: 1.5px solid #273046; border-radius: 50%; }
/* Logos wie in Stripes Liste (dieselben Bilder, lokal unter /img/zahlung/), damit beim Austausch nichts aufploppt */
.ka-ph-symbol { flex: none; display: flex; align-items: center; width: 24px; height: 18px; margin-right: 20px; }
.ka-ph-symbol img { display: block; }
.ka-ph-symbol:empty { border-radius: 4px; background: var(--primary-soft); }
.ka-ph-marken { display: flex; gap: 4px; margin: 0 -2px 0 auto; }
.ka-ph-marken img { display: block; }

/* Häkchen */
.ka-haken { display: grid; gap: var(--sp-3); }
.ka-haken label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-3);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
  cursor: pointer;
}
.ka-haken label { transition: border-color .2s ease, background-color .2s ease; }
.ka-haken label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.ka-haken label[data-fehlt="true"] { border-color: var(--red); }
.ka-haken label[data-wackel="true"] { animation: ka-wackeln .4s ease; }
.ka-pflicht { color: var(--red); font-weight: 800; }

/* Eigenes Häkchen: echtes Kontrollkästchen, nur anders gezeichnet, mit kleinem Sprung beim Setzen */
.ka-check {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0;
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.ka-check::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
}
.ka-check:checked { background: var(--primary); border-color: var(--primary); animation: ka-plopp .35s cubic-bezier(.3, 1.6, .5, 1); }
.ka-check:checked::after { transform: scale(1); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.ka-check:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Bestellknopf: mit Spinner beim Bezahlen, Glanz sobald alles ausgefüllt ist */
.ka-bestellen { position: relative; overflow: hidden; min-height: 58px; font-size: var(--fs-md); transition: transform .12s ease, background-color .2s ease; }
.ka-bestellen:not(:disabled):active { transform: translateY(2px); }
.ka-bestellen[data-bereit="true"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, #ffffff00 0%, #ffffff8c 50%, #ffffff00 100%);
  transform: skewX(-18deg);
  animation: ka-glanz 2.8s ease-in-out .2s infinite;
  pointer-events: none;
}
.ka-bestellen[aria-busy="true"] .ka-knopf-text::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: -3px;
  border: 3px solid #ffffff66;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: kb-dreh .8s linear infinite;
}
.ka-gesamt b[data-blitz="true"] { animation: ka-blitz .6s ease; }
.ka-meldung[data-wackel="true"] { animation: ka-wackeln .4s ease; }

/* Erst sanft hereinkommen: die Kästen nacheinander */
.ka-raster > div > .ka-box, .ka-raster > .ka-box { animation: ka-hoch .5s ease both; }
.ka-raster > div > .ka-box + .ka-box { animation-delay: .08s; }
.ka-raster > .ka-box { animation-delay: .16s; }
.ka-meldung {
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--red);
  border-radius: var(--r-md);
  background: #fdecea;
  color: #7d1710;
  font-weight: 600;
}
.ka-meldung[hidden] { display: none; }
.ka-titel + .ka-meldung { margin-bottom: var(--sp-4); } /* Abstand zur ersten Karte */
.ka-klein { font-size: var(--fs-sm); }
/* Unter "Zahlungspflichtig bestellen": zwei kurze Zusagen mit Zeichen statt eines Fließtext-Absatzes (Joshi 16.11.2026) */
.ka-vertrauen { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ka-vertrauen li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; }
.ka-vertrauen svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--green-dark); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Fertig: Ente hüpft rein, Haken zeichnet sich, Konfetti aus Kristallfarben, Gutschrift Zeile für Zeile */
.ka-fertig { position: relative; text-align: center; display: grid; gap: var(--sp-4); justify-items: center; max-width: 620px; margin: 0 auto; }
.ka-fertig[hidden] { display: none; }
.ka-fertig:focus { outline: none; } /* Fokus nur für Screenreader dorthin gesetzt, kein Rahmen um die ganze Box */
.ka-fertig-bild { position: relative; animation: ka-hopser .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.ka-fertig-bild img { width: 150px; height: 150px; }
.ka-fertig-haken { position: absolute; right: -6px; bottom: 4px; width: 52px; height: 52px; }
.ka-fertig-haken svg { width: 52px; height: 52px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ka-fertig-haken circle { fill: var(--green); stroke: #ffffff; stroke-width: 4; transform-origin: center; animation: ka-plopp .45s .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.ka-fertig-haken path { stroke: #ffffff; stroke-width: 5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: ka-zeichnen .4s .65s ease-out forwards; }
.ka-fertig h1 { margin: 0; font-size: var(--fs-h2); animation: ka-hoch .5s .25s ease both; }
.ka-fertig > p, .ka-fertig > .btn { animation: ka-hoch .5s .4s ease both; }
.ka-gutschrift { width: 100%; display: grid; gap: var(--sp-3); text-align: left; animation: ka-hoch .5s .5s ease both; }
.ka-gutschrift[hidden] { display: none; }
.ka-gutschrift-wer { display: flex; align-items: center; gap: var(--sp-3); font-weight: 700; }
.ka-gutschrift-wer .ka-skin { --g: 44px; box-shadow: none; }
.ka-gutschrift-liste { list-style: none; margin: 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--primary-line); display: grid; gap: var(--sp-3); }
.ka-gutschrift-liste > li { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; animation: ka-rein .45s cubic-bezier(.2, 1.4, .4, 1) both; }
/* Kiste mit Anzahl-Plakette, öffnet sich kurz, wenn die Kristalle rausfliegen */
.ka-g-bild { position: relative; width: 60px; height: 60px; }
.ka-g-bild img { width: 60px; height: 60px; object-fit: contain; }
.ka-g-bild[data-auf="true"] img { animation: ka-g-kiste .5s cubic-bezier(.3, 1.6, .5, 1); }
.ka-g-anzahl { position: absolute; right: -8px; bottom: -4px; min-width: 26px; height: 24px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 13px; line-height: 1; color: var(--on-accent); background: var(--primary); border: 2px solid var(--card); border-radius: var(--r-full); animation: ka-plopp .4s .8s cubic-bezier(.3, 1.6, .5, 1) both; }
.ka-g-text { display: grid; gap: 2px; min-width: 0; }
.ka-g-haupt { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.2; color: var(--text); }
.ka-g-unter { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); }
/* Zählt hoch; feste Breite (per JS gemessen), damit "Kristalle" dahinter nicht wandert */
.ka-g-zahl { display: inline-block; text-align: right; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.ka-g-zahl[data-fertig="true"] { animation: ka-g-tusch .45s cubic-bezier(.3, 1.6, .5, 1); }
.ka-g-flug { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; z-index: 2; opacity: 0; animation: ka-g-flug .72s linear both; }
/* Mehrere Paketgrößen: woraus die große Zahl besteht, schlichte Zeilen ohne Kasten (Joshi 17.11.2026: kein blauer Hintergrund) */
.ka-g-pakete { grid-column: 2 / -1; max-width: 270px; list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.ka-g-pakete li { display: flex; justify-content: space-between; gap: var(--sp-3); }
.ka-g-pakete b { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .ka-gutschrift-liste > li { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .ka-g-bild, .ka-g-bild img { width: 52px; height: 52px; }
  .ka-g-haupt { font-size: 20px; }
  .ka-g-unter, .ka-g-pakete { font-size: 14px; }
}
.ka-konfetti { position: absolute; left: 50%; top: 70px; width: 0; height: 0; pointer-events: none; z-index: 2; }
.ka-konfetti i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w, 10px);
  height: var(--h, 14px);
  background: var(--f, var(--primary));
  border-radius: 2px;
  opacity: 0;
  animation: ka-flug var(--d, 1.4s) cubic-bezier(.15, .7, .35, 1) var(--v, 0s) forwards;
}

/* ---------- Bewegungen ---------- */
@keyframes ka-hoch { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ka-rein { 0% { opacity: 0; transform: translateY(8px) scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes ka-hopser { 0% { transform: scale(.6) translateY(10px); opacity: 0; } 60% { transform: scale(1.08) translateY(-6px); opacity: 1; } 100% { transform: none; } }
@keyframes ka-plopp { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes ka-zeichnen { to { stroke-dashoffset: 0; } }
@keyframes ka-wackeln { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes ka-glanz { 0% { left: -60%; } 45%, 100% { left: 130%; } }
/* Bogen: hoch aus der Kiste, dann in die Zahl fallen */
@keyframes ka-g-flug {
  0% { opacity: 0; transform: translate(0, 0) scale(.4) rotate(0deg); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  12% { opacity: 1; }
  45% { transform: translate(calc(var(--dx, 60px) * .45), var(--bogen, -50px)) scale(1) rotate(calc(var(--dreh, 0deg) * .5)); animation-timing-function: cubic-bezier(.55, 0, .85, .4); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 60px), var(--dy, 0px)) scale(.55) rotate(var(--dreh, 0deg)); }
}
@keyframes ka-g-kiste { 0% { transform: none; } 35% { transform: scale(1.12, .9) translateY(3px); } 70% { transform: scale(.96, 1.06) translateY(-3px); } 100% { transform: none; } }
@keyframes ka-g-tusch { 0% { transform: none; } 45% { transform: scale(1.14); } 100% { transform: none; } }
@keyframes ka-blitz { 0% { color: var(--text); } 35% { color: var(--primary); transform: scale(1.06); } 100% { color: var(--text); transform: none; } }
@keyframes ka-flug {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  35% { opacity: 1; transform: translate(calc(var(--x, 0px) * .6), var(--hoch, -120px)) rotate(calc(var(--r, 360deg) * .4)); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x, 0px), var(--y, 200px)) rotate(var(--r, 360deg)); }
}
[data-wackel="true"] { animation: ka-wackeln .4s ease; }
@media (prefers-reduced-motion: reduce) {
  .ka-seite *, .ka-fertig * { animation: none !important; transition: none !important; }
  .ka-fertig-haken path { stroke-dashoffset: 0; }
  .ka-konfetti { display: none; }
}

.ka-fuss { padding: var(--sp-6) 0 var(--sp-10); font-size: var(--fs-sm); }
.ka-fuss nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); justify-content: center; }
.ka-fuss a { font-weight: 600; }

.kb-spinner { width: 22px; height: 22px; border: 3px solid var(--primary-line); border-top-color: var(--primary); border-radius: 50%; animation: kb-dreh 0.8s linear infinite; }
@keyframes kb-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kb-spinner { animation: none; } }

/* Handy kompakt: weniger Luft in Karten und zwischen Kästen (Joshi 16.11.2026) */
@media (max-width: 759px) {
  .kb-seite, .ka-seite { padding-bottom: var(--sp-10); }
  .ka-seite { padding-top: var(--sp-4); }
  .kb-seite .panel, .ka-seite .panel { padding: var(--sp-4); border-radius: var(--r-md); }
  .kb-raster, .ka-raster { gap: var(--sp-4); }
  .kb-pos { --pos-pad: var(--sp-3); --pos-rad: var(--r-md); gap: var(--sp-3); }
  .kb-steuer, .ka-steuer { margin-top: calc(var(--sp-2) * -1); }
  .kb-summe h2, .ka-box h2, .kb-vorschlaege h2 { font-size: 22px; }
  .ka-titel { font-size: clamp(26px, 7vw, 32px); margin-bottom: var(--sp-4); }
  .ka-box { gap: var(--sp-3); }
  .ka-box + .ka-box { margin-top: var(--sp-4); }
  .ka-kopf .wrap { min-height: 60px; }
  .ka-logo img { height: 44px; }
}
