/* Layout concept: a market-stall grid — dense, shelf-like product rows on warm paper, deep leaf-green for trust, marigold reserved for offers. */
:root {
  --bg: #FAF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3EEE4;
  --tile: #F1EBDD;
  --ink: #1B2420;
  --muted: #5D6862;
  --line: #E5DED0;
  --brand: #0D5A3A;
  --brand-2: #0A4A30;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2EFE6;
  --offer: #E5870A;
  --offer-ink: #3A2100;
  --offer-soft: #FDEFD6;
  --ok: #1E7F47;
  --warn: #A86A0F;
  --bad: #B42D2D;
  --info: #2A5DB0;
  --veg: #198C3A;
  --nonveg: #A3291C;
  --shadow: 0 1px 2px rgba(40,32,16,.06), 0 4px 14px rgba(40,32,16,.06);
  --shadow-lg: 0 10px 40px rgba(20,16,8,.18);
  --map-land: #EFEADF;
  --f-display: "Baloo 2", "Hind", system-ui, sans-serif;
  --f-body: "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111513; --surface: #192019; --surface-2: #212923; --tile: #26302A;
    --ink: #ECF1EC; --muted: #A2ACA5; --line: #2E3832;
    --brand: #3EAE7B; --brand-2: #57C291; --brand-ink: #06150E; --brand-soft: #173326;
    --offer: #F2A33A; --offer-ink: #2A1800; --offer-soft: #3A2A12;
    --ok: #4CC07C; --warn: #E0A548; --bad: #F06B6B; --info: #7FA8EE;
    --veg: #3DBA5F; --nonveg: #E0624F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --map-land: #1E2521;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111513; --surface: #192019; --surface-2: #212923; --tile: #26302A;
  --ink: #ECF1EC; --muted: #A2ACA5; --line: #2E3832;
  --brand: #3EAE7B; --brand-2: #57C291; --brand-ink: #06150E; --brand-soft: #173326;
  --offer: #F2A33A; --offer-ink: #2A1800; --offer-soft: #3A2A12;
  --ok: #4CC07C; --warn: #E0A548; --bad: #F06B6B; --info: #7FA8EE;
  --veg: #3DBA5F; --nonveg: #E0624F;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --map-land: #1E2521;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
h1,h2,h3,h4 { font-family: var(--f-display); margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
/* Line icons inside panels default to text size; specific components below override this. */
:where(.panel, .big-toggle) svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; flex: none; }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strike { text-decoration: line-through; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; left: 0; top: 0; }
.tbl-wrap, .chips, .hscroll, .seg, .suggest, .sheet, .panel, .field, .searchbox, td { position: relative; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }

.page { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px 110px; }
@media (min-width: 900px) { .page { padding-block: 20px 60px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 15px; background: var(--brand); color: var(--brand-ink); transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn > svg:not([width]) { width: 20px; height: 20px; flex: none; } /* icons without a set size (Use my current location, Choose on map) */
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.subtle { background: var(--surface-2); color: var(--ink); }
.btn.subtle:hover { background: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.offer { background: var(--offer); color: var(--offer-ink); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.iconbtn svg { width: 20px; height: 20px; }
.link { color: var(--brand); font-weight: 600; background: none; border: 0; padding: 0; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr-in { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 800; font-size: 24px; color: var(--brand); letter-spacing: -.3px; }
.logo svg { width: 34px; height: 34px; flex: none; }
/* Small phones: a longer brand name (BRAND_NAME) must leave room for the delivery time. */
@media (max-width: 399px) { .hdr-in .logo { font-size: 19px; gap: 6px; } .hdr-in .logo svg { width: 28px; height: 28px; } .hdr-in { column-gap: 10px; } }
@media (max-width: 359px) { .loc-eta small { display: none; } }
@media (max-width: 399px) { .hide-xs { display: none; } }
.loc { display: flex; flex-direction: column; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 6px; border-radius: 10px; }
.loc:hover { background: var(--surface-2); }
.loc-eta { font-family: var(--f-display); font-weight: 700; font-size: 17px; line-height: 1.1; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.loc-eta small { font-family: var(--f-body); font-weight: 500; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.loc-addr { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.loc-addr b { color: var(--ink); font-weight: 600; }
.hdr-actions { display: flex; gap: 8px; grid-column: 3; grid-row: 1; }
.hdr-actions .acct { display: none; }
@media (min-width: 900px) { .hdr-actions { grid-column: 4; } .hdr-actions .acct { display: inline-grid; } }
[hidden] { display: none !important; }
.search-wrap { grid-column: 1 / -1; position: relative; }
.searchbox { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.searchbox:focus-within { border-color: var(--brand); background: var(--surface); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; height: 100%; }
.searchbox svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cartbtn { position: relative; }
.badge-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--offer); color: var(--offer-ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.desk-nav { display: none; }
@media (min-width: 900px) {
  .hdr-in { grid-template-columns: auto minmax(180px, 260px) 1fr auto; }
  .search-wrap { grid-row: 1; grid-column: 3; }
  .desk-nav { display: flex; gap: 4px; }
  .desk-nav a { padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
  .desk-nav a.on, .desk-nav a:hover { color: var(--brand); background: var(--brand-soft); }
}
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: min(70vh, 460px); overflow: auto; z-index: 70; padding: 6px; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; width: 100%; background: none; border: 0; text-align: left; min-height: 44px; }
.suggest-item:hover, .suggest-item.on { background: var(--surface-2); }
.suggest-item .art { width: 38px; height: 38px; border-radius: 8px; background: var(--tile); flex: none; display: grid; place-items: center; overflow: hidden; }
.suggest-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 8px 8px 4px; font-weight: 600; }

/* ---------- Bottom nav ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative; }
.bnav a svg { width: 22px; height: 22px; }
.bnav a.on { color: var(--brand); }
.bnav a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
@media (min-width: 900px) { .bnav { display: none; } }

.cartbar { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 54; background: var(--brand); color: var(--brand-ink); border-radius: 14px; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: rise .25s ease-out; }
.cartbar .grow b { display: block; font-size: 15px; }
.cartbar .grow { min-width: 0; }
.cartbar .grow span { font-size: 12.5px; opacity: .85; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar .btn { background: var(--brand-ink); color: var(--brand); }
@media (min-width: 900px) { .cartbar { left: auto; right: 24px; bottom: 24px; width: 340px; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Sections ---------- */
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 21px; }
.sec-h p { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.demo-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 900px) { .hscroll { grid-auto-columns: 176px; margin-inline: 0; padding-inline: 0; } }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } }

/* ---------- Product card ---------- */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.pcard .pimg { aspect-ratio: 1; max-width: 100%; border-radius: 10px; background: var(--tile); display: grid; place-items: center; overflow: hidden; position: relative; }
.pcard .pimg svg { width: 82%; height: 82%; }
.pcard .off { position: absolute; top: 0; left: 8px; background: var(--offer); color: var(--offer-ink); font-weight: 800; font-size: 10.5px; line-height: 1.1; padding: 5px 5px 7px; border-radius: 0 0 6px 6px; text-align: center; z-index: 1; }
.pcard .wish { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; z-index: 1; }
.pcard .wish svg { width: 16px; height: 16px; }
.pcard .wish.on { color: var(--bad); }
.pcard .eta { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 2px 6px; align-self: flex-start; text-transform: uppercase; letter-spacing: .3px; }
.pcard .pname { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard .punit { font-size: 12.5px; color: var(--muted); }
.pcard .pfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; }
.price { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.mrp { font-size: 12px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.oos { opacity: .55; }
.oos-label { position: absolute; inset: auto 8px 8px 8px; background: var(--surface); color: var(--bad); font-weight: 700; font-size: 11.5px; text-align: center; padding: 4px; border-radius: 6px; border: 1px solid var(--line); }

.add { min-width: 72px; height: 36px; border-radius: 9px; border: 1.5px solid var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13.5px; letter-spacing: .3px; display: inline-flex; align-items: center; justify-content: center; }
.add:hover { background: var(--brand); color: var(--brand-ink); }
.add[disabled] { border-color: var(--line); color: var(--muted); background: var(--surface-2); cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; height: 36px; min-width: 84px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-weight: 700; overflow: hidden; }
.qty button { width: 30px; height: 100%; border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; }
.qty span { flex: 1; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.qty.lg { height: 44px; min-width: 120px; }
.qty.lg button { width: 42px; }

.veg { width: 14px; height: 14px; border: 1.5px solid var(--veg); display: inline-grid; place-items: center; border-radius: 2px; flex: none; }
.veg::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--veg); }
.veg.non { border-color: var(--nonveg); }
.veg.non::after { border-radius: 0; width: 0; height: 0; background: none; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--nonveg); }

/* ---------- Banners ---------- */
.carousel { position: relative; margin-top: 12px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; border-radius: var(--r-lg); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; border-radius: var(--r-lg); padding: 18px; min-height: 168px; display: grid; grid-template-columns: 1fr 42%; gap: 8px; align-items: center; overflow: hidden; position: relative; }
.slide h3 { font-size: 23px; line-height: 1.08; }
.slide p { font-size: 13.5px; margin-top: 6px; opacity: .9; }
.slide .btn { margin-top: 12px; min-height: 38px; font-size: 14px; }
.slide .bart { display: grid; place-items: center; }
.slide .bart svg { width: 100%; max-width: 190px; height: auto; }
@media (min-width: 900px) { .slide { flex-basis: calc(50% - 5px); min-height: 200px; padding: 24px; } .slide h3 { font-size: 27px; } }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: var(--line); transition: width .2s; }
.dots button.on { width: 22px; background: var(--brand); }
.car-ctl { position: absolute; top: 50%; transform: translateY(-70%); width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: none; place-items: center; box-shadow: var(--shadow); z-index: 2; }
.car-ctl svg { width: 18px; height: 18px; }
.car-ctl.prev { left: -14px; } .car-ctl.next { right: -14px; }
@media (min-width: 900px) { .car-ctl { display: grid; } }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
@media (min-width: 560px) { .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.2; }
.cat .cimg { width: 100%; aspect-ratio: 1; max-width: 100%; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.cat .cimg svg { width: 86%; height: 86%; }
.cat:hover .cimg { box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- Rider delivery ---------- */
.gpsbar { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 12px; margin-bottom: 12px; background: var(--surface-2); color: var(--ink); }
.gpsbar svg { width: 16px; height: 16px; flex: none; }
.gpsbar.ok { background: var(--brand-soft); color: var(--brand); }
.gpsbar.warn { background: var(--offer-soft); color: var(--ink); }
.gpsbar.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
#gpsm .gpsbar { margin: 0; }
.ract { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ract .btn svg { width: 16px; height: 16px; }
.danger-text { color: var(--bad); }
.rwait { font-size: 13px; line-height: 1.45; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); }
.rwait svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
#navgo { min-height: 52px; font-size: 16px; }

/* ---------- Food merchandising (home) ---------- */
.svc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.svc-tile { position: relative; min-height: 132px; border-radius: 20px; overflow: hidden; padding: 14px 14px 12px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; box-shadow: var(--shadow, 0 6px 20px -12px rgba(0,0,0,.35)); transition: transform .15s; }
.svc-tile:active { transform: scale(.98); }
.svc-tile.food { background: linear-gradient(150deg, #FFE7C7, #FFD3A1); color: #3A1D05; }
.svc-tile.groc { background: linear-gradient(150deg, #DDF3E4, #BFE6CC); color: #0B3B25; }
.svc-t { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.svc-t b { font-family: var(--f-display); font-size: 22px; line-height: 1.05; font-weight: 800; }
.svc-eta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.svc-t em { font-style: normal; font-size: 11.5px; font-weight: 600; opacity: .8; margin-top: 4px; line-height: 1.25; max-width: calc(100% - 56px); } /* clear of the photo */
.svc-img { position: absolute; right: -14px; bottom: -14px; width: 74px; height: 74px; border-radius: 50%; overflow: hidden; z-index: 0; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(255,255,255,.55); }
.svc-img img.photo { position: absolute; inset: 0; }
.svc-img svg { width: 80%; height: 80%; }
@media (min-width: 420px) { .svc-img { width: 92px; height: 92px; } .svc-t em { max-width: calc(100% - 76px); } }
@media (min-width: 760px) { .svc-tile { min-height: 150px; padding: 18px 20px; } .svc-t b { font-size: 26px; } .svc-img { width: 130px; height: 130px; right: 10px; bottom: -24px; } .svc-t em { max-width: calc(100% - 150px); } }
.cartbar .nudge { display: block; height: 3px; border-radius: 2px; margin-top: 4px; background: linear-gradient(90deg, #fff var(--p), rgba(255,255,255,.28) var(--p)); }
.pcard .eta.fast { color: var(--brand); background: var(--brand-soft); }
.food-hero { margin: 6px 0 14px; }
.food-hero h1 { font-size: 28px; line-height: 1.15; margin-top: 4px; letter-spacing: -.3px; }
.food-hero p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.food-hero p b { color: var(--brand); }
.cravings { display: grid; grid-auto-flow: column; grid-auto-columns: 76px; gap: 12px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.cravings::-webkit-scrollbar { display: none; }
.crave { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; text-align: center; }
.crave .cimg { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.crave .cimg svg { width: 80%; height: 80%; }
.crave:hover .cimg { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.hscroll.dishes { grid-auto-columns: 168px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.dcard .dimg { aspect-ratio: 4/3; position: relative; display: grid; place-items: center; overflow: hidden; }
.dcard .dimg svg { width: 80%; height: 80%; }
.dcard .dimg img.photo { position: absolute; inset: 0; }
.dtag { position: absolute; left: 8px; top: 8px; z-index: 1; background: var(--offer, #E8892B); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.dbody { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.dname { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; line-height: 1.25; min-height: 35px; }
.dname .veg { margin-top: 2px; }
.dname b { font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmeta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dstar { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.dfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 6px; }
.dfoot .add { min-width: 64px; }
.dfoot .qty { transform-origin: right bottom; }
.hscroll.offers { grid-auto-columns: 250px; }
.offer-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--offer-soft); border: 1px dashed color-mix(in srgb, var(--offer) 55%, transparent); min-height: 68px; }
.offer-card b { display: block; font-size: 14px; color: var(--ink); line-height: 1.25; }
.offer-card .small { display: block; }
.offer-card .oimg { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; position: relative; }
.offer-card .oimg img.photo { position: absolute; inset: 0; }
.offer-card .oimg svg { width: 80%; height: 80%; }
.offer-card.code > svg { width: 22px; height: 22px; flex: none; color: var(--offer); }
.aisle-break { margin: 30px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.aisle-break h2 { font-size: 22px; margin-top: 2px; }
.aisle-break p { color: var(--muted); font-size: 14px; }
.rcard.closed, .krow.closed { opacity: .6; }
.sec-h > a { white-space: nowrap; }
.klist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
@media (min-width: 760px) { .klist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; } }
.krow { min-width: 0; display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.krow:last-child { border-bottom: 0; }
.krow .kimg { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; flex: none; position: relative; display: grid; place-items: center; }
.krow .kimg img.photo { position: absolute; inset: 0; }
.krow .kimg svg { width: 80%; height: 80%; }
.krow b { display: block; font-size: 16px; line-height: 1.25; }
.kmeta { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.koffer { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--offer) 70%, var(--ink)); } /* plain orange is too faint for small text */

/* ---------- Chips & filters ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.select { min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; }

/* ---------- Restaurants ---------- */
.rgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.rcard .rimg { aspect-ratio: 16/8; max-width: 100%; display: grid; place-items: center; position: relative; }
.rcard .rimg svg { height: 86%; width: auto; }
.rcard .rbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.rating { display: inline-flex; align-items: center; gap: 3px; background: var(--ok); color: #fff; font-weight: 700; font-size: 12.5px; padding: 1px 7px; border-radius: 6px; }
.rcard .rtag { position: absolute; left: 10px; bottom: 10px; background: var(--surface); color: var(--ink); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.menu-item { display: grid; grid-template-columns: 1fr 112px; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.menu-item .mimg { width: 112px; aspect-ratio: 1; max-width: 100%; border-radius: 12px; display: grid; place-items: center; position: relative; }
.menu-item .mimg svg { width: 80%; height: 80%; }
.menu-item .mimg .add, .menu-item .mimg .qty { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); box-shadow: var(--shadow); background: var(--surface); }
.menu-item .mimg .qty { background: var(--brand); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.panel h3 { font-size: 17px; }
.panel + .panel { margin-top: 12px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 3px 0; }
.kv span:last-child { font-variant-numeric: tabular-nums; }
.kv.total { font-weight: 700; font-size: 16px; padding-top: 8px; }
.kv.save span:last-child { color: var(--ok); font-weight: 600; }
/* Delivery location sheet: search, then grouped rows like a phone settings list. */
.loc-search { margin-bottom: 14px; }
.loc-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.loc-list + .loc-list { margin-top: 12px; }
.loc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 11px 14px; background: none; border: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.loc-row + .loc-row, .loc-list > div + .loc-row { border-top: 1px solid var(--line); }
.loc-row:hover, .loc-row:focus-visible { background: var(--surface-2); }
.loc-row b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.loc-row.brand b { color: var(--brand); }
.loc-row.on { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.loc-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.loc-meta { display: block; font-size: 12px; margin-top: 3px; color: var(--muted); }
.loc-bad { color: var(--bad); font-weight: 600; }
.loc-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.loc-ic svg { width: 19px; height: 19px; }
.loc-row.brand .loc-ic, .loc-ic.brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.loc-row.busy .loc-ic svg { animation: locpulse 1s ease-in-out infinite; }
@keyframes locpulse { 50% { opacity: .35; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .loc-row.busy .loc-ic svg { animation: none; } }
.loc-end { flex: none; color: var(--muted); display: grid; }
.loc-end svg { width: 18px; height: 18px; }
.loc-row.on .loc-end { color: var(--brand); }
.loc-card { padding: 4px 14px 14px 64px; }
.loc-h { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin: 20px 4px 8px; }
.loc-fees { margin-top: 16px; font-size: 13px; color: var(--muted); }
.loc-fees summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 4px; }
.loc-fees summary::-webkit-details-marker { display: none; }
.loc-fees summary svg { width: 16px; height: 16px; flex: none; }
.loc-fees[open] summary .link { visibility: hidden; }
.fee-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.fee-table td { padding: 6px 10px; border-top: 1px solid var(--line); color: var(--ink); }
.fee-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 359px) { .loc-card { padding-left: 14px; } .svc-tile { padding: 12px; } .svc-t b { font-size: 19px; } .svc-eta { font-size: 11.5px; } }
.note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.alert.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.alert.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.alert.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .two-col > aside { position: sticky; top: 90px; } }

.line-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.line-item + .line-item { border-top: 1px solid var(--line); }
.line-item .art { width: 56px; height: 56px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; }
.line-item .art svg { width: 84%; height: 84%; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { min-height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 15px; width: 100%; }
.field textarea { padding: 10px 12px; min-height: 70px; }
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.field .err { color: var(--bad); font-size: 12.5px; }
.field.invalid input { border-color: var(--bad); }
.fgrid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.fgrid .full { grid-column: 1 / -1; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; min-height: 56px; }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.radio-card input { accent-color: var(--brand); width: 18px; height: 18px; }
.radio-card[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---------- Dialog / sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,14,12,.45); z-index: 200; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 700px) { .scrim { align-items: center; } }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); animation: rise .2s ease-out; }
@media (min-width: 700px) { .sheet { border-radius: 20px; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-h h2 { font-size: 20px; }
@keyframes fade { from { opacity: 0; } }

.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(138px + env(safe-area-inset-bottom, 0px)); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 900px) { .toast-wrap { bottom: 30px; left: 30px; transform: none; } }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: 18px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1fr 1fr; gap: 36px; } }
.pdp-img { aspect-ratio: 1; max-width: 100%; border-radius: var(--r-lg); background: var(--tile); display: grid; place-items: center; position: relative; }
.pdp-img svg { width: 70%; height: 70%; }
.variant { min-width: 92px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-height: 56px; }
.variant.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.variant b { display: block; font-size: 14px; }
.variant span { font-size: 12.5px; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.crumbs a:hover { color: var(--brand); }

/* ---------- Maps ---------- */
.map { position: relative; width: 100%; height: 300px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--map-land); z-index: 0; }
.map.tall { height: 420px; }
.map.xl { height: min(70vh, 640px); }
.map .leaflet-container { width: 100%; height: 100%; background: var(--map-land); font-family: var(--f-body); }
.map-badge { position: absolute; z-index: 500; top: 10px; left: 58px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.map-badge > * { pointer-events: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.map-recenter { position: absolute; z-index: 500; right: 10px; bottom: 28px; }
.map-state { position: absolute; inset: 0; display: grid; place-items: center; background: var(--map-land); z-index: 600; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 88%, transparent) !important; color: var(--muted) !important; font-size: 10.5px !important; }
.leaflet-control-attribution a { color: var(--brand) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.pin { width: 34px; height: 34px; display: grid; place-items: center; }
.pin span { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin span i { transform: rotate(45deg); font-style: normal; font-size: 12px; font-weight: 800; color: #fff; }
.pin.store span { background: #0D5A3A; }
.pin.home span { background: #E5870A; }
.pin.dest span { background: #B42D2D; }
.dot-rider { width: 26px; height: 26px; border-radius: 50%; background: #2A5DB0; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(42,93,176,.25), 0 2px 6px rgba(0,0,0,.3); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.dot-rider.idle { background: #6B7280; box-shadow: 0 0 0 4px rgba(107,114,128,.2), 0 2px 6px rgba(0,0,0,.3); }
.center-pin { position: absolute; left: 50%; top: 50%; z-index: 550; transform: translate(-50%, -100%); pointer-events: none; }

/* ---------- Tracking ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.step::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.step.done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.step.done::before { background: var(--brand); }
.step.now .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.step .dot svg { width: 12px; height: 12px; }
.step b { font-size: 14.5px; }
.otp { font-family: var(--f-display); font-size: 28px; letter-spacing: 8px; font-weight: 800; color: var(--brand); }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.pill.info { color: var(--info); background: color-mix(in srgb, var(--info) 12%, var(--surface)); }
.pill.brand { color: var(--brand); background: var(--brand-soft); }

/* ---------- Ops portals ---------- */
.ops { min-height: 100%; display: grid; grid-template-columns: 1fr; }
.ops-side { display: none; }
@media (min-width: 900px) {
  .ops { grid-template-columns: 232px minmax(0, 1fr); }
  .ops-side { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
  .ops-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
  .ops-side a svg { width: 18px; height: 18px; }
  .ops-side a.on, .ops-side a:hover { background: var(--brand-soft); color: var(--brand); }
  .ops-tabs { display: none !important; }
}
.ops-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.ops-top-in { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.ops-tabs { display: flex; gap: 6px; overflow-x: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 10px; scrollbar-width: none; }
.ops-main { min-width: 0; }
.ops-main .page { max-width: 1240px; padding-block: 16px 60px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.kpi .eyebrow { font-size: 10.5px; }
.kpi b { display: block; font-family: var(--f-display); font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.kanban { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kcol { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kcol h3 { font-size: 15px; display: flex; justify-content: space-between; padding: 2px 4px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ocard.urgent { box-shadow: inset 4px 0 0 var(--offer); }
.rider-shell { max-width: 520px; margin: 0 auto; }
.big-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.switch { width: 54px; height: 32px; border-radius: 16px; background: var(--line); border: 0; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { left: 25px; }

.empty { text-align: center; padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 120px; height: 120px; }
.empty h3 { font-size: 19px; }
.login-shell { min-height: 100%; display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 40px; }
.login-card { width: 100%; max-width: 400px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.portal-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.portal-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.portal-card .pi { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.portal-card .pi svg { width: 26px; height: 26px; }
.footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.footer a { color: var(--brand); font-weight: 600; }

/* ---------- Haat AI ---------- */
.ai-spark { width: 18px; height: 18px; flex: none; color: var(--offer); }
.ops-side a .ai-spark { width: 18px; height: 18px; }
.ai-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); flex: none; }
.ai-badge .ai-spark { width: 20px; height: 20px; color: #F2A33A; }
.ai-badge.lg { width: 56px; height: 56px; border-radius: 16px; }
.ai-badge.lg .ai-spark { width: 32px; height: 32px; }
.ai-btn { background: var(--ink); color: var(--bg); }
.ai-btn:hover { background: var(--brand-2); color: var(--brand-ink); }
.ai-btn .ai-spark { color: #F2A33A; }
.ai-card { display: block; background: var(--surface); border: 1px solid color-mix(in srgb, var(--offer) 45%, var(--line)); border-radius: var(--r-lg); padding: 14px; }
.ai-card + .ai-card, .ai-card:has(+ div) { margin-top: 0; }
.ai-card.row { display: flex; }
.ai-card > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.ai-why { display: flex; gap: 4px; align-items: center; color: var(--muted); }
.ai-why .ai-spark { width: 12px; height: 12px; }
.ai-err { color: var(--bad); font-size: 13.5px; }
.ai-thinking { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.ai-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--offer); animation: aidot 1s infinite ease-in-out; }
.ai-thinking i:nth-child(2) { animation-delay: .15s; } .ai-thinking i:nth-child(3) { animation-delay: .3s; margin-right: 4px; }
@keyframes aidot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.ai-hero { background: var(--surface); border: 1px solid color-mix(in srgb, var(--offer) 45%, var(--line)); border-radius: var(--r-lg); padding: 16px; }
.ai-hero h2 { font-size: 21px; margin-top: 8px; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form input, .ai-form textarea { flex: 1; min-width: 0; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 11px 12px; font-size: 15px; resize: none; line-height: 1.35; }
.ai-form input:focus, .ai-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ai-form .btn { min-height: 46px; }
.ai-fab { position: fixed; z-index: 56; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(136px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px 0 12px; border-radius: 23px; border: 0; background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow-lg); }
.ai-fab .ai-spark { width: 20px; height: 20px; color: #F2A33A; }
body:has(#cartbar[hidden]) .ai-fab { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .ai-fab, body:has(#cartbar[hidden]) .ai-fab { bottom: 24px; right: 24px; } body:has(#cartbar:not([hidden])) .ai-fab { bottom: 104px; } }
body.ai-open .ai-fab { display: none; }
/* Pages with their own AI card (cart, checkout, tracking) don't need the floating button; once scrolled it shrinks to an icon. */
body[data-page="cart"] .ai-fab, body[data-page="checkout"] .ai-fab, body[data-page="track"] .ai-fab { display: none; }
.ai-fab { transition: padding .2s, gap .2s, transform .25s, opacity .25s; }
.ai-fab.away { transform: translateY(24px); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ai-fab { transition: none; } }
.ai-fab.mini { padding: 0; width: 46px; justify-content: center; gap: 0; }
.ai-fab.mini span { display: none; }
/* Pinned main action (Checkout / Pay) on phones while the real button is scrolled away. */
.actbar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); z-index: 55; padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.actbar .btn { min-height: 50px; font-size: 16px; }
@media (min-width: 900px) { .actbar { display: none; } }
.ai-drawer { position: fixed; z-index: 150; inset: 0; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); animation: rise .2s ease-out; }
@media (min-width: 760px) { .ai-drawer { inset: 12px 12px 12px auto; width: 420px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; } }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.ai-log { flex: 1; overflow-y: auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-log.inline { max-height: 460px; padding: 12px 0 0; }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg ul { margin: 4px 0; padding-left: 18px; }
.ai-acts { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ok); }
.ai-acts span { display: flex; gap: 5px; align-items: flex-start; }
.ai-acts svg { margin-top: 3px; flex: none; }
.ai-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 8px; }
.ai-hello { margin: auto; text-align: center; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ai-hello h3 { font-size: 19px; }
.ai-panel .ai-msg { max-width: 100%; }
#ai-photo-l { cursor: pointer; width: 46px; height: 46px; }
.loc { overflow: hidden; max-width: 100%; }
.loc-addr { min-width: 0; max-width: 100%; }
.ai-form .btn svg, #ai-send svg { width: 20px; height: 20px; }
.two-col { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 380px; } }

/* ---------- base (standalone site) ---------- */
html, body { margin: 0; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); color-scheme: light; }
img { max-width: 100%; }
span > svg[viewBox="0 0 100 100"], .art > svg[viewBox="0 0 100 100"] { width: 84%; height: 84%; }

/* ---------- real photos ---------- */
img.photo { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--tile); }
.pcard .pimg, .cat .cimg, .rcard .rimg, .menu-item .mimg, .pdp-img, .line-item .art { overflow: hidden; }
.pdp-img img.photo { border-radius: var(--r-lg); }
.menu-item .mimg { overflow: visible; }
.menu-item .mimg img.photo { border-radius: 12px; }
.rcard .rimg img.photo { position: absolute; inset: 0; }
.rcard .rimg .rtag { z-index: 1; }

/* Raster tile servers have no dark style: dim their tiles in dark mode. (The own PMTiles map switches to a real dark style instead.) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-raster .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.55); } }
:root[data-theme="dark"] .map-raster .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.55); }
