/* DUST APP manual mask editor */
.mask-editor-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.mask-editor-tools .btn {
  min-height: 38px;
  white-space: normal;
}

.mask-editor-tools .active-tool {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12) inset;
}

.mask-editor-add-btn.active-tool {
  background: #177a52;
  color: #fff;
}

.mask-editor-erase-btn.active-tool {
  background: #b33a42;
  color: #fff;
}

.mask-editor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.mask-editor-stat {
  border: 1px solid var(--line, rgba(128,128,128,.28));
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  background: rgba(127,127,127,.06);
}

.mask-editor-stat span {
  display: block;
  font-size: 11px;
  opacity: .75;
}

.mask-editor-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.mask-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.mask-editor-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.mask-editor-status[data-state="add"] {
  border-color: rgba(34, 167, 111, .5);
}

.mask-editor-status[data-state="erase"] {
  border-color: rgba(218, 70, 82, .55);
}

.mask-editor-map-active {
  cursor: crosshair !important;
  user-select: none;
}

@media (max-width: 520px) {
  .mask-editor-tools,
  .mask-editor-actions,
  .mask-editor-stats {
    grid-template-columns: 1fr;
  }
}

/* v0.3: keep explanatory notes visually consistent with compact app notices. */
.mask-editor-note {
  margin-top: 6px;
  padding: 7px 9px !important;
  font-size: 11px !important;
  line-height: 1.65 !important;
  opacity: 0.9;
}
