/* Last-linked water state: hiding paint rather than relying on inherited ink
   colour prevents selected/illustrated themes from showing fake letters. */
.cell > .cell-letter {
  display: inline-block;
  line-height: 1;
  pointer-events: none;
}
#board.board .cell.water-washed > .cell-letter {
  opacity: var(--water-letter-alpha, 0);
  text-shadow: none;
  pointer-events: none;
}
#board.board .cell.wet.original > .cell-letter {
  opacity: 1;
}
#board.board .cell.wet.original:not(.selected) {
  color: var(--ink, #073e48);
  background: color-mix(in srgb, #e7faf0 var(--wet-strength, 100%), #fff4d3);
  box-shadow: inset 0 0 0 1px #a3caba, inset 0 -2px 0 #b1d2c177;
}
#board.board .cell.wet.original.selected {
  color: #fffdf0;
  background: linear-gradient(145deg, #10bdb7, #00717d 70%);
  text-shadow: 0 1px #005762;
  box-shadow: inset 0 1px #affff0, inset 0 -2px #00535d55, 0 1px #966529;
}
#board.board .cell.wet.water-protected:not(.special) {
  color: var(--ink, #073e48);
}
#board.board .cell.water-washed {
  background: color-mix(in srgb, #def4f1 var(--wet-strength, 100%), #fff4d3);
  box-shadow: inset 0 0 0 1px #bedad0, inset 0 -2px 0 #b1d2c144;
}
#board.board .cell.wet.original::before {
  border-color: #effff3a6;
  box-shadow: none;
}
.water-rinse-layer {
  position: absolute;
  z-index: 7;
  display: block;
  overflow: hidden;
  contain: paint;
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.water-rinse-flow {
  position: absolute;
  z-index: 3;
  left: -3%;
  top: 0;
  width: 106%;
  border-radius: 42% 44% 26% 32%;
  border-top: 2px solid #f3ffffcf;
  border-bottom: 1px solid #86dce778;
  background: linear-gradient(180deg, #f4ffff94, #b7f3f043 22%, #6bcfd62d 56%, #72cbd400);
  box-shadow: inset 0 3px 0 #ffffff3b;
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
}
.water-rinse-tray {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  contain: paint;
  border-radius: 6px;
  pointer-events: none;
}
.water-rinse-ink {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #0b5260;
  line-height: 1;
  text-shadow: none;
  transform-origin: 50% 43%;
  pointer-events: none;
}
.water-rinse-runoff {
  position: absolute;
  left: 31%;
  top: 45%;
  width: 38%;
  height: 42%;
  background:
    linear-gradient(#0b5260ad, #0b526000) 18% 0 / 14% 78% no-repeat,
    linear-gradient(#0b5260c9, #0b526000) 52% 0 / 17% 100% no-repeat,
    linear-gradient(#0b526099, #0b526000) 87% 0 / 12% 65% no-repeat;
  border-radius: 30%;
  transform-origin: 50% 0;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .water-rinse-layer { display: none; }
}
