/* Путеводитель по Леониде — Стили PWA (GTA 6 Interactive Map & Guide) */

:root {
  --bg-app: #0f172a;
  --bg-panel: #111827;
  --bg-elevated: #1e293b;
  --bg-hover: #263449;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-pink: #ff4f8b;
  --accent-cyan: #00d4ff;
  --accent-gold: #fbbf24;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --ocean-day: #4187a1;
  --ocean-night: #12212e;
  --sidebar-width: 376px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 18px 42px rgba(2, 6, 23, 0.55);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  width: 100dvw;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[inert],
[inert] * {
  opacity: 0.5;
  cursor: default;
  user-select: none;
}

/* ===== Каркас приложения ===== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  width: 100dvw;
  height: 100dvh;
  position: relative;
}

/* ===== Сайдбар (десктоп) и свайп-шторка (мобильный) ===== */
.Drawer {
  --drawer-width: min(24rem, 86dvw, 100dvw - 28px);
  --drawer-backdrop: 0;
  position: relative;
  height: 100dvh;
  z-index: 20;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}

.Drawer-scroller {
  height: 100%;
}

.Drawer-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-panel);
  color: var(--text-primary);
  container-type: inline-size;
  container-name: sidebar;
}

.drawer-close-btn {
  display: none;
}

.menu-trigger {
  display: none;
}

/* Мобильный режим: нативная свайп-шторка через popover="manual" + scroll-snap */
@media (max-width: 959px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .menu-trigger {
    display: inline-flex;
  }

  .drawer-close-btn {
    display: inline-flex;
  }

  .Drawer {
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .Drawer::backdrop {
    background: #020617;
    opacity: calc(var(--drawer-backdrop) * 0.65);
  }

  .Drawer-scroller {
    position: relative;
    display: grid;
    grid-template-columns: var(--drawer-width) 100%;
    overflow-x: scroll;
    overscroll-behavior: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    height: 100svh;
  }

  .Drawer-scroller::-webkit-scrollbar {
    display: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    .Drawer-scroller {
      scroll-behavior: smooth;
    }
  }

  .Drawer-scroller::after {
    content: '';
    scroll-snap-align: end;
    scroll-initial-target: nearest;
  }

  .Drawer-sheet {
    height: 100svh;
    scroll-snap-align: start;
    border-right: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
  }

  @supports (animation-timeline: scroll()) {
    .Drawer {
      timeline-scope: --drawer-fade;
      animation: fade-drawer-backdrop linear both;
      animation-timeline: --drawer-fade;
    }

    .Drawer-scroller {
      scroll-timeline: --drawer-fade x;
    }

    @keyframes fade-drawer-backdrop {
      0% { --drawer-backdrop: 1; }
      100% { --drawer-backdrop: 0; }
    }
  }
}

@supports (animation-timeline: scroll()) {
  @property --drawer-backdrop {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
  }
}

/* ===== Шапка сайдбара ===== */
.sidebar-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(160deg, rgba(255, 79, 139, 0.14), rgba(0, 212, 255, 0.08) 55%, transparent);
  flex-shrink: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #ff4f8b, #f59e0b 55%, #00d4ff);
  box-shadow: 0 4px 14px rgba(255, 79, 139, 0.35);
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-title {
  margin: 0;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--accent-pink);
  font-weight: 600;
}

/* Прогресс-бар */
.progress-strip {
  margin-top: 10px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.progress-meta strong {
  color: var(--text-primary);
}

.pct-pill {
  background: rgba(255, 79, 139, 0.16);
  color: #ff80ab;
  border: 1px solid rgba(255, 79, 139, 0.3);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 700;
  font-size: 11px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: var(--progress-pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-cyan));
  transition: width 0.25s ease;
}

/* Вкладки (Фильтры / Комментарии) */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
  background: rgba(2, 6, 23, 0.45);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.mode-tabs--two {
  grid-template-columns: repeat(2, 1fr);
}

.mode-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 6px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.mode-tab.is-active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* ===== Контент вкладок ===== */
.tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.tab-panel[hidden] {
  display: none;
}

/* Поиск */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 9px 32px 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 1px;
  border-color: transparent;
}

.search-clear {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.search-results {
  margin-top: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
}

.search-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover {
  background: var(--bg-hover);
}

.search-item-meta {
  min-width: 0;
  flex: 1;
}

.search-item-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-cat {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Пресеты */
.presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.preset-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.12);
}

/* Массовые кнопки */
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 8px;
}

.filter-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-toggles .toggle-chip {
  margin-left: 0;
}

.btn-chip {
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-chip:hover {
  background: var(--bg-hover);
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: auto;
  user-select: none;
}

.toggle-chip input {
  accent-color: var(--accent-pink);
  width: 15px;
  height: 15px;
}

/* Дерево категорий */
.section-block {
  margin-bottom: 14px;
}

.section-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 800;
  margin: 0 0 6px;
}

.group-details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 6px;
  overflow: hidden;
}

.group-details > summary {
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  user-select: none;
}

.group-details > summary::-webkit-details-marker {
  display: none;
}

.group-details > summary::before {
  content: '▸';
  color: var(--text-muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.group-details[open] > summary::before {
  transform: rotate(90deg);
}

.group-summary-title {
  flex: 1;
}

.group-summary-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.group-children {
  padding: 4px 6px 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  border-top: 1px solid var(--border-subtle);
}

@container sidebar (min-width: 340px) {
  .group-children {
    grid-template-columns: 1fr 1fr;
  }
}

.cat-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.cat-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.cat-toggle.is-on {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
  color: var(--text-primary);
}

.cat-toggle-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-toggle-count {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cat-toggle.is-on .cat-toggle-count {
  color: var(--accent-cyan);
}

/* Спрайт-иконка из atlas.png (размер атласа 1344x1296, каждый тайл 60x60) */
.sprite-icon {
  width: var(--icon-size, 22px);
  height: var(--icon-size, 22px);
  flex-shrink: 0;
  background-image: url('../assets/atlas.png');
  background-repeat: no-repeat;
  background-size: calc(1344 * var(--icon-size, 22px) / 60) calc(1296 * var(--icon-size, 22px) / 60);
  background-position:
    calc(-1 * var(--sx, 0) * var(--icon-size, 22px) / 60)
    calc(-1 * var(--sy, 0) * var(--icon-size, 22px) / 60);
}

/* ===== Панель Гайда ===== */
.panel-intro {
  margin-bottom: 14px;
}

.panel-intro h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
}

.panel-intro p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.guide-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 10px;
  overflow: hidden;
}

.guide-card > summary {
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guide-card > summary::-webkit-details-marker {
  display: none;
}

.guide-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 79, 139, 0.16);
  color: #ff85b0;
}

.guide-card-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}

.guide-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.guide-card-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border-subtle);
}

.guide-card-body h3 {
  font-size: 12.5px;
  color: var(--accent-cyan);
  margin: 12px 0 6px;
}

.guide-card-body ul {
  margin: 0;
  padding-left: 16px;
  color: #cbd5e1;
  font-size: 12.5px;
}

.guide-card-body li {
  margin-bottom: 6px;
}

.guide-map-btn {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.12);
  color: #7ee8ff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.guide-map-btn:hover {
  background: rgba(0, 212, 255, 0.22);
  color: #fff;
}

/* ===== Панель 100% Чеклиста ===== */
.checklist-summary {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 79, 139, 0.16), rgba(0, 212, 255, 0.12));
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  gap: 12px;
}

.checklist-big-pct {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

.checklist-sub {
  font-size: 12px;
  font-weight: 600;
}

.checklist-hint {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

.check-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 800;
  margin: 14px 0 6px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 5px;
}

.check-row.is-done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.09);
}

.check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-green);
  cursor: pointer;
  flex-shrink: 0;
}

.check-row-text {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.check-row-title {
  font-size: 12.5px;
  font-weight: 600;
}

.check-row.is-done .check-row-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.check-row-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.check-row-weight {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.check-jump-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.check-jump-btn:hover {
  color: #fff;
  border-color: var(--accent-cyan);
}

/* Футер сайдбара */
.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  background: rgba(2, 6, 23, 0.4);
  flex-shrink: 0;
}

.footer-btn {
  flex: 1;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.footer-btn:hover {
  background: var(--bg-hover);
}

.footer-btn--accent {
  background: linear-gradient(135deg, var(--accent-pink), #d946ef);
  border-color: transparent;
}







/* ===== Карта Леониды ===== */
.map-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--ocean-day);
}

.map-stage.is-night {
  background: var(--ocean-night);
}

.leonida-map {
  width: 100%;
  height: 100%;
  background: inherit;
}

/* Плавающие контролы поверх карты */
.map-topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.map-topbar > * {
  pointer-events: auto;
}

.map-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.4);
}

.floating-btn:hover {
  background: rgba(30, 41, 59, 0.96);
}

.layer-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.4);
}

.layer-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
}

.layer-btn.is-active {
  background: var(--accent-pink);
  color: #fff;
}

/* Тултип при наведении на маркер */
.map-tooltip {
  position: absolute;
  z-index: 600;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 18px));
}

.map-tooltip-cat {
  font-size: 10.5px;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Карточка выбранного маркера */
.marker-card {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 650;
  width: min(440px, calc(100% - 24px));
  max-height: min(76dvh, 560px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
}

.marker-card-hint {
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 212, 255, 0.08);
  border-left: 3px solid var(--accent-cyan);
  font-size: 12.5px;
  color: #e2e8f0;
}

.custom-pin-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-pink);
  border: 2px solid #0f172a;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

/* Блок комментариев в карточке маркера */
.card-comments {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.card-comments-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.card-comments-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.comment-item {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 12.5px;
}

.comment-item-text {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.comment-del-btn {
  border: 0;
  background: transparent;
  color: #fca5a5;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 0 4px;
}

.comment-del-btn:hover {
  text-decoration: underline;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-form input[type="text"],
.comment-form textarea,
.modal-form input[type="text"],
.modal-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  resize: vertical;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus,
.modal-form input[type="text"]:focus,
.modal-form textarea:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 1px;
  border-color: transparent;
}

.btn-comment-submit {
  align-self: flex-end;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-cyan);
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  cursor: pointer;
}

.btn-comment-submit:hover {
  filter: brightness(1.08);
}

/* Лента комментариев в сайдбаре */
.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-empty {
  padding: 18px 12px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12.5px;
}

.feed-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
}

.feed-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-card-title {
  font-weight: 700;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-card-cat {
  font-size: 11px;
  color: var(--accent-cyan);
}

.feed-card-body {
  font-size: 12.5px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-card-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Баннер режима добавления своей метки */
.add-pin-banner {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 79, 139, 0.95);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100% - 24px);
}

#btn-add-pin.is-active {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #fff;
}

/* Поля в модалках + шаги PWA */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.pwa-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.pwa-step {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: #e2e8f0;
}

.pwa-step strong {
  color: var(--accent-cyan);
}

.marker-card-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.marker-card-icon {
  --icon-size: 38px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 2px;
}

.marker-card-titles {
  flex: 1;
  min-width: 0;
}

.marker-card-cat {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
}

.marker-card-name {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.marker-card-en {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.marker-card-meta {
  margin: 10px 0 12px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

.marker-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Нижняя панель поверх карты: кнопка поддержки + счётчик точек */
.map-bottombar {
  position: absolute;
  bottom: 22px;
  right: 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 76px);
}



.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.online-pill strong {
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: online-pulse 2s infinite;
}

@keyframes online-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.map-status-pill {
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.map-status-pill strong {
  color: var(--text-primary);
}

/* ===== Кнопки и Модалка ===== */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  flex: 1;
  background: var(--accent-pink);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary.is-found {
  background: var(--accent-green);
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
}

.modal-dialog {
  width: min(440px, calc(100dvw - 28px));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  color: var(--text-primary);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}

.modal-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.modal-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-credit {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Стилизация контролов зума Leaflet */
.leaflet-control-zoom {
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.4) !important;
}

.leaflet-control-zoom a {
  background: rgba(15, 23, 42, 0.9) !important;
  color: #f8fafc !important;
  border-color: var(--border-subtle) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(30, 41, 59, 0.98) !important;
}

.leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.7) !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: #7ee8ff !important;
}

@media (min-width: 960px) {
  .menu-trigger,
  .drawer-close-btn {
    display: none;
  }
}

.support-link { display: grid; place-items: center; text-align: center; text-decoration: none; }
.support-qr { display: block; width: min(100%, 260px); height: auto; margin: 16px auto; image-rendering: pixelated; }
