#blockBuilderPanel {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 132;
  display: none;
  width: min(292px, calc(100vw - 40px));
  padding: 12px;
  color: #e5e7eb;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

#blockBuilderPanel.show { display: grid; gap: 10px; }
.blockBuilderHeader { display: flex; align-items: center; justify-content: space-between; }
.blockBuilderHeader strong { font-size: 14px; }
.blockBuilderHeader button {
  width: 30px;
  height: 30px;
  padding: 0;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
}

.blockBuilderTools,
.blockBuilderActions,
.blockBuilderMapActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.blockBuilderShapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.blockBuilderColorRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

#blockBuilderPanel button,
#blockBuilderPanel a {
  min-height: 34px;
  padding: 7px 9px;
  color: #e2e8f0;
  background: #273449;
  border: 1px solid #475569;
  border-radius: 6px;
  font: 600 11px/1.2 Inter, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

#blockBuilderPanel button.active { color: #111827; background: #f59e0b; border-color: #fbbf24; }
#blockBuilderPanel button:disabled { opacity: 0.45; cursor: default; }
.blockBuilderSwatches { display: grid; grid-template-columns: repeat(4, 32px); gap: 6px; }
.blockBuilderSwatches button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 2px solid transparent;
}
.blockBuilderSwatches button.active { border-color: #f8fafc; box-shadow: 0 0 0 2px #111827; }
#blockBuilderPanel .blockBuilderIconButton {
  width: 34px;
  min-width: 34px;
  padding: 0;
  font-size: 20px;
}
.blockBuilderMapActions { padding-top: 8px; border-top: 1px solid rgba(148, 163, 184, 0.28); }
#blockBuilderCount,
#blockBuilderStatus { min-height: 15px; color: #cbd5e1; font-size: 11px; line-height: 1.35; }
#blockBuilderStatus { color: #fbbf24; }

#coords { display: none; align-items: center; gap: 9px; }
#coords.show { display: flex; }
#coordsOsmLink {
  padding-left: 8px;
  color: #2563eb;
  border-left: 1px solid #cbd5e1;
  font-weight: 700;
  text-decoration: none;
}
#coordsOsmLink[hidden] { display: none; }

@media (max-width: 640px) {
  #blockBuilderPanel { top: 72px; right: 10px; width: min(276px, calc(100vw - 20px)); }
}
