* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#map {
  height: 100%;
  width: 100%;
  z-index: 1;
}

/* Шапка */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.app-header h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.btn-auth-trigger {
  background: #ffcc00;
  color: #111;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.user-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px 4px 5px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  max-width: min(320px, calc(100vw - 140px));
  white-space: nowrap;
  overflow: hidden;
}

.user-badge > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.user-badge > span:not(:first-of-type) {
  flex-shrink: 0;
}

.user-badge-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffcc00;
  flex-shrink: 0;
}

.user-rank-mini {
  background: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.4);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
}

.user-crew-tag {
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 10px;
  color: #111;
}

/* Бейдж PREMIUM */
.premium-badge-pill {
  background: linear-gradient(135deg, #ffd60a, #f59e0b);
  color: #111;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(255, 214, 10, 0.45);
  display: inline-block;
  vertical-align: middle;
}

/* Левая колонка HUD-виджетов */
.hud-left-stack {
  position: fixed;
  top: 64px;
  left: 12px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 265px;
  max-width: calc(100vw - 24px);
}

.hud-widget {
  width: 100%;
}

.hud-toggle-btn {
  width: 100%;
  background: rgba(18, 18, 22, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hud-arrow {
  transition: transform 0.2s ease;
  font-size: 13px;
}
.hud-arrow.open {
  transform: rotate(180deg);
}

.hud-body {
  margin-top: 5px;
  background: rgba(18, 18, 22, 0.94);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* Фильтры и поиск */
.hud-input,
.hud-select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  margin-bottom: 7px;
}.hud-input,
.hud-select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  margin-bottom: 7px;
}

.hud-input::placeholder {
  color: #999;
}

.hud-select option {
  background: #1b1b20;
  color: #fff;
}

.hud-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #ddd;
  margin-top: 4px;
  cursor: pointer;
}

/* Лидерборд */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.lb-rank {
  font-weight: 800;
  color: #ffcc00;
  min-width: 18px;
}

.lb-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  flex-shrink: 0;
}

.lb-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-bonus-tag {
  background: #ffd60a;
  color: #111;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
}

.lb-sub {
  font-size: 10px;
  color: #aaa;
}

.lb-area {
  font-weight: 700;
  font-size: 11px;
  color: #2ecc71;
  white-space: nowrap;
}

/* Лента свежей активности */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.feed-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.feed-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.feed-meta {
  color: #aaa;
  font-size: 10px;
}

.hud-empty {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  padding: 6px 0;
}

/* Карточка ранга в профиле */
.rank-card {
  background: linear-gradient(135deg, #1e1e26, #2b2b36);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 204, 0, 0.35);
}

.rank-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.rank-badge {
  background: #ffcc00;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 8px;
}

.rank-stats {
  font-size: 11px;
  color: #ddd;
  font-weight: 600;
}

.rank-next-hint {
  font-size: 11px;
  color: #aaa;
}

/* Выбор аватара и цвета в профиле */
.avatar-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-avatar-preview {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #111;
  background: #eee;
}

.avatar-upload-label {
  flex: 1;
  margin-bottom: 0 !important;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.color-picker-row input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

.color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s;
}
.swatch-btn:hover {
  transform: scale(1.15);
}

/* Переключатель типа работы (Стикер / Тег / Граффити) */
.spot-type-group {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.spot-type-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.type-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f4f4f6;
  border: 1.5px solid #dcdce0;
  border-radius: 10px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 0 !important;
  text-align: center;
}

.type-pill input[type="radio"] {
  width: auto;
  margin: 0;
}

/* Блок горячей точки для админа */
.hotspot-admin-box {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.hotspot-admin-box .hud-checkbox-label {
  color: #92400e;
  font-weight: 700;
  margin-top: 0;
}

/* Нижние кнопки */
.bottom-actions {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.btn-primary {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-primary:disabled {
  background: #666;
}

.btn-gps {
  background: #ffffff;
  color: #111;
  border: 2px solid #111;
  border-radius: 28px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.btn-secondary {
  background: #e5e5ea;
  color: #111;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger-outline {
  background: transparent;
  color: #e74c3c;
  border: 1.5px solid #e74c3c;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.w-100 { width: 100%; }
.mt-8 { margin-top: 8px; }

/* Кастомные пины + подпись автора */
.custom-pin-container {
  background: transparent !important;
  border: none !important;
}

.pin-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  width: max-content;
}

.custom-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transform: none;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-pin.pin-graffiti {
  width: 38px;
  height: 38px;
  border-width: 3px;
}

.custom-pin.pin-hotspot {
  width: 42px;
  height: 42px;
  border: 3px solid #ffd60a;
  box-shadow: 0 0 14px rgba(255, 214, 10, 0.95);
}

.custom-pin.pin-premium {
  border: 3px solid #ffd60a !important;
  box-shadow: 0 0 10px rgba(255, 214, 10, 0.85), 0 2px 6px rgba(0, 0, 0, 0.45);
}

.custom-pin.pin-pending {
  opacity: 0.55;
  border-style: dashed;
}

.pin-author-label {
  margin-top: 5px;
  background: rgba(15, 15, 20, 0.86);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Попап на карте */
.popup-gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.popup-gallery:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.popup-thumb {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
  border: 1px solid #ddd;
}

.popup-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #555;
  margin: 4px 0;
  flex-wrap: wrap;
}

.popup-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
}

.popup-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  margin-bottom: 4px;
  margin-right: 4px;
  text-transform: uppercase;
}
.popup-type-badge.hotspot {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.popup-type-badge.sticker {
  background: #e8f4fd;
  color: #1976d2;
}
.popup-type-badge.tag {
  background: #f0fdf4;
  color: #15803d;
}
.popup-type-badge.graffiti {
  background: #f3e8ff;
  color: #7e22ce;
}

.popup-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-respect-popup {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.btn-respect-popup.liked {
  background: #ffcc00;
  color: #111;
  font-weight: 700;
}

.btn-edit-popup {
  background: #e8f0fe;
  color: #1a73e8;
}

.btn-delete-popup {
  background: #feeeed;
  color: #d93025;
}

.btn-approve-popup {
  background: #2ecc71;
  color: #fff;
}

.btn-report-popup {
  background: #f5f5f5;
  color: #666;
}

/* Модальные окна */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.modal-card {
  background: #fff;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.auth-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 14px;
  line-height: 1.4;
}

.password-input-wrap {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.password-input-wrap input {
  margin-top: 0 !important;
  flex: 1;
}

.btn-toggle-pass {
  background: #f0f0f5;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.modal-card label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.modal-card input[type="text"],
.modal-card input[type="email"],
.modal-card input[type="password"],
.modal-card select,
.modal-card textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
}

.crew-choice-group {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.radio-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 4px !important;
  font-weight: 500 !important;
  cursor: pointer;
}

.radio-label input {
  width: auto !important;
  margin: 0 !important;
}

/* Превью выбранных фото */
.photos-preview-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.preview-thumb-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}

.preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.preview-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Полноэкранный Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 24px;
  cursor: pointer;
}

/* === ФИКС МОБИЛЬНОГО ВИДА И АДАПТАЦИЯ === */
html, body {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

#map {
  height: 100dvh;
}

.app-header {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(54px + env(safe-area-inset-top, 0px));
}

.hud-left-stack {
  top: calc(64px + env(safe-area-inset-top, 0px));
}

.bottom-actions {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100vw - 24px);
}

.leaflet-bottom.leaflet-right {
  margin-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  margin-right: 10px !important;
}

.leaflet-control-attribution {
  display: none !important;
}

.leaflet-popup-content {
  margin: 10px 12px;
  max-width: 72vw !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

@media (max-width: 600px) {
  .app-header {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-header h1 {
    font-size: 16px;
  }

  .user-badge {
    max-width: 185px;
    font-size: 11px;
    padding: 3px 8px 3px 4px;
  }

  .user-rank-mini {
    display: none;
  }

  .hud-left-stack {
    left: 10px;
    width: 195px;
    gap: 6px;
  }

  .hud-toggle-btn {
    padding: 7px 10px;
    font-size: 11px;
    border-radius: 10px;
  }

  .hud-body {
    padding: 8px;
    max-height: 210px;
  }

  .bottom-actions {
    width: calc(100vw - 28px);
    justify-content: center;
    gap: 8px;
  }

  .bottom-actions .btn-gps {
    flex: 0 0 auto;
    padding: 13px 16px;
    font-size: 14px;
  }

  .bottom-actions .btn-primary {
    flex: 1;
    padding: 13px 14px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
  }

  .modal-card {
    padding: 16px;
    max-height: 85dvh;
    border-radius: 14px;
  }

  .spot-type-options {
    grid-template-columns: 1fr;
  }

  .type-pill {
    justify-content: flex-start;
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* === СОЦИАЛЬНАЯ ПАНЕЛЬ В ПОПАПЕ ТОЧКИ === */
.spot-social-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.spot-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 6px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #f8fafc !important;
  color: #1e293b !important;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spot-social-btn:hover {
  background: #e2e8f0 !important;
}

.spot-social-btn.voted-active {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
}

.spot-social-btn.voted-buff {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

.spot-social-btn.voted-disabled {
  opacity: 0.55;
  cursor: default;
}

.spot-social-btn[data-action="share"] {
  grid-column: 1 / -1;
}

/* === ЕДИНАЯ КНОПКА МЕНЮ (ЧИСТЫЙ ЭКРАН) === */
.top-left-toolbar {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 58px;
  z-index: 990;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.top-left-toolbar > * {
  pointer-events: auto;
}

.btn-hud-menu {
  position: relative;
  top: auto;
  left: auto;
  height: 36px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-boosty-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd60a, #f59e0b);
  color: #111111;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.btn-refresh-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@media (max-width: 420px) {
  .top-left-toolbar {
    left: 10px;
    gap: 6px;
  }
  .btn-hud-menu {
    padding: 0 10px;
    font-size: 12px;
  }
  .btn-boosty-toolbar {
    padding: 0 10px;
    font-size: 11.5px;
  }
}

.hud-left-stack {
  top: calc(106px + env(safe-area-inset-top, 0px));
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hud-left-stack.menu-closed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

/* === БАННЕР УСТАНОВКИ PWA === */
.pwa-welcome-toast {
  position: fixed;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 28px);
  max-width: 390px;
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 2500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.pwa-welcome-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pwa-welcome-actions button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* === ЖИВОЙ GPS-МАРКЕР И РАДАР === */
.user-gps-dot {
  width: 18px;
  height: 18px;
  background: #3b82f6;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3);
  animation: gpsPulse 2s infinite;
}

@keyframes gpsPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* === МОДАЛЬНАЯ КАРТОЧКА ПРОФИЛЯ АВТОРА / КРЮ === */
.author-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.author-card-modal {
  width: 100%;
  max-width: 400px;
  max-height: 85dvh;
  background: #14171f;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.author-card-banner {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.22), rgba(59, 130, 246, 0.18));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.author-card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.author-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #111;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.author-title-wrap h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.author-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.author-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.author-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.author-stat-box {
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 4px;
  border-radius: 12px;
}

.author-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffcc00;
}

.author-stat-lbl {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.author-spots-list {
  padding: 12px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.author-spot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s;
}

.author-spot-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.author-spot-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
}

.author-spot-info {
  flex: 1;
  min-width: 0;
}

.author-spot-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-spot-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.author-card-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.author-share-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: #ffcc00;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* === КНОПКИ ПАТРУЛЯ (МОДЕРАЦИИ) === */
.btn-patrol-hud {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 0, 0.45);
  background: rgba(24, 24, 30, 0.92);
  color: #ffcc00;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-patrol-hud:hover {
  background: rgba(38, 38, 48, 0.96);
}

.btn-premium-patrol {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.22), rgba(245, 158, 11, 0.22));
  border: 1px solid #ffd60a;
  color: #ffd60a;
  box-shadow: 0 4px 14px rgba(255, 214, 10, 0.25);
}

.btn-premium-patrol:hover {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.34), rgba(245, 158, 11, 0.34));
}

/* === ФИЛЬТР СЛОЁВ НА КАРТЕ (ТРИ ТОЧКИ СПРАВА) === */
.map-filter-widget {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 960;
}

.btn-map-filter {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  cursor: pointer;
  padding: 0;
}

.btn-map-filter span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

.btn-map-filter.active {
  border-color: #ffcc00;
}

.btn-map-filter.active span {
  background: #ffcc00;
}

.map-filter-popover {
  position: absolute;
  top: 44px;
  right: 0;
  width: 195px;
  background: rgba(18, 18, 22, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.map-filter-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.map-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  padding: 5px 0;
  cursor: pointer;
}

.map-filter-option input[type="checkbox"],
.map-filter-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #ffcc00;
  cursor: pointer;
}

/* === КЛАСТЕРЫ МЕТОК === */
.sm-cluster {
  background: transparent;
}
.sm-cluster-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.92);
  border: 2.5px solid #ffcc00;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.sm-cluster-medium .sm-cluster-inner {
  border-color: #f97316;
  font-size: 14px;
}
.sm-cluster-large .sm-cluster-inner {
  border-color: #ef4444;
  font-size: 15px;
}

/* === ВЫПАДАЮЩИЙ СПИСОК ПОИСКА (НИКИ, СПОТЫ, МЕСТА) === */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(18, 18, 24, 0.98);
  border: 1px solid rgba(255, 204, 0, 0.4);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

.search-sug-group {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 6px 10px 3px;
  letter-spacing: 0.04em;
}

.search-sug-item {
  padding: 7px 10px;
  font-size: 12px;
  color: #f8fafc;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-sug-item:hover {
  background: rgba(255, 204, 0, 0.18);
}

.search-sug-sub {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === РЕЖИМ МАССОВОГО ВЫДЕЛЕНИЯ И УДАЛЕНИЯ ДЛЯ СТАФФА === */
.custom-pin.pin-bulk-selected {
  border: 3.5px solid #ef4444 !important;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.55), 0 0 16px #ef4444 !important;
  transform: scale(1.18);
}

.bulk-delete-bar {
  position: fixed;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 28px);
  max-width: 410px;
  background: rgba(18, 18, 24, 0.96);
  backdrop-filter: blur(10px);
  border: 1.5px solid #ef4444;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  z-index: 2200;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}
