/* Gemeinsames Mal-Raster + Steuerung (wie PORTFOLIO.html) */
:root {
  --grid-cell-base: #39ff14;
  --grid-cell-paint: #000000;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  grid-template-rows: repeat(20, 1fr);
  pointer-events: none;
}

.grid-bg__cell {
  background-color: var(--grid-cell-base);
  box-sizing: border-box;
  border-radius: 4px;
}

.grid-bg__cell.is-painted {
  background-color: var(--grid-cell-paint);
}

.grid-bg__cell.is-painted.merge-top {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.grid-bg__cell.is-painted.merge-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.grid-bg__cell.is-painted.merge-bottom {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.grid-bg__cell.is-painted.merge-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.fixed-save-doodle-group {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  color: #000000;
  font-family: "MONOSPACE 821 W26 HEBREW", monospace;
  font-size: var(--ui-text-size, clamp(14px, 1.85vw, 22px));
  font-weight: 400;
  user-select: none;
  text-align: right;
  line-height: 1.1;
}

.fixed-save-doodle-group > #saveDoodleBtn {
  cursor: pointer;
}

.fixed-draw-color-picker {
  position: fixed;
  right: 20px;
  bottom: 148px;
  z-index: 200;
  color: #000000;
  font-family: "MONOSPACE 821 W26 HEBREW", monospace;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  text-align: right;
}

.draw-neon-palette {
  position: fixed;
  right: 20px;
  bottom: 180px;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 240px;
  justify-content: flex-end;
}

.draw-neon-palette[hidden] {
  display: none !important;
}

.doodle-neon-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
  color: inherit;
}

.doodle-neon-swatch.is-selected {
  border-color: #000000;
  box-shadow: 0 0 0 2px #39ff14, 0 0 12px currentColor;
}

.doodle-neon-swatch:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* PORTFOLIO.html nutzt für draw palette die Klasse .neon-swatch */
.draw-neon-palette .neon-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
  color: inherit;
}

.draw-neon-palette .neon-swatch.is-selected {
  border-color: #000000;
  box-shadow: 0 0 0 2px #39ff14, 0 0 12px currentColor;
}

.draw-neon-palette .neon-swatch:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/*
 * Wie PORTFOLIO.html: Textfarbe = Raster-Basis; mix-blend-mode difference
 * invertiert über schwarz (bzw. --grid-cell-paint) gemalten Zellen.
 */
.dynamic-ink {
  color: var(--grid-cell-base, #39ff14) !important;
  mix-blend-mode: difference;
}

/* PORTFOLIO-Ordner: Titel + „to the project“ */
.rect-layer-label,
.rect-layer-cta {
  color: var(--grid-cell-base, #39ff14) !important;
  mix-blend-mode: difference;
}
