:root {
  --accent: #ffd43b;
  --accent-press: #f5c400;
  --text: #21201f;
  --muted: #6b6a67;
  --line: #e9e8e5;
  --chip: #f1f0ed;
  --bg: #ffffff;
  --blue: #2e7cf6;
  --green: #1aa260;
  --red: #e5383b;
  --orange: #f08c00;
  --shadow: 0 4px 24px rgba(0, 0, 0, .14);
  --radius: 20px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: #e8eef3; font-size: 15px;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--text); width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 0; background: var(--chip); outline: none;
}
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 2px var(--text) inset; }
a { color: var(--blue); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- карта ---------- */
#map { position: fixed; inset: 0; z-index: 0; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-tile-pane { filter: saturate(.55) brightness(1.04) contrast(.95); } /* мягкая карта, как в такси-приложениях */
.center-pin {
  position: fixed; left: 50%; z-index: 400; pointer-events: none;
  transform: translate(-50%, -100%); transition: transform .15s;
}
.center-pin.lift { transform: translate(-50%, calc(-100% - 12px)); }
.center-pin .head {
  width: 34px; height: 34px; border-radius: 50%; background: var(--text);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.center-pin .head::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.center-pin .stick { width: 3px; height: 16px; background: var(--text); margin: 0 auto; border-radius: 0 0 2px 2px; }
.center-pin .label {
  position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--text); color: #fff; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
}

.map-marker {
  background: var(--text); color: #fff; font-weight: 700; font-size: 13px; padding: 5px 9px;
  border-radius: 12px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transform: translate(-50%, -100%); position: absolute; border: 2px solid #fff;
}
.map-marker.accent { background: var(--accent); color: var(--text); }
.map-marker.mine { background: var(--blue); }
.map-marker.selected { transform: translate(-50%, -100%) scale(1.15); z-index: 1000; background: var(--accent); color: var(--text); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(46,124,246,.25); }
.car-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); border: 3px solid #fff;
  display: grid; place-items: center; font-size: 15px; box-shadow: var(--shadow); }
.worker-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--text); border: 3px solid #fff;
  display: grid; place-items: center; font-size: 15px; box-shadow: var(--shadow); }

/* ---------- плавающие кнопки ---------- */
.fab {
  position: fixed; z-index: 500; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; font-size: 20px;
}
.fab.menu { top: 14px; left: 14px; }
.fab.locate { right: 14px; }
.topbar {
  position: fixed; z-index: 500; top: 14px; left: 72px; right: 14px; display: flex; gap: 8px;
  justify-content: flex-end; align-items: center; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.pill {
  background: #fff; border-radius: 23px; padding: 0 16px; height: 46px; display: flex; align-items: center;
  gap: 8px; box-shadow: var(--shadow); font-weight: 700; border: 0; white-space: nowrap;
}
.active-orders { position: fixed; z-index: 500; top: 70px; left: 14px; right: 14px; display: flex;
  flex-direction: column; gap: 6px; align-items: flex-start; }
.active-orders .pill { height: 40px; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex: none; }
.dot.green { background: var(--green); }
.dot.blue { background: var(--blue); }
.dot.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.switch { width: 44px; height: 26px; border-radius: 13px; background: #cfcdc9; position: relative; transition: .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--green); }
.switch.on::after { left: 21px; }

/* ---------- шторка ---------- */
.sheet {
  position: fixed; z-index: 600; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
}
.sheet .handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { margin: 4px 0 4px; font-size: 22px; line-height: 1.2; }
.sheet h3 { margin: 18px 0 8px; font-size: 16px; }
.section-label { font-size: 13px; color: var(--muted); margin: 16px 0 8px; font-weight: 600; }

.addr-row { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
.addr-row .bullet { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--text); flex: none; }
.addr-row .grow { flex: 1; min-width: 0; }
.addr-main { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-row input { padding: 6px 0; background: none; border-radius: 0; font-size: 14px; }
.addr-row input:focus { box-shadow: none; }
.icon-btn { border: 0; background: var(--chip); width: 40px; height: 40px; border-radius: 12px; flex: none; font-size: 17px; }

.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }

.tariff {
  flex: 1 0 104px; border: 0; background: var(--chip); border-radius: 16px; padding: 10px 12px; text-align: left;
  display: flex; flex-direction: column; gap: 2px; min-height: 104px; transition: .15s;
}
.tariff .ico { font-size: 26px; }
.tariff .t { font-weight: 700; }
.tariff .p { font-weight: 800; font-size: 16px; margin-top: auto; }
.tariff .p { white-space: nowrap; }
.tariff .p s { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.tariff.active { background: #fff; box-shadow: 0 0 0 2px var(--text) inset; }
.tariff { position: relative; }
.tariff .surge { position: absolute; top: 8px; right: 8px; }
.surge { display: inline-block; background: var(--text); color: var(--accent); font-weight: 800; font-size: 12px;
  padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.surge.down { background: #dcf3e6; color: var(--green); }
.good { color: var(--green); font-weight: 700; }
.price-why { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0;
  background: #fff6d6; border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 13px; text-align: left; }
.price-why.down { background: #e6f6ed; }

.chip {
  flex: none; border: 0; background: var(--chip); border-radius: 12px; padding: 9px 13px; font-weight: 600;
  font-size: 14px; white-space: nowrap;
}
.chip.active { background: var(--text); color: #fff; }
.chip.add { background: none; box-shadow: 0 0 0 1.5px var(--line) inset; }
.car-chip { display: flex; align-items: center; gap: 8px; }
.car-chip img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.plate { font-weight: 700; letter-spacing: .6px; }
a.btn { color: var(--text); }

.note { background: #f7f6f3; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.note.warn { background: #fff6d6; color: #6b5300; }
.note.err { background: #fde8e8; color: var(--red); }
.note b { color: var(--text); }

.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 16px;
  padding: 15px 18px; font-weight: 700; font-size: 16px; background: var(--chip); margin-top: 10px;
}
.btn.main { background: var(--accent); justify-content: space-between; }
.btn.main.center { justify-content: center; }
.btn.main:active { background: var(--accent-press); }
.btn.dark { background: var(--text); color: #fff; }
.btn.danger { background: #fde8e8; color: var(--red); }
.btn.ghost { background: none; color: var(--muted); font-weight: 600; padding: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .price { font-weight: 800; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---------- статус заказа ---------- */
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.steps { display: flex; gap: 4px; margin: 14px 0 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--text); }
.steps i.now { background: var(--accent); animation: pulse 1.4s infinite; }

.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
  font-weight: 800; font-size: 19px; flex: none; }
.person .grow { flex: 1; min-width: 0; }
.person .name { font-weight: 700; font-size: 16px; }

.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.kv.total { font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }

.photos { display: flex; gap: 8px; margin-top: 8px; }
.photo { flex: 1; border-radius: 12px; overflow: hidden; position: relative; aspect-ratio: 4/3; background: var(--chip); border: 0; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo span { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  font-weight: 700; padding: 2px 6px; border-radius: 6px; }

.stars { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.stars button { border: 0; background: none; font-size: 36px; padding: 0; color: #d6d4cf; line-height: 1; }
.stars button.on { color: var(--accent-press); }

.list-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line);
  width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left;
}
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; }
.list-item .right { text-align: right; font-weight: 800; white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--chip); }
.badge.accent { background: var(--accent); }
.badge.green { background: #dcf3e6; color: var(--green); }
.badge.red { background: #fde8e8; color: var(--red); }
.badge.blue { background: #e1ecfe; color: var(--blue); }
.badge.orange { background: #fff0d6; color: var(--orange); }

.tabs { display: flex; background: var(--chip); border-radius: 14px; padding: 3px; margin-bottom: 8px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat { background: var(--chip); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat small { color: var(--muted); font-size: 12px; }

.car-photo { width: 100%; max-height: 200px; object-fit: cover; border-radius: 14px; margin: 8px 0; display: block; }

/* ---------- меню и окна ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 900; }
.drawer {
  position: fixed; z-index: 950; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: #fff;
  padding: 24px 16px; overflow-y: auto; box-shadow: var(--shadow);
}
.drawer .who { padding: 8px 4px 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drawer .who b { font-size: 20px; display: block; }
.drawer button.item {
  display: flex; gap: 14px; align-items: center; width: 100%; border: 0; background: none; padding: 14px 4px;
  font-size: 16px; font-weight: 600; text-align: left; border-radius: 10px;
}
.drawer button.item:hover { background: var(--chip); }
.modal {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; box-shadow: var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.close { border: 0; background: var(--chip); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.modal label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.modal label input, .modal label select, .modal label textarea { margin-top: 5px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-size: 14px !important; color: var(--text) !important; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--text); }
.viewer img { width: 100%; border-radius: 12px; }

.chat { display: flex; flex-direction: column; gap: 6px; min-height: 200px; max-height: 50vh; overflow-y: auto; padding: 4px 0 10px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: var(--chip); align-self: flex-start; font-size: 15px; }
.msg.me { align-self: flex-end; background: var(--accent); }
.msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.quick { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; }

.rules { padding-left: 0; list-style: none; margin: 0; }
.rules li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.4; font-size: 14px; }
.rules li:last-child { border-bottom: 0; }
.rules li span:first-child { font-size: 22px; }

.toast {
  position: fixed; z-index: 2000; top: 16px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); font-weight: 600;
  text-align: center;
}
.demo-code { background: #fff6d6; padding: 10px 12px; border-radius: 12px; font-size: 14px; margin-top: 10px; }
.demo-code b { font-size: 18px; letter-spacing: 3px; }

.auth { padding-top: 4px; }
.auth .logo { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.auth .logo span { background: var(--accent); padding: 0 6px; border-radius: 8px; }
.auth input { margin-top: 10px; font-size: 18px; }
.code-input { letter-spacing: 10px; text-align: center; font-size: 26px !important; font-weight: 700; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--text); border-radius: 50%;
  animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.empty .big { font-size: 40px; }

/* ---------- удобство и доступность ---------- */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: #4a4947; --line: #c9c7c2; }
}

/* ---------- компьютер: шторка становится боковой панелью, карта на весь экран ---------- */
@media (min-width: 900px) {
  .sheet {
    left: 16px; right: auto; top: 76px; bottom: 16px; width: 440px; max-width: none; max-height: none;
    margin: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding-bottom: 16px;
  }
  .sheet .handle { display: none; }
  .active-orders { left: 472px; right: auto; top: 14px; }
  .fab.locate { right: 24px; }
}

/* вход: переключатель «Телефон / Почта» и галочки согласий */
.auth .tabs { display: flex; gap: 4px; background: var(--chip); border-radius: 14px; padding: 4px; margin: 12px 0 2px; }
.auth .tabs button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 10px 8px; font-weight: 700; color: var(--muted); }
.auth .tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.auth .check { margin-top: 12px; line-height: 1.35; }
.auth .check input[type=checkbox] { width: 22px; height: 22px; padding: 0; margin: 1px 0 0; flex: none; border-radius: 6px; }
.auth .check span { flex: 1; min-width: 0; }
.auth .tg-steps { display: block; padding-left: 22px; margin: 14px 0; line-height: 1.4; }
.auth .tg-steps li { display: list-item; margin-bottom: 8px; }
.auth a.btn { display: flex; text-decoration: none; margin-top: 8px; }
.auth .note { margin-top: 10px; }

/* ---------- панель управления: шапка, плитки, профиль ---------- */
.ava { border-radius: 50%; object-fit: cover; flex: none; display: block; }
.ava.ph { display: grid; place-items: center; background: var(--accent); font-weight: 800; color: var(--text); }
.drawer .who-card { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: var(--chip); border-radius: 16px;
  padding: 12px; text-align: left; margin-bottom: 12px; }
.who-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-card b { font-size: 17px; overflow-wrap: anywhere; }
.who-card .badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 0; background: var(--accent); border-radius: 16px;
  padding: 12px; font-weight: 700; font-size: 14px; text-align: left; min-height: 74px; }
.tile.soft { background: var(--chip); }
.tile .ti { font-size: 22px; }
.drawer .menu-sep { height: 1px; background: var(--line); margin: 8px 0; }
.ava-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.small-btn { width: auto !important; padding: 8px 14px !important; font-size: 14px !important; border-radius: 12px; }
#modal label.btn { margin-bottom: 0; color: var(--text); font-size: 14px; font-weight: 700; }
.who-card .badge { background: #fff; }
.who-card .badge.green { background: #dcf3e6; }

/* ---------- свёрнутая шторка ---------- */
.sheet .handle { position: relative; touch-action: none; cursor: grab; }
.sheet .handle::before { content: ""; position: absolute; inset: -12px -70px; }
.sheet.collapsed { max-height: 84px; overflow: hidden; padding-bottom: calc(10px + env(safe-area-inset-bottom)); cursor: pointer; }
.sheet.collapsed > :not(.handle) { display: none; }
.sheet.collapsed::after { content: "Потяните вверх или нажмите, чтобы вернуть панель"; display: block; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--muted); padding: 2px 0; }
@media (min-width: 900px) { .sheet.collapsed { max-height: none; overflow-y: auto; } .sheet.collapsed > :not(.handle) { display: revert; } .sheet.collapsed::after { content: none; } }

/* ---------- кнопки карты: слои и масштаб ---------- */
.map-tools { position: fixed; z-index: 650; top: 76px; right: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.map-tools .tool { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 20px; font-weight: 700;
  display: grid; place-items: center; }
.map-tools .tool:active { background: var(--chip); }
.layer-menu { position: absolute; right: 54px; top: 0; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 150px; }
.layer-menu button { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; text-align: left; }
.layer-menu button.on { background: var(--accent); }
#map.sat .leaflet-tile-pane { filter: none; }
#map.sat .leaflet-control-attribution { background: rgba(255,255,255,.75); }
.map-tools { transition: opacity .15s; }
body:has(.modal) .map-tools, body:has(.drawer) .map-tools { opacity: 0; pointer-events: none; }
@media (max-width: 899px) { .map-tools #zoom-in, .map-tools #zoom-out { display: none; } }  /* на телефоне масштаб — щипком */

/* ---------- поиск адреса ---------- */
.search-pill { position: fixed; z-index: 500; top: 14px; left: 72px; right: 14px; height: 46px; border: 0; border-radius: 23px; background: #fff;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; padding: 0 16px; font-size: 16px; font-weight: 600; color: var(--muted); text-align: left; }
.search-pill span { font-size: 18px; }
body[data-role=customer] .map-tools #search-tool { display: none; }
body:has(.search-overlay) .map-tools, body:has(.search-overlay) .search-pill { display: none; }
.search-overlay { position: fixed; inset: 0; z-index: 1100; background: #fff; display: flex; flex-direction: column; }
.search-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px calc(6px + env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.search-head input { flex: 1; height: 46px; padding: 0 14px; border-radius: 23px; font-size: 17px; background: var(--chip); }
.search-head input::-webkit-search-cancel-button { display: none; }
.search-back { width: 40px; height: 46px; border: 0; background: none; font-size: 34px; line-height: 1; color: var(--text); }
.search-clear { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--line); font-size: 14px; position: absolute; right: 18px; top: 16px; }
.search-body { flex: 1; overflow-y: auto; padding: 4px 0 24px; max-width: 640px; width: 100%; margin: 0 auto; }
.sugg { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: none; padding: 12px 16px; text-align: left; }
.sugg:hover, .sugg:active { background: var(--chip); }
.sugg-ico { font-size: 18px; width: 26px; text-align: center; flex: none; }
.sugg .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sugg b { font-size: 16px; overflow-wrap: anywhere; }
.sugg small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sugg-title { padding: 12px 16px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
@media (min-width: 900px) { .search-pill { left: 72px; right: auto; width: 440px; } }

/* гибрид: подписи поверх снимков чуть крупнее и контрастнее */
#map.sat .leaflet-overlay-pane img.leaflet-tile { filter: contrast(1.15) brightness(1.1); }
#map.sat .leaflet-tile-pane { filter: saturate(1.05) contrast(1.04); }

/* подписи гибрида должны лежать поверх снимков */
.leaflet-gl-layer { z-index: 10 !important; pointer-events: none; }

/* ---------- удобство на телефоне ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, .chip, .list-item, select, label { touch-action: manipulation; }  /* без задержки нажатия и случайного зума двойным тапом */
.sheet, .modal, .drawer, .search-body { overscroll-behavior: contain; }
.chip { min-height: 44px; display: inline-flex; align-items: center; }
.list-item, .drawer button.item, .layer-menu button { min-height: 48px; }
.icon-btn { min-width: 44px; min-height: 44px; }
.boot { display: flex; align-items: center; gap: 14px; padding: 18px 4px 28px; }
.boot .logo { font-size: 26px; font-weight: 900; }
.boot .logo span { background: var(--accent); padding: 0 6px; border-radius: 8px; }
.leaflet-control-attribution a { padding: 6px 2px; display: inline-block; }
@media (max-width: 380px) {
  .sheet h2 { font-size: 20px; }
  .btn { padding: 14px 14px; font-size: 15px; }
  .drawer { width: 90vw; }
}

/* вкладки и кнопки карты на узких экранах */
.tabs button { white-space: nowrap; min-height: 44px; padding: 10px 4px; }
@media (max-width: 400px) { .tabs button { font-size: 13px; } }
/* «Где я» живёт в колонке кнопок карты, а не рядом с шторкой: так она не залезает на другие кнопки */
.map-tools #locate-btn { position: static; right: auto; bottom: auto !important; top: auto; }
/* низкие экраны: оставляем больше карты, форма прокручивается внутри шторки */
@media (max-width: 899px) and (max-height: 720px) { .sheet { max-height: 64vh; } }
.modal .auth .logo { display: none; }
