.legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.legend b.b { color: #f5f5f5; }
.legend b.w { color: #a3a3a3; }

.rv-score {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.rv-score b { color: #fff; font-size: 1.1rem; }

.rv-wrap {
  width: min(520px, 100%);
  margin: 8px auto 24px;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: 22px 1fr;
  gap: 4px;
}
.rv-cols, .rv-rows {
  display: grid;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
}
.rv-cols {
  grid-column: 2;
  grid-template-columns: repeat(8, 1fr);
  text-align: center;
}
.rv-rows {
  grid-row: 2;
  grid-template-rows: repeat(8, 1fr);
  align-items: center;
  text-align: center;
}
.rv-board {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  background: #14532d;
  border: 1px solid #166534;
}
.rv-board .cell {
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #15803d;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.rv-board .cell:hover { background: #16a34a; }
.rv-board .cell.valid::after {
  content: "";
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.85);
}
.rv-board .cell.last { box-shadow: inset 0 0 0 2px #facc15; }
.rv-board .cell.preview { background: #ca8a04; }

.rv-piece {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.rv-piece.B {
  background: radial-gradient(circle at 30% 28%, #525252, #111 48%, #000);
}
.rv-piece.W {
  background: radial-gradient(circle at 30% 28%, #fff, #e5e5e5 48%, #a3a3a3);
}
.rv-piece.flip { animation: rvflip 0.45s ease; }

@keyframes rvflip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg) scale(0.88); }
  100% { transform: rotateY(0deg); }
}
