.turn-body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.21) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(145deg, #eee8d5, #d9dcc5);
  background-size: 42px 42px, 42px 42px, auto;
}

.turn-board-wrap {
  position: relative;
  overflow: auto;
  padding: 14px;
  background: #6b7456;
  scrollbar-color: #bec499 #425f4b;
}

.turn-grid {
  display: grid;
  min-width: 720px;
  overflow: hidden;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 2px;
  border: 2px solid rgba(238, 235, 198, 0.25);
  border-radius: 13px;
  background: rgba(38, 62, 48, 0.28);
  box-shadow: inset 0 0 40px rgba(26, 42, 31, 0.24);
}

.turn-tile {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.turn-tile::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  content: "";
}

.turn-tile:hover,
.turn-tile:focus-visible {
  z-index: 2;
  outline: 0;
  filter: brightness(1.18);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px #f2dd87, 0 5px 14px rgba(23, 41, 31, 0.28);
}

.turn-tile:disabled {
  cursor: default;
  opacity: 1;
}

.turn-tile.stage-0.moisture-low { background: #a58d62; }
.turn-tile.stage-0.moisture-mid { background: #ae9a69; }
.turn-tile.stage-0.moisture-high { background: #aca574; }
.turn-tile.stage-1 { background: #87a555; }
.turn-tile.stage-2 { background: #5c8658; }
.turn-tile.stage-3 { background: #2c6248; }

.turn-tile.is-recent {
  z-index: 1;
  animation: tile-answer 620ms ease-out;
}

.tile-mark {
  position: relative;
  z-index: 1;
  color: rgba(251, 247, 214, 0.86);
  font-family: Georgia, serif;
  font-size: clamp(0.62rem, 1.5vw, 1.34rem);
  line-height: 1;
  text-shadow: 0 2px 4px rgba(21, 43, 31, 0.25);
}

.stage-0 .tile-mark {
  color: rgba(82, 67, 44, 0.32);
  font-size: 1rem;
}

.stage-1 .tile-mark {
  transform: rotate(-14deg);
}

.stage-2 .tile-mark,
.stage-3 .tile-mark {
  font-size: clamp(0.74rem, 1.75vw, 1.58rem);
}

.turn-overlay {
  position: absolute;
  background:
    radial-gradient(circle at center, rgba(118, 142, 77, 0.26), transparent 35%),
    linear-gradient(135deg, rgba(32, 67, 51, 0.94), rgba(51, 85, 58, 0.89));
}

.turn-glyph {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(239, 233, 159, 0.48);
  border-radius: 50%;
  color: #e8dc8d;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.tile-action-list {
  display: grid;
  gap: 8px;
}

.tile-action-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(34, 71, 58, 0.11);
  border-radius: 12px;
  background: rgba(246, 244, 231, 0.72);
}

.tile-action-list p,
.turn-sequence p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.tile-action-list strong,
.turn-sequence strong {
  font-family: Georgia, serif;
  font-size: 0.86rem;
}

.tile-action-list small,
.turn-sequence small {
  color: #738078;
  font-size: 0.66rem;
  line-height: 1.36;
}

.action-tile {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #f5efd0;
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.barren-action { color: #62543c; background: #af986b; }
.grass-action { background: #87a555; }
.sapling-action { background: #5c8658; }
.forest-action { background: #2c6248; }

.turn-sequence ol {
  display: grid;
  gap: 9px;
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.turn-sequence li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-sequence li > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #486047;
  background: #e5e9cf;
  font-family: Georgia, serif;
  font-weight: 700;
}

@keyframes tile-answer {
  0% { box-shadow: inset 0 0 0 3px rgba(255, 240, 139, 0.95); filter: brightness(1.35); }
  100% { box-shadow: inset 0 0 0 0 rgba(255, 240, 139, 0); filter: brightness(1); }
}

@media (max-width: 1040px) {
  .turn-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .turn-board-wrap {
    padding: 7px;
  }

  .turn-panel {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turn-tile.is-recent {
    animation: none;
  }
}
