/* Minefield Master - classic Minesweeper grid. */
.ms-arena { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.ms-grid {
  display: grid;
  gap: 3px;
  padding: 8px;
  width: min(94vw, 400px);
  aspect-ratio: 1 / 1;
  background: var(--casino-carbon, #12121e);
  border: 1px solid var(--casino-line, #2e2e44);
  border-radius: 14px;
  touch-action: manipulation;
  user-select: none;
}

.ms-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #3a3a52;
  color: #f5f6fa;
  font-family: "Chivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(13px, 3.6vw, 20px);
  cursor: pointer;
  transition: background .08s ease, transform .08s ease;
}
.ms-cell:active { transform: scale(.92); }
.ms-cell.open { background: rgba(255,255,255,.06); cursor: default; }
.ms-cell.flag { background: #4a3a20; }
.ms-cell.mine { background: #ff2d55; font-size: clamp(12px, 3.2vw, 18px); }
.ms-cell.hit { background: #ff1744; box-shadow: 0 0 18px rgba(255,23,68,.8); animation: ms-shake .3s ease; }
@keyframes ms-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

#flagMode.on { background: #ff8c00; color: #0a0a14; box-shadow: 0 0 12px rgba(255,140,0,.6); }

@media (max-width: 640px) {
  .ms-grid { gap: 2px; padding: 6px; }
  .ms-cell { border-radius: 4px; }
}
