/* M Snack food delivery app */
:root {
  --font: "DM Sans", Inter, system-ui, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --bg: #fff7ee;
  --card: #ffffff;
  --ink: #1e1611;
  --ink-2: #7a6c62;
  --line: #f0e3d3;
  --accent: #ff5b14;
  --accent-ink: #ffffff;
  --soft: #ffe9d9;
  --sheet: #fffaf5;
}
.muted { color: var(--ink-2); font-size: 14px; }
.muted.small { font-size: 13px; }
h1, h2, .h2 { font-family: var(--display); letter-spacing: -0.02em; }
h2, .h2 { font-size: 20px; font-weight: 700; }
.h2.pad { padding: 22px 20px 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; border-radius: var(--r-btn); font-weight: 700; font-size: 16px; }
.btn.main { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 24px -12px rgba(255, 91, 20, 0.7); }
.btn.plain { color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: #fff; color: var(--accent); font-size: 12px; font-weight: 700; }
.tag.soft { background: var(--soft); }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.link { color: var(--accent); font-weight: 700; font-size: 14px; min-height: 44px; }
.iconbtn.soft { background: #fff; box-shadow: 0 1px 2px rgba(30, 22, 17, 0.08); }
.row-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 10px; }

/* Splash */
.splash { background: var(--bg); display: grid; place-items: center; }
.splash-in { display: grid; justify-items: center; gap: 10px; padding: 0 30px; text-align: center; }
.s-logo { width: 190px; }
.s-burger { width: 250px; margin-top: 10px; filter: drop-shadow(0 26px 20px rgba(120, 60, 10, 0.25)); }
.s-line { font-family: var(--display); font-size: 20px; font-weight: 600; max-width: 260px; line-height: 1.25; }

/* Auth */
.auth-hero {
  height: 330px; margin-top: calc(var(--top) * -1); display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #ff8a4c 0%, var(--accent) 55%, #e2470a 100%);
  border-radius: 0 0 40px 40px;
}
.auth-hero img { width: 320px; margin-bottom: -26px; filter: drop-shadow(0 24px 24px rgba(80, 20, 0, 0.35)); }
.auth-body { display: grid; gap: 12px; padding: 26px 22px; }
.auth-body h1 { font-size: 32px; }
.field { display: grid; gap: 8px; margin-top: 6px; }
.lbl { font-size: 13px; font-weight: 700; }
.input { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); transition: border-color 0.2s; }
.input b { font-weight: 700; padding-right: 10px; border-right: 1px solid var(--line); }
.input input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; min-width: 0; letter-spacing: 0.02em; }
.input:focus-within { border-color: var(--ink); }
.err { font-size: 13px; color: #c8321b; font-weight: 600; display: none; }
.field.bad .input { border-color: #c8321b; }
.field.bad .err { display: block; }
[data-os="android"] .input { border-radius: 4px 4px 0 0; border: 0; border-bottom: 2px solid #b9a898; background: #fbeee2; }
.otp { display: grid; grid-template-columns: repeat(4, 64px); gap: 12px; margin: 14px 0 4px; }
.otp span { height: 72px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 32px; font-weight: 700; }
.otp span.on { border-color: var(--accent); }

/* Home */
.where { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 12px; }
.addr { display: grid; text-align: left; line-height: 1.25; }
.addr b { display: inline-flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 700; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; margin: 0 20px; padding: 0 16px; border-radius: 16px; background: #fff; color: var(--ink-2); font-size: 15px; width: calc(100% - 40px); border: 1px solid var(--line); }
[data-os="android"] .search { border-radius: 999px; }
.field-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); min-width: 0; }
.promo {
  position: relative; display: flex; align-items: center; margin: 16px 20px 0; height: 168px; padding: 20px; border-radius: 26px; overflow: hidden; text-align: left;
  background: radial-gradient(90% 120% at 100% 50%, #ff8a4c, var(--accent) 60%); color: #fff; width: calc(100% - 40px);
}
.promo > div { position: relative; z-index: 1; display: grid; gap: 8px; justify-items: start; max-width: 54%; }
.promo h2 { font-size: 24px; line-height: 1.05; }
.cta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 14px; }
.promo img { position: absolute; right: -36px; bottom: -14px; width: 236px; filter: drop-shadow(0 18px 18px rgba(80, 20, 0, 0.35)); transition: transform 0.6s var(--ease); }
.promo:hover img { transform: rotate(-4deg) scale(1.03); }
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar, .rail::-webkit-scrollbar, .cat-tabs::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 82px; display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.cat span { width: 76px; height: 76px; border-radius: 24px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.cat img { width: 64px; height: 64px; object-fit: contain; transition: transform 0.4s var(--ease); }
.cat:hover img { transform: scale(1.08) rotate(-6deg); }
[data-os="android"] .cat span { border-radius: 50%; }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: 0 20px; }
.wide-card { flex: none; width: 250px; scroll-snap-align: start; background: #fff; border-radius: 22px; overflow: hidden; text-align: left; border: 1px solid var(--line); }
.wide-card .ph { height: 140px; overflow: hidden; background: radial-gradient(70% 80% at 50% 60%, #fff8 0%, transparent 70%), var(--tint, #fbf1e5); }
.wide-card img { width: 100%; height: 100%; object-fit: contain; padding: 8px 0 4px; transition: transform 0.5s var(--ease); }
.wide-card:hover img, .tile:hover img { transform: scale(1.06) rotate(-3deg); }
.wide-card div:last-child { display: grid; gap: 2px; padding: 12px 14px 14px; }
.wide-card b, .tile b { font-size: 15px; font-weight: 700; }
.price { font-family: var(--display); font-weight: 700; font-size: 17px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.tile { position: relative; display: grid; gap: 4px; background: #fff; border-radius: 22px; padding: 10px 10px 14px; text-align: left; border: 1px solid var(--line); }
.tile .ph { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: radial-gradient(70% 70% at 50% 55%, #fff8 0%, transparent 70%), var(--tint, #fbf1e5); margin-bottom: 6px; }
.tile img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform 0.5s var(--ease); }
.tile .row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.tile b { padding: 0 4px; }
.tile small { padding: 0 4px; color: var(--ink-2); font-size: 12px; }
.plus { width: 34px; height: 34px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; }
[data-os="android"] .plus { border-radius: 50%; }

/* Menu */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 6px; scrollbar-width: none; }
.cat-tabs button { flex: none; height: 38px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.cat-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.list { list-style: none; display: grid; gap: 10px; padding: 10px 20px; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; background: #fff; border-radius: 20px; text-align: left; border: 1px solid var(--line); }
.item img { width: 84px; height: 84px; border-radius: 14px; object-fit: contain; padding: 6px; flex: none; background: var(--tint, #fbf1e5); }
.item div { flex: 1; display: grid; gap: 3px; min-width: 0; }
.item b { font-size: 16px; font-weight: 700; }
.item small { font-size: 13px; color: var(--ink-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }

/* Product */
.product { padding-top: 0; display: flex; flex-direction: column; padding-bottom: 0; }
.p-hero { position: relative; height: 380px; flex: none; display: grid; place-items: center; background: radial-gradient(80% 70% at 50% 55%, #fff 0%, #ffe9d6 70%, #ffd9bd 100%); }
.p-hero .bar { position: absolute; top: var(--top); left: 0; right: 0; z-index: 2; padding: 0 16px; }
.p-hero img { width: 290px; max-height: 270px; object-fit: contain; margin-top: 40px; filter: drop-shadow(0 26px 22px rgba(120, 60, 10, 0.28)); }
.p-hero img.photo { width: 100%; height: 100%; max-height: none; object-fit: cover; margin: 0; filter: none; }
.p-body { flex: 1; display: grid; align-content: start; gap: 10px; padding: 22px 20px; margin-top: -26px; background: var(--bg); border-radius: 30px 30px 0 0; position: relative; }
.p-body h1 { font-size: 30px; line-height: 1.05; }
.facts { display: flex; gap: 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.p-body .h2 { margin-top: 8px; font-size: 17px; }
.sizes { display: grid; gap: 8px; }
.size { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; }
.size[aria-checked="true"] { border-color: var(--accent); background: #fff3ea; }
.size .r { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbb9a8; margin-right: 10px; display: inline-block; vertical-align: -4px; }
.size[aria-checked="true"] .r { border: 6px solid var(--accent); }
.p-foot { position: sticky; bottom: 0; display: flex; gap: 12px; padding: 12px 20px calc(var(--bottom) + 10px); background: linear-gradient(transparent, var(--bg) 24%); }
.qty { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 6px; border-radius: var(--r-btn); background: #fff; border: 1px solid var(--line); flex: none; }
.qty button { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.qty b { min-width: 22px; text-align: center; font-size: 17px; }
.fly { position: absolute; z-index: 85; pointer-events: none; object-fit: contain; }

/* Cart */
.lines { list-style: none; display: grid; gap: 10px; padding: 6px 20px; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.line img { width: 70px; height: 70px; border-radius: 14px; object-fit: contain; padding: 5px; flex: none; background: var(--tint, #fbf1e5); }
.line > div:not(.qty) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.line b { font-size: 15px; }
.line small { color: var(--ink-2); font-size: 13px; }
.line .qty { height: 40px; border: 0; background: var(--bg); }
.line .qty button { width: 32px; height: 32px; }
.sum { margin: 16px 20px; padding: 16px 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: grid; gap: 10px; font-size: 15px; }
.sum div { display: flex; justify-content: space-between; }
.sum .total { padding-top: 10px; border-top: 1px dashed var(--line); font-weight: 800; font-size: 18px; font-family: var(--display); }
.cart-cta { padding: 0 20px; }
.empty-cart { display: grid; justify-items: center; gap: 12px; padding: 40px 30px; text-align: center; }
.empty-cart img { width: 200px; opacity: 0.95; }

/* Tracking */
.track { padding-top: 0; background: #f4eadc; display: flex; flex-direction: column; padding-bottom: 0; }
.map { position: relative; height: 440px; flex: none; }
.map svg { width: 100%; height: 100%; display: block; }
.map-bar { position: absolute; top: var(--top); left: 0; right: 0; padding: 0 16px; }
.track-card { flex: 1; margin-top: -30px; position: relative; padding: 22px 20px calc(var(--bottom) + 12px); background: var(--bg); border-radius: 30px 30px 0 0; display: grid; align-content: start; gap: 18px; }
.eta { display: flex; justify-content: space-between; align-items: center; }
.eta div { display: grid; }
.eta strong { font-family: var(--display); font-size: 34px; letter-spacing: -0.03em; line-height: 1.05; }
.eta .tag { background: var(--soft); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.steps li { display: grid; gap: 8px; }
.steps i { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.steps li.done i { background: var(--accent); }
.steps li.on { color: var(--ink); }
.steps li.on i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: fill 2.6s ease-in-out infinite; }
.steps li.done { color: var(--ink); }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rider-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.rider-card div { flex: 1; display: grid; }
.face { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.live-card { margin: 4px 20px 0; padding: 16px; border-radius: 22px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 14px; text-align: left; width: calc(100% - 40px); }
.live-card div { flex: 1; display: grid; gap: 2px; }
.live-card .muted { color: rgba(255, 255, 255, 0.6); }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 6px rgba(61, 220, 132, 0.2); flex: none; }
.past { list-style: none; display: grid; gap: 10px; padding: 0 20px; }
.past li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.past img { width: 60px; height: 60px; object-fit: contain; flex: none; }
.past div { flex: 1; display: grid; gap: 2px; }
.past b { font-size: 15px; }

/* Tabs */
.tabs {
  position: absolute; z-index: 60; left: 20px; right: 20px; bottom: calc(var(--bottom) - 4px);
  display: grid; grid-template-columns: repeat(4, 1fr); height: 66px; padding: 0 6px; border-radius: 24px;
  background: #fff; box-shadow: 0 18px 40px -18px rgba(120, 60, 10, 0.4), 0 0 0 1px var(--line); color: #a8988b;
}
.tab { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 700; }
.tab em { font-style: normal; }
.tab .pill { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 14px; transition: background 0.25s; }
.tab[aria-current="true"] { color: var(--accent); }
.badge { position: absolute; top: -6px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.badge[data-n="0"] { display: none; }
[data-os="android"] .tabs { left: 0; right: 0; bottom: 0; height: calc(80px + var(--bottom)); padding-bottom: var(--bottom); border-radius: 0; box-shadow: 0 -1px 0 var(--line); background: #fffaf5; }
[data-os="android"] .tab .pill { width: 60px; height: 32px; border-radius: 16px; }
[data-os="android"] .tab[aria-current="true"] { color: var(--ink); }
[data-os="android"] .tab[aria-current="true"] .pill { background: var(--soft); color: #b13a05; }
[data-os="android"] .scr.has-tabs { padding-bottom: calc(var(--bottom) + 104px); }

/* Sheets */
.addr-list { display: grid; gap: 8px; margin-bottom: 16px; }
.addr-opt { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); text-align: left; }
.addr-opt span { display: grid; }
.addr-opt small { color: var(--ink-2); font-size: 13px; }
.addr-opt[aria-checked="true"] { border-color: var(--accent); background: #fff3ea; }

/* drawn illustrations keep their own ratio */
img[data-art], .p-hero img { height: auto; }
