:root {
  color-scheme: light;
  --bg: #EDF0EB;
  --surface: #F8F9F6;
  --fg: #17221D;
  --muted: #5C6A63;
  --line: #D3D9D2;
  --accent: #6B1F2E;
  --on-accent: #FBF4F5;
  --ok: #1F5A3C;
  --ok-bg: #DDEBE2;
  --bad: #9B2A1F;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111715;
    --surface: #1A221F;
    --fg: #E9ECE7;
    --muted: #9AA7A0;
    --line: #2C3733;
    --accent: #E0909E;
    --on-accent: #2A0D14;
    --ok: #8FD0A9;
    --ok-bg: #1B3326;
    --bad: #F19A8E;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  min-height: 100vh;
}
.wrap { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.wrap.wide { max-width: 760px; }
.view { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; min-width: 0; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; font-weight: 500; }
p { margin: 0; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.venue { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: 0.01em; }
.table, .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.table { white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { font-size: 0.875rem; color: var(--muted); }
.msg { font-size: 0.9375rem; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.msg.bad { border-color: var(--bad); color: var(--bad); }
.msg.ok { border-color: var(--ok); color: var(--ok); }

.host { display: flex; gap: 16px; align-items: center; min-width: 0; }
.mono {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
}
.host-text { min-width: 0; }
.name { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; font-weight: 400; text-wrap: balance; }
.hello { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--muted); max-width: 34ch; }

/* Gast: große Tasten */
.actions { display: flex; flex-direction: column; gap: 14px; }
.action {
  position: relative;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .1s;
}
.action:hover { border-color: var(--accent); }
.action:active { transform: scale(0.985); }
.action:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.action .icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent);
}
.action .icon svg { width: 22px; height: 22px; }
.action .txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.action .label { font-size: 1.125rem; font-weight: 600; }
.action .sub { font-size: 0.875rem; color: var(--muted); }
.action.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.action.primary .icon { border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); color: var(--on-accent); }
.action.primary .sub { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.action.done { background: var(--ok-bg); border-color: var(--ok); color: var(--fg); cursor: default; }
.action.done .icon { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.action.done .sub { color: var(--muted); }
.action.done:active { transform: none; }

.undo {
  align-self: flex-start;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 6px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.actions > .undo { margin-top: -6px; }
.undo:hover { color: var(--fg); }
.undo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.choose { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--accent); border-radius: 10px; background: var(--surface); }
.choose-row { display: flex; gap: 10px; }
.choose .btn { min-height: 56px; font-size: 1.0625rem; }

.tablepick { display: flex; flex-direction: column; gap: 8px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 48px;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
}
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.tp-input { min-height: 56px; font-family: var(--font-display); font-size: 1.5rem; }
.tp-input::placeholder { font-family: var(--font-body); font-size: 1rem; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  flex: 1;
  min-width: 120px;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.small { flex: none; min-width: 0; min-height: 38px; padding: 6px 12px; font-size: 0.875rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkbtn { font: inherit; font-size: 0.875rem; color: var(--accent); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.tab:focus-visible, .back:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Karte */
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.back { font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 8px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.back svg { width: 18px; height: 18px; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.item:first-child { padding-top: 4px; }
.item-name { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; }
.item-price { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; padding-top: 3px; }
.item-desc { grid-column: 1; font-size: 0.9375rem; color: var(--muted); }
.veg {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
  border: 1px solid var(--ok);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: 3px;
}

/* Service-Wünsche */
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.live { color: var(--ok); }
.pill.live::before { background: var(--ok); }
.pill.off { color: var(--bad); }
.pill.off::before { background: var(--bad); }
.reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.req { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.req.open { border-color: var(--accent); }
.req.seen { background: var(--ok-bg); border-color: var(--ok); }
.req-table { text-align: center; line-height: 1; padding-top: 2px; min-width: 0; }
.req-table small { display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.req-table strong { font-family: var(--font-display); font-size: 2.25rem; font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.req-what { font-weight: 600; font-size: 1.0625rem; }
.req-time { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.req-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.chip { display: inline-block; margin-left: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 10px; vertical-align: 2px; }
.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 28px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; color: var(--fg); margin-bottom: 4px; }

/* Listen und Karten im Verwaltungsbereich */
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.person-main { min-width: 0; flex: 1 1 220px; }
.person-name { font-weight: 600; overflow-wrap: anywhere; }
.person-sub { font-size: 0.875rem; color: var(--muted); overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; color: var(--muted); vertical-align: 2px; }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.bad { color: var(--bad); border-color: var(--bad); }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.linkbox { font-size: 0.875rem; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.editor-group { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.editor-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 88px; gap: 8px; align-items: center; }
.editor-item .check { grid-column: 1 / 3; }
@media (max-width: 560px) { .editor-item { grid-template-columns: 1fr 88px; } .editor-item input:nth-child(2) { grid-column: 1 / -1; order: 3; } .editor-item .check { grid-column: 1; } }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); }
.foot b { font-weight: 600; letter-spacing: 0.14em; color: var(--fg); }
.foot a { color: var(--muted); text-underline-offset: 3px; }
.foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { .action { transition: none; } }
