:root {
  --bg: #fbf5ec; --card: #fffdf9; --ink: #2b1611; --muted: #7a6458; --line: #e7dac8; --soft: #f4ead9;
  --accent: #2b1611; --accent-ink: #fff8ef; --sea: #1d5566; --ok: #2f7a4f; --ok-bg: #e5f2e8; --warn: #9a5512; --warn-bg: #fbecd9;
  --bad: #a62b1f; --bad-bg: #f8e1dd; --info-bg: #e3eef1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
a { color: var(--sea); }
p { margin: 0 0 .8em; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.hidden { display: none !important; }
header.site { text-align: center; padding: 22px 16px 8px; }
header.site img { width: 170px; height: auto; }
header.site .claim { font-family: var(--serif); font-size: 1.15rem; margin-top: 6px; }
footer.site { text-align: center; padding: 32px 16px 120px; color: var(--muted); font-size: .85rem; }
footer.site a { color: var(--muted); margin: 0 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 14px; }
.step { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.step .num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-family: var(--serif); }
.step h2 { margin: 0; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 10px 12px; border: 1px solid #d7c6b0; border-radius: 8px; background: #fff; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #d9b98f; outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 8px 0 0; accent-color: var(--accent); transform: scale(1.15); }
.check { display: flex; align-items: flex-start; font-weight: 400; gap: 2px; }
.check input { margin-top: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1 1 140px; }
.row.tight > * { flex: 0 0 auto; }

button, .btn { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: #cdb89c; }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
button.bad { background: transparent; color: var(--bad); border-color: #dcaaa2; }
button.sm { padding: 6px 10px; min-height: 34px; font-size: .875rem; }
button:disabled { opacity: .5; cursor: default; }
button.block { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #d7c6b0; background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 38px; font-weight: 500; }
.chip[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip:disabled { opacity: .4; text-decoration: line-through; }

.cat { margin: 18px 0 6px; font-family: var(--serif); font-size: 1.15rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.prod { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.prod:last-child { border-bottom: 0; }
.prod .name { font-weight: 600; } .prod .price { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.prod .desc { color: var(--muted); font-size: .875rem; }
.config { background: var(--soft); border-radius: 8px; padding: 12px; margin: 4px 0 12px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty input { width: 90px; text-align: center; }
.qty button { width: 44px; padding: 0; }

.cartline { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cartline:last-child { border-bottom: 0; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 20; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; }
.bar button { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }

.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.day { background: #fff; border: 1px solid #d7c6b0; border-radius: 8px; padding: 8px 4px; text-align: center; color: var(--ink); font-weight: 500; min-height: 64px; display: block; }
.day b { display: block; font-size: 1.05rem; }
.day small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; }
.day[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day[aria-pressed=true] small { color: #e7d6c3; }
.day:disabled { opacity: .45; }

.notice { border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: var(--info-bg); }
.notice.ok { background: var(--ok-bg); } .notice.warn { background: var(--warn-bg); } .notice.bad { background: var(--bad-bg); color: var(--bad); }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; background: var(--soft); white-space: nowrap; }
.badge.neu { background: #f6d6a8; color: #6b3a05; } .badge.angenommen { background: var(--info-bg); color: var(--sea); }
.badge.abholbereit { background: var(--ok-bg); color: var(--ok); } .badge.abgeholt { background: #eee6db; color: var(--muted); }
.badge.abgelehnt, .badge.storniert { background: var(--bad-bg); color: var(--bad); }
.badge.paid { background: var(--ok-bg); color: var(--ok); } .badge.unpaid { background: var(--warn-bg); color: var(--warn); }
.big { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: var(--bad); font-size: .9rem; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--ink); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: calc(100% - 32px); }

@media (max-width: 560px) {
  h1 { font-size: 1.45rem; }
  .card { padding: 14px; }
}
@media print {
  body { background: #fff; font-size: 12px; }
  .noprint, .bar, nav, header.app { display: none !important; }
  .card { border: 0; padding: 0; }
}
.searchbar { position: sticky; top: 0; z-index: 5; background: var(--card); padding: 4px 0 8px; margin-top: -4px; }
.incart { color: var(--ok); font-size: .85rem; font-weight: 600; }
.incart:empty { display: none; }
.toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
.btn.block { display: flex; width: 100%; }
