/* BAKAS — маршруты и навигация */
.nav-open { position: absolute; z-index: 5; right: 12px; bottom: calc(146px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 6px; border: 0; padding: 0 14px 0 11px; height: 44px; cursor: pointer;
  font-weight: 700; font-size: 15px; color: var(--text); }
.nav-open[hidden], .nav-recenter[hidden] { display: none !important; }
.nav-open svg { width: 22px; height: 22px; stroke: #2563eb; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Пока строим маршрут или едем — прячем лишнее */
body.navmode-plan .legend, body.navmode-plan .raid, body.navmode-plan .bottom, body.navmode-plan .nav-open, body.navmode-plan .offline,
body.navmode-drive .legend, body.navmode-drive .raid, body.navmode-drive .bottom, body.navmode-drive .nav-open, body.navmode-drive .top,
body.navmode-drive .cross, body.navmode-drive .locate, body.navmode-drive .credit,
body.navmode-pick .legend, body.navmode-pick .raid, body.navmode-pick .bottom, body.navmode-pick .nav-open, body.navmode-pick .nav-plan,
body.navmode-pick .nav-routes { display: none !important; }
body.navmode-plan .cross { display: none; }
/* Выбор точки маршрута на карте — прицел в центре (синий, чтобы не путать с «Здесь пост») */
body.navmode-pick .cross { display: block !important; z-index: 14; filter: drop-shadow(0 0 2px rgba(0,0,0,.45)); }
body.navmode-pick .cross::before, body.navmode-pick .cross::after { background: #2563eb; }
body.navmode-pick .cross i { border-color: #2563eb; background: rgba(37,99,235,.18); }

/* Панель «Откуда / Остановка / Куда» */
.nav-plan { position: absolute; z-index: 15; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px;
  padding: 10px 10px 8px; max-width: 520px; }
@media (min-width: 700px) { .nav-plan { right: auto; width: 440px; } }
.nav-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 6px; font-weight: 800; }
.nav-x { border: 0; background: var(--panel-2); color: var(--text); width: 34px; height: 34px; border-radius: 10px;
  font-size: 20px; cursor: pointer; line-height: 1; }
.nav-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.nav-pin { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.nav-pin.a { background: #30a46c; } .nav-pin.s { background: #f5a524; } .nav-pin.b { background: #e5484d; }
.nav-row input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 10px; padding: 10px 11px; font-size: 15px; font-family: inherit; }
.nav-row input.me { color: #2563eb; font-weight: 600; }
.nav-row .nav-clear { border: 0; background: none; color: var(--muted); font-size: 18px; width: 30px; height: 36px; cursor: pointer; flex: none; }
.nav-links { display: flex; gap: 14px; margin: 6px 2px 2px; font-size: 14px; }
.nav-links button { border: 0; background: none; color: #2563eb; font-weight: 600; padding: 4px 0; cursor: pointer; font-family: inherit; font-size: 14px; }
.nav-sugg { margin-top: 6px; border-top: 1px solid var(--line); max-height: 45vh; overflow-y: auto; }
.nav-sugg:empty { display: none; }
.nav-sugg button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; background: none;
  color: var(--text); padding: 10px 4px; font-size: 14.5px; cursor: pointer; border-bottom: 1px solid var(--line); font-family: inherit; }
.nav-sugg button:last-child { border-bottom: 0; }
.nav-sugg .ic { width: 20px; text-align: center; flex: none; color: var(--muted); }
.nav-sugg .hint { color: var(--muted); font-size: 13px; padding: 10px 4px; }

/* Варианты маршрута */
.nav-routes { position: absolute; z-index: 15; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  padding: 10px; max-width: 520px; }
@media (min-width: 700px) { .nav-routes { right: auto; width: 440px; } }
.nav-alts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.nav-alts::-webkit-scrollbar { display: none; }
.nav-alt { flex: 1 0 140px; border: 2px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px;
  padding: 9px 10px; text-align: left; cursor: pointer; font-family: inherit; }
.nav-alt.on { border-color: #2563eb; background: color-mix(in srgb, #2563eb 7%, var(--panel)); }
.nav-alt .t { font-size: 19px; font-weight: 800; }
.nav-alt .d { font-size: 13px; color: var(--muted); margin-top: 1px; }
.nav-alt .p { font-size: 13px; margin-top: 4px; font-weight: 600; }
.nav-alt .p.has { color: var(--red); } .nav-alt .p.none { color: var(--green); }
.nav-alt .tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-top: 4px;
  background: color-mix(in srgb, #30a46c 18%, transparent); color: #1f8a57; }
.nav-alt .tag.slow { background: var(--panel-2); color: var(--muted); }
.nav-via { font-size: 13px; color: var(--muted); margin: 8px 2px 0; }
.nav-go { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.nav-go .btn { margin: 0; flex: 1; background: #2563eb; color: #fff; }
.nav-go .arr { font-size: 13px; color: var(--muted); white-space: nowrap; }
.nav-note { font-size: 12px; color: var(--muted); margin: 8px 2px 0; }

/* Выбор точки на карте */
.nav-pick { position: absolute; z-index: 15; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 12px; max-width: 520px; }
.nav-pick .t { font-weight: 700; font-size: 14px; }
.nav-pick .w { color: var(--muted); font-size: 14px; margin: 3px 0 10px; min-height: 18px; }
.nav-pick .row { display: flex; gap: 8px; }
.nav-pick .row button { flex: 1; border: 0; border-radius: 12px; padding: 13px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit; }
.nav-pick .ok { background: #2563eb; color: #fff; } .nav-pick .no { background: var(--panel-2); color: var(--text); }

/* Ведение: подсказка манёвра сверху */
.nav-banner { position: absolute; z-index: 16; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; max-width: 560px;
  background: #1d4ed8; color: #fff; border-radius: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.3); padding: 12px 14px;
  display: flex; gap: 12px; align-items: center; }
@media (min-width: 700px) { .nav-banner { right: auto; width: 480px; } }
.nav-banner .arrow { width: 52px; height: 52px; flex: none; }
.nav-banner .arrow svg { width: 52px; height: 52px; stroke: #fff; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-banner .dist { font-size: 26px; font-weight: 800; line-height: 1.05; }
.nav-banner .txt { font-size: 15px; line-height: 1.3; margin-top: 2px; opacity: .95; }
.nav-banner .then { font-size: 12.5px; opacity: .8; margin-top: 3px; }
.nav-banner.off { background: #b45309; }

/* Ведение: нижняя полоса */
.nav-bar { position: absolute; z-index: 16; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); max-width: 560px;
  padding: 10px 12px; }
@media (min-width: 700px) { .nav-bar { right: auto; width: 480px; } }
.nav-eta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nav-eta .big { font-size: 24px; font-weight: 800; color: #1f8a57; }
.nav-eta .sm { color: var(--muted); font-size: 14px; }
.nav-ahead { margin-top: 6px; font-size: 14px; font-weight: 600; }
.nav-ahead.has { color: var(--red); } .nav-ahead.none { color: var(--muted); font-weight: 500; }
.nav-btns { display: flex; gap: 8px; margin-top: 10px; }
.nav-btns button { border: 0; border-radius: 12px; padding: 12px 10px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.nav-btns .stop { flex: 1; background: var(--panel-2); color: var(--text); }
.nav-btns .post { flex: 1.3; background: var(--orange); color: #fff; }
.nav-recenter { position: absolute; z-index: 16; right: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); border: 0;
  padding: 11px 14px; font-weight: 700; cursor: pointer; font-family: inherit; color: #2563eb; }
.nav-suggest { position: absolute; z-index: 17; left: 8px; right: 8px; bottom: calc(150px + env(safe-area-inset-bottom)); max-width: 560px;
  padding: 12px; border-left: 4px solid #30a46c; }
@media (min-width: 700px) { .nav-suggest { right: auto; width: 480px; } }
.nav-suggest .t { font-weight: 800; }
.nav-suggest .s { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.nav-suggest .row { display: flex; gap: 8px; }
.nav-suggest .row button { flex: 1; border: 0; border-radius: 10px; padding: 11px; font-weight: 700; cursor: pointer; font-family: inherit; }
.nav-suggest .yes { background: #30a46c; color: #fff; } .nav-suggest .no { background: var(--panel-2); color: var(--text); }
.nav-me { width: 26px; height: 26px; }
.nav-me svg { width: 26px; height: 26px; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
