/* The guest menu.
 *
 * One stylesheet, no framework, no webfont. A diner opens this once, at a
 * table, on whatever connection the room has — every kilobyte here is paid for
 * by somebody waiting to read a price.
 *
 * The system font stack is deliberate. Satoshi is the app's typeface and it is
 * ~100 KB a weight; the till can afford that at install time and a phone at a
 * table cannot, so this page uses whatever the phone already has. Nothing here
 * needs to be brand-perfect — it needs to be legible in one glance, held at
 * arm's length, in a room lit for eating.
 */

:root {
  --ink: #14110f;
  --ink-soft: #6b625c;
  --paper: #fbfaf8;
  --card: #ffffff;
  --line: #e8e3dd;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --veg: #16803c;
  --nonveg: #b91c1c;
  --egg: #b45309;
  --radius: 14px;
  --gap: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1ee;
    --ink-soft: #a49a93;
    --paper: #14110f;
    --card: #1e1a18;
    --line: #302a26;
    --accent: #fb923c;
    --accent-ink: #14110f;
    --veg: #4ade80;
    --nonveg: #f87171;
    --egg: #fbbf24;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.booting, .empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 32px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 10px;
}

.profile__name { margin: 0; font-size: 22px; line-height: 1.2; }
.profile__blurb { margin: 8px 0 0; color: var(--ink-soft); }
.profile__address { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}

.link:active { background: var(--line); }


/* --- the hub, at /r/{slug} ------------------------------------------------
 *
 * The front page: who they are and the ways to reach them. One button carries
 * more weight than everything else on it, because everything else on it is a
 * way out of the page and that is the way in.
 */

.hub {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* The page reserves room at the foot for the cart bar, which is fixed and
 * overlaps the last dish. The hub has no cart, so it would otherwise end in a
 * hand's width of nothing. Browsers without `:has()` keep the old padding,
 * which is only ever too generous. */
.app:has(.hub) {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.hero {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  text-align: center;
}
.hero:active { opacity: 0.9; }
.hero__label { display: block; font-size: 19px; font-weight: 700; }
.hero__hint { display: block; margin-top: 2px; font-size: 14px; opacity: 0.85; }

.linkgroup { text-align: center; }
.linkgroup__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.linkgroup .links { margin-top: 8px; }

.hours--hub { margin-top: 14px; }

/* The way from the menu back to everything the hub carries. Quiet, and at the
 * foot of the page: a diner who is reading a menu is not looking for it, and a
 * diner who came for Instagram never opened the menu in the first place. */
.tohub {
  display: block;
  padding: 12px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}
.tohub:active { color: var(--ink); }

.hours { margin-top: 12px; text-align: left; font-size: 14px; }
.hours summary { cursor: pointer; color: var(--ink-soft); }
.hours dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 8px 0 0;
}
.hours dt { color: var(--ink-soft); }
.hours dd { margin: 0; text-align: right; }

.seated {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.seated__table { font-weight: 700; color: var(--ink); }
.seated__section::before { content: " · "; }

/* A code that no longer resolves to a table. Warm rather than alarming: from
   the diner's side nothing is wrong, they simply cannot order from here. */
.notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 14px;
  line-height: 1.4;
}

.welcome {
  margin: 0;
  padding: 10px 14px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

/* --- menu --- */

.chips {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  background: var(--paper);
  /* Wide content scrolls inside its own box; the page itself never does. */
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.menu { display: flex; flex-direction: column; gap: 22px; }
.group__name {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.group__dishes { display: flex; flex-direction: column; gap: 10px; }

.dish {
  display: flex;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.dish--out { opacity: 0.55; }

.dish__photo {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 10px;
}
.dish__body { flex: 1 1 auto; min-width: 0; }
.dish__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dish__foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* The FSSAI mark: a dot inside a square, drawn rather than shipped as an
   image, because it is two rules of CSS and one fewer request. */
.mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  position: relative;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: currentColor;
}
.mark--veg { color: var(--veg); }
.mark--non-veg { color: var(--nonveg); }
.mark--egg { color: var(--egg); }
.mark--vegan { color: var(--veg); border-radius: 50%; }

.prices { display: inline-flex; align-items: baseline; gap: 8px; }
.price { font-weight: 600; }
.price--was {
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: line-through;
}
.sold-out { font-size: 13px; color: var(--ink-soft); }

.add {
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.add:active { background: var(--accent); color: var(--accent-ink); }

/* --- actions --- */

.callbtn, .primary {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.callbtn { background: var(--card); border: 1px solid var(--line); color: inherit; }
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:disabled { opacity: 0.6; }

.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(608px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 3;
}
.cartbar__total { margin-left: auto; }
.cartbar__go { opacity: 0.85; font-weight: 500; }

/* --- sheet --- */

.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  max-width: 640px;
  margin: auto auto 0;
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.sheet__inner {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 82vh;
  overflow-y: auto;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sheet__head h2 { margin: 0; font-size: 18px; }
.sheet__close {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.field {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  /* Flat, never tinted. A field is the largest block of colour on the screen
     and any accent in it reads as orange — the same rule the app's theme keeps
     for inputDecorationTheme.fillColor. */
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.field--code { text-align: center; letter-spacing: 0.5em; font-size: 22px; }
/* 16px or larger, or iOS zooms the page when the field takes focus. */
.field, .field--code { font-size: max(16px, 1rem); }

.phone { display: flex; align-items: stretch; gap: 8px; }
.phone__code {
  display: flex;
  align-items: center;
  padding: 0 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
}
.phone .field { flex: 1 1 auto; }

.identity__why { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }

.linkish {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.linkish:disabled { text-decoration: none; }

.problem { margin: 0 0 10px; color: var(--nonveg); font-size: 14px; display: none; }
.problem--on { display: block; }

/* --- cart --- */

.cart__line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart__what { flex: 1 1 auto; min-width: 0; }
.cart__name { display: block; font-weight: 500; }
.cart__note { display: block; font-size: 13px; color: var(--ink-soft); }
.cart__amount { font-variant-numeric: tabular-nums; font-weight: 600; }

.stepper { display: inline-flex; align-items: center; gap: 2px; }
.stepper button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 17px;
  cursor: pointer;
}
.stepper__value { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }

.cart__sum {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 4px;
  font-size: 17px;
}
.cart__caveat { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); }

.sizes, .service { display: flex; flex-direction: column; gap: 8px; }
.sizes__btn, .service__btn {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.service__other { display: flex; flex-direction: column; gap: 0; }

/* --- status --- */

.statuses { display: flex; flex-direction: column; gap: 10px; }
.status {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.status--accepted { border-left-color: var(--veg); }
.status--rejected, .status--cancelled { border-left-color: var(--nonveg); }
.status__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
}
.status__word { margin: 6px 0 0; font-weight: 600; }
.status__why, .status__stale { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.status__stale { color: var(--nonveg); }
.status__lines { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.status__sum { margin: 8px 0 0; font-size: 14px; }

.whoami {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.whoami .linkish { width: auto; margin: 0; padding: 0; }

#msg91-captcha:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
