:root {
  /* Markenfarben aus dem NALLY-Logo und apps/kasse/src/theme.ts */
  --bg: #ffffff;
  --soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #52607a;
  --line: #e2e8f0;
  --dark: #0f172a;
  --on-dark: #f1f5f9;
  --on-dark-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-deep: #0ea5e9;
  --accent-text: #0369a1;
  --accent-glow: rgba(56, 189, 248, .22);
  --on-accent: #0f172a;
  --paper: #fffdf8;
  --paper-ink: #1f2937;
  --radius: 18px;
  --max: 1160px;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  /* Die Website ist bewusst immer hell (Beschluss Mehmet, 2026-09-30):
     einheitlicher Markenauftritt, die dunklen Handy-Ansichten heben sich ab. */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; color: #000; padding: 8px 12px; z-index: 50; }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.12; font-weight: 600; }
h1 { font-size: clamp(32px, 3.4vw, 46px); }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 6px; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 56ch; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 14px; }
.hl { color: var(--accent-text); }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Abstands-Hilfen (statt Inline-Styles, wegen Content-Security-Policy) */
.pt-72 { padding-top: 72px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  border: 2px solid transparent;
}
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-line { border-color: currentColor; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-small { padding: 9px 16px; font-size: 15px; }

/* Kopfzeile */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: .02em; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; }
.menu { display: flex; align-items: center; gap: 24px; }
.menu a:not(.btn) { text-decoration: none; font-size: 15px; color: var(--muted); }
.menu a:not(.btn):hover { color: var(--ink); }
.menu .btn { background: var(--ink); color: var(--bg); }

/* Einstieg: hell, feines Linienraster */
.intro {
  overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--soft);
}
.intro-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: clamp(24px, 3vw, 36px); }
.intro-card { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 20px 50px rgba(15,23,42,.08); }
.label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; margin: 0 0 22px; }
.intro .lead { margin: 16px 0 20px; font-size: 17px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Bühne: Kassen-Handy, Handy der Kundin, Etiketten.
   Die Anordnung richtet sich nach der Breite der Bühne (Container-Query):
   schmal = ein Handy, Etiketten darunter; ab 420 px = zwei Handys mit Datenstrom. */
.stage { container-type: inline-size; }
.stage-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 50px 0 20px; }
.stage-in .phone { order: -1; margin-bottom: 12px; }
.float {
  position: static; z-index: 4; font-size: 14px; font-weight: 700;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; box-shadow: 0 10px 24px rgba(15,23,42,.10); white-space: nowrap;
}
.float::before { content: "✓"; color: var(--accent-text); margin-right: 6px; }
.bits, .customer { display: none; }

/* --w = Breite Kassen-Handy, --c = Breite Kunden-Handy; 2.0556 = Seitenverhältnis 18,5 : 9 */
@container (min-width: 420px) {
  .stage-in { --w: min(220px, 50cqw); --c: min(120px, 26cqw); display: block; padding: 44px 0 50px; }
  .stage-in .phone { width: var(--w); margin: 0; justify-self: start; }
  .float { position: absolute; }
  /* Etiketten unter den Handys, damit oben nichts die Animation verdeckt */
  .f2 { bottom: 0; right: 0; }
  .f3 { bottom: 0; left: calc(var(--w) / 2); transform: translateX(-50%); }
  .customer { display: block; position: absolute; right: 0; bottom: 50px; width: var(--c); }
  /* Strecke von der Oberkante des Kassen-Handys bis zur Oberkante des Kunden-Handys */
  .bits {
    display: block; position: absolute; z-index: 5; top: 44px;
    left: calc(var(--w) / 2);
    right: calc(var(--c) / 2);
    height: calc((var(--w) - var(--c)) * 2.0556 - 6px);
    pointer-events: none;
  }
}
/* Niedrige Bildschirme (z. B. Laptop 1366 × 768): kleinere Handys und engere Abstände, damit der nächste Abschnitt ins Bild ragt */
@media (min-width: 961px) and (max-height: 820px) {
  .intro-grid { padding-block: 18px; }
  .section.first { padding-top: 12px; }
  .stage .phone-bon { --rise: -80px; }
  .intro .lead { font-size: 15.5px; margin: 12px 0 16px; }
  .label { margin-bottom: 14px; }
  @container (min-width: 420px) {
    .stage .stage-in { --w: min(160px, 50cqw); --c: min(100px, 24cqw); }
  }
}

/* Kassenansicht auf dem Handy */
/* Die Kassenansicht skaliert mit der Breite des Handys (cqw = Prozent der Handy-Breite) */
.phone {
  justify-self: center; position: relative; container-type: inline-size;
  width: min(290px, 100%); aspect-ratio: 9 / 18.5;
  background: #020617; border-radius: 40px; padding: 11px;
  box-shadow: 0 0 0 2px #334155, 0 30px 80px rgba(56,189,248,.18);
}
.screen { height: 100%; border-radius: 30px; background: #1b2537; color: #f1f5f9; overflow: hidden; display: flex; flex-direction: column; font-size: clamp(9px, 4.5cqw, 13px); }
.screen-top { display: flex; justify-content: space-between; align-items: center; padding: clamp(10px, 6.2cqw, 18px) clamp(9px, 5.5cqw, 16px) clamp(6px, 3.4cqw, 10px); font-weight: 800; }
.screen-top small { font-weight: 600; color: #94a3b8; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(5px, 2.8cqw, 8px); padding: 0 clamp(7px, 4.1cqw, 12px); }
.tile { background: #263248; border-radius: 12px; padding: clamp(7px, 4.1cqw, 12px) clamp(6px, 3.4cqw, 10px); font-weight: 700; }
.tile span { display: block; color: #94a3b8; font-weight: 600; font-size: clamp(8px, 4.1cqw, 12px); }
.tile.on { background: #38bdf8; color: #0f172a; }
.tile.on span { color: #0f3b53; }
.tile.dep span { color: #a78bfa; }
.cart { margin: clamp(7px, 4.1cqw, 12px); margin-top: auto; background: #263248; border-radius: 14px; padding: clamp(7px, 4.1cqw, 12px); }
.cart-row { display: flex; justify-content: space-between; padding: 3px 0; color: #cbd5e1; }
.cart-sum { display: flex; justify-content: space-between; font-weight: 800; font-size: clamp(11px, 5.5cqw, 16px); border-top: 1px dashed #475569; margin-top: 6px; padding-top: 8px; }
.pay { margin-top: clamp(6px, 3.4cqw, 10px); background: #38bdf8; color: #0f172a; text-align: center; font-weight: 800; border-radius: 10px; padding: clamp(7px, 3.8cqw, 11px); }

/* Bon-Stil (Leitmotiv); der Schatten kommt per filter, weil die Maske box-shadow abschneidet */
.bon-wrap { filter: drop-shadow(0 18px 24px rgba(15,23,42,.14)); }
.bon {
  background: var(--paper); color: var(--paper-ink);
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
  padding: 26px 24px 34px;
  --z: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
}
.bon-head { text-align: center; font-weight: 700; letter-spacing: .06em; }
.bon-sub { text-align: center; color: #6b7280; font-size: 12px; }
.bon hr { border: 0; border-top: 1px dashed #9ca3af; margin: 12px 0; }
.bon-row { display: flex; justify-content: space-between; gap: 16px; }
.bon-list { list-style: none; padding: 0; margin: 0; }
.bon-sum { font-weight: 700; font-size: 16px; }

/* Abschnitte */
.section { padding: clamp(64px, 9vw, 112px) 0; }
/* Erster Abschnitt nach dem Einstieg: knapp, damit seine Überschrift schon beim Laden zu sehen ist */
.section.first { padding-top: clamp(28px, 3vw, 40px); }
.section.soft { background: var(--soft); }
.head { max-width: 720px; margin-bottom: 44px; }
.head .lead { margin-top: 14px; }

/* Reiter */
.tabs { display: flex; gap: 6px; padding: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; max-width: 620px; margin: 0 auto 20px; }
.tabs button { flex: 1; font: inherit; font-weight: 700; font-size: 15px; padding: 11px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.panel { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); box-shadow: 0 20px 50px rgba(15,23,42,.06); }
.panel + .panel { margin-top: 16px; }
.panel[hidden] { display: none; }
.panel h3 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 12px; }
.panel p { color: var(--muted); margin: 0 0 16px; }
.mini { background: var(--dark); color: var(--on-dark); border-radius: 18px; padding: 18px; font-size: 15px; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #273349; }
.mini-big { font-size: 26px; font-weight: 800; margin-top: 14px; color: var(--accent); }
.pill-s { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #334155; color: #cbd5e1; }
.pill-s.ok { background: #14532d; color: #bbf7d0; }
.dep-t { color: #a78bfa; font-weight: 700; }

/* Branchen */
.branches { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.branch { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 30px rgba(15,23,42,.05); }
.branch svg { width: 40px; height: 40px; padding: 8px; border-radius: 12px; color: var(--accent-text); background: var(--accent-glow); margin-bottom: 14px; }
.branch p { margin: 0; color: var(--muted); }
.also { margin: 28px 0 0; text-align: center; color: var(--muted); }
.not-yet { margin: 8px auto 0; max-width: 60ch; text-align: center; font-size: 15px; color: var(--muted); }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
/* Überschrift, Text und Ergebniszeile liegen in allen Karten einer Reihe auf gleicher Höhe (Subgrid) */
@supports (grid-template-rows: subgrid) {
  .card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
}
.card p { color: var(--muted); margin: 0 0 16px; }

/* Ergebniszeile mit Häkchen (nach .panel p und .card p, damit sie gewinnt) */
.panel .result, .card .result { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: start; }
.card .result { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
@supports (grid-template-rows: subgrid) { .card .result { margin-top: 0; } }
/* Häkchen in eigener Spalte: eine zweite Zeile beginnt bündig unter dem Text (hängender Einzug) */
.result::before { content: "✓"; color: var(--accent-text); }

/* Geräte */
.devices { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.device { margin: 0; background: var(--soft); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.device-art {
  display: grid; place-items: center; padding: 32px 24px 8px; min-height: 340px;
  background:
    radial-gradient(60% 60% at 50% 45%, var(--accent-glow), transparent 70%),
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
}
.device-art svg { width: 100%; max-height: 320px; }
.device figcaption { padding: 24px 28px 28px; background: var(--bg); border-top: 1px solid var(--line); flex: 1; }
.device figcaption p { margin: 0; color: var(--muted); }
.tag-soon { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; background: #fef3c7; color: #92400e; }

/* Warum NALLY: Bon neben Text */
.why { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.why .bon-wrap { max-width: 340px; width: 100%; justify-self: center; transform: rotate(-2deg); }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.points svg { width: 24px; height: 24px; color: var(--accent-text); margin-top: 3px; }
.points p { margin: 0; color: var(--muted); }

/* Einstieg in drei Etappen */
.path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; border-top: 2px dashed var(--line); }
.stop { position: relative; padding-right: 28px; }
.stop .dot { width: 46px; height: 46px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: var(--accent-text); margin-bottom: 18px; position: relative; }
.stop p { margin: 0; color: var(--muted); }


/* Entwicklungsstand als Bon */
.state { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.state .bon-wrap { max-width: 460px; width: 100%; }
.mark { font-weight: 700; }
.mark.ok { color: #15803d; }
.mark.wip { color: #b45309; }

/* Abschluss */
.closing { background: var(--dark); color: var(--on-dark); }
.closing :focus-visible { outline-color: var(--accent); }
.closing-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.closing .lead { color: var(--on-dark-muted); margin: 18px 0 0; }
.closing-cta { justify-self: end; text-align: right; }
.closing-cta small { display: block; margin-top: 12px; color: var(--on-dark-muted); font-family: var(--mono); font-size: 13px; }

/* Fußzeile */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
footer nav a { margin-left: 20px; color: var(--muted); }
footer nav a:first-child { margin-left: 0; }

/* Rechtstexte */
.legal { padding: 64px 20px 72px; max-width: 800px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 24px; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.legal h2 { font-size: clamp(22px, 3vw, 28px); margin: 40px 0 10px; }
.legal address { font-style: normal; }

/* Schmale Bildschirme */
@media (max-width: 960px) {
  .intro-grid, .why, .state, .closing-grid, .devices, .panel { grid-template-columns: minmax(0, 1fr); }
  .cards, .branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing-cta { justify-self: start; text-align: left; }
  .device-art { min-height: 0; }
}
@media (max-width: 720px) {
  .menu a:not(.btn) { display: none; }
  .path { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .path::before { display: none; }
  .cards, .branches { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tabs button { font-size: 14px; padding: 10px 8px; }
  .float { font-size: 12px; padding: 6px 9px; }
  .intro-actions .btn { width: 100%; }
  h1, h2 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
}

/* ------------------------------------------------------------------
   Animationen (nur CSS, verträglich mit der Content-Security-Policy).
   Ein Durchlauf „Verkauf“ dauert 14 s: tippen, Warenkorb, kassieren,
   bezahlt, E-Beleg wird zu Daten und landet im Posteingang der Kundin. Bei „Bewegung reduzieren“ steht alles still
   im fertigen Zustand (siehe Block am Ende).
   ------------------------------------------------------------------ */
:root { --sale: 14s; }

.phone { isolation: isolate; }
.screen { position: relative; z-index: 1; }

/* Bon, der oben aus dem Handy kommt */
.phone-bon {
  position: absolute; z-index: 0; left: 50%; top: 24px; width: 62cqw;
  margin-left: -31cqw; padding: 10px 10px 14px;
  background: var(--paper); color: var(--paper-ink);
  font: clamp(8px, 3.8cqw, 10px)/1.5 var(--mono); text-align: center;
  display: flex; flex-direction: column; gap: 1px;
  box-shadow: 0 6px 16px rgba(15,23,42,.18);
  transform: translateY(0);
  animation: phone-bon var(--sale) ease-in-out infinite;
}
.phone-bon b { font-weight: 700; }

/* Kacheln leuchten beim Antippen kurz auf */
.t-schoko { animation: tap-schoko var(--sale) infinite; }
.t-kaffee { animation: tap-kaffee var(--sale) infinite; }
.t-pfand  { animation: tap-pfand  var(--sale) infinite; }

/* Warenkorb füllt sich */
.cr1 { animation: show-cr1 var(--sale) infinite; }
.cr2 { animation: show-cr2 var(--sale) infinite; }
.cr3 { animation: show-cr3 var(--sale) infinite; }
.cart-sum { animation: show-sum var(--sale) infinite; }
.pay { animation: press-pay var(--sale) infinite; }

/* Bezahlt-Anzeige */
.paid {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(15, 23, 42, .92); color: #f1f5f9; text-align: center;
  opacity: 0; animation: show-paid var(--sale) infinite;
}
.paid b { font-size: clamp(12px, 6cqw, 17px); }
.paid small { color: #94a3b8; font-size: clamp(9px, 4.1cqw, 12px); }
.paid-check {
  width: clamp(36px, 19cqw, 56px); height: clamp(36px, 19cqw, 56px); border-radius: 50%; display: grid; place-items: center;
  background: #22c55e; color: #052e16; font-size: clamp(20px, 10cqw, 30px); font-weight: 900;
  animation: pop-check var(--sale) infinite;
}

@keyframes tap-schoko {
  0%, 6%, 11%, 14%, 100% { background: #263248; color: #f1f5f9; transform: none; }
  8%, 12.5%              { background: #38bdf8; color: #0f172a; transform: scale(.95); }
}
@keyframes tap-kaffee {
  0%, 18%, 23%, 100% { background: #263248; color: #f1f5f9; transform: none; }
  20%                { background: #38bdf8; color: #0f172a; transform: scale(.95); }
}
@keyframes tap-pfand {
  0%, 28%, 33%, 100% { background: #263248; transform: none; }
  30%                { background: #4c3d7a; transform: scale(.95); }
}
@keyframes show-cr1 { 0%, 8% { opacity: 0; transform: translateX(-8px); } 11%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes show-cr2 { 0%, 20% { opacity: 0; transform: translateX(-8px); } 23%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes show-cr3 { 0%, 30% { opacity: 0; transform: translateX(-8px); } 33%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes show-sum { 0%, 36% { opacity: 0; } 40%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes press-pay {
  0%, 44%, 50%, 100% { transform: none; filter: none; }
  47%                { transform: scale(.94); filter: brightness(.85); }
}
@keyframes show-paid { 0%, 50% { opacity: 0; } 54%, 84% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes pop-check { 0%, 51% { transform: scale(.4); } 56% { transform: scale(1.12); } 60%, 100% { transform: scale(1); } }
/* E-Beleg: steigt auf, verengt sich zum Trichter, verschwindet in der Spitze */
@keyframes phone-bon {
  0%, 54%   { transform: translateY(0); opacity: 1; background: var(--paper); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  62%       { transform: translateY(var(--rise)); opacity: 1; background: var(--paper); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  67%       { transform: translateY(var(--rise)) scaleY(.85); opacity: 1; background: #bae6fd; clip-path: polygon(0 0, 100% 0, 60% 100%, 40% 100%); }
  72%       { transform: translateY(calc(var(--rise) + 8px)) scale(.12, .5); opacity: 0; background: #38bdf8; clip-path: polygon(0 0, 100% 0, 52% 100%, 48% 100%); }
  73%, 100% { transform: translateY(0); opacity: 0; background: var(--paper); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

/* Nullen und Einsen fliegen im Bogen zum Handy der Kundin */
.phone-bon { transform-origin: 50% 100%; --rise: -98px; }
.bits span {
  position: absolute; left: 0; top: 0; opacity: 0;
  font: 800 15px/1 var(--mono); color: var(--accent-text);
  text-shadow: 0 0 8px var(--accent-glow);
  animation: bit var(--sale) linear infinite;
}
.bits span:nth-child(2)  { animation-delay: .1s; }
.bits span:nth-child(3)  { animation-delay: .2s; }
.bits span:nth-child(4)  { animation-delay: .3s; }
.bits span:nth-child(5)  { animation-delay: .4s; }
.bits span:nth-child(6)  { animation-delay: .5s; }
.bits span:nth-child(7)  { animation-delay: .6s; }
.bits span:nth-child(8)  { animation-delay: .7s; }
.bits span:nth-child(9)  { animation-delay: .8s; }
.bits span:nth-child(10) { animation-delay: .9s; }
.bits span:nth-child(even) { color: var(--accent); }
@keyframes bit {
  0%, 69% { left: 0;    top: 0;    opacity: 0; transform: scale(.5); }
  70%     { left: 0;    top: 0;    opacity: 1; transform: scale(.8); }
  74%     { left: 35%;  top: -6%;  opacity: 1; transform: scale(1.1); }
  78%     { left: 75%;  top: 45%;  opacity: 1; transform: scale(1); }
  80%     { left: 100%; top: 100%; opacity: 0; transform: scale(.6); }
  100%    { left: 100%; top: 100%; opacity: 0; }
}

/* Handy der Kundin mit Posteingang */
.customer {
  container-type: inline-size;
  aspect-ratio: 9 / 18.5; background: #020617; border-radius: 26px; padding: 7px;
  box-shadow: 0 0 0 2px #334155, 0 24px 60px rgba(15,23,42,.22);
}
.c-screen {
  position: relative; height: 100%; border-radius: 20px; overflow: hidden;
  background: #f8fafc; color: #0f172a; font-size: clamp(7px, 7cqw, 10px); line-height: 1.35;
  display: flex; flex-direction: column;
}
.c-head { padding: clamp(8px, 11cqw, 14px) clamp(6px, 8cqw, 10px) 6px; font-weight: 800; font-size: clamp(9px, 9cqw, 13px); }
.c-mail { display: flex; flex-direction: column; padding: 7px 10px; border-top: 1px solid #e2e8f0; }
.c-mail b { font-size: clamp(7.5px, 7.4cqw, 10.5px); }
.c-mail span { color: #64748b; }
.c-new { background: #e0f2fe; overflow: hidden; animation: c-new var(--sale) infinite; }
.c-new b::before { content: "● "; color: #0ea5e9; }
.c-toast {
  position: absolute; z-index: 2; left: 6px; right: 6px; top: 6px;
  padding: 6px 8px; border-radius: 10px; background: #0f172a; color: #f1f5f9;
  font-weight: 700; font-size: clamp(7px, 6.6cqw, 9.5px); text-align: center;
  transform: translateY(-140%); animation: c-toast var(--sale) infinite;
}
@keyframes c-new {
  0%, 80%   { max-height: 0; padding-block: 0; opacity: 0; border-top-width: 0; }
  84%, 96%  { max-height: 60px; padding-block: 7px; opacity: 1; border-top-width: 1px; }
  100%      { max-height: 0; padding-block: 0; opacity: 0; border-top-width: 0; }
}
@keyframes c-toast {
  0%, 79%   { transform: translateY(-140%); }
  82%, 90%  { transform: translateY(0); }
  94%, 100% { transform: translateY(-140%); }
}

/* Geräte-Zeichnungen */
.anim-bon-hand, .anim-bon-theke, .anim-drawer { transform-box: fill-box; }
.anim-bon-hand  { animation: bon-hand 6s ease-in-out infinite; }
.anim-bon-theke { animation: bon-theke 7s ease-in-out infinite; }
.anim-drawer    { animation: drawer 7s ease-in-out infinite; }
.anim-led       { animation: led 7s steps(1) infinite; }
@keyframes bon-hand  { 0%, 10% { transform: translateY(70px); } 45%, 85% { transform: translateY(0); } 100% { transform: translateY(70px); } }
@keyframes bon-theke { 0%, 10% { transform: translateY(78px); } 40%, 85% { transform: translateY(0); } 100% { transform: translateY(78px); } }
@keyframes drawer    { 0%, 42% { transform: none; } 50%, 78% { transform: translateY(22px); } 88%, 100% { transform: none; } }
@keyframes led       { 0%, 10% { fill: #22c55e; } 12%, 40% { fill: #f59e0b; } 42%, 100% { fill: #22c55e; } }

/* Reiter: Zeilen bauen sich beim Umschalten nacheinander auf */
.panel:not([hidden]) .mini-row, .panel:not([hidden]) .mini-big { animation: rise .45s ease-out both; }
.panel:not([hidden]) .mini-row:nth-child(2) { animation-delay: .08s; }
.panel:not([hidden]) .mini-row:nth-child(3) { animation-delay: .16s; }
.panel:not([hidden]) .mini-big { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Beim Scrollen hereingleiten (nur Browser mit Scroll-Timelines; sonst sofort sichtbar) */
@supports (animation-timeline: view()) {
  .card, .device, .stop, .branch, .points li, .state .bon-wrap, .head {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* Reiter „Abschluss“: Zähler für den Tagesumsatz */
.count { font-variant-numeric: tabular-nums; }
.mini-cap { color: var(--on-dark-muted); font-size: 13px; margin-top: 2px; }

/* Reiter „Pfand & Storno“: Becher wird zurückgegeben (5 s Schleife) */
.cup-scene { display: block; width: 100%; height: auto; margin-bottom: 10px; }
.cup { animation: cup-return 5s ease-in-out infinite; }
.cup-box rect { animation: box-glow 5s ease-in-out infinite; }
.cup-minus { opacity: 0; animation: cup-minus 5s ease-out infinite; }
@keyframes cup-return {
  0%, 8%   { transform: translate(240px, 38px); opacity: 0; }
  14%      { transform: translate(240px, 38px); opacity: 1; }
  48%      { transform: translate(38px, 38px); opacity: 1; }
  60%      { transform: translate(38px, 46px); opacity: 0; }
  100%     { transform: translate(38px, 46px); opacity: 0; }
}
@keyframes box-glow { 0%, 52%, 80%, 100% { stroke: #475569; } 58%, 72% { stroke: #a78bfa; } }
@keyframes cup-minus {
  0%, 56% { opacity: 0; transform: translateY(8px); }
  64%, 86% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* Bewegung reduzieren: alles im Endzustand, keine Animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .paid { display: none; }
  .phone-bon, .bits { display: none; }
  .cup { transform: translate(150px, 38px); }
  .cup-minus { opacity: 1; }
}

/* Sehr schmales Kassen-Handy (niedrige Bildschirme): dritte Kachelreihe ausblenden,
   damit Warenkorb und „Kassieren“ vollständig sichtbar bleiben */
@container (max-width: 150px) {
  .tile:nth-child(n+5) { display: none; }
}
