/* Общий фон и заголовок — как в форме */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #e6f0f3;
  color: #333;
  padding: 20px;
  margin: 0;
}
h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 25px;
  color: #333;
}


.avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;   /* круглая форма */
  overflow: hidden;     /* обрезаем всё, что выходит */
  background: #ddd;     /* фон, если нет фото */
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-wrap img.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* картинка подгоняется по размеру */
}


/* Светлая поисковая форма (Удалить у себя ниже идущий тёмный блок для .search-form input...) */
.search-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.search-form input[type="text"],
.search-form input[list][type="text"] {
  flex: 1 1 200px;
  padding: 14px 16px;
  border-radius: 30px;
  border: 1px solid #ccc;
  font-size: 16px;
  background: #f9f9f9;
  color: #333;
  outline: none;
}
.search-form input[type="text"]:focus,
.search-form input[list][type="text"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0,123,255,0.2);
}
.search-form button {
  padding: 14px 24px;
  border-radius: 30px;
  border: none;
  background-color: #599cda;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background .3s, transform .2s;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.search-form button:hover {
  background-color: #599cda;
  transform: translateY(-2px);
}

/* Контейнер для кнопок */
.wa-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Простая кнопка */
.wa-buttons a {
  display: inline-block;
  padding: 12px 18px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #111;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease;
}

/* Ховер эффект */
.wa-buttons a:hover {
  background: #f0f0f0;
}




/* Кнопка ↑ */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background-color: #599cda;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: none;
  transition: opacity .3s ease, background-color .2s ease;
}
#scrollTopBtn:hover { background-color: #599cda; }



  .bn-link{
    position: relative; overflow: hidden;
    flex:0 0 auto; min-width:84px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:6px; padding:12px 10px; border-radius:14px;
    text-decoration:none; color:#e9edef; font-weight:700; font-size:14px;
    -webkit-tap-highlight-color:transparent;
  }
  .bn-link span{ font-size:11px; color:#aebac1 }
  .bn-link.active { background: #1a242b; }
  .bn-link:active{ transform: scale(.97); background:#1a242b }

/* по умолчанию (ПК) панель скрыта */
.bottom-nav{ display:none; }

/* мобила/планшет ≤780px — показываем и фиксируем внизу */
@media (max-width:780px){
  .bottom-nav{
    position:fixed; left:0; right:0; bottom:0;
    display:flex; gap:8px;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom));
    background:#202c33; border-top:1px solid #2a3942;
    overflow-x:auto; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    z-index:1000;
    box-sizing:border-box; max-width:100vw;
  }
  .bn-link{
    flex:0 0 auto; min-width:84px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:6px;
    padding:12px 10px; border-radius:14px; text-decoration:none;
    color:#e9edef; font-weight:700; font-size:14px;
    -webkit-tap-highlight-color:transparent;
  }
  .bn-link span{ font-size:11px; color:#aebac1; }
  .bn-link.active{ background:#1a242b; }
  .bn-link:active{ transform:scale(.97); background:#1a242b; }

  /* отступ контента под панель (динамическая высота) */
  .bn-spacer{ height: calc(var(--bn-h, 88px) + env(safe-area-inset-bottom)); }
}


    /* мобильные стили (≤780px) */
@media (max-width:780px){

  /* фикс-низ панель (если ещё не описана где-то) */
  .bottom-nav{
    position: fixed; left:0; right:0; bottom:0;
    display:flex; gap:8px;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom));
    background:#202c33; border-top:1px solid #2a3942;
    overflow-x:auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    z-index:1000;

    box-sizing:border-box;
    max-width:100vw;
  }

  .bn-link{
    position: relative; overflow: hidden;
    flex:0 0 auto; min-width:84px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:6px; padding:12px 10px; border-radius:14px;
    text-decoration:none; color:#e9edef; font-weight:700; font-size:14px;
    -webkit-tap-highlight-color:transparent;
  }
  .bn-link span{ font-size:11px; color:#aebac1 }
  .bn-link.active{ background:#1a242b }
  .bn-link:active{ transform:scale(.97); background:#1a242b }

  /* динамический отступ под панель
     (если есть скрипт, который устанавливает --bn-h) */
  body, main{ padding-bottom: calc(var(--bn-h, 88px) + env(safe-area-inset-bottom)); }

  /* чтобы кнопка ↑ не наезжала на панель */
  #scrollTopBtn{ bottom: calc(90px + env(safe-area-inset-bottom)); }
}



/* лёгкая анимация появления */
@keyframes trk-pop{
  from{ transform: scale(.98); opacity: 0; }
  to  { transform: scale(1);   opacity: 1; }
}
/* Модалка трекера */
.trk-modal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center}
.trk-modal[hidden]{display:none}
.trk-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(3px)}
.trk-window{position:relative;width:100%;max-width:480px;height:90svh;background:#000;border-radius:14px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.trk-close{position:absolute;top:8px;right:8px;z-index:2;width:36px;height:36px;border:0;border-radius:8px;background:rgba(255,255,255,.12);color:#fff;font-size:20px;cursor:pointer;line-height:1}
.trk-frame{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Полноэкран на мобиле */
.trk-modal.fullscreen{padding:0;background:#000}
.trk-modal.fullscreen .trk-backdrop{background:#000}
.trk-modal.fullscreen .trk-window{max-width:none;width:100%;height:100svh;height:100dvh;border-radius:0;box-shadow:none}

/* чуть компактнее на узких экранах */
@media (max-width:480px){
  .trk-window{width:96%;height:86svh}
}

