:root {
  --cream: #f7f1e6;
  --paper: #fffdf8;
  --ink: #2a1c14;
  --muted: #6a5748;
  --line: #e6d8c6;
  --burgundy: #6b1d1d;
  --burgundy-dark: #4e1414;
  --gold: #b8862e;
  --gold-soft: #f3e4c2;
  --ok: #1f6b3a;
  --ok-soft: #e7f5ec;
  --warn: #8a3b00;
  --warn-bg: #fff3d6;
  --draft: #9b1c1c;
  --shadow: 0 8px 24px rgba(42, 28, 20, 0.08);
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --header-h: 0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--cream); color: var(--ink); }
body {
  font-family: Inter, "Source Sans 3", "Segoe UI", sans-serif;
  min-height: 100%;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
a { color: var(--burgundy); }

.app { max-width: 820px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); position: relative; }

.banners { position: sticky; top: 0; z-index: 40; }
.banner {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}
.banner.draft { background: var(--burgundy); color: #fff; }
.banner.note { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #efd7a0; }

header.shop {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 16px 10px;
}
.brand { min-width: 0; }
.brand h1 { font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1.1; color: var(--burgundy-dark); }
.brand p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.hours { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.icon-btn, .text-btn {
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 42px;
  font-weight: 650;
  cursor: pointer;
}
.icon-btn { position: relative; }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--burgundy); color: #fff;
  min-width: 18px; height: 18px; border-radius: 9px;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.tabs {
  display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto;
}
.tab {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font-weight: 650;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-current="page"], .tab.active { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }

main { flex: 1; padding: 4px 14px 16px; }

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  min-height: 92px;
}
.cat b { display: block; font-size: 15px; color: var(--burgundy-dark); }
.cat span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.row-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.back { border: 0; background: none; color: var(--burgundy); font-weight: 750; cursor: pointer; padding: 8px 4px; min-height: 40px; }
h2 { font-size: 1.2rem; letter-spacing: -0.02em; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; text-align: left; width: 100%;
}
.item h3 { font-size: 15.5px; }
.price { font-weight: 800; color: var(--burgundy-dark); font-size: 15px; }
.price .est { font-weight: 650; font-size: 11px; color: var(--muted); margin-left: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.comp, .tax-tag { font-size: 11.5px; color: var(--muted); }
.pill {
  display: inline-block; font-size: 10.5px; font-weight: 750;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--gold-soft); color: #6a4a12; border-radius: 999px; padding: 2px 7px;
}
.pill.rick { background: #eee7dc; color: var(--muted); }
.pill.tax { background: #fdecec; color: var(--burgundy); }

.detail { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.detail p { color: var(--muted); font-size: 14px; margin: 8px 0 12px; }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.qty-row button {
  width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: 22px; font-weight: 700; cursor: pointer;
}
.qty-row output { min-width: 4.5rem; text-align: center; font-weight: 800; font-size: 18px; }
.unit { color: var(--muted); font-size: 13px; }

.primary, .secondary, .danger {
  display: block; width: 100%; border: 0; border-radius: 14px;
  min-height: 50px; padding: 12px 16px; font-weight: 750; font-size: 16px; cursor: pointer;
}
.primary { background: var(--burgundy); color: #fff; margin-top: 8px; }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.secondary { background: var(--gold-soft); color: var(--burgundy-dark); margin-top: 8px; }
.danger { background: #fdecec; color: var(--burgundy); margin-top: 8px; }
.ghost { background: none; border: 0; color: var(--burgundy); font-weight: 700; cursor: pointer; padding: 10px; }

.cart-line {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 8px;
}
.cart-line .top { display: flex; justify-content: space-between; gap: 8px; }
.totals { background: var(--paper); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); margin-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.totals .grand { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.fine { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 14px; }
.slot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  min-height: 44px; padding: 8px 4px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.slot[aria-pressed="true"] { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day {
  flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 12px; min-height: 58px; min-width: 72px; cursor: pointer; text-align: center;
}
.day b { display: block; font-size: 12px; }
.day span { font-size: 11px; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.day[aria-pressed="true"] span { color: #f3d9d9; }

.form label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 4px; }
.form input, .form select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  min-height: 46px; padding: 10px 12px; background: #fff;
}
.demo-box {
  background: var(--warn-bg); border: 1.5px dashed #d7a84a; border-radius: 14px;
  padding: 12px; margin: 12px 0;
}
.demo-box strong { display: block; color: var(--warn); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }

.confirm { text-align: center; padding: 18px 8px; }
.confirm .num { font-size: 1.8rem; font-weight: 800; color: var(--burgundy-dark); letter-spacing: -0.03em; margin: 8px 0 12px; }
.window {
  background: var(--ok-soft); color: var(--ok); border-radius: 14px;
  padding: 14px; font-weight: 750; margin: 14px 0;
}

.orders { display: flex; flex-direction: column; gap: 10px; }
.order {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.order .st { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); }
.order .st.here { color: var(--ok); }

.about { background: var(--paper); border-radius: 16px; padding: 14px; border: 1px solid var(--line); font-size: 13.5px; color: #3c2c22; }
.about h3 { margin: 12px 0 6px; font-size: 15px; }
.about table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.about th, .about td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.about a { word-break: break-word; }

footer.site {
  padding: 10px 14px calc(76px + var(--safe-b));
  text-align: center; color: var(--muted); font-size: 11px;
}
.nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 820px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fffdf8ee; backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(8px + var(--safe-b));
  z-index: 30;
}
.nav button {
  border: 0; background: none; color: var(--muted);
  font-weight: 750; font-size: 12px; min-height: 48px; cursor: pointer; padding: 6px 4px;
}
.nav button.active { color: var(--burgundy); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }

@media (min-width: 700px) {
  .cats { grid-template-columns: 1fr 1fr 1fr; }
  .slots { grid-template-columns: repeat(4, 1fr); }
}
