/* Ristinolla.net/reversi (6.11.2026). Perustyylit tulevat ../ristinolla.css:stä (värit, napit, valitsimet). */
:root {
  --r-vihrea: #2f7d55;
  --r-viiva: #1d5a3b;
}
.reversi-kehys { max-width: 560px; }
.reversilauta {
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  width: 100%; aspect-ratio: 1 / 1; background: var(--r-vihrea); gap: 2px; padding: 2px;
  border: 2px solid var(--r-viiva); border-radius: 4px; background-color: var(--r-viiva);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.rruutu {
  position: relative; border: 0; padding: 0; margin: 0; width: 100%; height: 100%; min-width: 0; min-height: 0;
  background: var(--r-vihrea); display: flex; align-items: center; justify-content: center; cursor: default;
  font: inherit; color: inherit;
}
.rruutu.sallittu { cursor: pointer; }
.rruutu.sallittu::after {
  content: ""; width: 22%; height: 22%; border-radius: 50%; background: rgba(0, 0, 0, 0.28);
}
.rruutu.sallittu.valkean::after { background: rgba(255, 255, 255, 0.35); }
.rruutu:focus-visible { outline: 3px solid #ffdd57; outline-offset: -3px; z-index: 1; }
.kiekko { width: 84%; height: 84%; border-radius: 50%; pointer-events: none; position: relative; }
.kiekko.b { background: radial-gradient(circle at 35% 30%, #555 0%, #1a1a1a 50%, #050505 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.kiekko.w { background: radial-gradient(circle at 35% 30%, #fff 0%, #f0f0f0 55%, #c8c8c8 100%); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45); }
.kiekko.kaannetty { animation: kaanto 0.35s ease-out; }
@keyframes kaanto { from { transform: scaleX(0.1); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .kiekko.kaannetty { animation: none; } }
.kiekko .viimeisin { position: absolute; left: 40%; top: 40%; width: 20%; height: 20%; border-radius: 50%; background: #ffdd57; }
.rkoord { position: absolute; font-size: 10px; font-weight: 600; line-height: 1; color: rgba(255, 255, 255, 0.65); pointer-events: none; }
.rkoord.sarake { right: 3px; bottom: 2px; }
.rkoord.rivi { left: 3px; top: 3px; }
.kiekkoluku { margin: 8px 0 0; font-weight: 600; }
