/* 만칼라 판: 칼라 2개 + 구멍 6개가 한 줄에 8칸. 공통 화면 모양은 /shared/student.css */
:root {
  --mancala-bg: #e3c48f;
  --mancala-edge: #a07a45;
  --pit-bg: #c9a26a;
  --pit-mine: #f6e7cb;
  --seed: #6b4a2b;
}

/* 먼저(●)·나중(○): 색이 아니라 모양과 글자로 구분한다 */
.side-mark {
  flex: none;
  font-size: 1.2rem;
  line-height: 1;
}

/* 친구 칼라 · 구멍 6칸 · 내 칼라. 칼라는 두 줄을 차지한다.
   360px 화면에서 구멍이 손가락으로 누르기 충분하게(너비 약 42px, 높이 46px 이상) 칼라를 좁히고 틈을 줄였다 */
.mancala {
  display: grid;
  grid-template-columns: 0.6fr repeat(6, 1fr) 0.6fr;
  grid-template-rows: auto auto auto auto;
  gap: 3px;
  padding: 4px;
  margin-bottom: 4px;
  border: 2px solid var(--mancala-edge);
  border-radius: var(--radius);
  background: var(--mancala-bg);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.row-label {
  grid-column: 2 / 8;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-800);
  text-align: center;
}

.row-label.top {
  grid-row: 1;
}

.row-label.bottom {
  grid-row: 4;
}

.store {
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 0;
  border-radius: 999px;
  background: var(--pit-bg);
  border: 2px solid var(--mancala-edge);
}

.store.theirs {
  grid-column: 1;
}

.store.mine {
  grid-column: 8;
  background: var(--pit-mine);
}

.store-label {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

/* 구멍 하나 (내 줄은 누를 수 있는 버튼, 공통 버튼 모양을 지운다) */
.pit {
  position: relative;
  min-width: 0;
  min-height: 46px;
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--mancala-edge);
  background: var(--pit-bg);
  color: var(--slate-900);
  box-shadow: none;
}

.pit.mine {
  background: var(--pit-mine);
}

button.pit:hover:not(:disabled) {
  background: var(--pit-mine);
}

.pit.empty .seed-count {
  color: var(--slate-500);
}

.pit-no {
  position: absolute;
  top: -2px;
  left: 1px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--slate-700);
}

.seed-count {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* 칼라는 누르지 않으므로 360px에서 약 25px까지 좁아진다. 두 자리 수가 들어가게 한다 */
.store .seed-count {
  font-size: 1.05rem;
  letter-spacing: -0.05em;
}

.seed-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  max-width: 70%;
  min-height: 4px;
}

.seed {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--seed);
}

/* 고른 구멍: 색만이 아니라 점선 테두리로 모양이 바뀐다 */
.pit.picked {
  border: 3px dashed var(--accent);
  background: var(--accent-soft);
}

/* 보낸 뒤 서버 답을 기다리는 구멍 */
.pit.picked.sending {
  opacity: 0.5;
}

/* 씨앗 움직임: 방금 씨앗이 들어간 칸 (테두리 색과 굵기로 보인다) */
.pit.drop,
.store.drop {
  border: 3px solid var(--accent);
  background: var(--accent-soft);
}

.motion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.motion-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
}

/* 바로 전에 고른 구멍: 두 겹 테두리 */
.pit.last {
  outline: 2px solid var(--slate-800);
  outline-offset: 1px;
}

.review-note {
  margin: 4px 0 0;
  text-align: center;
  font-weight: 700;
}
