
    /* ============================================= */
    /*        Стили для Splash, Toast, Install       */
    /* ============================================= */
    /* Splash overlay */
    #app-splash {
      position: fixed; inset: 0;
      display: none; align-items: center; justify-content: center;
      background: #0b1020; color: #fff; z-index: 99999;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    }
    #app-splash.show { display: flex; }
    #app-splash .logo { display:flex; flex-direction:column; align-items:center; gap:12px; }
    #app-splash .logo .dot { width:14px; height:14px; border-radius:50%; background:#50a7ff; animation: pulse 1s infinite ease-in-out; }
    @keyframes pulse { 0%{transform:scale(.9);opacity:.6} 50%{transform:scale(1);opacity:1} 100%{transform:scale(.9);opacity:.6} }

    /* Update toast */
    #update-toast {
      position: fixed; left: 50%; transform: translateX(-50%); bottom: 145px; z-index: 99999;
      display: none; gap: 8px; align-items: center;
      background: rgba(22,22,26,.92); color:#fff; padding:10px 12px; border-radius:10px;
      backdrop-filter: blur(6px);
    }
    #update-toast.show { display:flex; }
    #update-toast button {
      appearance:none; border:0; border-radius:8px; padding:6px 10px; cursor:pointer;
      background:#50a7ff; color:#fff; font-weight:600;
    }
    #update-toast .muted { opacity:.85; font-size:12px; margin-right:6px; }

    /* APP Install */
    #app-install {
      position: fixed; left: 50%; transform: translateX(-50%); bottom: 145px; z-index: 99999;
      display: none; gap: 8px; align-items: center;
      background: rgba(22,22,26,.92); color:#fff; padding:10px 12px; border-radius:10px;
      backdrop-filter: blur(6px);
    }
    #app-install.show { display:flex; }
    #app-install button {
      appearance:none; border:0; border-radius:8px; padding:6px 10px; cursor:pointer;
      background:#50a7ff; color:#08111e; font-weight:600;
    }
    #app-install .muted { opacity:.85; font-size:12px; margin-right:6px; }

    /* ============================================= */
    /*          Общие стили для всей страницы        */
    /* ============================================= */
    html,
    body {
      height: 100%;
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      display: flex;
      flex-direction: column;
    }

    /* ============================================= */
    /* ---            Компоненты макета          --- */
    /* ============================================= */
    /* 1. Обертка для карты, чтобы она занимала все доступное пространство */
    #map-container {
      /* СТИЛИ, КОТОРЫЕ ЗАДАЮТ РАЗМЕР */
      flex-grow: 1;
      position: relative;

      /* СТИЛИ ДЛЯ ФОНА */
      background: radial-gradient(#11154b 0%, #00031c 100%);
      overflow: hidden;
    }

    /* 2. Создаем псевдо-элемент для наложения текстуры звезд. Он будет находиться между фоновым градиентом и самой картой. */
    #map-container::before {
      content: '';
      position: absolute;
      inset: 0; /* Растягиваем на весь контейнер (top:0, left:0, right:0, bottom:0) */

      /* Указываем путь к вашей картинке */
      background-image: url('../image/gEdfUOnqJFOUYizc9FGQjtBqvuatNgqt.jpg');
      background-repeat: repeat; /* Заполняем все пространство, повторяя картинку */

      opacity: 0.3; /* Делаем звезды полупрозрачными */
      z-index: 0;
      pointer-events: none; /* Элемент не будет мешать кликам по карте */
    }

    /* 3. Делаем фон самой карты прозрачным. Без этого вы не увидите фон, который мы добавили к контейнеру. */
    #map {
      background-color: transparent !important;
      width: 100%;
      height: 100%;
    }

    /* Блок для текста */
    .content-block {
      padding: 25px;
      background-color: #f8f9fa;
      border-top: 1px solid #dee2e6;
      border-bottom: 1px solid #dee2e6;
      text-align: center;
    }

    /* Подвал */
    footer {
      padding: 0px;
      background-color: #343a40;
      color: white;
      text-align: center;
      font-size: 0.9em;
    }

    footer a {
      color: #aaeeff;
      text-decoration: none;
    }

    footer a:hover {
      text-decoration: underline;
    }

    /* ================================================ */
    /* --- Стили для сворачиваемого блока контекста --- */
    /* ================================================ */
    /* Делаем подвал позиционированным, чтобы кнопка могла быть абсолютно спозиционирована относительно него */
    footer {
      position: relative;
      padding: 3px;
      background-color: #343a40;
      color: white;
      font-size: 0.9em;
      text-align: center; /* Оставляем на случай, если flex не сработает */
      display: flex;
      justify-content: center; /* Горизонтальное центрирование содержимого */
      align-items: center; /* Вертикальное выравнивание по центру */
      gap: 100px; /* Расстояние между блоком иконок и текстом */
    }

    /* Стилизуем саму кнопку, теперь она позиционируется НАД подвалом */
    #toggle-content-btn {
      position: absolute;
      top: -33px; /* Поднимаем кнопку ровно над подвалом */
      right: 60px;
      z-index: 10;
      padding: 8px 15px;
      font-size: 14px;
      background-color: #343a40; /* Цвет как у подвала */
      color: white;
      border: 1px solid #495057;
      border-bottom: none; /* Убираем нижнюю границу, т.к. она примыкает к блоку */
      border-radius: 8px 8px 0 0; /* Скругляем только верхние углы */
      cursor: pointer;
      transition: background-color 0.2s;
    }

    #toggle-content-btn:hover {
      background-color: #495057;
    }

    /* Стили для самого блока контента. */
    .content-block {
      transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out, border-width 0.5s ease-in-out;
      max-height: auto; /* или любое значение, больше максимальной высоты блока */
      overflow: hidden;
    }

    body.content-collapsed .content-block {
      max-height: 0;
      padding: 0;
      border-width: 0;
    }

    /* ============================================= */
    /* ---      Стили для иконок в подвале ---       */
    /* ============================================= */
    /* Контейнер для иконок */
    #social-links {
      display: flex; /* Это остается для выравнивания самих иконок */
      gap: 14px; /* УБИРАЕМ margin-bottom, который создавал лишнюю высоту */
    }

    /* Стили для самих иконок в подвале */
    #social-links a {
      color: white;
      font-size: 24px;
      text-decoration: none;
      transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
    }

    /* Эффект при наведении курсора */
    #social-links a:hover {
      color: #aaeeff;
      transform: scale(1.2);
    }

    /* ============================================= */
    /*      Стили для панели инструмента "Буфер"     */
    /* ============================================= */
    #buffer-panel {
      position: absolute; top: 10px; right: 60px; z-index: 999; width: 350px;
      background: #fff; padding: 12px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      font-family: Inter, Roboto, Arial, sans-serif; font-size: 13px; display: none;
    }
    #buffer-panel .flight-panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    #buffer-panel .flight-panel-header h3 { margin: 0; }
    #buffer-panel .buffer-panel-close {
      appearance: none; border: 0; background: transparent; font-size: 18px; line-height: 1;
      cursor: pointer; padding: 2px 6px; color: #333;
    }
    #buffer-panel h3 { margin: 0 0 8px 0; font-size: 15px; }
    #buffer-panel .row { margin-bottom: 8px; }
    #buffer-panel label { display:block; margin-bottom:4px; font-weight:600; }
    #buffer-panel select, #buffer-panel button, #buffer-panel input {
      width:100%; box-sizing:border-box; padding:8px; border-radius:6px; border:1px solid #ddd; background:#fafafa;
    }
    #buffer-panel input[type="number"] { width:110px; display:inline-block; vertical-align:middle; margin-right:8px; }
    #buffers-list { max-height:120px; overflow:auto; padding:6px; background:#f7f7f7; border-radius:6px; margin-top:6px; }
    #report { margin-top:8px; max-height:180px; overflow:auto; background:#fff; padding:6px; border-radius:6px; border:1px dashed #eee; }
    .buf-item { padding:6px; border-radius:4px; margin-bottom:6px; background:#fff; border:1px solid #eee; display:flex; justify-content:space-between; align-items:center; }
    .buf-item.selected { border-color:#ff7a59; box-shadow: 0 2px 8px rgba(255,122,89,0.12); }
    .small { font-size:12px; color:#666; }
    code { background:#f2f2f2; padding:2px 4px; border-radius:3px; }
	
    #buffer-panel .buffer-panel-close {
      border: none;
      background: transparent;
      cursor: pointer;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #555;
    }
	
    /* hover-эффект кнопки при закрытии окна */
    #buffer-panel .buffer-panel-close:hover {
      background: rgba(0,0,0,0.04);
      color: #000;
    }
	
    /* ======================================= */
    /*       ЕДИНЫЙ СТИЛЬ ДЛЯ ВСЕХ КНОПОК      */
    /* ======================================= */
    /* --- 1. Базовый стиль для ВСЕХ кнопок-контролов --- */
    /* Селектор нацелен на любую кнопку внутри стандартной группы контролов MapLibre */
    .maplibregl-ctrl-group button {
      width: 34px;
      height: 34px;
      font-size: 16px;
      border: none;
      border-radius: 4px;
      background-color: white !important;
      color: #333 !important;
      box-shadow: none !important;
      box-shadow: 0 0 0 2px rgba(0,0,0,.1);
      cursor: pointer;
      padding: 0; /* Сброс */
    }

    /* --- 2. Единый стиль для состояния HOVER (наведение мыши) --- */
    .maplibregl-ctrl-group button:hover {
      background-color: #f8f8f8 !important;
    }

    /* --- 3. Единый стиль для АКТИВНОГО состояния --- */
    /* Перечисляем все возможные варианты "активных" кнопок */
    .maplibregl-ctrl-group button.active,                        /* Наш кастомный класс (для кнопки буфера) */
    .maplibregl-ctrl-group .mapbox-gl-draw_ctrl-draw-btn.active, /* Кнопки рисования */
    .pitch-toggle-ctrl button.active,                            /* Кнопка сброса Pitch */
    .maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active  /* Кнопка геолокации */
    {
      background-color: #3388ff !important;
      color: #fff !important;
      border-color: #3388ff !important;
    }

    /* --- 3.1. Родные SVG-иконки с белым цветом для активных кнопок DRAW --- */
    .mapbox-gl-draw_ctrl-draw-btn.mapbox-gl-draw_line.active {
      background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill='white' d='m13.5 3.5c-1.4 0-2.5 1.1-2.5 2.5 0 .3 0 .6.2.9l-3.8 3.8c-.3-.1-.6-.2-.9-.2-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5c0-.3 0-.6-.2-.9l3.8-3.8c.3.1.6.2.9.2 1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5z'/%3E%3C/svg%3E");
    }

    .mapbox-gl-draw_ctrl-draw-btn.mapbox-gl-draw_polygon.active {
      background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill='white' d='m15 12.3v-4.6c.6-.3 1-1 1-1.7 0-1.1-.9-2-2-2-.7 0-1.4.4-1.7 1h-4.6c-.3-.6-1-1-1.7-1-1.1 0-2 .9-2 2 0 .7.4 1.4 1 1.7v4.6c-.6.3-1 1-1 1.7 0 1.1.9 2 2 2 .7 0 1.4-.4 1.7-1h4.6c.3.6 1 1 1.7 1 1.1 0 2-.9 2-2 0-.7-.4-1.4-1-1.7zm-8-.3v-4l1-1h4l1 1v4l-1 1h-4z'/%3E%3C/svg%3E");
    }

    .mapbox-gl-draw_ctrl-draw-btn.mapbox-gl-draw_point.active {
      background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill='white' d='m10 2c-3.3 0-6 2.7-6 6s6 9 6 9 6-5.7 6-9-2.7-6-6-6zm0 2c2.1 0 3.8 1.7 3.8 3.8 0 1.5-1.8 3.9-2.9 5.2h-1.7c-1.1-1.4-2.9-3.8-2.9-5.2-.1-2.1 1.6-3.8 3.7-3.8z'/%3E%3C/svg%3E");
    }

    /* ======================================= */
    /* Выпадающий список стилей (бутерброд)    */
    /* ======================================= */
    .style-switcher { position: relative; }
    .style-switcher .menu {
      position:absolute; right:50px; top:40px; width:220px; max-height:320px; overflow:auto; background:#fff;
      border:1px solid #ddd; border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,0.15); padding:8px; display:none; z-index:1000;
    }
    .style-switcher .menu.open { display:block; }
    .style-switcher .menu button {
      width:100%; text-align:left; padding:8px 10px; border:1px solid #eee; border-radius:6px; background:#fafafa; margin-bottom:6px; cursor:pointer; font-size:13px;
    }
    .style-switcher .menu button.active { background:#eaf3ff; border-color:#cfe3ff; }

    /* ======================================= */
    /*             Панель геокодера            */
    /* ======================================= */
    #geocoder-panel {
      position: absolute; top: 10px; right: 60px; width: 360px; max-width: calc(100% - 100px); z-index: 1001; display: none;
    }
    #geocoder-panel.visible { display: block; }
    #geocoder-panel .maplibregl-ctrl-geocoder { width:100%; box-shadow:0 10px 30px rgba(0,0,0,0.15); border-radius:8px; }

    /* ============================================= */
    /*        ---   Панель выбора языка ---          */
    /* ============================================= */
    #map-language-panel {
      position: absolute;
      top: 10px;
      right: 60px;
      z-index: 999;
      width: 220px;
      max-width: calc(100% - 100px);
      background: #fff;
      padding: 10px;
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      font-family: Inter, Roboto, Arial, sans-serif;
      font-size: 13px;
      display: none;
      box-sizing: border-box;
    }
    #map-language-panel[aria-hidden="false"] { display: block; }
    #map-language-panel[aria-hidden="true"] { display: none; }
    #map-language-panel .map-language-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
    }
    #map-language-panel .map-language-header h3 {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
    }
    #map-language-panel .map-language-close {
      border: none;
      background: transparent;
      cursor: pointer;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #555;
    }
    #map-language-panel .map-language-close:hover {
      background: rgba(0,0,0,0.04);
      color: #000;
    }
    #map-language-panel label {
      display: block;
      margin-bottom: 6px;
      font-weight: 600;
    }
    #map-language-panel select {
      width: 100%;
      box-sizing: border-box;
      padding: 6px 8px;
      border-radius: 6px;
      border: 1px solid #ddd;
      background: #fafafa;
      font-size: 13px;
    }

    /* ================================================ */
    /* Стили для блока с координатами, зумом, масштабом */
    /* ================================================ */
    #coords-container {
      position: absolute;
      bottom: 45px;
      right: 10px;
      z-index: 998;    /* Ниже панелей, но выше карты */
      background: rgba(255, 255, 255, 0.8);
      padding: 5px 10px;
      border-radius: 4px;
      font-family: monospace;
      font-size: 11px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
      width: auto;
      white-space: normal;
    }
    #coords-container[aria-hidden="true"] { display: none; }
    #coords-container .info-panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    #coords-container .info-panel-header h3 { margin: 0; font-size: 14px; }
    #coords-container .info-panel-close {
      background: transparent;
      border: 0;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      color: #333;
      padding: 0 4px;
    }
    #coords-container .info-panel-close:hover { color: #000; }

    /* ================================================= */
    /* Permalink: нажатое состояние (пока держим кнопку) */
    /* ================================================= */
    .maplibregl-ctrl button.permalink-pressing {
      background-color: #3388ff !important;
      color: #fff !important;
      border-color: #3388ff !important;
    }

    /* ================================================= */
    /* iOS: popup может прятаться под оверлеями/панелями */
    /* ================================================= */
    #map .maplibregl-popup { z-index: 10000; }
    #map .maplibregl-popup, #map .maplibregl-popup * { pointer-events: auto; }

    #map .maplibregl-popup.app-popup {
      pointer-events: none;
    }

    /* ============================================= */
    /* ---          Единый стиль для POPUP         --- */
    /* ============================================= */
    #map .app-popup {
      font: 13px/1.35 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      color: #FFFFFF;
      background: #1F1F1F;
      border: 1px solid #FFFFFF;
      border-radius: 6px;
      padding: 8px 10px;
    }
    #map .maplibregl-popup-content {
      background: transparent;
      box-shadow: none;
      padding: 0;
    }
    #map .maplibregl-popup-close-button {
      display: none;
    }
    #map .maplibregl-popup.app-popup-tooltip {
      pointer-events: none;
    }
    #map .maplibregl-popup.app-popup-tooltip .maplibregl-popup-content {
      background: #1F1F1F;
      color: #FFFFFF;
      border: 1px solid #FFFFFF;
      border-radius: 6px;
      padding: 6px 8px;
      font-size: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    }
    #map .maplibregl-popup.app-popup-tooltip .maplibregl-popup-tip {
      border-top-color: #FFFFFF;
      border-bottom-color: #FFFFFF;
    }
    #map .app-popup-title {
      margin: 0 0 6px 0;
      font-size: 14px;
      font-weight: 700;
    }
    #map .app-popup-divider {
      height: 1px;
      background: #FFFFFF;
      opacity: 0.15;
      margin: 6px 0;
    }
    #map .app-popup-meta {
      margin: 0 0 6px 0;
      font-size: 12px;
      color: #FFFFFF;
      opacity: 0.9;
    }
    #map .app-popup-label {
      font-weight: 600;
    }
    #map .app-popup-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    #map .app-popup-table td {
      vertical-align: top;
      padding: 2px 6px 2px 0;
    }
    #map .app-popup-table td.app-popup-key {
      font-weight: 600;
      white-space: nowrap;
    }
    #map .app-popup-table td.app-popup-val {
      word-break: break-word;
    }

    /* ============================================= */
    /* ---          SPLAT POI MARKERS               --- */
    /* ============================================= */
    .splat-poi {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      background: rgba(0,0,0,0.55);
      box-shadow: 0 8px 20px rgba(0,0,0,0.35);
      display: grid;
      place-items: center;
      cursor: pointer;
      transform: translate(-50%, -50%);
      user-select: none;
      -webkit-user-select: none;
      overflow: hidden;
    }
    .splat-poi i {
      color: #fff;
      font-size: 14px;
      line-height: 1;
    }
    .splat-poi .splat-sprite {
      width: 16px;
      height: 16px;
      background-repeat: no-repeat;
      image-rendering: auto;
      filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35));
    }

    /* ============================================= */
    /* ---   Marker labels + leader lines (POI)   --- */
    /* ============================================= */
    .app-marker-labels-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 520;
    }
    .app-marker-label-lines {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      overflow: visible;
      z-index: 1;
    }
    .app-marker-label-leader {
      stroke: rgba(255, 255, 255, 0.85);
      stroke-width: 1.5;
      stroke-linecap: round;
    }
    .app-marker-label-texts {
      position: absolute;
      inset: 0;
      z-index: 2;
    }
    .app-marker-label {
      position: absolute;
      background: #1F1F1F;
      color: #FFFFFF;
      border: 1px solid #FFFFFF;
      border-radius: 6px;
      padding: 6px 8px;
      font-size: 12px;
      font-weight: 500;
      line-height: 1;
      white-space: nowrap;
      box-shadow: 0 4px 12px rgba(0,0,0,0.35);
      user-select: none;
      -webkit-user-select: none;
      pointer-events: none;
    }

    /* ============================================= */
    /* ---     Стили для модального окна Info    --- */
    /* ============================================= */
    /* Полупрозрачный фон на всю страницу */
    .modal-overlay {
      display: none; /* Изначально окно скрыто */
      position: fixed; /* Позиционируем относительно окна браузера */
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.6); /* Черный с 60% прозрачностью */
      z-index: 1000; /* Окно должно быть поверх всего остального контента */
      justify-content: center; /* Центрируем содержимое по горизонтали */
      align-items: center; /* Центрируем по вертикали */
    }

    /* Контейнер с самим контентом окна */
    .modal-content {
      background-color: #ffffff;
      color: #333;
      padding: 20px 25px;
      border-radius: 8px;
      box-shadow: 0 5px 15px rgba(0,0,0,0.3);
      position: relative;
      width: 90%; /* Ширина 90% от родителя (overlay) */
      max-width: 550px; /* Но не больше 550px на широких экранах */
      max-height: 85vh; /* Ограничиваем высоту, чтобы влезало на мобильных */
      overflow-y: auto; /* Если контента много, появится внутренняя прокрутка */
      animation: fadeInScale 0.3s ease-in-out;
    }

    /* Шапка модального окна */
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #dee2e6;
      padding-bottom: 10px;
      margin-bottom: 15px;
    }

    .modal-header h2 {
      margin: 0;
      font-size: 1.5em;
    }

    /* Стили для кнопки "крестик" */
    .close-btn {
      font-size: 28px;
      font-weight: bold;
      color: #6c757d;
      cursor: pointer;
      transition: color 0.2s ease;
    }

    .close-btn:hover {
      color: #343a40;
    }

    /* Тело модального окна */
    .modal-body p {
      line-height: 1.6;
      margin-bottom: 1em;
    }

    .modal-body p:last-child {
      margin-bottom: 0;
    }

    /* Простая анимация появления */
    @keyframes fadeInScale {
      from {
        opacity: 0;
        transform: scale(0.9);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    /* ============================================= */
    /*   Панель инструмента "Flight Profile (1R)"    */
    /* ============================================= */
    #flight-profile-panel {
      position: absolute;
      top: 10px;
      right: 60px;
      z-index: 999;
      width: 350px;
      max-width: calc(100% - 20px);
      background: #fff;
      padding: 12px;
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      font-family: Inter, Roboto, Arial, sans-serif;
      font-size: 13px;
      display: none;
      box-sizing: border-box;
    }

    #flight-profile-panel[aria-hidden="true"] {
      display: none;
    }

    #flight-profile-panel[aria-hidden="false"] {
      display: block;
    }

    #flight-profile-panel .flight-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
      gap: 8px;
    }

    #flight-profile-panel .flight-panel-title {
      margin: 0;
      font-size: 15px;
      font-weight: 600;
    }

    #flight-profile-panel .flight-panel-close {
      border: none;
      background: transparent;
      cursor: pointer;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #555;
    }

    #flight-profile-panel .flight-panel-close:hover {
      background: rgba(0,0,0,0.04);
      color: #000;
    }

    #flight-profile-panel .flight-panel-row {
      margin-bottom: 8px;
    }

    #flight-profile-panel label {
      display: block;
      margin-bottom: 4px;
      font-weight: 600;
    }

    #flight-profile-panel input[type="datetime-local"],
    #flight-profile-panel input[type="text"],
    #flight-profile-panel input[type="number"],
    #flight-profile-panel button {
      width: 100%;
      box-sizing: border-box;
      padding: 6px 8px;
      border-radius: 6px;
      border: 1px solid #ddd;
      background: #fafafa;
      font-size: 13px;
    }

    #flight-profile-panel input[type="number"] {
      -moz-appearance: textfield;
    }

    #flight-profile-panel input[type="number"]::-webkit-outer-spin-button,
    #flight-profile-panel input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    /* Живое состояние кнопок панели: hover/active/focus */
    #flight-profile-panel button {
      cursor: pointer;
      transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
    }

    #flight-profile-panel button:hover {
      background: #f0f0f0;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    #flight-profile-panel button:active {
      background: #e0e0e0;
      transform: translateY(1px);
      box-shadow: none;
    }

    #flight-profile-panel button:focus-visible {
      outline: 2px solid #3388ff;
      outline-offset: 1px;
    }

    #flight-profile-panel .flight-alt-mode {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    #flight-profile-panel .flight-alt-mode label {
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 4px;
      margin-bottom: 0;
    }

    #flight-profile-panel .flight-alt-hint {
      margin-top: 4px;
      font-size: 11px;
      color: #777;
    }

    #flight-profile-panel .flight-panel-buttons {
      display: flex;
      gap: 6px;
    }

    #flight-profile-panel .flight-panel-buttons button {
      flex: 1 1 0;
    }

    #flight-profile-panel #flight-btn-approximate {
      font-weight: 600;
    }

    /* Список Checkpoints */

    #flight-profile-list {
      max-height: 160px;
      overflow-y: auto;
      padding: 4px;
      background: #f7f7f7;
      border-radius: 6px;
      border: 1px solid #eee;
    }

    .flight-cp-item {
      background: #fff;
      border-radius: 4px;
      border: 1px solid #e3e3e3;
      padding: 6px;
      margin-bottom: 6px;
      cursor: pointer;
    }

    .flight-cp-item.selected {
      border-color: #3388ff;
      box-shadow: 0 2px 8px rgba(51,136,255,0.25);
    }

    .flight-cp-header-line {
      display: flex;
      justify-content: space-between;
      gap: 6px;
      margin-bottom: 3px;
      font-size: 12px;
    }

    .flight-cp-index {
      font-weight: 600;
      color: #333;
    }

    .flight-cp-coords {
      color: #777;
      text-align: right;
      flex: 1;
    }

    .flight-cp-row-inline {
      display: flex;
      justify-content: space-between;
      gap: 6px;
      font-size: 12px;
      margin-bottom: 3px;
    }

    .flight-cp-row-inline span.label {
      color: #555;
    }

    .flight-cp-row-inputs {
      display: flex;
      gap: 4px;
      margin-top: 4px;
    }

    .flight-cp-row-inputs .field {
      flex: 1 1 0;
    }

    .flight-cp-row-inputs .field label {
      font-size: 11px;
      margin-bottom: 2px;
    }

    .flight-cp-row-inputs input[type="number"] {
      width: 100%;
      padding: 4px 6px;
      font-size: 12px;
    }

    /* Подсказка внизу панели */
    #flight-profile-panel .flight-panel-help {
      font-size: 11px;
      color: #777;
    }

    /* Мобильная адаптация */
    @media (max-width: 480px) {
      #flight-profile-panel {
        right: 10px;
        left: 10px;
        width: auto;
      }
    }

    #flight-profile-panel .flight-layers-visibility {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    #flight-profile-panel .flight-layers-visibility label {
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 0;
    }

    #flight-profile-panel .flight-layers-visibility input[type="checkbox"] {
      width: auto;
    }

    /* ============================================= */
    /*            ---   Панель Миникарты ---         */
    /* ============================================= */
		.mapboxgl-ctrl-minimap {
			/* Позиционирование */
			position: absolute !important;
			right: 10px !important;
			bottom: 45px !important;
			top: auto !important;  /* ВАЖНО: сбрасываем прилипание к верху */
			left: auto !important; /* ВАЖНО: сбрасываем прилипание к левому краю */
			margin: 0 !important;  /* Убираем стандартные отступы контролов */
			
			z-index: 1000;
			
			/* Оформление */
			border: 2px solid #fff;
			box-shadow: 0 1px 5px rgba(0,0,0,0.6);
			background: #fff;
			
			/* Взаимодействие */
			pointer-events: auto;
		}
