:root {
  --accent: #e2531e;
  --accent-dark: #b83d10;
  --bg: #faf7f3;
  --card: #ffffff;
  --txt: #221c17;
  --muted: #7c7166;
  --line: #ece4da;
  --good: #2f9e51;
  --shadow: 0 4px 16px rgba(60,40,20,.10);
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px; line-height: 1.45; padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* Header */
.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; padding: calc(env(safe-area-inset-top) + 26px) 20px 22px; position: relative;
}
.hero h1 { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: .2px; }
.hero .tag { opacity: .92; font-size: 14px; margin-top: 4px; }
.hero .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.hero .meta span { background: rgba(255,255,255,.18); padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px); }
.hero .badge { position: absolute; top: calc(env(safe-area-inset-top) + 20px); right: 18px; background: #fff; color: var(--accent); font-weight: 700; font-size: 11px; padding: 5px 10px; border-radius: 999px; }

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

.wrap { max-width: 680px; margin: 0 auto; padding: 8px 14px 20px; }
.cat-title { font-size: 19px; font-weight: 700; margin: 22px 4px 10px; }

/* Item */
.item { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.item .emoji { font-size: 34px; flex: 0 0 46px; text-align: center; line-height: 1; filter: saturate(1.1); }
.item .info { flex: 1; min-width: 0; }
.item .nm { font-weight: 640; }
.item .desc { color: var(--muted); font-size: 13px; }
.item .price { font-weight: 700; color: var(--accent); margin-top: 3px; font-variant-numeric: tabular-nums; }
.item .add { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--accent); color: #fff; font-size: 24px; font-weight: 600; display: grid; place-items: center; transition: transform .1s; }
.item .add:active { transform: scale(.9); }
.item.soldout { opacity: .5; }
.item.soldout .add { background: var(--muted); pointer-events: none; }
.qtybadge { display: inline-flex; align-items: center; gap: 8px; }
.qtybadge button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 20px; font-weight: 600; color: var(--accent); }
.qtybadge b { min-width: 20px; text-align: center; }

/* Warenkorb-Leiste */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(250,247,243,0), var(--bg) 30%); }
.cartbar .inner { max-width: 680px; margin: 0 auto; }
.cartbar button { width: 100%; border: none; background: var(--accent); color: #fff; border-radius: 14px; padding: 16px 18px; font-size: 16px; font-weight: 680; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 6px 20px rgba(226,83,30,.4); }
.cartbar .count { background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 10px; font-size: 14px; }

/* Sheet / Checkout */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(20,12,6,.5); display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet .panel { background: var(--bg); width: 100%; max-width: 680px; margin: 0 auto; border-radius: 22px 22px 0 0; max-height: 92vh; overflow-y: auto; transform: translateY(40px); transition: transform .25s; padding-bottom: env(safe-area-inset-bottom); }
.sheet.open .panel { transform: translateY(0); }
.sheet .ph { position: sticky; top: 0; background: var(--bg); display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet .ph h2 { margin: 0; font-size: 20px; }
.sheet .close { border: none; background: var(--line); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; }
.sheet .body { padding: 16px 18px 24px; }

.cartline { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cartline .nm { flex: 1; font-weight: 560; }
.cartline .nm small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.cartline .lp { color: var(--accent); font-weight: 680; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* "wählbar"-Badge + Mengen-Badge am +-Button */
.cfg-tag { font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.add { position: relative; }
.add .addq { position: absolute; top: -7px; left: -7px; background: var(--accent-dark); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* Konfigurations-Dialog */
.cfg-desc { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.optgroup { margin-top: 16px; }
.optg-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink); margin-bottom: 8px; }
.optg-h i { color: var(--muted); font-weight: 500; font-style: normal; text-transform: none; letter-spacing: 0; }
.optrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.optrow.on { border-color: var(--accent); background: var(--soft); }
.optrow .mark { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid var(--line); display: grid; place-items: center; }
.optrow .mark.radio { border-radius: 50%; }
.optrow .mark.check { border-radius: 7px; }
.optrow.on .mark { border-color: var(--accent); background: var(--accent); }
.optrow.on .mark::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; }
.optrow .on-nm { flex: 1; }
.optrow .on-pr { color: var(--accent); font-weight: 680; font-variant-numeric: tabular-nums; }
.cfg-foot { display: flex; gap: 12px; align-items: center; margin-top: 20px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 4px; }
.cfg-foot .btn-order { margin-top: 0; flex: 1; }
.qtybadge.big button { width: 42px; height: 46px; font-size: 22px; }
.qtybadge.big b { font-size: 18px; min-width: 26px; }

.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 560; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 12px; padding: 13px 14px; font-size: 16px; }
.field textarea { min-height: 60px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.totalrow { display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 750; margin: 18px 2px 6px; }
.btn-order { width: 100%; border: none; background: var(--accent); color: #fff; border-radius: 14px; padding: 16px; font-size: 17px; font-weight: 700; margin-top: 12px; box-shadow: 0 6px 18px rgba(226,83,30,.35); }
.btn-order:disabled { opacity: .5; box-shadow: none; }
.fineprint { color: var(--muted); font-size: 12px; text-align: center; margin-top: 12px; line-height: 1.5; }
.pay-note { background: #fff7ef; border: 1px solid #ffd9bd; color: #8a4a1c; border-radius: 12px; padding: 11px 13px; font-size: 13.5px; margin-top: 14px; }

/* Bestätigung */
.confirm { text-align: center; padding: 30px 22px 40px; }
.confirm .check { width: 78px; height: 78px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; font-size: 42px; }
.confirm h2 { margin: 0 0 6px; font-size: 24px; }
.confirm .code { font-size: 40px; font-weight: 800; letter-spacing: 4px; color: var(--accent); margin: 16px 0 4px; }
.confirm .sub { color: var(--muted); font-size: 14px; }
.confirm .pickup { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 22px 0; font-size: 16px; box-shadow: var(--shadow); }
.confirm .pickup b { font-size: 22px; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); background: var(--txt); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 8px; line-height: 1.6; }
.footer a { color: var(--muted); }
