.st-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: min(100%, 520px);
}

.st-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 12px;
  background: #3f6212;
  box-shadow: var(--shadow);
}

.st-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #84cc16;
  font: 800 clamp(0.8rem, 3.6vw, 1.3rem) / 1 var(--font);
  cursor: pointer;
}

.st-cell.lake {
  background: #0ea5e9;
  cursor: default;
}

.st-cell.o0,
.st-cell.o1 {
  color: #fff;
}

.st-cell.o0 {
  background: linear-gradient(160deg, var(--p1), #1d4ed8);
}

.st-cell.o1 {
  background: linear-gradient(160deg, var(--p2), #b91c1c);
}

.st-cell.hidden::after {
  content: "";
  width: 40%;
  height: 40%;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.st-cell.last {
  box-shadow: inset 0 0 0 3px #fde047;
}

.st-cell.sel {
  box-shadow: inset 0 0 0 4px #fff;
}

.st-cell.target::before {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.st-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.st-bar[hidden],
.st-curtain[hidden] {
  display: none;
}

.st-curtain {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.9rem;
}

.st-battle {
  min-height: 1.3em;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.st-dead {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* телефон: поле не выше экрана за вычетом переключателей и статуса,
   кнопки расстановки и сводка боя сразу под ним */
@media (max-width: 640px) {
  .game-stage {
    gap: 10px;
  }

  .st-wrap {
    gap: 8px;
  }

  .st-board {
    width: min(100%, max(260px, calc(100svh - 330px)));
  }

  .st-dead {
    gap: 2px 12px;
  }
}
