:root {
  --ink: #111814;
  --muted: #68736c;
  --paper: #f5f2e9;
  --card: #fffef9;
  --green: #b9ff38;
  --green-dark: #8ddd16;
  --line: rgba(17, 24, 20, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Manrope, "Segoe UI", sans-serif;
}
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 76px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 233, .9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.7px;
}
.brand-mark { width: 27px; height: 27px; display: flex; align-items: end; gap: 3px; transform: skew(-12deg); }
.brand-mark span { display: block; width: 7px; border-radius: 5px 5px 2px 2px; background: var(--ink); }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 21px; background: var(--green-dark); }
.brand-mark span:nth-child(3) { height: 16px; }
nav { display: flex; gap: 34px; }
nav a { color: #3f4842; text-decoration: none; font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--ink); }

.button {
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 15px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.button:hover { transform: translateY(-2px); background: #26322b; }
.button-small { padding: 11px 18px; font-size: 13px; }

.hero {
  min-height: 680px;
  padding: 112px clamp(24px, 8vw, 130px) 70px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 79% 38%, rgba(185,255,56,.24) 0 9%, transparent 9.5%),
    radial-gradient(circle at 79% 38%, transparent 0 17%, rgba(17,24,20,.08) 17.2% 17.4%, transparent 17.6%),
    radial-gradient(circle at 79% 38%, transparent 0 29%, rgba(17,24,20,.06) 29.2% 29.4%, transparent 29.6%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 550px;
  right: 10%;
  top: 60px;
  opacity: .62;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='550' viewBox='0 0 420 550'%3E%3Cg fill='none' stroke='%23111814' stroke-width='2' opacity='.35'%3E%3Cpath d='M20 500C75 420 33 340 104 274s34-139 118-181 108 1 173-71'/%3E%3Cpath d='M1 380c87 13 104-56 181-70s89-87 220-105'/%3E%3Cpath d='M80 544c-8-89 38-103 103-143s58-138 142-197'/%3E%3C/g%3E%3Cg fill='%23b9ff38'%3E%3Ccircle cx='105' cy='274' r='7'/%3E%3Ccircle cx='183' cy='310' r='5'/%3E%3Ccircle cx='325' cy='204' r='6'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 23px; height: 4px; background: var(--green-dark); border-radius: 10px; }
h1 { margin: 22px 0 24px; max-width: 780px; font-size: clamp(56px, 7vw, 102px); line-height: .91; letter-spacing: -5px; font-weight: 800; }
h1 em { color: transparent; -webkit-text-stroke: 1.5px var(--ink); font-style: normal; }
.hero > p { max-width: 560px; color: var(--muted); font-size: 19px; line-height: 1.6; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 28px; }
.text-button { border: 0; background: transparent; cursor: pointer; font-weight: 750; border-bottom: 1px solid var(--ink); padding: 9px 0; }
.hero-stats { margin-top: 76px; display: flex; gap: 64px; }
.hero-stats div { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-size: 25px; }
.hero-stats span { color: var(--muted); font-size: 12px; }

.map-section { padding: 105px clamp(20px, 6vw, 92px); background: var(--ink); color: white; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 35px; }
.section-heading h2, .how h2 { margin: 15px 0 0; font-size: clamp(35px, 4vw, 55px); letter-spacing: -2px; }
.section-heading p { color: #9da8a1; max-width: 270px; line-height: 1.5; }
.map-shell { border: 1px solid rgba(255,255,255,.15); border-radius: 24px; background: #202923; overflow: hidden; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.map-toolbar { min-height: 76px; padding: 12px 15px 12px 23px; display: flex; align-items: center; gap: 22px; }
.map-toolbar label { display: flex; align-items: center; gap: 10px; color: #9da8a1; font-size: 12px; }
select, .map-toolbar input { color: white; background: #303b34; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 34px 10px 12px; outline: none; }
.map-toolbar input { width: 180px; padding-right: 12px; }
.yandex-key-field { animation: fadeIn .18s ease; }
.yandex-key-field[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
.period { background: #303b34; border-radius: 10px; padding: 3px; display: flex; }
.period button { border: 0; color: #b4bdb7; background: transparent; padding: 9px 14px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.period button.active { color: var(--ink); background: var(--green); font-weight: 800; }
.map-focus-button { border: 1px solid rgba(255,255,255,.14); color: #dbe4de; background: #303b34; border-radius: 10px; padding: 10px 13px; font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.map-focus-button:hover { border-color: rgba(185,255,56,.55); color: white; }
.map-focus-button:disabled { opacity: .45; cursor: not-allowed; }
.map-key-button.has-key { color: var(--ink); background: #dfffb0; border-color: transparent; }
.tracks-counter { color: #aeb8b1; font-size: 12px; white-space: nowrap; }
.tracks-counter strong { color: white; font-size: 14px; }
.button-map { margin-left: auto; background: var(--green); color: var(--ink); border-radius: 11px; padding: 12px 18px; }
.button-map:hover { background: #d0ff7c; }
#map { height: 610px; background: #d9ded8; }
.leaflet-tile-pane { filter: saturate(.35) contrast(.92); }
.map-legend { position: absolute; left: 20px; bottom: 20px; z-index: 500; background: rgba(17,24,20,.88); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; font-size: 10px; }
.map-legend i { width: 90px; height: 7px; border-radius: 6px; background: linear-gradient(90deg, #2f80ed, #ffe24a, #ff8a16, #e11d48); }

.metrics-section { padding: 82px clamp(24px, 8vw, 130px); background: #f4f7fb; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.metrics-grid article { min-height: 150px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: white; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 18px 45px rgba(16,24,40,.06); }
.metrics-grid span { color: var(--muted); font-size: 13px; }
.metrics-grid strong { color: #101828; font-size: clamp(30px, 4vw, 48px); letter-spacing: -1.5px; }

.tracks-section { padding: 105px clamp(24px, 8vw, 130px); background: #ece8dc; }
.tracks-heading { color: var(--ink); }
.total-card { min-width: 145px; padding: 17px 20px; border-radius: 14px; background: var(--ink); color: white; display: flex; flex-direction: column; }
.total-card strong { color: var(--green); font-size: 28px; }
.total-card span { color: #aeb8b1; font-size: 11px; }
.admin-panel { margin: -8px 0 22px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #f7f9fb; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, .9fr) auto; align-items: center; gap: 18px; }
.admin-panel.active { border-color: rgba(21, 112, 239, .28); background: #eef6ff; }
.admin-kicker { display: block; margin-bottom: 5px; color: #1570ef; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.admin-panel strong { display: block; font-size: 18px; }
.admin-panel p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.admin-form { display: flex; gap: 10px; }
.admin-form input { min-width: 0; flex: 1; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; outline: none; }
.admin-form input:focus { border-color: #1570ef; box-shadow: 0 0 0 3px rgba(21,112,239,.12); }
.admin-form .button { padding: 13px 18px; border-radius: 12px; }
.admin-status { color: var(--muted); font-size: 12px; text-align: right; }
.delete-code-panel { margin: 0 0 22px; padding: 20px; border: 1px solid #d9e6f6; border-radius: 18px; background: #fff; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, .9fr) minmax(160px, .45fr); align-items: center; gap: 18px; }
.delete-code-panel strong { display: block; font-size: 18px; }
.delete-code-panel p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.delete-code-form { display: flex; gap: 10px; }
.delete-code-form input { min-width: 0; flex: 1; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #f9fbff; outline: none; text-transform: uppercase; }
.delete-code-form input:focus { border-color: #1570ef; box-shadow: 0 0 0 3px rgba(21,112,239,.12); }
.delete-code-form .button { padding: 13px 18px; border-radius: 12px; background: #d92d20; }
.delete-code-form .button:hover { background: #b42318; }
.delete-code-status { color: var(--muted); font-size: 12px; text-align: right; }
.delete-code-status.success { color: #027a48; }
.delete-code-status.error { color: #b42318; }
.tracks-list { display: grid; gap: 10px; }
.track-row { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: grid; grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(100px, .7fr)) auto; align-items: center; gap: 18px; }
.track-name { min-width: 0; display: flex; align-items: center; gap: 13px; }
.track-name > i { width: 39px; height: 39px; border-radius: 11px; background: var(--green); color: var(--ink); display: grid; place-items: center; font-style: normal; font-size: 20px; }
.track-name div { min-width: 0; }
.track-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.track-name span, .track-meta span { color: var(--muted); font-size: 11px; }
.track-meta { display: flex; flex-direction: column; gap: 4px; }
.track-meta strong { font-size: 13px; font-weight: 700; }
.privacy-badge { width: fit-content; padding: 6px 9px; border-radius: 999px; color: #3a5910; background: #e8f7c8; font-size: 10px; font-weight: 750; }
.privacy-badge.full { color: #6c3817; background: #ffead8; }
.delete-track { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: #9c3b29; cursor: pointer; font-size: 18px; }
.delete-track.admin-delete { width: auto; padding: 0 14px; color: white; background: #d92d20; border-color: #d92d20; font-size: 12px; font-weight: 800; }
.delete-track:hover { border-color: #d99588; background: #fff0ed; }
.delete-track.admin-delete:hover { background: #b42318; border-color: #b42318; }
.empty-tracks { padding: 55px 20px; border: 1px dashed #b3b5ac; border-radius: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty-tracks > span { color: var(--green-dark); font-size: 45px; }
.empty-tracks strong { margin-top: 4px; font-size: 18px; }
.empty-tracks p { margin: 8px 0 22px; color: var(--muted); font-size: 13px; }

.how { padding: 105px clamp(24px, 8vw, 130px) 125px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 55px; }
.steps article { padding: 30px; min-height: 220px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.steps b { color: var(--green-dark); font-size: 12px; }
.steps h3 { margin: 45px 0 12px; font-size: 20px; }
.steps p { color: var(--muted); line-height: 1.55; font-size: 14px; }
.safety-card { margin-top: 24px; padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: #101828; color: white; display: grid; grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr); gap: 34px; overflow: hidden; position: relative; }
.safety-card::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 310px; height: 310px; border: 28px solid rgba(108,160,255,.18); border-radius: 50%; }
.safety-card h3 { margin: 8px 0 12px; font-size: clamp(26px, 3vw, 42px); letter-spacing: -1.3px; }
.safety-card p { margin: 0; color: #c5d0e0; line-height: 1.55; }
.safety-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; position: relative; z-index: 1; }
.safety-card li { padding: 16px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); color: #e6edf8; line-height: 1.45; }
.safety-card li strong { color: #9ec5ff; }

footer { border-top: 1px solid var(--line); min-height: 120px; padding: 30px clamp(24px, 6vw, 92px); display: flex; align-items: center; gap: 40px; color: var(--muted); font-size: 12px; }
footer p { margin-left: auto; }

.admin-page { background: #f4f7fb; }
.admin-main { min-height: 100vh; padding: clamp(24px, 5vw, 72px); }
.admin-brand { display: inline-flex; margin-bottom: 42px; }
.admin-hero { padding: clamp(28px, 5vw, 52px); border-radius: 28px; background: white; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, .7fr) auto; gap: 20px; align-items: center; box-shadow: 0 24px 70px rgba(16,24,40,.08); }
.admin-hero h1 { margin: 14px 0 10px; font-size: clamp(44px, 6vw, 78px); line-height: .9; letter-spacing: -4px; }
.admin-hero p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 560px; }
.admin-login-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #f8fbff; }
.admin-routes { margin-top: 34px; }

dialog { width: min(520px, calc(100% - 30px)); border: 0; border-radius: 24px; padding: 38px; color: var(--ink); background: var(--card); box-shadow: 0 30px 100px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(10,15,12,.72); backdrop-filter: blur(4px); }
dialog h2 { margin: 18px 0 8px; font-size: 34px; letter-spacing: -1.2px; }
dialog > p { color: var(--muted); line-height: 1.5; }
.dialog-close { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 22px; }
.dropzone { margin: 24px 0 17px; min-height: 190px; border: 1.5px dashed #a9b2ac; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--green-dark); background: rgba(185,255,56,.09); }
.dropzone input { display: none; }
.dropzone > span:last-child { color: var(--muted); font-size: 12px; }
.upload-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-size: 25px; }
.consent { display: flex; gap: 11px; align-items: start; font-size: 12px; line-height: 1.45; margin: 16px 0; color: #4f5a53; }
.consent input { accent-color: var(--green-dark); margin-top: 2px; }
.button-full { width: 100%; border-radius: 12px; }
.button-full:disabled { opacity: .35; cursor: not-allowed; transform: none; }
dialog small { display: block; margin-top: 13px; color: #8b948e; text-align: center; }
.upload-status { padding: 12px 14px; border-radius: 10px; background: #eaf7ce; color: #314018; font-size: 13px; }
.upload-status.error { background: #ffe5de; color: #762613; }
.delete-code-result { margin: 14px 0; padding: 16px; border: 1px solid #b9d4ff; border-radius: 16px; background: #eef6ff; display: grid; gap: 9px; }
.delete-code-result[hidden] { display: none; }
.delete-code-result span { color: #175cd3; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.delete-code-result strong { padding: 11px 12px; border-radius: 11px; background: white; color: #101828; font-size: 20px; letter-spacing: .04em; text-align: center; }
.delete-code-result .map-focus-button { color: white; background: #1570ef; border-color: #1570ef; }
.delete-code-result small { margin-top: 0; color: #475467; }
.storage-notice { position: fixed; left: 50%; bottom: 20px; z-index: 2000; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 12px 18px; border-radius: 12px; color: white; background: #a33a20; box-shadow: 0 8px 30px rgba(0,0,0,.24); font-size: 13px; text-align: center; }
.privacy-option { margin: 16px 0 8px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; gap: 16px; cursor: pointer; }
.privacy-option > span { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.privacy-option strong { font-size: 13px; }
.privacy-option small { color: var(--muted); font-size: 11px; }
.privacy-option input { position: absolute; opacity: 0; pointer-events: none; }
.privacy-option i { width: 44px; height: 24px; padding: 3px; border-radius: 999px; background: #c8cec9; transition: .2s; }
.privacy-option i::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.privacy-option input:checked + i { background: var(--green-dark); }
.privacy-option input:checked + i::after { transform: translateX(20px); }
.privacy-option:focus-within { outline: 2px solid rgba(141,221,22,.45); outline-offset: 2px; }

@media (max-width: 800px) {
  nav { display: none; }
  .topbar { height: 66px; }
  .topbar > .button { display: none; }
  .hero { padding-top: 76px; min-height: 630px; }
  .hero::after { opacity: .22; right: -180px; }
  h1 { letter-spacing: -3px; }
  .hero-stats { gap: 25px; flex-wrap: wrap; }
  .section-heading { align-items: start; flex-direction: column; }
  .map-toolbar { align-items: stretch; flex-direction: column; padding: 15px; gap: 10px; }
  .map-toolbar label { justify-content: space-between; }
  .button-map { margin: 0; }
  .tracks-counter { text-align: center; }
  #map { height: 520px; }
  .tracks-section { padding: 75px 20px; }
  .metrics-section { padding: 64px 20px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .admin-panel { grid-template-columns: 1fr; }
  .admin-form { flex-direction: column; }
  .admin-status { text-align: left; }
  .delete-code-panel { grid-template-columns: 1fr; }
  .delete-code-form { flex-direction: column; }
  .delete-code-status { text-align: left; }
  .track-row { grid-template-columns: 1fr auto; }
  .track-meta { display: none; }
  .steps { grid-template-columns: 1fr; }
  .safety-card { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: start; gap: 10px; }
  footer p { margin: 0; }
}

/* Обновлённый главный экран */
body {
  background:
    linear-gradient(rgba(17, 24, 20, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 20, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}

.topbar {
  height: 68px;
  border-bottom-color: rgba(17, 24, 20, .08);
  box-shadow: 0 8px 30px rgba(17, 24, 20, .04);
}

.topbar .button-small {
  color: var(--ink);
  background: var(--green);
}

.topbar .button-small:hover { background: #ceff74; }

.hero {
  min-height: 510px;
  padding-top: 74px;
  padding-bottom: 62px;
  background:
    radial-gradient(circle at 81% 42%, rgba(185,255,56,.34) 0 10%, transparent 10.5%),
    radial-gradient(circle at 81% 42%, transparent 0 20%, rgba(17,24,20,.07) 20.2% 20.4%, transparent 20.6%);
}

.hero::after {
  width: 350px;
  height: 430px;
  top: 34px;
  right: 9%;
}

h1 {
  margin-top: 18px;
  margin-bottom: 20px;
  max-width: 700px;
  font-size: clamp(54px, 6vw, 84px);
}

.hero > p {
  max-width: 610px;
  margin-bottom: 0;
  font-size: 17px;
}

.hero-actions { margin-top: 26px; }

.hero-stats {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  bottom: 48px;
  margin: 0;
  gap: 10px;
}

.hero-stats div {
  min-width: 125px;
  padding: 14px 16px;
  border: 1px solid rgba(17,24,20,.09);
  border-radius: 15px;
  background: rgba(255,254,249,.78);
  backdrop-filter: blur(12px);
}

.hero-stats strong { font-size: 21px; }

.map-section {
  padding: 64px clamp(18px, 4vw, 64px) 72px;
}

.map-section .section-heading {
  margin-bottom: 24px;
  align-items: center;
}

.map-section .section-heading h2 {
  margin-top: 9px;
  font-size: clamp(31px, 3.5vw, 48px);
}

.map-shell {
  border-radius: 20px;
  box-shadow: 0 34px 90px rgba(0,0,0,.4);
}

.map-toolbar {
  min-height: 70px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(150px, .8fr) minmax(150px, .8fr) auto auto auto;
  gap: 9px;
}

.map-toolbar label {
  min-height: 48px;
  padding: 5px 7px 5px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: #29332d;
  justify-content: space-between;
}

.map-toolbar select {
  min-width: 0;
  max-width: 210px;
  border: 0;
  background-color: transparent;
}

.map-key-button { display: none; }
.yandex-key-field { grid-column: 1 / 3; }
.period { align-self: center; }
.map-focus-button { min-height: 48px; }
.tracks-counter {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #29332d;
}
.button-map {
  min-height: 48px;
  margin-left: 0;
  white-space: nowrap;
}

#map { height: min(720px, 68vh); min-height: 540px; }

.map-legend {
  left: 18px;
  bottom: 18px;
  padding: 11px 14px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.tracks-section { padding-top: 82px; }

@media (max-width: 1220px) {
  .hero-stats { position: static; margin-top: 38px; }
  .map-toolbar { grid-template-columns: 1.2fr .8fr auto auto; }
  .tracks-counter { display: none; }
}

@media (max-width: 800px) {
  .topbar { height: 62px; padding-inline: 18px; }
  .hero {
    min-height: 570px;
    padding: 62px 20px 42px;
  }
  .hero::after { width: 300px; right: -150px; top: 65px; }
  h1 { font-size: clamp(49px, 15vw, 68px); line-height: .94; }
  .hero > p { font-size: 15px; line-height: 1.55; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 9px; }
  .hero-actions .button { width: 100%; }
  .text-button { align-self: center; }
  .hero-stats { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .hero-stats div { min-width: 0; padding: 11px 9px; }
  .hero-stats strong { font-size: 18px; }
  .hero-stats span { font-size: 9px; }
  .map-section { padding: 42px 10px 52px; }
  .map-section .section-heading { padding: 0 10px; }
  .map-section .section-heading p { display: none; }
  .map-shell { border-radius: 17px; }
  .map-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px;
  }
  .map-toolbar label {
    min-width: 0;
    align-items: start;
    flex-direction: column;
    gap: 1px;
  }
  .map-toolbar select { width: 100%; max-width: none; padding: 4px 20px 3px 0; }
  .period { grid-column: 1 / -1; width: 100%; }
  .period button { flex: 1; padding-inline: 8px; }
  #fit-tracks { display: none; }
  .button-map { grid-column: 1 / -1; }
  #map { height: 62vh; min-height: 470px; }
}

/* Светлый спортивный стиль */
:root {
  --ink: #101828;
  --muted: #667085;
  --paper: #f4f7fb;
  --card: #ffffff;
  --green: #3478f6;
  --green-dark: #1765e5;
  --line: rgba(16, 24, 40, .11);
}

body {
  background: var(--paper);
}

.topbar {
  background: rgba(255,255,255,.9);
  border-bottom-color: #e6eaf0;
  box-shadow: 0 4px 20px rgba(16,24,40,.04);
}

.brand-mark span { background: #101828; }
.brand-mark span:nth-child(2) { background: #3478f6; }

.topbar .button-small,
.button {
  color: white;
  background: #1765e5;
  box-shadow: 0 7px 18px rgba(23,101,229,.2);
}

.topbar .button-small:hover,
.button:hover { background: #0e55c7; }

.hero {
  background:
    radial-gradient(circle at 82% 42%, rgba(52,120,246,.15) 0 11%, transparent 11.5%),
    radial-gradient(circle at 82% 42%, transparent 0 22%, rgba(52,120,246,.1) 22.2% 22.4%, transparent 22.6%),
    linear-gradient(180deg, #fff 0%, #f4f7fb 100%);
}

.hero::after {
  opacity: .42;
  filter: hue-rotate(177deg) saturate(1.7);
}

.eyebrow { color: #1765e5; }
.eyebrow span { background: #3478f6; }

h1 {
  color: #101828;
  letter-spacing: -4.5px;
}

h1 em {
  color: #3478f6;
  -webkit-text-stroke: 0;
}

.text-button {
  color: #1765e5;
  border-bottom-color: #1765e5;
}

.hero-stats div {
  border-color: #e2e8f0;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 32px rgba(16,24,40,.06);
}

.hero-stats strong { color: #101828; }

.map-section {
  color: #101828;
  background: #eef3f9;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.map-section .section-heading p { color: #667085; }

.map-shell {
  border-color: #dce3ec;
  background: white;
  box-shadow: 0 28px 70px rgba(16,24,40,.14);
}

.map-toolbar {
  background: #fff;
  border-bottom: 1px solid #e4e9f0;
}

.map-toolbar label,
.tracks-counter {
  color: #667085;
  border-color: #e0e6ee;
  background: #f6f8fb;
}

.map-toolbar select,
.map-toolbar input {
  color: #101828;
  background-color: transparent;
}

.period {
  border: 1px solid #e0e6ee;
  background: #f6f8fb;
}

.period button { color: #667085; }
.period button.active {
  color: white;
  background: #3478f6;
  box-shadow: 0 4px 12px rgba(52,120,246,.25);
}

.map-focus-button {
  color: #344054;
  border-color: #e0e6ee;
  background: #f6f8fb;
}

.map-focus-button:hover {
  color: #1765e5;
  border-color: #8db5ff;
}

.tracks-counter strong { color: #101828; }

.button-map {
  color: white;
  background: #1765e5;
}

.button-map:hover { background: #0e55c7; }

.map-legend {
  color: #fff;
  background: rgba(16,24,40,.88);
}

.tracks-section { background: #fff; }
.total-card { background: #101828; }
.total-card strong { color: #6ca0ff; }
.track-name > i {
  color: #1765e5;
  background: #e8f0ff;
}
.privacy-badge {
  color: #175cd3;
  background: #eaf2ff;
}
.privacy-option input:checked + i { background: #3478f6; }
.upload-icon {
  color: white;
  background: #3478f6;
}
.dropzone:hover,
.dropzone.dragging {
  border-color: #3478f6;
  background: rgba(52,120,246,.05);
}

.how { background: #f4f7fb; }
.steps article {
  border-color: #e2e8f0;
  box-shadow: 0 10px 28px rgba(16,24,40,.04);
}
.steps b { color: #1765e5; }

footer { background: #fff; }

@media (max-width: 800px) {
  h1 { letter-spacing: -3px; }
  .map-section { background: #eef3f9; }
}

/* Логотип-беговая петля */
.brand {
  gap: 0;
  font-size: 22px;
  letter-spacing: -1px;
}

.brand-mark {
  display: none;
}

.brand-name {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  padding: 0 3px 23px;
}

.brand-name::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 2px;
  height: 18px;
  border: 1px solid #aebdce;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 3px #bdc9d7,
    inset 0 0 0 4px #fff,
    inset 0 0 0 5px #c6d0dc,
    inset 0 0 0 6px #fff,
    inset 0 0 0 7px #cfd7e1,
    inset 0 0 0 8px #fff,
    inset 0 0 0 9px #d7dee7;
}

.brand-name::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 7px;
  right: 7px;
  bottom: 2px;
  height: 18px;
  border: 2px solid #3478f6;
  border-radius: 999px;
  clip-path: inset(-3px 48% -3px -3px);
}

.locate-button {
  color: white;
  border-color: #1765e5;
  background: #1765e5;
}

.locate-button:hover {
  color: white;
  border-color: #0e55c7;
  background: #0e55c7;
}

.track-popup .leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(16,24,40,.2);
}

.track-popup .leaflet-popup-content {
  margin: 0;
  width: 245px !important;
}

.route-card { padding: 17px; color: #101828; }
.route-card-title {
  margin-bottom: 13px;
  font-size: 16px;
  font-weight: 800;
}
.route-card-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: baseline;
}
.route-card-grid span {
  color: #667085;
  font-size: 12px;
}
.route-card-grid strong {
  color: #101828;
  font-size: 12px;
  text-align: right;
}

.brand-name > span { font-weight: 720; }
.brand-name strong {
  color: #1765e5;
  font-weight: 850;
}
