/* Woijd Cash (frontend/kasse/) – Oberfläche nach dem freigegebenen Entwurf vom 27.10.2026, gestaltet nach dem
   woijd-Markenbuch (30.10.2026): viel Papier, wenig Grün – Moos ist der einzige Akzent und markiert den einen Knopf,
   den Erfolg und das Zeichen; Graphit trägt Text und Auswahl. Schrift Manrope (static/woijd/woijd.css), Radien
   8 Feld/Chip · 16 Karte/Knopf · 24 Fläche/Blatt, Abstände im 8er-Raster, Symbole als Linie 1,75 mit runden Enden.
   Glas nur über Farbe: die Bühnen vor der Kasse (Anmeldung, Wer kassiert, PIN, Kasse öffnen) stehen auf Nachtwald.
   Farben nur über die Token unten, hell und dunkel. Touchziele mindestens 44 px, keine Emojis, Beträge mit Komma. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root, [data-theme="light"] {
  /* Papier, Weiß, Graphit, Stein – dazu Moos (Akzent), Lichtung (ruhige Fläche), Harz (warmes Licht), Bernstein (Hinweis), Glut (Fehler) */
  --bg: #f5f5f2; --surface: #ffffff; --surface2: #fafaf8; --fill: #ecebe6;
  --border: #e3e2dc; --border2: #d3d2cb; --line: #ecebe6; --line2: #f0efeb; --card: #ecebe6;
  --text: #1d1d1f; --text2: #3a3a38; --text3: #5e5e5a; --muted: #8b8b85;
  --grn: #2e6b4f; --grn-h: #245a42; --grn-soft: #e6f2e8; --grn-ink: #1f4d38; --disabled: #b9c9bf;
  --wahl: #1d1d1f; --wahl-ink: #f5f5f2;
  --ok: #2e6b4f; --ok-soft: #e6f2e8; --ok-ink: #1f4d38;
  --gold: #c9b98a; --gold-soft: #f6f2e6; --gold-line: #e5dbbd; --gold-rand: #d6c89c; --gold-ink: #6b4a0f; --gold-ink2: #6b4a0f; --gold-dunkel: #6b4a0f;
  --warn: #9a6516; --warn-soft: #f8efdf; --warn-ink: #6b4a0f;
  --err: #b3261e; --err-soft: #fbeceb; --err-line: #ecbab5; --err-ink: #8a1c16;
  --grau-soft: #ecebe6;
  --zeichen-blatt: #2e6b4f; --zeichen-stiel: #1d1d1f;
  --schicht: rgba(18, 22, 20, .45); --schatten: 0 8px 24px rgba(18, 22, 20, .06); --schatten-hoch: 0 24px 48px rgba(18, 22, 20, .22);
}
[data-theme="dark"] {
  /* Nachtwald als Grund, Spross als Akzent auf dunkel */
  --bg: #121614; --surface: #1b201d; --surface2: #202622; --fill: #181d1a;
  --border: #2b322e; --border2: #39413c; --line: #262c28; --line2: #232925; --card: #2b322e;
  --text: #f4f7f4; --text2: #c9d3cc; --text3: #9fa9a2; --muted: #707a73;
  --grn-soft: #1d3428; --grn-ink: #bfe0c4; --disabled: #3a4a40;
  --wahl: #f4f7f4; --wahl-ink: #121614;
  --ok-soft: #1d3428; --ok-ink: #bfe0c4;
  --gold-soft: #2a2719; --gold-line: #574d2f; --gold-rand: #6e6340; --gold-ink: #e6d7a8; --gold-ink2: #e6d7a8; --gold-dunkel: #e6d7a8;
  --warn-soft: #34291a; --warn-ink: #ebc98a;
  --err-soft: #3a1f1d; --err-line: #7a3631; --err-ink: #f4aaa3;
  --grau-soft: #262c28;
  --zeichen-blatt: #8cc79a; --zeichen-stiel: #f4f7f4;
  --schicht: rgba(0, 0, 0, .6); --schatten: 0 8px 24px rgba(0, 0, 0, .4); --schatten-hoch: 0 24px 48px rgba(3, 12, 8, .6);
}
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: Manrope, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
body { -webkit-user-select: none; user-select: none; overflow: hidden; }
input, textarea, select { -webkit-user-select: text; user-select: text; font: inherit; color: inherit; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--grn); outline-offset: 2px; }
[data-theme="dark"] button:focus-visible, [data-theme="dark"] input:focus-visible { outline-color: #8cc79a; }
/* Haptik: jeder Knopf gibt beim Drücken leicht nach – kurz, ohne Federn */
button { transition: transform .12s ease-out, background-color .15s, border-color .15s, color .15s; }
button:active:not(:disabled):not(.ks-schicht-zu) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { button { transition: none; } button:active:not(:disabled) { transform: none; } }
input::placeholder { color: var(--text3); }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; }
.ks-beschriftung { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); }
svg { flex: none; }
.ks-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ks-dim { color: var(--text2); font-size: 15px; }
.ks-klein { color: var(--text3); font-size: 13px; line-height: 1.5; }
.ks-text { font-size: 14px; line-height: 1.5; color: var(--text2); }
.ks-text-gross { font-size: 16px; line-height: 1.5; }
.ks-mitte { text-align: center; }
.ks-zahl { font-variant-numeric: tabular-nums; }
.ks-fehlertext { color: var(--err); font-size: 15px; }
.ks-abschnitt { font-size: 14px; font-weight: 600; color: var(--text2); }

/* ── Knöpfe und Felder ─────────────────────────────────────────────────── */
.ks-knopf { min-height: 44px; height: 56px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.ks-knopf:active:not(:disabled) { transform: scale(.98); }
.ks-knopf:disabled { color: var(--muted); }
.ks-primaer { background: var(--grn); border-color: var(--grn); color: #fff; font-size: 17px; font-weight: 600; }
.ks-primaer:disabled { background: var(--disabled); border-color: var(--disabled); color: #fff; }
.ks-gefahr { background: var(--err); border-color: var(--err); color: #fff; font-size: 17px; font-weight: 600; }
.ks-rot { border-color: var(--err-line); color: var(--err); }
.ks-gruen-rand { border-color: var(--grn); color: var(--grn); }
.ks-h44 { height: 44px; font-size: 14px; padding: 0 14px; border-radius: 16px; }
.ks-h48 { height: 48px; font-size: 15px; padding: 0 16px; border-radius: 16px; }
.ks-h52 { height: 52px; font-size: 15px; padding: 0 18px; border-radius: 16px; }
.ks-h60 { height: 60px; font-size: 18px; border-radius: 16px; }
.ks-breit { width: 100%; }
.ks-reihe { display: flex; gap: 8px; }
.ks-reihe > * { flex: 1; }
.ks-reihe > .ks-doppelt { flex: 2; }
.ks-reihe-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.ks-reihe-wrap > * { flex: none; }
.ks-stapel { display: flex; flex-direction: column; gap: 8px; }
.ks-stapel-12 { display: flex; flex-direction: column; gap: 16px; }
.ks-stapel-14 { display: flex; flex-direction: column; gap: 16px; }
.ks-raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ks-feld { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text2); }
.ks-eingabe, .ks-feld input, .ks-feld select { height: 52px; width: 100%; padding: 0 16px; border: 1px solid var(--border2); border-radius: 8px; font-size: 17px; color: var(--text); background: var(--surface); }
.ks-eingabe-48 { height: 48px; }
.ks-formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.ks-formular .ks-voll { grid-column: 1 / -1; }
.ks-formular input { height: 48px; }
.ks-packzeile { display: flex; align-items: center; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.ks-packbox { width: 44px; height: 44px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--surface); border: 2px solid var(--muted); }
.ks-packbox.an { background: var(--grn); border: 1px solid var(--grn); }
.ks-dubletten { display: flex; flex-direction: column; gap: 8px; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 16px; padding: 10px 12px; }
.ks-dubletten > b { font-size: 14px; font-weight: 600; color: var(--gold-ink2); }
.ks-dubletten-zeile { display: flex; align-items: center; gap: 8px; }
.ks-dubletten-zeile span { flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.ks-dubletten button { height: 44px; padding: 0 14px; flex: none; border: 1px solid var(--gold); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--gold-ink2); }
.ks-neu-knopf { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border: 1px solid var(--grn); border-radius: 16px; background: var(--surface); font-size: 16px; font-weight: 600; color: var(--grn); }
[data-theme="dark"] .ks-neu-knopf { color: var(--grn-ink); }
.ks-suchfeld { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); }
.ks-suchfeld input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 17px; background: transparent; color: var(--text); }
.ks-icon-knopf { width: 44px; height: 44px; flex: none; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; }
.ks-icon-knopf.ks-rot { color: var(--err); }
.ks-chip { height: 44px; padding: 0 16px; border-radius: 8px; font-size: 15px; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--border2); white-space: nowrap; }
.ks-chip.aktiv { background: var(--wahl); color: var(--wahl-ink); border-color: var(--wahl); }
.ks-seg { flex: 1; min-height: 48px; padding: 4px 10px; border-radius: 16px; font-size: 15px; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--border2); }
.ks-seg.aktiv { background: var(--wahl); color: var(--wahl-ink); border-color: var(--wahl); }
.ks-tabs { display: flex; gap: 8px; background: var(--fill); padding: 6px; border-radius: 16px; }
.ks-tab { flex: 1; height: 48px; border-radius: 8px; font-size: 15px; font-weight: 600; background: transparent; color: var(--text2); border: 1px solid transparent; }
.ks-tab.aktiv { background: var(--surface); color: var(--text); border-color: var(--border2); box-shadow: 0 1px 3px rgba(30, 40, 20, .12); }
.ks-tab:disabled:not(.aktiv) { color: var(--muted); opacity: .55; }   /* gesperrt, solange eine Kartenzahlung offen ist */
.ks-schalter { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 0 2px; color: var(--text); font-size: 15px; text-align: left; }
.ks-spur { position: relative; flex: none; width: 46px; height: 28px; border-radius: 16px; background: var(--muted); transition: background .15s; }
.ks-spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.ks-schalter[aria-checked="true"] .ks-spur { background: var(--grn); }
.ks-schalter[aria-checked="true"] .ks-spur::after { left: 21px; }
.ks-schalter-text { display: flex; flex-direction: column; gap: 2px; }
.ks-schalter-text b { font-size: 15px; font-weight: 600; }
.ks-schalter-text small { font-size: 13px; color: var(--text3); line-height: 1.4; }
.ks-wahlzeile { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 60px; flex: none; padding: 8px 14px; border-radius: 16px; text-align: left; color: var(--text); background: var(--surface2); border: 1px solid var(--card); }
.ks-wahlzeile.aktiv { background: var(--grn-soft); border: 2px solid var(--grn); padding: 7px 13px; }
.ks-listeneintrag { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; flex: none; padding: 10px 12px; border-radius: 16px; text-align: left; color: var(--text); background: var(--surface2); border: 1px solid var(--card); }
.ks-listeneintrag.aktiv { background: var(--grn-soft); border: 2px solid var(--grn); padding: 9px 11px; }
.ks-pille { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; white-space: nowrap; background: var(--grau-soft); color: var(--text2); }
.ks-pille-gelb { background: var(--warn-soft); color: var(--gold-ink); }
.ks-pille-gruen { background: var(--ok-soft); color: var(--ok-ink); }
.ks-pille-rot { background: var(--err-soft); color: var(--err-ink); }
.ks-box-gruen { font-size: 15px; line-height: 1.45; color: var(--ok-ink); background: var(--ok-soft); border-radius: 16px; padding: 10px 14px; }
.ks-box-rot { font-size: 15px; line-height: 1.45; color: var(--err-ink); background: var(--err-soft); border-radius: 16px; padding: 10px 14px; }
.ks-box-gelb { font-size: 15px; line-height: 1.45; color: var(--gold-ink); background: var(--warn-soft); border-radius: 16px; padding: 10px 14px; }
.ks-panel { display: flex; flex-direction: column; gap: 8px; background: var(--surface2); border: 1px solid var(--card); border-radius: 16px; padding: 12px 14px; }
.ks-panel-rot { background: var(--err-soft); border-color: var(--err-line); }
.ks-kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 15px; }
.ks-kv span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.ks-kv.fett { font-weight: 600; }
.ks-kv.klein { padding-left: 14px; font-size: 13px; color: var(--text2); }
.ks-kv:last-child { border-bottom: 0; }
.ks-leer { padding: 20px 4px; font-size: 15px; color: var(--text2); }
.ks-lauf { width: 22px; height: 22px; border: 3px solid rgba(128, 128, 128, .25); border-top-color: var(--grn); border-radius: 50%; animation: ks-drehen .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes ks-drehen { to { transform: rotate(360deg); } }
.ks-kreis { border-radius: 50%; color: #1d1d1f; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
/* Profilbild des Hub-Kontos statt der Initialen (core/kassensystem/bilder.py) – ohne Bild bleiben die Initialen */
.ks-kreis.ks-foto { background: var(--fill); overflow: hidden; }
.ks-kreis.ks-foto img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* ── Anmeldung, Kassenwahl, Wer kassiert, PIN ───────────────────────────── */
/* Bühne vor der Kasse: Nachtwald mit Licht aus Moos, Harz und Spross, darauf eine Karte aus Glas (Markenbuch 07:
   Fläche Weiß 12 %, Weichzeichner 26 px, Rand Weiß 30 %, Lichtkante innen oben). Auf der Bühne gelten helle Token –
   alles darin (Felder, Knöpfe, Listen) folgt von selbst, die zweite Glasebene ist nur noch getönt, nicht weichgezeichnet. */
.ks-buehne { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; overflow-y: auto; isolation: isolate;
  background: radial-gradient(42vmax 42vmax at 4% -6%, rgba(46, 107, 79, .95), rgba(46, 107, 79, 0) 70%),
              radial-gradient(34vmax 34vmax at 98% 30%, rgba(201, 185, 138, .42), rgba(201, 185, 138, 0) 70%),
              radial-gradient(38vmax 38vmax at 40% 112%, rgba(95, 169, 122, .5), rgba(95, 169, 122, 0) 70%),
              #121614;
  --bg: #121614; --surface: rgba(255, 255, 255, .10); --surface2: rgba(255, 255, 255, .08); --fill: rgba(255, 255, 255, .18);
  --border: rgba(255, 255, 255, .26); --border2: rgba(255, 255, 255, .32); --line: rgba(255, 255, 255, .16); --line2: rgba(255, 255, 255, .12); --card: rgba(255, 255, 255, .22);
  --text: #f4f7f4; --text2: #dce6df; --text3: #c4d6ca; --muted: #9db0a4;
  --grn-soft: rgba(140, 199, 154, .2); --grn-ink: #bfe0c4; --disabled: rgba(255, 255, 255, .18);
  --wahl: #f4f7f4; --wahl-ink: #121614;
  --ok-soft: rgba(140, 199, 154, .2); --ok-ink: #bfe0c4;
  --gold-soft: rgba(201, 185, 138, .2); --gold-line: rgba(201, 185, 138, .45); --gold-ink: #f1e4bd; --gold-ink2: #f1e4bd;
  --warn-soft: rgba(201, 185, 138, .2); --warn-ink: #f1e4bd;
  --err: #ff8a80; --err-soft: rgba(179, 38, 30, .3); --err-line: rgba(255, 138, 128, .5); --err-ink: #ffd6d1;
  --zeichen-blatt: #8cc79a; --zeichen-stiel: #ffffff;
  color: var(--text); }
.ks-buehne .ks-primaer { border-color: rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.ks-buehne .ks-wortmarke-zeile span { color: #bfe0c4; }
.ks-buehne input::placeholder { color: rgba(244, 247, 244, .55); }
.ks-buehne button:focus-visible, .ks-buehne input:focus-visible { outline-color: #8cc79a; }
.ks-karte-gross { width: 460px; max-width: 100%; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(26px) saturate(155%); backdrop-filter: blur(26px) saturate(155%); border: 1px solid rgba(255, 255, 255, .3); border-radius: 24px; padding: 40px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 24px 48px rgba(3, 12, 8, .4); display: flex; flex-direction: column; gap: 16px; }
.ks-karte-gross h1 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; text-align: center; }
.ks-wahl-karte { width: 560px; padding: 32px 40px; gap: 8px; }
.ks-wahl-karte h1 { font-size: 28px; text-align: left; margin: 16px 0 8px; }
.ks-wahl-eintrag { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 64px; padding: 10px 16px; border-radius: 16px; text-align: left; color: var(--text); background: var(--surface2); border: 1px solid var(--card); }
.ks-wahl-eintrag.aktiv { background: var(--grn-soft); border: 2px solid var(--grn); padding: 9px 15px; }
.ks-wahl-eintrag strong { font-size: 17px; font-weight: 600; }
.ks-wahl-eintrag span { font-size: 13px; color: var(--text3); }
/* Wortmarke: das Zeichen „Spross“, „woijd“ immer klein, der Produktname leichter daneben; die Herkunft klein darunter */
.ks-zeichen { flex: none; width: 1.02em; height: 1.15em; }
.ks-zeichen .blatt { fill: var(--zeichen-blatt); }
.ks-zeichen .stiel { fill: var(--zeichen-stiel); }
.ks-zeichen .bogen { fill: none; stroke: var(--zeichen-stiel); stroke-width: 12; stroke-linecap: round; }
.ks-wortmarke { display: flex; flex-direction: column; align-items: center; gap: 8px; line-height: 1; }
.ks-wortmarke-zeile { display: inline-flex; align-items: center; gap: .32em; font-size: 32px; letter-spacing: -.035em; color: var(--text); }
.ks-wortmarke-zeile b { font-weight: 600; }
.ks-wortmarke-zeile span { font-weight: 400; color: var(--grn); letter-spacing: -.02em; }
.ks-wortmarke small { font-size: 13px; font-weight: 500; color: var(--text3); letter-spacing: 0; }
.ks-bediener-karte { width: 760px; padding: 40px; align-items: center; gap: 24px; }
.ks-bediener-karte h1 { font-size: 40px; }
.ks-bediener-liste { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.ks-bediener-wahl { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; padding: 16px 8px 16px; border-radius: 24px; color: var(--text); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 16px 32px rgba(3, 12, 8, .3); }
.ks-bediener-wahl .ks-kreis { width: 64px; height: 64px; font-size: 24px; }
.ks-bediener-wahl b { font-size: 16px; font-weight: 600; }
.ks-bediener-wahl small { font-size: 12px; color: var(--text3); margin-top: -4px; }
.ks-bediener-wahl.ohne-pin .ks-kreis { opacity: .45; }
.ks-pin-karte { width: 420px; padding: 32px 36px; align-items: center; gap: 16px; }
.ks-oeffnen-karte { width: 560px; padding: 40px; align-items: center; gap: 16px; }
.ks-oeffnen-karte h1 { font-size: 32px; }
#ks-oeffnen-inhalt { width: 100%; }
#ks-oeffnen-inhalt .ks-text-gross b { font-variant-numeric: tabular-nums; }
.ks-pin-karte h1 { font-size: 32px; }
.ks-pin-karte .ks-kreis { width: 72px; height: 72px; font-size: 28px; }
.ks-pin-punkte { display: flex; gap: 16px; }
.ks-pin-punkte span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.ks-pin-punkte span.voll { background: var(--zeichen-blatt); border-color: var(--zeichen-blatt); }
.ks-pin-punkte.falsch { animation: ks-wackeln .35s; }
@keyframes ks-wackeln { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.ks-pin-tasten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ks-pin-tasten button { height: 64px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border2); border-radius: 16px; background: var(--surface2); font-size: 26px; font-weight: 600; color: var(--text); }
.ks-pin-tasten button.ks-taste-text { font-size: 16px; }
.ks-pin-tasten button:active { background: var(--fill); transform: scale(.94); }
.ks-fuss { display: flex; gap: 16px; align-items: center; color: var(--text3); font-size: 13px; }
.ks-fuss a { color: inherit; }

/* ── Kopf und Leisten ───────────────────────────────────────────────────── */
#ks-app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.ks-kopf { min-height: 64px; flex: none; display: flex; align-items: center; gap: 16px; padding: 8px 14px 8px 20px; padding-top: calc(8px + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border); }
.ks-kopf-marke { display: inline-flex; align-items: center; gap: .32em; font-size: 20px; letter-spacing: -.035em; line-height: 1; white-space: nowrap; color: var(--text); }
.ks-kopf-marke b { font-weight: 600; }
.ks-kopf-marke span { font-weight: 400; color: var(--grn); letter-spacing: -.02em; }
[data-theme="dark"] .ks-kopf-marke span, [data-theme="dark"] .ks-wortmarke-zeile span { color: #bfe0c4; }
.ks-kopf-ort { font-size: 13px; color: var(--text2); line-height: 1.35; border-left: 1px solid var(--border); padding-left: 12px; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ks-kopf-ort b { font-weight: 400; display: block; overflow: hidden; text-overflow: ellipsis; }
.ks-kopf-luft { flex: 1; }
.ks-kopf-knopf { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--border2); border-radius: 16px; background: var(--surface); font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ks-zaehler { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--grn); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.ks-status { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 24px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--ok-soft); color: var(--ok-ink); }
.ks-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ok); }
.ks-status.gelb { background: var(--warn-soft); color: var(--warn-ink); }
.ks-status.gelb::before { background: var(--warn); }
.ks-status.rot { background: var(--err-soft); color: var(--err-ink); }
.ks-status.rot::before { background: var(--err); }
.ks-bediener-chip { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 0 6px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface2); font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; max-width: 220px; }
.ks-bediener-chip .ks-kreis { width: 36px; height: 36px; font-size: 15px; }
.ks-bediener-chip span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ks-menue-knopf { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; }
.ks-leiste { flex: none; min-height: 52px; display: flex; align-items: center; gap: 16px; padding: 4px 16px 4px 20px; background: var(--warn-soft); border-bottom: 1px solid var(--gold-line); color: var(--gold-ink); font-size: 15px; font-weight: 600; }
.ks-leiste span { flex: 1; }
.ks-leiste-rot { background: var(--err-soft); border-bottom-color: var(--err-line); color: var(--err-ink); }
.ks-leiste-rot button { border-color: var(--err-line); color: var(--err-ink); }
.ks-leiste button { height: 44px; padding: 0 16px; border: 1px solid var(--gold-rand); border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--gold-ink); }
/* Aktionen: Leiste „Läuft gerade“ unter dem Kopf, Karten im Fenster und in „Kurz ansprechen“ */
.ks-aktionsleiste { flex: none; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 20px; background: var(--gold-soft); border-bottom: 1px solid var(--gold-line); }
.ks-aktionsleiste-titel { flex: none; font-size: 13px; font-weight: 600; color: var(--gold-ink); white-space: nowrap; }
/* Natürliche Breite und wischen statt quetschen – bei fünf Aktionen blieben sonst nur Anfangsbuchstaben */
.ks-aktionsleiste-liste { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ks-aktionsleiste-liste::-webkit-scrollbar { display: none; }
.ks-aktionsleiste-liste button { flex: none; max-width: 340px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--gold-line); border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); }
.ks-aktionsleiste-liste button span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-aktionsleiste-alle { flex: none; height: 44px; padding: 0 14px; border: 1px solid var(--gold-rand); border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--gold-ink); }
.ks-aktion-karte { display: flex; flex-direction: column; gap: 8px; background: var(--surface2); border: 1px solid var(--card); border-radius: 16px; padding: 12px 14px; }
.ks-aktion-karte.ks-erinnern { background: var(--gold-soft); border-color: var(--gold-line); }
.ks-aktion-kopf { display: flex; align-items: center; gap: 8px; }
.ks-aktion-kopf b { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.ks-aktion-kopf small { font-size: 13px; color: var(--text2); white-space: nowrap; }
.ks-aktion-text { font-size: 15px; line-height: 1.5; }
.ks-aktion-punkte { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--text2); }
.ks-aktion-sagen { font-size: 14px; line-height: 1.5; color: var(--text2); font-style: italic; }
.ks-goodies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ks-goodie { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 72px; padding: 10px 14px; border-radius: 16px; text-align: left; background: var(--surface2); border: 1px solid var(--card); color: var(--text); }
.ks-goodie.aktiv { background: var(--grn-soft); border: 2px solid var(--grn); }
.ks-goodie b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.ks-goodie small { font-size: 13px; font-weight: 600; color: var(--ok-ink); }
.ks-zugabe-zeile { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; margin-bottom: 4px; border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--gold-soft); color: var(--gold-ink); }
.ks-zugabe-zeile span { flex: 1; }
.ks-zugabe-zeile.warn { background: var(--err-soft); color: var(--err-ink); }
.ks-zugabe-zeile button { flex: none; height: 44px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--gold-ink); }

/* ── Verkauf: Katalog links ─────────────────────────────────────────────── */
.ks-verkauf { flex: 1; min-height: 0; display: flex; }
.ks-katalog { flex: 1; min-width: 0; min-height: 0; padding: 14px 16px 0 20px; display: flex; flex-direction: column; gap: 16px; }
.ks-suchzeile { order: 1; display: flex; gap: 8px; }
.ks-suche { flex: 1; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; min-width: 0; }
.ks-suche input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 17px; background: transparent; color: var(--text); }
.ks-suche input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ks-kachel-flaeche { order: 3; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 16px; }
/* Größe, Bilder und Leiste stellt die Ansicht ein (core/kassensystem/ansicht.py → data-* an #ks-verkauf) */
#ks-verkauf { --kachel-min: 168px; --kachel-name: 15px; --kachel-preis: 17px; --kachel-zeilen: 3; }
#ks-verkauf[data-kachel="s"] { --kachel-min: 132px; --kachel-name: 14px; --kachel-preis: 15px; --kachel-zeilen: 2; }
#ks-verkauf[data-kachel="l"] { --kachel-min: 216px; --kachel-name: 17px; --kachel-preis: 19px; }
.ks-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--kachel-min), 1fr)); gap: 8px; }
.ks-kachel { position: relative; min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); overflow: hidden; }
.ks-kachel:active { transform: scale(.98); }
.ks-kachel.im-korb { border-color: var(--grn); box-shadow: inset 0 0 0 1px var(--grn); }
[data-theme="dark"] .ks-kachel.im-korb { border-color: #8cc79a; box-shadow: inset 0 0 0 1px #8cc79a; }
.ks-kachel-text { flex: 1; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.ks-kachel-aktion { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--gold-ink); background: var(--warn-soft); border-radius: 8px; padding: 2px 8px; }
.ks-kachel-name { font-size: var(--kachel-name); font-weight: 600; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: var(--kachel-zeilen); -webkit-box-orient: vertical; overflow: hidden; padding-right: 22px; }
.ks-kachel-unter { font-size: 12px; color: var(--text3); margin-top: 4px; }
#ks-verkauf[data-nummer="aus"] .ks-kachel-unter { display: none; }
.ks-kachel-preis { margin-top: auto; padding-top: 10px; font-size: var(--kachel-preis); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text); }
/* Ohne Bild bleibt die Kachel wie im Entwurf: Nummer unter dem Namen, Preis unten. Mit Bild steht die Nummer links
   und der Preis rechts in einer Zeile unter dem Namen – das quadratische Bild bekommt den Platz */
.ks-kachel-fuss { display: contents; }
.ks-kachel-bild { display: none; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) { padding: 0; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel-bild { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; flex: none; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-text { padding: 8px 12px 10px; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-name { -webkit-line-clamp: 2; padding-right: 0; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-fuss { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; margin-top: auto; padding-top: 4px; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-unter { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ks-verkauf:not([data-bild="aus"]) .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-preis { flex: none; margin: 0; padding: 0; }
.ks-kachel-bild img { width: 100%; height: 100%; object-fit: contain; display: block; }
#ks-verkauf[data-zuschnitt="fuellen"] .ks-kachel-bild img { object-fit: cover; }
/* Kein Bild: ein ruhiges Feld in der Farbe der Kategorie, mit den Anfangsbuchstaben und der Marke */
#ks-verkauf:not([data-bild="aus"]) .ks-kachel-bild.leer { flex-direction: column; gap: 8px; background: var(--fill); background: color-mix(in srgb, var(--ton, var(--fill)) 70%, var(--surface)); }
[data-theme="dark"] #ks-verkauf:not([data-bild="aus"]) .ks-kachel-bild.leer { background: color-mix(in srgb, var(--ton, var(--fill)) 16%, var(--surface)); }
.ks-kachel-bild.leer b { font-weight: 600; font-size: calc(var(--kachel-min) * .24); letter-spacing: -.03em; line-height: 1; color: var(--text3); }
.ks-kachel-bild.leer small { padding: 0 8px; font-size: 10px; font-weight: 600; letter-spacing: 2px; line-height: 1.2; text-align: center; color: var(--text3); overflow-wrap: anywhere; }
/* Bild groß: das Bild füllt die quadratische Kachel (die Shop-Bilder sind quadratisch), Name und Preis stehen weiß
   auf einem Verlauf darüber */
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) { aspect-ratio: 1; min-height: 0; }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-bild { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-bottom: 0; }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-bild.leer { justify-content: flex-start; padding-top: 22%; }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-text { position: absolute; left: 0; right: 0; bottom: 0; flex: none; padding: 40px 12px 10px; color: #fff; background: linear-gradient(to top, rgba(16, 14, 10, .86), rgba(16, 14, 10, .62) 55%, rgba(16, 14, 10, 0)); }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-unter { color: rgba(255, 255, 255, .78); }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-preis { color: #fff; }
#ks-verkauf[data-bild="gross"] .ks-kachel:not(.ks-kachel-sonder) .ks-kachel-statt { color: rgba(255, 255, 255, .72); }
.ks-kachel-statt { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--text3); text-decoration: line-through; }
.ks-kachel-menge { position: absolute; z-index: 2; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--grn); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.ks-kachel-sonder { background: var(--gold-soft); border: 1px dashed var(--gold); }
.ks-kachel-sonder .ks-kachel-preis { font-size: 14px; color: var(--gold-dunkel); }
.ks-kachel[data-farbe="gold"] { border-top: 4px solid var(--gold); }
.ks-kachel[data-farbe="gruen"] { border-top: 4px solid var(--grn); }
.ks-kachel[data-farbe="rot"] { border-top: 4px solid var(--err); }
.ks-kachel[data-farbe="blau"] { border-top: 4px solid #4f6470; }
.ks-kacheln-leer { grid-column: 1 / -1; padding: 48px 12px; text-align: center; color: var(--text2); font-size: 15px; }
/* Gerade gescannt oder angetippt: die Kachel leuchtet kurz auf */
.ks-kachel.ks-blitz { animation: ks-blitz .9s ease-out; }
@keyframes ks-blitz { 0% { box-shadow: 0 0 0 4px #8cc79a; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Kategorien: eine Leiste zum Wischen, über die ganze Breite des Katalogs; „oben“ steht sie zwischen Suche und Kacheln */
.ks-kategorien { order: 4; flex: none; display: flex; align-items: center; gap: 8px; margin: 0 -16px 0 -20px; padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
#ks-verkauf[data-kategorien="oben"] .ks-kategorien { order: 2; margin-top: -2px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
#ks-verkauf[data-kategorien="oben"] .ks-kachel-flaeche { margin-top: -2px; }
.ks-kat-leiste { position: relative; flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ks-kat-leiste::-webkit-scrollbar { display: none; }
.ks-kat-leiste.weiter-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.ks-kat-leiste.weiter-links { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); }
.ks-kat-leiste.weiter-links.weiter-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.ks-kat { flex: none; scroll-snap-align: start; height: 52px; padding: 0 20px; border-radius: 16px; font-size: 16px; font-weight: 600; background: var(--surface2); color: var(--text); border: 1px solid var(--border2); white-space: nowrap; }
.ks-kat.aktiv { background: var(--wahl); color: var(--wahl-ink); border-color: var(--wahl); }
.ks-kat-pfeil { flex: none; width: 44px; height: 52px; border-radius: 16px; border: 1px solid var(--border2); background: var(--surface); color: var(--text2); display: flex; align-items: center; justify-content: center; }
.ks-kat-pfeil.still { visibility: hidden; }
@media (pointer: coarse) { .ks-kat-pfeil { display: none !important; } }   /* am iPad wischt man; die Pfeile sind für Maus und Trackpad */

/* ── Verkauf: Korb rechts ──────────────────────────────────────────────── */
.ks-korb { width: 400px; flex: none; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.ks-korb-kopf { padding: 10px 16px 6px 20px; display: flex; align-items: center; gap: 8px; min-height: 58px; }
.ks-korb-titel { flex: 1; min-width: 0; }
.ks-korb-titel h2 { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-korb-titel div { font-size: 13px; color: var(--text3); }
.ks-geparkt { height: 44px; padding: 0 12px; border: 1px dashed var(--gold); border-radius: 16px; background: var(--gold-soft); font-size: 14px; font-weight: 600; color: var(--gold-ink2); white-space: nowrap; }
.ks-korb-hinweis { margin: 0 20px 8px; padding: 8px 12px; border-radius: 8px; background: var(--grn-soft); color: var(--grn-ink); font-size: 13px; line-height: 1.45; }
.ks-korb-kunde { padding: 0 20px 8px; }
.ks-kunde-knopf { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px dashed var(--border2); border-radius: 16px; background: var(--surface2); color: var(--text); text-align: left; }
.ks-kunde-knopf span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ks-kunde-knopf b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-kunde-knopf small { font-size: 12px; color: var(--text3); }
.ks-korb-zeilen { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 0 20px; }
.ks-korb-leer { padding: 36px 12px; text-align: center; color: var(--text2); font-size: 15px; line-height: 1.5; }
.ks-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ks-zeile.ks-blitz { animation: ks-zeile-blitz 1.2s ease-out; }
@keyframes ks-zeile-blitz { 0% { background: var(--grn-soft); } 100% { background: transparent; } }
.ks-zeile-text { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; color: var(--text); }
.ks-zeile-text b { font-size: 15px; font-weight: 600; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.ks-zeile-text small { font-size: 13px; color: var(--text3); }
.ks-zeile-text small.gruen { color: var(--ok-ink); }
.ks-zeile-text small.rot { color: var(--err); }
.ks-zeile-text small.rot { color: var(--err); }
.ks-zeile-pm { width: 44px; height: 44px; flex: none; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); font-size: 22px; line-height: 1; color: var(--text); }
.ks-zeile-menge { width: 24px; flex: none; text-align: center; font-size: 17px; font-weight: 600; }
.ks-zeile-summe { width: 76px; flex: none; text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ks-korb-fuss { padding: 10px 20px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.ks-rabatt-knopf { align-self: flex-start; height: 44px; padding: 0 14px; margin-bottom: 4px; border-radius: 16px; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--border2); color: var(--text); }
.ks-rabatt-knopf:disabled { color: var(--muted); }
.ks-rabatt-knopf.aktiv { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink2); }
.ks-summenzeile { display: flex; justify-content: space-between; font-size: 14px; color: var(--text2); }
.ks-summenzeile span:last-child, .ks-steuerzeile span:last-child { font-variant-numeric: tabular-nums; }
.ks-steuerzeile { display: flex; justify-content: space-between; font-size: 13px; color: var(--text3); }
.ks-summe { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.ks-summe span { font-size: 18px; font-weight: 600; }
.ks-summe strong { letter-spacing: -.02em; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ks-korb-knoepfe { display: flex; gap: 8px; margin-top: 6px; }
.ks-korb-knoepfe .ks-zweit { flex: 1; height: 64px; border-radius: 16px; font-size: 17px; font-weight: 600; border: 1px solid var(--border2); background: var(--surface); color: var(--text); }
.ks-korb-knoepfe .ks-zweit:disabled { color: var(--muted); }
.ks-bezahlen { flex: 2; height: 64px; border-radius: 16px; font-size: 20px; font-weight: 600; color: #fff; background: var(--grn); }
.ks-bezahlen:disabled { background: var(--disabled); }

/* ── Fertig ─────────────────────────────────────────────────────────────── */
.ks-fertig { flex: 1; min-height: 0; overflow-y: auto; display: flex; justify-content: center; padding: 24px 20px; }
.ks-fertig-inhalt { width: 680px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.ks-fertig-inhalt h1 { font-size: 40px; font-weight: 600; letter-spacing: -.025em; }
.ks-fertig-haken { width: 76px; height: 76px; }
.ks-fertig-haken circle { fill: var(--grn); }
.ks-fertig-betrag { font-size: 56px; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ks-fertig-betrag.gelb { color: var(--warn-ink); }
.ks-rueckgeld { background: var(--grn); color: #fff; border-radius: 24px; padding: 14px 56px; }
.ks-rueckgeld div:first-child { font-size: 16px; }
.ks-rueckgeld strong { display: block; letter-spacing: -.035em; font-size: 58px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ks-rueckgeld div:last-child { font-size: 14px; margin-top: 2px; }
.ks-tse-ok { font-size: 15px; font-weight: 600; color: var(--ok-ink); background: var(--ok-soft); border-radius: 16px; padding: 8px 14px; }
.ks-tse-warn { font-size: 15px; line-height: 1.5; color: var(--gold-ink); background: var(--warn-soft); border-radius: 16px; padding: 10px 16px; max-width: 600px; }
.ks-fertig-hinweis { font-size: 15px; line-height: 1.45; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 16px; padding: 8px 14px; }
.ks-qr-kasten { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; text-align: left; }
.ks-qr-kasten img { width: 132px; height: 132px; background: #fff; border-radius: 6px; flex: none; }
.ks-qr-kasten div { font-size: 15px; line-height: 1.5; max-width: 300px; }
.ks-mailzeile { display: flex; gap: 8px; width: 100%; max-width: 540px; }
.ks-mailzeile input { flex: 1; min-width: 0; }
.ks-naechster { margin-top: 6px; width: 340px; max-width: 100%; height: 64px; flex: none; border-radius: 16px; background: var(--grn); color: #fff; font-size: 20px; font-weight: 600; }

/* ── Tagesabschluss ─────────────────────────────────────────────────────── */
.ks-z { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 18px 20px; }
.ks-z-mitte { flex: 1; display: flex; align-items: center; justify-content: center; }
.ks-z-karte { width: 520px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: stretch; }
.ks-z-karte h2 { font-size: 22px; }
.ks-z-nr { font-size: 56px; font-weight: 600; color: var(--grn); line-height: 1; }
.ks-z-zaehlen { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ks-z-zaehlen h2 { font-size: 22px; font-weight: 600; }
.ks-stueckelung { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 2px; }
.ks-stueck { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line2); }
.ks-stueck b { width: 70px; font-size: 16px; font-weight: 600; }
.ks-stueck span { width: 34px; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ks-stueck em { flex: 1; text-align: right; font-style: normal; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text2); }
.ks-z-rechts { width: 380px; flex: none; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.ks-z-summen { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 12px 18px; display: flex; flex-direction: column; }
.ks-z-differenz { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0 3px; font-size: 18px; font-weight: 600; color: var(--ok-ink); }
.ks-z-differenz.minus { color: var(--err); }
.ks-z-differenz.plus { color: var(--warn-ink); }

/* ── Fenster, Bezahlen, Menü ────────────────────────────────────────────── */
.ks-schicht { position: fixed; inset: 0; z-index: 40; background: var(--schicht); }
.ks-schicht-zu { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; cursor: default; }
.ks-dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100% - 24px); max-height: calc(100% - 36px); background: var(--surface); border-radius: 24px; padding: 16px 22px 20px; box-shadow: var(--schatten-hoch); display: flex; flex-direction: column; gap: 16px; }
.ks-dialog-kopf { display: flex; align-items: center; gap: 8px; flex: none; }
.ks-dialog-kopf h2 { flex: 1; font-size: 22px; font-weight: 600; }
.ks-dialog-inhalt { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px; }
.ks-dialog.ks-hoch { height: calc(100% - 60px); max-height: 740px; }
.ks-zahlen-dialog { width: 820px; max-height: calc(100% - 24px); overflow-y: auto; padding: 18px 26px 22px; gap: 16px; }
.ks-rest { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ks-rest-label { font-size: 14px; color: var(--text3); }
.ks-rest-betrag { letter-spacing: -.035em; font-size: 56px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ks-rest-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; color: var(--text2); }
.ks-rest-rechts .ks-teil { display: flex; align-items: center; gap: 4px; }
.ks-teil button { width: 44px; height: 44px; color: var(--err); display: flex; align-items: center; justify-content: center; }
.ks-bar { display: flex; gap: 24px; }
.ks-numpad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 300px; flex: none; }
.ks-numpad button { height: 56px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border2); border-radius: 16px; background: var(--surface2); font-size: 24px; font-weight: 600; color: var(--text); }
.ks-numpad button:active { background: var(--fill); }
.ks-bar-rechts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ks-gegeben { border: 1px solid var(--border2); border-radius: 16px; padding: 8px 16px; }
.ks-gegeben div { font-size: 13px; color: var(--text3); }
.ks-gegeben strong { display: block; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ks-schnell { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ks-schnell button { height: 48px; border: 1px solid var(--border2); border-radius: 16px; background: var(--surface); font-size: 17px; font-weight: 600; color: var(--text); }
.ks-rueck { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.ks-rueck span { font-size: 16px; color: var(--text2); }
.ks-rueck strong { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ok-ink); }
.ks-rueck strong.rot { color: var(--err); }
.ks-schritt { display: flex; align-items: center; gap: 16px; font-size: 17px; color: var(--text2); }
.ks-schritt::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--muted); }
.ks-schritt.fertig { color: var(--text); }
.ks-schritt.fertig::before { background: var(--ok); border-color: var(--ok); }
.ks-schritt.jetzt { color: var(--text); font-weight: 600; }
.ks-schritt.jetzt::before { border: 3px solid var(--grn); background: var(--grn-soft); }
/* ZVT-Terminal: was das Gerät gerade vom Kunden will, groß – der Punkt pulsiert, solange es arbeitet */
.ks-terminal-stand { display: flex; align-items: center; gap: 16px; font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--text); padding: 4px 0; }
.ks-terminal-stand::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--grn); animation: ks-puls 1.4s ease-in-out infinite; }
@keyframes ks-puls { 50% { opacity: .3; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .ks-terminal-stand::before, .ks-kachel.ks-blitz, .ks-zeile.ks-blitz { animation: none; } }
.ks-zahlen-extra { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.ks-zahlen-extra button { height: 48px; padding: 0 16px; border-radius: 16px; font-size: 15px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border2); }
.ks-zahlen-extra button.aktiv { background: var(--grn-soft); border: 2px solid var(--grn); padding: 0 15px; }
.ks-zahlen-extra button:disabled { color: var(--muted); opacity: .55; }
.ks-schublade { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--surface); box-shadow: -10px 0 40px rgba(0, 0, 0, .18); display: flex; flex-direction: column; padding: 16px 20px; padding-top: calc(16px + env(safe-area-inset-top)); gap: 8px; overflow-y: auto; }
/* Ansicht: Schublade über dem Korb, kaum Schatten über den Kacheln – die zeigen jede Änderung gleich */
.ks-schicht-hell { z-index: 39; background: rgba(20, 26, 18, .10); }   /* Rückfragen (ks-blatt) liegen darüber */
.ks-ansicht-schublade { width: 460px; gap: 16px; }
.ks-ansicht-feld { display: flex; flex-direction: column; gap: 8px; }
.ks-ansicht-feld > b { font-size: 14px; font-weight: 600; color: var(--text2); }
.ks-ansicht-feld .ks-tab { height: 44px; font-size: 14px; padding: 0 6px; }
.ks-ansicht-quelle { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--card); font-size: 14px; line-height: 1.4; color: var(--text2); }
.ks-ansicht-quelle b { color: var(--text); }
.ks-ansicht-knoepfe { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ks-menue-punkt { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 56px; flex: none; padding: 6px 14px; border: 1px solid var(--card); border-radius: 16px; background: var(--surface2); color: var(--text); text-align: left; }
.ks-menue-punkt b { font-size: 16px; font-weight: 600; }
.ks-menue-punkt small { font-size: 13px; color: var(--text3); }
.ks-zweispaltig { display: flex; gap: 16px; height: 100%; min-height: 0; }
.ks-zweispaltig-links { width: 360px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ks-zweispaltig-liste { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ks-zweispaltig-rechts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; border-left: 1px solid var(--line); padding-left: 18px; }
.ks-zweispaltig-rechts h3 { font-size: 22px; font-weight: 600; }
.ks-bonkopf { display: flex; align-items: center; gap: 8px; width: 100%; }
.ks-bonkopf b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ks-bonkopf em { flex: 1; }
.ks-tischraster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ks-tisch { min-height: 72px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 10px 14px; border-radius: 16px; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.ks-tisch b { font-size: 17px; font-weight: 600; }
.ks-tisch span { font-size: 13px; color: var(--text2); }
.ks-tisch.belegt { background: var(--gold-soft); border-color: var(--gold); }
.ks-tisch.aktuell { background: var(--grn-soft); border: 2px solid var(--grn); padding: 9px 13px; }
.ks-qr-gross { display: flex; justify-content: center; }
.ks-qr-gross img { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 16px; }

/* ── Scanner und Hinweis ───────────────────────────────────────────────── */
.ks-scan { position: fixed; inset: 0; z-index: 60; background: #121614; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: #fff; padding: 20px; }
.ks-scan-titel { font-size: 20px; font-weight: 600; }
.ks-scan-rahmen { position: relative; width: 560px; max-width: 100%; height: 300px; border-radius: 24px; border: 3px solid #8cc79a; background: #1b201d; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ks-scan-rahmen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ks-scan-rahmen::after { content: ""; position: relative; width: 82%; height: 2px; background: #8cc79a; box-shadow: 0 0 8px #8cc79a; }
.ks-scan-text { font-size: 14px; color: #c4d6ca; max-width: 560px; text-align: center; line-height: 1.5; }
.ks-scan-ab { height: 56px; padding: 0 24px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 16px; font-weight: 600; }
.ks-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70; max-width: min(900px, calc(100% - 32px)); background: #1d1d1f; color: #f5f5f2; padding: 12px 24px; border-radius: 16px; font-size: 15px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); text-align: center; }
.ks-toast.ks-toast-err { background: var(--err); }

/* ── Kleine Bildschirme (Handy, iPad hochkant schmal) ──────────────────── */
@media (max-width: 900px) {
  .ks-kopf { flex-wrap: wrap; gap: 8px; padding-left: 14px; }
  .ks-kopf-marke { font-size: 18px; }
  .ks-korb { width: 340px; }
  #ks-verkauf { --kachel-min: 148px; }
  #ks-verkauf[data-kachel="s"] { --kachel-min: 120px; }
  #ks-verkauf[data-kachel="l"] { --kachel-min: 190px; }
  .ks-z { flex-direction: column; overflow-y: auto; }
  .ks-z-rechts { width: auto; }
  .ks-zweispaltig { flex-direction: column; }
  .ks-zweispaltig-links { width: auto; max-height: 45%; }
  .ks-zweispaltig-rechts { border-left: 0; padding-left: 0; }
  .ks-bar { flex-direction: column; }
  .ks-numpad { width: 100%; }
}
@media (max-width: 700px) {
  .ks-kopf-ort, .ks-status { display: none; }
  .ks-aktionsleiste { padding: 4px 12px; }
  .ks-aktionsleiste-titel { display: none; }
  .ks-aktionsleiste-liste button { max-width: 240px; }
  .ks-kategorien { margin: 0 -12px; padding: 8px 10px; }
  .ks-kat { height: 46px; padding: 0 16px; font-size: 15px; }
  .ks-kat-pfeil { display: none; }
  .ks-verkauf { flex-direction: column; }
  .ks-katalog { padding: 10px 12px 0; }
  .ks-katalog { flex: 1 1 52%; }
  .ks-korb { width: auto; flex: none; max-height: 48%; border-left: 0; border-top: 1px solid var(--border); }
  .ks-korb-zeilen { padding: 0 12px; }
  .ks-korb-fuss { padding: 8px 12px 12px; }
  .ks-summe strong { font-size: 24px; }
  #ks-verkauf { --kachel-min: 108px; --kachel-name: 14px; --kachel-preis: 15px; }
  #ks-verkauf[data-kachel="s"] { --kachel-min: 92px; --kachel-name: 13px; --kachel-preis: 14px; }
  #ks-verkauf[data-kachel="l"] { --kachel-min: 150px; }
  .ks-kacheln { gap: 8px; }
  .ks-kachel { min-height: 96px; padding: 10px; }
  .ks-stueckelung { grid-template-columns: 1fr; }
  .ks-tischraster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-formular { grid-template-columns: 1fr; }
  .ks-karte-gross { padding: 24px 20px; }
}
