/* Karte am Tisch: bestellen, vorbestellen in der Gruppe oder nur lesen. Zuerst fürs Handy. */
:root {
  --bg: #fbf6ea; --surface: #ffffff; --text: #24180d; --muted: #5f5142; --line: #e2d6bf;
  --accent: #7a1d12; --accent-text: #fff8ea; --ok: #1f6b3a; --focus: #0b57d0;
  --font-head: Georgia, "Palatino Linotype", "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.5; padding-bottom: 6.5rem; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.4em; }
p { margin: 0 0 0.8em; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.5rem 1rem; z-index: 99; }
.trap { position: absolute; left: -999rem; width: 1px; height: 1px; opacity: 0; }
.small { font-size: 0.9rem; color: var(--muted); }

.top, main { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
.top { padding-top: 1.25rem; }
.top__brand { margin: 0; font-family: var(--font-head); font-size: 1.1rem; color: var(--accent); font-weight: 700; }
.top__brand span { font-weight: 400; color: var(--muted); }
.top__title { font-size: 2rem; margin: 0.15em 0; }
.top__hint { color: var(--muted); }

.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 0.4rem; overflow-x: auto; margin: 0 -1rem; padding: 0.6rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.search { display: block; margin: 1rem 0 0.25rem; }
.search__label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.search input, .field input, .field textarea { width: 100%; min-height: 3rem; padding: 0.6rem 0.8rem; border: 1px solid #8d7e68; border-radius: 0.5rem; background: var(--surface); color: var(--text); font: inherit; }
.status { min-height: 1.2rem; font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0; }

.sec__title { font-size: 1.6rem; margin-top: 1rem; }
.sec__note { color: var(--muted); font-style: italic; }
.sub__title { font-size: 1.15rem; margin: 1.25rem 0 0.25rem; color: var(--accent); }
.dish { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: start; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.dish__name { font-weight: 700; }
.dish__desc { grid-column: 1; margin: 0; color: var(--muted); font-size: 0.95rem; }
.dish__buy { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; }
.dish__price { font-weight: 700; white-space: nowrap; text-align: right; }
.add { display: inline-flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 2.75rem; min-width: 6.5rem; padding: 0 0.8rem; border: 1px solid var(--accent); border-radius: 0.5rem; background: var(--surface); color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.add__plus { font-size: 1.3rem; line-height: 1; }
.add.is-in { background: var(--accent); color: var(--accent-text); }
.add__count { min-width: 1.4rem; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 3.25rem; padding: 0.5rem 1.2rem; border: 2px solid var(--accent); border-radius: 0.6rem; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(40, 20, 0, 0.12); }
.cartbar__btn { max-width: 40rem; margin: 0 auto; display: flex; }

.sheet { width: min(100%, 34rem); max-width: 100%; max-height: 92vh; margin: auto auto 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 1rem 1rem 0 0; background: var(--bg); color: var(--text); overflow-y: auto; }
.sheet::backdrop { background: rgba(20, 10, 0, 0.55); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__close { width: 2.75rem; height: 2.75rem; border: 0; background: transparent; font-size: 2rem; line-height: 1; color: var(--text); cursor: pointer; }
.lines { margin: 0.5rem 0; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: center; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.line__name { font-weight: 600; }
.line__sum { font-weight: 700; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; gap: 0.25rem; }
.stepper button { width: 2.75rem; height: 2.75rem; border: 1px solid #8d7e68; border-radius: 0.5rem; background: var(--surface); color: var(--text); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 2rem; text-align: center; font-weight: 700; }
.total { display: flex; justify-content: space-between; padding: 0.75rem 0; border-top: 2px solid var(--text); font-size: 1.15rem; }
.field { display: block; margin: 0.75rem 0; }
.field span { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.error { padding: 0.75rem; border: 2px solid #a11; border-radius: 0.5rem; background: #fff0ee; color: #7a0c0c; font-weight: 600; }

.done { text-align: center; padding-top: 1.5rem; }
.done__icon { width: 5rem; height: 5rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--ok); color: #fff; font-size: 3rem; line-height: 5rem; }
.done h2 { font-size: 1.8rem; }
.done .lines { text-align: left; margin: 1.25rem 0; }
.done__alert { padding: 0.9rem; border: 2px solid #9a5b00; border-radius: 0.5rem; background: #fff4d6; color: #5a3500; font-weight: 700; }

.group-list { margin-top: 2rem; padding-top: 1rem; border-top: 2px solid var(--text); }
.entry { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.entry__name { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .done__icon { animation: pop 0.35s ease-out; }
  @keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
@media (min-width: 46rem) {
  .sheet { margin: auto; border-radius: 1rem; }
}
