/* JT Flow Order — customer ordering page.
   Receipt-slip cart and tracking, rubber-stamp order status, QR viewfinder scan. */
:root {
  --brand: #01411c;
  --brand-2: #0a5a2b;
  --cta: #038c3e;
  --cta-press: #02702f;
  --gold: #d4a017;
  --gold-ink: #8a6508;
  --gold-soft: #fbf0cc;
  --bg: #f3f6f2;
  --paper: #ffffff;
  --ink: #17221b;
  --muted: #5b6b60;
  --faint: #8c9a90;
  --line: #dce5de;
  --chip: #e8efe9;
  --chili: #c8341d;
  --chili-soft: #fbe9e5;
  --blue: #1f5fbf;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --shadow: 0 1px 2px rgba(23, 34, 27, 0.06), 0 6px 18px rgba(23, 34, 27, 0.07);
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
  --safe-b: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --safe-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 var(--font);
  font-optical-sizing: auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
html[lang="ur"] body { font-family: var(--urdu), var(--font); font-size: 15px; line-height: 2; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--cta); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.mono, .num { font-family: var(--mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.num { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(96px + var(--safe-b)); }

/* boot */
.boot { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 70vh; color: var(--muted); }
.boot-mark { width: 22px; height: 22px; border-radius: 6px; border: 3px solid var(--line); border-top-color: var(--cta); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── header ───────────────────────────────────────────── */
.top { background: var(--brand); color: #fff; padding: calc(14px + var(--safe-t)) 16px 30px; position: relative; }
.top-row { display: flex; align-items: center; gap: 12px; }
.logo { width: 46px; height: 46px; border-radius: 12px; background: #fff; flex: none; overflow: hidden; display: grid; place-items: center; color: var(--brand); font-weight: 800; font-size: 20px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18); }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.top-name { min-width: 0; flex: 1; }
.top-name h1 { margin: 0; font-size: 20px; line-height: 1.15; font-weight: 750; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[lang="ur"] .top-name h1 { line-height: 1.7; font-size: 19px; }
.top-name p { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { flex: none; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; min-height: 34px; }
.lang .ur { font-family: var(--urdu); font-size: 13px; line-height: 1; }
.iconbtn { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; display: grid; place-items: center; }
.iconbtn svg { width: 20px; height: 20px; }

/* order type panel (floats over the header edge) */
.mode { margin: -20px 12px 0; position: relative; background: var(--paper); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 10px; min-height: 44px; font-weight: 650; color: var(--muted); padding: 4px 6px; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg button:disabled { opacity: 0.35; cursor: not-allowed; }
.tablechip { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px; font-size: 14px; color: var(--muted); }
.tablechip b { color: var(--ink); font-weight: 700; }
.tablechip svg { width: 18px; height: 18px; color: var(--gold-ink); flex: none; }
.hint { font-size: 13px; color: var(--muted); padding: 6px 8px 2px; }

.note { margin: 12px 12px 0; padding: 10px 12px; border-radius: var(--r-s); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.note.info { background: var(--gold-soft); color: #5e4504; }
.note.warn { background: var(--chili-soft); color: #7a1f10; }
.note.ok { background: #e3f3e8; color: #0d4d26; }
.note b { font-weight: 700; }

/* ── menu ─────────────────────────────────────────────── */
.search { margin: 14px 12px 0; position: relative; }
.search input { width: 100%; height: 46px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); padding: 0 14px 0 42px; font-size: 16px; }
html[dir="rtl"] .search input { padding: 0 42px 0 14px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 13px; width: 20px; height: 20px; color: var(--faint); }
.search input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(3, 140, 62, 0.18); }

.cats { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; margin-top: 6px; transition: box-shadow 0.2s; }
.cats.stuck { box-shadow: 0 6px 12px -8px rgba(23, 34, 27, 0.25); }
.cats-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; scroll-behavior: smooth; }
.cats-row::-webkit-scrollbar { display: none; }
.cat { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; color: var(--ink); min-height: 38px; white-space: nowrap; }
.cat[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat .ic { margin-inline-end: 6px; }

.sec { padding: 6px 16px 0; scroll-margin-top: 64px; }
.sec h2 { margin: 18px 0 2px; font-size: 19px; font-weight: 750; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; }
.sec h2 small { font-size: 13px; font-weight: 500; color: var(--faint); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item-t { min-width: 0; }
.item-name { font-weight: 680; font-size: 16px; line-height: 1.3; margin: 0; }
.item-ur { font-family: var(--urdu); font-size: 14px; line-height: 1.9; color: var(--muted); margin: 0; direction: rtl; text-align: start; }
html[lang="ur"] .item-name { font-size: 16px; line-height: 1.9; }
.item-desc { margin: 4px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-deal { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.item-price { margin-top: 8px; font-family: var(--mono); font-weight: 600; font-size: 15px; }
.item-price small { font-family: var(--font); font-weight: 500; color: var(--faint); font-size: 12px; margin-inline-end: 4px; }
.item-r { width: 88px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.thumb { width: 88px; height: 76px; border-radius: 12px; background: var(--chip); overflow: hidden; display: grid; place-items: center; font-size: 34px; color: var(--brand); font-weight: 800; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.add { border: 1.5px solid var(--cta); color: var(--cta); background: var(--paper); border-radius: 999px; min-height: 36px; width: 88px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.add svg { width: 16px; height: 16px; }
.add { position: relative; }
.add .badge { position: absolute; top: -8px; inset-inline-end: -6px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--cta); color: #fff; font: 600 12px/22px var(--mono); padding: 0 6px; box-shadow: 0 0 0 2px var(--bg); }
.add:active { background: #e3f3e8; }
.step { display: inline-flex; align-items: center; justify-content: space-between; width: 88px; min-height: 36px; border-radius: 999px; background: var(--cta); color: #fff; padding: 0 4px; }
.step button { border: 0; background: transparent; color: #fff; width: 30px; height: 32px; border-radius: 999px; display: grid; place-items: center; }
.step button svg { width: 16px; height: 16px; }
.step b { font-family: var(--mono); font-size: 15px; min-width: 20px; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 24px; }
.contact { margin: 26px 16px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.contact p { margin: 0 0 10px; color: var(--muted); font-size: 14px; text-align: center; }
.foot { text-align: center; color: var(--faint); font-size: 12px; padding: 28px 16px 12px; }
.foot a { color: var(--muted); text-decoration: none; font-weight: 600; }

/* bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 12px calc(10px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, rgba(243, 246, 242, 0)); pointer-events: none; }
.bar > * { pointer-events: auto; max-width: 536px; margin: 0 auto; }
.btn { border: 0; border-radius: var(--r-m); min-height: 54px; width: 100%; background: var(--cta); color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; box-shadow: 0 6px 16px rgba(3, 140, 62, 0.28); }
.btn:active { background: var(--cta-press); }
.btn:disabled { opacity: 0.5; box-shadow: none; cursor: not-allowed; }
.btn.split { justify-content: space-between; }
.btn .count { background: rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 1px 8px; font-family: var(--mono); font-size: 14px; }
.btn .num { font-size: 16px; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:active { background: var(--chip); }
.btn.small { min-height: 44px; font-size: 15px; width: auto; }
.link { border: 0; background: none; color: var(--cta); font-weight: 650; padding: 8px 4px; min-height: 40px; }

/* ── overlay panels ───────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(10, 20, 14, 0.5); z-index: 40; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto; background: var(--paper); border-radius: var(--r-l) var(--r-l) 0 0; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; animation: rise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0.4; } }
.sheet-body { overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }
.sheet-foot { padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--paper); }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 6px; }
.sheet-img { margin: 4px -16px 12px; height: 200px; background: var(--chip); overflow: hidden; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; }
.sheet h3 { margin: 6px 0 2px; font-size: 22px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
html[lang="ur"] .sheet h3 { line-height: 1.8; }
.sheet .desc { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.close { position: absolute; top: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 999px; border: 0; background: rgba(23, 34, 27, 0.55); color: #fff; display: grid; place-items: center; z-index: 2; }
.close svg { width: 18px; height: 18px; }
fieldset { border: 0; margin: 18px 0 0; padding: 0; }
legend { font-weight: 700; font-size: 16px; padding: 0; display: flex; gap: 8px; align-items: baseline; width: 100%; }
legend small { font-weight: 500; font-size: 12px; color: var(--muted); background: var(--chip); border-radius: 6px; padding: 1px 7px; }
legend small.need { background: var(--gold-soft); color: var(--gold-ink); }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); min-height: 52px; cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid #b4c2b8; flex: none; display: grid; place-items: center; }
.opt input:checked + .dot { border-color: var(--cta); }
.opt input:checked + .dot::after { content: ""; width: 12px; height: 12px; border-radius: 999px; background: var(--cta); }
.opt input:focus-visible + .dot { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt .lbl { flex: 1; }
.opt .lbl small { display: block; color: var(--muted); font-size: 13px; }
.opt .num { color: var(--muted); font-size: 14px; }
.qtyrow { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 46px; height: 46px; border: 0; background: none; border-radius: 999px; display: grid; place-items: center; color: var(--cta); }
.qty button:disabled { color: var(--line); }
.qty button svg { width: 20px; height: 20px; }
.qty b { font-family: var(--mono); font-size: 18px; min-width: 34px; text-align: center; }

/* forms */
.field { margin-top: 14px; }
.field label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.field label small { font-weight: 500; color: var(--faint); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); padding: 10px 14px; font-size: 16px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(3, 140, 62, 0.18); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--chili); }
.err { color: var(--chili); font-size: 13px; margin-top: 6px; }
.help { color: var(--muted); font-size: 13px; margin-top: 6px; }
.pay { border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 12px; background: var(--paper); margin-top: 8px; }
.transfer { background: #f7faf7; border: 1px dashed #b7c7bb; border-radius: 12px; padding: 12px; margin: 4px 0 12px; }
.transfer pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 14px; line-height: 1.5; direction: ltr; text-align: left; }
.upload { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.upload img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.upload label.btn { width: auto; min-height: 44px; font-size: 15px; box-shadow: none; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ── receipt slip ─────────────────────────────────────── */
.page { padding: calc(12px + var(--safe-t)) 12px 24px; }
.page .slip { margin-top: 18px; }
.pagehead { display: flex; align-items: center; gap: 8px; padding: 6px 4px 10px; }
.pagehead h2 { margin: 0; font-size: 20px; font-weight: 750; flex: 1; }
.back { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; }
.back svg { width: 20px; height: 20px; }
html[dir="rtl"] .back svg, html[dir="rtl"] .flip { transform: scaleX(-1); }
.slip { position: relative; background: var(--paper); padding: 22px 18px 26px; box-shadow: 0 1px 2px rgba(23, 34, 27, 0.08), 0 10px 24px -12px rgba(23, 34, 27, 0.25); margin-bottom: 26px; }
.slip::before, .slip::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background-size: 16px 12px; background-repeat: repeat-x; }
.slip::after { bottom: -12px; background-image: linear-gradient(135deg, var(--paper) 50%, transparent 50%), linear-gradient(225deg, var(--paper) 50%, transparent 50%); background-position: 0 0, 0 0; }
.slip::before { top: -12px; background-image: linear-gradient(45deg, var(--paper) 50%, transparent 50%), linear-gradient(315deg, var(--paper) 50%, transparent 50%); }
.slip.flat-top::before { display: none; }
.slip-h { text-align: center; padding-bottom: 12px; border-bottom: 1px dashed #c3cfc6; }
.slip-h h3 { margin: 0; font-size: 18px; font-weight: 750; }
.slip-h p { margin: 2px 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
html[lang="ur"] .slip-h p { font-family: var(--urdu), var(--mono); }
.lines { list-style: none; margin: 0; padding: 6px 0; }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e1e8e3; align-items: start; }
.line:last-child { border-bottom: 0; }
.line .q { font-family: var(--mono); font-weight: 600; min-width: 28px; direction: ltr; unicode-bidi: isolate; }
.line .n { font-weight: 600; line-height: 1.3; }
html[lang="ur"] .line .n { line-height: 1.9; }
.line .n small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.line .a { font-family: var(--mono); font-weight: 600; }
.line .ed { display: flex; gap: 6px; margin-top: 8px; }
.mini { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--cta); }
.mini svg { width: 16px; height: 16px; }
.mini.del { color: var(--chili); }
.tot { border-top: 1px dashed #c3cfc6; padding-top: 10px; margin-top: 4px; }
.tot div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.tot div .num { color: var(--ink); }
.tot .grand { color: var(--ink); font-weight: 750; font-size: 19px; border-top: 3px double var(--ink); margin-top: 8px; padding-top: 10px; }
.tot .grand .num { font-size: 19px; }
.estimate { font-size: 12px; color: var(--faint); text-align: center; margin-top: 10px; }

/* ── tracking: the rubber stamp ───────────────────────── */
.billno { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 0; direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .billno { text-align: right; }
.track-h { padding-bottom: 14px; border-bottom: 1px dashed #c3cfc6; min-height: 120px; position: relative; }
.track-h .lbl { color: var(--muted); font-size: 13px; }
.track-h .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 4px; }
html[lang="ur"] .track-h .meta { font-family: var(--urdu), var(--mono); }
.stamp {
  position: absolute; top: 4px; inset-inline-end: 0;
  transform: rotate(-9deg);
  color: var(--cta);
  border: 3px solid currentColor; border-radius: 10px;
  padding: 7px 12px 6px;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px currentColor;
  font: 800 19px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  max-width: 62%; text-align: center;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.9 0 0 0 1.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.9 0 0 0 1.55'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.94;
}
html[lang="ur"] .stamp { font-family: var(--urdu); letter-spacing: 0; text-transform: none; font-size: 18px; font-weight: 700; line-height: 1.6; padding: 4px 14px 6px; }
.stamp.s-pending { color: var(--gold-ink); }
.stamp.s-accepted, .stamp.s-preparing { color: var(--cta); }
.stamp.s-ready, .stamp.s-served, .stamp.s-completed, .stamp.s-delivered { color: var(--brand); }
.stamp.s-on_the_way { color: var(--blue); }
.stamp.s-rejected, .stamp.s-cancelled { color: var(--chili); }
.stamp.fresh { animation: stamp 0.46s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
@keyframes stamp {
  0% { transform: rotate(-9deg) scale(1.9); opacity: 0; }
  55% { transform: rotate(-9deg) scale(0.93); opacity: 1; }
  100% { transform: rotate(-9deg) scale(1); opacity: 0.94; }
}
.steps { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.steps li { text-align: center; font-size: 12px; color: var(--faint); position: relative; padding-top: 18px; line-height: 1.25; }
html[lang="ur"] .steps li { line-height: 1.8; font-size: 12px; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 999px; background: var(--line); }
.steps li::after { content: ""; position: absolute; top: 8px; left: calc(50% + 8px); right: calc(-50% + 8px); height: 2px; background: var(--line); }
html[dir="rtl"] .steps li::after { left: calc(-50% + 8px); right: calc(50% + 8px); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--muted); }
.steps li.done::before, .steps li.done::after { background: var(--cta); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::before { background: var(--cta); box-shadow: 0 0 0 4px rgba(3, 140, 62, 0.2); }
.eta { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #eef5f0; margin: 12px 0 2px; font-size: 14px; }
.eta svg { width: 20px; height: 20px; color: var(--cta); flex: none; }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 4px; }
.actions .btn { min-height: 48px; font-size: 15px; text-decoration: none; }
.actions .btn svg { width: 20px; height: 20px; flex: none; }
.merged { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ── home ─────────────────────────────────────────────── */
.home-top { background: var(--brand); color: #fff; padding: calc(18px + var(--safe-t)) 16px 70px; }
.home-top .brandline { display: flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; flex: 1; }
.wordmark span { color: var(--gold); }
.home-top h1 { margin: 26px 0 6px; font-size: 30px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; max-width: 16ch; }
html[lang="ur"] .home-top h1 { font-size: 26px; line-height: 1.9; max-width: none; }
.home-top p { margin: 0; color: rgba(255, 255, 255, 0.8); max-width: 34ch; }
.scanbtn { display: flex; align-items: center; gap: 16px; width: calc(100% - 24px); margin: -50px 12px 0; position: relative; border: 0; background: var(--paper); border-radius: var(--r-l); padding: 16px; box-shadow: var(--shadow); text-align: start; }
.finder { width: 84px; height: 84px; flex: none; position: relative; display: grid; place-items: center; background: #f2f7f3; border-radius: 14px; }
.finder i { position: absolute; width: 22px; height: 22px; border: 4px solid var(--gold); }
.finder i:nth-child(1) { top: 6px; left: 6px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.finder i:nth-child(2) { top: 6px; right: 6px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.finder i:nth-child(3) { bottom: 6px; left: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.finder i:nth-child(4) { bottom: 6px; right: 6px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.finder svg { width: 38px; height: 38px; color: var(--brand); }
.scanbtn .txt { display: block; min-width: 0; }
.scanbtn .txt b { display: block; font-size: 18px; font-weight: 750; color: var(--ink); }
.scanbtn .txt small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.box { background: var(--paper); border-radius: var(--r-m); margin: 14px 12px 0; padding: 14px; border: 1px solid var(--line); }
.box h2 { margin: 0 0 8px; font-size: 16px; font-weight: 750; }
.coderow { display: flex; gap: 8px; }
.coderow input { flex: 1; min-width: 0; height: 50px; border-radius: 12px; border: 1px solid var(--line); padding: 0 14px; font-family: var(--mono); font-size: 20px; letter-spacing: 0.18em; text-transform: uppercase; direction: ltr; }
.coderow input::placeholder { letter-spacing: 0.04em; font-family: var(--font); font-size: 15px; text-transform: none; color: var(--faint); }
.coderow input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(3, 140, 62, 0.18); }
.coderow .btn { width: auto; min-height: 50px; box-shadow: none; }
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list button { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 12px 2px; text-align: start; min-height: 56px; }
.list .av { width: 40px; height: 40px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; font-weight: 800; color: var(--brand); flex: none; overflow: hidden; }
.list .tx { flex: 1; min-width: 0; }
.list .tx b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .tx small { color: var(--muted); font-size: 13px; }
.list .chev { width: 18px; height: 18px; color: var(--faint); }
.getapp { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.getapp svg { width: 34px; height: 34px; flex: none; }
.getapp b { display: block; }
.getapp small { color: var(--muted); }

/* ── scanner ──────────────────────────────────────────── */
.scanner { position: fixed; inset: 0; z-index: 60; background: #050806; color: #fff; display: flex; flex-direction: column; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .shade { position: absolute; inset: 0; background: radial-gradient(circle at 50% 44%, transparent 0 128px, rgba(0, 0, 0, 0.55) 129px); pointer-events: none; }
.scanner .vf { position: absolute; left: 50%; top: 44%; width: 236px; height: 236px; margin: -118px 0 0 -118px; }
.scanner .vf i { position: absolute; width: 46px; height: 46px; border: 5px solid var(--gold); }
.scanner .vf i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scanner .vf i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scanner .vf i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scanner .vf i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanner .vf.hit i { border-color: #3ddc84; }
.scanner .bar-top { position: relative; display: flex; justify-content: space-between; padding: calc(14px + var(--safe-t)) 14px 14px; }
.scanner .msg { position: absolute; left: 0; right: 0; bottom: calc(110px + var(--safe-b)); text-align: center; padding: 0 24px; font-size: 16px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.scanner .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + var(--safe-b)); display: flex; gap: 10px; justify-content: center; }
.scanner .bottom button { border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.35); color: #fff; border-radius: 999px; padding: 10px 18px; min-height: 46px; font-weight: 600; }
.scanner .round { width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, 0.45); color: #fff; display: grid; place-items: center; }
.scanner .round svg { width: 22px; height: 22px; }
.scanner .fail { position: absolute; inset: 0; display: grid; place-items: center; padding: 32px; text-align: center; background: #050806; z-index: 2; }
.scanner .fail p { color: rgba(255, 255, 255, 0.85); max-width: 32ch; margin: 0 auto 18px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; z-index: 80; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.offline { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; }

@media (min-width: 600px) {
  body { padding-top: 12px; }
  .top, .home-top { border-radius: var(--r-l) var(--r-l) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* panels + button resets */
.panel { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.panel .page { max-width: 560px; margin: 0 auto; padding-bottom: calc(112px + var(--safe-b)); }
.item-t { border: 0; background: none; padding: 0; margin: 0; text-align: start; color: inherit; width: 100%; display: block; min-width: 0; }
.thumbbtn { border: 0; background: none; padding: 0; display: block; }
.empty .btn { margin: 12px auto 0; }

/* option rows and upload button inside form fields (beat .field label) */
.field .opt { display: flex; margin: 0; font-weight: 400; font-size: inherit; }
.field .opt .lbl { font-weight: 650; }
.field .upload label.btn { display: inline-flex; margin: 0; }

/* v2: sold out, call buttons, kiosk */
.item.soldout { cursor: default; }
.item.soldout .item-name, .item.soldout .item-desc { opacity: .55; }
.item.soldout .thumb { filter: grayscale(1); opacity: .5; }
.badge-out { display: inline-block; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #9A3412; background: #FFEDD5; border-radius: 999px; padding: 3px 10px; }
.calls { display: flex; gap: 8px; margin-top: 10px; }
.calls .btn { flex: 1; }
body.kiosk .iconbtn[data-act="scan"], body.kiosk .promo, body.kiosk .contact, body.kiosk .foot, body.kiosk .note.ok { display: none !important; }
body.kiosk { font-size: 17px; }
body.kiosk .item-name { font-size: 18px; }
body.kiosk .seg button { min-height: 56px; font-size: 18px; }
.kdone { position: fixed; inset: 0; z-index: 60; background: var(--brand, #01411C); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; }
.kdone h2 { font-size: 34px; margin: 0 0 6px; }
.kdone .knum { font-family: var(--mono); font-size: clamp(56px, 16vw, 120px); font-weight: 800; letter-spacing: .02em; margin: 6px 0 10px; color: #FFD86B; }
.kdone p { font-size: 18px; margin: 0 0 18px; opacity: .92; }
.kdone .btn { background: #fff; color: var(--brand, #01411C); min-width: 220px; min-height: 56px; font-size: 18px; }
.kdone small { display: block; margin-top: 12px; opacity: .75; }
.kidle { position: fixed; inset: 0; z-index: 61; background: rgba(1,65,28,.86); color: #fff; display: grid; place-items: center; text-align: center; padding: 24px; }
.kidle h2 { font-size: 30px; margin: 0 0 8px; }
.kidle .btn { background: #FFD86B; color: #01411C; min-width: 220px; min-height: 56px; font-size: 18px; margin-top: 14px; }

/* ── release 2: kiosk welcome + big-photo menu ─────────── */
body.kx-on { padding-top: 0; }
body.kx-on #app { max-width: none; padding-bottom: 0; }
.kx-attract { position: fixed; inset: 0; background: var(--brand); color: #fff; display: grid; place-items: center; overflow: hidden; }
.kx-hero { position: absolute; inset: 0; }
.kx-slide { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease; }
.kx-slide.on { opacity: .5; animation: kx-pan 10s ease-out forwards; }
@keyframes kx-pan { from { transform: scale(1); } to { transform: scale(1.08); } }
.kx-attract::after { content: ""; position: absolute; inset: 0; background: radial-gradient(95% 75% at 50% 42%, rgba(1, 43, 19, .25), rgba(1, 43, 19, .94)); }
.kx-att-c { position: relative; z-index: 1; text-align: center; padding: 6vh 6vw; width: min(980px, 100%); }
.kx-logo img { width: clamp(96px, 14vh, 156px); height: clamp(96px, 14vh, 156px); object-fit: contain; background: #fff; border-radius: 28px; padding: 8px; margin: 0 auto 2.6vh; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.kx-att-c h1 { margin: 0; font-size: clamp(34px, 5.6vw, 78px); font-weight: 800; letter-spacing: -.02em; line-height: 1.04; }
.kx-touch { margin: 1.6vh 0 0; font-size: clamp(18px, 2.4vw, 30px); color: #FFD86B; font-weight: 700; animation: kx-breathe 2.6s ease-in-out infinite; }
@keyframes kx-breathe { 50% { opacity: .55; } }
.kx-where { margin: 6vh 0 1.8vh; font-size: clamp(16px, 2vw, 24px); color: #D7E8DC; font-weight: 600; }
.kx-types { display: flex; gap: 2.4vw; justify-content: center; flex-wrap: wrap; }
.kx-type { min-width: min(330px, 42vw); padding: 3.4vh 2.4vw; border-radius: 30px; border: 2px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .1); color: #fff; display: flex; flex-direction: column; align-items: center; gap: .8vh; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .15s ease, background .15s ease; }
.kx-type:active { transform: scale(.97); background: rgba(255, 255, 255, .2); }
.kx-ti { font-size: clamp(46px, 7.4vh, 76px); line-height: 1; }
.kx-type b { font-size: clamp(24px, 3.2vw, 38px); font-weight: 800; }
.kx-type small { font-size: clamp(14px, 1.6vw, 20px); color: #D7E8DC; }
.kx-lang { position: fixed; top: 22px; right: 26px; z-index: 2; min-height: 44px; padding: 8px 18px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .kx-slide.on, .kx-touch { animation: none; } }

.kx { display: grid; grid-template-columns: clamp(140px, 16vw, 220px) minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
.kx-top { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--brand); color: #fff; box-shadow: 0 6px 20px rgba(1, 43, 19, .18); }
.kx-mini img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 12px; padding: 3px; }
.kx-top h1 { margin: 0; font-size: 22px; font-weight: 750; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kx-chip { background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 8px 8px 8px 16px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kx-chip .link { color: #FFD86B; font-weight: 800; background: none; border: 0; padding: 4px 8px; }
.kx-top .lang { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.kx-over { width: auto; min-height: 40px; background: #fff; color: var(--brand); border: 0; }
.kx-rail { position: sticky; top: 70px; align-self: start; height: calc(100vh - 70px); height: calc(100dvh - 70px); overflow-y: auto; padding: 14px 10px 130px; background: var(--paper); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.kx-rail .cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: 15px; line-height: 1.2; text-align: center; color: var(--ink); }
.kx-rail .cat .ic { font-size: 34px; line-height: 1; }
.kx-rail .cat:active { background: var(--chip); }
.kx-rail .cat[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(1, 65, 28, .22); }
.kx-main { padding: 6px 22px 150px; min-width: 0; }
.kx-main .sec { scroll-margin-top: 84px; }
.kx-main .sec h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 22px 0 12px; }
.kx-main .note { margin: 14px 0 0; }
.kx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.kx-card { background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--line); }
.kx-ph { border: 0; padding: 0; background: var(--chip); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; width: 100%; }
.kx-ph img { width: 100%; height: 100%; object-fit: cover; }
.kx-em { font-size: 64px; }
.kx-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.kx-b b { font-size: 18px; line-height: 1.22; font-weight: 750; }
.kx-o { color: var(--muted); font-family: var(--urdu); font-size: 14px; line-height: 1.9; }
.kx-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.kx-pr { font-weight: 800; font-size: 19px; color: var(--brand); white-space: nowrap; }
.kx-pr small { font-weight: 600; color: var(--muted); font-size: 12px; }
.kx-card .add, .kx-card .step { min-height: 46px; width: 104px; font-size: 16px; }
.kx-card .step button { width: 36px; height: 40px; }
.kx-card.soldout .kx-ph { filter: grayscale(1); opacity: .5; }
.kx-card.soldout .kx-b b { opacity: .55; }
body.kx-on .bar > * { max-width: 760px; }
body.kx-on .bar .btn { min-height: 66px; font-size: 21px; border-radius: 20px; }
body.kx-on .panel .page { max-width: 760px; margin: 0 auto; }
@media (max-width: 700px) { .kx { grid-template-columns: 1fr; } .kx-rail { position: sticky; top: 70px; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; z-index: 15; border: 0; border-bottom: 1px solid var(--line); } .kx-rail .cat { flex: none; padding: 8px 12px; flex-direction: row; } .kx-rail .cat .ic { font-size: 22px; } .kx-chip { display: none; } }

/* ── upsell before checkout ─────────────────────────────── */
.up { padding: 18px 16px 130px; }
.up h3 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 0; text-align: center; }
.up-ur { text-align: center; font-family: var(--urdu); color: var(--muted); margin: 6px 0 0; font-size: 18px; line-height: 1.9; }
.up-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.up-card { flex: 0 1 calc(50% - 6px); max-width: 230px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; text-align: center; padding-bottom: 12px; gap: 4px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .up-card { flex-basis: 190px; } }
.up-card .btn svg { width: 18px; height: 18px; flex: none; }
.up-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.up-em { font-size: 52px; padding: 18px 0 6px; }
.up-card b { padding: 8px 10px 0; font-size: 15px; line-height: 1.25; }
.up-card > span { color: var(--brand); font-weight: 800; }
.up-card .btn { margin: 6px auto 0; }
.up-card.on { border-color: var(--cta); box-shadow: inset 0 0 0 2px var(--cta); }
.up-ok { color: var(--cta) !important; padding-top: 6px; }
.up-bar > * { display: flex; gap: 10px; }
.up-bar { display: flex; gap: 10px; justify-content: center; }
.up-bar .btn { flex: 1; max-width: 360px; }
body.kx-on .up { padding-top: 30px; }
body.kx-on .up h3 { font-size: 38px; }
body.kx-on .up-ur { font-size: 24px; }
body.kx-on .up-grid { gap: 18px; margin-top: 26px; }
body.kx-on .up-card { flex-basis: 220px; max-width: 240px; border-radius: 22px; }
body.kx-on .up-card b { font-size: 18px; }
body.kx-on .up-card .btn { min-height: 54px; font-size: 18px; padding: 0 26px; }

/* ── number stand, pay by QR, I'm here ──────────────────── */
.tent-in { font-family: var(--mono); font-size: 30px !important; text-align: center; letter-spacing: .12em; max-width: 220px; }
.payqr { display: flex; gap: 14px; align-items: center; background: var(--gold-soft); border-radius: var(--r-m); padding: 12px; margin: 10px 0; }
.payqr img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; }
.payqr b { display: block; font-size: 16px; }
.payqr span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.payqr small { display: block; color: var(--gold-ink); margin-top: 6px; font-weight: 600; }
.payqr.big img { width: 230px; height: 230px; }
.payqr .qr-save { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--cta); line-height: 1.35; }
.here { margin-top: 14px; padding: 14px; border-radius: var(--r-m); background: #E8F4EC; border: 1px solid #BFE0CB; display: grid; gap: 10px; }
.here p { margin: 0; font-weight: 600; }
.here.held { background: var(--gold-soft); border-color: #F2D48A; }
.here input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 16px; }
.here .btn { min-height: 56px; font-size: 18px; }
.here.done { display: block; color: var(--cta); font-weight: 800; }

/* Release 2: order again (a stub of the last slip) + loyalty points (stamp) */
.again { margin: 12px 12px 0; padding: 12px 14px; border-radius: var(--r-m); background: var(--paper); border: 1.5px dashed #d9c27a; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.again-t { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
.again-t b { font-size: 15px; font-weight: 750; color: var(--gold-ink); }
.again-t small { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.again-list { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.again .btn { white-space: nowrap; }
.points { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; padding: 14px; border-radius: var(--r-m); background: var(--gold-soft); border: 1px solid #f2d48a; }
.points-n { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--gold-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; color: var(--gold-ink); transform: rotate(-6deg); }
.points-n b { font-family: var(--mono); font-size: 20px; font-weight: 700; line-height: 1; }
.points-n span { font-size: 10px; font-weight: 700; margin-top: 2px; }
.points-t { display: grid; gap: 2px; min-width: 0; }
.points-t b { font-size: 15px; font-weight: 750; }
.points-t small { color: #5e4504; font-size: 13px; }
