/* Essensauswahl – Papier & Tusche, angelehnt an die Karte von Mr. Ly */
:root {
  --paper: #f5f1e8;
  --paper-2: #ece6d9;
  --card: #fffdf8;
  --ink: #1d1a16;
  --ink-2: #4a443b;
  --muted: #655e53;
  --line: #ddd4c4;
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --accent-soft: #f6e3de;
  --green: #33682a;
  --green-soft: #e3efdc;
  --warn: #8a5a00;
  --warn-soft: #fbefd5;
  --focus: #1f5fbf;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 6px 20px rgba(40, 30, 10, .07);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 64px;
  --topbar-h: 61px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f; --paper-2: #1f1c16; --card: #221f19; --ink: #f1ece2; --ink-2: #d6cfc2; --muted: #a59d8f;
    --line: #3a352c; --accent: #f07a70; --accent-ink: #1a0d0b; --accent-soft: #2e1714; --green: #8fc47f; --green-soft: #1f2e1b;
    --warn: #f0c063; --warn-soft: #362a12; --focus: #7fb0ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 72px); }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans);
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
}
body.sheet-open { overflow: hidden; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.noscript { padding: 24px; text-align: center; }

/* Typografie */
.display, .display-sm, h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.display { font-style: italic; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.05; }
.display-sm { font-style: italic; font-size: 1.7rem; line-height: 1.1; }
.h2 { font-size: 1.5rem; }
.h3 { font-size: 1.2rem; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pad { padding: 24px 0; }
p { margin: 0; }

/* Layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--bar-h) + 64px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.container.narrow { max-width: 640px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

.boot { min-height: 50vh; display: grid; place-content: center; gap: 12px; justify-items: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Icons */
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-sm { width: 18px; height: 18px; }
.ico-xs { width: 14px; height: 14px; }
.ico-lg { width: 40px; height: 40px; stroke-width: 1.5; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn.busy { cursor: progress; }
.danger { color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; cursor: pointer; color: var(--ink); list-style: none;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn::-webkit-details-marker { display: none; }

/* Formulare */
.label { font-weight: 600; font-size: .95rem; }
input[type=password], input[type=search], input[type=text], input[type=datetime-local], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  font-size: 16px; /* verhindert Zoom auf iOS */
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 0; }
.pin-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.form-error { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; font-size: .95rem; }

/* Startseite */
.hero { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-art .sun { position: absolute; width: 220px; height: 220px; right: -60px; top: -40px; border-radius: 50%; background: var(--accent); opacity: .9; filter: blur(.3px); }
.hero-art::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 220px;
  background: radial-gradient(60% 100% at 30% 100%, color-mix(in srgb, var(--ink) 16%, transparent), transparent 70%),
              radial-gradient(50% 80% at 75% 100%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 70%);
}
.hero .center-card { position: relative; }
.center-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); min-height: 60px; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar-title strong { font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .68rem; }
.topbar-sub { font-size: .8rem; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); margin: 0 8px 0 4px; flex: none; }

.menu-more { position: relative; }
.menu-more > summary { cursor: pointer; }
.menu-pop { position: absolute; right: 0; top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 230px; padding: 6px; display: flex; flex-direction: column; z-index: 40; }
.menu-pop button, .menu-pop a { display: flex; gap: 10px; align-items: center; text-align: left; padding: 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--ink); text-decoration: none; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--paper-2); }

/* Hinweise */
.banner { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: .95rem; }
.banner-closed { background: var(--accent-soft); color: var(--accent); }
.banner-admin { background: var(--green-soft); color: var(--green); }

/* Suche & Chips */
.search-wrap { position: relative; flex: 1; }
.search-wrap > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input { padding-left: 44px !important; border-radius: 999px !important; }
.sticky-search { position: sticky; top: var(--topbar-h); z-index: 5; background: var(--paper); padding: 6px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: .9rem; cursor: pointer; }
.chip:hover { border-color: var(--ink-2); }
.chip-toggle.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.pill-ok { background: var(--green-soft); color: var(--green); }

/* Namensliste */
.name-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.name-list .letter { font-family: var(--serif); font-style: italic; color: var(--muted); padding: 10px 6px 2px; font-size: 1.1rem; }
.name-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 58px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; text-align: left; transition: border-color .15s, transform .05s; }
.name-btn:hover { border-color: var(--ink-2); }
.name-btn:active { transform: scale(.995); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-weight: 700; font-size: .85rem; flex: none; color: var(--ink-2); }
.name-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* PIN */
.pin-card { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.pin-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* Bestellansicht */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.menu-tools { display: flex; gap: 8px; align-items: center; }
.cat-nav { position: sticky; top: var(--topbar-h); z-index: 10; display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; margin: 4px -16px 0; padding-left: 16px; padding-right: 16px; background: var(--paper); scrollbar-width: none; border-bottom: 1px solid var(--line); }
.cat-nav::-webkit-scrollbar { display: none; }
.cat { padding-top: 22px; }
.cat-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.item-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.item-head h3 { font-size: 1.15rem; line-height: 1.25; }
.no { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 700; }
.pieces { font-size: .82rem; color: var(--muted); }
.desc { color: var(--ink-2); font-size: .93rem; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.allergens { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px dotted var(--muted); padding: 2px 0; cursor: pointer; letter-spacing: .04em; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.tag-vegan { background: var(--green-soft); color: var(--green); }
.tag-hot { background: var(--accent-soft); color: var(--accent); }
.variants { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.variant { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); min-height: 52px; }
.variant.single { border-top: 0; justify-content: flex-end; }
.v-name { flex: 1; min-width: 0; font-size: .95rem; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.in-cart { font-size: .78rem; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 8px; }
.add-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, color .15s; }
.add-btn:active { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .add-btn:hover { background: var(--accent); color: var(--accent-ink); } }

.legend { margin-top: 28px; }
.legend summary { cursor: pointer; font-weight: 600; }
.legend-grid { display: grid; gap: 16px; margin: 12px 0; }
.legend dl { display: grid; grid-template-columns: 2.2em 1fr; gap: 4px 8px; margin: 0; font-size: .9rem; }
.legend dt { font-weight: 700; }
.legend dd { margin: 0; color: var(--ink-2); }

/* Warenkorb: mobil als Bottom-Sheet */
.cart {
  position: fixed; inset: auto 0 0 0; z-index: 50; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25);
  transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
.cart.open { transform: none; visibility: visible; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.cart-body { overflow-y: auto; padding: 8px 20px; flex: 1; -webkit-overflow-scrolling: touch; }
.cart-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-name { font-weight: 600; }
.cl-var { font-size: .85rem; color: var(--muted); }
.cl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cart-empty { display: grid; justify-items: center; gap: 8px; padding: 24px 8px; color: var(--muted); text-align: center; }
.note-wrap { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 6px; }
.note-wrap > .small { align-self: flex-end; }
.note-wrap > .note-hint { align-self: stretch; margin: 4px 0 0; }
.warn-text { color: var(--warn); display: flex; gap: 4px; align-items: center; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.total strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.save-status { font-size: .85rem; color: var(--green); }
.save-status.dirty { color: var(--warn); font-weight: 600; }
.cart-secondary { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.stepper .icon-btn { width: 40px; height: 40px; }
.stepper-sm .icon-btn { width: 44px; height: 44px; }
.stepper-sm .ico { width: 18px; height: 18px; }
.qty-val { min-width: 1.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, transparent); }
.cart-bar-btn { width: 100%; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; box-shadow: var(--shadow); font-size: 1rem; }
.cart-bar.dirty .cart-bar-btn { background: var(--accent); color: var(--accent-ink); }
.cart-bar-count { display: inline-flex; gap: 6px; align-items: center; background: color-mix(in srgb, currentColor 18%, transparent); border-radius: 999px; padding: 8px 12px; font-weight: 700; }
.cart-bar-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar.pulse .cart-bar-btn { animation: pulse .35s ease; }
@keyframes pulse { 50% { transform: scale(1.03); } }

/* Dialog */
.dialog { border: 0; padding: 0; border-radius: 20px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dialog::backdrop { background: rgba(20, 15, 8, .55); }
.dialog-form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 12px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.radio-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.radio-group legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 48px; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.radio > span:first-of-type { flex: 1; }
.qty-row { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); transition: opacity .2s, transform .2s; font-size: .95rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--accent); color: var(--accent-ink); }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-value { font-family: var(--serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; min-height: 44px; border: 0; background: transparent; border-bottom: 3px solid transparent; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.person-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.person-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.person-card.empty { opacity: .8; box-shadow: none; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pc-head h3 { font-size: 1.1rem; font-weight: 500; }
.pc-lines { margin: 0; padding-left: 0; list-style: none; font-size: .93rem; display: flex; flex-direction: column; gap: 3px; }
.pc-lines .qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-note { font-size: .9rem; background: var(--warn-soft); color: var(--ink); padding: 8px 10px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.settings { max-width: 640px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .cat-row th { background: var(--paper-2); font-family: var(--serif); font-style: italic; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.table tfoot td { font-weight: 700; }

@media (max-width: 599px) {
  .tab { padding: 10px 10px; font-size: .92rem; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td, .table tfoot { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .table td { border: 0; padding: 4px 12px; text-align: left; }
  .table td.num { text-align: left; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .table tbody tr:not(.cat-row) td:first-child { font-weight: 700; }
}

.print-sheet { display: none; }

/* Tablet */
@media (min-width: 600px) {
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend-grid { grid-template-columns: 1fr 1fr; }
  .container { padding-left: 24px; padding-right: 24px; }
  .cat-nav { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}

/* Desktop: Warenkorb als feste Seitenspalte */
@media (min-width: 1000px) {
  .container { padding-bottom: 48px; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .cart {
    position: sticky; top: calc(var(--topbar-h) + 16px); inset: auto; transform: none; visibility: visible; max-height: calc(100vh - var(--topbar-h) - 32px);
    border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 5; transition: none;
  }
  .cart-close { display: none; }
  .cart-bar { display: none; }
  .cat-nav { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .toast { bottom: 24px; }
  .person-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) and (max-width: 1179px) {
  .items { grid-template-columns: minmax(0, 1fr); }
}

/* Mobil: Hintergrund abdunkeln, wenn Sheet offen */
.sheet-backdrop { display: none; }
@media (max-width: 999px) {
  body.sheet-open .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 15, 8, .5); z-index: 45; }
}

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

/* Druck / PDF für das Restaurant */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  #app > *, .toast, .skip { display: none !important; }
  #app > .print-sheet { display: block !important; }
  .print-sheet h1 { font-family: var(--serif); font-size: 18pt; margin: 0 0 2mm; }
  .print-sheet h2 { font-family: var(--serif); font-size: 13pt; margin: 6mm 0 2mm; }
  .print-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
  .print-sheet th, .print-sheet td { border-bottom: .3pt solid #999; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
  .print-sheet .num { text-align: right; white-space: nowrap; width: 18mm; }
  .print-sheet .cat-row th { background: #eee; font-style: italic; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet tr { break-inside: avoid; }
  .page-break { break-before: page; }
}
