.map-object-tools {
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid var(--line, #394755);
  border-radius: 9px;
  background: var(--panel, #162331);
  color: var(--text, #e5edf5);
}
.map-object-tools > summary {
  min-height: 44px;
  padding: 12px 0;
  color: var(--text, #e5edf5);
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
}
.map-object-tools p {
  margin: 0 0 9px;
  color: var(--muted, #b7c1cd);
  font-size: .79rem;
}
.map-object-tools .map-object-status:empty { display: none; }
.map-object-tools .map-object-status { color: var(--amber, #eab76b); }
.map-object-fields {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}
.map-object-tools :is([hidden], .map-object-short-action) { display: none; }
.map-object-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted, #b7c1cd);
  font-size: .75rem;
}
.map-object-fields button, .map-object-fields select, .map-object-fields input {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line, #394755);
  border-radius: 7px;
  background: var(--surface, #1b2936);
  color: var(--text, #e5edf5);
  font: inherit;
  font-size: .82rem;
}
.map-object-fields button { cursor: pointer; }
.map-object-fields input[type="color"] { width: 100%; min-width: 44px; padding: 5px; cursor: pointer; }
.map-object-fields button:not(:disabled):hover { border-color: var(--amber, #eab76b); }
.map-object-fields button:disabled { cursor: default; opacity: .6; }
.map-object-fields [data-add] { color: var(--amber, #eab76b); }
.map-object-tools :focus-visible { outline: 2px solid var(--amber, #eab76b); outline-offset: 2px; }

:is(#fullscreen-object-tools, .map-object-compact) {
  --object-panel-width: 13rem;
  --object-control-height: 34px;
  position: absolute;
  top: calc(46px + var(--map-safe-top, 0px));
  left: calc(10px + var(--map-safe-left, 0px));
  max-width: calc(100% - 20px - var(--map-safe-left, 0px) - var(--map-safe-right, 0px));
  z-index: 31;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-tools {
  width: fit-content;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  box-shadow: 0 3px 14px #0002;
  cursor: default;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-tools[open] {
  width: min(var(--object-panel-width), 100vw - 20px - var(--map-safe-left, 0px) - var(--map-safe-right, 0px));
  max-height: min(44dvh, var(--object-panel-max-height, calc(100dvh - 58px - var(--map-safe-top, 0px) - var(--map-safe-bottom, 0px))));
  overflow: hidden auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-tools > summary {
  min-height: var(--object-control-height);
  padding: 8px 0;
  font-size: .8rem;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-tools[open] > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  background: inherit;
}
:is(#fullscreen-object-tools, .map-object-compact) :is(.map-object-description, :is([data-placement], [data-selection]) label > span, [data-show] span:first-child) { display: none; }
:is(#fullscreen-object-tools, .map-object-compact) .map-object-short-action { display: inline; }
:is(#fullscreen-object-tools, .map-object-compact) .map-object-fields {
  gap: 5px;
  margin-bottom: 6px;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-fields label { flex: 1 1 0; }
:is(#fullscreen-object-tools, .map-object-compact) [data-edit]:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
:is(#fullscreen-object-tools, .map-object-compact) [data-edit] label { overflow-wrap: anywhere; }
:is(#fullscreen-object-tools, .map-object-compact) .map-object-fields :is(button, select, input) {
  min-height: var(--object-control-height);
  padding: 4px 6px;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-fields :is(select, input) {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
:is(#fullscreen-object-tools, .map-object-compact) .map-object-status { margin-bottom: 6px; }
.map-object-placing :is(#fullscreen-object-tools, .map-object-compact) .map-object-tools > :not(summary, [data-placement], .map-object-status),
.map-object-placing :is(#fullscreen-object-tools, .map-object-compact) [data-placement] > :not([data-cancel]) {
  display: none;
}
@media (max-width: 600px), (pointer: coarse) {
  :is(#fullscreen-object-tools, .map-object-compact) { --object-panel-width: 12rem; --object-control-height: 44px; }
  :is(#fullscreen-object-tools, .map-object-compact) :is(input, select) { font-size: 16px; }
}

.map-stage.show-original #map-objects, .map-stage.hide-map-objects #map-objects { display: none; }
.map-stage.map-object-editing #vector-plan { z-index: 6; }
.map-stage.map-object-placing:not(.show-original) { cursor: crosshair; }
.map-object-hit { fill: transparent; stroke: transparent; stroke-width: 3; }
.map-object-editing .map-object-hit { pointer-events: all; cursor: grab; }
.map-object-editing .map-object-hit:active { cursor: grabbing; }
.map-object-editing .map-object-selected .map-object-hit { stroke: #b07c25; stroke-dasharray: 5 4; }
.map-object text {
  fill: #152431;
  stroke: white;
  stroke-width: 4px;
  paint-order: stroke fill;
  font: 650 19px system-ui, sans-serif;
}
