/* ═══════════════════════════════════════════════
   site.css — внешний вид сайта по макетам 04.11.2026
   (docs/page-main.md, page-how-it-works.md, page-info.md)
   Цвета — Pantone Chili Pepper 19-1557 TCX (#9B1B30).
   Светлая тема по умолчанию, тёмная — по настройке системы.
   Шрифты — свои файлы из static/fakerun-photo/fonts (без Google Fonts).
   06.11.2026 — телефон и планшет по макету 05.11: до 1023 px карта первой
   и панель действий внизу экрана, до 720 px меню кнопкой «Меню».
   07.11.2026 — подсказки поиска (Photon) списком под строкой поиска.
   09.11.2026 — колёса прокрутки для времени старта, продолжительности и даты (wheels.js).
   10.11.2026 — компактнее: меньше отступы, поля карточек и межстрочный интервал (задача 27).
   11.11.2026 — подсказка «?» у «Указать дату»: что будет без даты или продолжительности (задача 29).
═══════════════════════════════════════════════ */

/* ── Шрифты ──────────────────────────────────── */
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 700; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 700; font-display: swap; src: url('../fakerun-photo/fonts/golos-text-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans Extra Condensed'; font-weight: 600; font-display: swap; src: url('../fakerun-photo/fonts/fira-sans-extra-condensed-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans Extra Condensed'; font-weight: 600; font-display: swap; src: url('../fakerun-photo/fonts/fira-sans-extra-condensed-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans Extra Condensed'; font-weight: 700; font-display: swap; src: url('../fakerun-photo/fonts/fira-sans-extra-condensed-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans Extra Condensed'; font-weight: 700; font-display: swap; src: url('../fakerun-photo/fonts/fira-sans-extra-condensed-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Цвета ───────────────────────────────────── */
:root {
  color-scheme: light;
  --chili: #9B1B30;
  --chili-dark: #7A1426;
  --chili-tint: #F6E9EB;
  --on-chili-muted: #F6C9D0;
  --on-chili-dark-muted: #FADDE2;
  --bg: #FAF7F6;
  --surface: #FFFFFF;
  --segment-bg: #F3EEEE;
  --segment-on: #FFFFFF;
  --text: #1E1A1B;
  --text-body: #3E3638;
  --text-muted: #5E5557;
  --control-border: #8E8385;
  --line: #E7DFE0;
  --map-bg: #EEEBE3;
  --link: #9B1B30;
  --accent-ink: #9B1B30;          /* текст и рамка «Скачать GPX», активный пункт меню, сообщения об ошибке */
  --focus: #9B1B30;
  --start: #22B14C;
  --finish: #E5372B;
  --shadow: 0 14px 36px rgba(30,26,27,0.14);
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fira Sans Extra Condensed', 'Arial Narrow', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --chili-tint: #2A2A31;
    --bg: #16161A;
    --surface: #1F1F25;
    --segment-bg: #2A2A31;
    --segment-on: #3A3A43;
    --text: #F3EEEE;
    --text-body: #F3EEEE;
    --text-muted: #B5ADAF;
    --control-border: #8E8385;
    --line: #2A2A31;
    --map-bg: #2A2A31;
    --link: #F28B9B;
    --accent-ink: #F28B9B;
    --focus: #F28B9B;
    --shadow: 0 14px 36px rgba(0,0,0,0.45);
  }
}

/* ── Основа ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:hover { color: var(--chili-dark); }
@media (prefers-color-scheme: dark) { a:hover { color: #F6C9D0; } }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 2000;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; box-shadow: var(--shadow); }

/* ── Шапка ───────────────────────────────────── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr {
  max-width: 1280px; margin: 0 auto; padding: 6px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: 44px; }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--chili); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 16px/1 var(--font-display); letter-spacing: .02em;
}
.logo-text { font-weight: 700; font-size: 18px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none;
}
.nav a:hover { background: var(--segment-bg); color: var(--text); }
.nav [aria-current="page"] { color: var(--accent-ink); background: var(--chili-tint); font-weight: 600; }
.menu-btn { display: none; }

/* ── Подвал ──────────────────────────────────── */
.site-footer { background: var(--chili-dark); color: #fff; }
.ftr {
  max-width: 1280px; margin: 0 auto; padding: 20px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px;
}
.ftr-brand { font-weight: 700; font-size: 18px; }
.ftr-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.ftr-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ftr-nav a, .ftr-nav span { color: #fff; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 36px; }
.ftr-nav span { text-decoration: none; opacity: .85; }
.ftr-nav a:hover { color: var(--on-chili-dark-muted); }
.ftr-note { flex: 1 1 100%; font-size: 13px; color: var(--on-chili-dark-muted); }
.ftr-note a { color: #fff; }
.ftr-counter img { display: block; border-radius: 6px; }

/* ── Красная полоса ──────────────────────────── */
.hero { background: var(--chili); color: #fff; }
.hero-in { margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.hero--main .hero-in { max-width: 1280px; padding: 24px 32px 100px; }
.hero--page .hero-in { padding: 28px 32px; gap: 10px; }
.hero--hiw .hero-in { max-width: 1040px; }
.hero--info .hero-in { max-width: 1180px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-chili-muted); }
.hero h1 { font: 700 52px/1.05 var(--font-display); color: #fff; }
.hero--page h1 { font-size: 52px; line-height: 1; }
.hero-sub { font-size: 17px; line-height: 1.45; color: var(--on-chili-muted); max-width: 960px; }
.hero--hiw .hero-sub { max-width: 820px; }
.hero--info .hero-sub { max-width: 820px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.toc a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--on-chili-muted); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
}
.toc a:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

/* ═══════════════ ГЛАВНАЯ ═══════════════ */
.wrap { max-width: 1280px; margin: -84px auto 0; padding: 0 32px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.builder { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }

/* Блок ввода */
.panel {
  flex: 1 1 460px; max-width: 460px; min-width: 0;
  background: var(--surface); border-radius: 20px; padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.step { display: flex; flex-direction: column; gap: 10px; }
.step + .step { padding-top: 14px; border-top: 1px solid var(--line); }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--chili); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.step-head h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.counter { margin-left: auto; font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hint { font-size: 14px; line-height: 1.4; color: var(--text-muted); }

.seg { display: grid; gap: 4px; padding: 4px; border-radius: 12px; background: var(--segment-bg); }
.seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg button {
  height: 36px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--text); padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.seg button svg { width: 18px; height: 18px; flex: none; }
.seg button:hover { background: rgba(155,27,48,.06); }
.seg--mode button[aria-pressed="true"] { background: var(--segment-on); box-shadow: 0 1px 3px rgba(30,26,27,0.14); font-weight: 600; }
.seg--kind button[aria-pressed="true"] { background: var(--chili); color: #fff; font-weight: 600; }

.btn-outline {
  align-self: flex-start; height: 36px; padding: 0 14px; border: 1.5px solid var(--control-border); border-radius: 10px;
  background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { border-color: var(--text); }

.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.from-file-tag { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.input {
  height: 40px; padding: 0 12px; border: 1px solid var(--control-border); border-radius: 10px;
  background: var(--surface); font-size: 16px; font-variant-numeric: tabular-nums; width: 100%; min-width: 0;
}
.input::placeholder { color: var(--text-muted); opacity: 1; }
.input[aria-invalid="true"] { border: 2px solid var(--accent-ink); padding: 0 11px; }
.field-error { font-size: 13px; color: var(--accent-ink); }

/* ── Колёса прокрутки (09.11.2026, wheels.js) ──
   Компьютер — окно под полем, телефон и планшет — панель снизу экрана. */
.input-wrap { position: relative; display: block; min-width: 0; }
.input--wheel { padding-right: 40px; cursor: pointer; }
.input--wheel[readonly] { caret-color: transparent; }
.input--wheel:read-write:focus { cursor: text; }
.input--wheel[aria-expanded="true"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.field-ico { position: absolute; right: 12px; top: 10px; width: 20px; height: 20px; color: var(--text-muted); pointer-events: none; }

.wheels { --item: 40px; position: relative; display: flex; gap: 4px; height: calc(var(--item) * 5); user-select: none; -webkit-user-select: none; }
.wheels-band { position: absolute; left: 0; right: 0; top: calc(var(--item) * 2); height: var(--item); border-radius: 10px; background: var(--segment-bg); pointer-events: none; }
.wheel { position: relative; flex: 1 1 0; min-width: 0; border-radius: 10px; }
.wheel:focus-visible { outline-offset: 0; }
.wheel-scroll {
  position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-block: calc(var(--item) * 2);
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
  mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
  cursor: grab; touch-action: pan-y;
}
.wheel-scroll::-webkit-scrollbar { display: none; }
.wheel-scroll.is-drag { cursor: grabbing; scroll-snap-type: none; }
.wheel-item {
  height: var(--item); display: flex; align-items: center; justify-content: center; scroll-snap-align: center;
  font-size: 20px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; transform-origin: center; will-change: transform, opacity;
}
.wheel-item.is-on { font-weight: 600; }
.wheel-item.is-off { color: var(--text-muted); text-decoration: line-through; }
.wheel-unit { position: absolute; top: calc(var(--item) * 2); right: 6px; height: var(--item); display: flex; align-items: center; font-size: 13px; color: var(--text-muted); pointer-events: none; }
.wheel.has-unit .wheel-item { padding-right: 30px; }
.wheel--month { flex: 1.7 1 0; }
.wheel--year { flex: 1.15 1 0; }
.wheel-done { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--chili); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.wheel-done:hover { background: var(--chili-dark); }

/* Компьютер: окно под полем */
.wheel-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 300px; max-width: calc(100vw - 32px);
  padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(30,26,27,0.20);
  display: flex; flex-direction: column; gap: 10px;
}
.wheel-pop--right { left: auto; right: 0; }
.wheel-pop--date { width: 340px; }
.wheel-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wheel-pop-hint { font-size: 12px; line-height: 1.35; color: var(--text-muted); }

/* Телефон и планшет: панель снизу */
.wheel-scrim { position: fixed; inset: 0; z-index: 1600; background: rgba(30,26,27,0.42); opacity: 0; transition: opacity .2s; }
.wheel-scrim.is-open { opacity: 1; }
.wheel-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 1610; width: min(100%, 520px); transform: translate(-50%, 100%);
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 28px rgba(30,26,27,0.20);
  padding: 8px max(16px, env(safe-area-inset-left, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 10px; transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.wheel-sheet.is-open { transform: translate(-50%, 0); }
.wheel-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; }
.wheel-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.wheel-sheet-title { display: flex; flex-direction: column; min-width: 0; }
.wheel-sheet-title b { font-size: 17px; font-weight: 700; }
.wheel-sheet-title span { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.wheel-sheet .wheel-done { height: 44px; padding: 0 20px; border-radius: 12px; font-size: 16px; }
.wheel-sheet .wheels { --item: 44px; }
.wheel-sheet .wheel-item { font-size: 22px; }
.wheel-keys {
  align-self: center; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--accent-ink);
  font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
html.wheel-locked, html.wheel-locked body { overflow: hidden; }
@media (prefers-color-scheme: dark) {
  .wheel-pop { box-shadow: 0 10px 28px rgba(0,0,0,0.55); }
  .wheel-scrim { background: rgba(0,0,0,0.6); }
}
@media (prefers-reduced-motion: reduce) { .wheel-scrim, .wheel-sheet { transition: none; } }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.switch-row .switch-label { font-size: 16px; font-weight: 600; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
/* Подсказка «?» у «Указать дату» (11.11.2026, задача 29): справа вверху от слов, окно — под строкой */
.switch-row--tip { position: relative; }
.switch-label-wrap { display: flex; align-items: flex-start; min-width: 0; }
.tip { display: flex; margin: -10px -8px 0 -4px; }   /* значок выше строки — «справа вверху» от слов */
.tip-btn {
  flex: none; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: help;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.tip-btn span {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; line-height: 1;
}
.tip-btn:hover, .tip.is-open .tip-btn { color: var(--accent-ink); }
.tip-pop {
  display: none; position: absolute; left: 0; top: calc(100% + 2px); z-index: 60; width: min(360px, 100%);
  padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--control-border);
  box-shadow: 0 10px 28px rgba(30,26,27,0.20); font-size: 14px; line-height: 1.45; color: var(--text-body); font-weight: 400;
}
.tip-pop b { display: block; margin-bottom: 6px; color: var(--text); font-weight: 700; }
.tip-pop ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
/* Мышь: наведение; полоска под «?» не даёт подсказке пропасть, пока мышь идёт к ней */
@media (hover: hover) {
  .tip:hover .tip-pop { display: block; }
  .tip-btn { position: relative; }
  .tip-btn::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; }
}
.tip.is-open .tip-pop, .tip:has(.tip-btn:focus-visible) .tip-pop { display: block; }
.tip.is-dismissed .tip-pop { display: none !important; }   /* закрыли клавишей Esc */
@media (prefers-color-scheme: dark) { .tip-pop { box-shadow: 0 10px 28px rgba(0,0,0,0.55); } }
@media (max-width: 1023px) { .tip { margin: -16px -14px -12px -10px; } .tip-btn { width: 40px; height: 40px; } }   /* под палец — 40 px */

.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 52px; height: 32px; border-radius: 999px; background: var(--control-border); position: relative;
  transition: background .15s;
}
.switch::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.switch:checked { background: var(--chili); }
.switch:checked::before { transform: translateX(20px); }

.more {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 0 0;
  border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
}
.more-text { display: flex; flex-direction: column; flex: 1; }
.more-title { font-weight: 600; }
.more-sub { font-size: 13px; color: var(--text-muted); }
.more svg { width: 18px; height: 18px; flex: none; transition: transform .15s; }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-body { display: flex; flex-direction: column; gap: 6px; }
.gps-row { display: flex; align-items: center; gap: 10px; }
.gps-row input[type="range"] { flex: 1; accent-color: var(--chili); height: 44px; min-width: 0; }
.gps-val {
  flex: none; width: 56px; height: 44px; border: 1px solid var(--control-border); border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; background: var(--surface);
}
.help-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.help-btn span {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--control-border); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.help-pop { font-size: 14px; color: var(--text-body); background: var(--segment-bg); border-radius: 10px; padding: 10px 12px; }

.build-wrap { position: sticky; bottom: 16px; margin-top: auto; padding-top: 4px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.build-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
.btn-primary {
  width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--chili); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-primary:hover { background: var(--chili-dark); }
.btn-primary[aria-busy="true"] { opacity: .8; cursor: progress; }
.form-error { font-size: 14px; color: var(--accent-ink); }

/* Карта */
.map-card {
  flex: 999 1 560px; min-width: 0; min-height: 640px; position: relative;
  border-radius: 20px; overflow: hidden; background: var(--map-bg); box-shadow: var(--shadow);
}
.map-card #map { position: absolute; inset: 0; background: var(--map-bg); }
.leaflet-container { font: 400 14px/1.4 var(--font); }
.leaflet-top.leaflet-left, .leaflet-top.leaflet-right { padding: 16px; }
.leaflet-top .leaflet-control { margin: 0; }
.leaflet-touch .leaflet-bar, .leaflet-bar.leaflet-control-zoom {
  border: 1px solid var(--control-border); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(30,26,27,0.15);
}
.leaflet-control-zoom a, .leaflet-touch .leaflet-control-zoom a {
  width: 44px; height: 44px; line-height: 44px; font-size: 22px; font-weight: 500;
  background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line);
}
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-control-zoom a:hover { background: var(--segment-bg); color: var(--text); }
.leaflet-control-geocoder.leaflet-bar {
  width: min(360px, calc(100vw - 132px)); border: 1px solid var(--control-border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(30,26,27,0.15); background: var(--surface);
}
.leaflet-control-geocoder.leaflet-bar { display: flex; align-items: center; position: relative; overflow: visible; }
.leaflet-control-geocoder .leaflet-control-geocoder-icon { flex: none; width: 40px; height: 44px; border: 0; border-radius: 12px 0 0 12px; background-color: transparent; background-position: 14px center; }
.leaflet-control-geocoder .leaflet-control-geocoder-form { flex: 1; display: block; min-width: 0; }
.leaflet-control-geocoder .leaflet-control-geocoder-form input {
  height: 44px; padding: 0 16px 0 4px; font: 400 16px var(--font); color: var(--text); background: transparent; border: 0; width: 100%; outline-offset: -2px;
}
.leaflet-control-geocoder-form input::placeholder { color: var(--text-muted); }
/* Подсказки поиска (07.11.2026, Photon): название и ниже город, регион, страна */
.leaflet-control-geocoder .leaflet-control-geocoder-alternatives {
  position: absolute; top: calc(100% + 4px); left: -1px; right: -1px; width: auto; z-index: 1000;
  max-height: min(330px, 46vh); overflow-y: auto; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--control-border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30,26,27,0.18);
}
.leaflet-control-geocoder .leaflet-control-geocoder-alternatives-minimized { display: none; }
.leaflet-control-geocoder-alternatives li { padding: 0; border-bottom: 1px solid var(--line); white-space: normal; }
.leaflet-control-geocoder .leaflet-control-geocoder-alternatives li a {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 48px; padding: 6px 14px;
  font: 400 15px/1.3 var(--font); color: var(--text); text-decoration: none; cursor: pointer;
}
.leaflet-control-geocoder-alternatives li a b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaflet-control-geocoder-alternatives .gc-sub { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaflet-control-geocoder-alternatives li:hover, .leaflet-control-geocoder-alternatives .leaflet-control-geocoder-selected { background: var(--segment-bg); }
.leaflet-control-geocoder .leaflet-control-geocoder-error {
  position: absolute; top: calc(100% + 4px); left: -1px; right: -1px; margin: 0; padding: 12px 14px;
  background: var(--surface); color: var(--text-muted); border: 1px solid var(--control-border); border-radius: 12px; font: 400 14px var(--font);
}
@media (prefers-color-scheme: dark) { .leaflet-control-geocoder-icon { filter: invert(1); } }
.leaflet-control-attribution, .leaflet-container .leaflet-control-attribution {
  font-size: 12px; background: rgba(255,255,255,0.88); color: #1E1A1B; border-radius: 6px; padding: 2px 8px; margin: 0 8px 8px 0;
}
.leaflet-control-attribution a { color: #9B1B30; }

/* Маркеры */
.mk { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.leaflet-marker-draggable .mk { cursor: grab; }
.mk span { display: block; border-radius: 50%; box-sizing: border-box; }
.mk-point span { width: 11px; height: 11px; background: #fff; border: 2.4px solid #9B1B30; }
.mk-start span, .mk-finish span { width: 20px; height: 20px; border: 2.9px solid #fff; box-shadow: 0 1.5px 1.5px rgba(0,0,0,0.45); }
.mk-start span { background: var(--start); }
.mk-finish span { background: var(--finish); }
.mk-km-wrap { width: 48px; height: 20px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mk-km {
  height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; border: 1px solid rgba(30,26,27,.35); color: #1E1A1B;
  display: inline-flex; align-items: center; font: 700 11px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.leaflet-tooltip.mk-tip { font: 600 13px var(--font); border-radius: 8px; padding: 4px 8px; }

.loading-overlay {
  position: absolute; inset: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(250,247,246,.78); font-size: 14px;
}
@media (prefers-color-scheme: dark) { .loading-overlay { background: rgba(22,22,26,.78); } }

/* Загрузка GPX */
.gpx-drop {
  border: 1.5px dashed var(--control-border); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.gpx-drop.is-over { border-color: var(--chili); background: var(--chili-tint); }
.gpx-drop-icon { width: 28px; height: 28px; color: var(--text-muted); }
.gpx-drop-title { font-weight: 600; }
.gpx-pick-btn, .gpx-small-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px;
  border: 1.5px solid var(--control-border); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; background: transparent;
}
.gpx-pick-touch { display: none; }
.gpx-touch .gpx-pick-desk { display: none; }
.gpx-touch .gpx-pick-touch { display: inline; }
.gpx-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gpx-note, .gpx-busy { font-size: 14px; color: var(--text-muted); }
.gpx-error { display: flex; gap: 8px; font-size: 14px; color: var(--accent-ink); }
.gpx-error svg { width: 18px; height: 18px; flex: none; }
.gpx-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.gpx-file-ok { width: 28px; height: 28px; border-radius: 50%; background: var(--start); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.gpx-file-ok svg { width: 16px; height: 16px; }
.gpx-file-body { flex: 1 1 200px; min-width: 0; }
.gpx-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpx-file-meta, .gpx-file-note { font-size: 13px; color: var(--text-muted); }
.gpx-file-note.is-warn { color: var(--accent-ink); }
.gpx-file-actions { display: flex; gap: 6px; flex: 1 1 100%; padding-left: 40px; }
.gpx-icon-btn { width: 40px; padding: 0; }
.gpx-icon-btn svg { width: 16px; height: 16px; }
.gpx-map-drop { position: absolute; inset: 0; z-index: 800; background: rgba(155,27,48,.18); display: flex; align-items: center; justify-content: center; }
.gpx-map-drop-card { background: var(--surface); border-radius: 16px; padding: 24px 28px; text-align: center; box-shadow: var(--shadow); }
.gpx-map-drop-card svg { width: 32px; height: 32px; color: var(--chili); }
.gpx-map-drop-title { font-weight: 700; margin-top: 8px; }
.gpx-map-drop-sub { font-size: 14px; color: var(--text-muted); }
.gpx-toast {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 800;
  background: #1E1A1B; color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 14px; max-width: calc(100% - 32px);
}

/* Карточка результата */
.result {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
.result-empty { font-size: 16px; color: var(--text-muted); }
.preview { flex: none; width: 90px; height: 160px; border-radius: 12px; display: block; background: #EEEBE3; }
.summary { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.summary h2 { font-size: 20px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 20px; }
.stats dt { font-size: 13px; color: var(--text-muted); }
.stats dd { font: 700 26px/1.1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.btn-photo-main {
  height: 48px; border: 0; border-radius: 14px; background: var(--chili); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-photo-main:hover { background: var(--chili-dark); }
.btn-gpx-sec {
  height: 42px; border: 1.5px solid var(--accent-ink); border-radius: 14px; background: var(--surface); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-text {
  height: 36px; border: 0; background: none; color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* Уведомление «Маршрут сброшен» */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1500;
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px; border-radius: 14px;
  background: #1E1A1B; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 15px;
}
.toast button { height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #fff; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
@media (prefers-color-scheme: dark) { .toast { background: #F3EEEE; color: #1E1A1B; } .toast button { border-color: #1E1A1B; color: #1E1A1B; } }

/* Разделы под конструктором */
.sec { max-width: 1280px; margin: 0 auto; padding: 40px 32px 0; display: flex; flex-direction: column; gap: 16px; }
.sec--how { padding-top: 48px; }
.sec--faq { padding-bottom: 48px; gap: 8px; }
.sec--faq h2 { margin-bottom: 8px; }
.sec h2 { font: 700 36px/1.05 var(--font-display); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.sec-head a { font-weight: 600; }
.cards3 { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.cards3 li { flex: 1 1 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; align-content: start; gap: 6px 12px; }
.cards3 p { grid-column: 1 / -1; }
.cards3 .n { font: 700 32px/1 var(--font-display); color: var(--chili); }
.cards3 h3 { font-size: 19px; font-weight: 700; }
.cards3 p, .cols4 p, .faq-item p { color: var(--text-muted); }
.cols4 { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.cols4 > div { flex: 1 1 240px; border-top: 3px solid var(--chili); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.cols4 h3 { font-size: 18px; font-weight: 700; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq-item[open] { padding-bottom: 14px; }
.faq-item summary { font-size: 17px; font-weight: 700; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.faq-item p { margin-top: 2px; }

/* ═══════════════ «КАК ЭТО РАБОТАЕТ» ═══════════════ */
.page { margin: 0 auto; padding: 8px 32px 0; }
.page--hiw { max-width: 1040px; }
.hstep { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
#step5 { border-bottom: 0; }
.step-big { flex: 0 0 56px; font: 700 56px/0.9 var(--font-display); color: var(--chili); }
.hstep-body { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-body); line-height: 1.5; }
.hstep-body h2 { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--text); }
.hcards { display: flex; flex-wrap: wrap; gap: 12px; }
.hcard { flex: 1 1 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.hcard h3 { font-size: 18px; line-height: 1.3; color: var(--text); }
.hcard ul, .plain-list { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.callout { background: var(--chili-tint); border-radius: 12px; padding: 10px 14px; font-size: 15px; color: var(--text); }
.ptable { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ptable > div { display: flex; flex-wrap: wrap; gap: 2px 24px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ptable > div:last-child { border-bottom: 0; }
.ptable dt { flex: 0 0 220px; font-weight: 700; color: var(--text); }
.ptable dd { flex: 1 1 260px; color: var(--text-body); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 14px; color: var(--text); }
.chips li:first-child { font-weight: 600; }
.step5 { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.step5-text { flex: 999 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.grid-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.grid-dl dt { font-weight: 700; color: var(--text); }
.grid-dl dd { color: var(--text-body); }
.example { width: 150px; height: 267px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); flex: none; }
.cta { background: var(--chili); border-radius: 20px; padding: 20px 24px; margin: 8px 0 16px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.cta h2 { font: 700 30px/1.1 var(--font-display); color: #fff; }
.cta a { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 14px; background: #fff; color: #9B1B30; font-weight: 700; text-decoration: none; }
.cta a:focus-visible { outline-color: #fff; }
.sources { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 32px; font-size: 14px; line-height: 1.5; color: var(--text-body); }

/* ═══════════════ «ИНФОРМАЦИЯ» ═══════════════ */
.page--info { max-width: 1180px; padding: 24px 32px 40px; }
.info-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px 32px; align-items: start;
  grid-template-areas: "about contacts" "disclaimer services" "privacy services";
}
.ia-about { grid-area: about; } .ia-contacts { grid-area: contacts; } .ia-disclaimer { grid-area: disclaimer; }
.ia-privacy { grid-area: privacy; } .ia-services { grid-area: services; }
.info-grid section { scroll-margin-top: 16px; min-width: 0; }
.isec { display: flex; flex-direction: column; gap: 8px; color: var(--text-body); line-height: 1.5; }
.isec h2 { font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--text); }
.icard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.icard h2 { font-size: 20px; line-height: 1.3; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.contact-label { font-size: 13px; color: var(--text-muted); }
.contact-val { font-weight: 600; overflow-wrap: anywhere; }
.btn-copy { height: 36px; padding: 0 14px; border: 1.5px solid var(--accent-ink); border-radius: 12px; background: var(--surface); color: var(--accent-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.small-muted { font-size: 14px; color: var(--text-muted); }
.callout-info { background: var(--chili-tint); border-radius: 14px; padding: 10px 14px; color: var(--text); }
.privacy-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.privacy-head .updated { font-size: 14px; color: var(--text-muted); }
.short { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.short h3 { font-size: 18px; line-height: 1.3; color: var(--text); }
.short ul { padding-left: 20px; }
.pdet { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; scroll-margin-top: 16px; }
.pdet[open] { padding-bottom: 14px; }
.pdet summary { font-size: 17px; font-weight: 700; color: var(--text); min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.pdet > :not(summary) { margin-top: 6px; }
.pdet ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.svc { list-style: none; padding: 0; }
.svc li { padding: 6px 0; border-top: 1px solid var(--line); }
.svc li:first-child { border-top: 0; padding-top: 0; }
.svc b { color: var(--text); display: block; }
.svc span { font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }

/* ═══════════════ Ширина окна ═══════════════ */
/* ── Телефон и планшет (до 1023 px): карта первой, панель действий внизу экрана ── */
.mbar, .map-hint { display: none; }
@media (max-width: 1023px) {
  .hero--main .hero-in { padding: 10px 16px 12px; gap: 4px; }
  .hero--main h1 { font-size: 30px; line-height: 1.08; }
  .hero--main .hero-sub { display: none; }
  .wrap { margin-top: 12px; padding: 0 12px; gap: 12px; }
  .builder { flex-direction: column; gap: 12px; }
  .map-card { order: -1; flex: none; width: 100%; height: 58vh; height: min(58svh, 560px); min-height: 320px; border-radius: 16px; }
  .panel { max-width: none; flex: none; width: 100%; border-radius: 16px; padding: 16px; box-shadow: none; border: 1px solid var(--line); }
  /* пальцем: поля и кнопки остаются 40–44 px */
  .input { height: 44px; }
  .field-ico { top: 12px; }
  .seg button, .btn-outline { height: 40px; }
  .switch-row { min-height: 44px; }
  .more { min-height: 48px; }
  .btn-copy { height: 44px; }
  .toc a { min-height: 44px; }
  .ftr-nav a, .ftr-nav span { min-height: 44px; }
  .panel .build-wrap { display: none; }
  /* карточка результата: превью слева от заголовка, показатели под ними в три колонки */
  .result { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; align-items: start; padding: 14px 16px; border-radius: 16px; }
  .result-empty { grid-column: 1 / -1; }
  .result .preview { grid-column: 1; grid-row: 1 / span 2; width: 72px; height: 128px; border-radius: 10px; }
  .result .summary { display: contents; }
  .result .summary h2 { grid-column: 2; grid-row: 1; align-self: end; }
  .result .meta { grid-column: 2; grid-row: 2; align-self: start; white-space: normal; }
  .result .stats { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .result .stats > div:last-child { grid-column: span 2; }
  .result .stats dd { font-size: 24px; }
  .result .actions { grid-column: 1 / -1; grid-row: 4; }
  .result .btn-photo-main, .result .btn-gpx-sec { display: none; }
  .actions { flex-basis: 100%; }
  .hdr, .ftr, .sec { padding-left: 16px; padding-right: 16px; }
  .sec { padding-top: 32px; }
  .sec--how { padding-top: 32px; }
  .sec h2 { font-size: 30px; }
  .mbar:not(.hidden) {
    display: flex; flex-direction: column; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(30,26,27,.12);
  }
  .mbar .btn-primary { height: 52px; }
  .mbar-res { display: flex; flex-direction: column; gap: 8px; }
  .mbar-res.hidden { display: none; }
  .mbar-sum { font: 700 20px/1.1 var(--font-display); font-variant-numeric: tabular-nums; text-align: center; }
  .mbar-btns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
  .mbar-btns button { height: 48px; padding: 0 8px; }
  .mbar-msg { text-align: center; }
  .mbar > * { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
  /* запас под панелью действий: по её высоте (до построения ниже, чем с кнопками фото и GPX) */
  body.mbar-on { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  body.mbar-on:has(#mbar-res.hidden):has(#mbar-msg.hidden) { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body.mbar-on .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .toast { white-space: nowrap; max-width: calc(100% - 24px); }
  .map-hint:not(.hidden) {
    display: block; position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 700; pointer-events: none;
    margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(30,26,27,.86); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .info-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "about" "contacts" "disclaimer" "privacy" "services"; gap: 20px; }
}
@media (max-width: 760px) {
  .hero--page .hero-in { padding: 20px; }
  .hero--page h1 { font-size: 36px; }
  /* оглавление одной строкой с прокруткой вбок; справа край растворяется */
  .toc { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 4px 40px 4px 20px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; white-space: nowrap; }
  .page { padding-left: 20px; padding-right: 20px; }
  /* номер шага слева от заголовка, а не отдельной строкой */
  .hstep { position: relative; padding: 20px 0; }
  .step-big { position: absolute; left: 0; top: 20px; font-size: 34px; line-height: 0.85; }
  .hstep h2[id$="-title"] { padding-left: 34px; }
  .hstep-body h2 { font-size: 22px; }
  .ptable dt, .ptable dd { flex-basis: 100%; }
  .cta a { width: 100%; }
  .isec h2 { font-size: 22px; }
}
/* ── Меню кнопкой (до 720 px): шапка в одну строку, пункты — списком под ней ── */
@media (max-width: 720px) {
  .site-header { position: relative; z-index: 1100; }
  .hdr { flex-wrap: nowrap; padding: 5px 16px; min-height: 55px; }   /* с рамкой снизу — 56 px */
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; cursor: pointer;
    border: 1px solid var(--control-border); border-radius: 10px; background: var(--surface); font-size: 15px; font-weight: 600;
  }
  .menu-btn svg { width: 20px; height: 20px; }
  .menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
  .menu-btn[aria-expanded="true"] .i-close { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 2px; padding: 8px 12px 14px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px rgba(30,26,27,.16);
  }
  .nav.is-open { display: flex; }
  .nav a, .nav span { min-height: 48px; padding: 12px 14px; font-size: 16px; line-height: 24px; }
  .hero--main h1 { font-size: 26px; }
  .ftr { padding: 16px 16px 20px; gap: 4px 16px; }
  .ftr-right { display: contents; }
  .ftr-brand { order: 1; }
  .ftr-counter { order: 2; margin-left: auto; }
  .ftr-nav { order: 3; flex: 1 1 100%; gap: 0 20px; }
  .ftr-note { order: 4; }
}
@media (max-width: 360px) {
  .hero--main h1 { font-size: 24px; }
  .result .stats dd { font-size: 22px; }
  .map-hint:not(.hidden) { font-size: 13px; }
}
@media (max-width: 480px) {
  .grid-dl { grid-template-columns: minmax(0, 1fr); }
  .contact-row .btn-copy { width: 100%; }
  .fields-2 { gap: 8px; }
  .panel { padding: 16px; }
  .seg button { font-size: 14px; }
}

/* Тёмная тема: номера шагов светлее, чтобы хватало контраста на тёмном фоне */
@media (prefers-color-scheme: dark) { .cards3 .n, .step-big { color: #F28B9B; } }
