/* Nawabi Chai House — guest menu (QR → phone), second pass.
   Objective: a customer at a table or counter decides what to order in the
   two or three minutes they give a menu. So the menu is on the first screen,
   the marks and patterns are the ones every Bangalore customer already knows
   from Swiggy and Zomato, and the brand is present without being in the way.

   Ground, double rule and corner arabesques are sampled from the approved
   kiosk artwork (assets/kiosk/base.webp) — never redrawn. Words in Cinzel,
   numbers in Inter with tabular figures; the search field is Inter because
   a guest types in it. */

:root {
  --ink: #3a2817;
  --ink-soft: #66452b;
  --ink-faint: #8a7355;
  --gold: #d4a44c;
  --gold-deep: #a97f33;
  --gold-line: rgba(169, 127, 51, 0.38);
  --parchment: #e9d1a9;
  --parchment-lift: #f6ebd6;
  --card: #f9f1e2;
  --line: rgba(58, 40, 23, 0.13);
  --shadow: 0 1px 2px rgba(58, 40, 23, 0.06), 0 10px 28px rgba(58, 40, 23, 0.1);
  --veg: #1f8a3b;
  --nonveg: #8a3b12;
  --tap: 48px;
  --pad: 22px;
  --bar-h: 100px;
  --serif: Cinzel, "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --num: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0; color: var(--ink);
  font-family: var(--serif); font-size: 16px; line-height: 1.34;
  overscroll-behavior-y: none;
  background: var(--parchment) url("parchment-tile.webp") repeat;
  background-size: 206px 188px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));  /* room under the floating button */
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 55% at 50% 0%, rgba(255, 250, 238, 0.85), rgba(255, 250, 238, 0) 62%);
}
.wrap { max-width: 560px; margin: 0 auto; position: relative; z-index: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Masthead — compact; the real crown as a thin band ─────── */

.masthead {
  position: relative; text-align: center;
  padding: calc(16px + env(safe-area-inset-top)) var(--pad) 12px;
}
.masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("crown.webp") top center / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.masthead img { width: 118px; height: auto; display: block; margin: 0 auto 6px; }
.floor {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.floor::before, .floor::after { content: ""; width: 4px; height: 4px; rotate: 45deg; background: var(--gold); }

/* ── Sticky bar: search + veg toggle, then category tabs ───── */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(238, 220, 186, 0.94);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 6px 18px rgba(58, 40, 23, 0.07);
}
.tools { display: flex; gap: 8px; align-items: center; padding: 8px var(--pad) 6px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;  /* min-width:0 — a flex item defaults to its content width and the input's is ~20ch */
  min-height: 42px; padding: 0 12px;
  background: rgba(253, 248, 238, 0.9);
  border: 1px solid var(--gold-line); border-radius: 10px;
}
.search svg { width: 17px; height: 17px; flex: none; color: var(--ink-faint); }
.search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 0; margin: 0; padding: 0;
  font-family: var(--num); font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-faint); }
.search input::-webkit-search-decoration, .search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search .clear {
  display: none; width: 30px; height: 30px; border: 0; border-radius: 999px;
  background: rgba(58, 40, 23, 0.1); color: var(--ink); font-size: 14px; cursor: pointer; flex: none;
}
.search.has .clear { display: block; }

.vegtoggle {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 42px; padding: 0 10px 0 9px;
  background: rgba(253, 248, 238, 0.9);
  border: 1px solid var(--gold-line); border-radius: 10px;
  font-family: var(--num); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--ink-soft); cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.vegtoggle .sw {
  width: 30px; height: 18px; border-radius: 999px; position: relative; flex: none;
  background: rgba(58, 40, 23, 0.22); transition: background 0.18s;
}
.vegtoggle .sw::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: translate 0.18s;
}
.vegtoggle[aria-pressed="true"] { border-color: var(--veg); color: var(--veg); background: #eef7ef; }
.vegtoggle[aria-pressed="true"] .sw { background: var(--veg); }
.vegtoggle[aria-pressed="true"] .sw::after { translate: 12px 0; }

.tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 2px var(--pad) 9px; scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; font-family: var(--serif);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  white-space: nowrap; color: var(--ink-soft);
  background: rgba(253, 248, 238, 0.75); border: 1px solid var(--gold-line); border-radius: 999px;
  padding: 0 13px; min-height: 34px; cursor: pointer; scroll-snap-align: start;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.tabs button[aria-current="true"] { background: var(--ink); color: var(--parchment-lift); border-color: var(--ink); }
.tabs button[hidden] { display: none; }

/* ── The FSSAI marks — the shape every customer reads first ─── */

.mark {
  display: inline-block; width: 15px; height: 15px; flex: none;
  border: 1.5px solid var(--veg); border-radius: 2px; position: relative; background: #fff;
  vertical-align: -2px;
}
.mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 7px; height: 7px; border-radius: 999px; background: var(--veg);
}
.mark.nonveg, .mark.egg { border-color: var(--nonveg); }
.mark.nonveg::after, .mark.egg::after {
  width: 0; height: 0; border-radius: 0; background: none;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-bottom: 8px solid var(--nonveg); translate: -50% -55%;
}

.diet-unknown { color: var(--ink); font-size: 11px; font-weight: 400; line-height: 1.3; max-width: 90px; flex: none; }

/* ── Sections ─────────────────────────────────────────────── */

.section { padding: 22px var(--pad) 0; scroll-margin-top: calc(var(--bar-h) + 6px); }
.section[hidden] { display: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.section h2 { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 0.03em; margin: 0; }
.unit {
  font-family: var(--serif); font-size: 9px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap;
}
.rule { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.rule i { height: 1px; background: var(--gold-deep); opacity: 0.55; flex: 1; }
.rule b { width: 5px; height: 5px; rotate: 45deg; background: var(--gold); flex: none; }

/* ── Items — the Swiggy/Zomato shape: mark, name, price · photo right ── */

.item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.item:last-child { border-bottom: 0; }
.item[hidden] { display: none; }
.item-main { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: center; gap: 8px; }
.name { font-family: var(--serif); font-size: 15.5px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; margin: 0; }
.price {
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-size: 15px; font-weight: 700; margin-top: 4px; letter-spacing: 0.005em;
}
.pots {
  font-family: var(--num); font-size: 11.5px; font-weight: 500; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; margin-top: 3px;
}
@media (min-width: 380px) { .pots { white-space: nowrap; } }
.item-photo {
  flex: none; width: 96px; height: 96px; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(58, 40, 23, 0.16);
  outline-offset: 3px;
}
.item-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-photo:active img { scale: 0.97; }

/* ── Empty state ──────────────────────────────────────────── */

.empty { display: none; padding: 40px var(--pad); text-align: center; color: var(--ink-soft); }
.empty.show { display: block; }
.empty p { font-family: var(--serif); font-size: 15px; margin: 0 0 14px; }
.empty button, .btn {
  font-family: var(--serif); font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: rgba(253, 248, 238, 0.7); border: 1px solid var(--gold-line); border-radius: 999px;
  padding: 0 18px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}

/* ── Floating category button — the one-thumb jump ─────────── */

.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 0 18px 0 16px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--parchment-lift);
  font-family: var(--serif); font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(35, 22, 12, 0.35); cursor: pointer;
}
.fab svg { width: 18px; height: 18px; }

/* ── Sheets ───────────────────────────────────────────────── */

dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: min(560px, 100%);
  background: var(--card); border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 46px rgba(35, 22, 12, 0.34); max-height: 88dvh; overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(35, 22, 12, 0.55); }
dialog.sheet[open] { animation: rise 0.22s ease-out; }
@keyframes rise { from { translate: 0 24px; opacity: 0.6; } to { translate: 0 0; opacity: 1; } }
.grab { display: block; width: 38px; height: 4px; border-radius: 999px; background: rgba(58, 40, 23, 0.25); margin: 10px auto 0; }

.cats { padding: 8px var(--pad) calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: calc(88dvh - 24px); }
.cats h3 { font-family: var(--serif); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin: 6px 0 4px; }
.cats button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 50px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  font-family: var(--serif); font-size: 15px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer;
}
.cats button:last-child { border-bottom: 0; }
.cats button[hidden] { display: none; }   /* author display:flex would otherwise beat the UA hidden rule */
.cats button[aria-current="true"] { color: var(--gold-deep); font-weight: 600; }
.cats .n { font-family: var(--num); font-size: 13px; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.sheet-body { padding: 16px var(--pad) calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--gold-line); }
.sheet-body .item-top { margin-bottom: 4px; }
.sheet-body h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.02em; margin: 0; }
.sheet-body .price { font-size: 21px; margin-top: 6px; }
.sheet-body .pots { font-size: 12.5px; }
.sheet-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: rgba(35, 22, 12, 0.58); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}

/* ── Footer — the real foot, undistorted ──────────────────── */

.foot { position: relative; margin-top: 30px; padding: 40px var(--pad) 34px; text-align: center; color: var(--ink-soft); }
.foot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("foot.webp") bottom center / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to top, #000 60%, transparent 100%);
  mask-image: linear-gradient(to top, #000 60%, transparent 100%);
}
.foot .hours { font-family: var(--num); font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.foot .addr { font-family: var(--serif); font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.9; margin: 0 0 16px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.actions .btn { font-family: var(--num); font-size: 12.5px; letter-spacing: 0.04em; text-transform: none; font-weight: 600; padding: 0 16px; }
.actions .btn svg { width: 16px; height: 16px; }
.social { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--gold-line); background: rgba(253, 248, 238, 0.6); color: var(--ink);
}
.social svg { width: 18px; height: 18px; }
.switch { margin-top: 2px; }
.foot .rev { margin: 18px 0 0; font-family: var(--num); font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); }

/* ── Live-update whisper ──────────────────────────────────── */

.stale {
  position: fixed; left: 50%; translate: -50% 0; bottom: calc(80px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--parchment-lift);
  font-family: var(--serif); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 18px; min-height: 42px; line-height: 42px; border: 0; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 30; cursor: pointer;
}

/* 2026-09-07: re-fingerprinted after the previous hash's URL was cache-poisoned at the edge by a pre-deploy request. */

/* 2026-09-07 (2): re-fingerprinted behind the /assets/ miss guard; the previous hash was poisoned during deploy propagation. */
