:root {
  --bg: #faf6f1; --card: #ffffff; --ink: #221a14; --ink2: #5e5248; --mute: #8d8075; --line: #ece4da;
  --acc: #c2410c; --acc-ink: #ffffff; --acc-soft: #fdeee4; --bike: #0e7a6b; --ok: #1d8a4e; --warn: #b7791f; --bad: #c43d3d;
  --ok-soft: #e3f4ea; --warn-soft: #fbf0dc; --bad-soft: #fbe6e6; --mute-soft: #f3ede6;
  --r: 14px; --sh: 0 1px 2px rgba(40, 24, 10, .06), 0 4px 16px rgba(40, 24, 10, .06);
  --f: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100d; --card: #1e1813; --ink: #f3ebe3; --ink2: #c3b6aa; --mute: #8f8378; --line: #342a22;
    --acc: #fb923c; --acc-ink: #1f0d02; --acc-soft: #3d2312; --bike: #4fd1b8; --ok: #4cc983; --warn: #e6b04f; --bad: #f07272;
    --ok-soft: #143524; --warn-soft: #3a2e14; --bad-soft: #3d1a1a; --mute-soft: #2a221b; --sh: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100d; --card: #1e1813; --ink: #f3ebe3; --ink2: #c3b6aa; --mute: #8f8378; --line: #342a22;
  --acc: #fb923c; --acc-ink: #1f0d02; --acc-soft: #3d2312; --bike: #4fd1b8; --ok: #4cc983; --warn: #e6b04f; --bad: #f07272;
  --ok-soft: #143524; --warn-soft: #3a2e14; --bad-soft: #3d1a1a; --mute-soft: #2a221b; --sh: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--acc); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink2); } .small { font-size: 13px; } .tiny { font-size: 12px; color: var(--mute); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 10px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.sp { flex: 1; }
.top select, .ib { width: auto; min-height: 0; height: 34px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ib { width: 34px; padding: 0; display: grid; place-items: center; }
.navl { display: flex; gap: 4px; }
.navl a { padding: 6px 10px; border-radius: 999px; color: var(--ink2); text-decoration: none; font-size: 14px; }
.navl a:hover { background: var(--mute-soft); color: var(--ink); }

/* кнопки, поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .06s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn.bad { color: var(--bad); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.big { min-height: 54px; font-size: 16px; border-radius: 14px; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.full { width: 100%; }
.f { display: block; margin-bottom: 12px; }
.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 12px; font: inherit; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* карточки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; }
.banner { background: var(--acc-soft); color: var(--ink); font-size: 13.5px; padding: 9px 16px; text-align: center; }
.banner a { font-weight: 700; margin-left: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.acc { background: var(--acc-soft); color: var(--acc); } .chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.mute { background: var(--mute-soft); color: var(--ink2); }
.chip.live::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 3000; box-shadow: var(--sh); max-width: calc(100% - 32px); }
.empty { text-align: center; color: var(--mute); padding: 28px 10px; }
dialog { border: 0; border-radius: 18px; padding: 0; background: var(--card); color: var(--ink); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(20, 12, 6, .5); }
dialog .dh { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
dialog .db { padding: 16px; }
dialog .df { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* маркеры карты */
.mk { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); position: relative; }
.mk.pick { background: var(--acc); }
.mk.drop { background: #3a2a1e; }
:root[data-theme="dark"] .mk.drop { background: #f3ebe3; color: #14100d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk.drop { background: #f3ebe3; color: #14100d; } }
.mk.bike { width: 40px; height: 40px; background: var(--bike); }
.mk.bike::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--bike); opacity: .5; animation: ring 2s infinite; }
@keyframes ring { from { transform: scale(.7); opacity: .6; } to { transform: scale(1.4); opacity: 0; } }
.mk i { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); background: var(--card); color: var(--ink); font: 700 11px var(--f); padding: 1px 6px; border-radius: 6px; white-space: nowrap; box-shadow: var(--sh); }
.leaflet-container { font: inherit; background: var(--mute-soft); }
.leaflet-control-attribution { font-size: 10px; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); } }

/* шкала статусов */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 16px 30px; color: var(--mute); }
.tl li::before { content: ""; position: absolute; left: 7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.tl li::after { content: ""; position: absolute; left: 13px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.done { color: var(--ink); } .tl li.done::before { background: var(--acc); border-color: var(--acc); }
.tl li.done::after { background: var(--acc); }
.tl li.cur::before { background: var(--bike); border-color: var(--bike); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bike) 25%, transparent); }
.tl li.fail::before { background: var(--bad); border-color: var(--bad); }
.tl b { display: block; font-weight: 650; } .tl small { color: var(--mute); }

/* звёзды */
.stars { display: flex; gap: 6px; }
.stars button { width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: var(--line); padding: 0; }
.stars button.on { color: #f2b01e; }

/* таблицы и вкладки */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; border: 0; background: none; color: var(--ink2); font: inherit; font-weight: 650; padding: 9px 13px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--acc-soft); color: var(--acc); }
.seg { display: inline-flex; background: var(--mute-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 650; padding: 6px 11px; border-radius: 8px; color: var(--ink2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh); }
details summary { cursor: pointer; font-weight: 650; }
.foot { padding: 30px 16px calc(30px + env(safe-area-inset-bottom)); text-align: center; color: var(--mute); font-size: 13px; }
.foot a { color: var(--ink2); margin: 0 6px; }
.hide { display: none !important; }

/* меню ресторана */
.logo img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.hero2 { position: relative; border-radius: 0 0 22px 22px; overflow: hidden; background: #2a1a10 center/cover; color: #fff; }
.hero2::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 4, .15), rgba(20, 10, 4, .78)); }
.hero2 .wrap { position: relative; z-index: 1; padding-top: 70px; padding-bottom: 22px; }
.hero2 h1 { color: #fff; margin-bottom: 6px; }
.hero2 p { color: rgba(255, 255, 255, .88); margin: 0 0 12px; max-width: 560px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.facts span { background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.facts .open { background: #1d8a4e; } .facts .closed { background: #c43d3d; }
.catbar { position: sticky; top: 56px; z-index: 900; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.catbar .tabs { padding: 8px 0; }
.catbar .tabs a { flex: none; padding: 7px 13px; border-radius: 999px; color: var(--ink2); text-decoration: none; font-weight: 650; font-size: 14px; background: var(--card); border: 1px solid var(--line); }
.catbar .tabs a.on { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.search { margin: 14px 0 0; }
.menu-sec { scroll-margin-top: 120px; margin-top: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dish { display: grid; grid-template-columns: 1fr 112px; gap: 12px; padding: 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; transition: border-color .15s; }
.dish:hover { border-color: var(--acc); }
.dish h3 { margin: 0 0 3px; font-size: 15.5px; }
.dish p { font-size: 13px; color: var(--ink2); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish .ph { position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--mute-soft); }
.dish .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish .add { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--card); color: var(--acc); display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: var(--sh); }
.dish .add.q { background: var(--acc); color: var(--acc-ink); font-size: 14px; }
.dish.off { opacity: .55; cursor: default; }
.price { font-weight: 750; font-variant-numeric: tabular-nums; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--mute-soft); color: var(--ink2); }
.tag.hot { background: var(--bad-soft); color: var(--bad); } .tag.veg { background: var(--ok-soft); color: var(--ok); } .tag.pop { background: var(--acc-soft); color: var(--acc); }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.cartbar .btn { max-width: 560px; margin: 0 auto; display: flex; justify-content: space-between; box-shadow: 0 8px 28px rgba(194, 65, 12, .35); }
.cartbar .cnt { background: rgba(255, 255, 255, .22); border-radius: 8px; padding: 1px 8px; }
.dlg-ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt input { width: 20px; height: 20px; min-height: 0; accent-color: var(--acc); }
.opt span { flex: 1; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.qty button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--mute-soft); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; }
.qty b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .nm { flex: 1; min-width: 0; }
.line .nm small { display: block; color: var(--mute); }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14.5px; }
.sum .t { font-size: 18px; font-weight: 800; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay label { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; cursor: pointer; font-weight: 650; font-size: 14px; }
.pay label small { display: block; font-weight: 500; color: var(--mute); font-size: 11.5px; }
.pay input { display: none; }
.pay label:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.mapbox { height: 280px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.mapbox .center-pin { position: absolute; left: 50%; top: 50%; z-index: 500; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.sugg { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.sugg li { padding: 9px 12px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sugg li:last-child { border-bottom: 0; }
.sugg li:hover { background: var(--mute-soft); }
.note-box { background: var(--warn-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.err-box { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.mk.home { background: var(--acc); }
