/* ==========================================================================
   Карта доступной среды Бийска — Бийская ГО ВОИ
   Изолированные стили модуля маршрутоориентирования (.amap-*)
   Совместимость со светлой темой и режимами для слабовидящих
   ========================================================================== */

:root {
  --amap-impassable: #dc2626;
  --amap-impassable-bg: #fef2f2;
  --amap-hard: #ea580c;
  --amap-hard-bg: #fff7ed;
  --amap-tolerable: #b45309;
  --amap-tolerable-pin: #eab308;
  --amap-tolerable-bg: #fefce8;
  --amap-fixed: #16a34a;
  --amap-fixed-bg: #f0fdf4;
  --amap-primary: #2563eb;
  --amap-primary-dark: #1d4ed8;
  --amap-waypoint: #7c3aed;
  --amap-border: #e2e8f0;
  --amap-surface: #ffffff;
  --amap-surface-muted: #f8fafc;
  --amap-ink: #0f172a;
  --amap-ink-muted: #475569;
}

.amap-shell {
  position: relative;
  background: var(--amap-surface);
  border: 1px solid var(--amap-border);
  border-radius: 1.5rem;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

/* Mobile Quick Bar (< 768px) */
.amap-mobile-bar {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--amap-surface-muted);
  border-bottom: 1px solid var(--amap-border);
}

.amap-mobile-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  border: 1px solid var(--amap-border);
  background: var(--amap-surface);
  color: var(--amap-ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amap-mobile-btn svg {
  flex-shrink: 0;
}

.amap-mobile-btn[aria-expanded="true"],
.amap-mobile-btn.is-active {
  background: var(--amap-primary);
  border-color: var(--amap-primary);
  color: #ffffff;
}

.amap-mobile-btn--report {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.amap-mobile-btn--report.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

/* Main Desktop Split Workspace */
.amap-workspace {
  display: grid;
  grid-template-columns: 390px 1fr;
  min-height: 660px;
}

/* Left Sidebar Panel */
.amap-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--amap-surface);
  border-right: 1px solid var(--amap-border);
  max-height: 700px;
}

.amap-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  padding: 0.75rem;
  background: var(--amap-surface-muted);
  border-bottom: 1px solid var(--amap-border);
}

.amap-tab {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--amap-ink-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.amap-tab:hover {
  color: var(--amap-ink);
  background: rgba(255, 255, 255, 0.7);
}

.amap-tab[aria-selected="true"] {
  background: var(--amap-surface);
  color: var(--amap-primary);
  border-color: var(--amap-border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.amap-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.35rem;
  border-radius: 0.375rem;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amap-tab[aria-selected="true"] .amap-tab-count {
  background: #dbeafe;
  color: #1d4ed8;
}

.amap-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.amap-panel-body[hidden] {
  display: none !important;
}

/* Form Fields & Autocomplete */
.amap-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
}

.amap-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.amap-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--amap-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.amap-point-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.amap-point-dot--a {
  background: #1d4ed8;
}

.amap-point-dot--b {
  background: #0f172a;
}

.amap-inline-action {
  min-height: 36px;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.amap-inline-action:hover {
  border-color: var(--amap-primary);
  color: var(--amap-primary);
  background: #eff6ff;
}

.amap-inline-action.is-active {
  background: var(--amap-primary);
  border-color: var(--amap-primary);
  color: #ffffff;
}

.amap-input-row {
  display: flex;
  gap: 0.375rem;
  align-items: stretch;
}

.amap-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--amap-ink);
  font-size: 0.9375rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amap-input:focus {
  outline: none;
  border-color: var(--amap-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.amap-icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: var(--amap-surface-muted);
  color: var(--amap-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.amap-icon-btn:hover {
  border-color: var(--amap-primary);
  color: var(--amap-primary);
  background: #eff6ff;
}

.amap-icon-btn.is-active {
  background: var(--amap-primary);
  border-color: var(--amap-primary);
  color: #ffffff;
}

/* Autocomplete Dropdown */
.amap-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 500;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.875rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  max-height: 230px;
  overflow-y: auto;
}

.amap-suggestions[hidden] {
  display: none !important;
}

.amap-suggestion-item {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  text-align: left;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  color: var(--amap-ink);
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.amap-suggestion-item:last-child {
  border-bottom: none;
}

.amap-suggestion-item:hover,
.amap-suggestion-item:focus {
  background: #eff6ff;
  outline: none;
}

.amap-suggestion-sub {
  font-size: 0.75rem;
  color: var(--amap-ink-muted);
}

/* Biysk Presets Grid */
.amap-presets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.amap-presets-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amap-ink-muted);
}

.amap-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.amap-preset-btn {
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #cbd5e1;
  background: var(--amap-surface-muted);
  color: var(--amap-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.amap-preset-btn:hover {
  border-color: var(--amap-primary);
  background: #eff6ff;
  color: var(--amap-primary-dark);
}

/* Primary & Secondary Buttons */
.amap-btn {
  min-height: 46px;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.amap-btn svg {
  flex-shrink: 0;
}

.amap-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.amap-btn--primary {
  background: var(--amap-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.amap-btn--primary:hover:not(:disabled) {
  background: var(--amap-primary-dark);
}

.amap-btn--demo {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
  text-align: left;
  justify-content: flex-start;
  padding: 0.75rem 0.875rem;
  line-height: 1.3;
}

.amap-btn--demo:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #3b82f6;
}

.amap-btn--waypoint {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.amap-btn--waypoint:hover:not(:disabled),
.amap-btn--waypoint.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.amap-btn--secondary {
  background: var(--amap-surface-muted);
  border-color: #cbd5e1;
  color: var(--amap-ink);
}

.amap-btn--secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.amap-btn--report {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.amap-btn--report:hover:not(:disabled) {
  background: #b91c1c;
}

.amap-btn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

/* Status / Notice Box */
.amap-notice {
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.84rem;
  line-height: 1.4;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.amap-notice[hidden] {
  display: none !important;
}

.amap-notice--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.amap-notice--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* Route Summary & Found Barriers List */
.amap-route-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 1rem;
  background: var(--amap-surface-muted);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.amap-route-card[hidden] {
  display: none !important;
}

.amap-route-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.amap-metric {
  background: #ffffff;
  border: 1px solid var(--amap-border);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.amap-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amap-ink-muted);
}

.amap-metric-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--amap-ink);
  font-variant-numeric: tabular-nums;
}

.amap-route-verdict {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.amap-route-verdict--safe {
  background: var(--amap-fixed-bg);
  border: 1px solid #86efac;
  color: #166534;
}

.amap-route-verdict--warn {
  background: var(--amap-hard-bg);
  border: 1px solid #fdba74;
  color: #9a3412;
}

.amap-route-verdict--danger {
  background: var(--amap-impassable-bg);
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.amap-barrier-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.amap-barrier-item {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--amap-border);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amap-barrier-item:hover {
  border-color: var(--amap-primary);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.amap-barrier-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.amap-barrier-item-title {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--amap-ink);
  line-height: 1.3;
}

.amap-barrier-item-meta {
  font-size: 0.77rem;
  color: var(--amap-ink-muted);
  line-height: 1.35;
}

/* Waypoints List */
.amap-waypoints-box {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.amap-waypoints-box[hidden] {
  display: none !important;
}

.amap-waypoint-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.625rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  font-size: 0.8125rem;
  color: #4c1d95;
  font-weight: 600;
}

.amap-waypoint-remove {
  min-width: 34px;
  min-height: 34px;
  border-radius: 0.5rem;
  border: none;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.amap-waypoint-remove:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Filters Tab */
.amap-filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.amap-filter-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--amap-ink);
}

.amap-check-grid {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.amap-check-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--amap-border);
  background: var(--amap-surface-muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--amap-ink);
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.amap-check-row:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.amap-check-row input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--amap-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.amap-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.amap-swatch--impassable { background: var(--amap-impassable); }
.amap-swatch--hard { background: var(--amap-hard); }
.amap-swatch--tolerable { background: var(--amap-tolerable-pin); }
.amap-swatch--fixed { background: var(--amap-fixed); }

/* Sidebar Footer (Report Button) */
.amap-sidebar-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--amap-border);
  background: var(--amap-surface-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Map Stage */
.amap-stage {
  position: relative;
  min-height: 660px;
  background: #e2e8f0;
}

.amap-canvas {
  width: 100%;
  height: 100%;
  min-height: 660px;
  z-index: 1;
}

/* Active Mode Top Banner over Map */
.amap-mode-banner {
  position: absolute;
  top: 0.75rem;
  left: 3.5rem;
  right: 0.75rem;
  z-index: 450;
  background: #0f172a;
  color: #ffffff;
  border-radius: 0.875rem;
  padding: 0.75rem 0.875rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}

.amap-mode-banner[hidden] {
  display: none !important;
}

.amap-mode-text {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.amap-mode-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.amap-mode-btn {
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.amap-mode-btn--primary {
  background: #2563eb;
  border-color: #3b82f6;
}

.amap-mode-btn:hover {
  filter: brightness(1.1);
}

/* Custom Leaflet DivIcon Markers */
.amap-marker-wrapper {
  background: transparent;
  border: none;
}

.amap-marker {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.15s ease;
}

.amap-marker::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid currentColor;
}

.amap-marker:hover {
  transform: scale(1.1);
}

.amap-marker--impassable {
  background: var(--amap-impassable);
  color: var(--amap-impassable);
}

.amap-marker--hard {
  background: var(--amap-hard);
  color: var(--amap-hard);
}

.amap-marker--tolerable {
  background: var(--amap-tolerable-pin);
  color: var(--amap-tolerable-pin);
}

.amap-marker--fixed {
  background: var(--amap-fixed);
  color: var(--amap-fixed);
}

.amap-marker svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
  display: block;
}

.amap-marker--tolerable svg {
  color: #0f172a;
}

.amap-marker-check {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
}

/* Route Endpoint & Waypoint Markers */
.amap-pin-route {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
}

.amap-pin-route--start { background: #1d4ed8; }
.amap-pin-route--end { background: #0f172a; }
.amap-pin-route--waypoint {
  background: #7c3aed;
  cursor: grab;
  width: 30px;
  height: 30px;
  font-size: 0.78rem;
}
.amap-pin-route--report {
  background: #dc2626;
  width: 34px;
  height: 34px;
}

/* Badges (Severity & Status) */
.amap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.amap-badge--impassable {
  background: #dc2626;
  color: #ffffff;
}

.amap-badge--hard {
  background: #ea580c;
  color: #ffffff;
}

.amap-badge--tolerable {
  background: #fef08a;
  color: #713f12;
  border: 1px solid #facc15;
}

.amap-badge--fixed {
  background: #16a34a;
  color: #ffffff;
}

/* Leaflet Popup Styling (Compact & Mobile-Friendly) */
.amap-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 1rem;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.amap-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: 286px !important;
  max-width: calc(100vw - 64px);
}

.amap-popup {
  padding: 0.875rem;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.amap-popup-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-right: 1.25rem;
}

.amap-popup-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
}

.amap-popup-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  margin: 0;
}

.amap-popup-address {
  font-size: 0.78rem;
  color: #475569;
  margin: 0;
}

.amap-popup-photo-wrap {
  border-radius: 0.625rem;
  overflow: hidden;
  background: #f1f5f9;
  max-height: 150px;
}

.amap-popup-photo-wrap img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  display: block;
}

.amap-popup-desc {
  font-size: 0.83rem;
  line-height: 1.45;
  color: #1e293b;
  margin: 0;
}

.amap-popup-bypass {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 0.625rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.81rem;
  line-height: 1.4;
  color: #1e3a8a;
}

.amap-popup-bypass strong {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
  color: #1d4ed8;
}

.amap-popup-status {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.38;
  color: #334155;
}

.amap-popup-status-label {
  font-weight: 800;
  color: #0f172a;
  display: block;
  margin-bottom: 0.15rem;
}

.amap-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.74rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* Compact Legend Strip Below Map */
.amap-legend-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--amap-surface-muted);
  border-top: 1px solid var(--amap-border);
  font-size: 0.8125rem;
  color: var(--amap-ink-muted);
}

.amap-legend-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.amap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--amap-ink);
}

/* Mobile Layout (< 768px) */
@media (max-width: 767px) {
  .amap-mobile-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.625rem;
  }

  .amap-mobile-btn--report {
    grid-column: 1 / -1;
  }

  .amap-workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .amap-sidebar {
    border-right: none;
    border-bottom: 2px solid #bfdbfe;
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.16);
    max-height: none;
    display: none;
  }

  .amap-sidebar.is-mobile-open {
    display: flex;
  }

  .amap-tabs {
    display: none;
  }

  .amap-stage {
    min-height: 430px;
    height: 60vh;
    max-height: 540px;
  }

  .amap-canvas {
    min-height: 430px;
    height: 100%;
  }

  .amap-input {
    font-size: 1.0625rem;
    min-height: 48px;
  }

  .amap-mobile-btn {
    min-height: 48px;
    font-size: 0.9rem;
  }

  .amap-mode-banner {
    left: 0.625rem;
    right: 0.625rem;
    top: auto;
    bottom: 0.75rem;
    padding: 0.85rem 0.95rem;
  }

  .amap-mode-text {
    font-size: 0.96rem;
    line-height: 1.4;
  }

  .amap-mode-btn {
    min-height: 46px;
    font-size: 0.9rem;
  }

  .amap-step-hint {
    font-size: 0.94rem;
    line-height: 1.45;
  }
}

@media (min-width: 520px) and (max-width: 767px) {
  .amap-mobile-bar {
    grid-template-columns: 1fr 1fr 1.45fr;
  }

  .amap-mobile-btn--report {
    grid-column: auto;
  }
}

/* High-Contrast Accessibility Mode Protection (keep map tiles & markers legible!) */
body.high-contrast .amap-shell,
body.high-contrast .amap-sidebar,
body.high-contrast .amap-panel-body,
body.high-contrast .amap-tabs,
body.high-contrast .amap-sidebar-footer,
body.high-contrast .amap-legend-strip,
body.high-contrast .amap-route-card,
body.high-contrast .amap-metric,
body.high-contrast .amap-barrier-item,
body.high-contrast .amap-check-row,
body.high-contrast .amap-input,
body.high-contrast .amap-preset-btn,
body.high-contrast .amap-suggestions,
body.high-contrast .amap-suggestion-item {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast-yellow .amap-shell,
body.high-contrast-yellow .amap-sidebar,
body.high-contrast-yellow .amap-panel-body,
body.high-contrast-yellow .amap-tabs,
body.high-contrast-yellow .amap-sidebar-footer,
body.high-contrast-yellow .amap-legend-strip,
body.high-contrast-yellow .amap-route-card,
body.high-contrast-yellow .amap-metric,
body.high-contrast-yellow .amap-barrier-item,
body.high-contrast-yellow .amap-check-row,
body.high-contrast-yellow .amap-input,
body.high-contrast-yellow .amap-preset-btn,
body.high-contrast-yellow .amap-suggestions,
body.high-contrast-yellow .amap-suggestion-item {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
}

body.high-contrast .amap-canvas,
body.high-contrast .leaflet-container,
body.high-contrast-yellow .amap-canvas,
body.high-contrast-yellow .leaflet-container {
  background: #e2e8f0 !important;
}

body.high-contrast .amap-marker--impassable,
body.high-contrast-yellow .amap-marker--impassable,
body.high-contrast .amap-badge--impassable,
body.high-contrast-yellow .amap-badge--impassable,
body.high-contrast .amap-swatch--impassable,
body.high-contrast-yellow .amap-swatch--impassable {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body.high-contrast .amap-marker--hard,
body.high-contrast-yellow .amap-marker--hard,
body.high-contrast .amap-badge--hard,
body.high-contrast-yellow .amap-badge--hard,
body.high-contrast .amap-swatch--hard,
body.high-contrast-yellow .amap-swatch--hard {
  background: #ea580c !important;
  color: #ffffff !important;
}

body.high-contrast .amap-marker--tolerable,
body.high-contrast-yellow .amap-marker--tolerable,
body.high-contrast .amap-swatch--tolerable,
body.high-contrast-yellow .amap-swatch--tolerable {
  background: #eab308 !important;
  color: #0f172a !important;
}

body.high-contrast .amap-marker--fixed,
body.high-contrast-yellow .amap-marker--fixed,
body.high-contrast .amap-badge--fixed,
body.high-contrast-yellow .amap-badge--fixed,
body.high-contrast .amap-swatch--fixed,
body.high-contrast-yellow .amap-swatch--fixed {
  background: #16a34a !important;
  color: #ffffff !important;
}

body.high-contrast .amap-leaflet-popup .leaflet-popup-content-wrapper,
body.high-contrast-yellow .amap-leaflet-popup .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.high-contrast .amap-popup *,
body.high-contrast-yellow .amap-popup * {
  color: inherit;
}

/* ==========================================================================
   Интеграция с чатом ВКонтакте и QR-кодом
   ========================================================================== */
.amap-btn--vk {
  background: #0077ff;
  border-color: #0077ff;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.22);
}

.amap-btn--vk:hover:not(:disabled) {
  background: #0066db;
  border-color: #0066db;
  color: #ffffff;
}

.amap-btn--vk-soft {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #005fcc;
}

.amap-btn--vk-soft:hover:not(:disabled) {
  background: #0077ff;
  border-color: #0077ff;
  color: #ffffff;
}

.amap-sidebar-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.amap-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.amap-popup-vk-btn {
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #0077ff;
  background: #0077ff;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.amap-popup-vk-btn:hover {
  background: #0066db;
}

.amap-vk-banner {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 1.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 8px 24px -12px rgba(0, 119, 255, 0.18);
}

.amap-vk-banner-info {
  flex: 1 1 300px;
  min-width: 0;
}

.amap-vk-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0077ff;
  margin-bottom: 0.35rem;
}

.amap-vk-banner-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.95rem, 4.1vw, 1.25rem);
  font-weight: 800;
  color: var(--amap-ink);
  margin: 0 0 0.45rem 0;
  line-height: 1.28;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: manual;
}

.amap-vk-banner-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--amap-ink-muted);
  margin: 0 0 1rem 0;
  max-width: 40rem;
}

.amap-vk-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.amap-vk-banner-actions .amap-btn {
  width: auto;
  padding: 0.65rem 1.25rem;
}

.amap-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.amap-qr-frame {
  background: #ffffff !important;
  border: 2px solid #cbd5e1;
  border-radius: 1rem;
  padding: 0.625rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.amap-qr-frame img {
  width: 132px;
  height: 132px;
  display: block;
  object-fit: contain;
}

.amap-qr-caption {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amap-ink-muted);
  text-align: center;
}

.amap-vk-share-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
}

.amap-vk-share-textarea:focus {
  outline: none;
  border-color: #0077ff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.16);
}

body.high-contrast .amap-vk-banner,
body.high-contrast .amap-vk-share-textarea {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast-yellow .amap-vk-banner,
body.high-contrast-yellow .amap-vk-share-textarea {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
}

body.high-contrast .amap-qr-frame,
body.high-contrast-yellow .amap-qr-frame {
  background: #ffffff !important;
  border-color: #000000 !important;
}

@media (max-width: 767px) {
  .amap-vk-banner {
    padding: 1.15rem 1rem;
    justify-content: center;
    text-align: center;
  }

  .amap-vk-banner-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .amap-vk-banner-eyebrow {
    justify-content: center;
    text-align: center;
    line-height: 1.35;
  }

  .amap-vk-banner-title {
    font-size: clamp(0.92rem, 4.15vw, 1.15rem);
    text-align: center;
  }

  .amap-vk-banner-desc {
    margin-inline: auto;
    text-align: center;
  }

  .amap-vk-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .amap-vk-banner-actions .amap-btn {
    width: 100%;
  }

  .amap-qr-card {
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid #dbeafe;
  }
}

/* Переключатель слоёв «Схема / Спутник» */
.amap-layer-switch {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 440;
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  gap: 0.2rem;
}

.amap-layer-btn {
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  border-radius: 0.55rem;
  border: none;
  background: transparent;
  color: #334155;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.amap-layer-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.amap-layer-btn[aria-pressed="true"] {
  background: #0f172a;
  color: #ffffff;
}

/* Чтобы верхний баннер режима не перекрывал переключатель слоёв */
@media (min-width: 768px) {
  .amap-mode-banner {
    top: 4.1rem;
  }
}

/* Кнопка «Посмотреть на Яндекс.Картах (Панорамы)» в popup барьера */
.amap-popup-yandex-btn {
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #eab308;
  background: #fef9c3;
  color: #1e293b !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.amap-popup-yandex-btn:hover {
  background: #fde047;
  border-color: #ca8a04;
}

/* Аккуратная нейтральная подпись источника данных без лишнего визуального шума */
.amap-canvas .leaflet-control-attribution {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.82);
  color: #475569;
  padding: 2px 7px;
  border-top-left-radius: 6px;
}

.amap-canvas .leaflet-control-attribution a {
  color: #334155;
  text-decoration: none;
}

.amap-canvas .leaflet-control-attribution a:hover {
  text-decoration: underline;
}

body.high-contrast .amap-layer-switch {
  background: #111111 !important;
  border-color: #ffffff !important;
}

body.high-contrast .amap-layer-btn {
  color: #ffffff !important;
}

body.high-contrast .amap-layer-btn[aria-pressed="true"] {
  background: #ffd700 !important;
  color: #000000 !important;
}

body.high-contrast-yellow .amap-layer-switch {
  background: #0a0a00 !important;
  border-color: #ffea00 !important;
}

body.high-contrast-yellow .amap-layer-btn {
  color: #ffea00 !important;
}

body.high-contrast-yellow .amap-layer-btn[aria-pressed="true"] {
  background: #ffea00 !important;
  color: #000000 !important;
}

/* ==========================================================================
   Карточка проблемного участка: Боковая панель (ПК) + Нижняя шторка (Мобильные)
   ========================================================================== */
.amap-layer-switch {
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 960px) {
  .amap-stage--sheet-open .amap-layer-switch {
    transform: translateX(-392px);
  }
}

/* Подсветка активного маркера на карте */
.amap-marker--active {
  transform: scale(1.16);
  box-shadow: 0 0 0 4px #ffffff, 0 0 0 7px #2563eb, 0 10px 22px rgba(15, 23, 42, 0.32) !important;
  z-index: 900;
}

/* Затемнение фона (активно на мобильных) */
.amap-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 214;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.amap-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 960px) {
  .amap-sheet-backdrop {
    display: none !important;
  }
}

/* Общая структура карточки (полноэкранный инклюзивный режим на мобильных < 960px) */
.amap-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 235;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #0f172a;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition:
    transform 190ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 170ms ease,
    visibility 190ms;
}

.amap-sheet.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.amap-sheet.is-dragging {
  transition: none !important;
}

/* Десктоп: выдвижная боковая панель справа внутри области карты */
@media (min-width: 960px) {
  .amap-sheet {
    position: absolute;
    inset: auto;
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: auto;
    width: 380px;
    height: auto;
    max-width: calc(100% - 24px);
    max-height: none;
    z-index: 650;
    border-radius: 1.25rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 20px 44px -12px rgba(15, 23, 42, 0.24);
    transform: translateX(24px);
  }

  .amap-sheet.is-open {
    transform: translateX(0);
  }
}

/* Ручка свайпа скрыта в полноэкранном мобильном режиме, чтобы исключить случайное закрытие при чтении */
.amap-sheet-grab-area {
  display: none;
}

/* Закреплённая шапка карточки */
.amap-sheet-header {
  flex-shrink: 0;
  padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 1.125rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

@media (min-width: 960px) {
  .amap-sheet-header {
    padding: 1rem 1.125rem 0.875rem;
    background: #ffffff;
  }
}

.amap-sheet-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

/* Чистые метаданные без «бутерброда из плашек» */
.amap-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
  min-width: 0;
}

.amap-sheet-sev {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 800;
  color: #0f172a;
}

.amap-sheet-sev-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.amap-sheet-sev-dot--impassable { background: #dc2626; }
.amap-sheet-sev-dot--hard { background: #ea580c; }
.amap-sheet-sev-dot--tolerable { background: #ca8a04; }
.amap-sheet-sev-dot--fixed { background: #16a34a; }

.amap-sheet-meta-sep {
  color: #94a3b8;
  user-select: none;
}

.amap-sheet-close {
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.45rem -0.35rem 0;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.amap-sheet-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.amap-sheet-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.amap-sheet-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  margin: 0 0 0.35rem;
  text-wrap: balance;
}

.amap-sheet-address {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #475569;
  margin: 0 0 0.6rem;
}

/* Строка точных координат + кнопка копирования */
.amap-sheet-coords-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 0.625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.amap-sheet-coords-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #475569;
  min-width: 0;
}

.amap-sheet-coords-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amap-sheet-copy-btn {
  min-height: 34px;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-family: 'Manrope', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.amap-sheet-copy-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.amap-sheet-copy-btn.is-copied {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.amap-sheet-copy-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Прокручиваемая средняя лента */
.amap-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.9rem 1.125rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.amap-sheet-photo {
  border-radius: 0.875rem;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.amap-sheet-photo img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.amap-sheet-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #1e293b;
  margin: 0;
}

.amap-sheet-section {
  padding: 0.75rem 0.875rem;
  border-radius: 0.875rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.amap-sheet-section--bypass {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.amap-sheet-section--status {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.amap-sheet-section-title {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.amap-sheet-section--bypass .amap-sheet-section-title {
  color: #1d4ed8;
}

.amap-sheet-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* Закреплённый подвал с кнопками действий */
.amap-sheet-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.125rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 390px) {
  .amap-sheet-footer {
    grid-template-columns: 1fr;
  }
}

.amap-sheet-btn {
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.amap-sheet-btn:active {
  transform: scale(0.98);
}

.amap-sheet-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.amap-sheet-btn--yandex {
  background: #fef08a;
  border: 1px solid #eab308;
  color: #0f172a !important;
}

.amap-sheet-btn--yandex:hover {
  background: #fde047;
  border-color: #ca8a04;
}

.amap-sheet-btn--vk {
  background: #0077ff;
  border: 1px solid #0077ff;
  color: #ffffff !important;
}

.amap-sheet-btn--vk:hover {
  background: #0066db;
  border-color: #0066db;
}

/* Кнопка голосовой озвучки карточки барьера */
.amap-sheet-speech-wrap {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.amap-sheet-speech-btn {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.9rem;
  border-radius: 0.85rem;
  border: 1.5px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.amap-sheet-speech-btn:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.amap-sheet-speech-btn.is-speaking {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.amap-sheet-speech-status {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e40af;
  line-height: 1.35;
}

/* Крупная доступная типографика в мобильном полноэкранном инспекторе (< 960px) */
@media (max-width: 959px) {
  .amap-sheet-meta {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .amap-sheet-sev-dot {
    width: 11px;
    height: 11px;
  }

  .amap-sheet-close {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    margin: -0.2rem -0.25rem -0.2rem 0;
  }

  .amap-sheet-title {
    font-size: 1.4rem;
    line-height: 1.28;
    margin: 0.25rem 0 0.45rem;
  }

  .amap-sheet-address {
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 0 0 0.75rem;
  }

  .amap-sheet-coords-row {
    padding: 0.5rem 0.65rem 0.5rem 0.75rem;
    border-radius: 0.85rem;
    background: #ffffff;
  }

  .amap-sheet-coords-value {
    font-size: 0.95rem;
  }

  .amap-sheet-copy-btn {
    min-height: 44px;
    padding: 0.35rem 0.85rem;
    font-size: 0.92rem;
  }

  .amap-sheet-speech-btn {
    min-height: 52px;
    font-size: 1rem;
  }

  .amap-sheet-speech-status {
    font-size: 0.94rem;
  }

  .amap-sheet-body {
    padding: 1.125rem;
    gap: 1.1rem;
  }

  .amap-sheet-photo img {
    height: 215px;
  }

  .amap-sheet-desc {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .amap-sheet-section {
    padding: 0.95rem 1.05rem;
    border-radius: 1rem;
    font-size: 1.0625rem;
    line-height: 1.55;
  }

  .amap-sheet-section-title {
    font-size: 1rem;
    margin-bottom: 0.35rem;
  }

  .amap-sheet-meta-footer {
    font-size: 0.9375rem;
    padding-top: 0.7rem;
  }

  .amap-sheet-footer {
    padding: 0.85rem 1.125rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    background: #f8fafc;
    gap: 0.6rem;
  }

  .amap-sheet-btn {
    min-height: 52px;
    font-size: 0.98rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.9rem;
  }
}

/* Крупная кнопка «Закрыть» в нижней зоне большого пальца (на мобильных < 960px) */
.amap-sheet-btn--close-bottom {
  grid-column: 1 / -1;
  min-height: 54px;
  background: #0f172a;
  border: 1.5px solid #0f172a;
  color: #ffffff !important;
  font-size: 1.0625rem;
  font-weight: 800;
}

.amap-sheet-btn--close-bottom:hover {
  background: #1e293b;
}

@media (min-width: 960px) {
  .amap-sheet-btn--close-bottom {
    display: none !important;
  }
}

/* Режим сниженного движения */
body.reduce-motion .amap-sheet,
body.reduce-motion .amap-sheet-backdrop,
body.reduce-motion .amap-layer-switch {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .amap-sheet,
  .amap-sheet-backdrop,
  .amap-layer-switch {
    transition: none !important;
  }
}

/* Версия для слабовидящих (чёрно-белая и жёлто-чёрная) */
body.high-contrast .amap-sheet,
body.high-contrast .amap-sheet-header,
body.high-contrast .amap-sheet-footer {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast .amap-sheet-title,
body.high-contrast .amap-sheet-address,
body.high-contrast .amap-sheet-desc,
body.high-contrast .amap-sheet-meta,
body.high-contrast .amap-sheet-sev,
body.high-contrast .amap-sheet-coords-value,
body.high-contrast .amap-sheet-coords-label,
body.high-contrast .amap-sheet-section-title,
body.high-contrast .amap-sheet-meta-footer,
body.high-contrast .amap-sheet-close {
  color: #ffffff !important;
}

body.high-contrast .amap-sheet-coords-row,
body.high-contrast .amap-sheet-section {
  background: #111111 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

body.high-contrast .amap-sheet-copy-btn,
body.high-contrast .amap-sheet-speech-btn,
body.high-contrast .amap-sheet-btn--close-bottom {
  background: #ffd700 !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

body.high-contrast .amap-sheet-speech-btn.is-speaking {
  background: #ffffff !important;
  color: #000000 !important;
}

body.high-contrast .amap-sheet-speech-status {
  color: #ffd700 !important;
}

body.high-contrast-yellow .amap-sheet,
body.high-contrast-yellow .amap-sheet-header,
body.high-contrast-yellow .amap-sheet-footer {
  background: #000000 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
}

body.high-contrast-yellow .amap-sheet-title,
body.high-contrast-yellow .amap-sheet-address,
body.high-contrast-yellow .amap-sheet-desc,
body.high-contrast-yellow .amap-sheet-meta,
body.high-contrast-yellow .amap-sheet-sev,
body.high-contrast-yellow .amap-sheet-coords-value,
body.high-contrast-yellow .amap-sheet-coords-label,
body.high-contrast-yellow .amap-sheet-section-title,
body.high-contrast-yellow .amap-sheet-meta-footer,
body.high-contrast-yellow .amap-sheet-close,
body.high-contrast-yellow .amap-sheet-speech-status {
  color: #ffea00 !important;
}

body.high-contrast-yellow .amap-sheet-coords-row,
body.high-contrast-yellow .amap-sheet-section {
  background: #0a0a00 !important;
  border-color: #ffea00 !important;
  color: #ffea00 !important;
}

body.high-contrast-yellow .amap-sheet-copy-btn,
body.high-contrast-yellow .amap-sheet-speech-btn,
body.high-contrast-yellow .amap-sheet-btn--close-bottom {
  background: #ffea00 !important;
  color: #000000 !important;
  border-color: #ffea00 !important;
}

/* ==========================================================================
   Компактная строка статуса маршрута на мобильных (< 768px)
   ========================================================================== */
.amap-mobile-route-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  background: #ffffff;
  border-top: 1.5px solid #bfdbfe;
  box-shadow: inset 0 2px 0 rgba(37, 99, 235, 0.08);
}

.amap-mobile-route-bar[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .amap-mobile-route-bar {
    display: none !important;
  }
}

.amap-mrb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.625rem;
}

.amap-mrb-summary {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--amap-ink);
  line-height: 1.35;
  min-width: 0;
  flex: 1 1 auto;
  font-variant-numeric: tabular-nums;
}

.amap-mrb-summary-sub {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--amap-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amap-mrb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.55rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  flex-shrink: 0;
}

.amap-mrb-badge[hidden] {
  display: none !important;
}

.amap-mrb-badge--safe {
  background: var(--amap-fixed-bg);
  border: 1px solid #86efac;
  color: #166534;
}

.amap-mrb-badge--warn {
  background: var(--amap-hard-bg);
  border: 1px solid #fdba74;
  color: #9a3412;
}

.amap-mrb-badge--danger {
  background: var(--amap-impassable-bg);
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.amap-mrb-badge--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.amap-mrb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.amap-mrb-btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--amap-border);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amap-mrb-btn[hidden] {
  display: none !important;
}

.amap-mrb-btn--primary {
  background: var(--amap-primary);
  border-color: var(--amap-primary);
  color: #ffffff;
}

.amap-mrb-btn--waypoint {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.amap-mrb-btn--secondary {
  background: var(--amap-surface-muted);
  border-color: #cbd5e1;
  color: var(--amap-ink);
}

.amap-mrb-btn--danger {
  flex: 0 0 auto;
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

body.high-contrast .amap-mobile-route-bar,
body.high-contrast .amap-mrb-btn {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.high-contrast .amap-mrb-summary,
body.high-contrast .amap-mrb-summary-sub {
  color: #ffffff !important;
}

body.high-contrast-yellow .amap-mobile-route-bar,
body.high-contrast-yellow .amap-mrb-btn {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
}

body.high-contrast-yellow .amap-mrb-summary,
body.high-contrast-yellow .amap-mrb-summary-sub {
  color: #ffea00 !important;
}

/* ==========================================================================
   Когнитивная доступность: хлебные крошки, шаги и мягкая подсветка фокуса
   ========================================================================== */
.amap-panel-crumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--amap-border);
}

@media (min-width: 768px) {
  .amap-panel-crumb-bar,
  .amap-mobile-only-btn {
    display: none !important;
  }
}

.amap-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 0;
}

.amap-crumb-link {
  background: none;
  border: none;
  padding: 0.25rem 0.35rem;
  margin: -0.25rem -0.35rem;
  color: var(--amap-primary);
  font: inherit;
  cursor: pointer;
  border-radius: 0.4rem;
}

.amap-crumb-link:hover {
  text-decoration: underline;
  background: #eff6ff;
}

.amap-crumb-sep {
  color: #94a3b8;
  user-select: none;
}

.amap-crumb-current {
  color: var(--amap-ink);
}

.amap-crumb-back {
  min-height: 36px;
  padding: 0.25rem 0.7rem;
  border-radius: 0.625rem;
  border: 1px solid #cbd5e1;
  background: var(--amap-surface-muted);
  color: var(--amap-ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.amap-crumb-back:hover {
  background: #eff6ff;
  border-color: var(--amap-primary);
  color: var(--amap-primary);
}

/* Пошаговый навигатор (1. Откуда -> 2. Куда -> 3. Путь) */
.amap-guide-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.amap-stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.amap-step {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 0.3rem 0.45rem;
  border-radius: 0.625rem;
  border: 1px solid var(--amap-border);
  background: var(--amap-surface-muted);
  color: var(--amap-ink-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amap-step-num {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.amap-step-arrow {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

.amap-step.is-current {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.amap-step.is-current .amap-step-num {
  background: #2563eb;
  color: #ffffff;
}

.amap-step.is-done {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.amap-step.is-done .amap-step-num {
  background: #16a34a;
  color: #ffffff;
}

.amap-step-hint {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.amap-point-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 0.15rem;
}

.amap-point-done[hidden] {
  display: none !important;
}

/* Спокойная, сенсорно-безопасная подсветка ОДНОГО следующего действия */
@keyframes amapGentleFocus {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.16);
  }
}

.amap-field-group.amap-guide-focus {
  padding: 0.65rem;
  margin: -0.2rem -0.25rem;
  border-radius: 0.95rem;
  background: #f8fbff;
  border: 1.5px solid #60a5fa;
  animation: amapGentleFocus 3.2s ease-in-out infinite;
}

.amap-field-group.amap-guide-focus .amap-inline-action,
.amap-field-group.amap-guide-focus .amap-icon-btn {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #1d4ed8;
}

.amap-presets.amap-guide-focus {
  padding: 0.65rem;
  margin: -0.15rem -0.25rem;
  border-radius: 0.95rem;
  background: #f8fbff;
  border: 1.5px solid #93c5fd;
}

.amap-btn--primary.amap-guide-focus {
  animation: amapGentleFocus 3.2s ease-in-out infinite;
}

body.reduce-motion .amap-guide-focus,
body.reduce-motion .amap-btn--primary.amap-guide-focus {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .amap-guide-focus,
  .amap-btn--primary.amap-guide-focus {
    animation: none !important;
  }
}

/* Версия для слабовидящих */
body.high-contrast .amap-step,
body.high-contrast .amap-step-hint,
body.high-contrast .amap-crumb-back,
body.high-contrast .amap-field-group.amap-guide-focus,
body.high-contrast .amap-presets.amap-guide-focus {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  animation: none !important;
}

body.high-contrast .amap-step.is-current {
  background: #ffd700 !important;
  color: #000000 !important;
  border-color: #ffd700 !important;
}

body.high-contrast-yellow .amap-step,
body.high-contrast-yellow .amap-step-hint,
body.high-contrast-yellow .amap-crumb-back,
body.high-contrast-yellow .amap-field-group.amap-guide-focus,
body.high-contrast-yellow .amap-presets.amap-guide-focus {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
  animation: none !important;
}

body.high-contrast-yellow .amap-step.is-current {
  background: #ffea00 !important;
  color: #000000 !important;
  border-color: #ffea00 !important;
}

/* ==========================================================================
   Переключатель режимов маршрута (В объезд барьеров / Пешком / По дороге)
   ========================================================================== */
.amap-profile-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.amap-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.amap-profile-btn {
  width: 100%;
  min-height: 50px;
  padding: 0.55rem 0.8rem;
  border-radius: 0.85rem;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--amap-ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.amap-profile-btn:hover {
  border-color: var(--amap-primary);
  background: #f8fbff;
}

.amap-profile-btn.is-active {
  border-color: #1d4ed8;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.amap-profile-btn[data-route-profile="safe_wheelchair"].is-active {
  border-color: #047857;
  background: #ecfdf5;
  color: #064e3b;
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.18);
}

.amap-profile-btn[data-route-profile="car_road"].is-active {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.amap-profile-btn.is-active::after {
  content: "✓";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amap-profile-btn[data-route-profile="safe_wheelchair"].is-active::after {
  background: #047857;
}

.amap-profile-btn[data-route-profile="car_road"].is-active::after {
  background: #dc2626;
}

.amap-profile-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-right: 1.75rem;
}

.amap-profile-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.amap-profile-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--amap-ink-muted);
  padding-left: 1.45rem;
  padding-right: 1.75rem;
  line-height: 1.25;
}

.amap-profile-btn.is-active .amap-profile-sub {
  color: inherit;
  opacity: 0.85;
}

.amap-route-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  padding: 0.3rem 0.65rem;
  border-radius: 0.6rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.amap-route-mode-tag[hidden] {
  display: none !important;
}

.amap-route-mode-tag--safe {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.amap-route-mode-tag--car {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.amap-route-detour-note {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.amap-route-detour-note[hidden] {
  display: none !important;
}

.amap-route-detour-note--partial {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.amap-route-detour-note--road {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.amap-route-speech-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.amap-route-speech-btn {
  min-height: 46px;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
  border: 1.5px solid #93c5fd;
  background: #ffffff;
  color: #1e40af;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amap-route-speech-btn[hidden] {
  display: none !important;
}

.amap-route-speech-btn:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.amap-route-speech-btn.is-speaking {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

@media (max-width: 767px) {
  .amap-profile-btn {
    min-height: 56px;
    padding: 0.7rem 0.9rem;
  }

  .amap-profile-name {
    font-size: 0.98rem;
  }

  .amap-profile-sub {
    font-size: 0.86rem;
  }

  .amap-route-mode-tag {
    font-size: 0.86rem;
    padding: 0.4rem 0.75rem;
  }

  .amap-route-detour-note,
  .amap-route-verdict {
    font-size: 0.96rem;
    line-height: 1.48;
  }

  .amap-route-speech-btn {
    min-height: 52px;
    font-size: 0.98rem;
  }
}

body.high-contrast .amap-profile-btn,
body.high-contrast .amap-route-mode-tag,
body.high-contrast .amap-route-detour-note,
body.high-contrast .amap-route-speech-btn {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
}

body.high-contrast .amap-profile-btn.is-active,
body.high-contrast .amap-route-speech-btn.is-speaking {
  background: #ffd700 !important;
  color: #000000 !important;
  border-color: #ffd700 !important;
}

body.high-contrast .amap-profile-btn.is-active::after {
  background: #000000 !important;
  color: #ffd700 !important;
}

body.high-contrast-yellow .amap-profile-btn,
body.high-contrast-yellow .amap-route-mode-tag,
body.high-contrast-yellow .amap-route-detour-note,
body.high-contrast-yellow .amap-route-speech-btn {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border-color: #ffea00 !important;
  box-shadow: none !important;
}

body.high-contrast-yellow .amap-profile-btn.is-active,
body.high-contrast-yellow .amap-route-speech-btn.is-speaking {
  background: #ffea00 !important;
  color: #000000 !important;
  border-color: #ffea00 !important;
}

body.high-contrast-yellow .amap-profile-btn.is-active::after {
  background: #000000 !important;
  color: #ffea00 !important;
}

/* ==========================================================================
   Адаптивный заголовок «Маршрутоориентирование» и мобильный островок подскока
   ========================================================================== */
.amap-section-heading {
  font-size: clamp(1.1rem, 4.85vw, 2.25rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: manual;
}

.amap-scroll-hint-pill,
.amap-scroll-island {
  display: none;
}

@media (max-width: 767px) {
  /* В режиме прокрутки сайта 1 палец листает страницу поверх карты без залипания */
  #amap-canvas.amap-canvas--scroll-safe,
  #amap-canvas.amap-canvas--scroll-safe .leaflet-pane,
  #amap-canvas.amap-canvas--scroll-safe .leaflet-tile-pane {
    touch-action: pan-y !important;
  }

  .amap-stage.is-map-interactive {
    box-shadow: inset 0 0 0 3px #2563eb;
  }

  .amap-scroll-hint-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 410;
    max-width: calc(100% - 132px);
    padding: 0.38rem 0.65rem;
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.84);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.24);
    pointer-events: none;
  }

  .amap-scroll-hint-pill.is-unlocked {
    background: #1d4ed8;
  }

  .amap-scroll-island {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #e2e8f0;
  }

  .amap-scroll-lock-btn {
    flex: 1 1 165px;
    min-height: 48px;
    padding: 0.5rem 0.85rem;
    border-radius: 0.8rem;
    border: 1.5px solid #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .amap-scroll-lock-btn.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
  }

  .amap-scroll-jumps {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
  }

  .amap-scroll-jump-btn {
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.8rem;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    white-space: nowrap;
  }

  .amap-scroll-jump-btn--down {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
  }
}

body.high-contrast .amap-scroll-island {
  background: #000000 !important;
  border-color: #ffffff !important;
}

body.high-contrast .amap-scroll-lock-btn,
body.high-contrast .amap-scroll-jump-btn,
body.high-contrast .amap-scroll-hint-pill {
  background: #111111 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

body.high-contrast .amap-scroll-lock-btn.is-active,
body.high-contrast .amap-scroll-jump-btn--down {
  background: #ffd700 !important;
  color: #000000 !important;
  border-color: #ffd700 !important;
}

body.high-contrast-yellow .amap-scroll-island {
  background: #000000 !important;
  border-color: #ffea00 !important;
}

body.high-contrast-yellow .amap-scroll-lock-btn,
body.high-contrast-yellow .amap-scroll-jump-btn,
body.high-contrast-yellow .amap-scroll-hint-pill {
  background: #0a0a00 !important;
  color: #ffea00 !important;
  border: 2px solid #ffea00 !important;
}

body.high-contrast-yellow .amap-scroll-lock-btn.is-active,
body.high-contrast-yellow .amap-scroll-jump-btn--down {
  background: #ffea00 !important;
  color: #000000 !important;
  border-color: #ffea00 !important;
}







