.workbench-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.workbench-toolbar h2 {
  margin-bottom: 2px;
  font-size: 15px;
}

.workbench-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.workbench-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.stage {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(45deg, #f4f7fb 25%, transparent 25%),
    linear-gradient(-45deg, #f4f7fb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f7fb 75%),
    linear-gradient(-45deg, transparent 75%, #f4f7fb 75%);
  background-size: 26px 26px;
  background-position: 0 0, 0 13px, 13px -13px, -13px 0;
}

.grid-frame {
  position: relative;
  width: calc(var(--grid-width) * var(--cell-size));
  height: calc(var(--grid-height) * var(--cell-size));
  max-width: 100%;
  flex: 0 0 auto;
  box-shadow: 0 20px 56px rgba(30, 41, 59, .18);
  background: #fff;
}

.reference-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .35;
  pointer-events: none;
  display: none;
}

.grid-layer {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(var(--grid-width), var(--cell-size));
  grid-template-rows: repeat(var(--grid-height), var(--cell-size));
  border-top: 1px solid rgba(30, 41, 59, .58);
  border-left: 1px solid rgba(30, 41, 59, .58);
  user-select: none;
}

.pixel-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(30, 41, 59, .58);
  border-bottom: 1px solid rgba(30, 41, 59, .58);
  cursor: crosshair;
  font-size: max(7px, calc(var(--cell-size) * .38));
  line-height: 1;
  font-weight: 950;
}

.pixel-cell:hover {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.pixel-cell span {
  opacity: 0;
}

.grid-layer.show-numbers .pixel-cell span,
.grid-layer.mode-task .pixel-cell span {
  opacity: 1;
}

.grid-layer.mode-task .pixel-cell {
  background: #fff !important;
}

.grid-layer.mode-solution .pixel-cell span {
  opacity: 0;
}

.grid-layer.mode-edit .pixel-cell.is-bg {
  background: transparent !important;
}

.grid-layer.mode-task .pixel-cell.is-bg span {
  opacity: 0;
}
