.secondary,
.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.secondary:hover,
.ghost:hover,
.secondary.active {
  background: rgba(181, 100, 42, 0.14);
}

.mask-editor-shell[hidden] {
  display: none;
}

.mask-editor-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.mask-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 24, 18, 0.5);
  backdrop-filter: blur(8px);
}

.mask-editor {
  position: relative;
  width: min(1280px, calc(100vw - 32px));
  margin: 24px auto;
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.mask-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.slider-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.mask-canvas-wrap {
  overflow: auto;
  max-height: calc(100vh - 260px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, rgba(181,100,42,0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(181,100,42,0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(181,100,42,0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(181,100,42,0.08) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

#mask-editor-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}
