/* Each painted bed has a transparent, softly torn edge. The space around it
   leaves a thin strip of the meadow visible without gaps in the touch grid. */
#tiles {
  --ink-gold: #eac06b;
  --ink-water: #9acfc3;
  --ink-sprout: #e2dda0;
  image-rendering: auto;
}
#tiles::before { content: none; }
#tiles .field-cell,
#tiles .field-cell[data-wet="true"] {
  background-image: url('art/jiang-soil-dry.webp');
  background-color: transparent;
  background-size: 300% 100%;
  background-position: var(--soil-x) center;
  image-rendering: auto;
}
#tiles .field-cell[data-wet="true"] { background-image: url('art/jiang-soil-wet.webp'); }
#tiles .field-cell[data-wet="true"]:not([data-stage="ripe"])::before {
  width: clamp(6px,.58vw,10px);
  height: clamp(8px,.72vw,12px);
  top: auto; bottom: 15%; right: 11%;
  border-radius: 88% 12% 64% 47% / 78% 18% 68% 45%;
  background: radial-gradient(ellipse at 30% 65%,#edf8ed 0 11%,transparent 26%),linear-gradient(150deg,#b1ddd5,#659c9d);
  border: 1px solid #3b6565;
  transform: rotate(-28deg);
  opacity: .92;
}
#tiles .field-cell .field-plant {
  width: 96%; left: 2%; bottom: 7%; height: 119%;
  image-rendering: auto;
}
#tiles .field-cell[data-stage="sprout"] .field-plant { height: 64%; width: 80%; left: 10%; bottom: 15%; }
#tiles .field-cell[data-stage="growing"] .field-plant { height: 91%; bottom: 9%; }

#tiles .field-cell .field-ripe,
#tiles .field-cell::after {
  --ink: var(--ink-gold);
  --leg: clamp(5px,.65vw,10px);
  --line: 1.5px;
  inset: 5% 4% 7%;
  width: auto; height: auto;
  aspect-ratio: auto;
  pointer-events: none;
  background:
    linear-gradient(var(--ink),var(--ink)) left top / var(--leg) var(--line),
    linear-gradient(var(--ink),var(--ink)) left top / var(--line) var(--leg),
    linear-gradient(var(--ink),var(--ink)) right top / var(--leg) var(--line),
    linear-gradient(var(--ink),var(--ink)) right top / var(--line) var(--leg),
    linear-gradient(var(--ink),var(--ink)) right bottom / var(--leg) var(--line),
    linear-gradient(var(--ink),var(--ink)) right bottom / var(--line) var(--leg),
    linear-gradient(var(--ink),var(--ink)) left bottom / var(--leg) var(--line),
    linear-gradient(var(--ink),var(--ink)) left bottom / var(--line) var(--leg);
  background-repeat: no-repeat;
}
#tiles .field-cell .field-ripe {
  animation: none;
  --ink: #ffe3a0;
  filter: drop-shadow(0 .7px #785d39);
}
#tiles .field-cell::after { --ink: #f4ebc9; }
#tiles[data-tool="water"] .field-cell::after { --ink: var(--ink-water); }
#tiles[data-tool="plant"] .field-cell::after { --ink: var(--ink-sprout); }
#tiles:not([data-tool="smart"]) .field-cell:not([data-action=""])::after { background-color: transparent; opacity: .65; }
#tiles[data-tool="harvest"] .field-cell[data-stage="ripe"]::after { opacity: 0; }
#tiles .field-cell:focus-visible {
  outline: 2px solid #7b3a28;
  outline-offset: -1px;
  border-radius: 6%;
}
#tiles .field-intent,
#tiles .field-caption {
  border: 1px solid #adab83;
  border-radius: 5px;
  color: #344934;
  background: #faf6e8;
  box-shadow: 0 1px 2px #4f432e2b;
  font: 650 clamp(11px,.90vw,14px)/1.26 var(--font,system-ui);
  text-shadow: none;
}
#tiles .field-fx[data-kind="water"] .field-caption { color: #345d60; border-color: #8caaa1; }
#tiles .field-fx[data-kind="harvest"] .field-caption { color: #704a26; border-color: #c5a56b; }
#tiles .field-caption::after { background: #9e9c76; }
#tiles .field-fx i { border-radius: 50% 30% 55% 35%; opacity: .8; box-shadow: none; }
#tiles .field-fx[data-kind="water"] i { border-radius: 75% 45% 65% 35%; }
#tiles .field-fx[data-kind="deny"] { border-radius: 6%; box-shadow: inset 0 0 0 1.5px #b65d44; }
#tiles .field-tap { animation-name: journal-field-pat; }
@keyframes journal-field-pat { from { filter: brightness(1.12); } to { filter: brightness(1); } }
