.modal:has(.map-editor) { width: min(1000px, calc(100vw - 24px)); }
.map-editor { display: grid; gap: 12px; color: #e3e3dc; }
.map-editor-settings, .map-editor-tools, .map-editor-storage {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px 9px;
}
.map-editor label { display: grid; gap: 3px; color: #d6c9af; font-size: 11px; }
.map-editor label input, .map-editor label select, .map-editor button {
  min-height: 31px;
  padding: 4px 8px;
  border: 1px solid #4d5359;
  border-radius: 2px;
  color: #f1eadb;
  background: #262b32;
  font: inherit;
  font-size: 12px;
}
.map-editor label input { width: 8em; }
.map-editor button:hover:not(:disabled) { border-color: #d0ba86; background: #343a41; }
.map-editor button:disabled { opacity: .55; }
.map-editor .map-editor-use { margin-left: auto; border-color: #958461; background: #4a4438; }
.map-editor-workspace { display: grid; gap: 7px; }
.map-editor-scroll { max-height: 48vh; overflow: auto; border: 1px solid #60646a; background: #15191e; }
.map-editor-canvas { display: block; width: 100%; cursor: crosshair; touch-action: none; image-rendering: pixelated; }
.map-editor-canvas:focus-visible { outline: 2px solid #f2d17f; outline-offset: -2px; }
.map-editor-coordinate, .map-editor-status { margin: 0; font-size: 11px; line-height: 1.5; color: #d1c8b6; }
.map-editor-status:empty { display: none; }
.map-editor-status.map-editor-error { color: #ffad9f; }
@media (max-width: 620px) {
  .map-editor label input, .map-editor label select, .map-editor button { min-height: 38px; }
  .map-editor .map-editor-use { margin-left: 0; }
}
