:root {
  --bg: #fbf6f0;
  --ink: #2b1a10;
  --muted: #6e5a4c;
  --brand: #3b2418;
  --accent: #c9762b;
  --card: #ffffff;
  --line: #eadfd3;
  --error: #b3261e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 96px;
}
.hero {
  background: var(--brand);
  color: #fff;
  padding: 28px 20px 22px;
  text-align: center;
}
.hero h1 { margin: 0 0 6px; font-size: 1.6rem; }
.hero p { margin: 0; opacity: 0.85; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.status { color: var(--muted); text-align: center; padding: 12px; }
.status:empty { display: none; }
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.menu-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.menu-item img, .menu-item .ph {
  width: 76px; height: 76px; border-radius: 10px; object-fit: cover; flex: none; background: var(--line);
}
.menu-item .info { flex: 1; }
.menu-item h3 { margin: 0 0 4px; font-size: 1.1rem; }
.menu-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.menu-item .price { font-weight: 600; color: var(--ink); margin-top: 4px; }
.menu-item .add {
  flex: none; background: var(--accent); color: #fff; border-radius: 999px;
  width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.4rem;
}
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 616px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--brand); color: #fff; border: 0; border-radius: 14px;
  padding: 16px 18px; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.cart-bar[hidden] { display: none; }
dialog.sheet {
  border: 0; border-radius: 18px 18px 0 0; padding: 20px;
  width: 100%; max-width: 640px; margin: auto auto 0; max-height: 90vh;
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin: 0 0 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 600; margin-bottom: 6px; }
legend small { color: var(--muted); font-weight: 400; }
.opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--line);
}
.opt span { flex: 1; }
.opt em { color: var(--muted); font-style: normal; }
.opt input { width: 20px; height: 20px; accent-color: var(--accent); }
.qty { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 14px 0; }
.qty button {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 1.3rem; cursor: pointer;
}
.qty span { font-size: 1.2rem; min-width: 2ch; text-align: center; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.actions button {
  flex: 1; padding: 14px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer;
}
.primary { background: var(--accent); color: #fff; border: 0; }
.primary:disabled { opacity: 0.6; }
.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.cart-lines { list-style: none; padding: 0; margin: 0; }
.cart-lines li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.cart-lines .desc { flex: 1; }
.cart-lines small { color: var(--muted); display: block; }
.cart-lines button {
  border: 0; background: none; color: var(--error); font: inherit; cursor: pointer; padding: 0 4px;
}
.subtotal { display: flex; justify-content: space-between; margin: 12px 0; }
.field { display: block; font-weight: 600; margin: 10px 0 4px; }
.field input {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px;
}
.hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0; }
.error { color: var(--error); margin: 8px 0; }
.thanks { max-width: 520px; margin: 40px auto; text-align: center; padding: 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chips button {
  flex: 1 0 18%; padding: 12px 0; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.menu-item.donate .ph { display: grid; place-items: center; font-size: 2rem; color: var(--accent); background: #fbe9da; }

/* Cart sheet */
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--bg);
  font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.name-card {
  background: #fbe9da; border: 2px solid #f0cfae; border-radius: 16px; padding: 14px 14px 16px; margin-bottom: 8px;
}
.name-card label { display: block; font-size: 1.15rem; font-weight: 700; color: var(--brand); }
.name-card .hint { margin: 2px 0 10px; }
.name-card input {
  display: block; width: 100%; padding: 14px 16px; font: inherit; font-size: 1.2rem; font-weight: 600;
  color: var(--ink); background: #fff; border: 2px solid #d9a77a; border-radius: 12px; outline: none;
}
.name-card input::placeholder { color: #b39c8a; font-weight: 400; }
.name-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(201, 118, 43, 0.25); }
.name-card.invalid { background: #fdecea; border-color: #f2b8b5; }
.name-card.invalid input { border-color: var(--error); }
.name-card .error { margin: 8px 0 0; font-weight: 600; font-size: 0.95rem; }
.cart-lines li { align-items: center; }
.cart-lines button.remove {
  width: 32px; height: 32px; border-radius: 999px; background: var(--bg); color: var(--muted);
  font-size: 1.2rem; line-height: 1; padding: 0; flex: none;
}
.subtotal { font-size: 1.05rem; }
.primary.pay {
  display: block; width: 100%; padding: 16px; border-radius: 14px; font: inherit; font-size: 1.1rem;
  font-weight: 700; cursor: pointer; margin-top: 4px;
}
.secure { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.link-btn {
  display: block; margin: 6px auto 0; padding: 10px; background: none; border: 0;
  font: inherit; font-weight: 600; color: var(--brand); cursor: pointer;
}

/* Track banner on the menu page */
.track-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #fbe9da; border: 1px solid #f0cfae; border-radius: 14px; padding: 14px 16px;
  margin-bottom: 12px; color: var(--brand); text-decoration: none; font-weight: 600;
}
.track-banner[hidden] { display: none; }

/* Order tracking page */
.order-wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
.order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; text-align: center;
}
.order-label { margin: 0; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.order-num { margin: 4px 0 2px; font-size: 3.4rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.order-for { margin: 0 0 16px; font-size: 1.1rem; }
.status-msg { margin: 0 0 18px; font-size: 1.15rem; font-weight: 700; }
.status-msg.ready { color: #1e7a3c; }
.status-msg.bad { color: var(--error); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps li { font-size: 0.78rem; color: var(--muted); }
.steps li::before {
  content: ""; display: block; height: 6px; border-radius: 999px; background: var(--line); margin-bottom: 6px;
}
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done::before { background: var(--accent); }
.steps li.now.ready::before { background: #1e7a3c; }
.order-items { list-style: none; margin: 16px 0 0; padding: 0; text-align: left; }
.order-items li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-items small { display: block; color: var(--muted); }
.order-total { display: flex; justify-content: space-between; margin: 12px 0 0; font-weight: 700; }
.order-tip { display: flex; justify-content: space-between; margin: 10px 0 0; color: var(--muted); }
.order-foot { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 16px 0; }
.order-actions { display: grid; gap: 10px; margin-top: 18px; }
.order-actions a { text-align: center; text-decoration: none; padding: 14px; border-radius: 12px; font-weight: 600; }
.order-actions .secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }

/* Raised today */
.hero .raised {
  display: inline-block; margin-top: 14px; padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 1; font-size: 1rem;
}
.hero .raised strong { color: #ffc98f; font-size: 1.15rem; }
.hero .raised[hidden] { display: none; }
.donate-raised {
  background: #fbe9da; color: var(--brand); border-radius: 12px; padding: 10px 12px;
  margin: 8px 0 0; font-weight: 600; text-align: center;
}
.donate-raised[hidden] { display: none; }
