/* Tischseite und Gastro Lite im App-Aufbau (v126, freigegebener Entwurf dev/entwurf/tisch). Jedes Restaurant ändert nur
   die fünf Farben (und die Logo-Schrift) in gestaltung/site.css, z. B. :root { --grund: …; --akzent: …; }.
   Haken (nicht umbenennen): data-tisch-kopf, data-tisch-zurueck, data-tisch-seite, data-tisch-kacheln, data-tisch-treue*,
   data-tisch-kategorien, data-tisch-video*, data-tisch-fuss, data-oeffnung, data-kennung, alle data-treue-* und
   data-tisch-feedback, data-feedback* (Nachricht an uns, v128). */
:root {
  --grund: #f4efe7;        /* Seitengrund (auch theme-color: restaurant.json → tisch.grundfarbe) */
  --flaeche: #fffdf9;      /* Kacheln */
  --tinte: #2b211b;        /* Text */
  --akzent: #3a2a21;       /* Treuekarte, Hauptknopf */
  --messing: #87612b;      /* feine Akzente und kleine Überschriften (Text auf --grund und Fußblock ab 4,9:1) */

  --leise: color-mix(in oklab, var(--tinte) 66%, var(--grund));
  --linie: color-mix(in oklab, var(--tinte) 10%, transparent);
  --icon-grund: color-mix(in oklab, var(--messing) 14%, var(--flaeche));
  --auf-akzent: #f7efe3;
  --gold: #c99a55;         /* Stempel auf der dunklen Karte */
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --logo-schrift: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --rand: 20px;
  --radius: 24px;
  --kopf: 52px;
  --ios: cubic-bezier(0.32, 0.72, 0, 1);   /* Schieben wie iOS */
  --raus: cubic-bezier(0.23, 1, 0.32, 1);
  --dauer: 440ms;
  color-scheme: light;
}

/* Seitenübergreifende Übergänge (Safari ab 18.2, Chrome ab 126); Richtung setzt tisch-richtung.js */
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  background: var(--grund);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kopf) + env(safe-area-inset-top) + 12px);
}
body {
  margin: 0; min-height: 100svh;
  font: 400 16px/1.45 var(--schrift);
  color: var(--tinte); background: var(--grund);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
button, a, [role="button"], summary { touch-action: manipulation; }
button { font: inherit; color: inherit; }
button, .kachel, .knopf, .zurueck { user-select: none; -webkit-user-select: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--messing); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 12px; background: var(--akzent); color: var(--auf-akzent); }
.skip:focus { top: calc(env(safe-area-inset-top) + 8px); }

/* ---------- Kopf: Logo mittig, Zurück links ---------- */
/* Drei Spalten: links und rechts gleich breit (mindestens 44 px, damit das Logo genau mittig bleibt), Mitte so breit wie
   das Logo, höchstens der Rest (dann Ellipse im Logo). Am Computer auf die Breite der mittigen Spalte begrenzt. */
.kopf {
  position: fixed; z-index: 10; inset: 0 0 auto;
  height: calc(var(--kopf) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right), calc((100% - 34rem) / 2 + 8px)) 0 max(8px, env(safe-area-inset-left), calc((100% - 34rem) / 2 + 8px));
  display: grid; grid-template-columns: minmax(44px, 1fr) minmax(0, max-content) minmax(44px, 1fr); align-items: center; column-gap: 6px;
  background: color-mix(in oklab, var(--grund) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: .5px solid var(--linie);
  view-transition-name: tisch-kopf;
}
.logo {
  grid-column: 2; grid-row: 1; display: block; min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; text-align: center;
  font-family: var(--logo-schrift); font-size: clamp(17px, 5.4vw, 21px); letter-spacing: .01em; line-height: 1.3;
}
.logo-vor { font-style: italic; color: var(--messing); }
.logo-name { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .78em; }
.logo-bild { display: block; height: 30px; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; }
/* Zurück füllt die linke Spalte (Ziel immer mindestens 44 px). Reicht sie für Pfeil und Text nicht (data-breite aus dem
   Bau, Container-Query), steht nur der Pfeil; der Name bleibt als aria-label. Nie „Speiseka…“. */
.zurueck {
  grid-column: 1; grid-row: 1; justify-self: stretch; container: zurueck / inline-size;
  display: flex; align-items: center; gap: 0; overflow: hidden;
  min-width: 44px; min-height: 44px; padding: 0; margin: 0 0 0 -4px;
  color: var(--tinte); text-decoration: none; font-size: 16px; line-height: 1; letter-spacing: -.01em; white-space: nowrap;
  view-transition-name: tisch-zurueck;
}
.zurueck svg { width: 28px; height: 28px; stroke-width: 2; flex: none; }
/* Text optisch mittig zum Pfeil (Entwurf: einen Tick zu hoch): Zeile genau so hoch wie der Pfeil (28 px), dann liegt die
   Mitte der Großbuchstaben auf der Mitte des Pfeils; Platz über der Zeile für Umlaut-Punkte */
.zurueck-text { flex: none; line-height: 28px; height: 28px; }
.zurueck.nur-pfeil .zurueck-text { display: none; }
@container zurueck (max-width: 59.98px) { .zurueck[data-breite="60"] .zurueck-text { display: none; } }
@container zurueck (max-width: 69.98px) { .zurueck[data-breite="70"] .zurueck-text { display: none; } }
@container zurueck (max-width: 79.98px) { .zurueck[data-breite="80"] .zurueck-text { display: none; } }
@container zurueck (max-width: 89.98px) { .zurueck[data-breite="90"] .zurueck-text { display: none; } }
@container zurueck (max-width: 99.98px) { .zurueck[data-breite="100"] .zurueck-text { display: none; } }
@container zurueck (max-width: 109.98px) { .zurueck[data-breite="110"] .zurueck-text { display: none; } }
@container zurueck (max-width: 119.98px) { .zurueck[data-breite="120"] .zurueck-text { display: none; } }
@container zurueck (max-width: 129.98px) { .zurueck[data-breite="130"] .zurueck-text { display: none; } }
@container zurueck (max-width: 139.98px) { .zurueck[data-breite="140"] .zurueck-text { display: none; } }
@container zurueck (max-width: 149.98px) { .zurueck[data-breite="150"] .zurueck-text { display: none; } }
@container zurueck (max-width: 159.98px) { .zurueck[data-breite="160"] .zurueck-text { display: none; } }
@container zurueck (max-width: 169.98px) { .zurueck[data-breite="170"] .zurueck-text { display: none; } }
@container zurueck (max-width: 179.98px) { .zurueck[data-breite="180"] .zurueck-text { display: none; } }
@container zurueck (max-width: 189.98px) { .zurueck[data-breite="190"] .zurueck-text { display: none; } }
@container zurueck (max-width: 199.98px) { .zurueck[data-breite="200"] .zurueck-text { display: none; } }
@container zurueck (max-width: 209.98px) { .zurueck[data-breite="210"] .zurueck-text { display: none; } }
@container zurueck (max-width: 219.98px) { .zurueck[data-breite="220"] .zurueck-text { display: none; } }
.zurueck:active { opacity: .45; }

/* ---------- Seite ---------- */
.seite { position: relative; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; display: flex; flex-direction: column; }
.innen {
  flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; max-width: 34rem; margin-inline: auto;
  padding: calc(var(--kopf) + env(safe-area-inset-top) + 18px) max(var(--rand), env(safe-area-inset-right)) 28px max(var(--rand), env(safe-area-inset-left));
}

/* ---------- Ebene 0: Gruß + Kacheln ---------- */
.innen-start { padding-bottom: 32px; }
.gruss { padding: 22px 4px 26px; }
.gruss-klein { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--messing); }
.gruss-gross { margin: 0; font-family: var(--logo-schrift); font-weight: 400; font-size: 34px; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.mit-gruss .kacheln { margin-top: clamp(24px, 9svh, 80px); }
.innen-start:not(.mit-gruss) { min-height: 0; padding-top: calc(var(--kopf) + env(safe-area-inset-top) + 22px); }

.kacheln { display: grid; gap: 12px; }
.kachel {
  position: relative; display: flex; align-items: center; gap: 16px;
  min-height: 84px; padding: 16px;
  background: var(--flaeche); color: var(--tinte); text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 0 0 .5px var(--linie), 0 1px 2px rgb(43 33 27 / .04), 0 6px 18px -10px rgb(43 33 27 / .18);
  transition: transform 160ms var(--raus), background-color 160ms ease;
}
.kachel:active { transform: scale(.975); background: color-mix(in oklab, var(--flaeche) 92%, var(--tinte)); }
.kachel-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--icon-grund); color: var(--akzent); }
.kachel-icon svg { width: 26px; height: 26px; }
.kachel-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.kachel-titel { font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.kachel-unter { font-size: 15px; color: var(--leise); line-height: 1.3; text-wrap: balance; }
.kachel-pfeil { flex: none; width: 22px; height: 22px; color: color-mix(in oklab, var(--tinte) 35%, transparent); stroke-width: 2; }

.kachel-treue { min-height: 112px; background: var(--akzent); color: var(--auf-akzent); box-shadow: 0 10px 28px -14px rgb(43 33 27 / .55); }
.kachel-treue:active { background: color-mix(in oklab, var(--akzent) 88%, #000); }
.kachel-treue .kachel-icon { background: rgb(255 255 255 / .09); color: var(--gold); }
.kachel-treue .kachel-unter { color: rgb(247 239 227 / .78); }
.kachel-treue .kachel-pfeil { color: rgb(247 239 227 / .5); }
.mini-stempel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mini-stempel i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgb(247 239 227 / .3); }
.mini-stempel.viele i { width: 10px; height: 10px; }
.mini-stempel i.voll { background: var(--gold); border-color: var(--gold); }

.logo-unten { display: grid; justify-items: center; gap: 2px; margin-top: 28px; font-family: var(--logo-schrift); font-size: 26px; line-height: 1.1; }
.logo-unten-name { display: flex; align-items: baseline; gap: .28em; }
.logo-unten .logo-bild { height: 44px; }
.logo-ort { font-family: var(--schrift); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); margin-top: 6px; }

/* ---------- Titel tieferer Ebenen (große iOS-Titel) ---------- */
.titel {
  margin: 8px 4px 6px; font-family: var(--logo-schrift); font-weight: 400;
  font-size: 34px; line-height: 1.12; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto;
}
.unter-titel { margin: 0 4px 22px; color: var(--leise); font-size: 16px; }
.kacheln-liste { margin-top: 4px; }
.kachel-flach { min-height: 76px; padding-left: 20px; }
.kachel-weiter { margin-top: 22px; }
.kachel-weiter .kachel-text { gap: 0; }
.kachel-weiter .kachel-unter { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.hinweis-leise { margin: 18px 6px 0; font-size: 14px; color: var(--leise); line-height: 1.45; }
.hinweis-leise a { color: var(--tinte); }
.klein { font-size: 13px; }

/* ---------- Kategorie: Gerichte ---------- */
.gerichte {
  list-style: none; margin: 0; padding: 0;
  background: var(--flaeche); border-radius: var(--radius);
  box-shadow: 0 0 0 .5px var(--linie), 0 6px 18px -12px rgb(43 33 27 / .18);
}
.gericht { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; scroll-margin-top: 80px; }
.gericht + .gericht { border-top: .5px solid var(--linie); margin-left: 20px; padding-left: 0; }
.gericht.mit-bild { grid-template-columns: 5.5rem minmax(0, 1fr) auto; }
.gericht-bild { grid-row: span 3; width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 16px; align-self: start; }
.gericht-name { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.gericht-preis { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gericht-text, .gericht-mehr { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--leise); line-height: 1.4; }
.gericht.mit-bild .gericht-text, .gericht.mit-bild .gericht-mehr, .gericht.mit-bild .allergene, .gericht.mit-bild .kenn-text { grid-column: 2 / -1; }
.gericht-mehr { font-size: 14px; }
.allergene {
  grid-column: 1 / -1; justify-self: start; display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0; padding: 4px; margin-left: -4px;
  border: 0; background: none; cursor: pointer; border-radius: 10px;
}
.allergene span {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--akzent); background: var(--icon-grund);
}
.allergene[aria-expanded="true"] span { background: var(--akzent); color: var(--auf-akzent); }
.kenn-text { grid-column: 1 / -1; font-size: 14px; color: var(--leise); }
.legende { margin: 16px 6px 0; font-size: 14px; line-height: 1.6; color: var(--leise); }
.legende .nb { white-space: nowrap; }
.legende b { color: var(--tinte); font-weight: 600; }

/* ---------- Treuekarte: Kartenstück mit Messing-Prägungen ---------- */
.stempelkarte {
  position: relative; margin-top: 14px; padding: 22px 20px 20px;
  border-radius: 26px; color: #f4ead9;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklab, var(--gold) 22%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in oklab, var(--akzent) 92%, #fff), var(--akzent) 55%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06), 0 18px 40px -20px rgb(43 33 27 / .6);
  overflow: hidden;
}
.stempelkarte::after { content: ""; position: absolute; inset: 8px; border-radius: 19px; border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent); pointer-events: none; }
.karte-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; }
.karte-logo { font-family: var(--logo-schrift); font-size: 19px; letter-spacing: .02em; display: flex; gap: .28em; align-items: baseline; }
.karte-logo .logo-vor { color: var(--gold); }
.karte-logo .logo-name { font-weight: 400; text-transform: none; letter-spacing: .02em; font-size: 1em; }
.karte-zahl { font-family: var(--logo-schrift); font-size: 17px; color: rgb(244 234 217 / .7); font-variant-numeric: lining-nums; white-space: nowrap; }
.karte-zahl b { font-size: 30px; font-weight: 400; color: #f4ead9; }
.stempel-felder { list-style: none; margin: 22px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 12px; }
.stempel-felder.viele { grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stempel-feld {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; color: rgb(244 234 217 / .4);
  border: 1.5px dashed rgb(244 234 217 / .26);
}
.stempel-feld svg { width: 46%; height: 46%; }
.stempel-feld.praemie-feld { border-style: solid; border-color: color-mix(in oklab, var(--gold) 60%, transparent); color: var(--gold); }
.stempel-feld.voll {
  border: 0; color: var(--akzent);
  background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--gold) 70%, #fff), var(--gold) 55%, color-mix(in oklab, var(--gold) 70%, #000));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -2px 4px rgb(0 0 0 / .18), 0 3px 8px rgb(0 0 0 / .25);
  rotate: -8deg;
}
.stempel-feld.voll:nth-child(3n+2) { rotate: 6deg; }
.stempel-feld.voll:nth-child(3n) { rotate: -3deg; }
.stempel-feld.voll::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid rgb(58 42 33 / .28); }
.stempel-feld.voll svg path { stroke-width: 2.6; }
.stempel-feld.neu { animation: stempeln 420ms var(--raus) both; }
@keyframes stempeln { 0% { opacity: 0; transform: scale(1.5); } 55% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
.karte-fuss { margin: 0; padding: 0 4px; font-size: 15px; color: rgb(244 234 217 / .82); }
.stempelkarte.vorschau .stempel-feld:not(.praemie-feld) { counter-increment: feld; }
.stempelkarte.vorschau .stempel-feld:not(.praemie-feld)::after { content: counter(feld); font-family: var(--logo-schrift); font-size: 15px; }
.stempelkarte.vorschau .stempel-felder { counter-reset: feld; }

/* Prämie verfügbar: Hinweis-Kachel oben (der Gast sagt nur Bescheid) */
.treue-praemie {
  margin: 4px 0 10px; padding: 18px 20px; border-radius: 22px; background: var(--flaeche);
  box-shadow: 0 0 0 1.5px var(--messing), 0 10px 26px -16px rgb(43 33 27 / .4);
}
.treue-praemie-titel { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--messing); }
.treue-praemie-text { margin: 4px 0 6px; font-family: var(--logo-schrift); font-size: 30px; line-height: 1.1; }
.treue-praemie-wie { margin: 0; font-size: 16px; color: var(--tinte); }
.treue:has(.treue-praemie:not([hidden])) > .titel { font-size: 24px; margin-top: 18px; }

/* Ergebnis nach einem Code vom Gerät (Weg 2) */
.treue-ergebnis { margin: 4px 0 14px; padding: 18px 20px; border-radius: 22px; background: var(--flaeche); box-shadow: 0 0 0 1.5px var(--linie); outline: none; }
.treue-ergebnis.ok, .treue-ergebnis.praemie { box-shadow: 0 0 0 2px #2f7a4b; }
.treue-ergebnis.fehler { box-shadow: 0 0 0 2px #b42318; }
.treue-ergebnis-titel { margin: 0; font-family: var(--logo-schrift); font-size: 28px; line-height: 1.15; }
.treue-ergebnis-zeile { margin: 6px 0 0; font-size: 16px; }
.treue-ergebnis-zeit { margin: 4px 0 14px; font-size: 14px; color: var(--leise); }
.treue-ergebnis .knopf { width: 100%; }
/* v127: Frage nach dem Code am Gerät (Weg 2), wenn eine Prämie frei ist; „Eingelöst“ groß fürs Personal */
.treue-ergebnis-frage { margin: 14px 0 0; padding-top: 16px; border-top: 1.5px solid var(--linie); }
.treue-ergebnis-frage-titel { margin: 0; font-family: var(--logo-schrift); font-size: 26px; line-height: 1.15; }
.treue-ergebnis-frage-text { margin: 4px 0 16px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.treue-ergebnis-frage .knopf + .knopf { margin-top: 10px; }
/* v129: „Eingelöst“ für das Personal auf einen Blick: grün gefüllt = ausgeben (3 Minuten), danach grau = nicht ausgeben.
   Weiß auf #1e6b40 6,5:1; Text auf Grau ab 7:1. Neben der Farbe wechseln Text und Symbol (Haken / Uhr). */
.treue-ergebnis.praemie { background: #1e6b40; color: #fff; box-shadow: none; }
.treue-ergebnis.praemie .treue-ergebnis-titel { font-size: 34px; }
.treue-ergebnis.praemie .treue-ergebnis-zeile { font-size: 19px; font-weight: 600; }
.treue-ergebnis.praemie .treue-ergebnis-zeit { margin-bottom: 10px; font-size: 17px; font-weight: 600; color: #fff; }
.treue-ergebnis.praemie .knopf-zweit { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.treue-status { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.treue-status svg { flex: none; width: 26px; height: 26px; padding: 3px; border-radius: 50%; background: #fff; color: #1e6b40; }
.treue-ergebnis.eingeloest-alt { background: #e4e1dc; color: #2b2622; box-shadow: none; }
.treue-ergebnis.eingeloest-alt .treue-status { font-size: 19px; }
.treue-ergebnis.eingeloest-alt .treue-status svg { background: #5b5651; color: #fff; }
.treue-ergebnis.eingeloest-alt .treue-ergebnis-titel { margin-top: 6px; font-family: var(--schrift); font-size: 16px; font-weight: 600; }
.treue-ergebnis.eingeloest-alt .treue-ergebnis-zeile:empty { display: none; }
.treue-ergebnis.eingeloest-alt .treue-ergebnis-zeit { color: #4a4541; }
/* v127: „Live“ mit pulsierendem Punkt (ein Bildschirmfoto läuft nicht weiter), nur im grünen Zustand */
.treue-live { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 16px; font-weight: 700; }
.treue-live-punkt { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: treue-live 1.2s ease-in-out infinite; }
@keyframes treue-live { 50% { opacity: .25; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .treue-live-punkt { animation: none; } }
.treue-laden { color: var(--leise); margin: 12px 4px; }
.treue-link-box { display: grid; gap: 14px; margin-top: 10px; }
.treue-meldung { margin: 12px 6px 0; font-size: 15px; }
.treue-meldung:empty { display: none; }
/* v137 Apple Wallet: offizielles Abzeichen unverändert, mittig unter dem QR-Knopf */
.treue-wallet { display: grid; justify-items: center; gap: 6px; margin: 16px 0 0; text-align: center; }
.treue-wallet[hidden] { display: none; }
.wallet-knopf { display: inline-block; border-radius: 9px; line-height: 0; }
.wallet-knopf[hidden] { display: none; }
button.wallet-knopf { border: 0; padding: 0; margin: 0; background: none; color: inherit; cursor: pointer; border-radius: 25px; } /* v138 Google Wallet: Knopf ohne eigene Gestalt, nur das Abzeichen */
button.wallet-knopf:disabled { opacity: .6; cursor: progress; }
.wallet-knopf:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.wallet-abzeichen { height: 48px; width: auto; fill: initial; stroke: none; stroke-width: initial; } /* Abzeichen unverändert: keine Strich-/Füllregeln der Seite erben */
.treue-wallet .wallet-knopf { margin-block: 2px; } /* v140: Schutzraum der offiziellen Abzeichen (Google 8 dp, Apple 0,1 × Höhe) mit dem Abstand des Rasters */
.treue-wallet .treue-meldung, .treue-wallet .hinweis-leise { margin: 0; }
.treue-wallet .wallet-angebote { margin-bottom: 5px; } /* v142: Abstand Häkchen-Text zum Abzeichen wie in der Komplett-Seite */
.treue-wallet .treue-meldung.wallet-meldung-leise { font-size: 14px; line-height: 1.45; color: var(--leise); } /* v142: nur die Bestätigung nach dem Angebots-Haken leise; Fehler und Rückfrage bleiben unverändert */
/* v142: ab Tablet die Abzeichen nebeneinander in einer Zeile (Abzeichen selbst unverändert, 48 px; Schutzraum je mindestens 8 px), am Handy untereinander */
@media (min-width: 600px) {
  .treue-wallet { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; }
  .treue-wallet > :not(.wallet-knopf) { flex: 0 0 100%; }
  .treue-wallet .wallet-knopf { margin: 4px; }
  .treue-wallet .wallet-angebote { margin-inline: auto; }
}
/* v139 Angebote auf der Wallet-Karte: Häkchen (nicht vorausgewählt) und Abbestellen über den Link der Pass-Rückseite */
.wallet-angebote { display: flex; align-items: flex-start; gap: .6em; max-width: 34em; text-align: left; font-size: .875rem; line-height: 1.4; cursor: pointer; }
.wallet-angebote[hidden], .wallet-abbestellen[hidden] { display: none; }
.wallet-angebote input { flex: none; width: 1.25rem; height: 1.25rem; margin: .1em 0 0; accent-color: currentColor; }
.wallet-abbestellen { display: grid; justify-items: start; gap: .4em; max-width: 34em; margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid currentColor; border-radius: 12px; }
.wallet-abbestellen p { margin: 0; }
.treue-konto { display: flex; justify-content: center; gap: 24px; margin: 22px 0 6px; }
.treue-angemeldet, .treue-abgemeldet { display: flex; flex-direction: column; flex: 1 0 auto; }
.treue-angemeldet > [data-treue-probe] { margin-top: 14px; }

/* Anmelden */
.treue-form { margin-top: 22px; display: grid; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--flaeche); box-shadow: 0 0 0 .5px var(--linie), 0 6px 18px -12px rgb(43 33 27 / .18); }
.form-titel { margin: 0; font-family: var(--logo-schrift); font-weight: 400; font-size: 24px; }
.feld { display: grid; gap: 6px; }
.feld label { font-size: 14px; font-weight: 600; margin-left: 2px; }
.feld input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 16px; border: 0;
  background: var(--grund); color: var(--tinte); font: 400 17px/1.3 var(--schrift); /* ab 16 px zoomt iOS nicht */
  box-shadow: inset 0 0 0 1px var(--linie); outline: none; transition: box-shadow 160ms ease;
}
.feld input:focus { box-shadow: inset 0 0 0 2px var(--messing); }
.feld input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b42318; }
.feld input.code-feld { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.feld-hinweis { margin: 0 2px; font-size: 14px; color: var(--leise); }
.feld-fehler { margin: 0 2px; font-size: 14px; color: #b42318; }
.feld-fehler:empty { display: none; }
.treue-gesendet { margin: 0; font-size: 15px; color: var(--leise); }
.treue-code-wege { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0; }
.link-knopf { border: 0; background: none; padding: 10px 2px; font-size: 15px; color: var(--tinte); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--linie); cursor: pointer; }

/* Hinweis-Box (Weg 2, Demo, Fehler) */
.hinweis-box {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 14px 0 0; padding: 14px 16px; border-radius: 18px;
  background: var(--icon-grund); font-size: 15px; line-height: 1.4;
}
.hinweis-box svg { flex: none; width: 22px; height: 22px; color: var(--messing); margin-top: 1px; }
.hinweis-weg2 { background: transparent; box-shadow: inset 0 0 0 1px var(--linie); font-size: 14px; color: var(--leise); }

/* ---------- Leiste unten im Daumenbereich ---------- */
.leiste {
  position: sticky; bottom: 0; z-index: 4; margin: auto calc(-1 * var(--rand)) -28px;
  display: grid; gap: 10px;
  padding: 14px var(--rand) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--grund) 72%, color-mix(in oklab, var(--grund) 0%, transparent));
}
.knopf {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 20px; border-radius: 18px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
  transition: transform 140ms var(--raus), opacity 160ms ease;
}
.knopf svg { width: 22px; height: 22px; }
.knopf:active { transform: scale(.97); }
.knopf:disabled { opacity: .45; cursor: default; transform: none; }
.knopf-haupt { background: var(--akzent); color: var(--auf-akzent); }
.knopf-zweit { background: transparent; color: var(--akzent); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--akzent) 22%, transparent); }
.knopf-warnung { background: #b42318; color: #fff; }

/* ---------- Nachricht an uns (v128, nur Lite mit tisch.feedback) ---------- */
.feedback { display: flex; flex-direction: column; flex: 1 0 auto; }
.feld-nachricht { position: relative; gap: 8px; }
.feld-nachricht textarea {
  width: 100%; min-height: 200px; resize: none;
  padding: 16px 18px 36px; border-radius: 20px; border: 0;
  background: var(--flaeche); color: var(--tinte);
  font: 400 17px/1.5 var(--schrift); /* ab 16 px zoomt iOS nicht */
  box-shadow: 0 0 0 .5px var(--linie), 0 6px 18px -12px rgb(43 33 27 / .18);
  outline: none; transition: box-shadow 160ms ease;
}
.feld-nachricht textarea:focus { box-shadow: 0 0 0 2px var(--messing); }
.feld-nachricht textarea[aria-invalid="true"] { box-shadow: 0 0 0 2px #b42318; }
.feld-nachricht textarea::placeholder { color: color-mix(in oklab, var(--tinte) 50%, var(--flaeche)); }
.feld-zaehler { position: absolute; right: 16px; bottom: 12px; font-size: 13px; color: var(--leise); font-variant-numeric: tabular-nums; pointer-events: none; }
.feld-zaehler.voll { color: #b42318; font-weight: 600; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback .feld-fehler { margin-top: 10px; }
.feedback .hinweis-leise { margin-top: 14px; }
.danke { flex: 1 0 auto; display: flex; flex-direction: column; text-align: center; padding-top: clamp(24px, 10svh, 90px); outline: none; }
.danke-haken { width: 84px; height: 84px; margin: 0 auto 10px; color: var(--messing); stroke-width: 2.2; }
.danke-haken circle { stroke-width: 1.6; opacity: .5; }
.danke-haken path { stroke-dasharray: 44; stroke-dashoffset: 44; animation: haken 520ms 120ms var(--raus) forwards; }
@keyframes haken { to { stroke-dashoffset: 0; } }
.danke .unter-titel { max-width: 290px; margin-inline: auto; }

/* ---------- Blatt mit eigenem Code und Rückfragen ---------- */
dialog { color: var(--tinte); }
.blatt {
  margin: auto 0 0; padding: 0; border: 0; width: 100%; max-width: 100%; max-height: 100%;
  background: transparent; overflow: visible;
}
.blatt::backdrop, .frage::backdrop { background: rgb(20 14 10 / .38); }
.blatt-flaeche {
  width: 100%; max-width: 34rem; margin-inline: auto; padding: 10px var(--rand) calc(20px + env(safe-area-inset-bottom));
  background: var(--flaeche); border-radius: 28px 28px 0 0; text-align: center;
  animation: blatt-rein 380ms var(--ios) both;
}
@keyframes blatt-rein { from { transform: translateY(100%); } }
.blatt-griff { display: block; width: 38px; height: 5px; border-radius: 3px; margin: 0 auto 14px; background: var(--linie); }
.blatt-titel { margin: 0 0 16px; font-family: var(--logo-schrift); font-weight: 400; font-size: 24px; }
.qr { width: min(260px, 72vw); aspect-ratio: 1; margin: 0 auto; padding: 14px; background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px var(--linie); }
.qr svg { display: block; width: 100%; height: 100%; }
.blatt-stand { margin: 14px 0 0; font-weight: 600; }
.blatt-stand:empty { display: none; }
.blatt-text { margin: 8px auto 18px; max-width: 300px; color: var(--leise); font-size: 15px; }
.blatt .knopf { width: 100%; }
.frage { max-width: min(26rem, calc(100% - 2 * var(--rand))); padding: 22px 20px 18px; border: 0; border-radius: 24px; background: var(--flaeche); }
.frage h2 { margin: 0 0 8px; font-family: var(--logo-schrift); font-weight: 400; font-size: 24px; }
.frage p { margin: 0 0 18px; color: var(--leise); }
.frage-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Text-Seiten (Recht, Allergene, Kontakt, 404) ---------- */
.text-seite, .kontakt { width: 100%; }
.text-spalte { overflow-wrap: break-word; }
.text-spalte h1, .kontakt h1 { margin: 8px 0 14px; font-family: var(--logo-schrift); font-weight: 400; font-size: 32px; line-height: 1.12; hyphens: auto; }
.text-spalte h2, .kontakt h2 { margin: 26px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.text-spalte p, .text-spalte li, .kontakt p { font-size: 16px; line-height: 1.55; }
.text-spalte ul { padding-left: 1.2em; }
.tabelle-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--rand)); padding: 0 var(--rand); }
.allergen-tabelle { border-collapse: collapse; font-size: 14px; min-width: 32rem; }
.allergen-tabelle caption { text-align: left; font-weight: 600; margin-bottom: 6px; }
.allergen-tabelle th, .allergen-tabelle td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: .5px solid var(--linie); }
dl.legende { display: grid; gap: 4px; margin: 0; }
dl.legende div { display: flex; gap: 10px; }
dl.legende dt { font-weight: 600; min-width: 2em; color: var(--tinte); }
dl.legende dd { margin: 0; }
.statement-tel { font-family: var(--logo-schrift); font-size: 28px; margin: 0 0 8px; }
.statement-tel a { text-decoration: none; }
.statement-404 { font-family: var(--logo-schrift); font-size: 64px; line-height: 1; margin: 0; color: var(--messing); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 16px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; text-decoration: none; }

/* Öffnungszeiten */
.zeiten { width: 100%; border-collapse: collapse; font-size: 15px; }
.zeiten th, .zeiten td { padding: 5px 0; text-align: left; font-weight: 400; vertical-align: top; }
.zeiten td { text-align: right; color: var(--leise); }
.zeiten tr.heute th, .zeiten tr.heute td { font-weight: 600; color: var(--tinte); }

/* ---------- Fuß ---------- */
.fuss {
  width: 100%; max-width: 34rem; margin: 0 auto; padding: 8px max(var(--rand), env(safe-area-inset-left)) calc(28px + env(safe-area-inset-bottom));
  color: var(--leise); font-size: 14px;
}
.fuss-bloecke { display: grid; gap: 12px; margin-bottom: 18px; }
.fuss-block { padding: 18px 20px; border-radius: var(--radius); background: color-mix(in oklab, var(--flaeche) 60%, var(--grund)); box-shadow: 0 0 0 .5px var(--linie); color: var(--tinte); }
.fuss-block p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.fuss-block p:last-child { margin-bottom: 0; }
.fuss-titel { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--messing); }
.fuss-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.fuss-status:empty { display: none; }
.fuss-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in oklab, var(--tinte) 35%, transparent); }
.fuss-status.offen::before { background: #2f7a4b; }
.fuss-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; }
.fuss-links a { display: inline-block; padding: 8px 2px; text-decoration: none; color: var(--leise); }
.fuss-klein { padding-top: 0; }
.fuss-marke { margin: 14px 0 0; text-align: center; }
.fuss-marke a { display: inline-flex; align-items: center; gap: 8px; padding: 8px; text-decoration: none; color: var(--leise); font-size: 12px; font-weight: 400; letter-spacing: .02em; }
.fuss-marke svg { height: 16px; width: auto; }
.fuss-hinweis { text-align: center; font-size: 12px; margin: 10px 0 0; }

/* ---------- Hintergrundvideo (optional, nur Ebene 0) ---------- */
.hintergrund { position: fixed; inset: 0; z-index: 0; background: #1b130e; }
.standbild, .video, .schleier { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.schleier { background: linear-gradient(to bottom, rgb(20 14 10 / .35), rgb(20 14 10 / .15) 35%, rgb(20 14 10 / .55) 70%, rgb(20 14 10 / .8)); }
.mit-video .seite { z-index: 1; background: transparent; }
body.mit-video { background: #1b130e; }
.mit-video .kopf { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fbf4ea; }
.mit-video .logo-vor, .mit-video .gruss-klein { color: #e6bd82; }
.mit-video .innen-start { color: #fbf4ea; }
.mit-video .kachel:not(.kachel-treue) {
  background: rgb(30 22 17 / .42); color: #fbf4ea;
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .16);
}
.mit-video .kachel:not(.kachel-treue) .kachel-icon { background: rgb(255 255 255 / .1); color: #e6bd82; }
.mit-video .kachel:not(.kachel-treue) .kachel-unter { color: rgb(251 244 234 / .78); }
.mit-video .kachel:not(.kachel-treue) .kachel-pfeil { color: rgb(251 244 234 / .55); }
.mit-video .kachel-treue { background: rgb(244 239 231 / .94); color: var(--tinte); }
.mit-video .kachel-treue .kachel-icon { background: var(--icon-grund); color: var(--akzent); }
.mit-video .kachel-treue .kachel-unter { color: var(--leise); }
.mit-video .kachel-treue .kachel-pfeil { color: color-mix(in oklab, var(--tinte) 35%, transparent); }
.mit-video .kachel-treue .mini-stempel i { border-color: color-mix(in oklab, var(--tinte) 25%, transparent); }
.mit-video .kachel-treue .mini-stempel i.voll { background: var(--messing); border-color: var(--messing); }
.mit-video .logo-unten { color: #fbf4ea; }
.mit-video .logo-ort { color: rgb(251 244 234 / .62); }
.mit-video .fuss { color: rgb(251 244 234 / .72); }
.mit-video .fuss-links a, .mit-video .fuss-marke a { color: rgb(251 244 234 / .72); }
.mit-video .fuss-block { background: rgb(30 22 17 / .55); color: #fbf4ea; box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .14); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.mit-video .fuss-titel { color: #e6bd82; }
.mit-video .zeiten td { color: rgb(251 244 234 / .75); }
.mit-video .zeiten tr.heute th, .mit-video .zeiten tr.heute td { color: #fbf4ea; }
.video-pause {
  position: fixed; z-index: 11; right: max(12px, env(safe-area-inset-right)); top: calc(env(safe-area-inset-top) + 6px);
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgb(20 14 10 / .35); color: #fbf4ea; cursor: pointer;
}
.video-pause svg { width: 18px; height: 18px; stroke-width: 2.4; }
.video-pause .ico-play { display: none; fill: currentColor; stroke-width: 1.4; }
.video-pause[aria-pressed="true"] .ico-play { display: block; }
.video-pause[aria-pressed="true"] .ico-pause { display: none; }

/* ---------- Übergänge: seitlich schieben wie iOS (View Transitions, sonst CSS beim Laden) ---------- */
/* Der Kopf hat einen eigenen Namen und bleibt stehen; der Rest der Seite (root) schiebt. */
::view-transition-group(root) { animation-duration: var(--dauer); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(tisch-kopf) { animation-duration: 260ms; }
html.vt-vor::view-transition-old(root) { animation: vt-alt-vor var(--dauer) var(--ios) both; }
html.vt-vor::view-transition-new(root) { animation: vt-neu-vor var(--dauer) var(--ios) both; }
html.vt-zurueck::view-transition-old(root) { animation: vt-alt-zurueck var(--dauer) var(--ios) both; z-index: 2; }
html.vt-zurueck::view-transition-new(root) { animation: vt-neu-zurueck var(--dauer) var(--ios) both; }
::view-transition-old(tisch-zurueck) { animation: vt-raus 180ms ease both; }
::view-transition-new(tisch-zurueck) { animation: vt-rein 260ms 80ms var(--raus) both; }
@keyframes vt-alt-vor { to { transform: translateX(-30%); filter: brightness(.93); } }
@keyframes vt-neu-vor { from { transform: translateX(100%); box-shadow: -12px 0 32px rgb(0 0 0 / .14); } to { box-shadow: -12px 0 32px rgb(0 0 0 / 0); } }
@keyframes vt-alt-zurueck { from { box-shadow: -12px 0 32px rgb(0 0 0 / .12); } to { transform: translateX(100%); box-shadow: -12px 0 32px rgb(0 0 0 / 0); } }
@keyframes vt-neu-zurueck { from { transform: translateX(-30%); filter: brightness(.93); } }
@keyframes vt-raus { to { opacity: 0; } }
@keyframes vt-rein { from { opacity: 0; transform: translateX(14px); } }
@keyframes vt-blende { from { opacity: 0; } }
/* Rückfall ohne View Transitions: nur die neue Seite schiebt beim Laden herein (Kopf bleibt) */
html.ein-vor .seite { animation: vt-neu-vor var(--dauer) var(--ios) both; }
html.ein-zurueck .seite { animation: vt-neu-zurueck var(--dauer) var(--ios) both; }

@media (prefers-reduced-motion: reduce) {
  html.vt-vor::view-transition-old(root), html.vt-zurueck::view-transition-old(root) { animation: vt-raus 200ms ease both; }
  html.vt-vor::view-transition-new(root), html.vt-zurueck::view-transition-new(root) { animation: vt-blende 200ms ease both; }
  ::view-transition-old(tisch-zurueck), ::view-transition-new(tisch-zurueck) { animation: vt-blende 200ms ease both; }
  html.ein-vor .seite, html.ein-zurueck .seite { animation: vt-blende 200ms ease both; }
  .stempel-feld.neu, .blatt-flaeche { animation: none; }
  .danke-haken path { animation: none; stroke-dashoffset: 0; }
  .kachel:active, .knopf:active { transform: none; }
  .kachel, .knopf { transition: none; }
}

@media (hover: hover) and (pointer: fine) {
  .kachel:hover { background: color-mix(in oklab, var(--flaeche) 96%, var(--tinte)); }
  .kachel-treue:hover { background: color-mix(in oklab, var(--akzent) 94%, #fff); }
  .fuss-links a:hover, .link-knopf:hover { color: var(--tinte); }
}

/* Breiter als das Handy: gleiche Spalte, mittig (Handy zuerst) */
@media (min-width: 48rem) {
  .gruss-gross, .titel { font-size: 40px; }
}
