:root {
  --bg: #ffffff;
  --panel: #f6f7f9;
  --ink: #1a2230;
  --muted: #667085;
  --line: #dfe3ea;
  --brand: #c8323f;
  --brand-ink: #ffffff;
  --ok: #1f8a4c;
  --warn: #b45309;
  --danger: #b42318;
  --radius: 12px;
  --focus: #1d4ed8;
}
:root[data-theme="dark"] {
  --bg: #12161d; --panel: #1a2029; --ink: #eef1f6; --muted: #9aa4b5; --line: #2a3340;
  --ok: #46c27a; --warn: #f5a524; --danger: #ff7a70; --focus: #7aa2ff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #12161d; --panel: #1a2029; --ink: #eef1f6; --muted: #9aa4b5; --line: #2a3340;
    --ok: #46c27a; --warn: #f5a524; --danger: #ff7a70; --focus: #7aa2ff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.45 var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); }
input, select, textarea, button { font-family: inherit; }
main { max-width: var(--page-width, 560px); margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 20px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 120px; }
label { font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: min(var(--radius), 14px); padding: 10px 12px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
button {
  font: inherit; border-radius: min(var(--radius), 14px); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); padding: 10px 14px; cursor: pointer;
}
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.link { background: none; border: none; color: var(--focus); padding: 4px; text-decoration: underline; }
button:disabled { opacity: .55; cursor: not-allowed; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.day { white-space: nowrap; }
.day[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { text-align: center; padding: 10px 6px; font-weight: 600; }
.slot.off { opacity: .45; font-weight: 400; cursor: default; }
.slot .why { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.slot[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.notice { border-left: 4px solid var(--warn); background: var(--panel); padding: 10px 12px; border-radius: 8px; margin: 12px 0; }
.notice.error { border-color: var(--danger); }
.notice.ok { border-color: var(--ok); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.timer.low { color: var(--danger); }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.code { font-size: 28px; letter-spacing: .12em; font-weight: 800; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { width: auto; margin-top: 3px; }
.sr { position: absolute; left: -9999px; }
@media (prefers-reduced-motion: no-preference) { button { transition: background .12s, transform .05s; } button:active { transform: translateY(1px); } }
.pay { border: 1px solid var(--line, #d8dde3); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.pay legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.card-element { padding: 10px; border: 1px solid var(--line, #cfd6de); border-radius: 8px; background: #fff; min-height: 22px; }

/* ---- branding and language ---- */
.brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.brand h1 { margin: 0; flex: 1 1 auto; }
.brand .logo { max-height: 44px; max-width: 160px; object-fit: contain; }
.lang { display: inline-flex; gap: 2px; }
.lang button.link { padding: 4px 8px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 13px; }
.lang button.link.on { background: var(--brand); color: var(--brand-ink); }
.contact { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); }
h1 { color: var(--brand); }

/* ---- restaurant-chosen look ---- */
:root.btn-outline button.primary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
:root.btn-outline .slot[aria-pressed="true"] { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
:root.head-center .brand { justify-content: center; text-align: center; }
:root.head-center .brand h1 { flex: 0 1 auto; }
:root.head-center .brand + p { text-align: center; }
.thanks { font-size: 16px; margin: 8px 0 14px; }

/* ---- offers and waitlist ---- */
.exps { display: grid; gap: 8px; margin: 12px 0; }
.exp { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; }
.exp.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }

.profile { margin: 8px 0 14px; }
.profile .facts { margin: 0 0 6px; }
.profile .desc { margin: 0 0 10px; white-space: pre-line; }
.gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.gallery img { height: 110px; width: auto; max-width: 70%; flex: 0 0 auto; border-radius: var(--radius, 8px); object-fit: cover; scroll-snap-align: start; }

details.menus, details.events, details.alert { margin: 10px 0; }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.menus h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.menus h4 { margin: 10px 0 4px; font-size: .95rem; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
.menu-items { list-style: none; padding: 0; margin: 0 0 8px; }
.menu-items li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.menu-items .mi-desc { flex: 1 0 100%; }
.stack { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day[aria-selected="true"] .muted { color: inherit; opacity: .85; }
