.mission-editor {
  --editor-panel-height: clamp(340px, calc(100vh - 360px), 640px);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Dashboard cards fill their parent. Editor cards must size to their contents. */
.mission-editor .card {
  height: auto;
  min-width: 0;
}

.mission-editor .card:hover {
  transform: none;
}

.mission-editor details.card {
  display: block;
}

.mission-editor fieldset {
  min-inline-size: 0;
  min-width: 0;
}

.mission-editor input,
.mission-editor select {
  min-width: 0;
  max-width: 100%;
}

.mission-editor__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 1rem;
  align-items: start;
  min-width: 0;
}

.mission-editor .mission-editor__map-panel {
  height: var(--editor-panel-height);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mission-editor__map {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}

.mission-editor__items {
  height: var(--editor-panel-height);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 2px 6px 6px 2px;
}

.mission-editor__items label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mission-editor__review {
  position: sticky;
  bottom: 0;
  z-index: 1100;
  background: var(--bg-card, #1f2937);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 18%);
}

.mission-editor__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.mission-editor-map,
.mission-editor-map__canvas {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.mission-editor-map__fit {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  border-radius: 4px;
  padding: 7px 10px;
  color: #111827;
  background: #fff;
  box-shadow: 0 1px 5px rgb(0 0 0 / 35%);
  font-size: 12px;
  font-weight: 600;
}

.mission-editor-map__landmark {
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px #000;
  cursor: pointer;
}

.mission-editor-map__dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.mission-editor-map__landmark.is-selected {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.mission-editor__point-picker {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 1000;
  width: min(340px, calc(100% - 20px));
  max-height: calc(100% - 55px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #64748b;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 45%);
}

.mission-editor__point-picker > * + * {
  margin-top: 8px;
}

.mission-editor__point-item {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid #64748b;
  border-radius: 4px;
  background: #1f2937;
  text-align: left;
  overflow-wrap: anywhere;
}

@media (max-width: 899px) {
  .mission-editor__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-editor .mission-editor__map-panel {
    height: clamp(300px, 45vh, 440px);
  }

  .mission-editor__items {
    height: auto;
    max-height: 60vh;
  }
}
