.paint {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ece9d8;
}
.paint-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* caixa de ferramentas: 2 colunas de 25x25, botões clássicos */
.paint-toolbox {
  width: 56px;
  flex: 0 0 56px;
  padding: 3px 0 0 4px;
  border-right: 1px solid #aca899;
  box-shadow: 1px 0 0 #fff;
}
.paint-tools {
  display: grid;
  grid-template-columns: 25px 25px;
  gap: 0;
}
.paint-tools button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid transparent;
  background: #ece9d8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paint-tools button:hover {
  border-color: #fff #716f64 #716f64 #fff;
}
.paint-tools button.is-on {
  border-color: #716f64 #fff #fff #716f64;
  background: repeating-conic-gradient(#fff 0 25%, #ece9d8 0 50%) 0 0 / 2px 2px;
}
.paint-tools button.is-on img {
  transform: translate(1px, 1px);
}
.paint-options {
  width: 41px;
  height: 66px;
  margin: 3px 0 0 3px;
  border: 1px solid;
  border-color: #aca899 #fff #fff #aca899;
  background: #ece9d8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paint-options .is-on {
  background: #316ac5;
}
.po-lines,
.po-fill,
.po-eraser,
.po-spray,
.po-zoom,
.po-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.po-lines > div {
  width: 34px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.po-lines span {
  display: block;
  width: 26px;
  background: #000;
}
.po-lines .is-on span {
  background: #fff;
}
.po-fill > div {
  width: 37px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.po-fill span {
  width: 25px;
  height: 12px;
  border: 1px solid #000;
}
.po-fill-both {
  background: #808080;
}
.po-fill-fill {
  background: #808080;
  border-color: #808080 !important;
}
.po-fill .is-on span {
  border-color: #fff;
}
.po-eraser > div {
  width: 20px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.po-eraser span {
  background: #000;
}
.po-eraser .is-on span {
  background: #fff;
}
.po-brush {
  display: grid;
  grid-template-columns: repeat(3, 12px);
  gap: 1px;
}
.po-brush > div {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.po-brush span {
  background: #000;
}
.pb-round {
  border-radius: 50%;
}
.pb-slash {
  background: linear-gradient(135deg, transparent 45%, #000 45% 55%, transparent 55%) !important;
}
.pb-backslash {
  background: linear-gradient(45deg, transparent 45%, #000 45% 55%, transparent 55%) !important;
}
.po-brush .is-on span {
  filter: invert(1);
}
.po-spray {
  flex-flow: row wrap;
  justify-content: center;
}
.po-spray > div {
  width: 24px;
  height: 24px;
}
.po-zoom > div {
  width: 37px;
  height: 14px;
  font-size: 10px;
  line-height: 14px;
  padding-left: 4px;
}
.po-zoom .is-on {
  color: #fff;
}
.po-select > div {
  width: 37px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* área de trabalho cinza com a folha branca e as alças */
.paint-work {
  flex: 1;
  overflow: auto;
  background: #808080;
  position: relative;
}
.paint-sheet {
  position: relative;
  margin: 3px;
}
.paint-canvas,
.paint-overlay {
  position: absolute;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  display: block;
}
.paint-overlay {
  pointer-events: none;
}
.paint-handle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #000080;
}
.paint-handle.h-r {
  right: -3px;
  top: 50%;
}
.paint-handle.h-b {
  bottom: -3px;
  left: 50%;
}
.paint-handle.h-rb {
  right: -3px;
  bottom: -3px;
}
.paint-text {
  position: absolute;
  min-width: 120px;
  min-height: 20px;
  border: 1px dashed #000;
  background: transparent;
  font: 13px Arial, sans-serif;
  outline: none;
  resize: both;
  padding: 0;
}

/* caixa de cores: atuais + 14x2 cores */
.paint-colors {
  height: 48px;
  display: flex;
  align-items: flex-start;
  padding: 6px 0 0 1px;
  border-top: 1px solid #fff;
  gap: 1px;
}
.paint-current {
  width: 32px;
  height: 32px;
  position: relative;
  background: repeating-conic-gradient(#fff 0 25%, #ece9d8 0 50%) 0 0 / 2px 2px;
}
.paint-current span {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid;
  border-color: #fff #716f64 #716f64 #fff;
}
.paint-fg {
  left: 4px;
  top: 4px;
}
.paint-bg {
  right: 4px;
  bottom: 4px;
}
.paint-palette {
  display: grid;
  grid-template-columns: repeat(14, 16px);
  grid-template-rows: 16px 16px;
}
.paint-palette span {
  border: 1px solid;
  border-color: #716f64 #fff #fff #716f64;
  box-shadow: inset 1px 1px #404040;
}

.paint-status {
  height: 20px;
  display: flex;
  align-items: center;
  border-top: 1px solid #aca899;
  padding: 0 0 0 3px;
}
.paint-status-help {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.paint-status-pane {
  width: 110px;
  height: 18px;
  line-height: 18px;
  padding: 0 4px;
  border-left: 1px solid #aca899;
  box-shadow: inset 1px 0 #fff;
}
