/* Delivery. One stylesheet for every page. Phone first: the shop page, order page and rider app
   are one column; the console is a top bar with tabs, a map beside the board on wide screens. */
:root {
  --bg: #f6f4f1; --surface: #ffffff; --ink: #1d1a17; --muted: #6b635b; --line: #e3ddd5;
  --accent: #D9481C; --accent-ink: #ffffff; --accent-soft: #fdeee6;
  --good: #187a43; --good-soft: #e2f4e9; --warn: #9a5b00; --warn-soft: #fcefd9; --bad: #b3261e; --bad-soft: #fbe6e4;
  --info: #1d5fa8; --info-soft: #e3eefb; --rider: #1d5fa8;
  --f-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f; --surface: #1e1a17; --ink: #efe9e3; --muted: #a89d92; --line: #342d28;
    --accent: #fb8a4c; --accent-ink: #1d0c03; --accent-soft: #3a2116;
    --good: #6fd39a; --good-soft: #15301f; --warn: #f0b85a; --warn-soft: #33270f; --bad: #ff8d84; --bad-soft: #3a1a17;
    --info: #8cb8f0; --info-soft: #172638; --rider: #4f8fe0; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 9px 14px; cursor: pointer; font-size: 15px; font-weight: 700; text-decoration: none; color: var(--ink); min-height: 42px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.good { background: var(--good); color: #fff; border-color: var(--good); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary:disabled { opacity: 1; background: var(--line); color: var(--muted); border-color: var(--line); }   /* still readable: it says why */
.place-why { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { resize: vertical; min-height: 70px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
label.f { display: grid; gap: 5px; font-size: 14px; font-weight: 700; }
label.f .hint { font-weight: 400; color: var(--muted); }
label.f input, label.f select, label.f textarea { font-weight: 400; }
/* iPhone Safari zooms into any field whose text is under 16px when it gets focus; never let one be smaller. */
input, select, textarea { font-size: max(16px, 1rem) !important; }
@media (max-width: 760px) { .board .col:has(> .list > .empty:only-child):not(:first-child) { display: none; } }
.check { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 15px; }
.check input { width: 20px; height: 20px; min-height: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.stack { display: grid; gap: 12px; }
.err { color: var(--bad); font-weight: 700; font-size: 14px; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.idle { background: var(--line); color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.empty { color: var(--muted); font-size: 15px; padding: 18px 4px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; z-index: 3000; max-width: calc(100vw - 32px); text-align: center; }
.toast { pointer-events: none; }          /* never in the way of the button under it */
.toast.tap { pointer-events: auto; cursor: pointer; }
body:has(.cartbar:not([hidden])) .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
dialog { border: 0; border-radius: var(--r); padding: 20px; background: var(--surface); color: var(--ink); width: min(94vw, 460px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live-dot.on { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot.on { animation: none; } }

/* map markers */
.leaflet-container { font: inherit; background: var(--bg); }
.mk { background: none; border: 0; }
.mk-rider { position: relative; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.mk-rider svg { width: 34px; height: 34px; display: block; }
.mk-rider.stale { opacity: .55; }
.mk-rider span { position: absolute; left: 36px; top: 7px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 6px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mk-pin { font-size: 24px; line-height: 30px; text-align: center; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }

/* landing / sign in */
.landing { max-width: 1040px; margin: 0 auto; padding: 28px 16px 60px; display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; align-items: start; }
.landing .pitch h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.02em; }
.landing .pitch p { font-size: 18px; color: var(--muted); }
.landing .pitch ul { padding-left: 20px; display: grid; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-style: normal; }
.brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; display: block; }
a.brand { text-decoration: none; color: var(--ink); }
/* "Bringaa is a product of byteloom": the company mark at the foot of the public pages and the rider's Me tab */
.byline { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 22px 16px 30px; }
.byline img { height: 20px; width: auto; }
@media (prefers-color-scheme: dark) { .byline img { filter: brightness(0) invert(1); opacity: .75; } }
.tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 4px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 760px) { .landing { grid-template-columns: 1fr; } }

/* console */
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 700; }
.top nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.top nav a .count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.page { padding: 16px; max-width: 1400px; margin: 0 auto; }
.board-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; display: flex; justify-content: space-between; }
.col .list { display: grid; gap: 10px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.ocard.new { border-left-color: var(--warn); }
.ocard.preparing, .ocard.ready { border-left-color: var(--info); }
.ocard.out { border-left-color: var(--good); }
.ocard .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ocard .head b { font-size: 16px; }
.ocard ul { margin: 0; padding-left: 18px; }
.ocard .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ocard select { min-height: 34px; padding: 4px 8px; font-size: 14px; width: auto; flex: 1; }
.side { position: sticky; top: 70px; display: grid; gap: 12px; }
.side .mapbox { height: 360px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.done-list { display: grid; gap: 6px; font-size: 14px; }
.done-list div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list-rows { display: grid; }
.list-rows .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list-rows .r .who b { display: block; }
.list-rows .r .who span { color: var(--muted); font-size: 14px; }
.cat-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; }
.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pickmap { height: 320px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.qr { background: #fff; padding: 10px; border-radius: 8px; display: grid; place-items: center; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; background: var(--bg); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .board-wrap { grid-template-columns: 1fr; } .side { position: static; } }
@media (max-width: 760px) { .board { grid-template-columns: 1fr; } .settings { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* shop (customer) */
.shop { max-width: 640px; margin: 0 auto; padding: 0 0 120px; }
.menu { padding: 8px 16px; }
.menu h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.qty button { border: 0; background: none; width: 38px; height: 38px; font-size: 20px; font-weight: 700; cursor: pointer; color: var(--accent); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); z-index: 1000; }
.cartbar .in { max-width: 608px; margin: 0 auto; }
.checkout { padding: 16px; display: grid; gap: 14px; }
.sum { display: grid; gap: 4px; font-size: 15px; }
.sum div { display: flex; justify-content: space-between; }
.sum .total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.closed { margin: 12px 16px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); font-weight: 700; }

/* order tracking & rider app */
.track { max-width: 640px; margin: 0 auto; display: grid; grid-template-rows: auto auto 1fr; min-height: 100vh; }
.status-card { margin: 12px 16px; background: var(--surface); border-radius: var(--r); padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; }
.status-card .big { font-size: 26px; font-weight: 700; }
.status-card .eta { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.steps div { height: 6px; border-radius: 3px; background: var(--line); }
.steps div.on { background: var(--accent); }
.steps-l { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }
.trackmap { min-height: 300px; height: 46vh; margin: 0 16px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.details { margin: 12px 16px 40px; }
.rider-app { max-width: 640px; margin: 0 auto; padding: 0 0 40px; }
.job { margin: 12px 16px; display: grid; gap: 10px; }
.job .addr { font-size: 18px; font-weight: 700; }
.job .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shift { margin: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.switch { position: relative; width: 58px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(26px); }
.setup ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* small shared bits */
.pill.tag { background: var(--accent-soft); color: var(--accent); }
.nowrap { flex-wrap: nowrap; }
.center { display: grid; place-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
dialog.wide { width: min(96vw, 720px); }
dialog form.stack { max-height: calc(100dvh - 80px); overflow: auto; padding: 2px; }
.dlg-acts { position: sticky; bottom: -2px; background: var(--surface); padding-top: 8px; }
.fs { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; min-width: 0; }
.fs legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.checks { display: grid; gap: 6px; }
.checks.inline { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks .check { font-weight: 400; }
.check.gopt { align-items: flex-start; } .check.gopt input { margin-top: 2px; flex: none; }
label.f.inline { display: inline-flex; align-items: center; gap: 8px; }
.switch.sm { width: 46px; height: 26px; }
.switch.sm span::after { width: 18px; height: 18px; top: 4px; left: 4px; }
.switch.sm input:checked + span::after { transform: translateX(20px); }
.ocard .opts { color: var(--muted); font-size: 13px; }
.ocard .opts.note { font-style: italic; }
.mini-logo { width: 22px; height: 22px; border-radius: 6px; vertical-align: middle; margin-right: 6px; object-fit: cover; }

/* console: menu */
.menu-tools .row { gap: 8px; }
.menu-tools input[type=search] { max-width: 260px; margin-left: auto; min-height: 40px; }
.menu-cats { display: grid; gap: 14px; margin-top: 14px; }
.mcat-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mcat-h h2 { font-size: 18px; margin-bottom: 4px; }
.mrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow.dim .who, .mrow.dim .thumb img { opacity: .55; }
.mrow .who { display: grid; gap: 3px; min-width: 0; }
.mrow .who b { overflow-wrap: anywhere; }
.thumb { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; padding: 0; cursor: pointer; display: grid; place-items: center; font-size: 22px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.empty-menu { text-align: center; padding: 30px 16px; }
.item-top { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.photo-pick { display: grid; gap: 8px; justify-items: start; }
.photo-pick .ph { width: 170px; height: 170px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.opt-head, .opt-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 56px 64px 84px; gap: 8px; align-items: center; }
.opt-head span:nth-child(n+3) { text-align: center; }
.opt-head { padding: 0 2px 4px; }
.opt-rows { display: grid; gap: 6px; margin-bottom: 8px; }
.opt-row input:not([type=checkbox]) { min-height: 38px; padding: 6px 10px; }
.opt-row input[type=checkbox] { width: 20px; height: 20px; min-height: 0; }
@media (max-width: 760px) {
  .mrow { grid-template-columns: 56px minmax(0, 1fr); }
  .mrow .thumb { width: 56px; height: 56px; }
  .mrow .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .menu-tools input[type=search] { max-width: none; margin-left: 0; }
  .item-top { grid-template-columns: 1fr; }
  .opt-head, .opt-row { grid-template-columns: minmax(0, 1fr) 70px 46px 46px 80px; gap: 6px; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* console: shop look */
.look { position: relative; padding-bottom: 34px; }
.cover-pick { height: 150px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); overflow: hidden; display: grid; place-items: center; text-align: center; padding: 0 12px; }
.cover-pick img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick:has(img) { padding: 0; border-style: solid; }
.logo-pick { position: absolute; left: 14px; bottom: 0; width: 72px; height: 72px; border-radius: 16px; border: 3px solid var(--surface); background: var(--bg); overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.logo-pick img { width: 100%; height: 100%; object-fit: cover; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gallery-edit figure { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.gallery-edit img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.gallery-edit figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* shop page: header */
.shop-head { background: var(--surface); border-bottom: 1px solid var(--line); display: grid; gap: 10px; padding: 18px 16px 14px; }
.shop-head .cover { margin: -18px -16px 0; height: 190px; overflow: hidden; background: var(--bg); }
.shop-head .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-id { display: flex; gap: 12px; align-items: center; }
.shop-head.has-cover .shop-id { align-items: flex-start; }
.shop-head.has-cover .logo { margin-top: -46px; }           /* only the logo sits over the cover */
.shop-head .logo { width: 72px; height: 72px; flex: none; border-radius: 16px; overflow: hidden; border: 3px solid var(--surface); background: var(--surface); box-shadow: var(--shadow); }
.shop-head .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-head h1 { font-size: 26px; }
.shop-head .about { margin: 0; font-size: 15px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.gallery button { flex: none; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; scroll-snap-align: start; background: var(--bg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* shop page: menu */
.cat-bar { position: sticky; top: 0; z-index: 900; background: var(--bg); padding: 10px 16px 8px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.cat-bar input { min-height: 40px; padding: 8px 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.chips a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.msec { scroll-margin-top: 110px; }
.msec .sec-d { margin: -2px 0 6px; }
.msec .hours { margin: 0 0 6px; color: var(--warn); font-weight: 700; font-size: 14px; }
.mi { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.mi:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.mi h3 { font-size: 17px; margin: 0 0 3px; }
.mi p { margin: 0 0 6px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mi-price { margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.mi-price s { color: var(--muted); font-size: 14px; }
.mi.off .mi-text, .mi.off .mi-img img { opacity: .5; }
.mi-img { position: relative; width: 112px; height: 112px; }
.mi-img img { width: 112px; height: 112px; object-fit: cover; border-radius: 12px; display: block; background: var(--line); }
.mi-img.none { height: auto; min-height: 44px; display: grid; justify-items: end; }
.mi-img .add, .mi-img .qty { position: absolute; right: 6px; bottom: 6px; }
.mi-img.none .add, .mi-img.none .qty { position: static; }
.add { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--accent); font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.qty.sm button { width: 34px; height: 34px; font-size: 18px; }
.qty button:disabled { opacity: .35; cursor: default; }
.cart-lines { display: grid; }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-r { display: grid; justify-items: end; gap: 4px; align-content: start; }

/* shop page: the item sheet (bottom sheet on phones) */
dialog.sheet { padding: 0; width: min(100vw, 560px); max-height: min(92dvh, 900px); overflow: hidden; }
dialog.sheet form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; max-height: min(92dvh, 900px); }
.sheet-x { position: absolute; right: 10px; top: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 16px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.sheet-img { aspect-ratio: 4 / 3; max-height: 38dvh; overflow: hidden; background: var(--bg); }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { overflow: auto; padding: 16px; display: grid; gap: 10px; align-content: start; }
.sheet-body h2 { font-size: 22px; padding-right: 40px; }
.sheet-body p { margin: 0; }
.ogroup { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.ogroup legend { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 6px 0; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--accent); }
.opt.off { color: var(--muted); cursor: default; }
.opt .num { color: var(--muted); font-size: 14px; margin-left: 4px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .btn { flex: 1; }
.sheet-err { padding: 0 16px 12px; }
@media (max-width: 600px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 16px 16px 0 0; }
}
.photo-view { padding: 10px; width: min(96vw, 900px); }
.photo-view img { width: 100%; max-height: 80dvh; object-fit: contain; display: block; border-radius: 8px; }
.photo-view p { margin: 8px 4px 0; }

/* home: every shop */
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; max-width: 1180px; margin: 0 auto; }
.home-top .brand { text-decoration: none; color: var(--ink); }
.home { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; display: grid; gap: 14px; }
.home-hero { display: grid; gap: 10px; padding: 8px 0 4px; }
.home-hero h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -.02em; }
.home-hero p { margin: 0; font-size: 17px; }
.home-search { display: flex; gap: 8px; }
.home-search input { flex: 1; min-height: 48px; font-size: 16px; }
.home-search .btn { flex: none; min-height: 48px; }
.home-chips { padding-bottom: 2px; }
.home-chips button { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.home-chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.shop-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.shop-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 26px rgba(0,0,0,.1); }
.shop-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .shop-card, .shop-card:hover { transition: none; transform: none; } }
.sc-pic { position: relative; aspect-ratio: 16 / 9; background: var(--accent-soft); }
.sc-pic > img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card.is-closed .sc-pic > img:first-child { filter: grayscale(.7) brightness(.85); }
.sc-none { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; font-weight: 700; color: var(--accent); }
.sc-status { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(20,17,15,.78); color: #fff; }
.sc-status.open { background: var(--good); }
.sc-badges { position: absolute; right: 10px; top: 10px; left: 90px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.ind { padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.25); white-space: nowrap; }
.ind.offer { background: #fde047; color: #422006; }
.ind.new { background: #fff; color: #6d28d9; }
.ind.fresh { background: #fff; color: var(--info); }
.sc-logo { position: absolute; left: 12px; bottom: -22px; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 3px solid var(--surface); background: var(--surface); box-shadow: var(--shadow); }
.sc-body { padding: 14px 14px 14px; display: grid; gap: 4px; align-content: start; }
.sc-pic:has(.sc-logo) + .sc-body { padding-top: 28px; }
.sc-body h2 { font-size: 19px; }
.sc-body p { margin: 0; }
.sc-cats { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-meta { font-size: 14px; }
.sc-meta .far { color: var(--bad); }
.sc-labels { margin-top: 4px; gap: 6px; }
.home-biz { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 520px) { .home-search { flex-wrap: wrap; } .home-search .btn { width: 100%; } .shop-grid { grid-template-columns: 1fr; } }

/* console: riders beside the board */
.rider-side { display: grid; gap: 2px; margin-top: 6px; }
.rider-side .rs { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rider-side .rs:last-child { border-bottom: 0; }
.rider-side .rs:not(.on) { color: var(--muted); }
.rider-side .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.rider-side .dot.live { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.rider-side .dot.quiet { background: var(--warn); }

/* shop page: header buttons and the shop info sheet */
.linkish { all: unset; cursor: pointer; }
.linkish:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 4px; }
.shop-head .logo { padding: 0; cursor: pointer; }
.shop-head .cover { cursor: pointer; }
.si { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: min(92dvh, 900px); }
.si .sheet-body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.si-facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.si-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.si-facts span { color: var(--muted); }
.si-facts b { text-align: right; }
.si-photos h3 { font-size: 16px; margin: 6px 0 8px; }
.si-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.si-grid button { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--bg); }
.si-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.si-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12.5px; font-weight: 700; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.rider-side button.rs { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 7px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.rider-side button.rs:hover { background: var(--bg); }
.rider-side button.rs:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.map-btns { display: flex; gap: 6px; }
.map-btns .btn { box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.board-wrap.big-map { grid-template-columns: minmax(0, 1fr) minmax(420px, 46%); }
.board-wrap.big-map .side .mapbox { height: calc(100dvh - 120px); }
.board-wrap.big-map .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .board-wrap.big-map { grid-template-columns: 1fr; } .board-wrap.big-map .side .mapbox { height: 70dvh; } .board-wrap.big-map .side { order: -1; } }
.rider-side .slow { display: block; color: var(--warn); font-weight: 700; }

/* ---------- bottom tab bar (customer pages and the rider app) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 4px 4px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700; transition: color .2s, transform .15s; }
.tabbar a:active { transform: scale(.94); }
.tabbar svg { width: 24px; height: 24px; transition: transform .25s cubic-bezier(.2,.8,.2,1.2); }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"] svg { transform: translateY(-2px) scale(1.08); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; font-style: normal; }
.tabbar .badge.warn { background: var(--warn); color: #fff; }
.tabbar .badge.pop { animation: pop .35s cubic-bezier(.2,.8,.2,1.4); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
body.has-tabbar { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
body.has-tabbar .cartbar { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); border-top: 0; background: none; padding-top: 0; }
body.has-tabbar .cartbar .btn { box-shadow: 0 8px 24px rgba(0,0,0,.25); }
body.has-tabbar .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
body.has-tabbar:has(.cartbar:not([hidden])) .toast { bottom: calc(146px + env(safe-area-inset-bottom, 0px)); }
.cartbar .btn { display: flex; justify-content: space-between; }
.cartbar.in { animation: rise .35s cubic-bezier(.2,.8,.2,1.2); }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* motion: things entering */
.in { animation: fadeup .35s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } }
.add.bump, .btn.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.25); } }
.status-card.flash { animation: flash .9s; }
@keyframes flash { 20% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); } }
@media (prefers-reduced-motion: reduce) { .in, .cartbar.in, .add.bump, .status-card.flash, .tabbar .badge.pop { animation: none; } .tabbar svg, .tabbar a { transition: none; } }

/* customer pages: orders, account */
.page-c { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
.page-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 10px; }
.page-h h1 { font-size: 26px; }
.sec-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 16px 6px; }
.page-c .sec-h { margin-left: 0; }
.hint-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.olist { display: grid; gap: 10px; }
.ocard-c { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.ocard-c.new { border-left-color: var(--warn); } .ocard-c.preparing, .ocard-c.ready { border-left-color: var(--info); } .ocard-c.out { border-left-color: var(--good); }
.oc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.oc-top img, .oc-dot { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--accent-soft); display: block; }
.oc-items { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.oc-prog { display: grid; gap: 6px; }
.eta-s { color: var(--good); }
.empty-c { text-align: center; padding: 36px 16px; display: grid; gap: 8px; justify-items: center; }
.empty-c .big-ico { font-size: 44px; }
.empty-c p { margin: 0 0 6px; }
.acct-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: none; }

/* rider app */
.rider-top { position: static; }
.rider-app main section[data-panel] { padding-bottom: 8px; }
.ridermap { height: calc(100dvh - 230px); min-height: 320px; margin: 12px 16px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.shift.on { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.cap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.cap i, .meter { display: inline-block; width: 44px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; vertical-align: middle; }
.cap i::after, .meter b { content: ""; position: absolute; inset: 0; width: calc(var(--k) * 100%); background: var(--good); border-radius: 4px; transition: width .4s; }
.cap.full i::after { background: var(--warn); }
.meter { width: 34px; height: 7px; margin-right: 4px; }
.seq { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; margin-right: 8px; }
.job.offer { border-left: 4px solid var(--warn); }
.mk-pin .mk-num { position: absolute; left: -6px; top: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 11px; line-height: 18px; text-align: center; }
.mk-pin.out .mk-num, .mk-pin.out { filter: none; }
.mk-pin { position: relative; }

/* console: dispatch */
.dispatch-row { align-items: center; }
.dispatch-row .pill { flex: none; }
.modes .mode { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.modes .mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.modes .mode input { margin-top: 3px; width: 18px; height: 18px; min-height: 0; }
.modes .mode small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.rider-side .cap-s { display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  /* console on a phone: tabs at the bottom */
  .top nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .top nav a { text-align: center; font-size: 12px; padding: 8px 4px; }
  .top nav a[aria-current="page"] { background: none; position: relative; }
  .top nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .page { padding-bottom: 90px; }
  .top .row:last-child .btn { padding: 5px 8px; }
}

/* delivery code */
.code-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--good-soft); border: 1px dashed var(--good); }
.code-big { font-size: 34px; font-weight: 700; letter-spacing: .25em; font-variant-numeric: tabular-nums; color: var(--good); line-height: 1.1; }
.code-in { font-size: 32px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; min-height: 60px; }
.tabbar.five { grid-template-columns: repeat(5, 1fr); }
.job .from { font-size: 14px; }
.job.dim { opacity: .6; }
.rider-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rider-row .who { display: grid; gap: 3px; min-width: 0; }
.rider-row .who span { color: var(--muted); font-size: 14px; }
.join-code { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: .2em; font-weight: 700; }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 2px; }
.stat b { font-size: 28px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }
.tbl { overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.dim td { opacity: .55; }
.tbl select, .tbl input { min-height: 36px; padding: 4px 8px; width: auto; font-size: 14px !important; }
.money-card { display: grid; gap: 8px; }
.money-card .big { font-size: 24px; font-weight: 700; }
.money-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.banner { margin: 12px 16px 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.push-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 16px 0; }
.push-card.on { background: var(--good-soft); color: var(--good); font-weight: 700; font-size: 14px; }
.page-c .push-card, .page .push-card { margin: 0 0 12px; }
/* address book at checkout */
.addr-list { display: grid; gap: 8px; }
.addr-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.addr-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.addr-opt input { width: 20px; height: 20px; min-height: 0; margin: 0; }
.addr-opt .t { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
.addr-opt .x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; }
.addr-new-hint { color: var(--info); font-weight: 700; }
/* the "save the app, then notifications" sheet */
dialog.onboard { padding: 0; }
dialog.onboard .ob-body { padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.ob-head { display: flex; gap: 12px; align-items: center; }
.ob-head img { border-radius: 14px; box-shadow: var(--shadow); }
.ob-head h2 { font-size: 20px; }
.ob-head p { margin: 2px 0 0; }
.ob-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-steps li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); font-weight: 700; }
.ob-steps li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--line); color: var(--surface); flex: none; }
.ob-steps li.now { color: var(--ink); background: var(--accent-soft); }
.ob-steps li.now i { background: var(--accent); }
.ob-steps li.done { color: var(--good); }
.ob-steps li.done i { background: var(--good); }
.ob-guide { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ob-step { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 14px; max-width: 140px; }
.ob-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: #0a84ff; }
.ob-ico svg { width: 28px; height: 28px; }
.ob-arrow { font-size: 22px; color: var(--muted); }
.ob-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ob-list svg.inline { width: 16px; height: 16px; vertical-align: -3px; color: #0a84ff; }
.ob-text { margin: 0; text-align: center; }
.ob-bell { font-size: 44px; text-align: center; animation: ring 1.6s ease-in-out 2; }
@keyframes ring { 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: none; } }
.ob-pointer { text-align: center; font-size: 30px; animation: nudge 1s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateY(8px); } }
.ob-acts { justify-content: flex-end; }
.ob-acts .btn.primary { flex: 1; }
@media (prefers-reduced-motion: reduce) { .ob-bell, .ob-pointer { animation: none; } }

/* rider: the trip (every pickup and drop-off in order) */
.trip { margin: 12px 16px; display: grid; gap: 10px; border-left: 4px solid #1d4ed8; }
.trip-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.trip-steps li { display: grid; grid-template-columns: 26px 24px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; position: relative; font-size: 15px; }
.trip-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: -6px; width: 2px; background: var(--line); }
.trip-steps .ts-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: #1d4ed8; z-index: 1; }
.trip-steps li.pickup .ts-num { background: var(--good); }
.trip-steps .ts-ico { font-size: 18px; line-height: 26px; }
.trip-steps .ts-leg { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.trip-steps.compact li { grid-template-columns: 24px minmax(0, 1fr); font-size: 14px; padding: 6px 0; cursor: pointer; }
.trip-steps.compact .ts-num { width: 24px; height: 24px; }
.trip-steps.compact li:not(:last-child)::after { top: 30px; left: 11px; }
.mk-stop { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #1d4ed8; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 2px solid #fff; }
.mk-stop.pickup { background: var(--good); }
.mk-stop b { transform: rotate(45deg); color: #fff; font-size: 14px; }
.mk-stop span { display: none; }
/* rider map, normal and full screen */
.ridermap-wrap { position: relative; margin: 12px 16px; }
.ridermap-wrap .ridermap { margin: 0; height: calc(100dvh - 360px); min-height: 300px; }
.map-tools { position: absolute; top: 10px; right: 10px; z-index: 600; display: flex; gap: 6px; }
.map-tools .btn { box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.map-steps { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 8px; }
.ridermap-wrap.full { position: fixed; inset: 0; margin: 0; z-index: 2500; background: var(--bg); display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.ridermap-wrap.full .ridermap { height: 100%; min-height: 0; border-radius: 0; border: 0; }
.ridermap-wrap.full .map-tools { top: calc(10px + env(safe-area-inset-top, 0px)); }
.ridermap-wrap.full .map-steps { margin: 0; border-radius: 16px 16px 0 0; max-height: 38dvh; overflow: auto; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
body.map-full .tabbar { display: none; }

/* ---------- a map that can be made large (mapExpander) ---------- */
.mapx { position: relative; }
.mapx-btn { position: absolute; top: 10px; right: 10px; z-index: 600; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.trackmap + .mapx-btn { right: 26px; }
.mapx.big { position: fixed; inset: 0; z-index: 2500; background: var(--bg); }
.mapx.big > .leaflet-container { height: 100% !important; min-height: 0; margin: 0; border: 0; border-radius: 0; }
.mapx.big .mapx-btn, .mapx.big .leaflet-top { top: calc(10px + env(safe-area-inset-top, 0px)); }
.mapx.big .mapx-btn { right: 10px; }
.mapx:fullscreen { background: var(--bg); }
/* MapLibre's canvas sits under Leaflet's markers and routes */
.leaflet-gl-layer { z-index: 1; }
