:root {
  --accent: #c1121f;
  --accent-soft: #fde7e9;
  --green: #1b7a4b;
  --bg: #fbf7f0;
  --card: #ffffff;
  --ink: #20140e;
  --muted: #7c6f66;
  --line: #ece3d6;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(40, 20, 10, .08);
  --maxw: 560px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  padding-bottom: 96px;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
button { font-family: inherit; cursor: pointer; }

/* Header / Begrüßung */
.hero { text-align: center; padding: 28px 16px 18px; }
.hero .emoji { font-size: 54px; line-height: 1; display: block; margin-bottom: 8px; }
.hero h1 { font-size: 25px; margin: 6px 0 4px; font-weight: 700; letter-spacing: -.3px; }
.hero .sub { color: var(--muted); font-size: 15px; margin: 0 auto; max-width: 360px; }
.hero .brand { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.hero .brand::before, .hero .brand::after { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: .5; }

/* Vorschläge / Nudges */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.nudge { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 14px 0; }
.nudge .ic { font-size: 26px; }
.nudge .tx { flex: 1; }
.nudge .tx .t { font-weight: 600; font-size: 15px; }
.nudge .tx .d { font-size: 13px; color: var(--muted); }
.nudge.fav { border-color: var(--accent); }
.nudge.fav .t { color: var(--accent); }

/* Kategorie-Navigation */
.catnav { position: sticky; top: 0; z-index: 30; background: var(--bg); padding: 10px 0 8px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav button { white-space: nowrap; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 500; }
.catnav button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Speisekarte */
.cat { margin: 22px 0 8px; }
.cat h2 { font-size: 19px; margin: 0 0 2px; display: flex; align-items: center; gap: 9px; }
.cat .cnote { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin: 9px 0; }
.item .info { flex: 1; min-width: 0; }
.item .nm { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.item .nm .hot { font-size: 13px; }
.item .zz { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.item .pr { font-weight: 700; font-size: 15px; white-space: nowrap; }
.item .add { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.item .add:active { transform: scale(.92); }
.item.has .add { background: var(--green); }
.qbadge { font-size: 12px; font-weight: 700; color: var(--green); min-width: 18px; text-align: center; }

/* Warenkorb-Leiste */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(251,247,240,0)); }
.cartbar .inner { max-width: var(--maxw); margin: 0 auto; }
.cartbtn { width: 100%; border: none; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; box-shadow: var(--shadow); }
.cartbtn:disabled { background: #d8ccbf; color: #fff; }
.cartbtn .c { display: inline-flex; align-items: center; gap: 9px; }
.cartbtn .cnt { background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 9px; font-size: 13px; }

/* Sheet / Modal */
.sheet-bg { position: fixed; inset: 0; z-index: 100; background: rgba(25,12,6,.5); display: none; align-items: flex-end; justify-content: center; }
.sheet-bg.open { display: flex; }
.sheet { background: var(--card); width: 100%; max-width: var(--maxw); border-radius: 22px 22px 0 0; max-height: 88vh; overflow-y: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 4px 0 2px; font-size: 20px; }
.sheet .shead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet .close { border: none; background: var(--line); border-radius: 50%; width: 34px; height: 34px; font-size: 18px; color: var(--ink); flex-shrink: 0; }
.sec-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 13px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.chip .i { font-style: normal; font-size: 14px; }
.chip.kept { border-color: var(--green); }
.chip.kept .i { color: var(--green); }
.chip.removed { color: #b08; opacity: 1; border-style: dashed; }
.chip.removed .nm { text-decoration: line-through; color: var(--muted); }
.chip.removed .off { color: var(--accent); font-weight: 700; }
.chip.extra { color: var(--muted); }
.chip.extra.on { border-color: var(--green); color: var(--green); background: #f0faf4; }
.chip .pp { color: var(--muted); font-size: 12.5px; }
.chip.extra.on .pp { color: var(--green); }

.qtyrow { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; }
.qtyrow .lab { flex: 1; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 20px; color: var(--ink); }
.stepper .n { min-width: 22px; text-align: center; font-weight: 700; font-size: 17px; }
.note-in { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-family: inherit; margin-top: 6px; resize: none; }
.sheet .confirm { width: 100%; margin-top: 18px; border: none; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 14px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sheet .confirm:active { transform: scale(.99); }

/* Bestellübersicht (im Sheet) */
.line { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.line .lq { font-weight: 700; color: var(--accent); }
.line .li { flex: 1; }
.line .lname { font-weight: 600; font-size: 15px; }
.line .lmod { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.line .lp { font-weight: 600; white-space: nowrap; }
.line .lx { border: none; background: none; color: var(--muted); font-size: 18px; padding: 0 2px; }
.totrow { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 4px; font-size: 19px; font-weight: 700; }

/* Service-Auswahl */
.seg { display: flex; gap: 8px; margin: 14px 0; }
.seg button { flex: 1; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 11px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Footer / Restaurant-Info */
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: 30px 0 8px; line-height: 1.7; }
.foot strong { color: var(--ink); }

/* Gate (kein gültiger Link) */
.gate { text-align: center; padding: 70px 24px; }
.gate .big { font-size: 46px; }
.gate h1 { font-size: 22px; margin: 14px 0 8px; }
.gate p { color: var(--muted); max-width: 320px; margin: 0 auto; }

/* Einladungs-Badge & Zahlhinweis */
.hero .invite { margin: 12px auto 0; display: inline-block; background: var(--accent-soft, #fde7e9); color: var(--accent); font-size: 13.5px; padding: 7px 14px; border-radius: 999px; }
.hero .invite strong { font-weight: 700; }
.paynote { text-align: center; color: var(--green); font-size: 13px; font-weight: 600; margin: 12px 0 2px; }
.lsize { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft, #fde7e9); padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }
.seg button small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.seg button.on small { color: var(--accent); }

/* Formularfelder (Adresse, Handy, Wünsche) */
.fld { margin: 11px 0; }
.fld label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
.fld input, .fld textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink); }
.fld textarea { resize: none; }
.fld.bad input, .fld.bad textarea { border-color: var(--accent); background: #fff5f6; }
.row2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.errmsg { color: var(--accent); font-size: 12.5px; margin: 8px 0 0; font-weight: 600; }
.lwho { margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.lwho span { font-size: 11.5px; color: var(--muted); }
.lwho select { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; font-family: inherit; color: var(--ink); background: #fff; }
.delfields { overflow: hidden; }

/* Einladungs-Code (Gast-Seite) */
#cg-code { width: 180px; text-align: center; font-size: 30px; letter-spacing: 14px; padding: 12px 10px 12px 24px; border: 1.5px solid var(--line); border-radius: 14px; font-family: inherit; color: var(--ink); background: #fff; }
#cg-code:focus { outline: none; border-color: var(--accent); }
.gobtn { margin-top: 16px; border: none; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 13px 30px; font-size: 16px; font-weight: 600; }
.gobtn:active { transform: scale(.98); }
#cg-err { color: var(--accent); font-weight: 600; font-size: 13.5px; margin-top: 12px; }
.gate.shake { animation: cgshake .38s; }
@keyframes cgshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }

.hidden { display: none !important; }
