.route-map-button {
  border-color: rgba(36, 232, 121, 0.28);
  color: var(--green);
}

body.route-map-open {
  overflow: hidden;
}

.route-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
  background: rgba(2, 6, 4, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.route-map-panel {
  width: min(1180px, 100%);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.route-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
}

.route-map-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2rem);
  letter-spacing: -0.035em;
}

.route-map-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.route-map-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.route-map-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.route-map-fit {
  flex: 0 0 auto;
  border-color: rgba(36, 232, 121, 0.24);
  color: var(--green);
}

.route-map-canvas-wrap {
  position: relative;
  margin: 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #111814;
}

.route-map-canvas {
  width: 100%;
  height: min(64vh, 680px);
  min-height: 430px;
}

.route-map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(8, 15, 11, 0.9);
  color: var(--muted-strong);
}

.route-map-loading.hidden {
  display: none;
}

.route-map-status,
.route-map-unresolved {
  margin: 12px 22px 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.route-map-status.success {
  color: var(--green);
}

.route-map-status.warning {
  color: var(--amber);
}

.route-map-unresolved {
  padding: 10px 12px;
  border: 1px solid rgba(255, 200, 87, 0.18);
  border-radius: 12px;
  background: rgba(255, 200, 87, 0.055);
  color: var(--muted-strong);
}

.route-map-unresolved.hidden {
  display: none;
}

.route-map-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  margin: 14px 22px 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.route-map-note strong {
  color: var(--green);
  font-size: 0.76rem;
}

.route-map-note span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.route-map-number-icon-shell {
  background: transparent;
  border: 0;
}

.route-map-number-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #dff9e8;
  border-radius: 50%;
  background: #102519;
  color: #f5fbf7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  font: 900 0.74rem/1 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.route-map-popup {
  min-width: 210px;
  color: #172019;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.route-map-popup-kicker {
  display: block;
  margin-bottom: 4px;
  color: #287247;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.route-map-popup strong {
  display: block;
  font-size: 0.94rem;
}

.route-map-popup p {
  margin: 5px 0 10px;
  color: #536158;
  font-size: 0.78rem;
  line-height: 1.35;
}

.route-map-popup-note {
  display: block;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: #68756d;
  font-size: 0.7rem;
  line-height: 1.4;
}

.route-map-move-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.route-map-move-form label {
  display: grid;
  gap: 4px;
  color: #536158;
  font-size: 0.66rem;
  font-weight: 750;
}

.route-map-move-form input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #ccd5cf;
  border-radius: 9px;
  background: #fff;
  color: #172019;
  font-size: 16px;
}

.route-map-move-form button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: #102519;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.route-map-move-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 700px) {
  .route-map-overlay {
    padding: 0;
    place-items: stretch;
  }

  .route-map-panel {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .route-map-header {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 12px;
  }

  .route-map-controls {
    align-items: flex-start;
    padding: 0 14px 12px;
  }

  .route-map-controls span {
    max-width: 62%;
    text-align: right;
  }

  .route-map-canvas-wrap {
    margin: 0 8px;
    border-radius: 15px;
  }

  .route-map-canvas {
    height: 60vh;
    min-height: 360px;
  }

  .route-map-status,
  .route-map-unresolved {
    margin-left: 14px;
    margin-right: 14px;
  }

  .route-map-note {
    grid-template-columns: 1fr;
    margin: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

