:root {
  --ink: #1e1a16;
  --bg: #e8dcc4;
  --card: #f2e9d8;
  --photo: #d6c8a8;
  --accent: #b5441b;
  --muted: #6b5f52;
  --head: "Oswald", "Arial Narrow", sans-serif;
  --body: "PT Serif", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.screen { display: none; min-height: 100vh; padding-bottom: 110px; }
.screen.active { display: block; }

/* ---------- Шапка ---------- */
.hero { background: var(--ink); color: var(--bg); padding: 22px 20px 26px; }
.hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.logo { font-family: var(--head); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: 0.01em; }
.tagline { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: 0.18em; white-space: nowrap; }
.today {
  margin-top: 18px; border: 1.5px dashed #7d7262; padding: 12px 14px;
  display: flex; align-items: center; gap: 14px;
  color: inherit; text-decoration: none;
}
.today-text { flex: 1; }
.today-go { flex: none; opacity: .6; }
.pin { flex: none; opacity: .9; }
.today-addr { font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: .02em; }
.today-sub { font-size: 13px; opacity: .8; }

/* ---------- Вкладки ---------- */
.tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; background: var(--bg); border-bottom: 2px solid var(--ink);
}
.tabs button {
  flex: 1; background: none; border: 0; padding: 16px 4px 14px;
  font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: .06em;
  color: var(--muted); border-bottom: 4px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }

.closed-banner {
  margin: 16px 20px 0; padding: 12px 14px; background: var(--ink); color: var(--bg);
  font-family: var(--head); letter-spacing: .03em;
}

/* ---------- Меню ---------- */
.menu { padding: 4px 20px 20px; }
.cat-title {
  font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .2em;
  margin: 24px 0 12px; scroll-margin-top: 70px;
}
.card { border: 2px solid var(--ink); background: var(--card); margin-bottom: 18px; }
.card-photo {
  aspect-ratio: 16 / 9; background: var(--photo) center / cover no-repeat;
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 500; letter-spacing: .12em; font-size: 14px; color: var(--muted);
}
.card-body { padding: 16px 16px 18px; }
.card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-title h3 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 26px; line-height: 1.1; }
.badge {
  font-family: var(--head); font-weight: 600; font-size: 12px; letter-spacing: .08em;
  color: var(--accent); border: 2px solid var(--accent); padding: 1px 7px;
}
.card-desc { margin: 6px 0 14px; font-size: 15px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--head); font-weight: 700; font-size: 26px; white-space: nowrap; }

.variants { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.variants button {
  background: transparent; border: 2px solid var(--ink); padding: 6px 12px;
  font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: .04em;
  display: inline-flex; gap: 6px; align-items: center;
}
.variants button.active { background: var(--ink); color: var(--bg); }
.variants .v-badge { color: var(--accent); font-size: 11px; }
.variants button.active .v-badge { color: #f0a07e; }

.add-btn {
  background: var(--accent); color: #f6eee0; border: 2px solid var(--ink);
  font-family: var(--head); font-weight: 600; letter-spacing: .06em; font-size: 16px;
  padding: 10px 18px;
}
.stepper { display: inline-flex; border: 2px solid var(--ink); align-items: stretch; height: 48px; }
.stepper button { width: 46px; background: transparent; border: 0; font-size: 24px; line-height: 1; }
.stepper .qty { min-width: 30px; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 600; font-size: 20px; }
.stepper .plus { background: var(--accent); color: #f6eee0; }
.stepper.small { height: 40px; }
.stepper.small button { width: 38px; font-size: 20px; }
.stepper.small .plus { background: transparent; color: var(--ink); }

/* ---------- Нижняя кнопка ---------- */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 2px solid var(--ink);
}
.btn-primary {
  width: 100%; background: var(--accent); color: #f6eee0; border: 0;
  font-family: var(--head); font-weight: 600; font-size: 20px; letter-spacing: .08em;
  padding: 16px 20px;
}
.btn-primary:disabled { opacity: .6; }
.cart-btn { display: flex; justify-content: space-between; }

/* ---------- Корзина ---------- */
.page-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 2px solid var(--ink); }
.page-head h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 32px; }
.back { background: none; border: 0; padding: 6px; display: flex; }
.page-body { padding: 18px 20px; }

.order-box { border: 2px solid var(--ink); background: var(--card); padding: 4px 16px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.order-row + .order-row { border-top: 1.5px dashed #9a8d7a; }
.order-row h4 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.15; }
.order-row .sub { font-size: 14px; }
.empty { padding: 18px 0; text-align: center; color: var(--muted); }

.label { font-family: var(--head); font-weight: 700; font-size: 17px; letter-spacing: .14em; margin: 26px 0 12px; }
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-grid button {
  background: transparent; border: 2px solid var(--ink); padding: 13px 6px;
  font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .03em;
}
.time-grid button.active { background: var(--ink); color: var(--bg); }

.field-label { display: block; font-size: 15px; margin: 12px 0 6px; }
.muted { color: var(--muted); }
.field {
  width: 100%; border: 2px solid var(--ink); background: var(--card); color: var(--ink);
  font: 17px var(--body); padding: 12px 14px; border-radius: 0; -webkit-appearance: none;
}
#custom-time { margin-top: 10px; }
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.link-btn { background: none; border: 0; padding: 8px 0 0; color: var(--accent); text-decoration: underline; font-size: 15px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; }
.consent a { color: var(--accent); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

.total-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 2px solid var(--ink); margin-top: 20px; padding-top: 16px;
}
.total-row strong { font-family: var(--head); font-size: 34px; }
.error { margin-top: 12px; color: var(--accent); font-weight: 700; }

/* ---------- Готово ---------- */
.done { padding: 60px 24px; text-align: center; }
.done-badge {
  display: inline-block; background: var(--ink); color: var(--bg);
  font-family: var(--head); font-weight: 600; letter-spacing: .14em; padding: 6px 14px;
}
.done-num { font-family: var(--head); font-weight: 700; font-size: 84px; line-height: 1.1; margin: 16px 0 8px; color: var(--accent); }
.done-text { font-size: 17px; max-width: 320px; margin: 0 auto; }
.done-where { margin: 24px auto; padding: 14px; border: 1.5px dashed var(--ink); max-width: 320px; font-family: var(--head); letter-spacing: .03em; }
.btn-outline {
  background: transparent; border: 2px solid var(--ink); padding: 14px 20px;
  font-family: var(--head); font-weight: 600; letter-spacing: .08em; font-size: 16px;
}
