/* ==========================================================
   Customer app — one small stylesheet, no frameworks
   ========================================================== */
:root {
    --brand: #D92D20;
    --brand-dark: #B42318;
    --brand-soft: #FEF1EE;
    --ink: #1C1C1C;
    --ink-2: #5E5E66;
    --ink-3: #9C9CA3;
    --line: #E9E9EC;
    --bg: #F4F4F6;
    --card: #FFFFFF;
    --green: #15803D;
    --green-soft: #ECFDF3;
    --amber: #B45309;
    --amber-soft: #FEF6E7;
    --blue: #1D4ED8;
    --blue-soft: #EEF4FF;
    --red: #B91C1C;
    --red-soft: #FEF2F2;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(28,25,23,.04), 0 4px 16px rgba(28,25,23,.06);
    --nav-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 28px; height: 28px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
}
.app.no-nav { padding-bottom: 24px; }
.wrap { padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(244,244,246,.92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
}
.topbar .logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #fff; box-shadow: var(--shadow); }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title .sub { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.topbar .title .sub .dot { flex: none; }
.topbar .title .sub span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); border: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot.off { background: var(--red); }
.wallet-chip {
    display: flex; align-items: center; gap: 6px;
    background: var(--card); border-radius: 999px; padding: 8px 12px;
    font-weight: 700; font-size: 14px; box-shadow: var(--shadow);
}
.wallet-chip .i { color: var(--brand); width: 18px; height: 18px; }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin: 0 16px 12px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title a { font-size: 13px; color: var(--brand); font-weight: 600; }
.section-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 20px 16px 10px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row + .row { margin-top: 8px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 12px; padding: 13px 18px;
    font-weight: 600; font-size: 14px;
    background: var(--brand); color: #fff;
    transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-green { background: var(--green); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 11px; }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 700; padding: 6px 0; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .textarea {
    width: 100%; border: 1.5px solid var(--line); background: #fff;
    border-radius: 14px; padding: 13px 14px; outline: none; transition: border-color .15s;
    font-size: 16px;   /* iPhones zoom the whole page when a smaller input is focused */
}
.input:focus, .textarea:focus { border-color: var(--brand); }
.textarea { resize: vertical; min-height: 72px; }
.input-group { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.input-group:focus-within { border-color: var(--brand); }
.input-group .prefix { padding: 0 4px 0 14px; font-weight: 700; color: var(--ink-2); }
.input-group .input { border: 0; border-radius: 0; font-size: 18px; letter-spacing: .04em; }
.alert { border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.alert-warn { background: var(--amber-soft); color: var(--amber); }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #D6D3D1; border-radius: 99px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }

/* Segmented control */
.seg { display: flex; background: #F3EFEB; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 24px; max-width: 460px; margin: 0 auto; }
.auth-hero { text-align: center; margin: 12px 0 28px; }
.auth-hero .logo { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 16px; box-shadow: var(--shadow); background: #fff; object-fit: cover; }
.auth-hero h1 { font-size: 22px; margin-bottom: 6px; }
.auth-hero p { color: var(--ink-2); }
.auth-card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 20px; }
.auth-foot { margin-top: auto; padding-top: 24px; text-align: center; font-size: 12px; color: var(--ink-3); }
.perks { display: flex; justify-content: center; gap: 18px; margin-top: 18px; font-size: 12px; color: var(--ink-2); }
.perks div { display: flex; align-items: center; gap: 6px; }
.perks .i { width: 16px; height: 16px; color: var(--brand); }
.otp-input { text-align: center; font-size: 28px !important; letter-spacing: .5em; font-weight: 700; padding-left: .5em !important; }
.dev-otp { background: var(--amber-soft); color: var(--amber); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; text-align: center; }
.dev-otp b { font-size: 16px; letter-spacing: .15em; }

/* ---------- Location card ---------- */
.loc {
    display: flex; gap: 12px; align-items: center;
    margin: 4px 16px 12px; padding: 12px 14px;
    border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
}
.loc .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.loc .txt { flex: 1; min-width: 0; }
.loc .txt b { display: block; font-size: 14px; }
.loc .txt span { font-size: 12px; color: var(--ink-2); }
.loc.onsite .ico { background: var(--green-soft); color: var(--green); }
.loc.remote .ico { background: var(--blue-soft); color: var(--blue); }
.loc.out .ico, .loc.denied .ico { background: var(--red-soft); color: var(--red); }
.loc.checking .ico .i { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.closed-banner { margin: 0 16px 12px; padding: 14px; border-radius: var(--radius); background: var(--ink); color: #fff; display: flex; gap: 12px; align-items: center; }
.closed-banner .i { color: #FCA5A5; }

/* Active order strip */
.live-strip { display: flex; align-items: center; gap: 12px; margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(135deg, #1C1917, #3A2E28); color: #fff; }
.live-strip .pulse { width: 10px; height: 10px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: ring 1.6s infinite; flex: none; }
@keyframes ring { 70% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.live-strip .txt { flex: 1; font-size: 14px; }
.live-strip .txt b { display: block; }
.live-strip .txt span { opacity: .75; font-size: 12px; }

/* ---------- Menu ---------- */
.search { margin: 0 16px 10px; position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 13px 14px 13px 44px; outline: none; font-size: 16px; }
/* Search with the VEG switch beside it */
.search-row { display: flex; align-items: center; gap: 14px; margin: 0 16px 12px; }
.search-row .search { flex: 1; margin: 0; }
.search-row .search .i { color: var(--brand); }
.search-row .search input { border: 1px solid var(--line); }
.veg-toggle { flex: none; display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 0 2px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ink-2); }
.veg-toggle i { position: relative; width: 34px; height: 18px; border-radius: 99px; background: #D1D1D6; transition: background .2s; }
.veg-toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.veg-toggle[aria-pressed="true"] { color: var(--green); }
.veg-toggle[aria-pressed="true"] i { background: var(--green); }
.veg-toggle[aria-pressed="true"] i::after { transform: translateX(16px); }

/* Category tabs: photo + name, pinned to the top while the menu scrolls */
.topbar.flow { position: static; }
.cats {
    position: sticky; top: 0; z-index: 30;
    display: flex; overflow-x: auto; scrollbar-width: none;
    margin-bottom: 12px; padding: 8px 8px 0;
    background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 4px 12px rgba(28,28,28,.05);
}
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; width: 76px; padding: 0 4px 7px; text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-2); border-bottom: 3px solid transparent; }
.cats a img, .cats a .ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0 auto 4px; display: grid; place-items: center; font-size: 24px; }
.cats a span:last-child { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cats a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--brand); }

/* Each category is one white card holding a 2-column grid of dishes: photo on top, name and prices below */
.cat-sec {
    scroll-margin-top: 104px; margin: 0 12px 12px; padding: 0 12px 16px;
    background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px;
}
.cat-sec h2 { grid-column: 1 / -1; font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 -6px; padding: 16px 4px 0; display: flex; align-items: baseline; gap: 6px; }
.cat-sec h2 small { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.item { display: flex; flex-direction: column; min-width: 0; }
.item-info { padding: 0 2px; }
.item-info h3 { font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin: 5px 0 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-info .price { display: flex; flex-wrap: wrap; gap: 2px 10px; font-weight: 600; font-size: 13px; }
.item-info .price small { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.badges { display: flex; align-items: center; gap: 6px; min-height: 16px; }
.veg-mark { width: 16px; height: 16px; border: 1.5px solid var(--green); border-radius: 4px; display: grid; place-items: center; flex: none; }
.veg-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.veg-mark.nonveg { border-color: var(--red); }
.veg-mark.nonveg::after { background: none; width: 0; height: 0; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--red); }
.tag-best { font-size: 11px; font-weight: 600; color: #E0700B; }
.item-media { order: -1; position: relative; margin-bottom: 22px; }
.item-media .img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; object-fit: cover; background: #F1F1F3; display: grid; place-items: center; font-size: 52px; }
/* ADD hangs over the photo's bottom-right corner */
.add-ctl { position: absolute; right: 8px; bottom: -14px; width: 74px; height: 30px; }
.add-btn, .stepper { width: 100%; height: 100%; border-radius: 10px; background: #fff; border: 1px solid var(--brand); box-shadow: 0 2px 8px rgba(28,28,28,.12); }
.add-btn { position: relative; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.add-btn::after { content: "+"; position: absolute; top: -1px; right: 6px; font-size: 12px; font-weight: 600; }
.add-btn:disabled { opacity: .5; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--brand); color: #fff; overflow: hidden; }
.stepper button { width: 26px; height: 100%; border: 0; background: transparent; color: #fff; font-size: 18px; font-weight: 600; line-height: 1; }
.stepper .q { font-weight: 700; font-size: 13px; }
.no-items { text-align: center; padding: 40px 16px; color: var(--ink-2); }

/* Floating cart bar */
.cart-bar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
    width: calc(100% - 24px); max-width: 536px; z-index: 40;
    background: var(--brand); color: #fff; border-radius: 14px;
    padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 10px 28px rgba(217,45,32,.35); border: 0; text-align: left;
    animation: up .25s ease;
}
.cart-bar b { display: block; font-size: 14px; font-weight: 600; }
.cart-bar span { font-size: 12px; opacity: .9; }
.cart-bar .go { display: flex; align-items: center; gap: 6px; font-weight: 700; }
@keyframes up { from { transform: translate(-50%, 20px); opacity: 0; } }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(28,25,23,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
    position: fixed; left: 50%; bottom: 0; z-index: 61;
    width: 100%; max-width: 560px; max-height: 92vh;
    background: var(--bg); border-radius: 22px 22px 0 0;
    transform: translate(-50%, 100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    display: flex; flex-direction: column;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-head { padding: 10px 16px 12px; display: flex; align-items: center; justify-content: space-between; }
.sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; border-radius: 4px; background: #D6D3D1; transform: translateX(-50%); }
.sheet-head h2 { font-size: 16px; margin-top: 10px; }
.sheet-body { overflow-y: auto; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 16px calc(12px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); margin-top: 10px; }

.cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cart-line + .cart-line { border-top: 1px dashed var(--line); }
.cart-line .nm { flex: 1; min-width: 0; }
.cart-line .nm b { display: block; font-size: 14px; }
.cart-line .nm span { font-size: 12px; color: var(--ink-2); }
.cart-line .stepper { width: 88px; height: 32px; flex: none; box-shadow: none; }
.cart-line .amt { width: 64px; text-align: right; font-weight: 700; font-size: 14px; }

.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.opt + .opt { margin-top: 8px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt input { margin-top: 3px; accent-color: var(--brand); }
.opt b { display: block; font-size: 14px; }
.opt span { font-size: 12px; color: var(--ink-2); }

.wallet-use input[type=range] { width: 100%; accent-color: var(--green); margin: 12px 0 4px; }
.bill .row { font-size: 14px; }
.bill .total { font-size: 15px; font-weight: 700; }
.green { color: var(--green); }
.cashback-note { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 600; margin: 0 16px 12px; }
.pay-btn { display: flex; justify-content: space-between; }

/* ---------- Status / tracking ---------- */
.status-hero { text-align: center; padding: 20px 16px 8px; }
.status-hero .emoji { font-size: 56px; line-height: 1; margin-bottom: 10px; display: inline-block; }
.status-hero h1 { font-size: 20px; margin-bottom: 6px; }
.status-hero p { color: var(--ink-2); }
.eta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 700; }
.bounce { animation: bounce 1.8s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-6px); } }

.steps { display: flex; justify-content: space-between; position: relative; margin: 6px 4px 2px; }
.steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 15px; height: 3px; background: var(--line); border-radius: 3px; }
.steps .fill { position: absolute; left: 12%; top: 15px; height: 3px; background: var(--green); border-radius: 3px; transition: width .5s ease; }
.step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.step .c { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; position: relative; z-index: 1; }
.step .c .i { width: 16px; height: 16px; }
.step.done { color: var(--ink); }
.step.done .c { background: var(--green); border-color: var(--green); color: #fff; }
.step.now .c { box-shadow: 0 0 0 5px rgba(21,128,61,.18); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill .i { width: 14px; height: 14px; }
.st-paid { background: var(--blue-soft); color: var(--blue); }
.st-preparing { background: var(--amber-soft); color: var(--amber); }
.st-ready { background: var(--green-soft); color: var(--green); }
.st-completed { background: #F1F5F9; color: #334155; }
.st-rejected, .st-cancelled, .st-failed { background: var(--red-soft); color: var(--red); }
.st-pending-payment { background: var(--amber-soft); color: var(--amber); }
.src-remote { background: var(--blue-soft); color: var(--blue); }
.src-onsite { background: var(--green-soft); color: var(--green); }

/* Order list */
.order-card { display: block; }
.oc-top { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--line); }
.oc-thumb { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; background: #F1F1F3; display: grid; place-items: center; font-size: 24px; }
.oc-main { flex: 1; min-width: 0; }
.oc-items { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; margin-bottom: 2px; }
.order-card .items-line { font-size: 13px; color: var(--ink-2); margin: 8px 0 12px; }
.order-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Wallet */
.wallet-hero {
    position: relative; overflow: hidden; isolation: isolate;
    margin: 4px 16px 12px; padding: 22px 20px 20px; border-radius: 22px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, #E5483A 0%, rgba(229,72,58,0) 55%), linear-gradient(140deg, #2A1512 0%, #1C1C1C 70%);
    box-shadow: 0 14px 30px rgba(28,28,28,.28);
}
.wallet-hero .lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.wallet-hero .bal { font-size: 38px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 12px; }
.wh-chip { display: inline-block; margin-bottom: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 12px; }
.wh-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; }
.wh-btn:active { transform: scale(.98); }
.coin { position: absolute; z-index: -1; display: grid; place-items: center; border-radius: 50%; font-weight: 700; color: #8A5A00;
    background: radial-gradient(circle at 30% 30%, #FFE08A, #F7B500); box-shadow: inset 0 -3px 0 rgba(138,90,0,.25), 0 6px 14px rgba(0,0,0,.25); animation: floaty2 4s ease-in-out infinite; }
.coin.c1 { right: 22px; top: 20px; width: 46px; height: 46px; font-size: 22px; }
.coin.c2 { right: 74px; top: 52px; width: 28px; height: 28px; font-size: 14px; animation-delay: .8s; opacity: .9; }
.coin.c3 { right: 34px; top: 78px; width: 20px; height: 20px; font-size: 10px; animation-delay: 1.6s; opacity: .8; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.stat-pair > div { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-pair .ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.stat-pair .ic.cr { background: var(--green-soft); color: var(--green); }
.stat-pair .ic.dr { background: var(--red-soft); color: var(--red); }
.stat-pair b { display: block; font-size: 15px; }
.stat-pair span { font-size: 11px; color: var(--ink-2); }
.how-steps { display: flex; gap: 8px; }
.how-steps > div { flex: 1; position: relative; padding: 12px 8px; border-radius: 14px; background: var(--bg); text-align: center; }
.how-steps i { display: block; font-style: normal; font-size: 24px; margin-bottom: 4px; }
.how-steps b { display: block; font-size: 13px; }
.how-steps span { display: block; font-size: 11px; line-height: 1.35; color: var(--ink-2); margin-top: 2px; }
.how-steps > div + div::before { content: "›"; position: absolute; left: -8px; top: 50%; transform: translate(-50%, -50%); color: var(--ink-3); font-size: 16px; }

/* Profile */
.profile-hero {
    display: flex; align-items: center; gap: 14px;
    margin: 4px 16px 12px; padding: 18px; border-radius: 22px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, #E5483A 0%, rgba(229,72,58,0) 55%), linear-gradient(140deg, #2A1512 0%, #1C1C1C 70%);
    box-shadow: 0 14px 30px rgba(28,28,28,.28);
}
.profile-hero h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-sub { font-size: 12px; opacity: .75; margin: 2px 0 8px; }
.tier-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 600; }
.ph-edit { width: 36px; height: 36px; flex: none; align-self: flex-start; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.avatar { width: 60px; height: 60px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #FFE08A, #F7B500); color: #5C3B00; display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.stats.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 12px; }
.stats.tiles a { padding: 12px 6px; text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .1s ease; }
.stats.tiles a:active { transform: scale(.97); }
.stats.tiles i { display: block; font-style: normal; font-size: 22px; }
.stats.tiles b { display: block; font-size: 15px; margin-top: 2px; }
.stats.tiles span { font-size: 11px; color: var(--ink-2); }
.tiers { position: relative; display: flex; justify-content: space-between; margin: 16px 0 2px; }
.tiers::before, .tiers .fill { content: ""; position: absolute; left: 28px; top: 16px; height: 4px; border-radius: 4px; }
.tiers::before { right: 28px; background: var(--line); }
.tiers .fill { background: linear-gradient(90deg, #F7B500, var(--brand)); }
.tiers .t { position: relative; width: 56px; text-align: center; font-size: 11px; color: var(--ink-3); }
.tiers .t i { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 4px; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-style: normal; font-size: 17px; filter: grayscale(1); opacity: .55; }
.tiers .t.on { color: var(--ink); font-weight: 600; }
.tiers .t.on i { border-color: #F7B500; filter: none; opacity: 1; box-shadow: 0 0 0 4px rgba(247,181,0,.18); }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tx .ic.cr { background: var(--green-soft); color: var(--green); }
.tx .ic.dr { background: var(--red-soft); color: var(--red); }
.tx .d { flex: 1; min-width: 0; }
.tx .d b { display: block; font-size: 14px; font-weight: 600; }
.tx .d span { font-size: 12px; color: var(--ink-3); }
.tx .a { font-weight: 800; }
.tx .a.cr { color: var(--green); }

.fav-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.fav { flex: none; width: 110px; }
.fav .img { width: 110px; height: 80px; border-radius: 12px; object-fit: cover; background: #F3EFEB; display: grid; place-items: center; font-size: 28px; }
.fav b { display: block; font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav span { font-size: 11px; color: var(--ink-3); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; padding: 14px 0; width: 100%; background: none; border: 0; text-align: left; font-weight: 600; }
.menu-list > * + * { border-top: 1px solid var(--line); }
.menu-list a .i:last-child { margin-left: auto; color: var(--ink-3); }

/* Empty states */
.empty { text-align: center; padding: 48px 24px; }
.empty .emoji { font-size: 52px; margin-bottom: 12px; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); margin-bottom: 18px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 50;
    width: 100%; max-width: 560px;
    height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    display: flex;
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); position: relative; }
.bottom-nav a.on { color: var(--brand); }
.bottom-nav a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.bottom-nav .badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; top: 16px; transform: translate(-50%, -140%); z-index: 100;
    max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px;
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 561px) {
    body { background: #E9E9EC; }
    .app { background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.06); }
}
/* App-like feel: pages cross-fade into each other while the bottom bar stays put, and cards respond to a tap.
   Browsers without view transitions simply navigate as before. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    .bottom-nav { view-transition-name: bottom-nav; }
}
a.card, .card > a, .best-card, .fav { transition: transform .1s ease; }
a.card:active, .best-card:active, .fav:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   v2: offers, filters, bestsellers, dish sheet, menu FAB
   ========================================================== */
.offers { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 12px; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.offers::-webkit-scrollbar { display: none; }
.offer { flex: none; scroll-snap-align: start; display: flex; gap: 10px; align-items: center; min-width: 200px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #FFF7ED, #FEF1EE); border: 1px dashed #F5B8A8; }
.offer .oi { font-size: 24px; }
.offer b { display: block; font-size: 14px; }
.offer span { font-size: 12px; color: var(--ink-2); }

.filters { display: flex; gap: 8px; padding: 0 16px 6px; }
.filters:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.chip[data-filter="best"][aria-pressed="true"] { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.chip .veg-mark { width: 14px; height: 14px; }

.best-row h2 { font-size: 16px; margin: 14px 16px 10px; }
.best-row h2 small { color: var(--amber); }
.best-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scrollbar-width: none; }
.best-scroll::-webkit-scrollbar { display: none; }
.best-card { flex: none; width: 140px; border: 0; background: var(--card); border-radius: 16px; padding: 0 0 10px; text-align: left; box-shadow: var(--shadow); overflow: hidden; }
.best-card img, .best-card .ph { width: 140px; height: 100px; object-fit: cover; display: grid; place-items: center; font-size: 38px; }
.best-card b { display: block; font-size: 13px; margin: 8px 10px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-card span.num { font-size: 12px; color: var(--ink-2); margin: 0 10px; display: block; }

[data-open] { cursor: pointer; }
.no-items { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.menu-fab {
    position: fixed; z-index: 45; right: max(16px, calc(50% - 264px));
    bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 11px 16px;
    font-weight: 700; font-size: 13px; box-shadow: 0 8px 22px rgba(28,25,23,.35);
    transition: bottom .25s ease;
}
body.has-cart .menu-fab { bottom: calc(var(--nav-h) + var(--safe-b) + 86px); }
.menu-pop {
    position: fixed; z-index: 46; right: max(16px, calc(50% - 264px));
    bottom: calc(var(--nav-h) + var(--safe-b) + 64px);
    width: 240px; max-height: 50vh; overflow-y: auto;
    background: var(--ink); color: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
    animation: up2 .18s ease;
}
body.has-cart .menu-pop { bottom: calc(var(--nav-h) + var(--safe-b) + 134px); }
.menu-pop a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.menu-pop a:hover, .menu-pop a:active { background: rgba(255,255,255,.1); }
.menu-pop a b { opacity: .6; font-weight: 600; }
@keyframes up2 { from { transform: translateY(10px); opacity: 0; } }

.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translate(-50%, -4px) scale(1.02); } }

/* Dish detail sheet */
.item-sheet { overflow: hidden; }
.item-sheet .is-media { position: relative; height: 220px; max-height: 32vh; background: #F3EFEB; display: grid; place-items: center; font-size: 80px; flex: none; overflow: hidden; border-radius: 22px 22px 0 0; }
.item-sheet .is-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-sheet .is-close { position: absolute; top: 4px; right: 12px; z-index: 2; }
.item-sheet .sheet-head::before { display: none; }
.size-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.size-opt + .size-opt { margin-top: 8px; }
.size-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.size-opt input { accent-color: var(--brand); width: 20px; height: 20px; margin: 0; }
.size-opt b { flex: 1; font-weight: 600; }
.stepper.big { width: 116px; height: 50px; flex: none; border-radius: 12px; box-shadow: none; background: var(--brand-soft); color: var(--brand); }
.stepper.big button { width: 40px; font-size: 22px; color: var(--brand); }
.stepper.big .q { font-size: 15px; color: var(--ink); }
.item-sheet .btn { height: 50px; border-radius: 12px; }

/* Rating */
.stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 12px; }
.stars button { border: 0; background: none; font-size: 36px; line-height: 1; color: #D6D3D1; padding: 2px; transition: transform .1s; }
.stars button.on { color: #F59E0B; }
.stars button:active { transform: scale(1.2); }
.call-btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Addresses ---------- */
.addr-card .addr-top { display: flex; gap: 12px; }
.addr-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-size: 20px; flex: none; }
.addr-acts { display: flex; gap: 18px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.addr-acts form { margin: 0; }
.addr-map-wrap { position: relative; margin: 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.addr-map { height: 300px; background: #E7E2DD; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); font-size: 38px; pointer-events: none; z-index: 500; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.locate-btn { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 500; display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; color: var(--brand); font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.deliver-note { margin: 8px 16px 0; font-size: 13px; font-weight: 600; }
.deliver-note.ok { color: var(--green); }
.deliver-note.bad { color: var(--red); }
.addr-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.addr-opt + .addr-opt { margin-top: 8px; }
.addr-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.addr-opt.off { opacity: .55; }
.addr-opt input { margin-top: 3px; accent-color: var(--brand); }
.addr-opt b { display: block; font-size: 14px; }
.addr-opt span { font-size: 12px; color: var(--ink-2); display: block; }

/* ---------- Cancel / refund ---------- */
.cancel-box { text-align: center; }
.cancel-box .link-btn { color: var(--red); }
.refund-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.policy h3 { font-size: 15px; margin: 16px 0 6px; }
.policy ul { margin: 0; padding-left: 18px; color: var(--ink-2); line-height: 1.7; font-size: 14px; }

/* ==========================================================
   Home: hero slider, cravings row, inline banners
   ========================================================== */
.hero { margin: 4px 0 14px; position: relative; }
.hero-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 16px 14px; scroll-padding: 0 16px; }
.hero-dots { margin-top: -4px !important; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
    position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
    aspect-ratio: 2 / 1; min-height: 160px; border-radius: 20px; overflow: hidden; color: #fff;
    box-shadow: 0 10px 28px rgba(28,25,23,.18); cursor: pointer; isolation: isolate;
}
.hero-slide > img, .hero-slide > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 18px 16px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.hero-cap b { display: block; font-size: 18px; line-height: 1.2; text-shadow: 0 1px 8px rgba(0,0,0,.25); max-width: 62%; }
.hero-cap span { max-width: 62%; }
.hero-slide.inline .hero-cap b, .hero-slide.inline .hero-cap span { max-width: 55%; }
.hero-cap span { display: block; font-size: 13px; opacity: .92; margin-top: 3px; }
.hero-cta { display: inline-block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 800; background: #fff; color: var(--ink); padding: 5px 10px; border-radius: 999px; }
.hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.hero-dots button { width: 6px; height: 6px; border-radius: 6px; border: 0; padding: 0; background: #D6D3D1; transition: width .25s, background .25s; }
.hero-dots button.on { width: 20px; background: var(--brand); }
.hero-deco { position: absolute; right: 14px; top: 10px; font-size: 76px; opacity: .9; transform: rotate(-12deg); animation: floaty 4s ease-in-out infinite; }
.hero-brand { position: absolute; right: 18px; top: 50%; transform: translateY(-62%); }
.hero-brand img { width: 96px; height: 96px; border-radius: 26px; background: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.3); animation: floaty 4s ease-in-out infinite; }
.steam { position: absolute; top: -6px; width: 10px; height: 26px; border-radius: 10px; background: rgba(255,255,255,.55); filter: blur(3px); animation: steam 2.4s ease-in infinite; }
.steam.s1 { left: 28px; } .steam.s2 { left: 44px; animation-delay: .8s; } .steam.s3 { left: 60px; animation-delay: 1.6s; }
@keyframes steam { 0% { transform: translateY(0) scaleX(1); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-34px) scaleX(1.8); opacity: 0; } }
@keyframes floaty { 50% { transform: translateY(-6px) rotate(-8deg); } }
.hero-brand img { animation-name: floaty2; }
@keyframes floaty2 { 50% { transform: translateY(-6px); } }

.crave h2 { font-size: 17px; margin: 18px 16px 10px; }
.crave-row { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.crave-row::-webkit-scrollbar { display: none; }
.crave-item { flex: none; width: 76px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.crave-item img, .crave-ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; display: grid; place-items: center; font-size: 30px; box-shadow: 0 4px 12px rgba(28,25,23,.1); border: 3px solid #fff; }
.crave-item span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.crave-item:active img, .crave-item:active .crave-ph { transform: scale(.94); }

.inline-bn { margin: 18px 0 6px; }
.hero-slide.inline { aspect-ratio: 3 / 1; min-height: 110px; border-radius: 16px; }
.hero-slide.inline .hero-cap { padding: 28px 16px 12px; }
.hero-slide.inline .hero-cap b { font-size: 16px; }
.hero-slide.inline .hero-deco { font-size: 52px; top: 8px; }

/* ---------- Recommendations ---------- */
.picks h2 small { color: var(--brand); }
.best-card { position: relative; }
.best-card .why { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--green); margin: 8px 10px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-card .why + b { margin-top: 2px; }
.pick-add { position: absolute; right: 8px; top: 72px; width: 28px; height: 28px; border-radius: 9px; background: #fff; color: var(--brand); font-style: normal; font-weight: 800; font-size: 20px; line-height: 26px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
#cartSuggest .best-scroll { padding: 0 16px 12px; }
.best-card.mini { width: 132px; cursor: default; }
.best-card.mini img, .best-card.mini .ph { width: 132px; height: 84px; }
.mini-foot { display: flex; align-items: center; justify-content: space-between; margin: 4px 10px 0; gap: 6px; }
.mini-foot .num { font-size: 12px; color: var(--ink-2); }
.mini-add { border: 1.5px solid var(--brand); color: var(--brand); background: #fff; border-radius: 8px; font-weight: 800; font-size: 11px; padding: 4px 8px; }
