/* Greeb customer app.
   Calm and roomy: cool greys, white rounded cards, soft shadows, a liquid-glass tab bar: system font, grouped lists, translucent bars.
   Colours follow iOS system colours so it sits naturally on an iPhone, in light and dark.
   Logical properties (inline-start/end) so the layout mirrors for Arabic. */

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --sheet: #FFFFFF;
  --fill: #EEF0F3;
  --fill-2: #E2E6EB;
  --press: rgba(18, 21, 26, .05);
  --sep: #E6E8EC;
  --label: #12151A;
  --label-2: #5E6570;
  --label-3: #A3A9B2;
  --ink: #12151A;                   /* the one accent: black in light, white in dark */
  --on-ink: #FFFFFF;
  --seg-on: #FFFFFF;
  --bar: rgba(249, 249, 249, .82);
  --ticker-bg: #000000;
  --ticker-ink: #FFFFFF;
  --green: #248A3D;                 /* accessible system green */
  --dot-green: #34C759;
  --orange: #C93400;
  --dot-orange: #FF9500;
  --red: #D70015;
  --red-tint: rgba(255, 59, 48, .1);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Geeza Pro', 'Noto Sans Arabic', sans-serif;
  --tabbar: 50px;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(18, 21, 26, .04), 0 6px 20px rgba(18, 21, 26, .05);
  --level-bg: #E9EEF3; --level-track: #D3DAE2;
  --specials: #161A20; --beige: #F1E8DC; --beige-ink: #4A3727;
  --cover: #DCE7F1; --cover-1: #C6D8E8; --cover-2: #F2E6D6; --cover-ink: #12151A; --cover-cup: #FFFFFF;
  --status-green: #17803F;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .38));
  --glass-edge: rgba(255, 255, 255, .75);
  --glass-shadow: 0 10px 30px rgba(18, 21, 26, .12), 0 2px 6px rgba(18, 21, 26, .06), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 1px rgba(255, 255, 255, .35);
  --glass-pill: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .6));
  --glass-pill-shadow: 0 2px 8px rgba(18, 21, 26, .08), inset 0 1px 0 #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0E1013; --surface: #171A1F; --sheet: #171A1F; --fill: #21262D; --fill-2: #2B323B;
    --press: rgba(255, 255, 255, .06); --sep: #262B32;
    --label: #F1F3F6; --label-2: #A2A9B4; --label-3: #5F6772;
    --ink: #F1F3F6; --on-ink: #0E1013;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --level-bg: #161C23; --level-track: #2B323B;
    --specials: #22272F; --beige: #2B251E; --beige-ink: #EBDDC9;
    --cover: #1C2733; --cover-1: #243446; --cover-2: #3A3026; --cover-ink: #E9EEF4; --cover-cup: #2C3A4A; --status-green: #4CD484;
    --glass: linear-gradient(180deg, rgba(48, 54, 63, .55), rgba(28, 32, 38, .45)); --glass-edge: rgba(255, 255, 255, .14);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(255, 255, 255, .05);
    --glass-pill: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08)); --glass-pill-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); --seg-on: #636366; --bar: rgba(22, 22, 24, .82);
    --ticker-bg: #1C1C1E; --ticker-ink: #FFFFFF;
    --green: #30D158; --dot-green: #30D158; --orange: #FF9F0A; --dot-orange: #FF9F0A; --red: #FF6961; --red-tint: rgba(255, 69, 58, .16);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --bg: #0E1013; --surface: #171A1F; --sheet: #171A1F; --fill: #21262D; --fill-2: #2B323B;
  --press: rgba(255, 255, 255, .06); --sep: #262B32;
  --label: #F1F3F6; --label-2: #A2A9B4; --label-3: #5F6772;
  --ink: #F1F3F6; --on-ink: #0E1013;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --level-bg: #161C23; --level-track: #2B323B;
  --specials: #22272F; --beige: #2B251E; --beige-ink: #EBDDC9;
  --cover: #1C2733; --cover-1: #243446; --cover-2: #3A3026; --cover-ink: #E9EEF4; --cover-cup: #2C3A4A; --status-green: #4CD484;
  --glass: linear-gradient(180deg, rgba(48, 54, 63, .55), rgba(28, 32, 38, .45)); --glass-edge: rgba(255, 255, 255, .14);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(255, 255, 255, .05);
  --glass-pill: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08)); --glass-pill-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); --seg-on: #636366; --bar: rgba(22, 22, 24, .82);
  --ticker-bg: #1C1C1E; --ticker-ink: #FFFFFF;
  --green: #30D158; --dot-green: #30D158; --orange: #FF9F0A; --dot-orange: #FF9F0A; --red: #FF6961; --red-tint: rgba(255, 69, 58, .16);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--label); font-family: var(--font); font-size: 17px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
  min-height: 100vh; min-height: 100dvh;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--label); }
:focus-visible { outline: 2px solid var(--label); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[dir=rtl] .flip { display: inline-flex; transform: scaleX(-1); }
.flip { display: inline-flex; }

/* ---------- Navigation bar ---------- */
.nav { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent; transition: border-color .2s; }
.nav.scrolled, .nav.solid { border-bottom-color: var(--sep); }
.nav-in { max-width: 640px; margin: 0 auto; height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 8px; }
.nav-title { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; opacity: 0; transition: opacity .2s; }
.nav.scrolled .nav-title, .nav.solid .nav-title { opacity: 1; }
.nav-side { display: flex; align-items: center; min-width: 0; }
.nav-side.end { justify-content: flex-end; }
.nav-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 2px; color: var(--ink); text-decoration: none; font-size: 17px; }
.nav-btn { position: relative; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.cart-btn .badge { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ink); color: var(--on-ink);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* ---------- Page ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
body.with-tabs .page { padding-bottom: calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
.page-logo { margin: 2px 0 -6px; }
.page-logo .brand-img { height: 24px; width: auto; }
.page-logo + .sr-only + .hello { margin-top: 0; }
.large-title { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: .01em; margin: 2px 0 0; }
.hello, .sub { margin: -8px 0 0; color: var(--label-2); font-size: 15px; }
.group-title { margin: 14px 16px -4px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--label-2); }
.group-foot { margin: -4px 16px 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.group-foot.center { text-align: center; }
.empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--label-2); font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions:empty { display: none; }
.foot { text-align: center; color: var(--label-2); font-size: 15px; margin: 4px 0; }
.foot a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* ---------- Grouped lists ---------- */
.group { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.group.pad { padding: 16px; }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 16px; text-decoration: none; color: var(--label); }
.row + .row::before, .row + .empty::before { content: ''; position: absolute; top: 0; inset-inline-start: 16px; inset-inline-end: 0; border-top: .5px solid var(--sep); }
.group .row:has(.mono) + .row::before, .menu .row + .row::before { inset-inline-start: 72px; }
a.row:active, .row-btn:active, label.row:active { background: var(--press); }
.row-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--label); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-text b { font-weight: 600; font-size: 16px; }
.row-text small { color: var(--label-2); font-size: 13.5px; line-height: 1.35; }
.row-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; flex: none; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-btn { width: 100%; border: 0; background: none; color: var(--ink); font-size: 17px; text-align: start; gap: 10px; }
.row-btn.center { justify-content: center; }
#out { color: var(--red); }
.chev { color: var(--label-3); flex: none; }
.mono { width: 44px; height: 44px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; color: var(--label); }
.cafe .mono { width: 48px; height: 48px; }
.cafe.closed .row-text b, .cafe.closed .mono { opacity: .55; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); display: inline-block; margin-inline-end: 6px; vertical-align: 1px; flex: none; }
.status-dot.on { background: var(--dot-green); }
.amount { font-weight: 600; font-size: 15px; white-space: nowrap; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.profile-card .mono { width: 56px; height: 56px; border-radius: 50%; font-size: 22px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--label); }
.pill.small { padding: 1px 8px; font-size: 12px; vertical-align: 2px; }
.pill.muted { color: var(--label-2); }

/* Radio rows (car, arrival): a check mark on the chosen row, like iOS settings */
.radio-row { cursor: pointer; }
.radio-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-row .tick-mark { color: var(--ink); visibility: hidden; flex: none; }
.radio-row:has(input:checked) .tick-mark { visibility: visible; }
.radio-row:has(input:focus-visible) { outline: 2px solid var(--label); outline-offset: -2px; }

/* ---------- Controls ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 8px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-align: center; transition: background-color .2s, box-shadow .2s; }
.seg input:checked + span { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.seg input:focus-visible + span { outline: 2px solid var(--label); outline-offset: -2px; }

.search { position: relative; display: block; }
.search svg { position: absolute; inset-inline-start: 10px; top: 50%; translate: 0 -50%; color: var(--label-2); pointer-events: none; }
.search input { width: 100%; height: 38px; border: 0; border-radius: 10px; background: var(--fill); padding: 0 12px; padding-inline-start: 36px; font-size: 17px; color: var(--label); }
.search input::placeholder { color: var(--label-2); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }

.btn { min-height: 50px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--fill); color: var(--label); font-size: 17px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .1s, opacity .15s; }
.btn:active:not(:disabled) { transform: scale(.98); opacity: .85; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-plain { background: none; color: var(--ink); font-weight: 500; }
.btn-danger { color: var(--red); }
.btn-danger-fill { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-split { justify-content: space-between; }
.btn-small { min-height: 34px; padding: 0 14px; border-radius: 17px; font-size: 15px; font-weight: 600; }
.btn.confirming { color: var(--red); background: var(--red-tint); }
.plain { background: none; border: 0; color: var(--ink); font-size: 17px; min-height: 44px; padding: 0 4px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label-2); display: grid; place-items: center; flex: none; position: relative; }
.icon-btn::after { content: ''; position: absolute; inset: -6px; }
.count { font-weight: 500; opacity: .8; font-size: 15px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--label-2); }
.field small { font-size: 12.5px; color: var(--label-2); }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }
.field-row .grow { flex: 2; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; border: 0; border-radius: 10px; background: var(--fill); padding: 0 14px; font-size: 17px; color: var(--label); }
.page > .form:not(.group) .field input { background: var(--surface); }
.field input::placeholder { color: var(--label-3); }
.field input:focus { outline: 2px solid var(--label); outline-offset: 0; }
.field input:disabled { color: var(--label-2); }
.field-error { color: var(--red); font-size: 13px; }
.note { border-radius: var(--radius); padding: 12px 14px; font-size: 15px; background: var(--surface); color: var(--label); line-height: 1.4; }
.note .btn { margin-top: 10px; }
.note-error { background: var(--red-tint); color: var(--red); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar, .chips-row::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.chips label { flex: none; position: relative; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--fill); font-size: 15px; cursor: pointer; white-space: nowrap; }
.chips input:checked + span { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.chips input:focus-visible + span { outline: 2px solid var(--label); outline-offset: 2px; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips-row button { flex: none; min-height: 36px; padding: 0 16px; border-radius: 18px; border: 0; background: var(--surface); font-size: 15px; white-space: nowrap; }
.chips-row button[aria-pressed=true] { background: var(--ink); color: var(--on-ink); font-weight: 600; }

/* ---------- Plate (always left to right, as on the car) ---------- */
.plate { direction: ltr; display: inline-flex; align-items: stretch; background: #fff; color: #111; border: 2.5px solid #111; border-radius: 8px; overflow: hidden; height: 40px; flex: none; }
.plate .band { min-width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 5px; background: var(--band, #fff); color: var(--band-ink, #111); }
.plate .code { font-size: 16px; font-weight: 700; line-height: 1; }
.plate .em { font-size: 8px; font-weight: 700; letter-spacing: .06em; }
.plate .num { display: flex; align-items: center; padding: 0 10px; font-size: 22px; font-weight: 700; letter-spacing: .05em; }
.plate-lg { height: 64px; border-width: 3.5px; border-radius: 11px; }
.plate-lg .band { min-width: 58px; }
.plate-lg .code { font-size: 25px; }
.plate-lg .num { font-size: 36px; padding: 0 16px; }
.plate-preview { display: flex; justify-content: center; padding: 16px; border-radius: 12px; background: var(--fill); }
.receipt-plate { display: flex; justify-content: flex-end; margin-bottom: 6px; }

/* ---------- Welcome ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
.welcome-top { display: flex; justify-content: flex-end; }
.welcome-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 24px 0; }
.mark { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mark-logo { width: 200px; }
.mark-ar { font-size: 22px; font-weight: 600; line-height: 1; color: var(--label-2); padding-inline-start: 4px; }
.mark-en { font-size: 13px; letter-spacing: .32em; color: var(--label-2); font-weight: 600; }
.welcome-title { font-size: 30px; line-height: 1.15; font-weight: 700; margin: 0; max-width: 15ch; letter-spacing: -.01em; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.features li { display: flex; gap: 14px; align-items: center; }
.features b { display: block; font-size: 17px; font-weight: 600; }
.features li > span:last-child > span { display: block; color: var(--label-2); font-size: 15px; }
.feat-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; }
.welcome-actions { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Offers ticker ---------- */
.ticker { margin-inline: -16px; background: var(--ticker-bg); color: var(--ticker-ink); overflow: hidden; height: 40px; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-time, 30s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker:active .ticker-track { animation-play-state: paused; }
.ticker-run { display: flex; align-items: center; gap: 14px; padding-inline-end: 14px; white-space: nowrap; }
.tick { display: inline-flex; align-items: baseline; gap: 6px; color: inherit; text-decoration: none; font-size: 14.5px; min-height: 40px; align-items: center; }
.tick b { font-weight: 700; }
.tick-cafe { opacity: .66; }
.tick-dot { opacity: .45; font-size: 12px; }
@keyframes ticker { to { transform: translateX(-50%); } }
[dir=rtl] .ticker-track { animation-name: ticker-rtl; }
@keyframes ticker-rtl { to { transform: translateX(50%); } }
.ticker.still { overflow-x: auto; }
.ticker.still .ticker-track { animation: none; }
.ticker.still .ticker-run[aria-hidden] { display: none; }

.offer-strip { display: flex; flex-direction: column; gap: 8px; }
.offer-chip { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); font-size: 15px; }
.offer-chip b { font-weight: 600; flex: 1; }
.offer-chip span { color: var(--label-2); font-size: 13px; }

/* ---------- Menu ---------- */
.dish { padding: 10px 6px 10px 16px; padding-inline: 16px 6px; align-items: center; }
.dish-hit { all: unset; flex: 1; min-width: 0; display: flex; gap: 14px; align-items: center; cursor: pointer; border-radius: 10px; }
.dish-hit:focus-visible { outline: 2px solid var(--label); outline-offset: 4px; }
.dish-tile { position: relative; width: 72px; height: 72px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; flex: none; overflow: hidden; }
.dish-tile .mono { background: none; font-size: 26px; color: var(--label-2); }
.dish-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-qty { position: absolute; top: 5px; inset-inline-end: 5px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: var(--on-ink);
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.dish.on .dish-tile { box-shadow: inset 0 0 0 2px var(--ink); }
.clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dish-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 15px; }
.price { font-weight: 600; color: var(--label); white-space: nowrap; }
.was { color: var(--label-2); font-size: 13px; white-space: nowrap; }
.off { display: inline-block; background: var(--ink); color: var(--on-ink); border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 700; }
.add { width: 44px; height: 44px; border: 0; flex: none; display: grid; place-items: center; color: var(--label); border-radius: 50%;
  background: radial-gradient(circle, var(--fill) 15.5px, transparent 16px); }
.add:active { transform: scale(.92); }

.bottom-bar { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 5; padding-top: 4px; }
body.with-tabs .bottom-bar { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); }
.bottom-bar .btn { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); min-height: 54px; border-radius: 14px; }

/* ---------- Sheets ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--sheet); border-radius: 14px 14px 0 0;
  animation: rise .32s cubic-bezier(.2, .9, .3, 1); overscroll-behavior: contain; }
.grabber { position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); z-index: 2; }
.sheet-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sheet-body { padding: 22px 20px max(20px, calc(env(safe-area-inset-bottom) + 12px)); display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; }
.sheet .desc { margin: -4px 0 0; color: var(--label-2); font-size: 15px; }
.sheet .meta { margin: 0; color: var(--label-2); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sheet .group { background: var(--fill); }
.sheet .group-title { margin-inline: 4px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-row .big { font-size: 24px; }
.sheet-row .big .price { font-weight: 700; }
.sheet-row .big .was { font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 22px; padding: 2px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--label); display: grid; place-items: center; }
.stepper output { min-width: 24px; text-align: center; font-weight: 600; font-size: 17px; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Order ---------- */
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 16px; }
.line + .line { border-top: .5px solid var(--sep); }
.line small { display: block; color: var(--label-2); font-size: 13px; }
.line.total { font-weight: 700; font-size: 17px; }
.line.saving { color: var(--green); font-size: 14px; font-weight: 600; }
.status { padding: 10px 4px 2px; display: flex; flex-direction: column; gap: 4px; }
.status .kicker { margin: 0; color: var(--label-2); font-size: 15px; }
.status .state { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.status .help { margin: 4px 0 0; color: var(--label-2); font-size: 16px; line-height: 1.4; max-width: 38ch; }
.status.ready .state::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--dot-orange); margin-inline-end: 10px; vertical-align: 5px; }
.gift-status .big-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; margin-bottom: 8px; }
.journey { display: flex; flex-direction: column; gap: 18px; }
.journey-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.journey-top small { color: var(--label-2); font-size: 13px; }
.eta { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.road { position: relative; height: 58px; margin-inline: 16px 20px; }
.road .lane, .road .done { position: absolute; inset-inline-start: 0; top: 30px; height: 4px; border-radius: 2px; }
.road .lane { inset-inline-end: 0; background: var(--fill-2); }
.road .done { background: var(--ink); width: 0; transition: width 1.2s linear; }
.road .car, .road .cafe-dot, .road .start { position: absolute; top: 32px; translate: -50% -50%; }
[dir=rtl] .road .car, [dir=rtl] .road .cafe-dot, [dir=rtl] .road .start { translate: 50% -50%; }
.road .car { inset-inline-start: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center;
  transition: inset-inline-start 1.2s linear; box-shadow: 0 0 0 4px var(--surface); }
[dir=rtl] .road .car svg { transform: scaleX(-1); }
.road .cafe-dot { inset-inline-start: 100%; width: 38px; height: 38px; border-radius: 11px; background: var(--fill); display: grid; place-items: center; }
.road .start { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--dot-orange); }
.road .start.lit { background: var(--dot-orange); }
.road .start-label { position: absolute; top: 0; translate: -50% 0; font-size: 12px; color: var(--label-2); white-space: nowrap; }
[dir=rtl] .road .start-label { translate: 50% 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--label-2); }
.steps li::before { content: ''; height: 4px; border-radius: 2px; background: var(--fill-2); }
.steps li.done::before, .steps li.now::before { background: var(--ink); }
.steps li.now { color: var(--label); font-weight: 600; }

/* ---------- Gifts ---------- */
.gift-card { display: flex; flex-direction: column; gap: 12px; }
.gift-head { display: flex; align-items: center; gap: 12px; }
.gift-msg { margin: 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--fill-2); font-size: 17px; line-height: 1.4; }
.gift-items { margin: 0; color: var(--label-2); font-size: 15px; }
.group + .group.gift-card { margin-top: 0; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep); padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; color: var(--label-2); font-size: 10.5px; font-weight: 500; }
.tabbar a[aria-current=page] { color: var(--ink); font-weight: 600; }

/* ---------- Misc ---------- */
.install { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.install img { border-radius: 10px; }
.install-actions { display: flex; gap: 6px; }
.danger-zone summary { cursor: pointer; color: var(--red); min-height: 24px; list-style: none; text-align: center; font-size: 17px; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] { display: flex; flex-direction: column; gap: 12px; }
.danger-zone .group-foot { margin: 0; }
.offline-bar { position: sticky; top: 0; z-index: 50; text-align: center; font-size: 14px; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--red-tint); color: var(--red); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--label); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker { overflow-x: auto; }
}

/* Numbers like −50% always read left to right, also inside Arabic text */
.off, .tick b { direction: ltr; unicode-bidi: isolate; }

/* Greeb logo: colour version on light backgrounds, white-lettered version in dark mode */
.brand-img { display: block; height: auto; max-width: 100%; }
.brand-img.d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .brand-img.l { display: none; }
  :root:not([data-theme=light]) .brand-img.d { display: block; }
}
:root[data-theme=dark] .brand-img.l { display: none; }
:root[data-theme=dark] .brand-img.d { display: block; }

/* Lalezar: Greeb's display font for Arabic headlines, main buttons, offers and the قريب wordmark.
   One weight only (it's already bold), so these stay at 400 to avoid fake bolding.
   Small text keeps the phone's own font so it stays easy to read. Falls back to the system font if it can't load. */
:root { --display: 'Lalezar', var(--font); }
.mark-ar { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--label); }
html[lang=ar] :is(.large-title, .welcome-title, .status .state, .sheet-head h2, .features b, .btn-primary, .offer-chip b, .tick, .gift-head b, .hello) {
  font-family: var(--display); font-weight: 400; letter-spacing: 0; }
html[lang=ar] :is(.large-title, .welcome-title, .status .state) { line-height: 1.35; }
html[lang=ar] .welcome-title { font-size: 34px; }
html[lang=ar] .tick b { font-family: var(--font); font-weight: 700; }

/* ---------- Café cards (spaced) and ratings ---------- */
.cafe-list { display: flex; flex-direction: column; gap: 10px; }
.cafe-list .row.cafe { background: var(--surface); border-radius: var(--radius); padding: 14px 14px; padding-inline-end: 10px; }
.cafe-list .row.cafe::before { display: none; }
.cafe-list .empty { background: var(--surface); border-radius: var(--radius); }
.cafe-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cafe-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; color: var(--label); white-space: nowrap; flex: none; }
.rating svg { color: #F2A900; }
.rating b { font-weight: 600; }
.rating .rc, .rc { color: var(--label-2); font-size: 13px; }
.rating.new { font-size: 12px; font-weight: 600; color: var(--label-2); background: var(--fill); padding: 1px 7px; border-radius: 6px; }
.sub .rating { vertical-align: -2px; }

/* ---------- Customer level ---------- */
.level-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "medal text" "next next"; gap: 10px 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); color: var(--label); text-decoration: none; }
.medal { grid-area: medal; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); }
.lv-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.lv-text small { font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.lv-text b { font-size: 20px; font-weight: 700; line-height: 1.2; }
.lv-stats { font-size: 13px; color: var(--label-2); }
.lv-next { grid-area: next; display: flex; flex-direction: column; gap: 6px; }
.lv-next small { font-size: 13px; color: var(--label-2); }
.lv-bar { height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.lv-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.lv-regular .medal { background: var(--ink); color: var(--on-ink); }
.lv-gold .medal { background: #F4E3B0; color: #7A5A00; }
.lv-gold .lv-bar span { background: #C99A00; }
.lv-perfect .medal { background: linear-gradient(135deg, #DF0015, #00743C); color: #fff; }
.lv-perfect .lv-bar span { background: linear-gradient(90deg, #DF0015, #00743C); }

/* ---------- Rate the café ---------- */
.rate-box { display: flex; flex-direction: column; gap: 14px; }
.rate-box h2 { margin: 0; font-size: 20px; font-weight: 700; }
.stars { display: flex; gap: 4px; }
.stars button { width: 48px; height: 48px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: var(--fill-2); border-radius: 10px; }
.stars button.on { color: #F2A900; }
.stars button:active { transform: scale(.92); }
.rate-done { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.stars-static { display: inline-flex; color: #F2A900; }
.btn-outline { background: none; border: 1px solid var(--sep); color: var(--label); }
.rating.mine { font-size: 13px; }
html[lang=ar] :is(.lv-text b, .rate-box h2) { font-family: var(--display); font-weight: 400; }

/* ---------- Your usual ---------- */
.usual { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); }
.usual-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.usual-text small { font-size: 12px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; }
.usual-text b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usual .btn { flex: none; }

/* ---------- Promo banners: three square tiles ---------- */
.banners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.banners:empty { display: none; }
.banner { position: relative; overflow: hidden; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; }
.banner small { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.banner b { font-size: 15px; font-weight: 800; line-height: 1.15; }
.banner > span:not([aria-hidden]) { font-size: 11.5px; opacity: .8; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.banner [aria-hidden] { position: absolute; inset-inline-end: 12px; bottom: 10px; }
.b-specials { background: #111; color: #fff; }
.b-specials .b-big { font-size: 24px; font-weight: 800; color: #FF3B47; letter-spacing: -.03em; direction: ltr; line-height: 1; }
.b-new { background: var(--surface); color: var(--label); border: 1px solid var(--sep); }
.b-new .b-dots { display: flex; gap: 5px; }
.b-new .b-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.b-new .b-dots i:nth-child(1) { background: #DF0015; } .b-new .b-dots i:nth-child(2) { background: #00743C; } .b-new .b-dots i:nth-child(3) { background: var(--label); }
.b-sweets { background: #F7E4DA; color: #3A2016; }
.b-sweets b { font-family: 'Lalezar', sans-serif; font-weight: 400; font-size: 21px; line-height: 1.25; }
.b-sweets .b-icon { color: #B5502E; }
@media (min-width: 560px) {
  .banner { padding: 16px; } .banner b { font-size: 19px; } .b-sweets b { font-size: 26px; }
  .banner small { font-size: 11px; } .banner > span:not([aria-hidden]) { font-size: 13px; } .b-specials .b-big { font-size: 32px; }
}
.special .off-big { width: 56px; height: 48px; border-radius: 10px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; direction: ltr; }

/* ---------- Gift cards ---------- */
.gcard { position: relative; overflow: hidden; aspect-ratio: 1.6; width: 100%; max-width: 420px; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.gcard.small { width: 112px; padding: 10px; border-radius: 12px; gap: 0; box-shadow: none; }
.gc-motif { position: absolute; top: 14px; inset-inline-end: 14px; opacity: .9; }
.gcard.small .gc-motif { top: 8px; inset-inline-end: 8px; }
.gc-brand { position: absolute; top: 16px; inset-inline-start: 18px; font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.gcard.small .gc-brand { display: none; }
.gc-title { font-size: 26px; font-weight: 800; line-height: 1.1; }
.gcard.small .gc-title { font-size: 12.5px; font-weight: 700; }
.gc-msg { font-size: 15px; line-height: 1.35; opacity: .92; }
.gc-from { font-size: 13px; opacity: .75; }
.gc-coffee { background: #111; color: #fff; }
.gc-coffee .gc-brand { color: #fff; }
.gc-thanks { background: #EFE5D5; color: #2B2118; }
.gc-birthday { background: #DF0015; color: #fff; background-image: radial-gradient(circle at 18% 30%, rgba(255,255,255,.35) 0 3px, transparent 4px), radial-gradient(circle at 70% 18%, rgba(255,230,120,.8) 0 3px, transparent 4px), radial-gradient(circle at 42% 52%, rgba(255,255,255,.3) 0 2px, transparent 3px), radial-gradient(circle at 86% 62%, rgba(255,230,120,.7) 0 2.5px, transparent 3.5px); }
.gc-eid { background: #00743C; color: #fff; background-image: radial-gradient(circle at 80% 120%, rgba(255,255,255,.12) 0 40%, transparent 41%); }
.gc-congrats { background: #F4E3B0; color: #3D2E00; background-image: radial-gradient(circle at 15% 25%, rgba(201,154,0,.35) 0 3px, transparent 4px), radial-gradient(circle at 60% 15%, rgba(201,154,0,.3) 0 2px, transparent 3px); }
.gc-preview { display: flex; justify-content: center; }
.gc-picker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.gc-picker label { position: relative; flex: none; cursor: pointer; border-radius: 14px; }
.gc-picker input { position: absolute; opacity: 0; }
.gc-picker input:checked + .gcard { outline: 3px solid var(--ink); outline-offset: 2px; }
.gc-picker input:focus-visible + .gcard { outline: 3px solid var(--label-2); outline-offset: 2px; }
.gc-send { display: flex; flex-direction: column; gap: 10px; }
.gc-send-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.gc-send-head small { color: var(--label-2); font-size: 14px; }
.gc-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
.gc-pick { all: unset; cursor: pointer; border-radius: 12px; flex: none; }
.gc-pick:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.gc-pick:active .gcard { transform: scale(.96); }
.gift-card .gcard { max-width: none; }
.gift-head .gcard.small { width: 72px; }
.gift-draft { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); }
.gift-draft .gcard.small { width: 72px; }
html[lang=ar] :is(.gc-title, .banner b, .gc-send-head h2) { font-family: var(--display); font-weight: 400; }

/* ---------- Favourites ---------- */
.fav { width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--label-3); flex: none; padding: 0; }
.fav.on { color: #DF0015; }
.fav.on svg path { fill: currentColor; }
.fav:active { transform: scale(.88); }
.nav .fav { color: var(--ink); width: 44px; height: 44px; }
.nav .fav.on { color: #DF0015; }
.sheet-acts { display: flex; align-items: center; gap: 4px; }
.dish-tile.small { width: 56px; height: 56px; }
.fav-item .row-text b { font-size: 16px; }
.sweets-head { margin: 4px 2px 2px; font-family: 'Lalezar', sans-serif; font-weight: 400; font-size: 30px; line-height: 1.3; }
.tabbar nav { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 559px) {
  .banner > span:not([aria-hidden]) { display: none; }   /* phones: title + icon only, so nothing overlaps */
  .banner b { font-size: 16px; }
  .b-sweets b { font-size: 22px; }
}
.b-sweets .b-icon { top: 10px; bottom: auto; }

/* Arabic: every text in the promo banners uses Lalezar (titles, the small "استكشف" label, subtitles, −50%). */
html[lang=ar] .banner, html[lang=ar] .banner :is(small, b, span) { font-family: 'Lalezar', sans-serif; font-weight: 400; letter-spacing: 0; }
html[lang=ar] .banner small { font-size: 12px; text-transform: none; opacity: .7; }
html[lang=ar] .banner b { font-size: 19px; line-height: 1.25; }
html[lang=ar] .b-sweets b { font-size: 22px; }
html[lang=ar] .banner > span:not([aria-hidden]) { font-size: 13px; }
@media (min-width: 560px) { html[lang=ar] .banner b { font-size: 24px; } html[lang=ar] .b-sweets b { font-size: 27px; } }

/* ---------- Map ---------- */
.search-row { display: flex; gap: 8px; align-items: center; }
.search-row .search { flex: 1; min-width: 0; }
.map-btn { flex: none; height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 10px; background: var(--ink); color: var(--on-ink);
  font-size: 15px; font-weight: 600; text-decoration: none; }
.map-btn:active { opacity: .8; }
.map-wrap { position: relative; height: 58vh; height: 58dvh; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--fill); }
.map { position: absolute; inset: 0; }
.map-locate { position: absolute; top: 12px; inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.map-pin { background: var(--ink); color: var(--on-ink); font: 600 13px/1 -apple-system, system-ui, sans-serif; padding: 7px 10px; border-radius: 999px; white-space: nowrap;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); position: relative; transform-origin: 50% 100%; transition: transform .15s; }
.map-pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; translate: -50% 0; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.map-pin.closed { background: var(--surface); color: var(--label-2); }
.map-pin.closed::after { border-top-color: var(--surface); }
.map-pin.on { transform: scale(1.12); background: #E1251B; color: #fff; }
.map-pin.on::after { border-top-color: #E1251B; }
.map-me { width: 16px; height: 16px; border-radius: 50%; background: #0A84FF; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(10, 132, 255, .25); }
.map-card { position: absolute; left: 12px; right: 12px; bottom: 12px; background: var(--surface); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22); }
.map-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-inline-end: 34px; }
.map-card-name { font-size: 17px; }
.map-card small { color: var(--label-2); font-size: 14px; }
.map-card-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 36px; height: 36px; border: 0; background: none; font-size: 24px; color: var(--label-2); border-radius: 50%; }
.map-card-btns { display: flex; gap: 8px; margin-top: 8px; }
.map-card-btns .btn { flex: 1; }
.map-row { display: flex; align-items: center; gap: 10px; }
.map-row-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.map-dir { flex: none; }

/* ================= Greeb home redesign: calm, roomy, liquid glass ================= */
body { font-family: var(--font); }
.page { gap: 14px; padding-inline: 20px; }
body.with-tabs .page { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
.group { border-radius: var(--radius); }

/* header: logo + greeting, theme button on the right */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; margin: 10px 0 8px; }
.hh-left { display: flex; flex-direction: column; gap: 6px; }
.home-head .brand-img { height: 20px; width: auto; align-self: flex-start; object-fit: contain; }
.home-head .hello { margin: 0; font-size: 15px; font-weight: 500; color: var(--label-2); }
.theme-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sep); background: var(--surface); color: var(--label); display: grid; place-items: center; padding: 0; box-shadow: 0 1px 2px rgba(18, 21, 26, .06); }
.theme-btn:active { transform: scale(.94); }

/* level card */
.level-card { background: var(--level-bg); border-radius: 22px; padding: 18px 20px; gap: 16px 14px; }
.medal { width: 42px; height: 42px; background: var(--surface); color: var(--label); }
.lv-text small { font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.lv-text b { font-size: 19px; letter-spacing: -.01em; }
.lv-bar { height: 4px; border-radius: 2px; background: var(--level-track); }
.lv-bar span { border-radius: 2px; background: var(--ink); }
#level { margin-bottom: 14px; }

/* sections */
.home-sec { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.home-sec[hidden] { display: none; }
.sec-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

/* your usual */
.usual { gap: 14px; padding: 16px 16px 16px 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.usual-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--fill); display: grid; place-items: center; color: var(--label); flex: none; }
.usual-text b { font-size: 16px; }
.usual-text small { font-size: 13px; font-weight: 500; color: var(--label-2); text-transform: none; letter-spacing: 0; }
.usual .btn-small { min-height: 40px; border-radius: 999px; padding: 0 18px; font-size: 14px; font-weight: 700; }

/* explore: horizontal row of cards */
.banners { display: flex; gap: 12px; overflow-x: auto; margin-inline: -20px; padding: 2px 20px 8px; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.banners .banner { flex: none; width: 156px; height: 180px; aspect-ratio: auto; border-radius: 22px; padding: 16px; scroll-snap-align: start; gap: 0; }
.banner small { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; opacity: 1; }
.banner .b-sub { font-size: 12.5px; line-height: 1.4; }
.b-specials { background: var(--specials); color: #fff; }
.b-specials small { color: rgba(255, 255, 255, .72); }
.b-specials .b-sub { font-size: 14px; font-weight: 600; line-height: 1.35; margin-top: 8px; color: #fff; display: block; }
.banner.b-specials .b-big { position: static; margin-top: auto; font-size: 38px; font-weight: 800; letter-spacing: -.04em; color: #FF6B6B; line-height: 1; }
.b-new { padding: 0 !important; background: var(--surface); color: var(--label); border: 0; box-shadow: var(--shadow); overflow: hidden; }
.banner .b-cover { position: relative; inset: auto; display: block; height: 98px; flex: none; background: var(--cover); }
.b-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.b-cover .c1 { fill: var(--cover-1); } .b-cover .c2 { fill: var(--cover-2); }
.b-cover .cup { fill: none; stroke: var(--cover-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-cover .cup-fill { fill: var(--cover-cup); }
.b-cover .spark { fill: #E1251B; } .b-cover .spark2 { fill: var(--cover-ink); opacity: .55; }
.b-badge { position: absolute; top: 12px; left: 12px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--surface); color: var(--label);
  font-size: 10px; font-weight: 800; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 5px; }
.b-badge i { width: 6px; height: 6px; border-radius: 50%; background: #E1251B; }
.b-avs { position: absolute; left: 12px; bottom: -13px; display: flex; }
.b-avs i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); font: 800 11px/1 var(--font); font-style: normal; display: grid; place-items: center; }
.b-avs i + i { margin-left: -8px; }
.av-ink { background: var(--ink); color: var(--on-ink); } .av-red { background: #E1251B; color: #fff; } .av-sand { background: var(--cover-2); color: var(--label); }
.b-body { padding: 20px 14px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.b-new .b-body b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.b-new .b-sub { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.b-sweets { background: var(--beige); color: var(--beige-ink); }
.b-sweets b { font-family: 'Lalezar', sans-serif; font-weight: 400; font-size: 27px; line-height: 1.25; text-align: right; direction: rtl; }
.b-sweets .b-sub { margin-top: auto; opacity: .85; display: block; }
.banner > span:not([aria-hidden]) { display: block; -webkit-line-clamp: unset; }

/* search + map */
.search-row { gap: 10px; }
.search input { height: 52px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; font-weight: 500; padding-inline-start: 42px; }
.search svg { inset-inline-start: 16px; }
.map-btn { height: 52px; border-radius: 18px; background: var(--surface); color: var(--label); box-shadow: var(--shadow); padding: 0 18px; }

/* filter pills */
.pills { display: flex; gap: 8px; margin-top: 4px; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pills span { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--sep); color: var(--label-2);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.pills input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 700; }
.pills input:focus-visible + span { outline: 2px solid var(--label); outline-offset: 2px; }

/* café cards */
.cafe-list { gap: 12px; }
.cafe-list .row.cafe { border-radius: 22px; padding: 16px 10px 16px 16px; gap: 14px; box-shadow: var(--shadow); }
.cafe-list .mono { width: 48px; height: 48px; border-radius: 16px; font-weight: 700; }
.st-open { color: var(--status-green); font-weight: 600; }
.status-dot { width: 7px; height: 7px; }

/* liquid-glass tab bar */
.tabbar { inset-inline: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 0; border: 1px solid var(--glass-edge); border-radius: 34px;
  background: var(--glass); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
.tabbar nav { height: 66px; padding: 6px; gap: 2px; max-width: none; }
.tabbar a { border-radius: 28px; gap: 3px; font-weight: 600; }
.tabbar a[aria-current=page] { color: var(--label); font-weight: 700; background: var(--glass-pill); box-shadow: var(--glass-pill-shadow); }
@media (min-width: 680px) { .tabbar { inset-inline: calc(50% - 320px); } }
body.with-tabs::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 110px; pointer-events: none; z-index: 29;
  background: linear-gradient(180deg, transparent, var(--bg)); opacity: .85; }
body.with-tabs .bottom-bar { bottom: calc(92px + env(safe-area-inset-bottom)); }

