/*
  style.css
  Für Handy zuerst gebaut, ab 720 px Breite mehr Platz für Computer.
  Die Restaurant-Farbe kommt über --farbe, --farbe-dunkel und --farbe-hell aus daten.js.
*/

:root {
  --farbe: #b45309;
  --farbe-dunkel: #92400e;
  --farbe-hell: #fdf0e1;
  --grund: #fbf7f2;
  --karte: #ffffff;
  --text: #2a211b;
  --text-leise: #6b5d52;
  --linie: #ebe2d8;
  --gruen: #15803d;
  --gruen-hell: #e8f6ec;
  --gelb-hell: #fff6dc;
  --gelb-linie: #f1d38a;
  --rot: #b91c1c;
  --rund: 16px;
  --rund-klein: 10px;
  --schatten: 0 1px 2px rgba(60, 35, 15, .06), 0 4px 16px rgba(60, 35, 15, .07);
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
  min-height: 100vh;
}

body.blatt-offen { overflow: hidden; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
a { color: var(--farbe-dunkel); }
small { color: var(--text-leise); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.klein { font-size: .875rem; color: var(--text-leise); }
.mitte { text-align: center; justify-content: center; }

/* ---------- Demo-Band und Kopf ---------- */

.demo-band {
  background: #2a211b;
  color: #fde7c8;
  font-size: .8rem;
  text-align: center;
  padding: 6px 16px;
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--karte);
  border-bottom: 1px solid var(--linie);
  box-shadow: 0 2px 10px rgba(60, 35, 15, .05);
}

.kopf-innen {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  min-width: 0;
  flex: 1;
}

.marke-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marke-name small { font-weight: 500; font-size: .75rem; }

.logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--farbe);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .02em;
}
.logo.klein { width: 32px; height: 32px; border-radius: 10px; font-size: .78rem; }
.logo.gross { width: 76px; height: 76px; border-radius: 22px; font-size: 1.7rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }

.kopf-nav { display: flex; gap: 2px; flex: none; }

.kopf-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 52px;
  padding: 4px 6px;
  border-radius: var(--rund-klein);
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.2;
}
.kopf-link span:last-child, .kopf-link span:nth-child(2) { font-size: .68rem; color: var(--text-leise); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-link:hover { background: var(--farbe-hell); }

.zahl {
  position: absolute;
  top: 0;
  right: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--farbe);
  color: #fff;
  font-size: .72rem;
  display: grid;
  place-items: center;
}

/* ---------- Inhalt ---------- */

.inhalt {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  outline: none;
}

.abschnitt-titel { margin-top: 28px; }

.karte-box {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  padding: 16px;
  box-shadow: var(--schatten);
  margin-bottom: 16px;
}

.schmal { max-width: 520px; margin: 0 auto; }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--farbe);
  border-radius: 999px;
  background: var(--farbe);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform .08s ease, background .15s ease;
}
.knopf:hover { background: var(--farbe-dunkel); border-color: var(--farbe-dunkel); }
.knopf:active { transform: scale(.98); }
.knopf.zweit { background: var(--karte); color: var(--farbe-dunkel); }
.knopf.zweit:hover { background: var(--farbe-hell); }
.knopf.voll { width: 100%; }
.knopf.riesig { min-height: 60px; font-size: 1.15rem; margin-top: 8px; }
.knopf.klein-knopf { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.knopf.gruen { background: var(--gruen); border-color: var(--gruen); }
.knopf.warn { background: var(--rot); border-color: var(--rot); }

.knopf-text {
  background: none;
  border: none;
  padding: 10px 4px;
  color: var(--farbe-dunkel);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.knopf-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.knopf-stapel { display: grid; gap: 10px; margin: 16px 0; }

/* ---------- Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip {
  font-size: .8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--farbe-hell);
  color: var(--farbe-dunkel);
  font-weight: 600;
}
.chip.leise { background: #f1ece6; color: var(--text-leise); }
.chip.hell { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Startseite ---------- */

.start-held {
  background: linear-gradient(135deg, #7c2d12, #b45309 60%, #d97706);
  color: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  margin-bottom: 8px;
}
.start-held h1 { font-size: 1.8rem; }
.start-held p { color: #fff3e3; max-width: 560px; }
.vorzeile { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; opacity: .85; }

.restaurant-liste { display: grid; gap: 16px; }

.restaurant-karte {
  display: flex;
  flex-direction: column;
  background: var(--karte);
  border-radius: var(--rund);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
  transition: transform .15s ease, box-shadow .15s ease;
}
.restaurant-karte:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(60, 35, 15, .12); }

.rk-bild {
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 4rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .25) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, .18) 0 22%, transparent 23%),
    var(--farbe);
}
.rk-text { padding: 14px 16px 16px; }
.rk-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rk-kopf h3 { margin: 0; font-size: 1.15rem; }
.rk-text p { color: var(--text-leise); margin-bottom: 6px; }

.status { font-size: .85rem; font-weight: 600; }
.status.offen { color: var(--gruen); }
.status.zu { color: var(--rot); }

.info-kasten {
  margin-top: 28px;
  background: var(--karte);
  border: 1px dashed #d8c6b3;
  border-radius: var(--rund);
  padding: 18px;
}
.tipp { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--linie); }
.tipp:first-of-type { border-top: none; }
.tipp > span { font-size: 1.6rem; line-height: 1; }
.tipp p { margin-bottom: 6px; color: var(--text-leise); }

/* ---------- Restaurant-Startseite ---------- */

.held {
  text-align: center;
  color: #fff;
  border-radius: 24px;
  padding: 28px 18px 22px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .18) 0 60px, transparent 61px),
    radial-gradient(circle at 92% 85%, rgba(255, 255, 255, .12) 0 90px, transparent 91px),
    linear-gradient(160deg, var(--farbe), var(--farbe-dunkel));
  margin-bottom: 16px;
}
.held-logo { margin-bottom: 12px; }
.held-logo .logo { background: #fff; color: var(--farbe); }
.held h1 { font-size: 1.9rem; margin-bottom: 4px; }
.slogan { opacity: .92; }

.status-pille {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
}
.status-pille.offen { color: var(--gruen); }
.status-pille.zu { color: var(--rot); }

.hinweis-balken {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--farbe-hell);
  border: 1px solid var(--linie);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--rund);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.hinweis-balken span { display: flex; flex-direction: column; }
.hinweis-balken strong { color: var(--farbe-dunkel); white-space: nowrap; }
.hinweis-balken.leise { background: var(--karte); }

.wahl-knoepfe { display: grid; gap: 12px; margin: 16px 0 24px; }

.gross-knopf {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 84px;
  padding: 16px 18px;
  border-radius: var(--rund);
  border: 2px solid var(--linie);
  background: var(--karte);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--schatten);
  transition: transform .08s ease, border-color .15s ease;
}
.gross-knopf:hover { border-color: var(--farbe); }
.gross-knopf:active { transform: scale(.99); }
.gross-knopf strong { display: block; font-size: 1.1rem; }
.gross-knopf small { display: block; }
.gross-knopf.primaer { background: var(--farbe); border-color: var(--farbe); color: #fff; }
.gross-knopf.primaer small { color: rgba(255, 255, 255, .85); }
.gk-emoji { font-size: 2rem; line-height: 1; }

.info-raster { display: grid; gap: 16px; }
.info-block { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 16px; }
.info-block h3 { margin-top: 12px; }
.zeiten { width: 100%; border-collapse: collapse; font-size: .92rem; }
.zeiten th { text-align: left; font-weight: 600; padding: 4px 8px 4px 0; vertical-align: top; }
.zeiten td { padding: 4px 0; color: var(--text-leise); }

/* ---------- Speisekarte ---------- */

.karte-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.karte-kopf h1 { margin: 0; }

.kategorie-leiste {
  position: sticky;
  top: 57px;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  margin: 12px -16px 4px;
  background: var(--grund);
  scrollbar-width: none;
}
.kategorie-leiste::-webkit-scrollbar { display: none; }

.chip-knopf {
  flex: none;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: var(--karte);
  font-weight: 600;
  white-space: nowrap;
}
.chip-knopf:hover { border-color: var(--farbe); }

.kategorie { padding-top: 12px; scroll-margin-top: 130px; }

.gericht-liste { display: grid; gap: 10px; }

.gericht {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  transition: border-color .15s ease, transform .08s ease;
}
.gericht:hover { border-color: var(--farbe); }
.gericht:active { transform: scale(.99); }

.g-emoji {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: var(--farbe-hell);
}
.g-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.g-text strong { font-size: 1rem; }
.g-text small { line-height: 1.35; }
.g-preis {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
  font-size: .95rem;
}
.g-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--farbe);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

.merkmale { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.merkmal { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: #f1ece6; color: var(--text-leise); }

.korb-leiste-platz { height: 80px; }
.korb-leiste {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--farbe);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.korb-leiste span:nth-child(2) { flex: 1; }
.kl-zahl {
  min-width: 28px;
  height: 28px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .25);
  display: grid;
  place-items: center;
  font-size: .9rem;
}

/* ---------- Auswahlfenster (Blatt) ---------- */

.blatt-hintergrund {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(30, 20, 12, .5);
}
.blatt-hintergrund.animiert { animation: einblenden .2s ease; }
.blatt.animiert { animation: hochfahren .25s ease; }
.blatt {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--karte);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
.blatt-inhalt { overflow-y: auto; padding: 22px 18px 8px; }
.blatt-emoji {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 2.8rem;
  background: var(--farbe-hell);
}
.blatt h2 { text-align: center; font-size: 1.35rem; }
.blatt-inhalt > p { text-align: center; color: var(--text-leise); }
.blatt-inhalt > .merkmale { justify-content: center; }
.blatt-zu {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f1ece6;
  font-size: 1.1rem;
  z-index: 1;
}
.blatt-fuss {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linie);
}
.blatt-fuss .knopf { flex: 1; }

@keyframes hochfahren { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }

.opt-gruppe { border: none; padding: 0; margin: 18px 0 0; }
.opt-gruppe legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.opt-gruppe legend small { font-weight: 400; margin-left: 4px; }

.optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.option {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid var(--linie);
  background: var(--karte);
  text-align: left;
  font-weight: 600;
}
.option small { font-weight: 500; }
.option.an { border-color: var(--farbe); background: var(--farbe-hell); color: var(--farbe-dunkel); }
.option.mehrfach span::before { content: "○ "; }
.option.mehrfach.an span::before { content: "✓ "; }
.optionen.gross .option { flex: 1 1 calc(50% - 8px); min-height: 60px; justify-content: center; }

/* ---------- Mengen-Knöpfe ---------- */

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: var(--karte);
}
.stepper button {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--farbe-dunkel);
}
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.stepper.gross button { width: 46px; height: 46px; font-size: 1.3rem; }

/* ---------- Warenkorb-Posten und Summen ---------- */

.posten { list-style: none; margin: 0; padding: 0; }
.posten-zeile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.posten-zeile:first-child { padding-top: 0; }
.p-emoji { font-size: 1.6rem; line-height: 1.2; }
.p-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.p-preis { font-weight: 700; white-space: nowrap; }

.summen { margin: 12px 0 0; }
.summen div { display: flex; justify-content: space-between; padding: 3px 0; }
.summen dt { color: var(--text-leise); }
.summen dd { margin: 0; }
.summen .gesamt { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; }
.summen .gesamt dt { color: var(--text); }

/* ---------- Geführte Bestellung ---------- */

.assistent { max-width: 620px; margin: 0 auto; }

.fortschritt { margin-bottom: 18px; }
.fs-punkte { list-style: none; display: flex; justify-content: space-between; margin: 0 0 8px; padding: 0; position: relative; }
.fs-punkte::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 3px;
  background: var(--linie);
  transform: translateY(-50%);
}
.fs-punkte li { position: relative; z-index: 1; }
.fs-punkte span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--karte);
  border: 2px solid var(--linie);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-leise);
}
.fs-punkte li.fertig span { background: var(--farbe); border-color: var(--farbe); color: #fff; }
.fs-punkte li.jetzt span { border-color: var(--farbe); color: var(--farbe-dunkel); box-shadow: 0 0 0 4px var(--farbe-hell); }
.fs-text { text-align: center; font-size: .9rem; color: var(--text-leise); margin: 0; }
.fs-text strong { color: var(--text); }

.verlauf { margin-bottom: 4px; }
.blase-zeile { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.blase-zeile.du { justify-content: flex-end; }
.blase {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 6px;
  background: var(--karte);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.blase p { margin: 0; }
.blase-zeile.bot:not(.alt) .blase { font-size: 1.15rem; font-weight: 600; animation: einblenden .3s ease; }
.blase-zeile.alt { opacity: .6; }
.blase-zeile.alt .blase { box-shadow: none; font-size: .92rem; }
.blase-zeile.du .blase {
  background: var(--farbe);
  border-color: var(--farbe);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
  font-size: .92rem;
  box-shadow: none;
}

.antworten { margin-top: 14px; }
.antwort-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.antwort-liste { display: grid; gap: 10px; margin-bottom: 12px; }

.antwort-knopf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 14px 10px;
  border-radius: var(--rund);
  border: 2px solid var(--linie);
  background: var(--karte);
  text-align: center;
  box-shadow: var(--schatten);
  transition: border-color .15s ease, transform .08s ease;
}
.antwort-knopf:hover { border-color: var(--farbe); }
.antwort-knopf:active { transform: scale(.98); }
.antwort-knopf strong { font-size: 1.05rem; }
.antwort-knopf small { line-height: 1.3; }
.antwort-knopf.breit { min-height: 64px; flex-direction: row; justify-content: space-between; text-align: left; padding: 14px 18px; }
.antwort-knopf.breit .ak-emoji { font-size: 1.6rem; }
.antwort-knopf.breit strong { flex: 1; }
.antwort-knopf.primaer { border-color: var(--farbe); background: var(--farbe-hell); }
.ak-emoji { font-size: 2.2rem; line-height: 1; }

.mini-info { font-weight: 600; color: var(--text-leise); }
.unterfrage { font-weight: 600; margin-top: 16px; }

.zeit-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zeit-knopf {
  min-height: 48px;
  border-radius: 12px;
  border: 2px solid var(--linie);
  background: var(--karte);
  font-weight: 700;
}
.zeit-knopf:hover { border-color: var(--farbe); background: var(--farbe-hell); }

.assistent-fuss { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 20px; border-top: 1px solid var(--linie); padding-top: 8px; }

.uebersicht { margin: 0 0 12px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 4px 16px; }
.uebersicht div { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.uebersicht div:last-child { border-bottom: none; }
.uebersicht dt { font-size: .85rem; color: var(--text-leise); }
.uebersicht dd { margin: 2px 0 0; font-weight: 600; }
.karte-box .uebersicht { border: none; padding: 0; margin-bottom: 8px; }

/* ---------- Formulare ---------- */

.formular { display: grid; gap: 14px; }
.feld { display: grid; gap: 6px; }
.feld > span { font-weight: 600; font-size: .92rem; }
.feld input, .feld textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--linie);
  background: #fff;
  font-size: 1rem;
}
.feld input:focus, .feld textarea:focus { outline: none; border-color: var(--farbe); box-shadow: 0 0 0 4px var(--farbe-hell); }
.feld.fest p { margin: 0; padding: 12px 14px; border-radius: 12px; background: #f6f1ec; }
.feld-reihe { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }

.fehler { color: var(--rot); font-weight: 600; margin: 0; }

.warn-box, .info-box, .vorfuehr-box {
  border-radius: var(--rund);
  padding: 14px 16px;
  margin: 12px 0;
}
.warn-box { background: var(--gelb-hell); border: 1px solid var(--gelb-linie); }
.warn-box p:last-child, .info-box p:last-child { margin-bottom: 0; }
.warn-box .knopf, .warn-box .knopf-stapel { margin-top: 10px; }
.info-box { background: var(--farbe-hell); border: 1px solid var(--linie); }
.info-box .knopf { margin-top: 10px; }
.vorfuehr-box { background: #f3f0ff; border: 1px dashed #b9a8f0; }

.tabs { display: flex; background: #efe7de; border-radius: 999px; padding: 4px; margin: 16px 0; }
.tab { flex: 1; min-height: 44px; border: none; border-radius: 999px; background: none; font-weight: 700; color: var(--text-leise); }
.tab.an { background: var(--karte); color: var(--text); box-shadow: var(--schatten); }

.oder { display: flex; align-items: center; gap: 10px; color: var(--text-leise); font-size: .85rem; margin: 16px 0; }
.oder::before, .oder::after { content: ""; flex: 1; height: 1px; background: var(--linie); }

/* ---------- Leer-Zustand ---------- */

.leer { text-align: center; max-width: 460px; margin: 40px auto; }
.leer-emoji { font-size: 3.5rem; margin-bottom: 8px; }

/* ---------- Bestätigung ---------- */

.bestaetigung { max-width: 560px; margin: 0 auto; }
.bestaetigung h1 { text-align: center; }
.haken {
  width: 76px;
  height: 76px;
  margin: 8px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  background: var(--gruen);
  box-shadow: 0 0 0 10px var(--gruen-hell);
  animation: hochfahren .35s ease;
}
.bestellnummer { text-align: center; font-size: 1.1rem; }
.bestellnummer strong { background: var(--farbe-hell); color: var(--farbe-dunkel); padding: 3px 10px; border-radius: 8px; letter-spacing: .04em; }

.status-leiste { list-style: none; display: flex; padding: 0; margin: 18px 0 6px; }
.status-leiste li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .82rem; color: var(--text-leise); position: relative; }
.status-leiste li + li::before { content: ""; position: absolute; top: 16px; right: 50%; width: 100%; height: 3px; background: var(--linie); z-index: 0; }
.status-leiste li.fertig + li::before, .status-leiste li.fertig + li.jetzt::before { background: var(--gruen); }
.sl-punkt {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--karte);
  border: 2px solid var(--linie);
  font-weight: 700;
}
.status-leiste li.fertig .sl-punkt { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.status-leiste li.jetzt .sl-punkt { border-color: var(--gruen); color: var(--gruen); box-shadow: 0 0 0 5px var(--gruen-hell); animation: pulsieren 1.6s ease infinite; }
.status-leiste li.jetzt { color: var(--text); font-weight: 700; }

@keyframes pulsieren { 50% { box-shadow: 0 0 0 9px var(--gruen-hell); } }

/* ---------- Meine Bestellungen ---------- */

.bestell-liste { display: grid; gap: 14px; }
.bestell-karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 5px solid var(--farbe);
  border-radius: var(--rund);
  padding: 14px 16px;
  box-shadow: var(--schatten);
}
.bk-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bk-kopf > div { flex: 1; min-width: 0; }
.bk-kopf h2 { font-size: 1.02rem; margin: 0; }
.bk-kopf p { margin: 0; font-size: .82rem; color: var(--text-leise); }
.bk-art { font-size: .85rem; color: var(--text-leise); margin-bottom: 6px; }
.bk-posten { margin: 0 0 10px; padding-left: 18px; }
.bk-posten li { margin-bottom: 2px; }
.bk-fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--linie); padding-top: 10px; }
.bk-fuss strong { font-size: 1.1rem; }

.status-marke { flex: none; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-marke.neu { background: #fdecc8; color: #8a5300; }
.status-marke.arbeit { background: #fde2d6; color: #a1360b; }
.status-marke.fertig { background: var(--gruen-hell); color: var(--gruen); }

/* ---------- Küche ---------- */

body.ist-kueche { background: #f2efec; }
.kueche-kopf { margin-bottom: 14px; }
.k-reiter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.k-reiter-knopf {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  background: var(--karte);
  border: 2px solid var(--linie);
}
.k-reiter-knopf.an { background: var(--farbe); border-color: var(--farbe); color: #fff; }

.k-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.k-zahlen div { background: var(--karte); border-radius: 12px; padding: 10px; text-align: center; border: 1px solid var(--linie); }
.k-zahlen strong { display: block; font-size: 1.2rem; }
.k-zahlen span { font-size: .75rem; color: var(--text-leise); }

.k-spalten { display: grid; gap: 16px; }
.k-spalte h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.k-zahl { background: var(--text); color: #fff; border-radius: 999px; font-size: .8rem; padding: 1px 9px; }
.k-leer { color: var(--text-leise); font-size: .9rem; background: rgba(255, 255, 255, .6); border: 1px dashed #d6cabd; border-radius: 12px; padding: 16px; text-align: center; }

.kueche-karte {
  background: var(--karte);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--linie);
  border-top: 6px solid #d6cabd;
  box-shadow: var(--schatten);
}
.kueche-karte.neu { border-top-color: #e59f0b; }
.kueche-karte.arbeit { border-top-color: #ea580c; }
.kueche-karte.fertig { border-top-color: var(--gruen); opacity: .8; }
.kueche-karte.frisch { animation: aufleuchten 1s ease 3; }
@keyframes aufleuchten { 50% { box-shadow: 0 0 0 6px #fcd34d; } }
.kueche-karte header { display: flex; justify-content: space-between; align-items: baseline; }
.kk-nr { font-size: 1.15rem; letter-spacing: .03em; }
.kk-zeit { font-size: .82rem; color: var(--text-leise); }
.kk-art { font-size: .8rem; font-weight: 800; margin: 6px 0; letter-spacing: .03em; }
.kk-art.lieferung { color: #1d4ed8; }
.kk-art.abholung { color: #7c3aed; }
.kk-posten { list-style: none; padding: 0; margin: 0 0 8px; font-size: 1.02rem; }
.kk-posten li { padding: 4px 0; border-bottom: 1px dashed var(--linie); }
.kk-posten small { display: block; margin-left: 24px; }
.kk-vorbestellung {
  background: #fde68a;
  color: #713f12;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}
.k-ton { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.k-ton p { margin: 0; }
.k-ton-an { font-weight: 700; color: var(--gruen); }
.korb-meldung ul { margin: 0 0 4px; padding-left: 20px; }
.lage-balken { margin-top: 0; }
.kk-notiz { background: var(--gelb-hell); border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.kk-kunde, .kk-summe { font-size: .88rem; color: var(--text-leise); margin-bottom: 6px; }
.kk-summe { font-weight: 700; color: var(--text); }

.k-uebersicht { margin-bottom: 10px; }

/* ---------- Übersicht für den Besitzer ---------- */

body.ist-uebersicht { background: #f2efec; }
.ue-titel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ue-titel h1 { margin-bottom: 2px; }
.ue-titel p { margin: 0; }
.ue-datenschutz {
  font-size: .82rem;
  color: var(--text-leise);
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--linie);
  border-radius: var(--rund-klein);
  padding: 6px 10px;
  margin: 12px 0 0;
}
.ue-abschnitt { margin-top: 26px; }
.ue-abschnitt > h2 { font-size: 1.25rem; }

.ue-zeitraum {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: #e8e1d9;
  border-radius: 16px;
  padding: 4px;
}
.ue-zeitraum-knopf {
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: none;
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-leise);
}
.ue-zeitraum-knopf:hover { background: rgba(255, 255, 255, .5); }
.ue-zeitraum-knopf.an { background: var(--karte); color: var(--text); box-shadow: var(--schatten); }
.ue-spanne { margin: 8px 2px 12px; font-weight: 600; color: var(--text-leise); font-size: .9rem; }

.ue-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.ue-kachel {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--schatten);
  min-width: 0;
}
.ue-kachel.gross { grid-column: 1 / -1; }
.ue-kachel-name { display: block; font-size: .85rem; color: var(--text-leise); font-weight: 600; }
.ue-kachel > strong { display: block; font-size: 1.45rem; line-height: 1.25; margin: 2px 0 4px; overflow-wrap: anywhere; }
.ue-kachel.gross > strong { font-size: 2.2rem; }
.ue-kunden-zahl { margin: 4px 0 0; font-size: .85rem; color: var(--text-leise); line-height: 1.3; }
.ue-kunden-zahl strong { font-size: 1.3rem; color: var(--text); }
.ue-delta { margin: 0; font-size: .8rem; font-weight: 700; line-height: 1.3; }
.ue-delta.hoch { color: #006300; }
.ue-delta.runter { color: var(--rot); }
.ue-delta.gleich, .ue-delta.leise { color: var(--text-leise); font-weight: 600; }

.ue-raster { display: grid; gap: 12px; margin-top: 12px; }
.ue-raster.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ue-raster.drei > :last-child { grid-column: 1 / -1; }
.ue-raster.drei .karte-box { padding: 14px 12px; }
.ue-raster .karte-box { margin: 0; min-width: 0; }
.ue-raster h3 { font-size: 1rem; }

.ue-anteil { margin-bottom: 12px; }
.ue-anteil:last-child { margin-bottom: 0; }
.ue-anteil-kopf { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.ue-anteil-kopf > span { min-width: 0; }
.ue-balken { height: 10px; border-radius: 999px; background: var(--farbe-hell); margin: 4px 0 2px; overflow: hidden; }
.ue-balken span { display: block; height: 100%; border-radius: 999px; background: var(--farbe); }
.ue-anteil small, .ue-top small { font-size: .78rem; }
.ue-top { list-style: none; margin: 0; padding: 0; counter-reset: platz; }
.ue-top li { counter-increment: platz; margin-bottom: 10px; }
.ue-top li:last-child { margin-bottom: 0; }
.ue-top .ue-anteil-kopf > span::before { content: counter(platz) ". "; color: var(--text-leise); font-weight: 700; }

/* Diagramme */
.dia { position: relative; height: 220px; margin: 6px 0 4px; border-radius: 8px; touch-action: pan-y; }
.dia svg { display: block; overflow: visible; }
.dia:focus-visible { outline-offset: 4px; }
.dia-linie { stroke: #ebe2d8; stroke-width: 1; }
.dia-grund { stroke: #cbbfb2; stroke-width: 1; }
.dia-achse { fill: #7a6c60; font-size: 11px; font-variant-numeric: tabular-nums; }
.dia-wert { fill: var(--text); font-size: 11px; font-weight: 700; }
.dia-saeule { transition: opacity .1s ease; }
.dia-saeule.laeuft { opacity: .45; }
.dia-saeule.an { opacity: .75; }
.dia-saeule.laeuft.an { opacity: .3; }
.dia-tipp {
  position: absolute;
  top: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: .78rem;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.dia-tipp strong { display: block; font-size: .95rem; }
.dia-tipp span { display: block; opacity: .85; }
.ue-tabelle { margin-top: 6px; font-size: .88rem; }
.ue-tabelle summary { cursor: pointer; color: var(--farbe-dunkel); font-weight: 600; padding: 6px 0; }
.ue-tabelle table { width: 100%; border-collapse: collapse; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ue-tabelle th, .ue-tabelle td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--linie); }
.ue-tabelle th:first-child, .ue-tabelle td:first-child { text-align: left; }

/* Kundenliste */
.ue-werkzeug { display: grid; gap: 10px; margin: 10px 0; }
.ue-feld { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--text-leise); }
.ue-feld input, .ue-feld select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--linie);
  border-radius: 12px;
  background: var(--karte);
  font-size: 1rem;
  color: var(--text);
}
.ue-feld input:focus, .ue-feld select:focus { outline: none; border-color: var(--farbe); box-shadow: 0 0 0 4px var(--farbe-hell); }
.ue-anzahl { font-size: .88rem; font-weight: 600; color: var(--text-leise); margin: 0 2px 8px; }
.ue-kunden { display: grid; gap: 8px; }
.ue-kunden-kopf { display: none; }
.ue-kunde {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 14px;
  box-shadow: var(--schatten);
  overflow: hidden;
}
.ue-kunde.offen { border-color: var(--farbe); }
.ue-kunde-zeile {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  padding: 12px 40px 12px 14px;
  border: none;
  background: none;
  text-align: left;
  position: relative;
  font-size: .88rem;
}
.ue-kunde-zeile:hover { background: var(--farbe-hell); }
.uk-name { grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
.uk-name strong { font-size: 1rem; }
.uk-name small { overflow-wrap: anywhere; }
.uk-wert { min-width: 0; overflow-wrap: anywhere; }
.uk-wert::before { content: attr(data-titel); display: block; font-size: .72rem; color: var(--text-leise); font-weight: 600; }
.uk-umsatz { font-weight: 700; }
.uk-pfeil { position: absolute; right: 14px; top: 14px; font-size: .75rem; color: var(--text-leise); }
.uk-bestellungen { border-top: 1px solid var(--linie); padding: 12px 14px 14px; background: #fcfaf7; }
.uk-bestellungen h3 { font-size: .95rem; }
.uk-liste { list-style: none; margin: 0 0 6px; padding: 0; }
.uk-liste li { padding: 8px 0; border-bottom: 1px dashed var(--linie); font-size: .9rem; }
.uk-liste li:last-child { border-bottom: none; }
.uk-liste p { margin: 2px 0 0; }
.uk-b-kopf { display: flex; justify-content: space-between; gap: 10px; }
.ue-gast-hinweis { margin-top: 12px; font-size: .88rem; color: var(--text-leise); }

@media (min-width: 480px) {
  .ue-zeitraum { grid-template-columns: repeat(4, 1fr); border-radius: 999px; }
  .ue-zeitraum-knopf { border-radius: 999px; }
}

@media (min-width: 720px) {
  .ue-kacheln { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .ue-kachel.gross { grid-column: auto; }
  .ue-raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .ue-raster.drei > :last-child { grid-column: auto; }
  .ue-raster.drei .karte-box { padding: 16px; }
  .ue-raster.zwei { grid-template-columns: minmax(0, 1fr); }
  .ue-werkzeug { grid-template-columns: 1fr 300px; }
}

@media (min-width: 980px) {
  .ue-raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ue-kunden { gap: 0; background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; box-shadow: var(--schatten); overflow: hidden; }
  .ue-kunden-kopf, .ue-kunde-zeile { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; }
  .ue-kunden-kopf { display: grid; gap: 12px; padding: 10px 40px 10px 14px; font-size: .75rem; font-weight: 700; color: var(--text-leise); background: #f6f1ec; border-bottom: 1px solid var(--linie); }
  .ue-kunde { border: none; border-bottom: 1px solid var(--linie); border-radius: 0; box-shadow: none; }
  .ue-kunde:last-child { border-bottom: none; }
  .ue-kunde.offen { box-shadow: inset 4px 0 0 var(--farbe); }
  .uk-name { grid-column: auto; }
  .uk-wert::before { display: none; }
  .uk-pfeil { top: 50%; transform: translateY(-50%); }
}

/* ---------- Kurzer Hinweis unten ---------- */

.hinweis {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 60;
  transform: translate(-50%, -16px);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: #2a211b;
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  text-align: center;
  transition: opacity .2s ease, transform .2s ease;
}
.hinweis.sichtbar { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .inhalt { padding: 28px 24px 64px; }
  .kopf-innen { padding: 10px 24px; }
  .kopf-link { min-width: 72px; }
  .start-held { padding: 44px 40px; }
  .start-held h1 { font-size: 2.4rem; }
  .restaurant-liste { grid-template-columns: 1fr 1fr; }
  .rk-bild { height: 150px; }
  .held { padding: 40px 24px 30px; }
  .held h1 { font-size: 2.4rem; }
  .wahl-knoepfe { grid-template-columns: 1fr 1fr; }
  .info-raster { grid-template-columns: 1fr 1fr; }
  .gericht-liste { grid-template-columns: 1fr 1fr; }
  .assistent .gericht-liste { grid-template-columns: 1fr; }
  .kategorie-leiste { margin: 12px -24px 4px; padding: 12px 24px; top: 61px; }
  .antwort-raster { grid-template-columns: repeat(3, 1fr); }
  .antwort-raster.zwei { grid-template-columns: 1fr 1fr; }
  .zeit-raster { grid-template-columns: repeat(6, 1fr); }
  .blatt {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 520px;
    max-height: 86vh;
    transform: translate(-50%, -50%);
    border-radius: 22px;
  }
  .blatt.animiert { animation: einblenden .2s ease; }
  .k-spalten { grid-template-columns: repeat(3, 1fr); align-items: start; }
}

@media (max-width: 479px) {
  .kopf-innen { gap: 6px; padding: 8px 12px; }
  .kopf-nav { gap: 0; }
  .kopf-link { min-width: 42px; padding: 4px 2px; font-size: 1.2rem; }
  /* Am Handy die kurze Form zeigen (data-kurz). Vorleseprogramme lesen weiter den langen Text. */
  .kopf-link span.kl-text { font-size: 0; max-width: 54px; }
  .kopf-link span.kl-text::after { content: attr(data-kurz); font-size: .62rem; }
  .zahl { right: 0; }
  .marke-name { white-space: normal; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .marke-name small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
