/* ROVI — такси, доставка и сборка
   Тёмная тема с оранжевым акцентом, mobile-first; на десктопе — боковая панель над картой. */

:root {
  --bg: #0B0B0C;
  --surface: #151517;
  --surface-2: #1E1E21;
  --surface-3: #2A2A2E;
  --surface-4: #36363B;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #F5F5F7;
  --text-2: #A3A3A9;
  --text-3: #6E6E75;
  --accent: #FF7A1A;
  --accent-2: #FF9A3D;
  --accent-press: #E8650A;
  --accent-soft: rgba(255, 122, 26, .14);
  --accent-line: rgba(255, 122, 26, .45);
  --accent-grad: linear-gradient(135deg, #FFA048 0%, #FF7A1A 48%, #F26500 100%);
  --green: #34C76F;
  --green-soft: rgba(52, 199, 111, .14);
  --red: #FF4D45;
  --red-soft: rgba(255, 77, 69, .13);
  --blue: #5B8CFF;
  --blue-soft: rgba(91, 140, 255, .14);
  --yellow: #FFC23D;
  --r-xs: 10px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow: 0 16px 48px rgba(0, 0, 0, .5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  --topbar-h: 112px;
  --panel-h: 0px;
  --side-w: 420px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.ic { flex: none; }

/* ─────────── Сплэш и экраны ─────────── */

#splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(255, 122, 26, .16), transparent 45%), var(--bg);
  transition: opacity .4s ease, visibility .4s;
}
#splash img { animation: splash-pulse 1.4s ease-in-out infinite; border-radius: 22px; box-shadow: 0 20px 60px rgba(255, 122, 26, .25); }
@keyframes splash-pulse { 50% { transform: scale(.94); } }
body:not([data-screen="splash"]) #splash { opacity: 0; visibility: hidden; pointer-events: none; }

#auth { display: none; }
body[data-screen="auth"] #auth { display: block; }
body[data-screen="auth"] #side,
body[data-screen="auth"] #bottom-nav,
body[data-screen="auth"] #map-controls,
body[data-screen="auth"] #center-pin { display: none !important; }

/* ─────────── Карта ─────────── */

#map { position: fixed; inset: 0; z-index: 0; background: #0E0F11; }
.leaflet-container { background: #0E0F11; font-family: var(--font); }
/* Светлые тайлы OSM → тёмная карта в стиле приложения */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(1.05) saturate(.35); }
.leaflet-control-attribution {
  background: rgba(11, 11, 12, .65) !important; color: var(--text-3) !important;
  font-size: 10px; border-radius: 8px 0 0 0; padding: 1px 6px !important;
}
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bottom { bottom: calc(var(--panel-h) + var(--nav-h) + var(--safe-b)); transition: bottom .25s; }
body[data-mode="page"] .leaflet-bottom { bottom: 0; }
.leaflet-tooltip.mk-tip {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; font-weight: 700; font-size: 12px; box-shadow: var(--shadow-sm); padding: 4px 8px;
}
.leaflet-tooltip.mk-tip::before { display: none; }

#map-controls {
  position: fixed; right: 12px; z-index: 12;
  bottom: calc(var(--panel-h) + var(--nav-h) + var(--safe-b) + 12px);
  display: flex; flex-direction: column; gap: 8px;
  transition: bottom .25s;
}
body[data-mode="page"] #map-controls { display: none; }
.map-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(30, 30, 33, .94); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); color: var(--text);
  backdrop-filter: blur(10px);
  transition: transform .15s, background .15s;
}
.map-btn:hover { background: var(--surface-3); }
.map-btn:active { transform: scale(.93); }
.map-btn.zoom { display: none; }

/* ─────────── Центральный пин ─────────── */

.center-pin {
  position: fixed; z-index: 11; left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.cp-bubble {
  background: #fff; color: #111; font-weight: 700; font-size: 13px;
  padding: 7px 12px; border-radius: 12px; margin-bottom: 8px;
  max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  transition: transform .2s, opacity .2s;
}
.cp-head {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); border: 4px solid #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
  transition: transform .2s;
}
.cp-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.cp-stick { width: 3px; height: 16px; background: #fff; border-radius: 0 0 3px 3px; transition: transform .2s; }
.cp-shadow {
  position: absolute; bottom: -3px; width: 12px; height: 6px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); transition: transform .2s, opacity .2s;
}
.center-pin.lifted .cp-head, .center-pin.lifted .cp-stick, .center-pin.lifted .cp-bubble { transform: translateY(-10px); }
.center-pin.lifted .cp-bubble { opacity: .55; }
.center-pin.lifted .cp-shadow { transform: scale(1.5); opacity: .4; }

/* ─────────── Маркеры ─────────── */

.mk { background: none !important; border: 0 !important; }
.mk-from .mk-dot {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 5px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .55);
}
.mk-to svg { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55)); }
.mk-stop span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: #111; font-weight: 800; font-size: 12px;
  border: 3px solid var(--accent); box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}
.mk-rot { width: 100%; height: 100%; display: grid; place-items: center; will-change: transform; }
.mk-car svg { filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .6)); }
.mk-car.idle { opacity: .9; }
.mk-badge {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55);
}
.mk-badge.dark { background: #1C1C1E; }
.mk-store-in {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--surface-2); border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55);
  transition: transform .15s;
}
.mk-store:hover .mk-store-in { transform: scale(1.08); }
.mk-home-in {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #111;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55);
}
.mk-user span {
  position: relative; display: block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.mk-user span::after {
  content: ''; position: absolute; inset: -12px; border-radius: 50%;
  background: rgba(91, 140, 255, .25); animation: halo 2s ease-out infinite;
}
@keyframes halo { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.mk-radar { position: relative; width: 160px; height: 160px; pointer-events: none; }
.mk-radar i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent); background: rgba(255, 122, 26, .12);
  animation: radar 2.4s ease-out infinite; opacity: 0;
}
.mk-radar i:nth-child(2) { animation-delay: .8s; }
.mk-radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { from { transform: scale(.1); opacity: .9; } to { transform: scale(1); opacity: 0; } }

/* ─────────── Каркас: верхняя панель, шторка, навигация ─────────── */

#side { display: contents; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: calc(var(--safe-t) + 10px) 16px 14px;
  background: linear-gradient(180deg, rgba(11, 11, 12, .97) 0%, rgba(11, 11, 12, .9) 65%, rgba(11, 11, 12, 0) 100%);
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
body[data-mode="page"] #topbar { background: var(--bg); padding-bottom: 10px; }
body.sub #topbar { display: none; }

.tb-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.tb-row > a:first-child { margin-right: auto; }
.tb-nav { display: none; gap: 4px; }
.tb-link {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.tb-link:hover { background: var(--surface-2); color: var(--text); }
body[data-nav="orders"] .tb-link[data-nav="orders"],
body[data-nav="favorites"] .tb-link[data-nav="favorites"],
body[data-nav="profile"] .tb-link[data-nav="profile"] { color: var(--accent); background: var(--accent-soft); }
.tb-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.dot-badge::after {
  content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.brand .logo-mark { color: #F7931E; }
.brand-word { font-weight: 800; font-size: 22px; letter-spacing: .04em; line-height: 1; }

.service-tabs { display: flex; gap: 8px; margin-top: 12px; }
body:not([data-tab]) .service-tabs, body[data-tab=""] .service-tabs { display: none; }
.service-tab {
  flex: 1; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: rgba(30, 30, 33, .95); color: var(--text-2);
  font-weight: 700; font-size: 14px; border: 1px solid var(--line);
  transition: background .2s, color .2s, transform .1s;
}
.service-tab:active { transform: scale(.97); }
body[data-tab="taxi"] .service-tab[data-tab="taxi"],
body[data-tab="delivery"] .service-tab[data-tab="delivery"],
body[data-tab="assembly"] .service-tab[data-tab="assembly"] {
  background: var(--accent-grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 122, 26, .3);
}

#panel {
  position: fixed; left: 0; right: 0; z-index: 15;
  bottom: calc(var(--nav-h) + var(--safe-b));
  display: flex; flex-direction: column;
  max-height: min(calc(100dvh - var(--topbar-h) - var(--nav-h) - var(--safe-b) - 56px), 66dvh);
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  border-top: 1px solid var(--line);
}
body[data-mode="page"] #panel {
  top: var(--topbar-h); max-height: none;
  border-radius: 0; box-shadow: none; border-top: 0; background: var(--bg);
}
body.sub[data-mode="page"] #panel { top: 0; padding-top: var(--safe-t); }

.sheet-handle {
  flex: none; height: 22px; width: 100%;
  display: grid; place-items: center; touch-action: none;
}
.sheet-handle span { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-4); }
body[data-mode="page"] .sheet-handle { display: none; }
#panel.collapsed #view { display: none; }

#view {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 16px 18px;
  scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
#view-footer { flex: none; padding: 12px 16px 14px; background: inherit; border-top: 1px solid var(--line); }
#view-footer:empty { display: none; }

#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(17, 17, 19, .97);
  border-top: 1px solid var(--line); backdrop-filter: blur(20px);
}
body.no-nav { --nav-h: 0px; }
body.no-nav #bottom-nav { display: none; }
.bn-item {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-3); font-size: 11px; font-weight: 700;
  transition: color .15s;
}
.bn-item.dot-badge::after { top: 8px; right: calc(50% - 18px); border-color: #111113; }
body[data-nav="home"] .bn-item[data-nav="home"],
body[data-nav="orders"] .bn-item[data-nav="orders"],
body[data-nav="favorites"] .bn-item[data-nav="favorites"],
body[data-nav="profile"] .bn-item[data-nav="profile"] { color: var(--accent); }

body.picking #side, body.picking #bottom-nav { display: none !important; }
body.picking { --panel-h: 0px; --nav-h: 0px; }
body.picking #map-controls { bottom: calc(var(--pick-h, 180px) + 12px); }
body.picking .leaflet-bottom { bottom: var(--pick-h, 180px); }

/* ─────────── Десктоп ─────────── */

@media (min-width: 900px) {
  body { --nav-h: 0px; --panel-h: 0px; }
  #side {
    display: flex; flex-direction: column;
    position: fixed; top: 16px; left: 16px; bottom: 16px; width: var(--side-w); z-index: 20;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden;
  }
  #topbar, body[data-mode="page"] #topbar {
    position: relative; inset: auto; padding: 18px 20px 12px;
    background: none; pointer-events: auto; border-bottom: 1px solid transparent;
  }
  body.sub #topbar { display: block; }
  body[data-mode="page"] #topbar { border-bottom-color: var(--line); }
  #panel, body[data-mode="page"] #panel, body.sub[data-mode="page"] #panel {
    position: relative; inset: auto; top: auto; flex: 1; min-height: 0; max-height: none;
    border-radius: 0; box-shadow: none; border-top: 0; background: transparent; padding-top: 0;
  }
  #view { padding: 6px 20px 20px; }
  #view-footer { padding: 14px 20px 18px; background: var(--surface); }
  #bottom-nav, .sheet-handle, .tb-avatar { display: none !important; }
  .tb-nav { display: flex; }
  #map-controls, body[data-mode="page"] #map-controls { display: flex; bottom: 24px; right: 20px; }
  .map-btn.zoom { display: grid; }
  .leaflet-bottom, body[data-mode="page"] .leaflet-bottom { bottom: 0; }
  #panel.collapsed #view { display: block; }
  body.picking #side { display: none !important; }
}

.desktop-only { display: none; }
@media (min-width: 900px) { .desktop-only { display: block; } }

/* ─────────── Типографика и общие блоки ─────────── */

.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.h3 { font-size: 17px; font-weight: 800; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 13px; }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 800; margin: 22px 0 12px;
}
.section-title .link { font-size: 14px; font-weight: 700; color: var(--accent); }
.label-sm { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }

.page-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  margin: 0 -16px 8px; padding: 10px 16px;
  background: var(--bg);
}
@media (min-width: 900px) { .page-head { margin: 0 -20px 8px; padding: 10px 20px; background: var(--surface); } }
.page-head h1 { font-size: 20px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 16px; }

.card {
  background: var(--surface-2); border-radius: var(--r-lg);
  border: 1px solid var(--line); padding: 14px;
}
body[data-mode="sheet"] .card { background: var(--surface-2); }
.card + .card { margin-top: 12px; }
.card-flat { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }

.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ─────────── Кнопки ─────────── */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: var(--r);
  font-weight: 800; font-size: 16px; letter-spacing: .005em;
  transition: transform .1s, background .2s, opacity .2s, box-shadow .2s;
  white-space: nowrap; user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 22px rgba(255, 122, 26, .28); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(255, 122, 26, .4); }
.btn-secondary { background: var(--surface-3); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-4); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-outline { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { height: 58px; font-size: 17px; }
.btn .btn-price { margin-left: auto; padding-left: 12px; font-weight: 800; }
.btn.split { justify-content: space-between; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-icon {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text);
  transition: background .15s, transform .1s;
}
.btn-icon:hover { background: var(--surface-3); }
.btn-icon:active { transform: scale(.94); }
.btn-icon.ghost { background: transparent; }
.btn-icon.ghost:hover { background: var(--surface-2); }
.btn-icon.sm { width: 34px; height: 34px; }

.link-btn { color: var(--accent); font-weight: 700; }
.link-btn:hover { color: var(--accent-2); }

.spinner {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2.5px solid var(--surface-4); border-top-color: var(--accent); animation: spin .7s linear infinite;
}

/* ─────────── Поля ввода ─────────── */

.field { display: block; }
.field + .field { margin-top: 12px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 6px 2px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, .textarea {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: var(--r); outline: none;
  font-weight: 600; font-size: 16px; color: var(--text);
  transition: border-color .15s, background .15s;
}
body[data-mode="sheet"] .input, body[data-mode="sheet"] .textarea, .modal .input, .modal .textarea { background: var(--surface-3); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); font-weight: 500; }
.input:focus, .textarea:focus { border-color: var(--accent); }
.input.invalid { border-color: var(--red); }
.textarea { height: auto; min-height: 84px; padding: 13px 16px; resize: vertical; line-height: 1.4; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .input-action { position: absolute; right: 6px; }
.field-hint { font-size: 12px; color: var(--text-3); margin: 6px 2px 0; }
.field-hint + .field { margin-top: 12px; }
.form-error {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--red-soft); color: #FF8A84; font-size: 14px; font-weight: 600;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-3 .input { padding: 0 12px; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.search-box {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text-3);
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-weight: 600; font-size: 16px; color: var(--text); }
.search-box input::placeholder { color: var(--text-3); font-weight: 500; }

.check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px; cursor: pointer; user-select: none;
}
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row input { display: none; }
.check-box {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  border: 2px solid var(--surface-4); display: grid; place-items: center; color: transparent;
  transition: background .15s, border-color .15s;
}
.check-row input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-row .grow small { display: block; color: var(--text-3); font-size: 13px; font-weight: 500; }
.check-row .price-tag { font-weight: 700; color: var(--text-2); white-space: nowrap; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-4); transition: background .2s; }
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row .grow small { display: block; color: var(--text-3); font-size: 13px; font-weight: 500; }

/* ─────────── Чипы ─────────── */

.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 2px 16px;
}
@media (min-width: 900px) { .chips { margin: 0 -20px; padding: 2px 20px; } }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; height: 38px; padding: 0 14px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1.5px solid var(--line);
  font-weight: 700; font-size: 14px; color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
body[data-mode="sheet"] .chip { background: var(--surface-2); }
.chip:hover { border-color: var(--line-2); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.chip .ic { color: var(--text-2); }
.chip.active .ic { color: var(--accent); }
.chip small { color: var(--text-3); font-weight: 600; }
.chip.tall { height: auto; padding: 9px 14px; flex-direction: column; align-items: flex-start; gap: 1px; }

/* ─────────── Блок адресов ─────────── */

.addr-card { background: var(--surface-2); border-radius: var(--r-lg); padding: 4px 0; border: 1px solid var(--line); }
.addr-row {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; text-align: left; min-height: 54px;
}
.addr-row + .addr-row::before {
  content: ''; position: absolute; top: 0; left: 46px; right: 14px; height: 1px; background: var(--line);
}
.addr-ico { width: 22px; height: 22px; flex: none; display: grid; place-items: center; color: var(--accent); position: relative; }
.addr-ico.from::before { content: ''; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.addr-ico.stop::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.addr-ico.home { color: var(--text-2); }
.addr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.addr-label { font-size: 12px; font-weight: 700; color: var(--text-3); }
.addr-text { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-text.placeholder { color: var(--text-3); font-weight: 600; }
.addr-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-side { flex: none; color: var(--text-3); display: grid; place-items: center; }
.addr-side.btn-icon { color: var(--text); background: var(--surface-3); width: 38px; height: 38px; }
.addr-add {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px; color: var(--accent); font-weight: 700; font-size: 14px;
  border-top: 1px solid var(--line);
}
.addr-add .addr-ico { color: var(--accent); }

.route-summary { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.route-summary .rs-main { flex: 1; min-width: 0; }
.route-summary .rs-title { font-size: 19px; font-weight: 800; }
.route-summary .rs-sub { font-size: 13px; color: var(--text-2); }
.approx-note { font-size: 12px; color: var(--yellow); }

/* ─────────── Тарифы ─────────── */

.tariffs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 2px 16px 4px; scroll-padding: 0 16px; scroll-snap-type: x proximity; }
@media (min-width: 900px) { .tariffs { margin: 14px -20px 0; padding: 2px 20px 4px; scroll-padding: 0 20px; } }
.tariffs::-webkit-scrollbar { display: none; }
.tariff {
  flex: none; width: 118px; padding: 10px 10px 12px;
  border-radius: var(--r); background: var(--surface-2); border: 2px solid transparent;
  text-align: left; scroll-snap-align: start;
  transition: border-color .15s, background .15s, transform .1s;
}
.tariff:active { transform: scale(.97); }
.tariff.active { border-color: var(--accent); background: linear-gradient(180deg, rgba(255, 122, 26, .16), rgba(255, 122, 26, .04)); }
.tariff .car-side { width: 96px; height: 45px; margin: 0 auto 6px; }
.tariff-eta { font-size: 11px; font-weight: 700; color: var(--text-3); }
.tariff-name { font-size: 14px; font-weight: 700; margin-top: 1px; }
.tariff-price { font-size: 17px; font-weight: 800; margin-top: 2px; }
.tariff.active .tariff-price { color: var(--accent); }
.tariff-info { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.tariff-info .row { gap: 5px; white-space: nowrap; flex: none; }
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tariff.skeleton { height: 128px; }

.opt-row { display: flex; gap: 8px; margin-top: 12px; }
.opt-btn {
  flex: 1; min-width: 0; height: 48px; padding: 0 12px; border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); font-weight: 700; font-size: 14px;
  transition: background .15s;
}
.opt-btn:hover { background: var(--surface-3); }
.opt-btn .ic { color: var(--text-2); }
.opt-btn .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px;
}

/* ─────────── Списки ─────────── */

.list { background: var(--surface-2); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.list-item {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; text-align: left; min-height: 60px;
  transition: background .15s;
}
button.list-item:hover, a.list-item:hover { background: rgba(255, 255, 255, .03); }
.list-item + .list-item::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.list-item .li-title { font-weight: 700; font-size: 15px; }
.list-item .li-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .chev { color: var(--text-3); flex: none; }
.list-item.danger { color: var(--red); }
.ico-tile {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-size: 20px;
}
.ico-tile.accent { background: var(--accent-soft); color: var(--accent); }
.ico-tile.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 24px; }

.empty { text-align: center; padding: 36px 16px; color: var(--text-2); }
.empty .empty-emoji { font-size: 56px; margin-bottom: 12px; }
.empty .h3 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge.active { background: var(--accent-soft); color: var(--accent); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.cancel { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ─────────── Баннер активного заказа ─────────── */

.active-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r);
  background: linear-gradient(90deg, rgba(255, 122, 26, .2), rgba(255, 122, 26, .07));
  border: 1px solid var(--accent-line);
  transition: transform .1s;
}
.active-banner:active { transform: scale(.99); }
.active-banner .ab-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.active-banner b { display: block; font-size: 15px; }
.active-banner small { display: block; color: var(--text-2); font-size: 13px; }

/* ─────────── Модальные окна ─────────── */

.modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.modal {
  position: relative; width: 100%; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--line-2);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: var(--safe-b);
}
.modal-wrap.open .modal-backdrop { opacity: 1; }
.modal-wrap.open .modal { transform: none; }
.modal-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-4); margin: 8px auto 0; flex: none; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px 20px; flex: none; }
.modal-head h3 { flex: 1; font-size: 20px; font-weight: 800; }
.modal-body { padding: 8px 20px 20px; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 24px; }
  .modal { max-width: 440px; border-radius: var(--r-xl); border: 1px solid var(--line-2); transform: translateY(24px) scale(.97); opacity: 0; transition: transform .25s, opacity .25s; }
  .modal-wrap.open .modal { opacity: 1; }
  .modal-handle { display: none; }
  .modal-head { padding-top: 18px; }
}

.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: var(--r); text-align: left;
  background: var(--surface-2); border: 2px solid transparent;
  transition: border-color .15s, background .15s;
}
.choice:hover { background: var(--surface-3); }
.choice.active { border-color: var(--accent); }
.choice .grow small { display: block; color: var(--text-3); font-size: 13px; font-weight: 500; }
.choice .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-4); flex: none; }
.choice.active .radio { border: 7px solid var(--accent); }

/* ─────────── Поиск адреса ─────────── */

.search-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--surface);
  padding-top: var(--safe-t);
  animation: slide-up .25s cubic-bezier(.2, .9, .3, 1);
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 900px) {
  .search-overlay {
    top: 16px; left: 16px; bottom: 16px; right: auto; width: var(--side-w);
    border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow);
  }
}
.so-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; }
.so-head .search-box { flex: 1; background: var(--surface-2); }
.so-title { padding: 6px 20px 0; font-size: 13px; font-weight: 700; color: var(--text-3); }
.so-body { flex: 1; overflow-y: auto; padding: 4px 12px 24px; }
.so-actions { display: flex; gap: 8px; padding: 0 0 8px; }
.so-actions .chip { flex: 1; justify-content: center; height: 44px; }
.so-group { font-size: 12px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 16px 8px 6px; }
.so-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 8px; border-radius: var(--r-sm); text-align: left;
  transition: background .12s;
}
.so-item:hover, .so-item.focus { background: var(--surface-2); }
.so-item .ico-tile { width: 38px; height: 38px; }
.so-item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-item .s { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-item .d { font-size: 12px; color: var(--text-3); white-space: nowrap; font-weight: 700; }
.so-state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--text-3); }

/* ─────────── Выбор точки на карте ─────────── */

.pick-card {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 40;
  padding: 16px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: slide-up .25s cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 900px) { .pick-card { left: 16px; right: auto; bottom: 16px; width: var(--side-w); } }
.pick-title { font-size: 13px; font-weight: 700; color: var(--text-3); }
.pick-addr { display: flex; align-items: center; gap: 10px; min-height: 30px; margin: 4px 0 14px; font-size: 19px; font-weight: 800; }
.pick-actions { display: flex; gap: 10px; }
.pick-actions .btn { flex: 1; }

/* ─────────── Тосты ─────────── */

#toasts {
  position: fixed; z-index: 90; left: 50%; top: calc(var(--safe-t) + 12px);
  transform: translateX(-50%); width: min(92vw, 420px);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r);
  background: rgba(36, 36, 40, .97); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-weight: 700; font-size: 14px;
  transform: translateY(-16px); opacity: 0; transition: transform .25s, opacity .25s;
  backdrop-filter: blur(12px);
}
.toast.show { transform: none; opacity: 1; }
.toast .ic { color: var(--accent); }
.toast-success .ic { color: var(--green); }
.toast-error .ic { color: var(--red); }

/* ─────────── Авторизация ─────────── */

#auth {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 122, 26, .22), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255, 122, 26, .12), transparent 45%),
    rgba(11, 11, 12, .9);
  backdrop-filter: blur(6px);
}
.auth-wrap {
  min-height: 100%; width: 100%; max-width: 440px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 24px);
}
@media (min-width: 640px) {
  .auth-wrap { justify-content: center; }
  .auth-card { background: rgba(21, 21, 23, .92); border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
}
.auth-hero { text-align: center; padding: 28px 0 8px; }
.app-icon {
  width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 28px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #232326, #0E0E10);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(255, 122, 26, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: #F7931E;
}
.brand-xl { font-weight: 800; font-size: 46px; letter-spacing: .06em; line-height: 1; }
.auth-tagline { color: var(--text-2); font-size: 17px; margin-top: 12px; }
.auth-tagline b { color: var(--accent); font-weight: 800; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 34px 0 30px; }
.feature { text-align: left; }
.feature .ico-tile { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); margin-bottom: 10px; width: 44px; height: 44px; }
.feature b { display: block; font-size: 15px; }
.feature small { display: block; color: var(--text-3); font-size: 12px; line-height: 1.35; margin-top: 3px; }
.services-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 26px; }
.sp-item { padding: 12px 10px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.sp-item span { font-size: 28px; display: block; }
.sp-item b { display: block; font-size: 13px; margin-top: 6px; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 24px; }
.auth-note { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 14px; }
.auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--text-2); margin: 8px 0 24px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-2); }
.demo-hint {
  display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 12px 14px;
  border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2);
  font-size: 13px; color: var(--text-2); text-align: left; width: 100%;
}
.demo-hint b { color: var(--text); }

/* ─────────── Доставка ─────────── */

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cat-tile {
  position: relative; overflow: hidden; height: 128px;
  padding: 14px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .12s, border-color .15s;
}
.cat-tile:hover { border-color: var(--line-2); }
.cat-tile:active { transform: scale(.98); }
.cat-tile .cat-emoji { position: absolute; top: 10px; right: 10px; font-size: 54px; line-height: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); transition: transform .2s; }
.cat-tile:hover .cat-emoji { transform: scale(1.06) rotate(-4deg); }
.cat-tile b { font-size: 17px; font-weight: 800; }
.cat-tile small { font-size: 12px; color: var(--text-3); }

.promo {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
  padding: 14px; border-radius: var(--r-lg);
  background: linear-gradient(110deg, rgba(255, 122, 26, .22), rgba(255, 122, 26, .05) 70%), var(--surface-2);
  border: 1px solid var(--accent-line);
}
.promo .promo-logo { width: 46px; height: 46px; border-radius: 14px; background: #0E0E10; display: grid; place-items: center; color: #F7931E; flex: none; }
.promo b { display: block; font-size: 15px; }
.promo small { display: block; color: var(--text-2); font-size: 13px; }

.store-list { display: flex; flex-direction: column; gap: 14px; }
.store-card { display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); transition: transform .12s, border-color .15s; }
.store-card:hover { border-color: var(--line-2); }
.store-card:active { transform: scale(.99); }
.store-cover {
  position: relative; height: 120px;
  display: grid; place-items: center;
  background: var(--c);
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--c) 100%, white 12%), var(--c) 60%);
}
.store-cover .store-emoji { font-size: 64px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.store-time {
  position: absolute; left: 10px; bottom: 10px;
  height: 26px; padding: 0 9px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 800; backdrop-filter: blur(8px);
}
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(8px);
  transition: transform .15s, color .15s;
}
.fav-btn:active { transform: scale(.88); }
.fav-btn.on { color: var(--accent); }
.fav-btn.on svg { fill: currentColor; }
.store-body { padding: 12px 14px 14px; }
.store-name { font-size: 17px; font-weight: 800; }
.store-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.store-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.store-meta .star { color: var(--yellow); display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.star svg { fill: currentColor; }

.store-hero {
  position: relative; margin: 0 -16px; height: 190px;
  display: grid; place-items: center;
  background: var(--c);
  background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--c) 100%, white 14%), var(--c) 65%);
}
@media (min-width: 900px) { .store-hero { margin: 0 -20px; } }
.store-hero .hero-emoji { font-size: 96px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); }
.store-hero .hero-back, .store-hero .fav-btn { position: absolute; top: calc(12px + var(--safe-t)); }
.store-hero .hero-back { left: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); }
.store-hero .fav-btn { right: 12px; width: 40px; height: 40px; }
@media (min-width: 900px) { .store-hero .hero-back, .store-hero .fav-btn { top: 12px; } }
.store-head { padding: 16px 0 4px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sticky-chips { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; margin: 8px 0 0; }
@media (min-width: 900px) { .sticky-chips { background: var(--surface); } }
.sticky-chips .chips { padding-top: 0; padding-bottom: 0; }

.items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item-card {
  display: flex; flex-direction: column; padding: 8px 8px 10px;
  border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line);
}
.item-img {
  height: 104px; border-radius: 14px; display: grid; place-items: center;
  font-size: 54px; background: var(--surface-3); cursor: pointer;
}
.item-price { font-size: 17px; font-weight: 800; margin: 8px 4px 0; }
.item-name { font-size: 14px; font-weight: 600; margin: 2px 4px 0; line-height: 1.25; flex: 1; }
.item-weight { font-size: 12px; color: var(--text-3); margin: 2px 4px 8px; }
.add-btn {
  height: 38px; border-radius: 12px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface-3); font-weight: 800; font-size: 14px;
  transition: background .15s;
}
.add-btn:hover { background: var(--surface-4); }
.stepper {
  height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent); color: #fff; font-weight: 800;
}
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 12px; }
.stepper button:hover { background: rgba(255, 255, 255, .12); }
.stepper.compact { width: 110px; flex: none; }
.stepper.light { background: var(--surface-3); color: var(--text); }
.stepper.light button { color: var(--text); }

.cart-bar { width: 100%; justify-content: space-between; }
.cart-bar .cart-count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 9px;
  display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 14px;
}

.cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cart-line + .cart-line { border-top: 1px solid var(--line); }
.cart-line .emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--surface-3); flex: none; }
.cart-line .name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.cart-line .sub { font-size: 12px; color: var(--text-3); }
.cart-line .price { font-weight: 800; white-space: nowrap; }

.sum-lines { display: flex; flex-direction: column; gap: 8px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.sum-line span:last-child { color: var(--text); font-weight: 700; white-space: nowrap; }
.sum-line.total { font-size: 17px; color: var(--text); font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.sum-line .free { color: var(--green) !important; }

.warn-note {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-top: 12px;
  border-radius: var(--r-sm); background: rgba(255, 194, 61, .1); color: var(--yellow); font-size: 13px; font-weight: 700;
}

.option-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.option-card {
  padding: 12px 10px; border-radius: var(--r); text-align: left;
  background: var(--surface-2); border: 2px solid transparent;
  transition: border-color .15s, background .15s;
}
.option-card:hover { background: var(--surface-3); }
.option-card.active { border-color: var(--accent); background: linear-gradient(180deg, rgba(255, 122, 26, .15), rgba(255, 122, 26, .03)); }
.option-card .ico-tile { width: 38px; height: 38px; margin-bottom: 8px; }
.option-card.active .ico-tile { background: var(--accent); color: #fff; }
.option-card b { display: block; font-size: 14px; }
.option-card small { display: block; font-size: 11px; color: var(--text-3); line-height: 1.3; margin-top: 2px; }
.option-card .oc-price { display: block; font-size: 15px; font-weight: 800; margin-top: 6px; }
.option-card.active .oc-price { color: var(--accent); }

/* ─────────── Сборка ─────────── */

.hero-card {
  position: relative; overflow: hidden;
  padding: 18px; border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 122, 26, .35), transparent 55%),
    linear-gradient(160deg, #26201B, #161618 70%);
  border: 1px solid var(--line-2);
}
.hero-card .hero-emoji { position: absolute; right: -6px; top: 8px; font-size: 76px; transform: rotate(-12deg); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.hero-card .h1 { max-width: 74%; }
.hero-card p { color: var(--text-2); margin-top: 8px; max-width: 74%; font-size: 14px; }
.hero-perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-perks span {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border-radius: 9px; background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 700;
}
.hero-perks .ic { color: var(--accent); }

.svc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.svc-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1.5px solid var(--line);
  transition: border-color .15s;
}
.svc-card.selected { border-color: var(--accent-line); background: linear-gradient(90deg, rgba(255, 122, 26, .09), transparent 60%), var(--surface-2); }
.svc-emoji { width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 28px; background: var(--surface-3); }
.svc-name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.svc-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; line-height: 1.3; }
.svc-meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.svc-meta b { color: var(--text); }
.svc-add { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); flex: none; transition: background .15s; }
.svc-add:hover { background: var(--accent); color: #fff; }
.svc-card .stepper { width: 104px; flex: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.step-card { padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.step-card .num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.step-card b { display: block; font-size: 13px; line-height: 1.3; }
.step-card small { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px; line-height: 1.3; }

.date-chip { flex-direction: column; height: 58px; min-width: 62px; justify-content: center; gap: 0; padding: 0 10px; }
.date-chip small { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: capitalize; }
.date-chip b { font-size: 16px; }
.date-chip.active small { color: var(--accent); }

/* ─────────── Отслеживание заказа ─────────── */

.track-status { padding: 4px 0 12px; }
.track-status .ts-title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.track-status .ts-sub { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent-grad); border-radius: 2px; transition: width .5s linear; }
.progress.indeterminate span { width: 35%; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.perf-card { display: flex; align-items: center; gap: 12px; }
.perf-ava {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .2);
}
.perf-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.perf-name .star { display: inline-flex; align-items: center; gap: 3px; color: var(--yellow); font-size: 13px; }
.perf-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.plate {
  display: inline-flex; align-items: stretch; flex: none;
  height: 30px; border-radius: 7px; overflow: hidden;
  background: #fff; color: #111; border: 2px solid #111; box-shadow: 0 0 0 1.5px #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.plate .p-main { padding: 0 7px; display: flex; align-items: center; }
.plate .p-reg { padding: 0 5px; border-left: 2px solid #111; display: flex; align-items: center; font-size: 11px; }
.perf-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.perf-actions button {
  height: 56px; border-radius: var(--r-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-2);
  transition: background .15s;
}
.perf-actions button:hover { background: var(--surface-4); color: var(--text); }
.perf-actions .ic { color: var(--text); }

.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--surface-4); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--accent); }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: transparent; position: relative; z-index: 1; }
.tl-step.done .tl-dot { background: var(--accent); color: #fff; }
.tl-step.current .tl-dot { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.tl-step.current .tl-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.tl-step b { display: block; font-size: 14px; }
.tl-step small { color: var(--text-3); font-size: 12px; }
.tl-step:not(.done):not(.current) b { color: var(--text-3); }

.mini-route { display: flex; flex-direction: column; gap: 0; }
.mr-point { display: flex; align-items: flex-start; gap: 12px; position: relative; padding: 6px 0; }
.mr-point::before { content: ''; position: absolute; left: 6px; top: 22px; bottom: -6px; width: 2px; background: var(--surface-4); }
.mr-point:last-child::before { display: none; }
.mr-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex: none; background: var(--accent); position: relative; z-index: 1; }
.mr-dot.end { background: #fff; border: 4px solid var(--accent); }
.mr-point b { display: block; font-size: 14px; font-weight: 700; }
.mr-point small { display: block; font-size: 12px; color: var(--text-3); }

.mini-map { height: 180px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.mini-map .leaflet-control-attribution { font-size: 9px; }

.rating-stars { display: flex; justify-content: center; gap: 8px; margin: 10px 0 18px; }
.rating-stars button { color: var(--surface-4); transition: transform .15s, color .15s; }
.rating-stars button.on { color: var(--yellow); }
.rating-stars button.on svg { fill: currentColor; }
.rating-stars button:active { transform: scale(.85); }

.chat { display: flex; flex-direction: column; height: min(60dvh, 460px); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.35; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 5px; }
.msg time { display: block; font-size: 10px; opacity: .65; margin-top: 2px; text-align: right; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.chat-quick button { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; }
.chat-form { display: flex; gap: 8px; }
.chat-form .input { height: 46px; }
.chat-form .btn-icon { width: 46px; height: 46px; background: var(--accent); color: #fff; }

/* ─────────── Заказы, профиль ─────────── */

.order-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s; }
.order-card:hover { border-color: var(--line-2); }
.order-card + .order-card { margin-top: 10px; }
.order-card .oc-title { font-weight: 800; font-size: 15px; }
.order-card .oc-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.order-card .oc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.order-card .oc-price { font-weight: 800; white-space: nowrap; }

.seg-tabs { display: flex; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.seg-tabs button { flex: 1; height: 38px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--text-2); transition: background .15s, color .15s; }
.seg-tabs button.active { background: var(--surface-4); color: var(--text); }

.profile-head { display: flex; align-items: center; gap: 16px; padding: 6px 0 18px; }
.avatar-xl {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff;
  background: var(--accent-grad); box-shadow: 0 10px 28px rgba(255, 122, 26, .3);
}
.profile-head .name { font-size: 22px; font-weight: 800; }
.profile-head .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 13px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.stat.wide { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(110deg, rgba(255, 122, 26, .16), transparent 70%), var(--surface-2); }

.about-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 18px; }
.faq details { padding: 12px 0; border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* ─────────── Анимации появления ─────────── */

.fade-in { animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

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