.plot-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.plot-input-row input {
  flex: 1;
  min-width: 0;
}
.show-map-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6A1113;
  background: #fff;
  border: 2px solid #6A1113;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.show-map-btn:hover,
.show-map-btn:focus {
  background: #f7f1e8;
  outline: 2px solid #6A1113;
  outline-offset: 1px;
}

body.nch-map-modal-open { overflow: hidden; }

.nch-map-modal[hidden] { display: none !important; }
.nch-map-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(20, 12, 12, 0.55);
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.nch-map-sheet {
  background: #f7f1e8;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.nch-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  padding-left: max(0.9rem, env(safe-area-inset-left));
  padding-right: max(0.9rem, env(safe-area-inset-right));
  border-bottom: 1px solid #e0d4c8;
  background: #6A1113;
  color: #f7f1e8;
}
.nch-map-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.nch-map-close {
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-weight: 700;
  color: #6A1113;
  background: #f7f1e8;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.nch-map-close:focus,
.nch-map-close:hover {
  outline: 2px solid #f7f1e8;
  outline-offset: 2px;
}
.nch-map-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
}
.nch-map-canvas .nch-picker-map {
  width: 100%;
  height: 100%;
  background: #c5c1b6;
}
.nch-map-pickbar {
  padding: 0.75rem 0.9rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid #e0d4c8;
  background: #fffdf8;
  min-height: 5.5rem;
}
.nch-map-pickbar .pick-status {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1c1614;
}
.nch-map-pickbar .pick-status .warn {
  color: #6d1f1f;
}
.nch-map-use {
  display: none;
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: #f6f1e8;
  background: #6A1113;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  cursor: pointer;
}
.nch-map-use.show { display: block; }
.nch-map-use:focus,
.nch-map-use:hover {
  background: #8F1619;
  outline: 2px solid #6A1113;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .nch-map-modal { align-items: flex-end; }
  .nch-map-sheet {
    height: min(92dvh, 92vh);
    max-height: min(92dvh, 92vh);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
  }
  .nch-basemap-toggle {
    top: 8px;
    left: 52px;
  }
}
